"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}){try{const{axios:axios,cheerio:cheerio}=providerContext,url=link,data=(yield axios.get(url)).data,$=cheerio.load(data),type=url.includes("tvshows")?"series":"movie",imdbId="",title=url.split("/")[4].replace(/-/g," "),image=$(".g-item").find("a").attr("href")||"",synopsis=$(".wp-content").find("p").text()||"",links=[];return"series"===type?$("#seasons").children().map((i,element)=>{const title2=$(element).find(".title").children().remove().end().text();let episodesList=[];$(element).find(".episodios").children().map((i2,element2)=>{const title3="Episode"+$(element2).find(".numerando").text().trim().split("-")[1],link2=$(element2).find("a").attr("href");title3&&link2&&episodesList.push({title:title3,link:link2})}),title2&&episodesList.length>0&&links.push({title:title2,directLinks:episodesList})}):links.push({title:title,directLinks:[{title:title,link:url.slice(0,-1),type:"movie"}]}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:links}}catch(err){return console.error(err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;