gives probably hindi only, there are more endpoints. see js below
/////////// DECRYPT PART:
async function eX(e, t) {
let a = eQ(e);
if (a.length < 28)
throw Error("Encrypted data too short");
let r = a.slice(0, 12)
, n = a.slice(12)
, s = await eJ(t)
, o = await crypto.subtle.decrypt({
name: "AES-GCM",
iv: r
}, s, n);
return new TextDecoder().decode(new Uint8Array(o))
}
function eQ(e) {
let t = atob(e)
, a = new Uint8Array(t.length);
for (let e = 0; e < t.length; e++)
a[e] = t.charCodeAt(e);
return a
}
async function eJ(e) {
let t = eQ(e);
if (t.length > 32 && (t = t.slice(0, 32)),
32 !== t.length)
throw Error("Key must be 32 bytes after processing");
return crypto.subtle.importKey("raw", t, {
name: "AES-GCM"
}, !1, ["decrypt"])
}
// ADDITIONAL JS/ENDPOINTS:
var eV = a(9598);
let eO = "https://second.vidnest.fun"
, eH = {
lamda: {
name: "Lamda",
movieUrl: "".concat(eO, "/allmovies/movie"),
type: "lamda"
},
alfa: {
name: "Alfa",
movieUrl: "".concat(eO, "/primesrc/movie"),
type: "alfa"
},
beta: {
name: "Beta",
movieUrl: "".concat(eO, "/flixhq/movie"),
type: "beta"
},
sigma: {
name: "Sigma",
movieUrl: "".concat(eO, "/hollymoviehd"),
type: "sigma"
},
gama: {
name: "Gama",
movieUrl: "".concat(eO, "/flixhq/movie"),
type: "gama"
},
catflix: {
name: "Catflix",
movieUrl: "".concat(eO, "/catflix/movie"),
type: "catflix"
},
hexa: {
name: "Hexa",
movieUrl: "".concat(eO, "/superstream/movie"),
type: "hexa"
},
delta: {
name: "Delta",
movieUrl: "".concat(eO, "/allmovies/movie"),
type: "delta"
}
}
, eq = "https://proxy2.aether.mom"
, ez = "61e2290429798c561450eb56b26de19b"
, eW = "https://api.themoviedb.org/3"
, eZ = "https://image.tmdb.org/t/p/w1280";
function eQ(e) {
let t = atob(e)
, a = new Uint8Array(t.length);
for (let e = 0; e < t.length; e++)
a[e] = t.charCodeAt(e);
return a
}
async function eJ(e) {
let t = eQ(e);
if (t.length > 32 && (t = t.slice(0, 32)),
32 !== t.length)
throw Error("Key must be 32 bytes after processing");
return crypto.subtle.importKey("raw", t, {
name: "AES-GCM"
}, !1, ["decrypt"])
}
async function eX(e, t) {
let a = eQ(e);
if (a.length < 28)
throw Error("Encrypted data too short");
let r = a.slice(0, 12)
, n = a.slice(12)
, s = await eJ(t)
, o = await crypto.subtle.decrypt({
name: "AES-GCM",
iv: r
}, s, n);
return new TextDecoder().decode(new Uint8Array(o))
}
async function eY(e, t) {
let a = await e.json();
if (!a.encrypted)
return console.log("Response is not encrypted, returning as-is"),
a;
if (!a.data || "string" != typeof a.data)
throw Error("Response missing encrypted data field");
console.log("Response is encrypted, decrypting...");
let r = await eX(a.data, t);
try {
return JSON.parse(r)
} catch (e) {
return r
}
}
var e$ = a(5065);
function e0() {
var e;
let t = (0,
s.useParams)().tmdbId
, a = (0,
s.useSearchParams)()
, i = (null == (e = a.get("server")) ? void 0 : e.toLowerCase()) || void 0
, l = i && ["lamda", "alfa", "beta", "sigma", "gama", "catflix", "hexa", "delta"].includes(i) ? i : null
, c = a.get("startAt")
, d = a.get("progress")
, u = e => {
var t, r;
return null != (r = null == (t = a.get(e)) ? void 0 : t.toLowerCase()) ? r : null
}
, m = e => "hide" === e || "false" === e || "0" === e || "off" === e || "" === e
, h = {
serverIcon: m(u("servericon")),
topCaption: m(u("topcaption")),
topSettings: m(u("topsettings")),
centerSeekBackward: m(u("centerseekbackward")),
centerPlay: m(u("centerplay")),
centerSeekForward: m(u("centerseekforward")),
timeSlider: m(u("timeslider")),
mute: m(u("mute")),
volume: m(u("volume")),
timeGroup: m(u("timegroup")),
bottomCaption: m(u("bottomcaption")),
bottomSettings: m(u("bottomsettings")),
pip: m(u("pip")),
cast: m(u("cast")),
fullscreen: m(u("fullscreen"))
}
, p = ( () => {
let e = null != c ? c : d;
if (!e)
return;
let t = Number(e);
return Number.isFinite(t) && t >= 0 ? t : void 0
}
)()
, [g,v] = (0,
n.useState)(null != l ? l : "lamda")
, [f,x] = (0,
n.useState)(null)
, [_,w] = (0,
n.useState)( () => localStorage.getItem("starredServer") || null)
, {videoData: b, loading: j, error: S, failedServers: y, setFailedServers: M, fetchMovieData: k, trySwitchServer: N, SERVERS: C, HLS_PROXY_BASE_URL: L, lastSuccessfulServer: I, loadingBackdrop: E, subtitleOptions: T, subtitlesLoaded: A, subtitlesLoading: R, loadSubtitles: B} = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "lamda"
, a = arguments.length > 2 ? arguments[2] : void 0
, r = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]
, [s,o] = (0,
n.useState)(null)
, [i,l] = (0,
n.useState)(null)
, [c,d] = (0,
n.useState)(!0)
, [u,m] = (0,
n.useState)(new Set)
, [h,p] = (0,
n.useState)("lamda")
, g = (0,
n.useRef)(null)
, [v,f] = (0,
n.useState)(null)
, [x,_] = (0,
n.useState)([])
, [w,b] = (0,
n.useState)(!1)
, [j,S] = (0,
n.useState)(!1)
, y = async (e, t) => {
let r = Object.keys(eH);
if (t.size >= r.length) {
l("Movie not found on available servers."),
d(!1);
return
}
let n = a ? r.filter(r => a.has(r) && !t.has(r) && r !== e) : [];
if (n.length > 0) {
let e = n[0];
await k(e, {
allowFallback: !0,
tried: new Set(t)
});
return
}
let s = null;
for (let a of r)
if (!t.has(a) && a !== e) {
s = a;
break
}
s ? await k(s, {
allowFallback: !0,
tried: new Set(t)
}) : (l("Movie not found on available servers."),
d(!1))
}
, M = async function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
, a = arguments.length > 2 ? arguments[2] : void 0;
if (!a)
return fetch(e, t);
let r = new AbortController
, n = setTimeout( () => r.abort(), a);
try {
return await fetch(e, {
...t,
signal: r.signal
})
} finally {
clearTimeout(n)
}
}
, k = async function(t) {
let a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
allowFallback: !0
};
try {
let r, n = a.tried ? new Set(a.tried) : new Set;
n.add(t),
a.suppressGlobalLoading || d(!0),
l(null);
let i = eH[t]
, c = async e => (m(e => {
let a = new Set(e);
return a.add(t),
a
}
),
a.allowFallback ? await y(t, n) : s || l(e || "Selected server is unavailable for this movie."),
!1)
, u = "T8c8PQlSQVU4mBuW4CbE/g57VBbM5009QHd+ym93aZZ5pEeVpToY6OdpYPvRMVYp";
if ("gama" === i.type) {
let t = await M("".concat(i.movieUrl, "/").concat(e, "?server=megacloud"), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
if (!(r = await eY(t, u)).url)
return await c("No video URL found.");
let n = (r.subtitles || []).map(e => ({
url: e.url,
lang: e.lang || "Unknown",
label: e.label || "Unknown",
default: e.default || !1
}))
, s = encodeURIComponent(JSON.stringify({
Referer: "https://videostr.net"
}));
o({
sources: [{
url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(r.url), "&headers=").concat(s),
quality: "auto"
}],
subtitles: n,
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} else if ("hexa" === i.type) {
let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
if (!(r = await eY(t, u)) || !r.url)
return await c("No stream URL found.");
r && "object" == typeof r.headers && r.headers,
o({
sources: [{
url: r.url,
quality: "auto"
}],
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} else if ("delta" === i.type) {
let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
r = await eY(t, u);
let n = Array.isArray(r.streams) ? r.streams : [];
if (!n.length)
return await c("No streams found.");
let s = n.find(e => "hindi" === ((null == e ? void 0 : e.language) || "").toLowerCase());
if (!s || !s.url)
return await c("Hindi stream not available.");
let l = [{
url: s.url,
quality: "Hindi"
}];
o({
sources: l,
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} else if ("sigma" === i.type) {
let t = await M("".concat(i.movieUrl, "/movie/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
if (!(r = await eY(t, u)).success || !Array.isArray(r.sources) || 0 === r.sources.length)
return await c("No valid video sources found.");
let n = r.sources.filter(e => "hls" === e.type && e.file);
if (!(null == n ? void 0 : n.length))
throw Error("No HLS sources found");
let s = n[0]
, l = encodeURIComponent(JSON.stringify({
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0",
accept: "*/*",
"accept-language": "en-US,en;q=0.5",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "cross-site",
origin: "https://flashstream.cc",
referer: "https://flashstream.cc/"
}))
, d = [{
url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(s.file), "&headers=").concat(l),
quality: s.label || "auto"
}];
o({
sources: d,
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} else if ("alfa" === i.type)
try {
let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
let r = await eY(t, u);
if (!r)
return await c("Invalid Alfa response.");
if (!r.sources || !Array.isArray(r.sources) || 0 === r.sources.length)
return await c("Alfa: No sources available.");
let n = r.sources[0];
if (!n.url)
return await c("Alfa: Source url missing.");
let s = n.url;
o({
sources: [{
url: s,
quality: n.quality || "auto"
}],
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} catch (e) {
return console.error("Alfa fetch error:", e),
await c("Error fetching Alfa data.")
}
else if ("catflix" === i.type)
try {
let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
let r = await eY(t, u);
if (!r)
return await c("No streams found.");
let n = (Array.isArray(r) ? r : [r]).filter(e => e && "string" == typeof e.url && e.url.length).map(e => ({
url: e.url,
quality: e.quality || "auto",
type: e.type || "hls",
headers: e.headers && "object" == typeof e.headers ? e.headers : {}
}));
if (!n.length)
return await c("No valid streams found.");
o({
sources: n,
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} catch (e) {
return console.error("Catflix fetch error:", e),
await c("Error fetching video data.")
}
else if ("beta" === i.type) {
let t = await M("".concat(i.movieUrl, "/").concat(e, "?server=upcloud"), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
if (!(r = await eY(t, u)).url)
return await c("No video URL found.");
let n = (r.subtitles || []).map(e => ({
url: e.url,
lang: e.lang || "Unknown",
label: e.label || "Unknown",
default: e.default || !1
}))
, s = encodeURIComponent(JSON.stringify({
Referer: "https://videostr.net/"
}));
o({
sources: [{
url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(r.url), "&headers=").concat(s),
quality: "auto"
}],
subtitles: n,
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
} else if ("lamda" === i.type) {
let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs);
if (!t.ok)
throw Error("Failed to fetch video data.");
r = await eY(t, u);
let n = Array.isArray(r.streams) ? r.streams : [];
if (!n.length)
return await c("No streams found.");
let s = n.find(e => "english" === ((null == e ? void 0 : e.language) || "").toLowerCase());
if (!s || !s.url)
return await c("English stream not available.");
o({
sources: [{
url: s.url,
quality: "English"
}],
subtitles: [],
poster: null,
title: "Movie TMDB ID: ".concat(e)
})
}
if (m(e => {
let a = new Set(e);
return a.delete(t),
a
}
),
p(t),
ez)
try {
let t = await fetch("".concat(eW, "/movie/").concat(e, "?api_key=").concat(ez));
if (t.ok) {
let a = await t.json()
, r = a.title || "Movie TMDB ID: ".concat(e)
, n = null;
a.backdrop_path ? n = "".concat(eZ).concat(a.backdrop_path) : a.poster_path && (n = "".concat(eZ).concat(a.poster_path)),
o(e => e ? {
...e,
poster: n,
title: r
} : null)
}
} catch (e) {
console.warn("Failed to fetch TMDB data:", e)
}
return !0
} catch (e) {
if (e && "AbortError" === e.name ? console.warn("Server ".concat(eH[t].name, " timed out.")) : console.warn("Server ".concat(eH[t].name, " failed:"), (null == e ? void 0 : e.message) || e),
m(e => {
let a = new Set(e);
return a.add(t),
a
}
),
a.allowFallback) {
let e = a.tried ? new Set(a.tried) : new Set;
e.add(t),
await y(t, e)
} else
s || l("Selected server is unavailable for this movie.");
return !1
} finally {
a.suppressGlobalLoading || d(!1)
}
}
, N = async function() {
let t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];
if (e && !j && (!w || t))
try {
S(!0);
let t = await (0,
eV.n)(e);
_(t),
o(e => e ? {
...e,
subtitles: t
} : e),
b(!0)
} catch (e) {} finally {
S(!1)
}
};
Prerequisites
Provider Name
vidnest
Provider URL
https://vidnest.fun/
Provider Description
https://vidnest.fun/
Implementation Details
GET: https://second.vidnest.fun/allmovies/movie/666243
returns: encrypted data
not sure but
"T8c8PQlSQVU4mBuW4CbE/g57VBbM5009QHd+ym93aZZ5pEeVpToY6OdpYPvRMVYp"might be the keyruns through decrypt part below:
and gives:
markdown "{"streams":[{"headers":{"Referer":"https://ensta392zij.com"},"language":"Hindi","type":"hls","url":"https://i-arch-400.ensta392zij.com/stream2/i-/index.m3u8"}],"totalLanguages":1} "gives probably hindi only, there are more endpoints. see js below
Additional Context
/////////// DECRYPT PART: async function eX(e, t) { let a = eQ(e); if (a.length < 28) throw Error("Encrypted data too short"); let r = a.slice(0, 12) , n = a.slice(12) , s = await eJ(t) , o = await crypto.subtle.decrypt({ name: "AES-GCM", iv: r }, s, n); return new TextDecoder().decode(new Uint8Array(o)) } function eQ(e) { let t = atob(e) , a = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) a[e] = t.charCodeAt(e); return a } async function eJ(e) { let t = eQ(e); if (t.length > 32 && (t = t.slice(0, 32)), 32 !== t.length) throw Error("Key must be 32 bytes after processing"); return crypto.subtle.importKey("raw", t, { name: "AES-GCM" }, !1, ["decrypt"]) } // ADDITIONAL JS/ENDPOINTS: var eV = a(9598); let eO = "https://second.vidnest.fun" , eH = { lamda: { name: "Lamda", movieUrl: "".concat(eO, "/allmovies/movie"), type: "lamda" }, alfa: { name: "Alfa", movieUrl: "".concat(eO, "/primesrc/movie"), type: "alfa" }, beta: { name: "Beta", movieUrl: "".concat(eO, "/flixhq/movie"), type: "beta" }, sigma: { name: "Sigma", movieUrl: "".concat(eO, "/hollymoviehd"), type: "sigma" }, gama: { name: "Gama", movieUrl: "".concat(eO, "/flixhq/movie"), type: "gama" }, catflix: { name: "Catflix", movieUrl: "".concat(eO, "/catflix/movie"), type: "catflix" }, hexa: { name: "Hexa", movieUrl: "".concat(eO, "/superstream/movie"), type: "hexa" }, delta: { name: "Delta", movieUrl: "".concat(eO, "/allmovies/movie"), type: "delta" } } , eq = "https://proxy2.aether.mom" , ez = "61e2290429798c561450eb56b26de19b" , eW = "https://api.themoviedb.org/3" , eZ = "https://image.tmdb.org/t/p/w1280"; function eQ(e) { let t = atob(e) , a = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) a[e] = t.charCodeAt(e); return a } async function eJ(e) { let t = eQ(e); if (t.length > 32 && (t = t.slice(0, 32)), 32 !== t.length) throw Error("Key must be 32 bytes after processing"); return crypto.subtle.importKey("raw", t, { name: "AES-GCM" }, !1, ["decrypt"]) } async function eX(e, t) { let a = eQ(e); if (a.length < 28) throw Error("Encrypted data too short"); let r = a.slice(0, 12) , n = a.slice(12) , s = await eJ(t) , o = await crypto.subtle.decrypt({ name: "AES-GCM", iv: r }, s, n); return new TextDecoder().decode(new Uint8Array(o)) } async function eY(e, t) { let a = await e.json(); if (!a.encrypted) return console.log("Response is not encrypted, returning as-is"), a; if (!a.data || "string" != typeof a.data) throw Error("Response missing encrypted data field"); console.log("Response is encrypted, decrypting..."); let r = await eX(a.data, t); try { return JSON.parse(r) } catch (e) { return r } } var e$ = a(5065); function e0() { var e; let t = (0, s.useParams)().tmdbId , a = (0, s.useSearchParams)() , i = (null == (e = a.get("server")) ? void 0 : e.toLowerCase()) || void 0 , l = i && ["lamda", "alfa", "beta", "sigma", "gama", "catflix", "hexa", "delta"].includes(i) ? i : null , c = a.get("startAt") , d = a.get("progress") , u = e => { var t, r; return null != (r = null == (t = a.get(e)) ? void 0 : t.toLowerCase()) ? r : null } , m = e => "hide" === e || "false" === e || "0" === e || "off" === e || "" === e , h = { serverIcon: m(u("servericon")), topCaption: m(u("topcaption")), topSettings: m(u("topsettings")), centerSeekBackward: m(u("centerseekbackward")), centerPlay: m(u("centerplay")), centerSeekForward: m(u("centerseekforward")), timeSlider: m(u("timeslider")), mute: m(u("mute")), volume: m(u("volume")), timeGroup: m(u("timegroup")), bottomCaption: m(u("bottomcaption")), bottomSettings: m(u("bottomsettings")), pip: m(u("pip")), cast: m(u("cast")), fullscreen: m(u("fullscreen")) } , p = ( () => { let e = null != c ? c : d; if (!e) return; let t = Number(e); return Number.isFinite(t) && t >= 0 ? t : void 0 } )() , [g,v] = (0, n.useState)(null != l ? l : "lamda") , [f,x] = (0, n.useState)(null) , [_,w] = (0, n.useState)( () => localStorage.getItem("starredServer") || null) , {videoData: b, loading: j, error: S, failedServers: y, setFailedServers: M, fetchMovieData: k, trySwitchServer: N, SERVERS: C, HLS_PROXY_BASE_URL: L, lastSuccessfulServer: I, loadingBackdrop: E, subtitleOptions: T, subtitlesLoaded: A, subtitlesLoading: R, loadSubtitles: B} = function(e) { let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "lamda" , a = arguments.length > 2 ? arguments[2] : void 0 , r = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] , [s,o] = (0, n.useState)(null) , [i,l] = (0, n.useState)(null) , [c,d] = (0, n.useState)(!0) , [u,m] = (0, n.useState)(new Set) , [h,p] = (0, n.useState)("lamda") , g = (0, n.useRef)(null) , [v,f] = (0, n.useState)(null) , [x,_] = (0, n.useState)([]) , [w,b] = (0, n.useState)(!1) , [j,S] = (0, n.useState)(!1) , y = async (e, t) => { let r = Object.keys(eH); if (t.size >= r.length) { l("Movie not found on available servers."), d(!1); return } let n = a ? r.filter(r => a.has(r) && !t.has(r) && r !== e) : []; if (n.length > 0) { let e = n[0]; await k(e, { allowFallback: !0, tried: new Set(t) }); return } let s = null; for (let a of r) if (!t.has(a) && a !== e) { s = a; break } s ? await k(s, { allowFallback: !0, tried: new Set(t) }) : (l("Movie not found on available servers."), d(!1)) } , M = async function(e) { let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} , a = arguments.length > 2 ? arguments[2] : void 0; if (!a) return fetch(e, t); let r = new AbortController , n = setTimeout( () => r.abort(), a); try { return await fetch(e, { ...t, signal: r.signal }) } finally { clearTimeout(n) } } , k = async function(t) { let a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { allowFallback: !0 }; try { let r, n = a.tried ? new Set(a.tried) : new Set; n.add(t), a.suppressGlobalLoading || d(!0), l(null); let i = eH[t] , c = async e => (m(e => { let a = new Set(e); return a.add(t), a } ), a.allowFallback ? await y(t, n) : s || l(e || "Selected server is unavailable for this movie."), !1) , u = "T8c8PQlSQVU4mBuW4CbE/g57VBbM5009QHd+ym93aZZ5pEeVpToY6OdpYPvRMVYp"; if ("gama" === i.type) { let t = await M("".concat(i.movieUrl, "/").concat(e, "?server=megacloud"), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); if (!(r = await eY(t, u)).url) return await c("No video URL found."); let n = (r.subtitles || []).map(e => ({ url: e.url, lang: e.lang || "Unknown", label: e.label || "Unknown", default: e.default || !1 })) , s = encodeURIComponent(JSON.stringify({ Referer: "https://videostr.net" })); o({ sources: [{ url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(r.url), "&headers=").concat(s), quality: "auto" }], subtitles: n, poster: null, title: "Movie TMDB ID: ".concat(e) }) } else if ("hexa" === i.type) { let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); if (!(r = await eY(t, u)) || !r.url) return await c("No stream URL found."); r && "object" == typeof r.headers && r.headers, o({ sources: [{ url: r.url, quality: "auto" }], subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } else if ("delta" === i.type) { let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); r = await eY(t, u); let n = Array.isArray(r.streams) ? r.streams : []; if (!n.length) return await c("No streams found."); let s = n.find(e => "hindi" === ((null == e ? void 0 : e.language) || "").toLowerCase()); if (!s || !s.url) return await c("Hindi stream not available."); let l = [{ url: s.url, quality: "Hindi" }]; o({ sources: l, subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } else if ("sigma" === i.type) { let t = await M("".concat(i.movieUrl, "/movie/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); if (!(r = await eY(t, u)).success || !Array.isArray(r.sources) || 0 === r.sources.length) return await c("No valid video sources found."); let n = r.sources.filter(e => "hls" === e.type && e.file); if (!(null == n ? void 0 : n.length)) throw Error("No HLS sources found"); let s = n[0] , l = encodeURIComponent(JSON.stringify({ "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0", accept: "*/*", "accept-language": "en-US,en;q=0.5", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "cross-site", origin: "https://flashstream.cc", referer: "https://flashstream.cc/" })) , d = [{ url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(s.file), "&headers=").concat(l), quality: s.label || "auto" }]; o({ sources: d, subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } else if ("alfa" === i.type) try { let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); let r = await eY(t, u); if (!r) return await c("Invalid Alfa response."); if (!r.sources || !Array.isArray(r.sources) || 0 === r.sources.length) return await c("Alfa: No sources available."); let n = r.sources[0]; if (!n.url) return await c("Alfa: Source url missing."); let s = n.url; o({ sources: [{ url: s, quality: n.quality || "auto" }], subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } catch (e) { return console.error("Alfa fetch error:", e), await c("Error fetching Alfa data.") } else if ("catflix" === i.type) try { let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); let r = await eY(t, u); if (!r) return await c("No streams found."); let n = (Array.isArray(r) ? r : [r]).filter(e => e && "string" == typeof e.url && e.url.length).map(e => ({ url: e.url, quality: e.quality || "auto", type: e.type || "hls", headers: e.headers && "object" == typeof e.headers ? e.headers : {} })); if (!n.length) return await c("No valid streams found."); o({ sources: n, subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } catch (e) { return console.error("Catflix fetch error:", e), await c("Error fetching video data.") } else if ("beta" === i.type) { let t = await M("".concat(i.movieUrl, "/").concat(e, "?server=upcloud"), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); if (!(r = await eY(t, u)).url) return await c("No video URL found."); let n = (r.subtitles || []).map(e => ({ url: e.url, lang: e.lang || "Unknown", label: e.label || "Unknown", default: e.default || !1 })) , s = encodeURIComponent(JSON.stringify({ Referer: "https://videostr.net/" })); o({ sources: [{ url: "".concat(eq, "/proxy?url=").concat(encodeURIComponent(r.url), "&headers=").concat(s), quality: "auto" }], subtitles: n, poster: null, title: "Movie TMDB ID: ".concat(e) }) } else if ("lamda" === i.type) { let t = await M("".concat(i.movieUrl, "/").concat(e), {}, a.timeoutMs); if (!t.ok) throw Error("Failed to fetch video data."); r = await eY(t, u); let n = Array.isArray(r.streams) ? r.streams : []; if (!n.length) return await c("No streams found."); let s = n.find(e => "english" === ((null == e ? void 0 : e.language) || "").toLowerCase()); if (!s || !s.url) return await c("English stream not available."); o({ sources: [{ url: s.url, quality: "English" }], subtitles: [], poster: null, title: "Movie TMDB ID: ".concat(e) }) } if (m(e => { let a = new Set(e); return a.delete(t), a } ), p(t), ez) try { let t = await fetch("".concat(eW, "/movie/").concat(e, "?api_key=").concat(ez)); if (t.ok) { let a = await t.json() , r = a.title || "Movie TMDB ID: ".concat(e) , n = null; a.backdrop_path ? n = "".concat(eZ).concat(a.backdrop_path) : a.poster_path && (n = "".concat(eZ).concat(a.poster_path)), o(e => e ? { ...e, poster: n, title: r } : null) } } catch (e) { console.warn("Failed to fetch TMDB data:", e) } return !0 } catch (e) { if (e && "AbortError" === e.name ? console.warn("Server ".concat(eH[t].name, " timed out.")) : console.warn("Server ".concat(eH[t].name, " failed:"), (null == e ? void 0 : e.message) || e), m(e => { let a = new Set(e); return a.add(t), a } ), a.allowFallback) { let e = a.tried ? new Set(a.tried) : new Set; e.add(t), await y(t, e) } else s || l("Selected server is unavailable for this movie."); return !1 } finally { a.suppressGlobalLoading || d(!1) } } , N = async function() { let t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; if (e && !j && (!w || t)) try { S(!0); let t = await (0, eV.n)(e); _(t), o(e => e ? { ...e, subtitles: t } : e), b(!0) } catch (e) {} finally { S(!1) } };