"use strict";var __awaiter=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function l(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,l)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getStream=void 0;const getStream=e=>__awaiter(void 0,[e],void 0,function*({link:e,providerContext:t}){const{getBaseUrl:r}=t;try{const t="https://netfree2.cc",r=`https://netmirror.zendax.tech/api/net-proxy?url=${t}${"netflixMirror"==="netflixMirror"?"/mobile/playlist.php?id=":"/pv/playlist.php?id="}${e}&t=${Math.round((new Date).getTime()/1e3)}`,n=yield fetch(r,{credentials:"omit"}),i=yield n.json(),o=null==i?void 0:i[0],a=[];return null==o||o.sources.forEach(e=>{var r;a.push({server:e.label,link:null===(r=e.file)||void 0===r?void 0:r.replace(":su",":ni"),type:"m3u8",headers:{Referer:t,origin:t,Cookie:"hd=on"}})}),a}catch(e){return[]}});exports.getStream=getStream;