"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),episodes_exports={};__export(episodes_exports,{getEpisodes:()=>getEpisodes});var getEpisodes=__name(function({url:url,providerContext:providerContext}){const{axios:axios,cheerio:cheerio,commonHeaders:headers}=providerContext;return console.log("getEpisodeLinks",url),axios.get(url,{headers:headers}).then(res=>{const $=cheerio.load(res.data),container=$("ul:has(p.font-bold:contains('Episode'))").first(),episodes=[];return container.find("p.font-bold").each((_,element)=>{const el=$(element);let title=el.text().trim();if(!title)return;let currentElement=el.parent();for(;currentElement.next().length&&!currentElement.next().find("p.font-bold").length;)currentElement=currentElement.next(),currentElement.find("a[href]").each((_2,a)=>{var _a;const href=null==(_a=$(a).attr("href"))?void 0:_a.trim();href&&(href.includes("hubcloud.one")||href.includes("gdflix.dev"))&&episodes.push({title:title.replace(/ Links$/i,""),link:href})})}),episodes}).catch(err=>(console.log("getEpisodeLinks error:",err),[]))},"getEpisodes");exports.getEpisodes=getEpisodes;