"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,scrapeEpisodePage:()=>scrapeEpisodePage});var headers={Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Cache-Control":"no-store","Accept-Language":"en-US,en;q=0.9",DNT:"1","User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"},getMeta=__name(function(_0){return __async(this,arguments,function*({link:link,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext;return axios.get(link,{headers:headers}).then(response=>{var _a;const $=cheerio.load(response.data),infoContainer=$(".entry-content,.post-inner"),title=$("h1.entry-title").text().trim()||$("h2.entry-title").text().trim()||"",imdbMatch=null==(_a=infoContainer.html())?void 0:_a.match(/tt\d+/),imdbId=imdbMatch?imdbMatch[0]:"",synopsis=infoContainer.find("h3:contains('SYNOPSIS'), h3:contains('synopsis')").next("p").text().trim()||"";let image=infoContainer.find("img").first().attr("src")||"";image.startsWith("//")&&(image="https:"+image);const type=/Season \d+/i.test(infoContainer.text())?"series":"movie",linkList=[];return"series"===type?infoContainer.find("h2 a").each((_,el)=>{var _a2;const el$=$(el),href=null==(_a2=el$.attr("href"))?void 0:_a2.trim(),linkText=el$.text().trim();href&&linkText.includes("Single Episode")&&linkList.push({title:linkText,episodesLink:href,directLinks:[]})}):infoContainer.find("a[href]").each((_,aEl)=>{var _a2;const el$=$(aEl),href=(null==(_a2=el$.attr("href"))?void 0:_a2.trim())||"";if(!href)return;const btnText=el$.text().trim()||"Download";linkList.push({title:btnText,directLinks:[{title:btnText,link:href,type:"movie"}],episodesLink:""})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,type:type,linkList:linkList}}).catch(err=>(console.error("getMeta error:",err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}))})},"getMeta"),scrapeEpisodePage=__name(function({link:link,providerContext:providerContext}){const{axios:axios,cheerio:cheerio}=providerContext,result=[];return axios.get(link,{headers:headers}).then(response=>{const $=cheerio.load(response.data);return $(".entry-content,.post-inner").find("h3 a").each((_,el)=>{var _a;const el$=$(el),href=null==(_a=el$.attr("href"))?void 0:_a.trim(),btnText=el$.text().trim()||"Download";href&&result.push({title:btnText,link:href,type:"series"})}),result}).catch(err=>(console.error("scrapeEpisodePage error:",err),result))},"scrapeEpisodePage");exports.getMeta=getMeta,exports.scrapeEpisodePage=scrapeEpisodePage;