"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,getBaseUrl:getBaseUrl}=providerContext,baseUrl=yield getBaseUrl("moviezwap"),url=link.startsWith("http")?link:`${baseUrl}${link}`,data=(yield axios.get(url)).data,$=cheerio.load(data);let image=$('img[width="260"]').attr("src")||"";image&&!image.startsWith("http")&&(image=baseUrl+image);const tags=$("font[color='steelblue']").map((i,el)=>$(el).text().trim()).get().slice(0,2),title=$("title").text().replace(" - MoviezWap","").trim()||"";let synopsis="",imdbId="",type="movie",infoRows=[];$("td:contains('Movie Information')").parent().nextAll("tr").each((i,el)=>{const tds=$(el).find("td");if(2===tds.length){const key=tds.eq(0).text().trim(),value=tds.eq(1).text().trim();infoRows.push(`${key}: ${value}`),key.toLowerCase().includes("plot")&&(synopsis=value),key.toLowerCase().includes("imdb")&&(imdbId=value)}}),synopsis||(synopsis=$("p:contains('plot')").text().trim());const links=[];return $('a[href*="download.php?file="], a[href*="dwload.php?file="]').each((i,el)=>{var _a;const downloadPage=(null==(_a=$(el).attr("href"))?void 0:_a.replace("dwload.php","download.php"))||"",text=$(el).text().trim();downloadPage&&/\d+p/i.test(text)&&links.push({title:text,directLinks:[{title:"Movie",link:baseUrl+downloadPage}]})}),$("img[src*='/images/play.png']").each((i,el)=>{const downloadPage=$(el).siblings("a").attr("href"),text=$(el).siblings("a").text().trim();console.log("Found link:🔥🔥",text,downloadPage),downloadPage&&text&&links.push({title:text,episodesLink:baseUrl+downloadPage})}),{title:title,synopsis:synopsis,image:image,imdbId:imdbId,tags:tags,type:type,linkList:links}}catch(err){return console.error(err),{title:"",synopsis:"",image:"",imdbId:"",type:"movie",linkList:[]}}})},"getMeta");exports.getMeta=getMeta;