"use strict";var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function c(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}s((r=r.apply(t,e||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=function(t){return __awaiter(this,arguments,void 0,function*({link:t,providerContext:e}){try{const{cheerio:n}=e,r=t,i=yield fetch(r),o=yield i.text(),a=n.load(o),c=[];return a(".c_h1,.c_h2").map((t,e)=>{a(e).find("span").remove();const n=a(e).find("a").text()||"",r=a(e).find("a").attr("href")||"";n&&r.includes("media")&&c.push({server:n,link:r,type:r.split(".").pop()||"mkv"})}),c}catch(t){return[]}})};exports.getStream=getStream;