"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),__async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),meta_exports={};__export(meta_exports,{getMeta:()=>getMeta});var getMeta=__name(function(_0){return __async(this,arguments,function*({link:link,providerContext:providerContext}){var _a,_b,_c;try{const{axios:axios,cheerio:cheerio,getBaseUrl:getBaseUrl}=providerContext,links=[],response=yield fetch("https://dob-worker.1proxy.workers.dev",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:link,method:"GET"})}),data=(yield response.json()).data;console.log("data",data);const title=((null==data?void 0:data.title)||"").replace(/\s*\[.*?\]\s*$/,""),synopsis=(null==data?void 0:data.description)||"",image=(null==(_a=null==data?void 0:data.cover)?void 0:_a.url)||"",rating=(null==data?void 0:data.imdbRatingValue)||"",tags=(null==(_c=null==(_b=null==data?void 0:data.genre)?void 0:_b.split(","))?void 0:_c.map(tag=>tag.trim()))||[],dubs=(null==data?void 0:data.dubs)||[];return null==dubs||dubs.forEach(dub=>{const link2={title:null==dub?void 0:dub.lanName,episodesLink:`/wefeed-mobile-bff/subject-api/resource?subjectId=${null==dub?void 0:dub.subjectId}&page=1&perPage=20&all=0&startPosition=1&endPosition=1&pagerMode=0&resolution=1080&se=1&epFrom=1&epTo=1`};links.push(link2)}),console.log("meta",{title:title,synopsis:synopsis,image:image,rating:rating,tags:tags,links:links}),{title:title,synopsis:synopsis,image:image,rating:rating,tags:tags,imdbId:"",type:"movie",linkList:links}}catch(err){return console.error(err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;