@banou/ripple 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/worker-b6xs3k5Q.js +27 -0
- package/fkn.json +1 -1
- package/index.js +778 -767
- package/package.json +1 -1
- package/sw.js +61 -14
- package/assets/worker-BBuQVIu1.js +0 -27
package/index.js
CHANGED
|
@@ -36882,11 +36882,11 @@ var mU = ({ wanted: e, running: t, busy: n, flush: r, restart: i }, a = 1e3) =>
|
|
|
36882
36882
|
}, kU = 24e4, AU = 12e4, jU = 2e3, MU = 1500, NU = 3e4, PU = null, FU = (e) => {
|
|
36883
36883
|
let t = PU = _U(), n = t ? new Worker(new URL(
|
|
36884
36884
|
/* @vite-ignore */
|
|
36885
|
-
"/assets/worker-
|
|
36885
|
+
"/assets/worker-b6xs3k5Q.js",
|
|
36886
36886
|
"" + import.meta.url
|
|
36887
36887
|
), { type: "module" }) : new Worker(new URL(
|
|
36888
36888
|
/* @vite-ignore */
|
|
36889
|
-
"/assets/worker-
|
|
36889
|
+
"/assets/worker-b6xs3k5Q.js",
|
|
36890
36890
|
"" + import.meta.url
|
|
36891
36891
|
), {
|
|
36892
36892
|
type: "module",
|
|
@@ -40383,16 +40383,19 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40383
40383
|
}, ZX = (e) => {
|
|
40384
40384
|
let t = Error(e);
|
|
40385
40385
|
return t.name = "AbortError", t;
|
|
40386
|
-
}, QX = (
|
|
40386
|
+
}, QX = () => Error(Q.formatMessage({
|
|
40387
|
+
id: "The download was interrupted",
|
|
40388
|
+
defaultMessage: "The download was interrupted"
|
|
40389
|
+
})), $X = (e, t) => new Promise((n) => {
|
|
40387
40390
|
let r = setTimeout(() => n(null), t);
|
|
40388
40391
|
e.then((e) => {
|
|
40389
40392
|
clearTimeout(r), n(e);
|
|
40390
40393
|
}, () => {
|
|
40391
40394
|
clearTimeout(r), n(null);
|
|
40392
40395
|
});
|
|
40393
|
-
}),
|
|
40396
|
+
}), eZ = (e) => e.byteOffset === 0 && e.byteLength === e.buffer.byteLength, tZ = async (e, t = 0) => {
|
|
40394
40397
|
if (typeof navigator > "u" || !navigator.serviceWorker) return null;
|
|
40395
|
-
let n = (await
|
|
40398
|
+
let n = (await $X(navigator.serviceWorker.ready, WX))?.active;
|
|
40396
40399
|
if (!n || !navigator.serviceWorker.controller) return null;
|
|
40397
40400
|
let r = crypto.randomUUID(), i = new MessageChannel(), a = i.port1, o = 0, s = null, c = null, l = () => new Promise((e) => {
|
|
40398
40401
|
c = e;
|
|
@@ -40416,7 +40419,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40416
40419
|
o++, t && (t = !1, e()), u();
|
|
40417
40420
|
return;
|
|
40418
40421
|
}
|
|
40419
|
-
r.type === "cancel" && d(ZX("The download was cancelled"));
|
|
40422
|
+
r.type === "cancel" && d(ZX("The download was cancelled")), r.type === "error" && (d(QX()), e());
|
|
40420
40423
|
}
|
|
40421
40424
|
};
|
|
40422
40425
|
});
|
|
@@ -40425,12 +40428,9 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40425
40428
|
id: r,
|
|
40426
40429
|
name: e,
|
|
40427
40430
|
size: t
|
|
40428
|
-
}, [i.port2]), !await
|
|
40431
|
+
}, [i.port2]), !await $X(p, WX)) return a.onmessage = null, a.close(), null;
|
|
40429
40432
|
let h = XX(UX + r + "/" + encodeURIComponent(e)), g = 0, _ = !1, v = setInterval(() => {
|
|
40430
|
-
_ || (++g > qX ? d(
|
|
40431
|
-
id: "The download was interrupted",
|
|
40432
|
-
defaultMessage: "The download was interrupted"
|
|
40433
|
-
}))) : n.postMessage({
|
|
40433
|
+
_ || (++g > qX ? d(QX()) : n.postMessage({
|
|
40434
40434
|
type: "ping",
|
|
40435
40435
|
id: r
|
|
40436
40436
|
}));
|
|
@@ -40439,15 +40439,27 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40439
40439
|
};
|
|
40440
40440
|
navigator.serviceWorker.addEventListener("message", y);
|
|
40441
40441
|
let b = () => {
|
|
40442
|
-
clearInterval(v), navigator.serviceWorker.removeEventListener("message", y), a.onmessage = null, a.close(), h.remove();
|
|
40443
|
-
}, x =
|
|
40442
|
+
clearInterval(v), navigator.serviceWorker.removeEventListener("message", y), window.removeEventListener("pagehide", S), a.onmessage = null, a.close(), h.remove();
|
|
40443
|
+
}, x = () => {
|
|
40444
|
+
try {
|
|
40445
|
+
a.postMessage({
|
|
40446
|
+
type: "abort",
|
|
40447
|
+
reason: "cancelled"
|
|
40448
|
+
});
|
|
40449
|
+
} catch {}
|
|
40450
|
+
b();
|
|
40451
|
+
}, S = (e) => {
|
|
40452
|
+
e.persisted || x();
|
|
40453
|
+
};
|
|
40454
|
+
window.addEventListener("pagehide", S);
|
|
40455
|
+
let C = await Promise.race([m.then(() => !0), new Promise((e) => setTimeout(() => e(!1), GX))]);
|
|
40444
40456
|
if (s) throw b(), s;
|
|
40445
|
-
return
|
|
40457
|
+
return C ? {
|
|
40446
40458
|
write: async (e) => {
|
|
40447
40459
|
for (; o <= 0 && !s;) await l();
|
|
40448
40460
|
if (s) throw s;
|
|
40449
40461
|
o--;
|
|
40450
|
-
let t =
|
|
40462
|
+
let t = eZ(e) ? e : e.slice();
|
|
40451
40463
|
a.postMessage({
|
|
40452
40464
|
type: "chunk",
|
|
40453
40465
|
data: t
|
|
@@ -40457,25 +40469,17 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40457
40469
|
if (s) throw b(), s;
|
|
40458
40470
|
_ = !0, a.postMessage({ type: "end" }), TU(() => YX(b));
|
|
40459
40471
|
},
|
|
40460
|
-
abort: async () =>
|
|
40461
|
-
try {
|
|
40462
|
-
a.postMessage({
|
|
40463
|
-
type: "abort",
|
|
40464
|
-
reason: "cancelled"
|
|
40465
|
-
});
|
|
40466
|
-
} catch {}
|
|
40467
|
-
b();
|
|
40468
|
-
}
|
|
40472
|
+
abort: async () => x()
|
|
40469
40473
|
} : (b(), null);
|
|
40470
|
-
},
|
|
40474
|
+
}, nZ = 8388608, rZ = 4294967295, iZ = (/* @__PURE__ */ new Uint32Array(256)).map((e, t) => {
|
|
40471
40475
|
let n = t;
|
|
40472
40476
|
for (let e = 0; e < 8; e++) n = n & 1 ? 3988292384 ^ n >>> 1 : n >>> 1;
|
|
40473
40477
|
return n;
|
|
40474
|
-
}),
|
|
40478
|
+
}), aZ = (e, t) => {
|
|
40475
40479
|
let n = e;
|
|
40476
|
-
for (let e = 0; e < t.length; e++) n =
|
|
40480
|
+
for (let e = 0; e < t.length; e++) n = iZ[(n ^ t[e]) & 255] ^ n >>> 8;
|
|
40477
40481
|
return n;
|
|
40478
|
-
},
|
|
40482
|
+
}, oZ = (e) => {
|
|
40479
40483
|
let t = new Uint8Array(e), n = new DataView(t.buffer), r = 0;
|
|
40480
40484
|
return {
|
|
40481
40485
|
buf: t,
|
|
@@ -40492,47 +40496,47 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40492
40496
|
t.set(e, r), r += e.length;
|
|
40493
40497
|
}
|
|
40494
40498
|
};
|
|
40495
|
-
},
|
|
40499
|
+
}, sZ = async (e, t, n) => {
|
|
40496
40500
|
let r = e.reduce((e, t) => e + t.size, 0) || 1, i = 0, a = 0, o = async (e) => {
|
|
40497
40501
|
let n = e.length;
|
|
40498
40502
|
await t(e), a += n;
|
|
40499
40503
|
}, s = /* @__PURE__ */ new Date(), c = s.getHours() << 11 | s.getMinutes() << 5 | s.getSeconds() >> 1, l = (s.getFullYear() - 1980 & 127) << 9 | s.getMonth() + 1 << 5 | s.getDate(), u = [];
|
|
40500
40504
|
for (let t of e) {
|
|
40501
|
-
let e = new TextEncoder().encode(t.path.split("/").filter(Boolean).join("/")), s = t.size >=
|
|
40502
|
-
p.u32(67324752), p.u16(s ? 45 : 20), p.u16(2056), p.u16(0), p.u16(c), p.u16(l), p.u32(0), p.u32(s ?
|
|
40505
|
+
let e = new TextEncoder().encode(t.path.split("/").filter(Boolean).join("/")), s = t.size >= rZ, d = a, f = s ? 20 : 0, p = oZ(30 + e.length + f);
|
|
40506
|
+
p.u32(67324752), p.u16(s ? 45 : 20), p.u16(2056), p.u16(0), p.u16(c), p.u16(l), p.u32(0), p.u32(s ? rZ : 0), p.u32(s ? rZ : 0), p.u16(e.length), p.u16(f), p.bytes(e), s && (p.u16(1), p.u16(16), p.u64(t.size), p.u64(t.size)), await o(p.buf);
|
|
40503
40507
|
let m = 4294967295;
|
|
40504
|
-
for (let e = 0; e < t.size; e +=
|
|
40505
|
-
let a = Math.min(
|
|
40508
|
+
for (let e = 0; e < t.size; e += nZ) {
|
|
40509
|
+
let a = Math.min(nZ, t.size - e), s = await t.read(e, a);
|
|
40506
40510
|
if (s.length !== a) throw Error(`short read: ${s.length}/${a} at ${e} of ${t.path}`);
|
|
40507
|
-
m =
|
|
40511
|
+
m = aZ(m, s), await o(s), i += a, n?.(i / r);
|
|
40508
40512
|
}
|
|
40509
40513
|
m = (m ^ 4294967295) >>> 0;
|
|
40510
|
-
let h =
|
|
40514
|
+
let h = oZ(s ? 24 : 16);
|
|
40511
40515
|
h.u32(134695760), h.u32(m), s ? (h.u64(t.size), h.u64(t.size)) : (h.u32(t.size), h.u32(t.size)), await o(h.buf);
|
|
40512
|
-
let g = d >=
|
|
40513
|
-
v.u32(33639248), v.u16(45), v.u16(s || g ? 45 : 20), v.u16(2056), v.u16(0), v.u16(c), v.u16(l), v.u32(m), v.u32(s ?
|
|
40516
|
+
let g = d >= rZ, _ = (s ? 16 : 0) + (g ? 8 : 0), v = oZ(46 + e.length + (_ ? 4 + _ : 0));
|
|
40517
|
+
v.u32(33639248), v.u16(45), v.u16(s || g ? 45 : 20), v.u16(2056), v.u16(0), v.u16(c), v.u16(l), v.u32(m), v.u32(s ? rZ : t.size), v.u32(s ? rZ : t.size), v.u16(e.length), v.u16(_ ? 4 + _ : 0), v.u16(0), v.u16(0), v.u16(0), v.u32(0), v.u32(g ? rZ : d), v.bytes(e), _ && (v.u16(1), v.u16(_), s && (v.u64(t.size), v.u64(t.size)), g && v.u64(d)), u.push(v.buf);
|
|
40514
40518
|
}
|
|
40515
40519
|
let d = a;
|
|
40516
40520
|
for (let e of u) await o(e);
|
|
40517
40521
|
let f = a - d;
|
|
40518
|
-
if (e.length >= 65535 || f >=
|
|
40519
|
-
let t = a, n =
|
|
40522
|
+
if (e.length >= 65535 || f >= rZ || d >= rZ) {
|
|
40523
|
+
let t = a, n = oZ(56);
|
|
40520
40524
|
n.u32(101075792), n.u64(44), n.u16(45), n.u16(45), n.u32(0), n.u32(0), n.u64(e.length), n.u64(e.length), n.u64(f), n.u64(d), await o(n.buf);
|
|
40521
|
-
let r =
|
|
40525
|
+
let r = oZ(20);
|
|
40522
40526
|
r.u32(117853008), r.u32(0), r.u64(t), r.u32(1), await o(r.buf);
|
|
40523
40527
|
}
|
|
40524
|
-
let p =
|
|
40525
|
-
p.u32(101010256), p.u16(0), p.u16(0), p.u16(Math.min(e.length, 65535)), p.u16(Math.min(e.length, 65535)), p.u32(Math.min(f,
|
|
40526
|
-
},
|
|
40528
|
+
let p = oZ(22);
|
|
40529
|
+
p.u32(101010256), p.u16(0), p.u16(0), p.u16(Math.min(e.length, 65535)), p.u16(Math.min(e.length, 65535)), p.u32(Math.min(f, rZ)), p.u32(Math.min(d, rZ)), p.u16(0), await o(p.buf);
|
|
40530
|
+
}, cZ = 8388608, lZ = 4, uZ = 1e3, dZ = 1073741824, fZ = (e) => e?.name === "AbortError", pZ = class extends Error {
|
|
40527
40531
|
constructor(e) {
|
|
40528
40532
|
super(e), this.name = "DownloadUnavailableError";
|
|
40529
40533
|
}
|
|
40530
|
-
},
|
|
40534
|
+
}, mZ = (e, t) => {
|
|
40531
40535
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
40532
40536
|
r.href = n, r.download = t, document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 6e4);
|
|
40533
|
-
},
|
|
40537
|
+
}, hZ = async (e, { contentLength: t = 0, totalBytes: n = 0 } = {}) => {
|
|
40534
40538
|
if (typeof navigator < "u" && navigator.serviceWorker?.controller) {
|
|
40535
|
-
let n = await
|
|
40539
|
+
let n = await tZ(e, t);
|
|
40536
40540
|
if (n) return n;
|
|
40537
40541
|
}
|
|
40538
40542
|
try {
|
|
@@ -40543,9 +40547,9 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40543
40547
|
abort: () => t.abort?.().catch(() => {})
|
|
40544
40548
|
};
|
|
40545
40549
|
} catch (e) {
|
|
40546
|
-
if (
|
|
40550
|
+
if (fZ(e)) throw e;
|
|
40547
40551
|
}
|
|
40548
|
-
if (n >
|
|
40552
|
+
if (n > dZ) throw new pZ(Q.formatMessage({
|
|
40549
40553
|
id: "This file is too large to save here.",
|
|
40550
40554
|
defaultMessage: "This file is too large to save here."
|
|
40551
40555
|
}));
|
|
@@ -40554,42 +40558,42 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40554
40558
|
write: async (e) => {
|
|
40555
40559
|
r.push(e.slice());
|
|
40556
40560
|
},
|
|
40557
|
-
close: async () =>
|
|
40561
|
+
close: async () => mZ(new Blob(r), e),
|
|
40558
40562
|
abort: async () => {}
|
|
40559
40563
|
};
|
|
40560
|
-
},
|
|
40564
|
+
}, gZ = (e) => e?.reason ?? new DOMException("Aborted", "AbortError"), _Z = (e, t) => new Promise((n, r) => {
|
|
40561
40565
|
if (e.aborted) {
|
|
40562
|
-
r(
|
|
40566
|
+
r(gZ(e));
|
|
40563
40567
|
return;
|
|
40564
40568
|
}
|
|
40565
|
-
e.addEventListener("abort", () => r(
|
|
40569
|
+
e.addEventListener("abort", () => r(gZ(e)), {
|
|
40566
40570
|
once: !0,
|
|
40567
40571
|
signal: t
|
|
40568
40572
|
});
|
|
40569
|
-
}),
|
|
40573
|
+
}), vZ = (e, t) => new Promise((n, r) => {
|
|
40570
40574
|
let i = setTimeout(() => {
|
|
40571
40575
|
t?.removeEventListener("abort", a), n();
|
|
40572
40576
|
}, e), a = () => {
|
|
40573
|
-
clearTimeout(i), r(
|
|
40577
|
+
clearTimeout(i), r(gZ(t));
|
|
40574
40578
|
};
|
|
40575
40579
|
if (t?.aborted) {
|
|
40576
|
-
clearTimeout(i), r(
|
|
40580
|
+
clearTimeout(i), r(gZ(t));
|
|
40577
40581
|
return;
|
|
40578
40582
|
}
|
|
40579
40583
|
t?.addEventListener("abort", a, { once: !0 });
|
|
40580
|
-
}),
|
|
40584
|
+
}), yZ = async (e, t, n, r, i, { viewer: a, signal: o }) => {
|
|
40581
40585
|
let s;
|
|
40582
|
-
for (let c = 0; c <
|
|
40583
|
-
if (o?.aborted) throw
|
|
40584
|
-
c > 0 && await
|
|
40586
|
+
for (let c = 0; c < lZ; c++) {
|
|
40587
|
+
if (o?.aborted) throw gZ(o);
|
|
40588
|
+
c > 0 && await vZ(uZ * c, o);
|
|
40585
40589
|
try {
|
|
40586
40590
|
let s = e.read(t, n, r, i, !0, a, o);
|
|
40587
40591
|
s.catch(() => {});
|
|
40588
|
-
let c = new AbortController(), l = o ? await Promise.race([s,
|
|
40592
|
+
let c = new AbortController(), l = o ? await Promise.race([s, _Z(o, c.signal)]).finally(() => c.abort()) : await s;
|
|
40589
40593
|
if (l.length !== i) throw Error(`short read: ${l.length}/${i} at ${r}`);
|
|
40590
40594
|
return l;
|
|
40591
40595
|
} catch (e) {
|
|
40592
|
-
if (
|
|
40596
|
+
if (fZ(e)) throw e;
|
|
40593
40597
|
s = e;
|
|
40594
40598
|
}
|
|
40595
40599
|
}
|
|
@@ -40602,36 +40606,36 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40602
40606
|
fileIndex: n,
|
|
40603
40607
|
reason: s.message
|
|
40604
40608
|
})) : s;
|
|
40605
|
-
},
|
|
40606
|
-
let s = await
|
|
40609
|
+
}, bZ = async (e, t, n, r, i, a, o = {}) => TU(async () => {
|
|
40610
|
+
let s = await hZ(r.split("/").pop() || "download", {
|
|
40607
40611
|
contentLength: i,
|
|
40608
40612
|
totalBytes: i
|
|
40609
40613
|
});
|
|
40610
40614
|
try {
|
|
40611
|
-
for (let r = 0; r < i; r +=
|
|
40612
|
-
let c = Math.min(
|
|
40615
|
+
for (let r = 0; r < i; r += cZ) {
|
|
40616
|
+
let c = Math.min(cZ, i - r), l = await yZ(e, t, n, r, c, o);
|
|
40613
40617
|
await s.write(l), a?.((r + c) / i);
|
|
40614
40618
|
}
|
|
40615
40619
|
await s.close();
|
|
40616
40620
|
} catch (e) {
|
|
40617
40621
|
throw await s.abort(), e;
|
|
40618
40622
|
}
|
|
40619
|
-
}),
|
|
40620
|
-
let o = await
|
|
40623
|
+
}), xZ = async (e, t, n, r, i, a = {}) => TU(async () => {
|
|
40624
|
+
let o = await hZ((n.replace(/[/\\]/g, "_") || "torrent") + ".zip", { totalBytes: r.reduce((e, t) => e + t.size, 0) });
|
|
40621
40625
|
try {
|
|
40622
|
-
await
|
|
40626
|
+
await sZ(r.map((n) => ({
|
|
40623
40627
|
path: n.path,
|
|
40624
40628
|
size: n.size,
|
|
40625
|
-
read: (r, i) =>
|
|
40629
|
+
read: (r, i) => yZ(e, t, n.index, r, i, a)
|
|
40626
40630
|
})), o.write, i), await o.close();
|
|
40627
40631
|
} catch (e) {
|
|
40628
40632
|
throw await o.abort(), e;
|
|
40629
40633
|
}
|
|
40630
|
-
}),
|
|
40634
|
+
}), SZ = async (e, t, n, r, i, a = {}) => xZ(e, t, n, Aq(r).map((e) => ({
|
|
40631
40635
|
index: e.index,
|
|
40632
40636
|
path: e.name,
|
|
40633
40637
|
size: e.size
|
|
40634
|
-
})), i, a),
|
|
40638
|
+
})), i, a), CZ = (e) => {
|
|
40635
40639
|
let t = HU(), n = (0, y.useRef)(null), r = (0, y.useRef)(void 0);
|
|
40636
40640
|
r.current ||= t.newViewerId();
|
|
40637
40641
|
let [i, a] = (0, y.useState)(null), [o, s] = (0, y.useState)(null), [c, l] = (0, y.useState)(!1);
|
|
@@ -40679,13 +40683,13 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40679
40683
|
engineError: o,
|
|
40680
40684
|
storageFull: c
|
|
40681
40685
|
};
|
|
40682
|
-
},
|
|
40686
|
+
}, wZ = () => {
|
|
40683
40687
|
let e = new URL(window.location.toString()).origin;
|
|
40684
40688
|
return {
|
|
40685
40689
|
publicPath: new URL("/", e).toString(),
|
|
40686
40690
|
workerUrl: new URL("/libav-worker.js", e).toString()
|
|
40687
40691
|
};
|
|
40688
|
-
},
|
|
40692
|
+
}, TZ = (e, t, n) => {
|
|
40689
40693
|
(0, y.useEffect)(() => {
|
|
40690
40694
|
let e = !1;
|
|
40691
40695
|
return (async () => {
|
|
@@ -40695,7 +40699,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40695
40699
|
e = !0;
|
|
40696
40700
|
};
|
|
40697
40701
|
}, [t]), (0, y.useEffect)(() => {
|
|
40698
|
-
let r =
|
|
40702
|
+
let r = wZ(), i = /* @__PURE__ */ new Set();
|
|
40699
40703
|
return e.onState((a) => {
|
|
40700
40704
|
let o = t ? a.filter((e) => $E(e.magnet) === t) : a, s = o.map((e) => $E(e.magnet)).filter((e) => !!e && !i.has(e));
|
|
40701
40705
|
s.length && (i = /* @__PURE__ */ new Set([...i, ...s]), qW(s)), KW(e, o, r, n);
|
|
@@ -40705,14 +40709,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40705
40709
|
t,
|
|
40706
40710
|
n
|
|
40707
40711
|
]);
|
|
40708
|
-
},
|
|
40712
|
+
}, EZ = (e) => (0, y.useSyncExternalStore)(PW, () => FW(e)), DZ = "ripple:audio-language", OZ = "ripple:subtitle-language", kZ = "original", AZ = ({ audio: e, subtitles: t, alwaysSubtitles: n }, r) => ({
|
|
40709
40713
|
...r,
|
|
40710
40714
|
...e ? { audio: e === "original" ? void 0 : e } : {},
|
|
40711
40715
|
...t ? { subtitles: t === "off" ? null : t } : {},
|
|
40712
40716
|
...n ? { alwaysSubtitles: n === "1" } : {}
|
|
40713
|
-
}),
|
|
40717
|
+
}), jZ = (e) => {
|
|
40714
40718
|
try {
|
|
40715
|
-
let t = e(
|
|
40719
|
+
let t = e(DZ), n = e(OZ);
|
|
40716
40720
|
return {
|
|
40717
40721
|
...t ? { audio: t } : {},
|
|
40718
40722
|
...n ? { subtitles: n === "off" ? null : n } : {}
|
|
@@ -40720,11 +40724,11 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40720
40724
|
} catch {
|
|
40721
40725
|
return {};
|
|
40722
40726
|
}
|
|
40723
|
-
},
|
|
40727
|
+
}, MZ = (e, { audio: t, subtitles: n }) => {
|
|
40724
40728
|
try {
|
|
40725
|
-
t && e(
|
|
40729
|
+
t && e(DZ, t), n !== void 0 && e(OZ, n ?? "off");
|
|
40726
40730
|
} catch {}
|
|
40727
|
-
},
|
|
40731
|
+
}, NZ = (e, t) => {
|
|
40728
40732
|
let n = [...new Set(e)].filter((e) => Number.isSafeInteger(e) && e >= 0 && e < t).sort((e, t) => e - t);
|
|
40729
40733
|
if (!n.length || n.length === t) return null;
|
|
40730
40734
|
let r = [];
|
|
@@ -40734,34 +40738,34 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40734
40738
|
r.push(e === t ? String(n[e]) : `${n[e]}-${n[t]}`), e = t + 1;
|
|
40735
40739
|
}
|
|
40736
40740
|
return r.join(",");
|
|
40737
|
-
},
|
|
40741
|
+
}, PZ = /* @__PURE__ */ new Set(/* @__PURE__ */ "ar.cs.de.el.en.es.fr.he.hi.hu.id.it.ja.ko.ms.nl.pl.pt.ro.ru.sv.th.tr.uk.vi.zh".split(".")), FZ = (e) => {
|
|
40738
40742
|
try {
|
|
40739
40743
|
let { language: t, baseName: n } = new Intl.Locale(e);
|
|
40740
|
-
return
|
|
40744
|
+
return PZ.has(t) ? n : void 0;
|
|
40741
40745
|
} catch {
|
|
40742
40746
|
return;
|
|
40743
40747
|
}
|
|
40744
|
-
},
|
|
40748
|
+
}, IZ = (e, t) => {
|
|
40745
40749
|
if (e === t) return t;
|
|
40746
40750
|
try {
|
|
40747
40751
|
return e ? new Intl.Locale(e).baseName : void 0;
|
|
40748
40752
|
} catch {
|
|
40749
40753
|
return;
|
|
40750
40754
|
}
|
|
40751
|
-
},
|
|
40752
|
-
let t =
|
|
40755
|
+
}, LZ = (e) => {
|
|
40756
|
+
let t = FZ(e.get("language") ?? ""), n = IZ(e.get("audio"), kZ), r = IZ(e.get("subtitles"), "off"), i = e.get("alwaysSubtitles");
|
|
40753
40757
|
return {
|
|
40754
40758
|
...t ? { language: t } : {},
|
|
40755
40759
|
...n ? { audio: n } : {},
|
|
40756
40760
|
...r ? { subtitles: r } : {},
|
|
40757
40761
|
...i === "0" || i === "1" ? { alwaysSubtitles: i } : {}
|
|
40758
40762
|
};
|
|
40759
|
-
},
|
|
40763
|
+
}, RZ = () => navigator.languages.map(FZ).find(Boolean), zZ = ({ magnet: e, mode: t, indices: n, fileCount: r, fileIndex: i, ...a }) => {
|
|
40760
40764
|
let o = Dq(e);
|
|
40761
40765
|
if (o === null) return null;
|
|
40762
40766
|
let s = o.key === "m" ? { m: o.value } : { magnet: o.value }, c = {};
|
|
40763
40767
|
if (t === "download") {
|
|
40764
|
-
let e =
|
|
40768
|
+
let e = NZ(n ?? [], r ?? 0);
|
|
40765
40769
|
e && (c.files = e);
|
|
40766
40770
|
} else i != null && (c.fileIndex = String(i));
|
|
40767
40771
|
return Rc(t === "download" ? Pc.DOWNLOAD : Pc.WATCH, {
|
|
@@ -40769,11 +40773,11 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40769
40773
|
...a,
|
|
40770
40774
|
...s
|
|
40771
40775
|
});
|
|
40772
|
-
},
|
|
40773
|
-
let n =
|
|
40776
|
+
}, BZ = (e, t = window.location.origin) => {
|
|
40777
|
+
let n = zZ(e);
|
|
40774
40778
|
return n === null ? null : t + n;
|
|
40775
|
-
},
|
|
40776
|
-
let n =
|
|
40779
|
+
}, VZ = (e, t) => {
|
|
40780
|
+
let n = BZ(e, t);
|
|
40777
40781
|
if (n === null) return null;
|
|
40778
40782
|
let r = [
|
|
40779
40783
|
"allow-scripts",
|
|
@@ -40786,14 +40790,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40786
40790
|
" allowfullscreen",
|
|
40787
40791
|
` sandbox="${r.join(" ")}"></iframe>`
|
|
40788
40792
|
].join("\n");
|
|
40789
|
-
},
|
|
40793
|
+
}, HZ = (e) => {
|
|
40790
40794
|
if (!/^\d+$/.test(e.trim())) return null;
|
|
40791
40795
|
let t = Number(e.trim());
|
|
40792
40796
|
return Number.isSafeInteger(t) ? t : null;
|
|
40793
|
-
},
|
|
40797
|
+
}, UZ = (e, t) => {
|
|
40794
40798
|
let n = e?.trim();
|
|
40795
40799
|
if (!n) {
|
|
40796
|
-
let e = t == null ? null :
|
|
40800
|
+
let e = t == null ? null : HZ(t);
|
|
40797
40801
|
return e == null ? { kind: "all" } : {
|
|
40798
40802
|
kind: "single",
|
|
40799
40803
|
index: e
|
|
@@ -40804,7 +40808,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40804
40808
|
for (let e of r) {
|
|
40805
40809
|
let t = e.indexOf("-");
|
|
40806
40810
|
if (t > 0) {
|
|
40807
|
-
let n =
|
|
40811
|
+
let n = HZ(e.slice(0, t)), r = HZ(e.slice(t + 1));
|
|
40808
40812
|
if (n == null || r == null) continue;
|
|
40809
40813
|
i.push({
|
|
40810
40814
|
from: Math.min(n, r),
|
|
@@ -40812,7 +40816,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40812
40816
|
});
|
|
40813
40817
|
continue;
|
|
40814
40818
|
}
|
|
40815
|
-
let n =
|
|
40819
|
+
let n = HZ(e);
|
|
40816
40820
|
n != null && i.push({
|
|
40817
40821
|
from: n,
|
|
40818
40822
|
to: n
|
|
@@ -40829,7 +40833,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40829
40833
|
kind: "list",
|
|
40830
40834
|
spans: i
|
|
40831
40835
|
} : { kind: "all" };
|
|
40832
|
-
},
|
|
40836
|
+
}, WZ = (e, t) => {
|
|
40833
40837
|
if (t <= 0) return [];
|
|
40834
40838
|
if (e.kind === "all") return [...Array(t)].map((e, t) => t);
|
|
40835
40839
|
if (e.kind === "single") {
|
|
@@ -40845,18 +40849,18 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
40845
40849
|
for (let e = n; e <= i; e++) r.add(e);
|
|
40846
40850
|
}
|
|
40847
40851
|
return [...r].sort((e, t) => e - t);
|
|
40848
|
-
},
|
|
40852
|
+
}, GZ = {
|
|
40849
40853
|
video: ul,
|
|
40850
40854
|
file: fl,
|
|
40851
40855
|
folder: ml
|
|
40852
|
-
},
|
|
40853
|
-
let { kind: n, ext: r } = bW(e, t), i =
|
|
40856
|
+
}, KZ = ({ name: e, files: t }) => {
|
|
40857
|
+
let { kind: n, ext: r } = bW(e, t), i = GZ[n];
|
|
40854
40858
|
return /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(i, {}), r && /* @__PURE__ */ K("span", {
|
|
40855
40859
|
className: "ext",
|
|
40856
40860
|
"aria-hidden": "true",
|
|
40857
40861
|
children: r
|
|
40858
40862
|
})] });
|
|
40859
|
-
},
|
|
40863
|
+
}, qZ = "Ripple", JZ = G`
|
|
40860
40864
|
height: 100%;
|
|
40861
40865
|
overflow: auto;
|
|
40862
40866
|
display: flex;
|
|
@@ -41329,7 +41333,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41329
41333
|
}
|
|
41330
41334
|
}
|
|
41331
41335
|
}
|
|
41332
|
-
`,
|
|
41336
|
+
`, YZ = () => {
|
|
41333
41337
|
if (typeof window > "u") return !1;
|
|
41334
41338
|
let e = window.top;
|
|
41335
41339
|
if (!e || e === window.self) return !1;
|
|
@@ -41338,8 +41342,8 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41338
41342
|
} catch {
|
|
41339
41343
|
return !0;
|
|
41340
41344
|
}
|
|
41341
|
-
},
|
|
41342
|
-
let r = ci(), { client: i, snapshot: a, handle: o, viewer: s, claim: c, release: l, engineError: u, storageFull: d } =
|
|
41345
|
+
}, XZ = ({ magnet: e, selection: t, linked: n }) => {
|
|
41346
|
+
let r = ci(), { client: i, snapshot: a, handle: o, viewer: s, claim: c, release: l, engineError: u, storageFull: d } = CZ(e), f = zq(), p = Bq(), [m, h] = (0, y.useState)(null), [g, _] = (0, y.useState)(null), [v, b] = (0, y.useState)(null), [x, S] = (0, y.useState)(() => /* @__PURE__ */ new Set()), C = (0, y.useRef)(null), w = (0, y.useRef)(!0), T = a?.files?.files, E = (0, y.useMemo)(() => WZ(t, T?.length ?? 0), [t, T?.length]), D = (0, y.useMemo)(() => T ? E.filter((e) => !T[e].pad).map((e) => ({
|
|
41343
41347
|
index: e,
|
|
41344
41348
|
path: T[e].path,
|
|
41345
41349
|
size: T[e].size
|
|
@@ -41385,11 +41389,11 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41385
41389
|
o,
|
|
41386
41390
|
ne
|
|
41387
41391
|
]);
|
|
41388
|
-
|
|
41392
|
+
TZ(i, H, (0, y.useMemo)(() => {
|
|
41389
41393
|
let e = new Set(N);
|
|
41390
41394
|
return (t) => e.has(t);
|
|
41391
41395
|
}, [N]));
|
|
41392
|
-
let ie =
|
|
41396
|
+
let ie = EZ(H), [ae, W] = (0, y.useState)(null), [oe, se] = (0, y.useState)(!1), ce = (0, y.useRef)(void 0), le = (0, y.useCallback)((e) => {
|
|
41393
41397
|
W(e), window.clearTimeout(ce.current), ce.current = window.setTimeout(() => W(null), 4e3);
|
|
41394
41398
|
}, []);
|
|
41395
41399
|
(0, y.useEffect)(() => () => window.clearTimeout(ce.current), []);
|
|
@@ -41436,7 +41440,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41436
41440
|
size: e.size
|
|
41437
41441
|
}));
|
|
41438
41442
|
return Mq(e) ? D[Nq(e)] ?? null : null;
|
|
41439
|
-
}, [T, D]), pe = (0, y.useMemo)(() => !e || !fe ? null :
|
|
41443
|
+
}, [T, D]), pe = (0, y.useMemo)(() => !e || !fe ? null : zZ({
|
|
41440
41444
|
magnet: e,
|
|
41441
41445
|
mode: "watch",
|
|
41442
41446
|
fileIndex: fe.index,
|
|
@@ -41452,7 +41456,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41452
41456
|
}, { name: me(fe.path) }) : r.formatMessage({
|
|
41453
41457
|
id: "Watch",
|
|
41454
41458
|
defaultMessage: "Watch"
|
|
41455
|
-
}), ge = V ? me(V.path) : z, _e = (0, y.useMemo)(
|
|
41459
|
+
}), ge = V ? me(V.path) : z, _e = (0, y.useMemo)(YZ, []), ve = typeof window > "u" ? null : window.location.origin + window.location.pathname + window.location.search, ye = (0, y.useCallback)((e, t) => {
|
|
41456
41460
|
if (o == null || !e.length || C.current) return;
|
|
41457
41461
|
re(e.map((e) => e.index)), c(e[0].index);
|
|
41458
41462
|
let n = new AbortController();
|
|
@@ -41469,12 +41473,12 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41469
41473
|
...t,
|
|
41470
41474
|
fraction: e
|
|
41471
41475
|
}), d = e.length === 1 ? e[0] : null;
|
|
41472
|
-
(d ?
|
|
41476
|
+
(d ? bZ(i, o, d.index, d.path, d.size, u, a) : xZ(i, o, z, e, u, a)).then(() => {
|
|
41473
41477
|
b(d ? me(d.path) : e.length), S((t) => /* @__PURE__ */ new Set([...t, ...e.map((e) => e.index)]));
|
|
41474
41478
|
}).catch((e) => {
|
|
41475
|
-
if (
|
|
41479
|
+
if (fZ(e)) return;
|
|
41476
41480
|
let t = e?.message;
|
|
41477
|
-
_(e instanceof
|
|
41481
|
+
_(e instanceof pZ ? e.message : t == null ? r.formatMessage({
|
|
41478
41482
|
id: "The download stopped: unknown error",
|
|
41479
41483
|
defaultMessage: "The download stopped: unknown error"
|
|
41480
41484
|
}) : r.formatMessage({
|
|
@@ -41526,7 +41530,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41526
41530
|
defaultMessage: "Nothing to download"
|
|
41527
41531
|
});
|
|
41528
41532
|
return /* @__PURE__ */ q("div", {
|
|
41529
|
-
css:
|
|
41533
|
+
css: JZ,
|
|
41530
41534
|
children: [/* @__PURE__ */ q("header", { children: [/* @__PURE__ */ q("span", {
|
|
41531
41535
|
className: "brand",
|
|
41532
41536
|
children: [/* @__PURE__ */ K(Sc, {
|
|
@@ -41534,7 +41538,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41534
41538
|
to: "/",
|
|
41535
41539
|
target: _e ? "_blank" : void 0,
|
|
41536
41540
|
rel: _e ? "noreferrer" : void 0,
|
|
41537
|
-
children:
|
|
41541
|
+
children: qZ
|
|
41538
41542
|
}), !_e && /* @__PURE__ */ K(fX, {
|
|
41539
41543
|
className: "powered",
|
|
41540
41544
|
label: r.formatMessage({
|
|
@@ -41560,7 +41564,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41560
41564
|
children: ie ? /* @__PURE__ */ K("img", {
|
|
41561
41565
|
src: ie,
|
|
41562
41566
|
alt: ""
|
|
41563
|
-
}) : /* @__PURE__ */ K(
|
|
41567
|
+
}) : /* @__PURE__ */ K(KZ, {
|
|
41564
41568
|
name: z,
|
|
41565
41569
|
files: T && D.map((e) => ({ name: e.path }))
|
|
41566
41570
|
})
|
|
@@ -41812,7 +41816,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41812
41816
|
]
|
|
41813
41817
|
}) })]
|
|
41814
41818
|
});
|
|
41815
|
-
},
|
|
41819
|
+
}, ZZ = (e) => {
|
|
41816
41820
|
if (!e || typeof e != "object") return;
|
|
41817
41821
|
let { ripple: t, magnet: n, fileIndex: r } = e;
|
|
41818
41822
|
if (!(t !== "open" && t !== "prepare" || typeof n != "string" || !n.startsWith("magnet:")) && (r === void 0 || typeof r == "number" && Number.isInteger(r) && r >= 0)) return {
|
|
@@ -41820,12 +41824,12 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41820
41824
|
magnet: n,
|
|
41821
41825
|
...r === void 0 ? {} : { fileIndex: r }
|
|
41822
41826
|
};
|
|
41823
|
-
},
|
|
41827
|
+
}, QZ = (e) => {
|
|
41824
41828
|
window.parent !== window && window.parent.postMessage({
|
|
41825
41829
|
ripple: "picked",
|
|
41826
41830
|
...e
|
|
41827
41831
|
}, "*");
|
|
41828
|
-
},
|
|
41832
|
+
}, $Z = (e) => {
|
|
41829
41833
|
let t = (0, y.useRef)(e);
|
|
41830
41834
|
(0, y.useEffect)(() => {
|
|
41831
41835
|
t.current = e;
|
|
@@ -41833,18 +41837,18 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41833
41837
|
if (window.parent === window) return;
|
|
41834
41838
|
let e = (e) => {
|
|
41835
41839
|
if (e.source !== window.parent) return;
|
|
41836
|
-
let n =
|
|
41840
|
+
let n = ZZ(e.data);
|
|
41837
41841
|
n && (t.current(n), n.ripple === "open" && window.parent.postMessage({ ripple: "opened" }, e.origin === "null" ? "*" : e.origin));
|
|
41838
41842
|
};
|
|
41839
41843
|
return window.addEventListener("message", e), () => window.removeEventListener("message", e);
|
|
41840
41844
|
}, []);
|
|
41841
|
-
},
|
|
41845
|
+
}, eQ = "ripple:normalize-volume", tQ = (e) => {
|
|
41842
41846
|
try {
|
|
41843
|
-
return e(
|
|
41847
|
+
return e(eQ) !== "0";
|
|
41844
41848
|
} catch {
|
|
41845
41849
|
return !0;
|
|
41846
41850
|
}
|
|
41847
|
-
},
|
|
41851
|
+
}, nQ = "ripple:player-volume", rQ = (e) => {
|
|
41848
41852
|
try {
|
|
41849
41853
|
let { volume: t, muted: n } = JSON.parse(localStorage.getItem("ripple:player-volume") ?? "{}");
|
|
41850
41854
|
typeof t == "number" && typeof n == "boolean" && Object.assign(e, {
|
|
@@ -41854,14 +41858,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41854
41858
|
} catch {}
|
|
41855
41859
|
let t = () => {
|
|
41856
41860
|
if (navigator.userActivation.hasBeenActive) try {
|
|
41857
|
-
localStorage.setItem(
|
|
41861
|
+
localStorage.setItem(nQ, JSON.stringify({
|
|
41858
41862
|
volume: e.volume,
|
|
41859
41863
|
muted: e.muted
|
|
41860
41864
|
}));
|
|
41861
41865
|
} catch {}
|
|
41862
41866
|
};
|
|
41863
41867
|
return e.addEventListener("volumechange", t), () => e.removeEventListener("volumechange", t);
|
|
41864
|
-
},
|
|
41868
|
+
}, iQ = (e) => {
|
|
41865
41869
|
(0, y.useEffect)(() => {
|
|
41866
41870
|
if (!e || RE()) return;
|
|
41867
41871
|
let t = document.title;
|
|
@@ -41871,7 +41875,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41871
41875
|
document.title = t, n && (n.metadata = null);
|
|
41872
41876
|
};
|
|
41873
41877
|
}, [e]);
|
|
41874
|
-
},
|
|
41878
|
+
}, aQ = tr({
|
|
41875
41879
|
downloading: {
|
|
41876
41880
|
id: "Downloading",
|
|
41877
41881
|
defaultMessage: "Downloading"
|
|
@@ -41912,7 +41916,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41912
41916
|
id: "Starting",
|
|
41913
41917
|
defaultMessage: "Starting"
|
|
41914
41918
|
}
|
|
41915
|
-
}),
|
|
41919
|
+
}), oQ = (e) => PE(e, !0), sQ = (e, t = Date.now()) => {
|
|
41916
41920
|
if (!e) return "-";
|
|
41917
41921
|
let n = (t - e) / 864e5;
|
|
41918
41922
|
if (n < 1) return CG({ hours: Math.max(1, Math.round(n * 24)) });
|
|
@@ -41926,7 +41930,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41926
41930
|
month: "short",
|
|
41927
41931
|
day: "numeric"
|
|
41928
41932
|
});
|
|
41929
|
-
},
|
|
41933
|
+
}, cQ = (e, t) => {
|
|
41930
41934
|
let n = t.reason === "stalled" ? e.peers > 0 ? Q.formatMessage({
|
|
41931
41935
|
id: "Peers stopped sending data",
|
|
41932
41936
|
defaultMessage: "Peers stopped sending data"
|
|
@@ -41944,7 +41948,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
41944
41948
|
id: "retrying in {time}",
|
|
41945
41949
|
defaultMessage: "retrying in {time}"
|
|
41946
41950
|
}, { time: t.retryInSeconds < 60 ? CG({ seconds: t.retryInSeconds }) : CG({ minutes: Math.ceil(t.retryInSeconds / 60) }) })}`;
|
|
41947
|
-
},
|
|
41951
|
+
}, lQ = G`
|
|
41948
41952
|
height: 100%;
|
|
41949
41953
|
width: 100%;
|
|
41950
41954
|
overflow: hidden;
|
|
@@ -42331,20 +42335,20 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42331
42335
|
${XY}
|
|
42332
42336
|
}
|
|
42333
42337
|
}
|
|
42334
|
-
`,
|
|
42338
|
+
`, uQ = yi({
|
|
42335
42339
|
id: "Too big to download ahead here, so it streams as you watch. In Ripple (header link), with more room allowed, it can download in full, without next episode, tracking or watch together.",
|
|
42336
42340
|
defaultMessage: "Too big to download ahead here, so it streams as you watch. In Ripple (header link), with more room allowed, it can download in full, without next episode, tracking or watch together."
|
|
42337
|
-
}),
|
|
42341
|
+
}), dQ = ({ linked: e }) => {
|
|
42338
42342
|
let t = ci(), [n] = Oc(), { fileIndex: r } = Object.fromEntries(n.entries()), i = (0, y.useMemo)(() => kq(n), [n]), a = (0, y.useMemo)(() => {
|
|
42339
|
-
let e =
|
|
42343
|
+
let e = UZ(null, r);
|
|
42340
42344
|
return e.kind === "single" ? e.index : void 0;
|
|
42341
42345
|
}, [r]), { snapshot: o, engineError: s, storageFull: c, fileIndex: l, read: u, readQuiet: d, prioritizeFrom: f } = Lq(i, a), p = os(), m = Rq();
|
|
42342
|
-
|
|
42346
|
+
$Z((t) => {
|
|
42343
42347
|
if (t.ripple === "prepare") return m({
|
|
42344
42348
|
magnet: t.magnet,
|
|
42345
42349
|
fileIndex: t.fileIndex
|
|
42346
42350
|
});
|
|
42347
|
-
let n =
|
|
42351
|
+
let n = zZ({
|
|
42348
42352
|
magnet: t.magnet,
|
|
42349
42353
|
mode: "watch",
|
|
42350
42354
|
fileIndex: t.fileIndex,
|
|
@@ -42352,23 +42356,23 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42352
42356
|
});
|
|
42353
42357
|
n && p(n, { replace: !0 });
|
|
42354
42358
|
});
|
|
42355
|
-
let h = `${i}#${a ?? ""}`, [g, _] = (0, y.useState)(() =>
|
|
42359
|
+
let h = `${i}#${a ?? ""}`, [g, _] = (0, y.useState)(() => tQ((e) => localStorage.getItem(e))), v = (e) => {
|
|
42356
42360
|
_(e);
|
|
42357
42361
|
try {
|
|
42358
|
-
localStorage.setItem(
|
|
42362
|
+
localStorage.setItem(eQ, e ? "1" : "0");
|
|
42359
42363
|
} catch {}
|
|
42360
|
-
}, [b, x] = (0, y.useState)(() =>
|
|
42364
|
+
}, [b, x] = (0, y.useState)(() => AZ(e, jZ((e) => localStorage.getItem(e)))), S = (e) => {
|
|
42361
42365
|
x((t) => ({
|
|
42362
42366
|
...t,
|
|
42363
42367
|
...e
|
|
42364
|
-
})),
|
|
42368
|
+
})), MZ((e, t) => localStorage.setItem(e, t), e), QZ(e);
|
|
42365
42369
|
}, C = (0, y.useRef)(null);
|
|
42366
42370
|
(0, y.useEffect)(() => {
|
|
42367
42371
|
let e = C.current?.querySelector("video");
|
|
42368
|
-
return e ?
|
|
42372
|
+
return e ? rQ(e) : void 0;
|
|
42369
42373
|
}, [h]);
|
|
42370
42374
|
let w = Bq(), T = qY(zq(), w), E = o?.files?.files[l], D = E?.size, O = E?.path.split("/").pop() || void 0;
|
|
42371
|
-
|
|
42375
|
+
iQ(O);
|
|
42372
42376
|
let k = (0, y.useMemo)(() => new URL(window.location.toString()).origin, []), A = (0, y.useMemo)(() => new URL("/", k).toString(), [k]), j = (0, y.useMemo)(() => new URL("/libav-worker.js", k).toString(), [k]), M = (0, y.useMemo)(() => new URL("/jassub/", k).toString(), [k]), N = (0, y.useMemo)(() => new URL("worker.js", M).toString(), [M]), P = (0, y.useMemo)(() => new URL("jassub-worker-modern.wasm", M).toString(), [M]), F = (0, y.useMemo)(() => new URL("jassub-worker-modern.js", M).toString(), [M]), I = (0, y.useMemo)(() => new URL("jassub-worker.wasm", M).toString(), [M]), L = (0, y.useMemo)(() => new URL("jassub-worker.js", M).toString(), [M]), R = (0, y.useMemo)(() => new URL("default.woff2", M).toString(), [M]), z = (0, y.useMemo)(() => new URL("noto-sans-jp.otf", M).toString(), [M]), B = o?.status, V = {
|
|
42373
42377
|
peers: B?.numPeers ?? 0,
|
|
42374
42378
|
downloadSpeed: o?.displayDownloadRate ?? 0,
|
|
@@ -42401,19 +42405,19 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42401
42405
|
})) ?? (o?.windowed && RE() ? /* @__PURE__ */ K(EY, {
|
|
42402
42406
|
id: "window-note",
|
|
42403
42407
|
tooltipPlace: "bottom-end",
|
|
42404
|
-
description: t.formatMessage(
|
|
42408
|
+
description: t.formatMessage(uQ),
|
|
42405
42409
|
text: /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(hl, {}), /* @__PURE__ */ K("span", { children: t.formatMessage({
|
|
42406
42410
|
id: "Streams as you watch",
|
|
42407
42411
|
defaultMessage: "Streams as you watch"
|
|
42408
42412
|
}) })] }),
|
|
42409
|
-
toolTipText: /* @__PURE__ */ K("span", { children: t.formatMessage(
|
|
42413
|
+
toolTipText: /* @__PURE__ */ K("span", { children: t.formatMessage(uQ) })
|
|
42410
42414
|
}) : null), ae = (0, y.useMemo)(() => QE(o, l).map(([e, t]) => ({
|
|
42411
42415
|
startByteOffset: e,
|
|
42412
42416
|
endByteOffset: t
|
|
42413
42417
|
})), [o, l]), W = D && !re ? {
|
|
42414
42418
|
read: u,
|
|
42415
42419
|
size: D
|
|
42416
|
-
} : {}, oe = o ? t.formatMessage(
|
|
42420
|
+
} : {}, oe = o ? t.formatMessage(aQ[ZG(o)]) : null, se = (0, y.useMemo)(() => i ? $E(i) : null, [i]);
|
|
42417
42421
|
_Y(se);
|
|
42418
42422
|
let ce = (0, y.useMemo)(() => i && se ? new URL(Rc(Pc.HOME, {
|
|
42419
42423
|
torrent: se,
|
|
@@ -42617,7 +42621,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42617
42621
|
]
|
|
42618
42622
|
});
|
|
42619
42623
|
return /* @__PURE__ */ K("div", {
|
|
42620
|
-
css:
|
|
42624
|
+
css: lQ,
|
|
42621
42625
|
ref: C,
|
|
42622
42626
|
children: /* @__PURE__ */ K(RT, {
|
|
42623
42627
|
...W,
|
|
@@ -42640,7 +42644,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42640
42644
|
onPreferredAudioLanguageChange: (e) => S({ audio: e }),
|
|
42641
42645
|
onPreferredSubtitleLanguageChange: (e) => S({ subtitles: e }),
|
|
42642
42646
|
onAlwaysShowSubtitlesChange: (e) => S({ alwaysSubtitles: e }),
|
|
42643
|
-
language: e.language ?? bE() ??
|
|
42647
|
+
language: e.language ?? bE() ?? RZ(),
|
|
42644
42648
|
autoplay: !0,
|
|
42645
42649
|
overlay: ge,
|
|
42646
42650
|
downloadedRanges: ae,
|
|
@@ -42654,15 +42658,15 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42654
42658
|
})
|
|
42655
42659
|
}, h)
|
|
42656
42660
|
});
|
|
42657
|
-
},
|
|
42658
|
-
let [t] = Oc(), n = (0, y.useMemo)(() => kq(t), [t]), r = (0, y.useMemo)(() =>
|
|
42659
|
-
return e === "download" ? /* @__PURE__ */ K(
|
|
42661
|
+
}, fQ = ({ mode: e = "watch" } = {}) => {
|
|
42662
|
+
let [t] = Oc(), n = (0, y.useMemo)(() => kq(t), [t]), r = (0, y.useMemo)(() => LZ(t), [t]), i = (0, y.useMemo)(() => UZ(t.get("files"), t.get("fileIndex")), [t]);
|
|
42663
|
+
return e === "download" ? /* @__PURE__ */ K(XZ, {
|
|
42660
42664
|
magnet: n,
|
|
42661
42665
|
selection: i,
|
|
42662
42666
|
linked: r
|
|
42663
|
-
}) : /* @__PURE__ */ K(
|
|
42664
|
-
},
|
|
42665
|
-
if (!
|
|
42667
|
+
}) : /* @__PURE__ */ K(dQ, { linked: r });
|
|
42668
|
+
}, pQ = "ripple:folder", mQ = () => typeof window < "u" && "showDirectoryPicker" in window && !RE(), hQ = async () => {
|
|
42669
|
+
if (!mQ()) return;
|
|
42666
42670
|
let e = window.showDirectoryPicker;
|
|
42667
42671
|
return e({
|
|
42668
42672
|
id: "ripple-downloads",
|
|
@@ -42670,38 +42674,38 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42670
42674
|
}).catch((e) => {
|
|
42671
42675
|
if (e?.name !== "AbortError") throw e;
|
|
42672
42676
|
});
|
|
42673
|
-
},
|
|
42677
|
+
}, gQ = async (e) => {
|
|
42674
42678
|
let { queryPermission: t } = e;
|
|
42675
42679
|
return await t?.call(e, { mode: "readwrite" }) ?? "granted";
|
|
42676
|
-
},
|
|
42677
|
-
if (await
|
|
42680
|
+
}, _Q = async (e) => {
|
|
42681
|
+
if (await gQ(e) === "granted") return !0;
|
|
42678
42682
|
let { requestPermission: t } = e;
|
|
42679
42683
|
return await t?.call(e, { mode: "readwrite" }) === "granted";
|
|
42680
|
-
},
|
|
42684
|
+
}, vQ = () => {
|
|
42681
42685
|
let [e, t] = (0, y.useState)(null), [n, r] = (0, y.useState)(!1);
|
|
42682
42686
|
(0, y.useEffect)(() => {
|
|
42683
42687
|
(async () => {
|
|
42684
|
-
let e = await dW(
|
|
42685
|
-
e && (t(e), r(await
|
|
42688
|
+
let e = await dW(pQ);
|
|
42689
|
+
e && (t(e), r(await gQ(e) === "granted"));
|
|
42686
42690
|
})();
|
|
42687
42691
|
}, []);
|
|
42688
42692
|
let i = (0, y.useCallback)(async () => {
|
|
42689
|
-
let e = await
|
|
42690
|
-
return e ? (await fW(
|
|
42693
|
+
let e = await hQ();
|
|
42694
|
+
return e ? (await fW(pQ, e), t(e), r(!0), !0) : !1;
|
|
42691
42695
|
}, []), a = (0, y.useCallback)(async () => {
|
|
42692
|
-
e && r(await
|
|
42696
|
+
e && r(await _Q(e));
|
|
42693
42697
|
}, [e]), o = (0, y.useCallback)(async () => {
|
|
42694
|
-
await pW(
|
|
42698
|
+
await pW(pQ), t(null), r(!1);
|
|
42695
42699
|
}, []);
|
|
42696
42700
|
return {
|
|
42697
|
-
supported:
|
|
42701
|
+
supported: mQ(),
|
|
42698
42702
|
folder: e,
|
|
42699
42703
|
permitted: n,
|
|
42700
42704
|
pick: i,
|
|
42701
42705
|
allow: a,
|
|
42702
42706
|
clear: o
|
|
42703
42707
|
};
|
|
42704
|
-
},
|
|
42708
|
+
}, yQ = (e) => {
|
|
42705
42709
|
let [t, n] = (0, y.useState)(null), r = Bq() !== "direct";
|
|
42706
42710
|
return (0, y.useEffect)(() => {
|
|
42707
42711
|
if (!e || !r) return;
|
|
@@ -42714,7 +42718,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42714
42718
|
t = !0, window.clearInterval(a);
|
|
42715
42719
|
};
|
|
42716
42720
|
}, [e, r]), r ? t : null;
|
|
42717
|
-
},
|
|
42721
|
+
}, bQ = 3e4, xQ = (e) => {
|
|
42718
42722
|
let [t, n] = (0, y.useState)(null);
|
|
42719
42723
|
return (0, y.useEffect)(() => {
|
|
42720
42724
|
let e = !1, t = async () => {
|
|
@@ -42731,14 +42735,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42731
42735
|
t();
|
|
42732
42736
|
let r = window.setInterval(() => {
|
|
42733
42737
|
t();
|
|
42734
|
-
},
|
|
42738
|
+
}, bQ), i = () => {
|
|
42735
42739
|
t();
|
|
42736
42740
|
};
|
|
42737
42741
|
return document.addEventListener("visibilitychange", i), () => {
|
|
42738
42742
|
e = !0, window.clearInterval(r), document.removeEventListener("visibilitychange", i);
|
|
42739
42743
|
};
|
|
42740
42744
|
}, [e]), t;
|
|
42741
|
-
},
|
|
42745
|
+
}, SQ = ({ supported: e, folderName: t, permitted: n, defaultLocation: r }) => e ? t ? n ? r === "folder" ? {
|
|
42742
42746
|
kind: "settled",
|
|
42743
42747
|
folderName: t
|
|
42744
42748
|
} : {
|
|
@@ -42747,7 +42751,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42747
42751
|
} : {
|
|
42748
42752
|
kind: "allow",
|
|
42749
42753
|
folderName: t
|
|
42750
|
-
} : { kind: "choose" } : { kind: "none" },
|
|
42754
|
+
} : { kind: "choose" } : { kind: "none" }, CQ = (e) => {
|
|
42751
42755
|
switch (e.kind) {
|
|
42752
42756
|
case "none":
|
|
42753
42757
|
case "settled": return {
|
|
@@ -42779,18 +42783,18 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42779
42783
|
}, { folder: e.folderName })
|
|
42780
42784
|
};
|
|
42781
42785
|
}
|
|
42782
|
-
},
|
|
42786
|
+
}, wQ = {
|
|
42783
42787
|
storage: SX,
|
|
42784
42788
|
permissions: wX
|
|
42785
|
-
},
|
|
42789
|
+
}, TQ = { name: "persistent-storage" }, EQ = async (e) => e.storage.estimate().then(({ quota: e }) => e ?? null).catch(() => null), DQ = async (e = wQ) => {
|
|
42786
42790
|
try {
|
|
42787
|
-
return (await e.permissions.query(
|
|
42791
|
+
return (await e.permissions.query(TQ)).state;
|
|
42788
42792
|
} catch {
|
|
42789
42793
|
return "prompt";
|
|
42790
42794
|
}
|
|
42791
|
-
},
|
|
42795
|
+
}, OQ = async (e = wQ) => {
|
|
42792
42796
|
try {
|
|
42793
|
-
let t = await
|
|
42797
|
+
let t = await DQ(e), n = await e.storage.persisted();
|
|
42794
42798
|
if (n || t !== "granted") return {
|
|
42795
42799
|
persisted: n,
|
|
42796
42800
|
permission: t,
|
|
@@ -42809,14 +42813,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42809
42813
|
silentlyPersisted: !1
|
|
42810
42814
|
};
|
|
42811
42815
|
}
|
|
42812
|
-
},
|
|
42816
|
+
}, kQ = async (e = wQ) => {
|
|
42813
42817
|
try {
|
|
42814
|
-
let t = await
|
|
42818
|
+
let t = await EQ(e);
|
|
42815
42819
|
return {
|
|
42816
42820
|
attempted: !0,
|
|
42817
42821
|
granted: await e.storage.persist(),
|
|
42818
42822
|
quotaBefore: t,
|
|
42819
|
-
quotaAfter: await
|
|
42823
|
+
quotaAfter: await EQ(e)
|
|
42820
42824
|
};
|
|
42821
42825
|
} catch {
|
|
42822
42826
|
return {
|
|
@@ -42826,7 +42830,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42826
42830
|
quotaAfter: null
|
|
42827
42831
|
};
|
|
42828
42832
|
}
|
|
42829
|
-
},
|
|
42833
|
+
}, AQ = {
|
|
42830
42834
|
persisted: !1,
|
|
42831
42835
|
permission: "prompt",
|
|
42832
42836
|
attempted: !1,
|
|
@@ -42834,11 +42838,11 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42834
42838
|
quotaBefore: null,
|
|
42835
42839
|
quotaAfter: null,
|
|
42836
42840
|
refreshKey: 0
|
|
42837
|
-
},
|
|
42838
|
-
let [e, t] = (0, y.useState)(
|
|
42841
|
+
}, jQ = () => {
|
|
42842
|
+
let [e, t] = (0, y.useState)(AQ);
|
|
42839
42843
|
(0, y.useEffect)(() => {
|
|
42840
42844
|
let e = !1;
|
|
42841
|
-
return
|
|
42845
|
+
return OQ().then(({ persisted: n, permission: r, silentlyPersisted: i }) => {
|
|
42842
42846
|
e || t((e) => ({
|
|
42843
42847
|
...e,
|
|
42844
42848
|
persisted: n,
|
|
@@ -42850,7 +42854,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42850
42854
|
};
|
|
42851
42855
|
}, []);
|
|
42852
42856
|
let n = (0, y.useCallback)(async () => {
|
|
42853
|
-
let e = await
|
|
42857
|
+
let e = await kQ();
|
|
42854
42858
|
t((t) => {
|
|
42855
42859
|
let n = e.quotaAfter !== null && e.quotaAfter !== e.quotaBefore, r = e.granted === !0;
|
|
42856
42860
|
return {
|
|
@@ -42865,10 +42869,10 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42865
42869
|
...e,
|
|
42866
42870
|
request: n
|
|
42867
42871
|
};
|
|
42868
|
-
},
|
|
42872
|
+
}, MQ = () => Q.formatMessage({
|
|
42869
42873
|
id: "Ask for more room",
|
|
42870
42874
|
defaultMessage: "Ask for more room"
|
|
42871
|
-
}),
|
|
42875
|
+
}), NQ = ({ persisted: e, permission: t, attempted: n, granted: r }) => e || t === "denied" ? {
|
|
42872
42876
|
kind: "none",
|
|
42873
42877
|
action: null
|
|
42874
42878
|
} : n && !r ? {
|
|
@@ -42876,9 +42880,9 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42876
42880
|
action: null
|
|
42877
42881
|
} : {
|
|
42878
42882
|
kind: "ask",
|
|
42879
|
-
action:
|
|
42880
|
-
},
|
|
42881
|
-
let t =
|
|
42883
|
+
action: MQ()
|
|
42884
|
+
}, PQ = (e) => {
|
|
42885
|
+
let t = NQ(e);
|
|
42882
42886
|
return e.persisted ? {
|
|
42883
42887
|
label: Q.formatMessage({
|
|
42884
42888
|
id: "Persistent",
|
|
@@ -42907,13 +42911,13 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42907
42911
|
on: !1,
|
|
42908
42912
|
actionable: !1
|
|
42909
42913
|
} : {
|
|
42910
|
-
label: t.action ??
|
|
42914
|
+
label: t.action ?? MQ(),
|
|
42911
42915
|
hint: null,
|
|
42912
42916
|
on: !1,
|
|
42913
42917
|
actionable: !0
|
|
42914
42918
|
};
|
|
42915
|
-
},
|
|
42916
|
-
let n = (0, y.useRef)(!1), [r, i] = (0, y.useState)(!1), a =
|
|
42919
|
+
}, FQ = ({ persist: e, onAsk: t }) => {
|
|
42920
|
+
let n = (0, y.useRef)(!1), [r, i] = (0, y.useState)(!1), a = NQ(e);
|
|
42917
42921
|
return a.kind === "ask" ? /* @__PURE__ */ K("button", {
|
|
42918
42922
|
type: "button",
|
|
42919
42923
|
disabled: r,
|
|
@@ -42922,8 +42926,8 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42922
42926
|
},
|
|
42923
42927
|
children: a.action
|
|
42924
42928
|
}) : null;
|
|
42925
|
-
},
|
|
42926
|
-
let a = ci(), o =
|
|
42929
|
+
}, IQ = ({ storage: e, relief: t, onAct: n, persist: r, onAskPersist: i }) => {
|
|
42930
|
+
let a = ci(), o = CQ(t);
|
|
42927
42931
|
return /* @__PURE__ */ q("div", {
|
|
42928
42932
|
className: "storage-warning surface",
|
|
42929
42933
|
role: "status",
|
|
@@ -42939,7 +42943,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42939
42943
|
used: NE(e.usedBytes, !0),
|
|
42940
42944
|
limit: NE(e.limitBytes, !0)
|
|
42941
42945
|
}) }),
|
|
42942
|
-
/* @__PURE__ */ K(
|
|
42946
|
+
/* @__PURE__ */ K(FQ, {
|
|
42943
42947
|
persist: r,
|
|
42944
42948
|
onAsk: i
|
|
42945
42949
|
}),
|
|
@@ -42951,44 +42955,44 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42951
42955
|
})
|
|
42952
42956
|
]
|
|
42953
42957
|
});
|
|
42954
|
-
},
|
|
42958
|
+
}, LQ = 8388608, RQ = 16384, zQ = [
|
|
42955
42959
|
0,
|
|
42956
42960
|
.25,
|
|
42957
42961
|
.5,
|
|
42958
42962
|
.75,
|
|
42959
42963
|
1
|
|
42960
|
-
],
|
|
42964
|
+
], BQ = async (e, t) => {
|
|
42961
42965
|
let n = t.split("/").filter(Boolean), r = n.pop(), i = e;
|
|
42962
42966
|
for (let e of n) i = await i.getDirectoryHandle(e, { create: !0 });
|
|
42963
42967
|
return i.getFileHandle(r, { create: !0 });
|
|
42964
|
-
},
|
|
42968
|
+
}, VQ = (e, t) => {
|
|
42965
42969
|
if (e.length !== t.length) return !1;
|
|
42966
42970
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
42967
42971
|
return !0;
|
|
42968
|
-
},
|
|
42972
|
+
}, HQ = (e, t = RQ) => e <= 0 ? [] : e <= t * zQ.length ? [{
|
|
42969
42973
|
offset: 0,
|
|
42970
42974
|
length: e
|
|
42971
|
-
}] : [...new Set(
|
|
42975
|
+
}] : [...new Set(zQ.map((n) => Math.min(Math.max(0, Math.round((e - t) * n)), e - t)))].sort((e, t) => e - t).map((e) => ({
|
|
42972
42976
|
offset: e,
|
|
42973
42977
|
length: t
|
|
42974
|
-
})),
|
|
42978
|
+
})), UQ = async (e, t, n, r, i) => {
|
|
42975
42979
|
let a = await r.getFile();
|
|
42976
42980
|
if (a.size !== i) return !1;
|
|
42977
42981
|
if (i === 0) return !0;
|
|
42978
|
-
for (let { offset: r, length: o } of
|
|
42982
|
+
for (let { offset: r, length: o } of HQ(i)) {
|
|
42979
42983
|
let [i, s] = await Promise.all([e.read(Number(t.id), n, r, o, !1), a.slice(r, r + o).arrayBuffer()]);
|
|
42980
|
-
if (!
|
|
42984
|
+
if (!VQ(i, new Uint8Array(s))) return !1;
|
|
42981
42985
|
}
|
|
42982
42986
|
return !0;
|
|
42983
|
-
},
|
|
42987
|
+
}, WQ = async (e, t, n) => {
|
|
42984
42988
|
let r = 0;
|
|
42985
42989
|
for (let i of Aq(t.files)) {
|
|
42986
|
-
let a = i.index, o = await
|
|
42987
|
-
if (await
|
|
42990
|
+
let a = i.index, o = await BQ(n, i.name);
|
|
42991
|
+
if (await UQ(e, t, a, o, i.size)) continue;
|
|
42988
42992
|
let s = await o.createWritable();
|
|
42989
42993
|
try {
|
|
42990
|
-
for (let n = 0; n < i.size; n +=
|
|
42991
|
-
let r = Math.min(
|
|
42994
|
+
for (let n = 0; n < i.size; n += LQ) {
|
|
42995
|
+
let r = Math.min(LQ, i.size - n), o = await e.read(Number(t.id), a, n, r);
|
|
42992
42996
|
await s.write(o);
|
|
42993
42997
|
}
|
|
42994
42998
|
await s.close(), r++;
|
|
@@ -42997,23 +43001,23 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
42997
43001
|
}
|
|
42998
43002
|
}
|
|
42999
43003
|
return r;
|
|
43000
|
-
},
|
|
43004
|
+
}, GQ = { formatMessage: (e, t) => t ? {
|
|
43001
43005
|
message: e.id,
|
|
43002
43006
|
values: t
|
|
43003
|
-
} : { message: e.id } },
|
|
43007
|
+
} : { message: e.id } }, KQ = /* @__PURE__ */ new Set([
|
|
43004
43008
|
".DS_Store",
|
|
43005
43009
|
"Thumbs.db",
|
|
43006
43010
|
"desktop.ini"
|
|
43007
|
-
]),
|
|
43011
|
+
]), qQ = (e) => KQ.has(e), JQ = (e) => typeof e.getFile == "function" ? e.getFile() : Promise.resolve(e), YQ = class extends Error {
|
|
43008
43012
|
constructor() {
|
|
43009
43013
|
super("reading the folder was cancelled"), this.name = "WalkCancelled";
|
|
43010
43014
|
}
|
|
43011
|
-
},
|
|
43015
|
+
}, XQ = async (e, { signal: t, onFound: n } = {}) => {
|
|
43012
43016
|
let r = [], i = [], a = !1, o = async (e, s) => {
|
|
43013
|
-
if (t?.aborted) throw new
|
|
43017
|
+
if (t?.aborted) throw new YQ();
|
|
43014
43018
|
if (a) return;
|
|
43015
43019
|
if (s.length >= 16) {
|
|
43016
|
-
i.push(
|
|
43020
|
+
i.push(GQ.formatMessage({
|
|
43017
43021
|
id: "{path} (nested too deep)",
|
|
43018
43022
|
defaultMessage: "{path} (nested too deep)"
|
|
43019
43023
|
}, { path: s.join("/") }));
|
|
@@ -43022,7 +43026,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43022
43026
|
let c = e.entries;
|
|
43023
43027
|
if (!c) throw Error("this browser cannot list a picked folder");
|
|
43024
43028
|
for await (let [l, u] of c.call(e)) {
|
|
43025
|
-
if (t?.aborted) throw new
|
|
43029
|
+
if (t?.aborted) throw new YQ();
|
|
43026
43030
|
if (r.length >= 2e4) {
|
|
43027
43031
|
a = !0;
|
|
43028
43032
|
return;
|
|
@@ -43032,13 +43036,13 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43032
43036
|
if (await o(u, e), a) return;
|
|
43033
43037
|
continue;
|
|
43034
43038
|
}
|
|
43035
|
-
if (
|
|
43039
|
+
if (qQ(l)) {
|
|
43036
43040
|
i.push(e.join("/"));
|
|
43037
43041
|
continue;
|
|
43038
43042
|
}
|
|
43039
43043
|
let c = u, d = await c.getFile().catch(() => null);
|
|
43040
43044
|
if (!d) {
|
|
43041
|
-
i.push(
|
|
43045
|
+
i.push(GQ.formatMessage({
|
|
43042
43046
|
id: "{path} (could not be read)",
|
|
43043
43047
|
defaultMessage: "{path} (could not be read)"
|
|
43044
43048
|
}, { path: e.join("/") }));
|
|
@@ -43057,21 +43061,21 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43057
43061
|
skipped: i,
|
|
43058
43062
|
truncated: a
|
|
43059
43063
|
};
|
|
43060
|
-
},
|
|
43061
|
-
let t = await
|
|
43064
|
+
}, ZQ = async (e) => {
|
|
43065
|
+
let t = await JQ(e);
|
|
43062
43066
|
return {
|
|
43063
43067
|
path: [e.name],
|
|
43064
43068
|
size: t.size,
|
|
43065
43069
|
lastModified: t.lastModified,
|
|
43066
43070
|
handle: e
|
|
43067
43071
|
};
|
|
43068
|
-
},
|
|
43069
|
-
let r = await
|
|
43072
|
+
}, QQ = async (e, t, n) => {
|
|
43073
|
+
let r = await JQ(e.handle);
|
|
43070
43074
|
return new Uint8Array(await r.slice(t, t + n).arrayBuffer());
|
|
43071
|
-
},
|
|
43075
|
+
}, $Q = async (e) => {
|
|
43072
43076
|
let t = [];
|
|
43073
43077
|
for (let n of e) {
|
|
43074
|
-
let e = await
|
|
43078
|
+
let e = await JQ(n.handle).catch(() => null);
|
|
43075
43079
|
if (!e) {
|
|
43076
43080
|
t.push({
|
|
43077
43081
|
path: n.path.join("/"),
|
|
@@ -43087,16 +43091,16 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43087
43091
|
});
|
|
43088
43092
|
}
|
|
43089
43093
|
return t;
|
|
43090
|
-
}, $
|
|
43091
|
-
let t = e(
|
|
43094
|
+
}, e$ = "/native", t$ = (e) => `${e$}/${e}`, n$ = (e) => e === "/native" || !!e?.startsWith("/native/"), r$ = "/source", i$ = (e) => `${r$}/${e}`, a$ = (e) => e === "/source" || !!e?.startsWith("/source/"), o$ = "ripple:save-location", s$ = (e) => e?.saveTo === "source" || e?.created === !0, c$ = (e) => {
|
|
43095
|
+
let t = e(o$);
|
|
43092
43096
|
return t === "browser" || t === "folder" ? t : "browser";
|
|
43093
|
-
},
|
|
43097
|
+
}, l$ = (e, t) => e?.saveTo === "source" ? "source" : e?.saveTo === "browser" || e?.saveTo === "folder" ? e.saveTo : t, u$ = (e) => a$(e) ? "source" : n$(e) ? "folder" : "browser", d$ = (e, t) => {
|
|
43094
43098
|
if (e === "source") {
|
|
43095
43099
|
if (!t) throw Error("a source-backed torrent needs its infohash to name its save path");
|
|
43096
|
-
return
|
|
43100
|
+
return i$(t);
|
|
43097
43101
|
}
|
|
43098
|
-
return e === "folder" ? t ?
|
|
43099
|
-
},
|
|
43102
|
+
return e === "folder" ? t ? t$(t) : "/dl" : WU(t);
|
|
43103
|
+
}, f$ = ({ current: e, intended: t, complete: n, folderReady: r }) => e === "source" || t === "source" || e === t ? {
|
|
43100
43104
|
move: !1,
|
|
43101
43105
|
reason: "settled"
|
|
43102
43106
|
} : r ? t === "folder" && !n ? {
|
|
@@ -43108,7 +43112,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43108
43112
|
} : {
|
|
43109
43113
|
move: !1,
|
|
43110
43114
|
reason: "no-folder"
|
|
43111
|
-
},
|
|
43115
|
+
}, p$ = (e, t, n) => e.move || e.reason === "settled" ? null : e.reason === "incomplete" ? t === void 0 ? n.formatMessage({
|
|
43112
43116
|
id: "Moves to your folder when it finishes",
|
|
43113
43117
|
defaultMessage: "Moves to your folder when it finishes"
|
|
43114
43118
|
}) : n.formatMessage({
|
|
@@ -43120,24 +43124,24 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43120
43124
|
}) : n.formatMessage({
|
|
43121
43125
|
id: "Waiting for access to {folder}",
|
|
43122
43126
|
defaultMessage: "Waiting for access to {folder}"
|
|
43123
|
-
}, { folder: t }),
|
|
43127
|
+
}, { folder: t }), m$ = async (e, t, n) => {
|
|
43124
43128
|
let r = e;
|
|
43125
43129
|
for (let e of t.split("/").filter(Boolean)) r = await r.getDirectoryHandle(e, { create: n });
|
|
43126
43130
|
return r;
|
|
43127
|
-
},
|
|
43131
|
+
}, h$ = async (e, t, n) => {
|
|
43128
43132
|
let r = t.split("/").filter(Boolean), i = r.pop();
|
|
43129
43133
|
if (!i) throw Error("move: empty file path");
|
|
43130
|
-
return (await
|
|
43131
|
-
},
|
|
43134
|
+
return (await m$(e, r.join("/"), n)).getFileHandle(i, { create: n });
|
|
43135
|
+
}, g$ = async ({ torrent: e, folder: t, opfsRoot: n, onProgress: r }) => {
|
|
43132
43136
|
if (!e.infoHash) throw Error("move: a torrent with no infohash has nowhere to go");
|
|
43133
|
-
let i = Aq(e.files), a =
|
|
43137
|
+
let i = Aq(e.files), a = d$("browser", e.infoHash), o = 0;
|
|
43134
43138
|
for (let [e, s] of i.entries()) {
|
|
43135
43139
|
r?.({
|
|
43136
43140
|
file: e,
|
|
43137
43141
|
files: i.length,
|
|
43138
43142
|
name: s.name
|
|
43139
43143
|
});
|
|
43140
|
-
let c = await
|
|
43144
|
+
let c = await h$(t, s.name, !1), l = await h$(await m$(n, a, !0), s.name, !0);
|
|
43141
43145
|
if ((await l.getFile()).size === s.size) continue;
|
|
43142
43146
|
let u = await l.createWritable();
|
|
43143
43147
|
try {
|
|
@@ -43147,24 +43151,24 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43147
43151
|
}
|
|
43148
43152
|
}
|
|
43149
43153
|
return o;
|
|
43150
|
-
},
|
|
43151
|
-
if (r === "folder" ? await
|
|
43154
|
+
}, _$ = async ({ client: e, torrent: t, folder: n, to: r, opfsRoot: i, onProgress: a }) => TU(async () => {
|
|
43155
|
+
if (r === "folder" ? await WQ(e, t, n) : await g$({
|
|
43152
43156
|
torrent: t,
|
|
43153
43157
|
folder: n,
|
|
43154
43158
|
opfsRoot: i ?? await navigator.storage.getDirectory(),
|
|
43155
43159
|
onProgress: a
|
|
43156
43160
|
}), !t.infoHash) throw Error("the torrent has no info hash, so the move cannot be finished safely");
|
|
43157
43161
|
e.relocate(t.infoHash, r);
|
|
43158
|
-
}),
|
|
43162
|
+
}), v$ = /^[0-9a-f]{40}$/, y$ = /^[0-9a-f]{64}$/, b$ = 300, x$ = (e) => {
|
|
43159
43163
|
let t = rD(e, "xl");
|
|
43160
43164
|
if (!t) return;
|
|
43161
43165
|
let n = Number(t);
|
|
43162
43166
|
return Number.isSafeInteger(n) && n > 0 ? n : void 0;
|
|
43163
|
-
},
|
|
43167
|
+
}, S$ = (e) => (e.match(/[?&]tr=/g) ?? []).length, C$ = (e) => {
|
|
43164
43168
|
if (!e) return;
|
|
43165
43169
|
let t = e.replace(/[\u0000-\u001f\u007f-\u009f\u200b-\u200f\u2028-\u202e\u2066-\u2069]/g, "").trim();
|
|
43166
|
-
if (t) return t.length >
|
|
43167
|
-
},
|
|
43170
|
+
if (t) return t.length > b$ ? t.slice(0, b$) + "…" : t;
|
|
43171
|
+
}, w$ = ({ magnet: e, name: t }) => {
|
|
43168
43172
|
if (!e) return {
|
|
43169
43173
|
ok: !1,
|
|
43170
43174
|
problem: Q.formatMessage({
|
|
@@ -43180,7 +43184,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43180
43184
|
})
|
|
43181
43185
|
};
|
|
43182
43186
|
let n = $E(e);
|
|
43183
|
-
return n ? !
|
|
43187
|
+
return n ? !v$.test(n) && !y$.test(n) ? {
|
|
43184
43188
|
ok: !1,
|
|
43185
43189
|
problem: Q.formatMessage({
|
|
43186
43190
|
id: "This magnet link's info hash is malformed.",
|
|
@@ -43190,9 +43194,9 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43190
43194
|
ok: !0,
|
|
43191
43195
|
magnet: e,
|
|
43192
43196
|
infoHash: n,
|
|
43193
|
-
name:
|
|
43194
|
-
trackers:
|
|
43195
|
-
sizeBytes:
|
|
43197
|
+
name: C$(rD(e, "dn")) ?? C$(t) ?? n,
|
|
43198
|
+
trackers: S$(e),
|
|
43199
|
+
sizeBytes: x$(e)
|
|
43196
43200
|
} : {
|
|
43197
43201
|
ok: !1,
|
|
43198
43202
|
problem: Q.formatMessage({
|
|
@@ -43200,35 +43204,35 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43200
43204
|
defaultMessage: "This magnet link has no info hash."
|
|
43201
43205
|
})
|
|
43202
43206
|
};
|
|
43203
|
-
},
|
|
43207
|
+
}, T$ = "ripple:add-dialog", E$ = ({ fileCount: e, location: t }) => ({
|
|
43204
43208
|
files: Array.from({ length: e }, (e, t) => t),
|
|
43205
43209
|
location: t,
|
|
43206
43210
|
start: !0,
|
|
43207
43211
|
sequential: !1,
|
|
43208
43212
|
firstLast: !1,
|
|
43209
43213
|
topOfQueue: !1
|
|
43210
|
-
}),
|
|
43214
|
+
}), D$ = (e) => {
|
|
43211
43215
|
try {
|
|
43212
|
-
return e(
|
|
43216
|
+
return e(T$) === "1";
|
|
43213
43217
|
} catch {
|
|
43214
43218
|
return !1;
|
|
43215
43219
|
}
|
|
43216
|
-
},
|
|
43220
|
+
}, O$ = (e, t) => ({
|
|
43217
43221
|
wanted: e.files.length === t ? void 0 : [...e.files].sort((e, t) => e - t),
|
|
43218
43222
|
firstLast: e.firstLast
|
|
43219
|
-
}),
|
|
43223
|
+
}), k$ = (e) => [e.sequential ? aD.sequentialDownload : 0, aD.sequentialDownload], A$ = (e) => e.files.length === 0 ? Q.formatMessage({
|
|
43220
43224
|
id: "Choose at least one file.",
|
|
43221
43225
|
defaultMessage: "Choose at least one file."
|
|
43222
|
-
}) : null,
|
|
43226
|
+
}) : null, j$ = (e, t) => e.files.reduce((e, n) => e + (t[n]?.size ?? 0), 0), M$ = (e, t) => ({
|
|
43223
43227
|
...e,
|
|
43224
43228
|
files: e.files.includes(t) ? e.files.filter((e) => e !== t) : [...e.files, t].sort((e, t) => e - t)
|
|
43225
|
-
}),
|
|
43229
|
+
}), N$ = (e, t) => ({
|
|
43226
43230
|
...e,
|
|
43227
43231
|
files: Array.from({ length: t }, (e, t) => t)
|
|
43228
|
-
}),
|
|
43232
|
+
}), P$ = (e) => ({
|
|
43229
43233
|
...e,
|
|
43230
43234
|
files: []
|
|
43231
|
-
}),
|
|
43235
|
+
}), F$ = G`
|
|
43232
43236
|
width: 100%;
|
|
43233
43237
|
display: flex;
|
|
43234
43238
|
align-items: center;
|
|
@@ -43448,14 +43452,14 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43448
43452
|
|
|
43449
43453
|
&.small { padding: 5px 12px; font-size: 0.78rem; }
|
|
43450
43454
|
}
|
|
43451
|
-
`,
|
|
43455
|
+
`, I$ = ({ path: e }) => {
|
|
43452
43456
|
let t = e.lastIndexOf("/");
|
|
43453
43457
|
return t < 0 ? /* @__PURE__ */ K(zc, { children: e }) : /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K("span", {
|
|
43454
43458
|
className: "dir",
|
|
43455
43459
|
children: e.slice(0, t + 1)
|
|
43456
43460
|
}), e.slice(t + 1)] });
|
|
43457
|
-
},
|
|
43458
|
-
let m = ci(), h = (0, y.useRef)(null), [g, _] = (0, y.useState)(!1), v = n.length > 0, b = v ?
|
|
43461
|
+
}, L$ = ({ name: e, from: t, files: n, choices: r, onChoices: i, folderName: a, folderReady: o, external: s, onConfirm: c, onCancel: l, onNeverAsk: u, storage: d, persist: f, onAskPersist: p }) => {
|
|
43462
|
+
let m = ci(), h = (0, y.useRef)(null), [g, _] = (0, y.useState)(!1), v = n.length > 0, b = v ? A$(r) : null, x = n.reduce((e, t) => e + t.size, 0), S = j$(r, n), C = d ? Math.max(0, d.limitBytes - d.usedBytes) : null, w = C !== null && S > C ? { room: C } : null, T = (e) => i({
|
|
43459
43463
|
...r,
|
|
43460
43464
|
...e
|
|
43461
43465
|
});
|
|
@@ -43464,7 +43468,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43464
43468
|
onClose: l,
|
|
43465
43469
|
initialFocus: h,
|
|
43466
43470
|
children: /* @__PURE__ */ K("div", {
|
|
43467
|
-
css:
|
|
43471
|
+
css: F$,
|
|
43468
43472
|
children: /* @__PURE__ */ q("div", {
|
|
43469
43473
|
className: "card",
|
|
43470
43474
|
children: [
|
|
@@ -43496,7 +43500,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43496
43500
|
children: [
|
|
43497
43501
|
/* @__PURE__ */ K("button", {
|
|
43498
43502
|
className: "small",
|
|
43499
|
-
onClick: () => i(
|
|
43503
|
+
onClick: () => i(N$(r, n.length)),
|
|
43500
43504
|
children: m.formatMessage({
|
|
43501
43505
|
id: "Select all",
|
|
43502
43506
|
defaultMessage: "Select all"
|
|
@@ -43504,7 +43508,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43504
43508
|
}),
|
|
43505
43509
|
/* @__PURE__ */ K("button", {
|
|
43506
43510
|
className: "small",
|
|
43507
|
-
onClick: () => i(
|
|
43511
|
+
onClick: () => i(P$(r)),
|
|
43508
43512
|
children: m.formatMessage({
|
|
43509
43513
|
id: "Select none",
|
|
43510
43514
|
defaultMessage: "Select none"
|
|
@@ -43533,11 +43537,11 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43533
43537
|
/* @__PURE__ */ K("input", {
|
|
43534
43538
|
type: "checkbox",
|
|
43535
43539
|
checked: n,
|
|
43536
|
-
onChange: () => i(
|
|
43540
|
+
onChange: () => i(M$(r, t))
|
|
43537
43541
|
}),
|
|
43538
43542
|
/* @__PURE__ */ K("span", {
|
|
43539
43543
|
className: "path",
|
|
43540
|
-
children: /* @__PURE__ */ K(
|
|
43544
|
+
children: /* @__PURE__ */ K(I$, { path: e.name })
|
|
43541
43545
|
}),
|
|
43542
43546
|
/* @__PURE__ */ K("span", {
|
|
43543
43547
|
className: "size",
|
|
@@ -43663,7 +43667,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43663
43667
|
selected: NE(S, !0),
|
|
43664
43668
|
free: NE(w.room, !0)
|
|
43665
43669
|
}) }),
|
|
43666
|
-
f && p && /* @__PURE__ */ K(
|
|
43670
|
+
f && p && /* @__PURE__ */ K(FQ, {
|
|
43667
43671
|
persist: f,
|
|
43668
43672
|
onAsk: p
|
|
43669
43673
|
})
|
|
@@ -43706,7 +43710,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43706
43710
|
})
|
|
43707
43711
|
})
|
|
43708
43712
|
});
|
|
43709
|
-
},
|
|
43713
|
+
}, R$ = G`
|
|
43710
43714
|
color: ${X};
|
|
43711
43715
|
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
43712
43716
|
max-width: min(460px, calc(100vw - 32px));
|
|
@@ -43884,7 +43888,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43884
43888
|
}
|
|
43885
43889
|
}
|
|
43886
43890
|
}
|
|
43887
|
-
`,
|
|
43891
|
+
`, z$ = ({ title: e, subject: t, value: n, note: r, onCancel: i, onApply: a }) => {
|
|
43888
43892
|
let o = ci(), [s, c] = (0, y.useState)(() => _D(n)), [l, u] = (0, y.useState)(() => !(typeof n == "number" && n > 0)), d = (0, y.useRef)(null), f = (0, y.useMemo)(() => l ? 0 : gD(s), [l, s]), p = f === null ? o.formatMessage({
|
|
43889
43893
|
id: "Enter a speed in kB/s, or tick Unlimited.",
|
|
43890
43894
|
defaultMessage: "Enter a speed in kB/s, or tick Unlimited."
|
|
@@ -43896,7 +43900,7 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43896
43900
|
onClose: i,
|
|
43897
43901
|
initialFocus: d,
|
|
43898
43902
|
children: /* @__PURE__ */ K("div", {
|
|
43899
|
-
css:
|
|
43903
|
+
css: R$,
|
|
43900
43904
|
children: /* @__PURE__ */ q("div", {
|
|
43901
43905
|
className: "card",
|
|
43902
43906
|
children: [
|
|
@@ -43988,23 +43992,23 @@ var nq = "m", rq = "magnet", iq = [
|
|
|
43988
43992
|
})
|
|
43989
43993
|
})
|
|
43990
43994
|
});
|
|
43991
|
-
},
|
|
43995
|
+
}, B$ = null;
|
|
43992
43996
|
typeof window < "u" && (window.addEventListener("beforeinstallprompt", (e) => {
|
|
43993
|
-
e.preventDefault(),
|
|
43997
|
+
e.preventDefault(), B$ = e;
|
|
43994
43998
|
}), window.addEventListener("appinstalled", () => {
|
|
43995
|
-
|
|
43999
|
+
B$ = null;
|
|
43996
44000
|
}));
|
|
43997
|
-
var
|
|
44001
|
+
var V$ = () => window.location.origin + "/?magnet=%s", H$ = () => typeof window < "u" && !!window.matchMedia?.("(display-mode: standalone)").matches || typeof navigator < "u" && navigator.standalone === !0, U$ = () => {
|
|
43998
44002
|
if (typeof navigator > "u" || typeof navigator.registerProtocolHandler != "function") return !1;
|
|
43999
44003
|
try {
|
|
44000
|
-
return navigator.registerProtocolHandler("magnet",
|
|
44004
|
+
return navigator.registerProtocolHandler("magnet", V$()), !0;
|
|
44001
44005
|
} catch {
|
|
44002
44006
|
return !1;
|
|
44003
44007
|
}
|
|
44004
|
-
},
|
|
44005
|
-
let e =
|
|
44008
|
+
}, W$ = async () => {
|
|
44009
|
+
let e = B$;
|
|
44006
44010
|
if (!e) return "unavailable";
|
|
44007
|
-
|
|
44011
|
+
B$ = null;
|
|
44008
44012
|
try {
|
|
44009
44013
|
await e.prompt();
|
|
44010
44014
|
let { outcome: t } = await e.userChoice;
|
|
@@ -44012,7 +44016,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44012
44016
|
} catch {
|
|
44013
44017
|
return "unavailable";
|
|
44014
44018
|
}
|
|
44015
|
-
},
|
|
44019
|
+
}, G$ = async () => B$ && await W$() === "accepted" ? "installed" : U$() ? "magnet-registered" : H$() ? "already-installed" : "unsupported", K$ = G`
|
|
44016
44020
|
width: 100%;
|
|
44017
44021
|
display: flex;
|
|
44018
44022
|
align-items: center;
|
|
@@ -44441,7 +44445,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44441
44445
|
@media (max-width: 700px) {
|
|
44442
44446
|
.opt > label { min-width: 0; }
|
|
44443
44447
|
}
|
|
44444
|
-
`,
|
|
44448
|
+
`, q$ = (e) => e.split("/").pop() || e, J$ = ({ torrent: e, dragging: t, onMagnet: n, onFiles: r, onClear: i, onClose: a, onToast: o }) => {
|
|
44445
44449
|
let s = ci(), [c, l] = (0, y.useState)("download"), [u, d] = (0, y.useState)(""), [f, p] = (0, y.useState)(!1), m = (0, y.useRef)(null), h = e?.files, g = h?.length ?? 0, _ = e?.fileCount ?? 0, [v, b] = (0, y.useState)(null), [x, S] = (0, y.useState)(null);
|
|
44446
44450
|
(0, y.useEffect)(() => {
|
|
44447
44451
|
b(null), S(null);
|
|
@@ -44464,7 +44468,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44464
44468
|
T,
|
|
44465
44469
|
_,
|
|
44466
44470
|
x
|
|
44467
|
-
]), O = c === "download" && g > 0 && T.length === 0, k = (D && !O ?
|
|
44471
|
+
]), O = c === "download" && g > 0 && T.length === 0, k = (D && !O ? BZ(D) : "") ?? "", A = (D && !O ? zZ(D) : "") ?? "", j = (D && !O ? VZ(D) : "") ?? "", M = (e, t, n) => {
|
|
44468
44472
|
navigator.clipboard.writeText(e).then(() => o(t)).catch(() => o(n));
|
|
44469
44473
|
}, N = (e) => b((t) => {
|
|
44470
44474
|
let n = new Set(t ?? [...Array(g).keys()]);
|
|
@@ -44481,7 +44485,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44481
44485
|
onClose: a,
|
|
44482
44486
|
initialFocus: m,
|
|
44483
44487
|
children: /* @__PURE__ */ K("div", {
|
|
44484
|
-
css:
|
|
44488
|
+
css: K$,
|
|
44485
44489
|
children: /* @__PURE__ */ q("div", {
|
|
44486
44490
|
className: "card",
|
|
44487
44491
|
children: [
|
|
@@ -44566,7 +44570,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44566
44570
|
id: "{name} · {size}",
|
|
44567
44571
|
defaultMessage: "{name} · {size}"
|
|
44568
44572
|
}, {
|
|
44569
|
-
name:
|
|
44573
|
+
name: q$(e.name),
|
|
44570
44574
|
size: NE(e.size)
|
|
44571
44575
|
})
|
|
44572
44576
|
}, e.index))
|
|
@@ -44616,7 +44620,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44616
44620
|
}),
|
|
44617
44621
|
/* @__PURE__ */ K("span", {
|
|
44618
44622
|
className: "name",
|
|
44619
|
-
children:
|
|
44623
|
+
children: q$(e.name)
|
|
44620
44624
|
}),
|
|
44621
44625
|
/* @__PURE__ */ K("span", {
|
|
44622
44626
|
className: "size",
|
|
@@ -44787,11 +44791,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44787
44791
|
})
|
|
44788
44792
|
})
|
|
44789
44793
|
});
|
|
44790
|
-
},
|
|
44794
|
+
}, Y$ = [
|
|
44791
44795
|
"udp://tracker.opentrackr.org:1337/announce",
|
|
44792
44796
|
"udp://explodie.org:6969/announce",
|
|
44793
44797
|
"udp://tracker.torrent.eu.org:451/announce"
|
|
44794
|
-
],
|
|
44798
|
+
], X$ = ({ name: e, trackers: t, webSeeds: n = [], private: r, pieceLength: i, format: a = "v1" }) => {
|
|
44795
44799
|
if (a !== "v1" && a !== "hybrid" && a !== "v2") return Q.formatMessage({
|
|
44796
44800
|
id: "{format} is not a torrent format",
|
|
44797
44801
|
defaultMessage: "{format} is not a torrent format"
|
|
@@ -44821,7 +44825,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44821
44825
|
id: "That piece size is not one a torrent can use",
|
|
44822
44826
|
defaultMessage: "That piece size is not one a torrent can use"
|
|
44823
44827
|
}) : null;
|
|
44824
|
-
},
|
|
44828
|
+
}, Z$ = (e, t) => e.map((e) => e.trim()).filter(Boolean).map((e) => t ? e.replace(/\/+$/, "") : e.endsWith("/") ? e : e + "/"), Q$ = async ({ picked: e, hashed: t, options: n, single: r }) => {
|
|
44825
44829
|
let i = n.format ?? "v1", a = mJ({
|
|
44826
44830
|
name: n.name,
|
|
44827
44831
|
files: e.map(({ path: e, size: t }) => ({
|
|
@@ -44836,7 +44840,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44836
44840
|
pieces: t.pieces,
|
|
44837
44841
|
fileHashes: t.fileHashes,
|
|
44838
44842
|
trackers: o,
|
|
44839
|
-
webSeeds:
|
|
44843
|
+
webSeeds: Z$(n.webSeeds ?? [], r),
|
|
44840
44844
|
private: n.private,
|
|
44841
44845
|
source: n.source,
|
|
44842
44846
|
comment: n.comment
|
|
@@ -44877,46 +44881,46 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44877
44881
|
size: e.size
|
|
44878
44882
|
}))
|
|
44879
44883
|
};
|
|
44880
|
-
},
|
|
44884
|
+
}, $$ = 16384, e1 = /* @__PURE__ */ new Uint8Array(32), t1 = async (e) => new Uint8Array(await crypto.subtle.digest("SHA-256", new Uint8Array(e).buffer)), n1 = (e, t) => {
|
|
44881
44885
|
let n = /* @__PURE__ */ new Uint8Array(64);
|
|
44882
44886
|
return n.set(e, 0), n.set(t, 32), n;
|
|
44883
|
-
},
|
|
44887
|
+
}, r1 = (e) => Math.max(1, Math.floor(e / $$)), i1 = (e) => {
|
|
44884
44888
|
let t = 1;
|
|
44885
44889
|
for (; t < e;) t *= 2;
|
|
44886
44890
|
return t;
|
|
44887
|
-
},
|
|
44888
|
-
let n = Math.ceil(e /
|
|
44889
|
-
return n <= 0 ? 0 : e <= t ?
|
|
44890
|
-
}, a1 = async (e) => {
|
|
44891
|
-
let t = $$;
|
|
44892
|
-
for (let n = 0; n < e; n++) t = await e1(t1(t, t));
|
|
44893
|
-
return t;
|
|
44891
|
+
}, a1 = (e, t) => {
|
|
44892
|
+
let n = Math.ceil(e / $$);
|
|
44893
|
+
return n <= 0 ? 0 : e <= t ? i1(n) : Math.ceil(e / t) * r1(t);
|
|
44894
44894
|
}, o1 = async (e) => {
|
|
44895
|
+
let t = e1;
|
|
44896
|
+
for (let n = 0; n < e; n++) t = await t1(n1(t, t));
|
|
44897
|
+
return t;
|
|
44898
|
+
}, s1 = async (e) => {
|
|
44895
44899
|
let t = [];
|
|
44896
|
-
for (let n = 0; n < e.length; n += 2) t.push(await
|
|
44900
|
+
for (let n = 0; n < e.length; n += 2) t.push(await t1(n1(e[n], e[n + 1])));
|
|
44897
44901
|
return t;
|
|
44898
|
-
},
|
|
44902
|
+
}, c1 = async (e, t, n) => {
|
|
44899
44903
|
if (t <= 0 || !e.length) return {
|
|
44900
44904
|
root: null,
|
|
44901
44905
|
layer: []
|
|
44902
44906
|
};
|
|
44903
|
-
let r =
|
|
44907
|
+
let r = a1(t, n);
|
|
44904
44908
|
if (e.length > r) throw Error(`merkle: ${e.length} leaves for a file of ${t} bytes that wants at most ${r}`);
|
|
44905
44909
|
let i = [...e];
|
|
44906
|
-
for (; i.length < r;) i.push(
|
|
44907
|
-
let a =
|
|
44908
|
-
for (; i.length > 1 && 1 << o < a;) i = await
|
|
44909
|
-
let s = t > n ? [...i] : [], c = await
|
|
44910
|
-
for (; i.length > 1;) i.length % 2 && (i = [...i, c]), i = await
|
|
44910
|
+
for (; i.length < r;) i.push(e1);
|
|
44911
|
+
let a = r1(n), o = 0;
|
|
44912
|
+
for (; i.length > 1 && 1 << o < a;) i = await s1(i), o += 1;
|
|
44913
|
+
let s = t > n ? [...i] : [], c = await o1(o);
|
|
44914
|
+
for (; i.length > 1;) i.length % 2 && (i = [...i, c]), i = await s1(i), c = await t1(n1(c, c));
|
|
44911
44915
|
return {
|
|
44912
44916
|
root: i[0],
|
|
44913
44917
|
layer: s
|
|
44914
44918
|
};
|
|
44915
|
-
},
|
|
44919
|
+
}, l1 = 4194304, u1 = class extends Error {
|
|
44916
44920
|
constructor() {
|
|
44917
44921
|
super("hashing cancelled"), this.name = "HashCancelled";
|
|
44918
44922
|
}
|
|
44919
|
-
},
|
|
44923
|
+
}, d1 = async (e) => new Uint8Array(await crypto.subtle.digest("SHA-1", new Uint8Array(e).buffer)), f1 = async (e, t, { signal: n, onProgress: r, maxReadBytes: i = l1 } = {}) => {
|
|
44920
44924
|
let a = nJ(e.format), o = tJ(e.format), s = new Uint8Array(a ? e.pieceCount * 20 : 0), c = [];
|
|
44921
44925
|
if (!e.pieceCount) {
|
|
44922
44926
|
if (o) for (let t = 0; t < uJ(e).length; t++) c.push({
|
|
@@ -44929,7 +44933,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44929
44933
|
};
|
|
44930
44934
|
}
|
|
44931
44935
|
let l = new Uint8Array(a ? e.pieceLength : 0), u = 0, d = 0, f = 0, p = e.files[0].path.join("/"), m = () => {
|
|
44932
|
-
if (n?.aborted) throw new
|
|
44936
|
+
if (n?.aborted) throw new u1();
|
|
44933
44937
|
}, h = () => r?.({
|
|
44934
44938
|
hashedBytes: f,
|
|
44935
44939
|
totalBytes: e.totalBytes,
|
|
@@ -44938,15 +44942,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44938
44942
|
path: p
|
|
44939
44943
|
}), g = async (e) => {
|
|
44940
44944
|
if (a) {
|
|
44941
|
-
let t = await
|
|
44945
|
+
let t = await d1(l.subarray(0, e));
|
|
44942
44946
|
s.set(t, d * 20);
|
|
44943
44947
|
}
|
|
44944
44948
|
d += 1, u = 0, h();
|
|
44945
|
-
}, _ = new Uint8Array(o ?
|
|
44949
|
+
}, _ = new Uint8Array(o ? $$ : 0), v = 0, y = [], b = async (e) => {
|
|
44946
44950
|
let t = 0;
|
|
44947
44951
|
for (; t < e.length;) {
|
|
44948
|
-
let n = Math.min(
|
|
44949
|
-
_.set(e.subarray(t, t + n), v), v += n, t += n, v === 16384 && (y.push(await
|
|
44952
|
+
let n = Math.min($$ - v, e.length - t);
|
|
44953
|
+
_.set(e.subarray(t, t + n), v), v += n, t += n, v === 16384 && (y.push(await t1(_)), v = 0);
|
|
44950
44954
|
}
|
|
44951
44955
|
};
|
|
44952
44956
|
m();
|
|
@@ -44968,7 +44972,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44968
44972
|
if (c.length !== s) throw Error(`${p} gave ${c.length} bytes of the ${s} at ${r}: the file changed while it was being read`);
|
|
44969
44973
|
a && l.set(c, u), o && await b(c), u += s, r += s, f += s, a && u === e.pieceLength ? await g(e.pieceLength) : a || h();
|
|
44970
44974
|
}
|
|
44971
|
-
o && (v > 0 && y.push(await
|
|
44975
|
+
o && (v > 0 && y.push(await t1(_.subarray(0, v))), c.push(await c1(y, n.size, e.pieceLength)));
|
|
44972
44976
|
}
|
|
44973
44977
|
if (a && u > 0 && await g(u), a && d !== e.pieceCount) throw Error(`hashed ${d} pieces where the plan wanted ${e.pieceCount}: the files no longer add up to ${e.paddedBytes} bytes`);
|
|
44974
44978
|
if (o && c.length !== uJ(e).length) throw Error(`built ${c.length} merkle trees for ${uJ(e).length} files`);
|
|
@@ -44976,11 +44980,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
44976
44980
|
pieces: s,
|
|
44977
44981
|
fileHashes: c
|
|
44978
44982
|
};
|
|
44979
|
-
},
|
|
44983
|
+
}, p1 = (e, t) => {
|
|
44980
44984
|
if (t < 1e3 || e.hashedBytes <= 0) return;
|
|
44981
44985
|
let n = e.hashedBytes / (t / 1e3);
|
|
44982
44986
|
if (!(n <= 0)) return Math.round((e.totalBytes - e.hashedBytes) / n);
|
|
44983
|
-
},
|
|
44987
|
+
}, m1 = G`
|
|
44984
44988
|
color: ${X};
|
|
44985
44989
|
width: 100%;
|
|
44986
44990
|
max-width: min(560px, calc(100vw - 32px));
|
|
@@ -45129,18 +45133,18 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45129
45133
|
.grow { flex: 1; }
|
|
45130
45134
|
.skipped { max-height: 8rem; overflow-y: auto; font-size: 0.8rem; color: ${XT}; }
|
|
45131
45135
|
code { font-size: 0.8rem; word-break: break-all; }
|
|
45132
|
-
`,
|
|
45136
|
+
`, h1 = (() => {
|
|
45133
45137
|
let e = [];
|
|
45134
45138
|
for (let t = rJ; t <= iJ; t *= 2) e.push(t);
|
|
45135
45139
|
return e;
|
|
45136
|
-
})(),
|
|
45140
|
+
})(), g1 = (e, t) => e >= 1048576 ? t.formatMessage({
|
|
45137
45141
|
id: "{size} MiB",
|
|
45138
45142
|
defaultMessage: "{size} MiB"
|
|
45139
45143
|
}, { size: e / 1048576 }) : t.formatMessage({
|
|
45140
45144
|
id: "{size} KiB",
|
|
45141
45145
|
defaultMessage: "{size} KiB"
|
|
45142
|
-
}, { size: e / 1024 }),
|
|
45143
|
-
let i = ci(), { state: a, suggestedName: o } = e, [s, c] = (0, y.useState)(""), [l, u] = (0, y.useState)(
|
|
45146
|
+
}, { size: e / 1024 }), _1 = ({ create: e, onClose: t, onShare: n, onToast: r }) => {
|
|
45147
|
+
let i = ci(), { state: a, suggestedName: o } = e, [s, c] = (0, y.useState)(""), [l, u] = (0, y.useState)(Y$.join("\n")), [d, f] = (0, y.useState)(!1), [p, m] = (0, y.useState)(""), [h, g] = (0, y.useState)(""), [_, v] = (0, y.useState)(""), [b, x] = (0, y.useState)(""), [S, C] = (0, y.useState)("v1"), [w, T] = (0, y.useState)(0), E = (0, y.useRef)(null);
|
|
45144
45148
|
(0, y.useEffect)(() => {
|
|
45145
45149
|
c(o), C("v1"), x(""), T(0);
|
|
45146
45150
|
}, [o]), (0, y.useEffect)(() => {
|
|
@@ -45168,7 +45172,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45168
45172
|
pieceLength: b ? Number(b) : void 0,
|
|
45169
45173
|
format: S,
|
|
45170
45174
|
...t
|
|
45171
|
-
}), k = a.stage === "reading" || a.stage === "hashing" || a.stage === "checking" || a.stage === "copying" || a.stage === "adding", A = a.progress && w ?
|
|
45175
|
+
}), k = a.stage === "reading" || a.stage === "hashing" || a.stage === "checking" || a.stage === "copying" || a.stage === "adding", A = a.progress && w ? p1(a.progress, Date.now() - w) : void 0, j = a.progress ? a.progress.hashedBytes / Math.max(1, a.progress.totalBytes) : 0, M = a.copy ? a.copy.copiedBytes / Math.max(1, a.copy.totalBytes) : 0, N = i.formatMessage({
|
|
45172
45176
|
id: "starting…",
|
|
45173
45177
|
defaultMessage: "starting…"
|
|
45174
45178
|
});
|
|
@@ -45177,7 +45181,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45177
45181
|
onClose: k ? e.cancel : t,
|
|
45178
45182
|
initialFocus: E,
|
|
45179
45183
|
children: /* @__PURE__ */ K("div", {
|
|
45180
|
-
css:
|
|
45184
|
+
css: m1,
|
|
45181
45185
|
children: /* @__PURE__ */ q("div", {
|
|
45182
45186
|
className: "card",
|
|
45183
45187
|
children: [
|
|
@@ -45318,10 +45322,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45318
45322
|
children: i.formatMessage({
|
|
45319
45323
|
id: "Auto ({size})",
|
|
45320
45324
|
defaultMessage: "Auto ({size})"
|
|
45321
|
-
}, { size:
|
|
45322
|
-
}),
|
|
45325
|
+
}, { size: g1(a.plan.pieceLength, i) })
|
|
45326
|
+
}), h1.map((e) => /* @__PURE__ */ K("option", {
|
|
45323
45327
|
value: e,
|
|
45324
|
-
children:
|
|
45328
|
+
children: g1(e, i)
|
|
45325
45329
|
}, e))]
|
|
45326
45330
|
})]
|
|
45327
45331
|
}),
|
|
@@ -45673,19 +45677,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45673
45677
|
})
|
|
45674
45678
|
})
|
|
45675
45679
|
});
|
|
45676
|
-
},
|
|
45680
|
+
}, v1 = 1e9, y1 = (e) => !Number.isFinite(e) || e <= 0 ? 0 : Math.min(v1, Math.floor(e * .1)), b1 = (e) => {
|
|
45677
45681
|
let t = new TextEncoder();
|
|
45678
45682
|
for (let n of e) for (let e of n.split("/")) if (t.encode(e).length > 240) return e;
|
|
45679
45683
|
return null;
|
|
45680
|
-
},
|
|
45684
|
+
}, x1 = ({ totalBytes: e, usedBytes: t, limitBytes: n }) => {
|
|
45681
45685
|
if (!Number.isFinite(n) || n <= 0 || !Number.isFinite(t) || t < 0) return { kind: "unknown" };
|
|
45682
|
-
let r = n - t -
|
|
45686
|
+
let r = n - t - y1(n);
|
|
45683
45687
|
return e <= r ? { kind: "fits" } : {
|
|
45684
45688
|
kind: "short",
|
|
45685
45689
|
shortBy: e - r
|
|
45686
45690
|
};
|
|
45687
|
-
},
|
|
45688
|
-
let n =
|
|
45691
|
+
}, S1 = async (e, t = []) => {
|
|
45692
|
+
let n = b1(t);
|
|
45689
45693
|
if (n) return {
|
|
45690
45694
|
kind: "unsafe",
|
|
45691
45695
|
element: n
|
|
@@ -45693,7 +45697,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45693
45697
|
try {
|
|
45694
45698
|
await SX.getDirectory();
|
|
45695
45699
|
let { usage: t, quota: n } = await SX.estimate();
|
|
45696
|
-
return t === void 0 ? { kind: "unknown" } :
|
|
45700
|
+
return t === void 0 ? { kind: "unknown" } : x1({
|
|
45697
45701
|
totalBytes: e,
|
|
45698
45702
|
usedBytes: t,
|
|
45699
45703
|
limitBytes: n ?? 0
|
|
@@ -45701,19 +45705,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45701
45705
|
} catch {
|
|
45702
45706
|
return { kind: "unknown" };
|
|
45703
45707
|
}
|
|
45704
|
-
},
|
|
45708
|
+
}, C1 = async (e, t) => {
|
|
45705
45709
|
let n = e;
|
|
45706
45710
|
for (let e of t.split("/").filter(Boolean)) n = await n.getDirectoryHandle(e, { create: !0 });
|
|
45707
45711
|
return n;
|
|
45708
|
-
},
|
|
45712
|
+
}, w1 = async (e, t) => {
|
|
45709
45713
|
let n = t.split("/").filter(Boolean), r = n.pop();
|
|
45710
45714
|
if (!r) throw Error("copy: empty file path");
|
|
45711
|
-
return (await
|
|
45712
|
-
},
|
|
45715
|
+
return (await C1(e, n.join("/"))).getFileHandle(r, { create: !0 });
|
|
45716
|
+
}, T1 = async (e) => {
|
|
45713
45717
|
let t = await RJ(e.bytes);
|
|
45714
45718
|
if (!t) throw Error("the torrent that was just built could not be read back");
|
|
45715
45719
|
if (!t.files) throw Error("the torrent that was just built lists no files");
|
|
45716
|
-
let n =
|
|
45720
|
+
let n = b1(t.files.map((e) => e.name));
|
|
45717
45721
|
if (n) throw Error(`${n.slice(0, 40)}... is too long a name for the engine to keep`);
|
|
45718
45722
|
return t.files.map((t) => {
|
|
45719
45723
|
let n = e.handles[t.index];
|
|
@@ -45724,8 +45728,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45724
45728
|
ref: n
|
|
45725
45729
|
};
|
|
45726
45730
|
});
|
|
45727
|
-
},
|
|
45728
|
-
let i = await
|
|
45731
|
+
}, E1 = async ({ built: e, opfsRoot: t, signal: n, onProgress: r }) => {
|
|
45732
|
+
let i = await T1(e), a = WU(e.infoHash), o = await C1(t ?? await navigator.storage.getDirectory(), a), s = i.reduce((e, t) => e + t.size, 0), c = 0;
|
|
45729
45733
|
for (let [e, t] of i.entries()) {
|
|
45730
45734
|
if (n?.aborted) throw new DOMException("the copy was cancelled", "AbortError");
|
|
45731
45735
|
r?.({
|
|
@@ -45735,12 +45739,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45735
45739
|
copiedBytes: c,
|
|
45736
45740
|
totalBytes: s
|
|
45737
45741
|
});
|
|
45738
|
-
let a = await
|
|
45742
|
+
let a = await w1(o, t.path);
|
|
45739
45743
|
if ((await a.getFile()).size === t.size) {
|
|
45740
45744
|
c += t.size;
|
|
45741
45745
|
continue;
|
|
45742
45746
|
}
|
|
45743
|
-
let l = await
|
|
45747
|
+
let l = await JQ(t.ref);
|
|
45744
45748
|
if (l.size !== t.size) throw Error(`${t.path} is now ${l.size} bytes where the torrent describes ${t.size}`);
|
|
45745
45749
|
let u = await a.createWritable();
|
|
45746
45750
|
try {
|
|
@@ -45760,7 +45764,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45760
45764
|
savePath: a,
|
|
45761
45765
|
copiedBytes: c
|
|
45762
45766
|
};
|
|
45763
|
-
},
|
|
45767
|
+
}, D1 = {
|
|
45764
45768
|
stage: "idle",
|
|
45765
45769
|
plan: null,
|
|
45766
45770
|
skipped: [],
|
|
@@ -45772,33 +45776,33 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45772
45776
|
reopenable: null,
|
|
45773
45777
|
room: null,
|
|
45774
45778
|
copy: null
|
|
45775
|
-
},
|
|
45779
|
+
}, O1 = (e) => "ripple:source:" + e, k1 = { mode: "read" }, A1 = async (e) => await e.queryPermission?.call(e, k1) ?? "granted", j1 = async (e) => await e.requestPermission?.call(e, k1) === "granted", M1 = () => typeof window < "u", N1 = (e) => {
|
|
45776
45780
|
try {
|
|
45777
45781
|
return structuredClone(e), !0;
|
|
45778
45782
|
} catch {
|
|
45779
45783
|
return !1;
|
|
45780
45784
|
}
|
|
45781
|
-
},
|
|
45785
|
+
}, P1 = (e) => Q.formatMessage({
|
|
45782
45786
|
id: "{path} changed while it was being read. Try again.",
|
|
45783
45787
|
defaultMessage: "{path} changed while it was being read. Try again."
|
|
45784
|
-
}, { path: e }),
|
|
45785
|
-
files: [await
|
|
45788
|
+
}, { path: e }), F1 = async (e, { signal: t, onFound: n }) => e.kind === "file" ? {
|
|
45789
|
+
files: [await ZQ(e)],
|
|
45786
45790
|
skipped: [],
|
|
45787
45791
|
truncated: !1,
|
|
45788
45792
|
single: !0
|
|
45789
45793
|
} : {
|
|
45790
|
-
...await
|
|
45794
|
+
...await XQ(e, {
|
|
45791
45795
|
signal: t,
|
|
45792
45796
|
onFound: n
|
|
45793
45797
|
}),
|
|
45794
45798
|
single: !1
|
|
45795
|
-
},
|
|
45796
|
-
let [t, n] = (0, y.useState)(
|
|
45799
|
+
}, I1 = (e) => {
|
|
45800
|
+
let [t, n] = (0, y.useState)(D1), [r, i] = (0, y.useState)(""), a = (0, y.useRef)(null), o = (0, y.useRef)(null);
|
|
45797
45801
|
(0, y.useEffect)(() => () => o.current?.abort(), []);
|
|
45798
45802
|
let s = (e) => {
|
|
45799
45803
|
let t = e?.name;
|
|
45800
|
-
if (e instanceof
|
|
45801
|
-
n(
|
|
45804
|
+
if (e instanceof u1 || t === "WalkCancelled" || t === "AbortError") {
|
|
45805
|
+
n(D1);
|
|
45802
45806
|
return;
|
|
45803
45807
|
}
|
|
45804
45808
|
n((t) => ({
|
|
@@ -45815,7 +45819,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45815
45819
|
id: "Every file in there is empty",
|
|
45816
45820
|
defaultMessage: "Every file in there is empty"
|
|
45817
45821
|
}));
|
|
45818
|
-
let i =
|
|
45822
|
+
let i = N1(r);
|
|
45819
45823
|
a.current = {
|
|
45820
45824
|
root: r,
|
|
45821
45825
|
name: t,
|
|
@@ -45832,7 +45836,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45832
45836
|
single: e.single
|
|
45833
45837
|
});
|
|
45834
45838
|
if (n({
|
|
45835
|
-
...
|
|
45839
|
+
...D1,
|
|
45836
45840
|
stage: "ready",
|
|
45837
45841
|
plan: o,
|
|
45838
45842
|
skipped: e.skipped,
|
|
@@ -45841,7 +45845,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45841
45845
|
reopenable: i
|
|
45842
45846
|
}), !i) {
|
|
45843
45847
|
let r = e.single ? [t] : e.files.map((e) => [t, ...e.path].join("/"));
|
|
45844
|
-
|
|
45848
|
+
S1(o.totalBytes, r).then((e) => {
|
|
45845
45849
|
n((t) => t.stage === "ready" ? {
|
|
45846
45850
|
...t,
|
|
45847
45851
|
room: e
|
|
@@ -45851,11 +45855,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45851
45855
|
}, []), l = (0, y.useCallback)((e) => TU(async () => {
|
|
45852
45856
|
let t = new AbortController();
|
|
45853
45857
|
o.current = t, n({
|
|
45854
|
-
...
|
|
45858
|
+
...D1,
|
|
45855
45859
|
stage: "reading"
|
|
45856
45860
|
}), i(e.name);
|
|
45857
45861
|
try {
|
|
45858
|
-
let r = await
|
|
45862
|
+
let r = await F1(e, {
|
|
45859
45863
|
signal: t.signal,
|
|
45860
45864
|
onFound: (e) => n((t) => t.stage === "reading" ? {
|
|
45861
45865
|
...t,
|
|
@@ -45881,7 +45885,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45881
45885
|
}, [l]), f = (0, y.useCallback)((t) => TU(async () => {
|
|
45882
45886
|
let r = a.current;
|
|
45883
45887
|
if (!r) return;
|
|
45884
|
-
let i =
|
|
45888
|
+
let i = X$(t);
|
|
45885
45889
|
if (i) {
|
|
45886
45890
|
n((e) => ({
|
|
45887
45891
|
...e,
|
|
@@ -45898,7 +45902,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45898
45902
|
progress: null
|
|
45899
45903
|
}));
|
|
45900
45904
|
try {
|
|
45901
|
-
let i = await
|
|
45905
|
+
let i = await f1(mJ({
|
|
45902
45906
|
name: t.name,
|
|
45903
45907
|
files: r.files.map(({ path: e, size: t }) => ({
|
|
45904
45908
|
path: e,
|
|
@@ -45910,11 +45914,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45910
45914
|
}), async (e, t, n) => {
|
|
45911
45915
|
let i = e.path.join("/"), a = r.files.find((e) => e.path.join("/") === i);
|
|
45912
45916
|
if (!a) throw Error(`no handle for ${i}`);
|
|
45913
|
-
let o = await
|
|
45917
|
+
let o = await QQ(a, t, n).catch((e) => {
|
|
45914
45918
|
if (e instanceof DOMException) return null;
|
|
45915
45919
|
throw e;
|
|
45916
45920
|
});
|
|
45917
|
-
if (o?.length !== n) throw Error(
|
|
45921
|
+
if (o?.length !== n) throw Error(P1(i));
|
|
45918
45922
|
return o;
|
|
45919
45923
|
}, {
|
|
45920
45924
|
signal: c.signal,
|
|
@@ -45927,7 +45931,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45927
45931
|
...e,
|
|
45928
45932
|
stage: "checking"
|
|
45929
45933
|
}));
|
|
45930
|
-
let a = await
|
|
45934
|
+
let a = await $Q(r.files);
|
|
45931
45935
|
if (a.length) {
|
|
45932
45936
|
let { path: e } = a[0];
|
|
45933
45937
|
throw Error(a.length > 1 ? Q.formatMessage({
|
|
@@ -45936,16 +45940,16 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45936
45940
|
}, {
|
|
45937
45941
|
path: e,
|
|
45938
45942
|
count: a.length - 1
|
|
45939
|
-
}) :
|
|
45943
|
+
}) : P1(e));
|
|
45940
45944
|
}
|
|
45941
|
-
let o = await
|
|
45945
|
+
let o = await Q$({
|
|
45942
45946
|
picked: r.files,
|
|
45943
45947
|
hashed: i,
|
|
45944
45948
|
options: t,
|
|
45945
45949
|
single: r.single
|
|
45946
45950
|
});
|
|
45947
45951
|
if (!r.reopenable) {
|
|
45948
|
-
let t = await
|
|
45952
|
+
let t = await S1(o.plan.totalBytes, o.files.map((e) => e.name));
|
|
45949
45953
|
if (n((e) => ({
|
|
45950
45954
|
...e,
|
|
45951
45955
|
room: t
|
|
@@ -45956,7 +45960,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45956
45960
|
copy: null
|
|
45957
45961
|
})), e.reserveStorage(o.infoHash, !0);
|
|
45958
45962
|
try {
|
|
45959
|
-
let { savePath: t } = await
|
|
45963
|
+
let { savePath: t } = await E1({
|
|
45960
45964
|
built: o,
|
|
45961
45965
|
signal: c.signal,
|
|
45962
45966
|
onProgress: (e) => n((t) => ({
|
|
@@ -45988,7 +45992,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
45988
45992
|
...e,
|
|
45989
45993
|
stage: "adding"
|
|
45990
45994
|
}));
|
|
45991
|
-
let s = r.reopenable ? await fW(
|
|
45995
|
+
let s = r.reopenable ? await fW(O1(o.infoHash), r.root).then(() => !0).catch(() => !1) : !1, l = r.reopenable ? o.handles : await Promise.all(o.handles.map((e) => e ? JQ(e) : Promise.resolve(null)));
|
|
45992
45996
|
e.createSource({
|
|
45993
45997
|
infoHash: o.infoHash,
|
|
45994
45998
|
magnet: o.magnet,
|
|
@@ -46031,10 +46035,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46031
46035
|
}, []), m = (0, y.useCallback)(() => {
|
|
46032
46036
|
o.current?.abort();
|
|
46033
46037
|
}, []), h = (0, y.useCallback)(() => {
|
|
46034
|
-
o.current?.abort(), a.current = null, n(
|
|
46038
|
+
o.current?.abort(), a.current = null, n(D1);
|
|
46035
46039
|
}, []);
|
|
46036
46040
|
return {
|
|
46037
|
-
supported:
|
|
46041
|
+
supported: M1(),
|
|
46038
46042
|
state: t,
|
|
46039
46043
|
suggestedName: r,
|
|
46040
46044
|
pickFolder: u,
|
|
@@ -46044,13 +46048,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46044
46048
|
cancel: m,
|
|
46045
46049
|
reset: h
|
|
46046
46050
|
};
|
|
46047
|
-
},
|
|
46051
|
+
}, L1 = (e, t, n) => {
|
|
46048
46052
|
let [r, i] = (0, y.useState)([]), a = (0, y.useRef)(/* @__PURE__ */ new Set()), [o, s] = (0, y.useState)(0);
|
|
46049
46053
|
(0, y.useEffect)(() => e.onEngineReset(() => {
|
|
46050
46054
|
a.current.clear(), s((e) => e + 1);
|
|
46051
46055
|
}), [e]);
|
|
46052
46056
|
let c = (0, y.useCallback)(async (t, n) => {
|
|
46053
|
-
let r = await
|
|
46057
|
+
let r = await F1(n, {}), i = mJ({
|
|
46054
46058
|
name: t.name ?? n.name,
|
|
46055
46059
|
files: r.files.map(({ path: e, size: t }) => ({
|
|
46056
46060
|
path: e,
|
|
@@ -46075,9 +46079,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46075
46079
|
return (async () => {
|
|
46076
46080
|
let n = t.filter((e) => eK(e) && !a.current.has(e.infoHash)), r = [];
|
|
46077
46081
|
for (let e of n) {
|
|
46078
|
-
let t = await dW(
|
|
46082
|
+
let t = await dW(O1(e.infoHash)).catch(() => void 0);
|
|
46079
46083
|
if (t) {
|
|
46080
|
-
if (await
|
|
46084
|
+
if (await A1(t) === "granted") {
|
|
46081
46085
|
await c(e, t).catch(() => r.push({
|
|
46082
46086
|
entry: e,
|
|
46083
46087
|
name: t.name
|
|
@@ -46104,8 +46108,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46104
46108
|
allow: (0, y.useCallback)(async (e) => {
|
|
46105
46109
|
let n = t.find((t) => t.infoHash === e);
|
|
46106
46110
|
if (!n) return !1;
|
|
46107
|
-
let r = await dW(
|
|
46108
|
-
if (!r || !await
|
|
46111
|
+
let r = await dW(O1(e)).catch(() => void 0);
|
|
46112
|
+
if (!r || !await j1(r)) return !1;
|
|
46109
46113
|
try {
|
|
46110
46114
|
return await c(n, r), i((t) => t.filter((t) => t.entry.infoHash !== e)), !0;
|
|
46111
46115
|
} catch {
|
|
@@ -46113,8 +46117,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46113
46117
|
}
|
|
46114
46118
|
}, [t, c])
|
|
46115
46119
|
};
|
|
46116
|
-
},
|
|
46117
|
-
let n = ci(), r = (0, y.useRef)(!1), [i, a] = (0, y.useState)(!1), o =
|
|
46120
|
+
}, R1 = ({ persist: e, onAsk: t }) => {
|
|
46121
|
+
let n = ci(), r = (0, y.useRef)(!1), [i, a] = (0, y.useState)(!1), o = PQ(e);
|
|
46118
46122
|
return /* @__PURE__ */ q("div", {
|
|
46119
46123
|
className: "folder",
|
|
46120
46124
|
children: [/* @__PURE__ */ K("span", { children: n.formatMessage({
|
|
@@ -46131,15 +46135,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46131
46135
|
children: o.label
|
|
46132
46136
|
})]
|
|
46133
46137
|
});
|
|
46134
|
-
},
|
|
46138
|
+
}, z1 = (e, t = e) => {
|
|
46135
46139
|
let n = new Intl.DisplayNames([t], { type: "language" }).of(e) ?? e;
|
|
46136
46140
|
return n.charAt(0).toLocaleUpperCase(t) + n.slice(1);
|
|
46137
|
-
},
|
|
46141
|
+
}, B1 = () => {
|
|
46138
46142
|
let e = ci(), [t, n] = (0, y.useState)(() => bE() ?? ""), r = (0, y.useMemo)(() => {
|
|
46139
46143
|
let t = new Intl.Collator(e.locale);
|
|
46140
46144
|
return pE.map((e) => ({
|
|
46141
46145
|
tag: e,
|
|
46142
|
-
name:
|
|
46146
|
+
name: z1(e)
|
|
46143
46147
|
})).sort((e, n) => t.compare(e.name, n.name));
|
|
46144
46148
|
}, [e]);
|
|
46145
46149
|
return /* @__PURE__ */ q("select", {
|
|
@@ -46152,14 +46156,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46152
46156
|
children: e.formatMessage({
|
|
46153
46157
|
id: "Automatic ({language})",
|
|
46154
46158
|
defaultMessage: "Automatic ({language})"
|
|
46155
|
-
}, { language:
|
|
46159
|
+
}, { language: z1(TE()) })
|
|
46156
46160
|
}), r.map(({ tag: e, name: t }) => /* @__PURE__ */ K("option", {
|
|
46157
46161
|
value: e,
|
|
46158
46162
|
lang: e,
|
|
46159
46163
|
children: t
|
|
46160
46164
|
}, e))]
|
|
46161
46165
|
});
|
|
46162
|
-
},
|
|
46166
|
+
}, V1 = 129e6, H1 = ({ onAnswer: e }) => {
|
|
46163
46167
|
let t = ci(), n = (0, y.useRef)(!1), r = (t) => {
|
|
46164
46168
|
n.current || (n.current = !0, e(t));
|
|
46165
46169
|
};
|
|
@@ -46179,7 +46183,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46179
46183
|
children: /* @__PURE__ */ K("strong", { children: t.formatMessage({
|
|
46180
46184
|
id: "Try Ripple with Sintel, a free open movie ({size})",
|
|
46181
46185
|
defaultMessage: "Try Ripple with Sintel, a free open movie ({size})"
|
|
46182
|
-
}, { size: NE(
|
|
46186
|
+
}, { size: NE(V1) }) })
|
|
46183
46187
|
})
|
|
46184
46188
|
}), /* @__PURE__ */ K("div", {
|
|
46185
46189
|
className: "side",
|
|
@@ -46205,18 +46209,18 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46205
46209
|
})
|
|
46206
46210
|
})]
|
|
46207
46211
|
});
|
|
46208
|
-
},
|
|
46212
|
+
}, U1 = {
|
|
46209
46213
|
peers: [],
|
|
46210
46214
|
trackers: [],
|
|
46211
46215
|
loaded: !1
|
|
46212
|
-
},
|
|
46213
|
-
let t = HU(), [n, r] = (0, y.useState)(
|
|
46216
|
+
}, W1 = (e) => {
|
|
46217
|
+
let t = HU(), [n, r] = (0, y.useState)(U1);
|
|
46214
46218
|
return (0, y.useEffect)(() => {
|
|
46215
46219
|
if (e == null) {
|
|
46216
|
-
r(
|
|
46220
|
+
r(U1), t.inspect(null);
|
|
46217
46221
|
return;
|
|
46218
46222
|
}
|
|
46219
|
-
r(
|
|
46223
|
+
r(U1), t.inspect(e);
|
|
46220
46224
|
let n = t.onDetail((t) => {
|
|
46221
46225
|
t && t.handle === e && r({
|
|
46222
46226
|
peers: t.peers,
|
|
@@ -46228,12 +46232,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46228
46232
|
n(), t.inspect(null);
|
|
46229
46233
|
};
|
|
46230
46234
|
}, [t, e]), n;
|
|
46231
|
-
},
|
|
46235
|
+
}, G1 = [
|
|
46232
46236
|
"general",
|
|
46233
46237
|
"files",
|
|
46234
46238
|
"peers",
|
|
46235
46239
|
"trackers"
|
|
46236
|
-
],
|
|
46240
|
+
], K1 = tr({
|
|
46237
46241
|
general: {
|
|
46238
46242
|
id: "General",
|
|
46239
46243
|
defaultMessage: "General"
|
|
@@ -46250,23 +46254,23 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46250
46254
|
id: "Trackers",
|
|
46251
46255
|
defaultMessage: "Trackers"
|
|
46252
46256
|
}
|
|
46253
|
-
}),
|
|
46257
|
+
}), q1 = "ripple:dock-height", J1 = 140, Y1 = 720, X1 = 300, Z1 = "-", Q1 = (e) => NE(e, !0), $1 = (e) => {
|
|
46254
46258
|
let t = e > 0 && e < .01 ? 2 : 0;
|
|
46255
46259
|
return IE(Number((e * 100).toFixed(t)) / 100, t);
|
|
46256
|
-
},
|
|
46260
|
+
}, e0 = (e) => jE(CE(), {
|
|
46257
46261
|
minimumFractionDigits: 2,
|
|
46258
46262
|
maximumFractionDigits: 2,
|
|
46259
46263
|
useGrouping: !1
|
|
46260
|
-
}).format(Number(e.toFixed(2))),
|
|
46264
|
+
}).format(Number(e.toFixed(2))), t0 = (e) => {
|
|
46261
46265
|
let t = e.lastIndexOf("/");
|
|
46262
46266
|
return t < 0 ? ["", e] : [e.slice(0, t + 1), e.slice(t + 1)];
|
|
46263
|
-
},
|
|
46267
|
+
}, n0 = (e) => e < 0 ? Z1 : CG(e < 60 ? { seconds: e } : e < 3600 ? { minutes: Math.round(e / 60) } : e < 86400 ? {
|
|
46264
46268
|
hours: Math.floor(e / 3600),
|
|
46265
46269
|
minutes: Math.round(e % 3600 / 60)
|
|
46266
46270
|
} : {
|
|
46267
46271
|
days: Math.floor(e / 86400),
|
|
46268
46272
|
hours: Math.round(e % 86400 / 3600)
|
|
46269
|
-
}),
|
|
46273
|
+
}), r0 = (e, t) => e > 0 ? t.formatDate(e * 1e3, {
|
|
46270
46274
|
year: "numeric",
|
|
46271
46275
|
month: "numeric",
|
|
46272
46276
|
day: "numeric",
|
|
@@ -46276,13 +46280,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46276
46280
|
}) : t.formatMessage({
|
|
46277
46281
|
id: "Not yet",
|
|
46278
46282
|
defaultMessage: "Not yet"
|
|
46279
|
-
}),
|
|
46283
|
+
}), i0 = (e) => e.allTimeDownload === 0 ? e.allTimeUpload > 0 ? "∞" : e0(0) : e0(e.allTimeUpload / e.allTimeDownload), a0 = ({ label: e, value: t, mono: n }) => /* @__PURE__ */ q("div", {
|
|
46280
46284
|
className: "fact",
|
|
46281
46285
|
children: [/* @__PURE__ */ K("label", { children: e }), /* @__PURE__ */ K("span", {
|
|
46282
46286
|
className: n ? "mono" : void 0,
|
|
46283
46287
|
children: t
|
|
46284
46288
|
})]
|
|
46285
|
-
}),
|
|
46289
|
+
}), o0 = ({ t: e }) => {
|
|
46286
46290
|
let t = ci(), n = e.stats, r = Math.max(0, e.size - e.downloaded), i = (e, n) => t.formatMessage({
|
|
46287
46291
|
id: "{total} ({session} this session)",
|
|
46288
46292
|
defaultMessage: "{total} ({session} this session)"
|
|
@@ -46320,21 +46324,21 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46320
46324
|
}) }), /* @__PURE__ */ q("div", {
|
|
46321
46325
|
className: "facts",
|
|
46322
46326
|
children: [
|
|
46323
|
-
/* @__PURE__ */ K(
|
|
46327
|
+
/* @__PURE__ */ K(a0, {
|
|
46324
46328
|
label: t.formatMessage({
|
|
46325
46329
|
id: "Time active",
|
|
46326
46330
|
defaultMessage: "Time active"
|
|
46327
46331
|
}),
|
|
46328
|
-
value: n ? i(
|
|
46332
|
+
value: n ? i(n0(n.activeSeconds), n0(n.sessionActiveSeconds)) : Z1
|
|
46329
46333
|
}),
|
|
46330
|
-
/* @__PURE__ */ K(
|
|
46334
|
+
/* @__PURE__ */ K(a0, {
|
|
46331
46335
|
label: t.formatMessage({
|
|
46332
46336
|
id: "Time left",
|
|
46333
46337
|
defaultMessage: "Time left"
|
|
46334
46338
|
}),
|
|
46335
|
-
value: e.state === "downloading" && e.eta !== "-" ? e.eta :
|
|
46339
|
+
value: e.state === "downloading" && e.eta !== "-" ? e.eta : Z1
|
|
46336
46340
|
}),
|
|
46337
|
-
/* @__PURE__ */ K(
|
|
46341
|
+
/* @__PURE__ */ K(a0, {
|
|
46338
46342
|
label: t.formatMessage({
|
|
46339
46343
|
id: "Connections",
|
|
46340
46344
|
defaultMessage: "Connections"
|
|
@@ -46345,65 +46349,65 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46345
46349
|
}, {
|
|
46346
46350
|
count: n.numConnections,
|
|
46347
46351
|
limit: n.connectionsLimit
|
|
46348
|
-
}) : String(n.numConnections) :
|
|
46352
|
+
}) : String(n.numConnections) : Z1
|
|
46349
46353
|
}),
|
|
46350
|
-
/* @__PURE__ */ K(
|
|
46354
|
+
/* @__PURE__ */ K(a0, {
|
|
46351
46355
|
label: t.formatMessage({
|
|
46352
46356
|
id: "Downloaded",
|
|
46353
46357
|
defaultMessage: "Downloaded"
|
|
46354
46358
|
}),
|
|
46355
|
-
value: n ? i(
|
|
46359
|
+
value: n ? i(Q1(n.allTimeDownload), Q1(n.sessionDownload)) : Q1(e.downloaded)
|
|
46356
46360
|
}),
|
|
46357
|
-
/* @__PURE__ */ K(
|
|
46361
|
+
/* @__PURE__ */ K(a0, {
|
|
46358
46362
|
label: t.formatMessage({
|
|
46359
46363
|
id: "Uploaded",
|
|
46360
46364
|
defaultMessage: "Uploaded"
|
|
46361
46365
|
}),
|
|
46362
|
-
value: n ? i(
|
|
46366
|
+
value: n ? i(Q1(n.allTimeUpload), Q1(n.sessionUpload)) : Z1
|
|
46363
46367
|
}),
|
|
46364
|
-
/* @__PURE__ */ K(
|
|
46368
|
+
/* @__PURE__ */ K(a0, {
|
|
46365
46369
|
label: t.formatMessage({
|
|
46366
46370
|
id: "Seeds",
|
|
46367
46371
|
defaultMessage: "Seeds"
|
|
46368
46372
|
}),
|
|
46369
46373
|
value: a || String(e.seeds)
|
|
46370
46374
|
}),
|
|
46371
|
-
/* @__PURE__ */ K(
|
|
46375
|
+
/* @__PURE__ */ K(a0, {
|
|
46372
46376
|
label: t.formatMessage({
|
|
46373
46377
|
id: "Download speed",
|
|
46374
46378
|
defaultMessage: "Download speed"
|
|
46375
46379
|
}),
|
|
46376
|
-
value:
|
|
46380
|
+
value: oQ(e.down)
|
|
46377
46381
|
}),
|
|
46378
|
-
/* @__PURE__ */ K(
|
|
46382
|
+
/* @__PURE__ */ K(a0, {
|
|
46379
46383
|
label: t.formatMessage({
|
|
46380
46384
|
id: "Upload speed",
|
|
46381
46385
|
defaultMessage: "Upload speed"
|
|
46382
46386
|
}),
|
|
46383
|
-
value:
|
|
46387
|
+
value: oQ(e.up)
|
|
46384
46388
|
}),
|
|
46385
|
-
/* @__PURE__ */ K(
|
|
46389
|
+
/* @__PURE__ */ K(a0, {
|
|
46386
46390
|
label: t.formatMessage({
|
|
46387
46391
|
id: "Peers",
|
|
46388
46392
|
defaultMessage: "Peers"
|
|
46389
46393
|
}),
|
|
46390
46394
|
value: o || String(e.peers)
|
|
46391
46395
|
}),
|
|
46392
|
-
/* @__PURE__ */ K(
|
|
46396
|
+
/* @__PURE__ */ K(a0, {
|
|
46393
46397
|
label: t.formatMessage({
|
|
46394
46398
|
id: "Share ratio",
|
|
46395
46399
|
defaultMessage: "Share ratio"
|
|
46396
46400
|
}),
|
|
46397
|
-
value: n ?
|
|
46401
|
+
value: n ? i0(n) : Z1
|
|
46398
46402
|
}),
|
|
46399
|
-
/* @__PURE__ */ K(
|
|
46403
|
+
/* @__PURE__ */ K(a0, {
|
|
46400
46404
|
label: t.formatMessage({
|
|
46401
46405
|
id: "Wasted",
|
|
46402
46406
|
defaultMessage: "Wasted"
|
|
46403
46407
|
}),
|
|
46404
|
-
value: n ?
|
|
46408
|
+
value: n ? Q1(n.wasted) : Z1
|
|
46405
46409
|
}),
|
|
46406
|
-
/* @__PURE__ */ K(
|
|
46410
|
+
/* @__PURE__ */ K(a0, {
|
|
46407
46411
|
label: t.formatMessage({
|
|
46408
46412
|
id: "Remaining",
|
|
46409
46413
|
defaultMessage: "Remaining"
|
|
@@ -46411,23 +46415,23 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46411
46415
|
value: r === 0 ? t.formatMessage({
|
|
46412
46416
|
id: "Nothing",
|
|
46413
46417
|
defaultMessage: "Nothing"
|
|
46414
|
-
}) :
|
|
46418
|
+
}) : Q1(r)
|
|
46415
46419
|
}),
|
|
46416
|
-
/* @__PURE__ */ K(
|
|
46420
|
+
/* @__PURE__ */ K(a0, {
|
|
46417
46421
|
label: t.formatMessage({
|
|
46418
46422
|
id: "Seeding for",
|
|
46419
46423
|
defaultMessage: "Seeding for"
|
|
46420
46424
|
}),
|
|
46421
|
-
value: n ? i(
|
|
46425
|
+
value: n ? i(n0(n.seedingSeconds), n0(n.sessionSeedingSeconds)) : Z1
|
|
46422
46426
|
}),
|
|
46423
|
-
/* @__PURE__ */ K(
|
|
46427
|
+
/* @__PURE__ */ K(a0, {
|
|
46424
46428
|
label: t.formatMessage({
|
|
46425
46429
|
id: "Availability",
|
|
46426
46430
|
defaultMessage: "Availability"
|
|
46427
46431
|
}),
|
|
46428
|
-
value: n && n.availability >= 0 ?
|
|
46432
|
+
value: n && n.availability >= 0 ? e0(n.availability) : Z1
|
|
46429
46433
|
}),
|
|
46430
|
-
/* @__PURE__ */ K(
|
|
46434
|
+
/* @__PURE__ */ K(a0, {
|
|
46431
46435
|
label: t.formatMessage({
|
|
46432
46436
|
id: "Inbound peers",
|
|
46433
46437
|
defaultMessage: "Inbound peers"
|
|
@@ -46438,7 +46442,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46438
46442
|
}) : t.formatMessage({
|
|
46439
46443
|
id: "None yet",
|
|
46440
46444
|
defaultMessage: "None yet"
|
|
46441
|
-
}) :
|
|
46445
|
+
}) : Z1
|
|
46442
46446
|
})
|
|
46443
46447
|
]
|
|
46444
46448
|
})] }), /* @__PURE__ */ q("section", { children: [/* @__PURE__ */ K("h3", { children: t.formatMessage({
|
|
@@ -46447,14 +46451,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46447
46451
|
}) }), /* @__PURE__ */ q("div", {
|
|
46448
46452
|
className: "facts",
|
|
46449
46453
|
children: [
|
|
46450
|
-
/* @__PURE__ */ K(
|
|
46454
|
+
/* @__PURE__ */ K(a0, {
|
|
46451
46455
|
label: t.formatMessage({
|
|
46452
46456
|
id: "Total size",
|
|
46453
46457
|
defaultMessage: "Total size"
|
|
46454
46458
|
}),
|
|
46455
|
-
value:
|
|
46459
|
+
value: Q1(e.size)
|
|
46456
46460
|
}),
|
|
46457
|
-
/* @__PURE__ */ K(
|
|
46461
|
+
/* @__PURE__ */ K(a0, {
|
|
46458
46462
|
label: t.formatMessage({
|
|
46459
46463
|
id: "Pieces",
|
|
46460
46464
|
defaultMessage: "Pieces"
|
|
@@ -46464,54 +46468,54 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46464
46468
|
defaultMessage: "{count} x {size} (have {have})"
|
|
46465
46469
|
}, {
|
|
46466
46470
|
count: n.numPieces,
|
|
46467
|
-
size:
|
|
46471
|
+
size: Q1(n.pieceLength),
|
|
46468
46472
|
have: n.numPiecesHave
|
|
46469
|
-
}) :
|
|
46473
|
+
}) : Z1
|
|
46470
46474
|
}),
|
|
46471
|
-
/* @__PURE__ */ K(
|
|
46475
|
+
/* @__PURE__ */ K(a0, {
|
|
46472
46476
|
label: t.formatMessage({
|
|
46473
46477
|
id: "Progress",
|
|
46474
46478
|
defaultMessage: "Progress"
|
|
46475
46479
|
}),
|
|
46476
|
-
value:
|
|
46480
|
+
value: $1(e.progress)
|
|
46477
46481
|
}),
|
|
46478
|
-
/* @__PURE__ */ K(
|
|
46482
|
+
/* @__PURE__ */ K(a0, {
|
|
46479
46483
|
label: t.formatMessage({
|
|
46480
46484
|
id: "Added on",
|
|
46481
46485
|
defaultMessage: "Added on"
|
|
46482
46486
|
}),
|
|
46483
|
-
value: n ?
|
|
46487
|
+
value: n ? r0(n.addedAt, t) : Z1
|
|
46484
46488
|
}),
|
|
46485
|
-
/* @__PURE__ */ K(
|
|
46489
|
+
/* @__PURE__ */ K(a0, {
|
|
46486
46490
|
label: t.formatMessage({
|
|
46487
46491
|
id: "Completed on",
|
|
46488
46492
|
defaultMessage: "Completed on"
|
|
46489
46493
|
}),
|
|
46490
|
-
value: n ?
|
|
46494
|
+
value: n ? r0(n.completedAt, t) : Z1
|
|
46491
46495
|
}),
|
|
46492
|
-
/* @__PURE__ */ K(
|
|
46496
|
+
/* @__PURE__ */ K(a0, {
|
|
46493
46497
|
label: t.formatMessage({
|
|
46494
46498
|
id: "Last seen complete",
|
|
46495
46499
|
defaultMessage: "Last seen complete"
|
|
46496
46500
|
}),
|
|
46497
|
-
value: n ?
|
|
46501
|
+
value: n ? r0(n.lastSeenComplete, t) : Z1
|
|
46498
46502
|
}),
|
|
46499
|
-
/* @__PURE__ */ K(
|
|
46503
|
+
/* @__PURE__ */ K(a0, {
|
|
46500
46504
|
label: t.formatMessage({
|
|
46501
46505
|
id: "Files",
|
|
46502
46506
|
defaultMessage: "Files"
|
|
46503
46507
|
}),
|
|
46504
46508
|
value: String(Aq(e.files).length)
|
|
46505
46509
|
}),
|
|
46506
|
-
/* @__PURE__ */ K(
|
|
46510
|
+
/* @__PURE__ */ K(a0, {
|
|
46507
46511
|
label: t.formatMessage({
|
|
46508
46512
|
id: "Save path",
|
|
46509
46513
|
defaultMessage: "Save path"
|
|
46510
46514
|
}),
|
|
46511
|
-
value: n?.savePath ||
|
|
46515
|
+
value: n?.savePath || Z1,
|
|
46512
46516
|
mono: !0
|
|
46513
46517
|
}),
|
|
46514
|
-
e.infoHash && /* @__PURE__ */ K(
|
|
46518
|
+
e.infoHash && /* @__PURE__ */ K(a0, {
|
|
46515
46519
|
label: t.formatMessage({
|
|
46516
46520
|
id: "Info hash",
|
|
46517
46521
|
defaultMessage: "Info hash"
|
|
@@ -46519,7 +46523,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46519
46523
|
value: e.infoHash,
|
|
46520
46524
|
mono: !0
|
|
46521
46525
|
}),
|
|
46522
|
-
e.retry && /* @__PURE__ */ K(
|
|
46526
|
+
e.retry && /* @__PURE__ */ K(a0, {
|
|
46523
46527
|
label: t.formatMessage({
|
|
46524
46528
|
id: "Retrying",
|
|
46525
46529
|
defaultMessage: "Retrying"
|
|
@@ -46538,12 +46542,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46538
46542
|
]
|
|
46539
46543
|
})] })]
|
|
46540
46544
|
});
|
|
46541
|
-
},
|
|
46545
|
+
}, s0 = ({ files: e, saving: t, onSave: n }) => {
|
|
46542
46546
|
let r = ci();
|
|
46543
46547
|
return e.length ? /* @__PURE__ */ K("div", {
|
|
46544
46548
|
className: "rows",
|
|
46545
46549
|
children: e.map((e) => {
|
|
46546
|
-
let [i, a] =
|
|
46550
|
+
let [i, a] = t0(e.name), o = t[e.index];
|
|
46547
46551
|
return /* @__PURE__ */ q("div", {
|
|
46548
46552
|
className: "row file",
|
|
46549
46553
|
children: [
|
|
@@ -46556,7 +46560,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46556
46560
|
}),
|
|
46557
46561
|
/* @__PURE__ */ K("span", {
|
|
46558
46562
|
className: "num",
|
|
46559
|
-
children:
|
|
46563
|
+
children: Q1(e.size)
|
|
46560
46564
|
}),
|
|
46561
46565
|
n && /* @__PURE__ */ K("button", {
|
|
46562
46566
|
type: "button",
|
|
@@ -46577,13 +46581,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46577
46581
|
defaultMessage: "No file list yet."
|
|
46578
46582
|
})
|
|
46579
46583
|
});
|
|
46580
|
-
},
|
|
46584
|
+
}, c0 = {
|
|
46581
46585
|
tcp: "TCP",
|
|
46582
46586
|
utp: "uTP",
|
|
46583
46587
|
webrtc: "WebRTC"
|
|
46584
|
-
},
|
|
46588
|
+
}, l0 = (e, t) => {
|
|
46585
46589
|
let n = [];
|
|
46586
|
-
return n.push(
|
|
46590
|
+
return n.push(c0[cD(e)]), sD(e) && n.push(t.formatMessage({
|
|
46587
46591
|
id: "incoming",
|
|
46588
46592
|
defaultMessage: "incoming"
|
|
46589
46593
|
})), e.flags & (iD.rc4Encrypted | iD.plaintextEncrypted) && n.push(t.formatMessage({
|
|
@@ -46596,7 +46600,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46596
46600
|
id: "tracker",
|
|
46597
46601
|
defaultMessage: "tracker"
|
|
46598
46602
|
})), n;
|
|
46599
|
-
},
|
|
46603
|
+
}, u0 = ({ peers: e, loaded: t }) => {
|
|
46600
46604
|
let n = ci();
|
|
46601
46605
|
if (!t) return /* @__PURE__ */ K("p", {
|
|
46602
46606
|
className: "none",
|
|
@@ -46678,7 +46682,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46678
46682
|
children: e.transport === "webrtc" ? "" : e.endpoint
|
|
46679
46683
|
}), /* @__PURE__ */ K("span", {
|
|
46680
46684
|
className: "tags",
|
|
46681
|
-
children:
|
|
46685
|
+
children: l0(e, n).map((e) => /* @__PURE__ */ K("span", {
|
|
46682
46686
|
className: "tag",
|
|
46683
46687
|
children: e
|
|
46684
46688
|
}, e))
|
|
@@ -46694,28 +46698,28 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46694
46698
|
}),
|
|
46695
46699
|
/* @__PURE__ */ K("span", {
|
|
46696
46700
|
className: "num",
|
|
46697
|
-
children:
|
|
46701
|
+
children: $1(e.progress)
|
|
46698
46702
|
}),
|
|
46699
46703
|
/* @__PURE__ */ K("span", {
|
|
46700
46704
|
className: "num",
|
|
46701
|
-
children: e.downloadRate ?
|
|
46705
|
+
children: e.downloadRate ? oQ(e.downloadRate) : Z1
|
|
46702
46706
|
}),
|
|
46703
46707
|
/* @__PURE__ */ K("span", {
|
|
46704
46708
|
className: "num",
|
|
46705
|
-
children: e.uploadRate ?
|
|
46709
|
+
children: e.uploadRate ? oQ(e.uploadRate) : Z1
|
|
46706
46710
|
}),
|
|
46707
46711
|
/* @__PURE__ */ K("span", {
|
|
46708
46712
|
className: "num wide",
|
|
46709
|
-
children: e.totalDownload ?
|
|
46713
|
+
children: e.totalDownload ? Q1(e.totalDownload) : Z1
|
|
46710
46714
|
}),
|
|
46711
46715
|
/* @__PURE__ */ K("span", {
|
|
46712
46716
|
className: "num wide",
|
|
46713
|
-
children: e.totalUpload ?
|
|
46717
|
+
children: e.totalUpload ? Q1(e.totalUpload) : Z1
|
|
46714
46718
|
})
|
|
46715
46719
|
]
|
|
46716
46720
|
}, e.endpoint))]
|
|
46717
46721
|
});
|
|
46718
|
-
},
|
|
46722
|
+
}, d0 = (e, t) => e.updating ? {
|
|
46719
46723
|
label: t.formatMessage({
|
|
46720
46724
|
id: "Announcing…",
|
|
46721
46725
|
defaultMessage: "Announcing…"
|
|
@@ -46739,7 +46743,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46739
46743
|
defaultMessage: "Failed {count}×"
|
|
46740
46744
|
}, { count: e.fails }),
|
|
46741
46745
|
tone: "warn"
|
|
46742
|
-
},
|
|
46746
|
+
}, f0 = ({ trackers: e, loaded: t }) => {
|
|
46743
46747
|
let n = ci();
|
|
46744
46748
|
if (!t) return /* @__PURE__ */ K("p", {
|
|
46745
46749
|
className: "none",
|
|
@@ -46805,7 +46809,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46805
46809
|
})
|
|
46806
46810
|
]
|
|
46807
46811
|
}), r.map((e) => {
|
|
46808
|
-
let t =
|
|
46812
|
+
let t = d0(e, n);
|
|
46809
46813
|
return /* @__PURE__ */ q("div", {
|
|
46810
46814
|
className: "row",
|
|
46811
46815
|
children: [
|
|
@@ -46825,27 +46829,27 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
46825
46829
|
}),
|
|
46826
46830
|
/* @__PURE__ */ K("span", {
|
|
46827
46831
|
className: "num",
|
|
46828
|
-
children: e.seeders < 0 ?
|
|
46832
|
+
children: e.seeders < 0 ? Z1 : e.seeders
|
|
46829
46833
|
}),
|
|
46830
46834
|
/* @__PURE__ */ K("span", {
|
|
46831
46835
|
className: "num",
|
|
46832
|
-
children: e.leechers < 0 ?
|
|
46836
|
+
children: e.leechers < 0 ? Z1 : e.leechers
|
|
46833
46837
|
}),
|
|
46834
46838
|
/* @__PURE__ */ K("span", {
|
|
46835
46839
|
className: "num",
|
|
46836
|
-
children:
|
|
46840
|
+
children: n0(e.nextAnnounceIn)
|
|
46837
46841
|
})
|
|
46838
46842
|
]
|
|
46839
46843
|
}, e.url);
|
|
46840
46844
|
})]
|
|
46841
46845
|
});
|
|
46842
|
-
},
|
|
46846
|
+
}, p0 = () => {
|
|
46843
46847
|
try {
|
|
46844
|
-
let e = Number(localStorage.getItem(
|
|
46845
|
-
if (Number.isFinite(e) && e >=
|
|
46848
|
+
let e = Number(localStorage.getItem(q1));
|
|
46849
|
+
if (Number.isFinite(e) && e >= J1 && e <= Y1) return e;
|
|
46846
46850
|
} catch {}
|
|
46847
|
-
return
|
|
46848
|
-
},
|
|
46851
|
+
return X1;
|
|
46852
|
+
}, m0 = G`
|
|
46849
46853
|
flex: none;
|
|
46850
46854
|
display: flex;
|
|
46851
46855
|
flex-direction: column;
|
|
@@ -47213,16 +47217,16 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47213
47217
|
grid-template-columns: minmax(0, 1fr) repeat(3, min-content);
|
|
47214
47218
|
}
|
|
47215
47219
|
}
|
|
47216
|
-
`,
|
|
47217
|
-
let a = ci(), [o, s] = (0, y.useState)("general"), [c, l] = (0, y.useState)(
|
|
47220
|
+
`, h0 = ({ t: e, handle: t, saving: n, onSave: r, onClose: i }) => {
|
|
47221
|
+
let a = ci(), [o, s] = (0, y.useState)("general"), [c, l] = (0, y.useState)(p0), u = (0, y.useRef)(!1), d = W1(t), f = (0, y.useCallback)((e) => {
|
|
47218
47222
|
e.preventDefault(), u.current = !0;
|
|
47219
47223
|
let t = e.clientY, n = c, r = (e) => {
|
|
47220
|
-
let r = Math.min(
|
|
47224
|
+
let r = Math.min(Y1, Math.max(J1, n + (t - e.clientY)));
|
|
47221
47225
|
l(r);
|
|
47222
47226
|
}, i = () => {
|
|
47223
47227
|
u.current = !1, window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i), l((e) => {
|
|
47224
47228
|
try {
|
|
47225
|
-
localStorage.setItem(
|
|
47229
|
+
localStorage.setItem(q1, String(e));
|
|
47226
47230
|
} catch {}
|
|
47227
47231
|
return e;
|
|
47228
47232
|
});
|
|
@@ -47237,7 +47241,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47237
47241
|
};
|
|
47238
47242
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
47239
47243
|
}, [i]), /* @__PURE__ */ q("section", {
|
|
47240
|
-
css:
|
|
47244
|
+
css: m0,
|
|
47241
47245
|
style: { height: c },
|
|
47242
47246
|
"aria-label": a.formatMessage({
|
|
47243
47247
|
id: "Details for {name}",
|
|
@@ -47275,13 +47279,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47275
47279
|
id: "Torrent details",
|
|
47276
47280
|
defaultMessage: "Torrent details"
|
|
47277
47281
|
}),
|
|
47278
|
-
children:
|
|
47282
|
+
children: G1.map((t) => /* @__PURE__ */ q("button", {
|
|
47279
47283
|
type: "button",
|
|
47280
47284
|
"data-on": o === t || void 0,
|
|
47281
47285
|
"aria-pressed": o === t,
|
|
47282
47286
|
onClick: () => s(t),
|
|
47283
47287
|
children: [
|
|
47284
|
-
a.formatMessage(
|
|
47288
|
+
a.formatMessage(K1[t]),
|
|
47285
47289
|
t === "peers" && d.peers.length > 0 && /* @__PURE__ */ K("span", {
|
|
47286
47290
|
className: "count",
|
|
47287
47291
|
children: d.peers.length
|
|
@@ -47296,17 +47300,17 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47296
47300
|
/* @__PURE__ */ q("div", {
|
|
47297
47301
|
className: "pane",
|
|
47298
47302
|
children: [
|
|
47299
|
-
o === "general" && /* @__PURE__ */ K(
|
|
47300
|
-
o === "files" && /* @__PURE__ */ K(
|
|
47303
|
+
o === "general" && /* @__PURE__ */ K(o0, { t: e }),
|
|
47304
|
+
o === "files" && /* @__PURE__ */ K(s0, {
|
|
47301
47305
|
files: Aq(e.files),
|
|
47302
47306
|
saving: n,
|
|
47303
47307
|
onSave: t == null ? null : r
|
|
47304
47308
|
}),
|
|
47305
|
-
o === "peers" && /* @__PURE__ */ K(
|
|
47309
|
+
o === "peers" && /* @__PURE__ */ K(u0, {
|
|
47306
47310
|
peers: d.peers,
|
|
47307
47311
|
loaded: d.loaded
|
|
47308
47312
|
}),
|
|
47309
|
-
o === "trackers" && /* @__PURE__ */ K(
|
|
47313
|
+
o === "trackers" && /* @__PURE__ */ K(f0, {
|
|
47310
47314
|
trackers: d.trackers,
|
|
47311
47315
|
loaded: d.loaded
|
|
47312
47316
|
})
|
|
@@ -47314,23 +47318,23 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47314
47318
|
})
|
|
47315
47319
|
]
|
|
47316
47320
|
});
|
|
47317
|
-
},
|
|
47321
|
+
}, g0 = 8, _0 = 6, v0 = (e, t) => {
|
|
47318
47322
|
let n = window.innerWidth, r = window.innerHeight;
|
|
47319
47323
|
if (e.kind === "pointer") {
|
|
47320
47324
|
let { at: i } = e;
|
|
47321
47325
|
return {
|
|
47322
|
-
x: i.x + t.width +
|
|
47323
|
-
y: i.y + t.height +
|
|
47326
|
+
x: i.x + t.width + g0 > n ? Math.max(g0, i.x - t.width) : i.x,
|
|
47327
|
+
y: i.y + t.height + g0 > r ? Math.max(g0, i.y - t.height) : i.y
|
|
47324
47328
|
};
|
|
47325
47329
|
}
|
|
47326
47330
|
let i = e.of.current?.getBoundingClientRect();
|
|
47327
47331
|
if (!i) return null;
|
|
47328
|
-
let a = Math.min(Math.max(
|
|
47332
|
+
let a = Math.min(Math.max(g0, i.right - t.width), Math.max(g0, n - t.width - g0)), o = i.bottom + _0, s = i.top - _0 - t.height;
|
|
47329
47333
|
return {
|
|
47330
47334
|
x: a,
|
|
47331
|
-
y: o + t.height +
|
|
47335
|
+
y: o + t.height + g0 > r && s >= g0 ? s : o
|
|
47332
47336
|
};
|
|
47333
|
-
},
|
|
47337
|
+
}, y0 = G`
|
|
47334
47338
|
position: fixed;
|
|
47335
47339
|
z-index: 2000;
|
|
47336
47340
|
min-width: 240px;
|
|
@@ -47424,20 +47428,20 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47424
47428
|
min-width: 0;
|
|
47425
47429
|
}
|
|
47426
47430
|
}
|
|
47427
|
-
`,
|
|
47431
|
+
`, b0 = {
|
|
47428
47432
|
radio: "●",
|
|
47429
47433
|
check: "✓"
|
|
47430
|
-
},
|
|
47434
|
+
}, x0 = ({ on: e, radio: t }) => /* @__PURE__ */ K("span", {
|
|
47431
47435
|
className: "tick",
|
|
47432
47436
|
"aria-hidden": "true",
|
|
47433
|
-
children: e ?
|
|
47434
|
-
}),
|
|
47437
|
+
children: e ? b0[t ? "radio" : "check"] : ""
|
|
47438
|
+
}), S0 = (e, t) => e.disabled ? t.formatMessage({
|
|
47435
47439
|
id: "{label}. {reason}",
|
|
47436
47440
|
defaultMessage: "{label}. {reason}"
|
|
47437
47441
|
}, {
|
|
47438
47442
|
label: e.label,
|
|
47439
47443
|
reason: e.disabled
|
|
47440
|
-
}) : e.hint,
|
|
47444
|
+
}) : e.hint, C0 = ({ groups: e, onChose: t }) => {
|
|
47441
47445
|
let n = ci();
|
|
47442
47446
|
return /* @__PURE__ */ K(zc, { children: e.map((e) => /* @__PURE__ */ q("div", {
|
|
47443
47447
|
className: "group",
|
|
@@ -47447,7 +47451,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47447
47451
|
let r = {
|
|
47448
47452
|
type: "button",
|
|
47449
47453
|
disabled: !!e.disabled,
|
|
47450
|
-
title:
|
|
47454
|
+
title: S0(e, n),
|
|
47451
47455
|
tabIndex: -1
|
|
47452
47456
|
};
|
|
47453
47457
|
return e.kind === "toggle" ? /* @__PURE__ */ q("button", {
|
|
@@ -47457,7 +47461,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47457
47461
|
onClick: () => {
|
|
47458
47462
|
e.apply(!e.checked), t();
|
|
47459
47463
|
},
|
|
47460
|
-
children: [/* @__PURE__ */ K(
|
|
47464
|
+
children: [/* @__PURE__ */ K(x0, { on: e.checked }), /* @__PURE__ */ K("span", {
|
|
47461
47465
|
className: "text",
|
|
47462
47466
|
children: e.label
|
|
47463
47467
|
})]
|
|
@@ -47468,7 +47472,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47468
47472
|
onClick: () => {
|
|
47469
47473
|
e.apply(), t();
|
|
47470
47474
|
},
|
|
47471
|
-
children: [/* @__PURE__ */ K(
|
|
47475
|
+
children: [/* @__PURE__ */ K(x0, {
|
|
47472
47476
|
on: e.selected,
|
|
47473
47477
|
radio: !0
|
|
47474
47478
|
}), /* @__PURE__ */ K("span", {
|
|
@@ -47482,14 +47486,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47482
47486
|
onClick: () => {
|
|
47483
47487
|
e.run(), t();
|
|
47484
47488
|
},
|
|
47485
|
-
children: [/* @__PURE__ */ K(
|
|
47489
|
+
children: [/* @__PURE__ */ K(x0, { on: !1 }), /* @__PURE__ */ K("span", {
|
|
47486
47490
|
className: "text",
|
|
47487
47491
|
children: e.label
|
|
47488
47492
|
})]
|
|
47489
47493
|
}, e.id);
|
|
47490
47494
|
})]
|
|
47491
47495
|
}, e.id)) });
|
|
47492
|
-
},
|
|
47496
|
+
}, w0 = ({ placement: e, label: t, onClose: n, children: r }) => {
|
|
47493
47497
|
let i = (0, y.useRef)(null), [a, o] = (0, y.useState)(e.kind === "pointer" ? e.at : {
|
|
47494
47498
|
x: -9999,
|
|
47495
47499
|
y: -9999
|
|
@@ -47498,7 +47502,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47498
47502
|
let c = (0, y.useRef)(e.kind === "pointer").current, l = (0, y.useCallback)(() => {
|
|
47499
47503
|
let e = i.current;
|
|
47500
47504
|
if (!e) return;
|
|
47501
|
-
let t =
|
|
47505
|
+
let t = v0(s.current, e.getBoundingClientRect());
|
|
47502
47506
|
t && o(t);
|
|
47503
47507
|
}, []);
|
|
47504
47508
|
(0, y.useLayoutEffect)(l, [
|
|
@@ -47566,7 +47570,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47566
47570
|
document.removeEventListener("keydown", r), document.removeEventListener("pointerdown", a, !0), window.removeEventListener("scroll", o, !0), window.removeEventListener("resize", o);
|
|
47567
47571
|
};
|
|
47568
47572
|
}, [c]), /* @__PURE__ */ K("div", {
|
|
47569
|
-
css:
|
|
47573
|
+
css: y0,
|
|
47570
47574
|
ref: i,
|
|
47571
47575
|
role: "menu",
|
|
47572
47576
|
"aria-label": t,
|
|
@@ -47578,19 +47582,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47578
47582
|
onContextMenu: c ? (e) => e.preventDefault() : void 0,
|
|
47579
47583
|
children: r
|
|
47580
47584
|
});
|
|
47581
|
-
},
|
|
47585
|
+
}, T0 = ({ groups: e, at: t, label: n, onClose: r }) => /* @__PURE__ */ K(w0, {
|
|
47582
47586
|
placement: {
|
|
47583
47587
|
kind: "pointer",
|
|
47584
47588
|
at: t
|
|
47585
47589
|
},
|
|
47586
47590
|
label: n,
|
|
47587
47591
|
onClose: r,
|
|
47588
|
-
children: /* @__PURE__ */ K(
|
|
47592
|
+
children: /* @__PURE__ */ K(C0, {
|
|
47589
47593
|
groups: e,
|
|
47590
47594
|
onChose: r
|
|
47591
47595
|
})
|
|
47592
|
-
}),
|
|
47593
|
-
let [e, t] = (0, y.useState)(null), [n, r] = (0, y.useState)(!1), i = (0, y.useCallback)(() =>
|
|
47596
|
+
}), E0 = () => Promise.race([Mz.info(), new Promise((e) => setTimeout(() => e(null), 4e3))]), D0 = () => {
|
|
47597
|
+
let [e, t] = (0, y.useState)(null), [n, r] = (0, y.useState)(!1), i = (0, y.useCallback)(() => E0().then((e) => {
|
|
47594
47598
|
t(e), r(!0);
|
|
47595
47599
|
}).catch(() => r(!0)), []);
|
|
47596
47600
|
return (0, y.useEffect)(() => {
|
|
@@ -47611,7 +47615,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47611
47615
|
await Mz.logout().catch(() => {}), await i();
|
|
47612
47616
|
}, [i])
|
|
47613
47617
|
};
|
|
47614
|
-
},
|
|
47618
|
+
}, O0 = "https://fkn.app/account", k0 = 8e3, A0 = G`
|
|
47615
47619
|
flex: none;
|
|
47616
47620
|
display: inline-flex;
|
|
47617
47621
|
align-items: center;
|
|
@@ -47683,7 +47687,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47683
47687
|
outline: none;
|
|
47684
47688
|
box-shadow: 0 0 0 2px ${eE};
|
|
47685
47689
|
}
|
|
47686
|
-
`,
|
|
47690
|
+
`, j0 = G`
|
|
47687
47691
|
display: flex;
|
|
47688
47692
|
align-items: center;
|
|
47689
47693
|
gap: 8px;
|
|
@@ -47721,8 +47725,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47721
47725
|
height: 15px;
|
|
47722
47726
|
color: ${Z};
|
|
47723
47727
|
}
|
|
47724
|
-
`,
|
|
47725
|
-
let t = ci(), { info: n, ready: r, logout: i } =
|
|
47728
|
+
`, M0 = ({ onToast: e }) => {
|
|
47729
|
+
let t = ci(), { info: n, ready: r, logout: i } = D0(), a = (0, y.useRef)(null), [o, s] = (0, y.useState)(!1), [c, l] = (0, y.useState)(!1), u = (0, y.useRef)(0), d = (0, y.useCallback)(() => s(!1), []);
|
|
47726
47730
|
(0, y.useEffect)(() => {
|
|
47727
47731
|
n || (s(!1), l(!1), u.current && Date.now() - u.current <= 8e3 && (u.current = 0, e(t.formatMessage({
|
|
47728
47732
|
id: "Disconnected",
|
|
@@ -47736,7 +47740,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47736
47740
|
let f = async () => {
|
|
47737
47741
|
u.current = Date.now(), l(!0);
|
|
47738
47742
|
try {
|
|
47739
|
-
await Promise.race([i(), new Promise((e) => setTimeout(e,
|
|
47743
|
+
await Promise.race([i(), new Promise((e) => setTimeout(e, k0))]);
|
|
47740
47744
|
} finally {
|
|
47741
47745
|
l(!1), s(!1);
|
|
47742
47746
|
}
|
|
@@ -47759,7 +47763,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47759
47763
|
});
|
|
47760
47764
|
return /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ q("button", {
|
|
47761
47765
|
className: "account-tag",
|
|
47762
|
-
css:
|
|
47766
|
+
css: A0,
|
|
47763
47767
|
type: "button",
|
|
47764
47768
|
ref: a,
|
|
47765
47769
|
"aria-haspopup": "menu",
|
|
@@ -47785,7 +47789,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47785
47789
|
className: "chevron",
|
|
47786
47790
|
"aria-hidden": "true"
|
|
47787
47791
|
})]
|
|
47788
|
-
}), o && (0, jY.createPortal)(/* @__PURE__ */ q(
|
|
47792
|
+
}), o && (0, jY.createPortal)(/* @__PURE__ */ q(w0, {
|
|
47789
47793
|
placement: {
|
|
47790
47794
|
kind: "under",
|
|
47791
47795
|
of: a
|
|
@@ -47796,10 +47800,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47796
47800
|
}, { name: p }),
|
|
47797
47801
|
onClose: d,
|
|
47798
47802
|
children: [/* @__PURE__ */ q("a", {
|
|
47799
|
-
css:
|
|
47803
|
+
css: j0,
|
|
47800
47804
|
role: "menuitem",
|
|
47801
47805
|
tabIndex: -1,
|
|
47802
|
-
href:
|
|
47806
|
+
href: O0,
|
|
47803
47807
|
target: "_blank",
|
|
47804
47808
|
rel: "noreferrer",
|
|
47805
47809
|
onClick: d,
|
|
@@ -47811,7 +47815,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47811
47815
|
})
|
|
47812
47816
|
})]
|
|
47813
47817
|
}), /* @__PURE__ */ q("button", {
|
|
47814
|
-
css:
|
|
47818
|
+
css: j0,
|
|
47815
47819
|
type: "button",
|
|
47816
47820
|
role: "menuitem",
|
|
47817
47821
|
tabIndex: -1,
|
|
@@ -47831,7 +47835,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
47831
47835
|
})]
|
|
47832
47836
|
})]
|
|
47833
47837
|
}), document.body)] });
|
|
47834
|
-
},
|
|
47838
|
+
}, N0 = G`
|
|
47835
47839
|
color: ${X};
|
|
47836
47840
|
width: 100%;
|
|
47837
47841
|
max-width: min(560px, calc(100vw - 32px));
|
|
@@ -48053,14 +48057,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48053
48057
|
}
|
|
48054
48058
|
}
|
|
48055
48059
|
}
|
|
48056
|
-
`,
|
|
48060
|
+
`, P0 = ({ title: e, groups: t, onClose: n }) => {
|
|
48057
48061
|
let r = ci(), i = (0, y.useRef)(null);
|
|
48058
48062
|
return /* @__PURE__ */ K(RY, {
|
|
48059
48063
|
labelledBy: "torrent-options-title",
|
|
48060
48064
|
onClose: n,
|
|
48061
48065
|
initialFocus: i,
|
|
48062
48066
|
children: /* @__PURE__ */ K("div", {
|
|
48063
|
-
css:
|
|
48067
|
+
css: N0,
|
|
48064
48068
|
children: /* @__PURE__ */ q("div", {
|
|
48065
48069
|
className: "card",
|
|
48066
48070
|
children: [
|
|
@@ -48154,10 +48158,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48154
48158
|
})
|
|
48155
48159
|
})
|
|
48156
48160
|
});
|
|
48157
|
-
},
|
|
48161
|
+
}, F0 = ({ dragging: e, overField: t, shareOpen: n }) => e ? n ? "share" : t ? "field" : "page" : null, I0 = St`
|
|
48158
48162
|
0%, 100% { opacity: 0.7; }
|
|
48159
48163
|
50% { opacity: 0.25; }
|
|
48160
|
-
`,
|
|
48164
|
+
`, L0 = G`
|
|
48161
48165
|
.badge {
|
|
48162
48166
|
flex: none;
|
|
48163
48167
|
display: inline-flex;
|
|
@@ -48196,7 +48200,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48196
48200
|
color: ${X};
|
|
48197
48201
|
|
|
48198
48202
|
&::before {
|
|
48199
|
-
animation: ${
|
|
48203
|
+
animation: ${I0} 1.6s ease-in-out infinite;
|
|
48200
48204
|
}
|
|
48201
48205
|
}
|
|
48202
48206
|
&.seeding { color: ${X}; }
|
|
@@ -48206,7 +48210,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48206
48210
|
color: ${X};
|
|
48207
48211
|
|
|
48208
48212
|
&::before {
|
|
48209
|
-
animation: ${
|
|
48213
|
+
animation: ${I0} 1.6s ease-in-out infinite;
|
|
48210
48214
|
}
|
|
48211
48215
|
}
|
|
48212
48216
|
|
|
@@ -48216,7 +48220,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48216
48220
|
color: ${Z};
|
|
48217
48221
|
|
|
48218
48222
|
&::before {
|
|
48219
|
-
animation: ${
|
|
48223
|
+
animation: ${I0} 1.6s ease-in-out infinite;
|
|
48220
48224
|
}
|
|
48221
48225
|
}
|
|
48222
48226
|
|
|
@@ -48231,17 +48235,17 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48231
48235
|
color: ${X};
|
|
48232
48236
|
|
|
48233
48237
|
&::before {
|
|
48234
|
-
animation: ${
|
|
48238
|
+
animation: ${I0} 1.6s ease-in-out infinite;
|
|
48235
48239
|
}
|
|
48236
48240
|
}
|
|
48237
48241
|
}
|
|
48238
|
-
`,
|
|
48242
|
+
`, R0 = yi({
|
|
48239
48243
|
id: "May be deleted to free space. Open options to keep it.",
|
|
48240
48244
|
defaultMessage: "May be deleted to free space. Open options to keep it."
|
|
48241
|
-
}),
|
|
48245
|
+
}), z0 = yi({
|
|
48242
48246
|
id: "Deleted to free space.",
|
|
48243
48247
|
defaultMessage: "Deleted to free space."
|
|
48244
|
-
}),
|
|
48248
|
+
}), B0 = (e) => e.ephemeral === !0, V0 = (e, t) => t === "all" ? [...e] : t === "temporary" ? e.filter(B0) : e.filter((e) => !B0(e)), H0 = tr({
|
|
48245
48249
|
added: {
|
|
48246
48250
|
id: "Date added",
|
|
48247
48251
|
defaultMessage: "Date added"
|
|
@@ -48274,7 +48278,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48274
48278
|
id: "Time left",
|
|
48275
48279
|
defaultMessage: "Time left"
|
|
48276
48280
|
}
|
|
48277
|
-
}),
|
|
48281
|
+
}), U0 = {
|
|
48278
48282
|
added: "desc",
|
|
48279
48283
|
name: "asc",
|
|
48280
48284
|
size: "desc",
|
|
@@ -48283,7 +48287,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48283
48287
|
up: "desc",
|
|
48284
48288
|
peers: "desc",
|
|
48285
48289
|
eta: "asc"
|
|
48286
|
-
},
|
|
48290
|
+
}, W0 = (e) => e.state === "missing" ? 2 : +(e.state === "starting"), G0 = (e, t) => {
|
|
48287
48291
|
let n = e.state === "starting" || e.state === "missing";
|
|
48288
48292
|
switch (t) {
|
|
48289
48293
|
case "name": return e.name;
|
|
@@ -48295,84 +48299,84 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48295
48299
|
case "up": return n ? null : e.up;
|
|
48296
48300
|
case "peers": return n ? null : e.peers;
|
|
48297
48301
|
}
|
|
48298
|
-
},
|
|
48299
|
-
if (
|
|
48300
|
-
let i =
|
|
48301
|
-
if (i === null && a === null) return
|
|
48302
|
+
}, K0 = (e, t) => (t.addedAt ?? 0) - (e.addedAt ?? 0) || e.id.localeCompare(t.id), q0 = (e, t) => (n, r) => {
|
|
48303
|
+
if (W0(n) !== W0(r)) return W0(n) - W0(r);
|
|
48304
|
+
let i = G0(n, e), a = G0(r, e);
|
|
48305
|
+
if (i === null && a === null) return K0(n, r);
|
|
48302
48306
|
if (i === null) return 1;
|
|
48303
48307
|
if (a === null) return -1;
|
|
48304
48308
|
let o = typeof i == "string" ? i.localeCompare(a, void 0, {
|
|
48305
48309
|
numeric: !0,
|
|
48306
48310
|
sensitivity: "base"
|
|
48307
48311
|
}) : i - a;
|
|
48308
|
-
return o === 0 ?
|
|
48309
|
-
},
|
|
48312
|
+
return o === 0 ? K0(n, r) : t === "asc" ? o : -o;
|
|
48313
|
+
}, J0 = (e, t, n) => [...e].sort(q0(t, n)), Y0 = [
|
|
48310
48314
|
"down",
|
|
48311
48315
|
"up",
|
|
48312
48316
|
"peers",
|
|
48313
48317
|
"progress",
|
|
48314
48318
|
"eta"
|
|
48315
|
-
],
|
|
48319
|
+
], X0 = (e) => Y0.includes(e), Z0 = ({ viewChanged: e, idsChanged: t, volatile: n, interacting: r, sinceMs: i }) => e || t || !n || i > 1e4 || i > 2e3 && !r, Q0 = "ripple:list-filter", $0 = "ripple:list-sort", e2 = "ripple:list-view", t2 = (e) => e === "all" || e === "library" || e === "temporary", n2 = (e) => e === "cards" || e === "table", r2 = (e) => typeof e == "string" && e in H0, i2 = (e) => e === "asc" || e === "desc", a2 = (e) => {
|
|
48316
48320
|
try {
|
|
48317
|
-
let t = e(
|
|
48318
|
-
return
|
|
48321
|
+
let t = e(Q0);
|
|
48322
|
+
return t2(t) ? t : "all";
|
|
48319
48323
|
} catch {
|
|
48320
48324
|
return "all";
|
|
48321
48325
|
}
|
|
48322
|
-
},
|
|
48326
|
+
}, o2 = (e) => {
|
|
48323
48327
|
try {
|
|
48324
|
-
let t = e(
|
|
48325
|
-
return
|
|
48328
|
+
let t = e(e2);
|
|
48329
|
+
return n2(t) ? t : "cards";
|
|
48326
48330
|
} catch {
|
|
48327
48331
|
return "cards";
|
|
48328
48332
|
}
|
|
48329
|
-
},
|
|
48333
|
+
}, s2 = {
|
|
48330
48334
|
key: "added",
|
|
48331
48335
|
dir: "desc"
|
|
48332
|
-
},
|
|
48336
|
+
}, c2 = (e) => {
|
|
48333
48337
|
try {
|
|
48334
48338
|
let [t, n] = (e("ripple:list-sort") ?? "").split(":");
|
|
48335
|
-
return
|
|
48339
|
+
return r2(t) && i2(n) ? {
|
|
48336
48340
|
key: t,
|
|
48337
48341
|
dir: n
|
|
48338
|
-
} :
|
|
48342
|
+
} : s2;
|
|
48339
48343
|
} catch {
|
|
48340
|
-
return
|
|
48344
|
+
return s2;
|
|
48341
48345
|
}
|
|
48342
|
-
},
|
|
48346
|
+
}, l2 = (e, t) => `${e}:${t}`, u2 = /* @__PURE__ */ new Set(), d2 = (e) => !!e.infoHash && e.state !== "starting", f2 = (e, t) => e.filter((e) => d2(e) && t.has(e.infoHash)), p2 = (e) => e.state === "paused" || e.state === "queued", m2 = (e) => e.filter((e) => e.state !== "missing" && !p2(e)), h2 = (e) => e.filter(p2), g2 = (e, t) => {
|
|
48343
48347
|
let n = new Set(e);
|
|
48344
48348
|
return n.delete(t) || n.add(t), n;
|
|
48345
|
-
},
|
|
48349
|
+
}, _2 = (e, t, n, r) => {
|
|
48346
48350
|
let i = t.findIndex((e) => e.infoHash === n), a = t.findIndex((e) => e.infoHash === r);
|
|
48347
|
-
if (i < 0 || a < 0) return
|
|
48351
|
+
if (i < 0 || a < 0) return g2(e, r);
|
|
48348
48352
|
let o = !e.has(r), s = new Set(e);
|
|
48349
|
-
for (let e of t.slice(Math.min(i, a), Math.max(i, a) + 1).filter(
|
|
48353
|
+
for (let e of t.slice(Math.min(i, a), Math.max(i, a) + 1).filter(d2)) o ? s.add(e.infoHash) : s.delete(e.infoHash);
|
|
48350
48354
|
return s;
|
|
48351
|
-
},
|
|
48355
|
+
}, v2 = (e) => new Set(e.filter(d2).map((e) => e.infoHash)), y2 = (e, t) => {
|
|
48352
48356
|
let n = new Set(t);
|
|
48353
48357
|
return [...e].every((e) => n.has(e)) ? e : new Set([...e].filter((e) => n.has(e)));
|
|
48354
|
-
},
|
|
48355
|
-
let [t, n] = (0, y.useState)(
|
|
48358
|
+
}, b2 = (e) => {
|
|
48359
|
+
let [t, n] = (0, y.useState)(u2), r = y2(t, e.map((e) => e.infoHash));
|
|
48356
48360
|
r !== t && n(r);
|
|
48357
48361
|
let i = (0, y.useRef)(e), a = (0, y.useRef)(null);
|
|
48358
48362
|
(0, y.useLayoutEffect)(() => {
|
|
48359
48363
|
i.current = e, e.some((e) => e.infoHash === a.current) || (a.current = null);
|
|
48360
48364
|
});
|
|
48361
|
-
let o =
|
|
48365
|
+
let o = f2(e, r), s = e.some(d2), c = s && o.length === e.filter(d2).length;
|
|
48362
48366
|
return {
|
|
48363
48367
|
picked: r,
|
|
48364
48368
|
rows: o,
|
|
48365
48369
|
canPick: s,
|
|
48366
48370
|
all: c,
|
|
48367
48371
|
toggle: (0, y.useCallback)((e, t = !1) => {
|
|
48368
|
-
if (!
|
|
48372
|
+
if (!d2(e)) return;
|
|
48369
48373
|
let r = t ? a.current : null, o = i.current;
|
|
48370
|
-
a.current = e.infoHash, n((t) =>
|
|
48374
|
+
a.current = e.infoHash, n((t) => _2(t, o, r, e.infoHash));
|
|
48371
48375
|
}, []),
|
|
48372
|
-
toggleAll: () => n(c ?
|
|
48373
|
-
clear: (0, y.useCallback)(() => n(
|
|
48376
|
+
toggleAll: () => n(c ? u2 : v2(e)),
|
|
48377
|
+
clear: (0, y.useCallback)(() => n(u2), [])
|
|
48374
48378
|
};
|
|
48375
|
-
},
|
|
48379
|
+
}, x2 = G`
|
|
48376
48380
|
flex: none;
|
|
48377
48381
|
display: inline-flex;
|
|
48378
48382
|
align-items: center;
|
|
@@ -48394,12 +48398,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48394
48398
|
|
|
48395
48399
|
&:focus-visible { outline: 2px solid ${eE}; outline-offset: 3px; }
|
|
48396
48400
|
}
|
|
48397
|
-
`,
|
|
48401
|
+
`, S2 = G`
|
|
48398
48402
|
input { box-shadow: 0 0 0 3px ${VT}; }
|
|
48399
|
-
`,
|
|
48403
|
+
`, C2 = ({ name: e, checked: t, onChange: n }) => {
|
|
48400
48404
|
let r = ci();
|
|
48401
48405
|
return /* @__PURE__ */ K("label", {
|
|
48402
|
-
css: [
|
|
48406
|
+
css: [x2, S2],
|
|
48403
48407
|
className: "row-check",
|
|
48404
48408
|
onClick: (e) => e.stopPropagation(),
|
|
48405
48409
|
children: /* @__PURE__ */ K("input", {
|
|
@@ -48412,7 +48416,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48412
48416
|
}, { name: e })
|
|
48413
48417
|
})
|
|
48414
48418
|
});
|
|
48415
|
-
},
|
|
48419
|
+
}, w2 = G`
|
|
48416
48420
|
flex: none;
|
|
48417
48421
|
display: flex;
|
|
48418
48422
|
align-items: center;
|
|
@@ -48464,7 +48468,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48464
48468
|
@media (max-width: 700px) {
|
|
48465
48469
|
button { min-width: 40px; height: 40px; }
|
|
48466
48470
|
}
|
|
48467
|
-
`,
|
|
48471
|
+
`, T2 = ({ count: e, canPause: t, canResume: n, onPause: r, onResume: i, onRemove: a, onClear: o }) => {
|
|
48468
48472
|
let s = ci(), c = s.formatMessage({
|
|
48469
48473
|
id: "Pause",
|
|
48470
48474
|
defaultMessage: "Pause"
|
|
@@ -48476,7 +48480,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48476
48480
|
defaultMessage: "Clear selection"
|
|
48477
48481
|
});
|
|
48478
48482
|
return /* @__PURE__ */ q("div", {
|
|
48479
|
-
css:
|
|
48483
|
+
css: w2,
|
|
48480
48484
|
className: "bulk-bar",
|
|
48481
48485
|
children: [
|
|
48482
48486
|
/* @__PURE__ */ K("span", {
|
|
@@ -48524,12 +48528,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48524
48528
|
})
|
|
48525
48529
|
]
|
|
48526
48530
|
});
|
|
48527
|
-
},
|
|
48531
|
+
}, E2 = G`
|
|
48528
48532
|
width: 100%;
|
|
48529
48533
|
border-collapse: collapse;
|
|
48530
48534
|
font-size: 0.82rem;
|
|
48531
48535
|
|
|
48532
|
-
${
|
|
48536
|
+
${L0}
|
|
48533
48537
|
|
|
48534
48538
|
th, td {
|
|
48535
48539
|
text-align: left;
|
|
@@ -48675,20 +48679,20 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48675
48679
|
.c-progress { display: none; }
|
|
48676
48680
|
td.c-status .badge { max-width: calc(100vw - 168px); }
|
|
48677
48681
|
}
|
|
48678
|
-
`,
|
|
48682
|
+
`, D2 = [
|
|
48679
48683
|
{
|
|
48680
48684
|
key: "name",
|
|
48681
|
-
label:
|
|
48685
|
+
label: H0.name
|
|
48682
48686
|
},
|
|
48683
48687
|
{
|
|
48684
48688
|
key: "size",
|
|
48685
|
-
label:
|
|
48689
|
+
label: H0.size,
|
|
48686
48690
|
cls: "c-size",
|
|
48687
48691
|
num: !0
|
|
48688
48692
|
},
|
|
48689
48693
|
{
|
|
48690
48694
|
key: "progress",
|
|
48691
|
-
label:
|
|
48695
|
+
label: H0.progress,
|
|
48692
48696
|
cls: "c-progress"
|
|
48693
48697
|
},
|
|
48694
48698
|
{
|
|
@@ -48719,7 +48723,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48719
48723
|
},
|
|
48720
48724
|
{
|
|
48721
48725
|
key: "peers",
|
|
48722
|
-
label:
|
|
48726
|
+
label: H0.peers,
|
|
48723
48727
|
cls: "c-peers",
|
|
48724
48728
|
num: !0
|
|
48725
48729
|
},
|
|
@@ -48732,15 +48736,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48732
48736
|
cls: "c-added",
|
|
48733
48737
|
num: !0
|
|
48734
48738
|
}
|
|
48735
|
-
],
|
|
48739
|
+
], O2 = {
|
|
48736
48740
|
asc: "↑",
|
|
48737
48741
|
desc: "↓"
|
|
48738
|
-
},
|
|
48742
|
+
}, k2 = "-", A2 = ({ torrents: e, sortKey: t, sortDir: n, onSort: r, selectedId: i, onSelect: a, onOptions: o, picked: s, onPick: c, transport: l }) => {
|
|
48739
48743
|
let u = ci();
|
|
48740
48744
|
return /* @__PURE__ */ q("table", {
|
|
48741
|
-
css:
|
|
48745
|
+
css: E2,
|
|
48742
48746
|
className: "torrent-table",
|
|
48743
|
-
children: [/* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", { children: [/* @__PURE__ */ K("td", { className: "check" }),
|
|
48747
|
+
children: [/* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", { children: [/* @__PURE__ */ K("td", { className: "check" }), D2.map((e) => {
|
|
48744
48748
|
let { key: i } = e, a = i !== null && i === t, o = u.formatMessage(e.label);
|
|
48745
48749
|
return /* @__PURE__ */ K("th", {
|
|
48746
48750
|
scope: "col",
|
|
@@ -48753,15 +48757,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48753
48757
|
children: o
|
|
48754
48758
|
}) : /* @__PURE__ */ q("button", {
|
|
48755
48759
|
type: "button",
|
|
48756
|
-
onClick: () => r(i, a ? n === "asc" ? "desc" : "asc" :
|
|
48760
|
+
onClick: () => r(i, a ? n === "asc" ? "desc" : "asc" : U0[i]),
|
|
48757
48761
|
...WY(u.formatMessage({
|
|
48758
48762
|
id: "Sort by {label}",
|
|
48759
48763
|
defaultMessage: "Sort by {label}"
|
|
48760
|
-
}, { label: u.formatMessage(
|
|
48764
|
+
}, { label: u.formatMessage(H0[i]) })),
|
|
48761
48765
|
children: [o, a && /* @__PURE__ */ K("span", {
|
|
48762
48766
|
className: "arrow",
|
|
48763
48767
|
"aria-hidden": "true",
|
|
48764
|
-
children:
|
|
48768
|
+
children: O2[n]
|
|
48765
48769
|
})]
|
|
48766
48770
|
})
|
|
48767
48771
|
}, e.label.id);
|
|
@@ -48777,7 +48781,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48777
48781
|
children: [
|
|
48778
48782
|
/* @__PURE__ */ K("td", {
|
|
48779
48783
|
className: "check",
|
|
48780
|
-
children:
|
|
48784
|
+
children: d2(e) && /* @__PURE__ */ K(C2, {
|
|
48781
48785
|
name: e.name,
|
|
48782
48786
|
checked: s.has(e.infoHash),
|
|
48783
48787
|
onChange: (t) => c(e, t)
|
|
@@ -48795,7 +48799,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48795
48799
|
id: "Temporary download",
|
|
48796
48800
|
defaultMessage: "Temporary download"
|
|
48797
48801
|
}),
|
|
48798
|
-
...WY(u.formatMessage(e.state === "missing" ?
|
|
48802
|
+
...WY(u.formatMessage(e.state === "missing" ? z0 : R0)),
|
|
48799
48803
|
children: /* @__PURE__ */ K(al, {
|
|
48800
48804
|
size: 13,
|
|
48801
48805
|
"aria-hidden": "true"
|
|
@@ -48808,7 +48812,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48808
48812
|
}),
|
|
48809
48813
|
/* @__PURE__ */ K("td", {
|
|
48810
48814
|
className: "c-size num",
|
|
48811
|
-
children: e.size > 0 ? NE(e.size) :
|
|
48815
|
+
children: e.size > 0 ? NE(e.size) : k2
|
|
48812
48816
|
}),
|
|
48813
48817
|
/* @__PURE__ */ K("td", {
|
|
48814
48818
|
className: "c-progress",
|
|
@@ -48835,37 +48839,37 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48835
48839
|
children: /* @__PURE__ */ K("span", {
|
|
48836
48840
|
className: "badge " + e.state,
|
|
48837
48841
|
...WY(e.noPeers && l === "direct" ? iW(l) : null),
|
|
48838
|
-
children: u.formatMessage(
|
|
48842
|
+
children: u.formatMessage(aQ[e.state])
|
|
48839
48843
|
})
|
|
48840
48844
|
}),
|
|
48841
48845
|
/* @__PURE__ */ K("td", {
|
|
48842
48846
|
className: "c-down num",
|
|
48843
|
-
children: e.down > 0 ?
|
|
48847
|
+
children: e.down > 0 ? oQ(e.down) : k2
|
|
48844
48848
|
}),
|
|
48845
48849
|
/* @__PURE__ */ K("td", {
|
|
48846
48850
|
className: "c-up num",
|
|
48847
|
-
children: e.up > 0 ?
|
|
48851
|
+
children: e.up > 0 ? oQ(e.up) : k2
|
|
48848
48852
|
}),
|
|
48849
48853
|
/* @__PURE__ */ K("td", {
|
|
48850
48854
|
className: "c-peers num",
|
|
48851
|
-
children: e.state === "missing" ?
|
|
48855
|
+
children: e.state === "missing" ? k2 : e.peers
|
|
48852
48856
|
}),
|
|
48853
48857
|
/* @__PURE__ */ K("td", {
|
|
48854
48858
|
className: "c-added num",
|
|
48855
|
-
children:
|
|
48859
|
+
children: sQ(e.addedAt)
|
|
48856
48860
|
})
|
|
48857
48861
|
]
|
|
48858
48862
|
}, e.id)) })]
|
|
48859
48863
|
});
|
|
48860
|
-
},
|
|
48861
|
-
let a = (0, y.useRef)([]), o = (0, y.useRef)(0), s = (0, y.useRef)(""), c = (0, y.useRef)(!1), l =
|
|
48862
|
-
|
|
48864
|
+
}, j2 = (e, t, n, r, i = () => Date.now()) => {
|
|
48865
|
+
let a = (0, y.useRef)([]), o = (0, y.useRef)(0), s = (0, y.useRef)(""), c = (0, y.useRef)(!1), l = V0(e, t), u = new Map(l.map((e) => [e.id, e])), d = `${t}:${n}:${r}`;
|
|
48866
|
+
Z0({
|
|
48863
48867
|
viewChanged: s.current !== d,
|
|
48864
48868
|
idsChanged: a.current.length !== l.length || a.current.some((e) => !u.has(e)),
|
|
48865
|
-
volatile:
|
|
48869
|
+
volatile: X0(n),
|
|
48866
48870
|
interacting: c.current,
|
|
48867
48871
|
sinceMs: i() - o.current
|
|
48868
|
-
}) && (a.current =
|
|
48872
|
+
}) && (a.current = J0(l, n, r).map((e) => e.id), o.current = i(), s.current = d);
|
|
48869
48873
|
let f = [], p = /* @__PURE__ */ new Set();
|
|
48870
48874
|
for (let e of a.current) {
|
|
48871
48875
|
let t = u.get(e);
|
|
@@ -48889,7 +48893,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48889
48893
|
}, [])
|
|
48890
48894
|
}
|
|
48891
48895
|
};
|
|
48892
|
-
},
|
|
48896
|
+
}, M2 = G`
|
|
48893
48897
|
flex: none;
|
|
48894
48898
|
display: flex;
|
|
48895
48899
|
align-items: center;
|
|
@@ -48996,7 +49000,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
48996
49000
|
|
|
48997
49001
|
/* pushed to the far end: it changes the shape of the page rather than its contents */
|
|
48998
49002
|
.views { margin-left: auto; }
|
|
48999
|
-
`,
|
|
49003
|
+
`, N2 = ({ filter: e, onFilter: t, sortKey: n, sortDir: r, onSort: i, view: a, onView: o, temporaryCount: s, picked: c, canPick: l, onPickAll: u }) => {
|
|
49000
49004
|
let d = ci(), f = (0, y.useRef)(null);
|
|
49001
49005
|
(0, y.useEffect)(() => {
|
|
49002
49006
|
f.current && (f.current.indeterminate = c === "some");
|
|
@@ -49006,11 +49010,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49006
49010
|
defaultMessage: "Select all"
|
|
49007
49011
|
});
|
|
49008
49012
|
return /* @__PURE__ */ q("div", {
|
|
49009
|
-
css:
|
|
49013
|
+
css: M2,
|
|
49010
49014
|
className: "list-toolbar",
|
|
49011
49015
|
children: [
|
|
49012
49016
|
/* @__PURE__ */ K("label", {
|
|
49013
|
-
css:
|
|
49017
|
+
css: x2,
|
|
49014
49018
|
className: "pick-all",
|
|
49015
49019
|
...WY(p),
|
|
49016
49020
|
children: /* @__PURE__ */ K("input", {
|
|
@@ -49084,11 +49088,11 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49084
49088
|
value: n,
|
|
49085
49089
|
onChange: (e) => {
|
|
49086
49090
|
let t = e.target.value;
|
|
49087
|
-
i(t,
|
|
49091
|
+
i(t, U0[t]);
|
|
49088
49092
|
},
|
|
49089
|
-
children: Object.keys(
|
|
49093
|
+
children: Object.keys(H0).map((e) => /* @__PURE__ */ K("option", {
|
|
49090
49094
|
value: e,
|
|
49091
|
-
children: d.formatMessage(
|
|
49095
|
+
children: d.formatMessage(H0[e])
|
|
49092
49096
|
}, e))
|
|
49093
49097
|
})]
|
|
49094
49098
|
}),
|
|
@@ -49141,18 +49145,18 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49141
49145
|
})
|
|
49142
49146
|
]
|
|
49143
49147
|
});
|
|
49144
|
-
},
|
|
49145
|
-
let r =
|
|
49148
|
+
}, P2 = (e, t) => (e.flags & t) !== 0, F2 = (e) => e.state === "missing", I2 = (e) => F2(e) || e.state === "starting", L2 = (e, t, n = { savedToUserStorage: !1 }) => {
|
|
49149
|
+
let r = I2(e) ? F2(e) ? Q.formatMessage({
|
|
49146
49150
|
id: "Not on this device",
|
|
49147
49151
|
defaultMessage: "Not on this device"
|
|
49148
49152
|
}) : Q.formatMessage({
|
|
49149
49153
|
id: "Still starting",
|
|
49150
49154
|
defaultMessage: "Still starting"
|
|
49151
|
-
}) : void 0, i = e.progress >= 1, a =
|
|
49155
|
+
}) : void 0, i = e.progress >= 1, a = P2(e, aD.sequentialDownload), o = Aq(e.files).length > 1, s = n.sessionLimits ?? {
|
|
49152
49156
|
down: 0,
|
|
49153
49157
|
up: 0
|
|
49154
49158
|
}, c = [];
|
|
49155
|
-
Pq(e) && !
|
|
49159
|
+
Pq(e) && !F2(e) && c.push({
|
|
49156
49160
|
kind: "action",
|
|
49157
49161
|
id: "watch",
|
|
49158
49162
|
label: Q.formatMessage({
|
|
@@ -49160,7 +49164,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49160
49164
|
defaultMessage: "Watch"
|
|
49161
49165
|
}),
|
|
49162
49166
|
run: t.watch
|
|
49163
|
-
}),
|
|
49167
|
+
}), F2(e) && e.saveTo !== "source" && c.push({
|
|
49164
49168
|
kind: "action",
|
|
49165
49169
|
id: "start",
|
|
49166
49170
|
label: Q.formatMessage({
|
|
@@ -49168,7 +49172,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49168
49172
|
defaultMessage: "Download to this device"
|
|
49169
49173
|
}),
|
|
49170
49174
|
run: t.start
|
|
49171
|
-
}), Aq(e.files).length && i && !
|
|
49175
|
+
}), Aq(e.files).length && i && !F2(e) && c.push({
|
|
49172
49176
|
kind: "action",
|
|
49173
49177
|
id: "save",
|
|
49174
49178
|
label: o ? Q.formatMessage({
|
|
@@ -49202,7 +49206,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49202
49206
|
id: "Save .torrent",
|
|
49203
49207
|
defaultMessage: "Save .torrent"
|
|
49204
49208
|
}),
|
|
49205
|
-
disabled: e.files?.length ? void 0 :
|
|
49209
|
+
disabled: e.files?.length ? void 0 : F2(e) ? Q.formatMessage({
|
|
49206
49210
|
id: "Not on this device",
|
|
49207
49211
|
defaultMessage: "Not on this device"
|
|
49208
49212
|
}) : Q.formatMessage({
|
|
@@ -49253,7 +49257,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49253
49257
|
defaultMessage: "Try again now"
|
|
49254
49258
|
}),
|
|
49255
49259
|
run: t.retryNow
|
|
49256
|
-
}),
|
|
49260
|
+
}), F2(e) ? u.push({
|
|
49257
49261
|
kind: "action",
|
|
49258
49262
|
id: "remove",
|
|
49259
49263
|
label: Q.formatMessage({
|
|
@@ -49290,8 +49294,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49290
49294
|
defaultMessage: "Manage"
|
|
49291
49295
|
}),
|
|
49292
49296
|
items: u
|
|
49293
|
-
}), n.folderReady && !
|
|
49294
|
-
let e = n.intended ?? "browser", r =
|
|
49297
|
+
}), n.folderReady && !I2(e)) {
|
|
49298
|
+
let e = n.intended ?? "browser", r = p$(f$({
|
|
49295
49299
|
current: n.current ?? "browser",
|
|
49296
49300
|
intended: e,
|
|
49297
49301
|
complete: i,
|
|
@@ -49464,7 +49468,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49464
49468
|
id: "Disable DHT for this torrent",
|
|
49465
49469
|
defaultMessage: "Disable DHT for this torrent"
|
|
49466
49470
|
}),
|
|
49467
|
-
checked:
|
|
49471
|
+
checked: P2(e, aD.disableDht),
|
|
49468
49472
|
disabled: r,
|
|
49469
49473
|
apply: (e) => t.setFlags(e ? aD.disableDht : 0, aD.disableDht)
|
|
49470
49474
|
},
|
|
@@ -49475,7 +49479,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49475
49479
|
id: "Disable PeX for this torrent",
|
|
49476
49480
|
defaultMessage: "Disable PeX for this torrent"
|
|
49477
49481
|
}),
|
|
49478
|
-
checked:
|
|
49482
|
+
checked: P2(e, aD.disablePex),
|
|
49479
49483
|
disabled: r,
|
|
49480
49484
|
apply: (e) => t.setFlags(e ? aD.disablePex : 0, aD.disablePex)
|
|
49481
49485
|
},
|
|
@@ -49503,7 +49507,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49503
49507
|
id: "Upload mode",
|
|
49504
49508
|
defaultMessage: "Upload mode"
|
|
49505
49509
|
}),
|
|
49506
|
-
checked:
|
|
49510
|
+
checked: P2(e, aD.uploadMode),
|
|
49507
49511
|
disabled: r,
|
|
49508
49512
|
apply: (e) => t.setFlags(e ? aD.uploadMode : 0, aD.uploadMode)
|
|
49509
49513
|
}, {
|
|
@@ -49513,14 +49517,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49513
49517
|
id: "Super seeding mode",
|
|
49514
49518
|
defaultMessage: "Super seeding mode"
|
|
49515
49519
|
}),
|
|
49516
|
-
checked:
|
|
49520
|
+
checked: P2(e, aD.superSeeding),
|
|
49517
49521
|
disabled: r ?? (i ? void 0 : Q.formatMessage({
|
|
49518
49522
|
id: "Available once downloaded",
|
|
49519
49523
|
defaultMessage: "Available once downloaded"
|
|
49520
49524
|
})),
|
|
49521
49525
|
apply: (e) => t.setFlags(e ? aD.superSeeding : 0, aD.superSeeding)
|
|
49522
49526
|
}]
|
|
49523
|
-
}), e.queuePosition >= 0 && !
|
|
49527
|
+
}), e.queuePosition >= 0 && !F2(e) && l.push({
|
|
49524
49528
|
id: "queue",
|
|
49525
49529
|
label: Q.formatMessage({
|
|
49526
49530
|
id: "Queue position {position}",
|
|
@@ -49566,7 +49570,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49566
49570
|
run: () => t.moveInQueue(r)
|
|
49567
49571
|
}))
|
|
49568
49572
|
}), l;
|
|
49569
|
-
},
|
|
49573
|
+
}, R2 = (e) => {
|
|
49570
49574
|
let [t, n] = (0, y.useState)(null), r = e?.id, i = e?.infoHash, a = e?.magnet;
|
|
49571
49575
|
return (0, y.useEffect)(() => {
|
|
49572
49576
|
if (r === void 0) return;
|
|
@@ -49588,10 +49592,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49588
49592
|
i,
|
|
49589
49593
|
a
|
|
49590
49594
|
]), e && t?.id === e.id && t.from === e.magnet ? t : null;
|
|
49591
|
-
},
|
|
49595
|
+
}, z2 = "Ripple", B2 = "v0.0.43 · e5ad2c2", V2 = (e) => /^magnet:\?/i.test(e.trim()), H2 = (e) => {
|
|
49592
49596
|
let t = e?.types;
|
|
49593
49597
|
return t ? [...t].some((e) => e === "Files" || e === "text/uri-list") : !1;
|
|
49594
|
-
},
|
|
49598
|
+
}, U2 = ({ quota: e }) => {
|
|
49595
49599
|
let t = ci(), n = /* @__PURE__ */ K("label", { children: t.formatMessage({
|
|
49596
49600
|
id: "FKN quota",
|
|
49597
49601
|
defaultMessage: "FKN quota"
|
|
@@ -49630,7 +49634,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49630
49634
|
defaultMessage: "{size} left"
|
|
49631
49635
|
}, { size: NE(e.remainingBytes, !0) }) })]
|
|
49632
49636
|
});
|
|
49633
|
-
},
|
|
49637
|
+
}, W2 = ({ storage: e, low: t }) => {
|
|
49634
49638
|
let n = ci();
|
|
49635
49639
|
return /* @__PURE__ */ q("div", {
|
|
49636
49640
|
className: "stat storage" + (t ? " low" : ""),
|
|
@@ -49645,7 +49649,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49645
49649
|
total: NE(e.limitBytes, !0)
|
|
49646
49650
|
}) })]
|
|
49647
49651
|
});
|
|
49648
|
-
},
|
|
49652
|
+
}, G2 = tr({
|
|
49649
49653
|
"signed-out": {
|
|
49650
49654
|
id: "Connect an account to sync your library.",
|
|
49651
49655
|
defaultMessage: "Connect an account to sync your library."
|
|
@@ -49682,7 +49686,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49682
49686
|
id: "Could not save your library. Retrying on the next change.",
|
|
49683
49687
|
defaultMessage: "Could not save your library. Retrying on the next change."
|
|
49684
49688
|
}
|
|
49685
|
-
}),
|
|
49689
|
+
}), K2 = ({ state: e }) => {
|
|
49686
49690
|
let t = ci(), { status: n, reason: r } = e;
|
|
49687
49691
|
if (n === "off") return null;
|
|
49688
49692
|
let i = n === "syncing" ? t.formatMessage({
|
|
@@ -49697,7 +49701,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49697
49701
|
});
|
|
49698
49702
|
return /* @__PURE__ */ q("div", {
|
|
49699
49703
|
className: "stat sync" + (n === "error" ? " error" : ""),
|
|
49700
|
-
...WY(r ? t.formatMessage(
|
|
49704
|
+
...WY(r ? t.formatMessage(G2[r]) : void 0),
|
|
49701
49705
|
children: [/* @__PURE__ */ K("label", { children: t.formatMessage({
|
|
49702
49706
|
id: "Library",
|
|
49703
49707
|
defaultMessage: "Library"
|
|
@@ -49706,7 +49710,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49706
49710
|
children: i
|
|
49707
49711
|
})]
|
|
49708
49712
|
});
|
|
49709
|
-
},
|
|
49713
|
+
}, q2 = ({ reachable: e, inboundNow: t = lD }) => {
|
|
49710
49714
|
let n = ci();
|
|
49711
49715
|
if (!e) return null;
|
|
49712
49716
|
let { port: r, inbound: i, listenFailed: a } = e, o = e.listeners ?? [], s = e.portOpen ?? !0, c = a.length > 0, l = uD(t), u = !!r && !s && o.some((e) => e.healing), d = c ? n.formatMessage({
|
|
@@ -49755,10 +49759,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
49755
49759
|
children: d
|
|
49756
49760
|
})]
|
|
49757
49761
|
});
|
|
49758
|
-
},
|
|
49762
|
+
}, J2 = 120, Y2 = 60, X2 = Infinity, Z2 = 3e4, Q2 = (e, t) => {
|
|
49759
49763
|
let n = e.infoHash;
|
|
49760
49764
|
return !navigator.locks || !n ? t() : navigator.locks.request(`ripple:folder-sync:${n}`, { ifAvailable: !0 }, (e) => e ? t() : Promise.resolve(null));
|
|
49761
|
-
},
|
|
49765
|
+
}, $2 = G`
|
|
49762
49766
|
/* dvh minus whatever the broker reserved at the top, so docking its header does not push the
|
|
49763
49767
|
footer under the fold. See the root rule in index.tsx for what writes the variable. */
|
|
49764
49768
|
height: calc(100dvh - var(--fkn-inset-top, 0px));
|
|
@@ -50328,7 +50332,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
50328
50332
|
}
|
|
50329
50333
|
|
|
50330
50334
|
/* the state chip, shared with the table view so there is one source for it */
|
|
50331
|
-
${
|
|
50335
|
+
${L0}
|
|
50332
50336
|
|
|
50333
50337
|
/* why a torrent stalled and when it tries again, brighter than the meta numbers it sits among so
|
|
50334
50338
|
it does not read as one more of them */
|
|
@@ -51021,7 +51025,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51021
51025
|
min-height: 64px;
|
|
51022
51026
|
}
|
|
51023
51027
|
}
|
|
51024
|
-
`,
|
|
51028
|
+
`, e4 = G`
|
|
51025
51029
|
position: fixed;
|
|
51026
51030
|
pointer-events: none;
|
|
51027
51031
|
bottom: 52px;
|
|
@@ -51046,8 +51050,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51046
51050
|
transform: translateX(-50%) translateY(0);
|
|
51047
51051
|
}
|
|
51048
51052
|
}
|
|
51049
|
-
`,
|
|
51050
|
-
let t = Math.max(...e, 1), n =
|
|
51053
|
+
`, t4 = ({ history: e }) => {
|
|
51054
|
+
let t = Math.max(...e, 1), n = J2 - e.length, r = e.map((e, r) => `${((n + r) / 119 * 100).toFixed(2)},${(29 - e / t * 26).toFixed(2)}`).join(" ");
|
|
51051
51055
|
return r ? /* @__PURE__ */ q("svg", {
|
|
51052
51056
|
className: "graph",
|
|
51053
51057
|
viewBox: "0 0 100 30",
|
|
@@ -51058,9 +51062,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51058
51062
|
points: `${(n / 119 * 100).toFixed(2)},30 ${r} 100,30`
|
|
51059
51063
|
}), /* @__PURE__ */ K("polyline", { points: r })]
|
|
51060
51064
|
}) : null;
|
|
51061
|
-
},
|
|
51065
|
+
}, n4 = ({ down: e, up: t }) => {
|
|
51062
51066
|
let n = Math.max(...e, ...t, 1), r = (e) => {
|
|
51063
|
-
let t =
|
|
51067
|
+
let t = Y2 - e.length;
|
|
51064
51068
|
return e.map((e, r) => `${((t + r) / 59 * 100).toFixed(2)},${(25 - e / n * 23).toFixed(2)}`).join(" ");
|
|
51065
51069
|
};
|
|
51066
51070
|
if (!e.length) return null;
|
|
@@ -51073,7 +51077,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51073
51077
|
children: [
|
|
51074
51078
|
/* @__PURE__ */ K("polygon", {
|
|
51075
51079
|
className: "down-fill",
|
|
51076
|
-
points: `${((
|
|
51080
|
+
points: `${((Y2 - e.length) / 59 * 100).toFixed(2)},26 ${i} 100,26`
|
|
51077
51081
|
}),
|
|
51078
51082
|
/* @__PURE__ */ K("polyline", {
|
|
51079
51083
|
className: "down-line",
|
|
@@ -51085,21 +51089,21 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51085
51089
|
})
|
|
51086
51090
|
]
|
|
51087
51091
|
});
|
|
51088
|
-
},
|
|
51092
|
+
}, r4 = (e, t) => `${e}:${t}`, i4 = ({ url: e, t }) => e ? /* @__PURE__ */ K("img", {
|
|
51089
51093
|
className: "poster",
|
|
51090
51094
|
src: e,
|
|
51091
51095
|
alt: ""
|
|
51092
51096
|
}) : /* @__PURE__ */ K("div", {
|
|
51093
51097
|
className: "poster placeholder",
|
|
51094
|
-
children: /* @__PURE__ */ K(
|
|
51098
|
+
children: /* @__PURE__ */ K(KZ, {
|
|
51095
51099
|
name: t.name,
|
|
51096
51100
|
files: t.files
|
|
51097
51101
|
})
|
|
51098
|
-
}),
|
|
51102
|
+
}), a4 = ({ t: e, poster: t }) => {
|
|
51099
51103
|
let n = ci();
|
|
51100
51104
|
return /* @__PURE__ */ q("div", {
|
|
51101
51105
|
className: "torrent surface starting",
|
|
51102
|
-
children: [/* @__PURE__ */ K(
|
|
51106
|
+
children: [/* @__PURE__ */ K(i4, {
|
|
51103
51107
|
url: t,
|
|
51104
51108
|
t: e
|
|
51105
51109
|
}), /* @__PURE__ */ K("div", {
|
|
@@ -51122,13 +51126,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51122
51126
|
className: "side",
|
|
51123
51127
|
children: /* @__PURE__ */ K("span", {
|
|
51124
51128
|
className: `badge ${e.state}`,
|
|
51125
|
-
children: n.formatMessage(
|
|
51129
|
+
children: n.formatMessage(aQ[e.state])
|
|
51126
51130
|
})
|
|
51127
51131
|
})]
|
|
51128
51132
|
})
|
|
51129
51133
|
})]
|
|
51130
51134
|
});
|
|
51131
|
-
},
|
|
51135
|
+
}, o4 = ({ t: e, poster: t, onStart: n, onOptions: r, selected: i, onSelect: a, checked: o, onPick: s }) => {
|
|
51132
51136
|
let c = ci();
|
|
51133
51137
|
return /* @__PURE__ */ q("div", {
|
|
51134
51138
|
className: "torrent surface missing" + (i ? " selected" : ""),
|
|
@@ -51143,12 +51147,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51143
51147
|
}));
|
|
51144
51148
|
},
|
|
51145
51149
|
children: [
|
|
51146
|
-
|
|
51150
|
+
d2(e) && /* @__PURE__ */ K(C2, {
|
|
51147
51151
|
name: e.name,
|
|
51148
51152
|
checked: o,
|
|
51149
51153
|
onChange: (t) => s(e, t)
|
|
51150
51154
|
}),
|
|
51151
|
-
/* @__PURE__ */ K(
|
|
51155
|
+
/* @__PURE__ */ K(i4, {
|
|
51152
51156
|
url: t,
|
|
51153
51157
|
t: e
|
|
51154
51158
|
}),
|
|
@@ -51171,7 +51175,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51171
51175
|
id: "Temporary download: options for {name}",
|
|
51172
51176
|
defaultMessage: "Temporary download: options for {name}"
|
|
51173
51177
|
}, { name: e.name }),
|
|
51174
|
-
...WY(c.formatMessage(
|
|
51178
|
+
...WY(c.formatMessage(z0)),
|
|
51175
51179
|
children: [/* @__PURE__ */ K(al, { "aria-hidden": "true" }), c.formatMessage({
|
|
51176
51180
|
id: "Temporary",
|
|
51177
51181
|
defaultMessage: "Temporary"
|
|
@@ -51188,7 +51192,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51188
51192
|
className: "side",
|
|
51189
51193
|
children: [/* @__PURE__ */ K("span", {
|
|
51190
51194
|
className: `badge ${e.state}`,
|
|
51191
|
-
children: c.formatMessage(
|
|
51195
|
+
children: c.formatMessage(aQ[e.state])
|
|
51192
51196
|
}), /* @__PURE__ */ q("div", {
|
|
51193
51197
|
className: "actions",
|
|
51194
51198
|
children: [e.saveTo !== "source" && /* @__PURE__ */ K("button", {
|
|
@@ -51229,19 +51233,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51229
51233
|
})
|
|
51230
51234
|
]
|
|
51231
51235
|
});
|
|
51232
|
-
},
|
|
51236
|
+
}, s4 = [
|
|
51233
51237
|
999.9,
|
|
51234
51238
|
999900,
|
|
51235
51239
|
9999e5,
|
|
51236
51240
|
99995e4,
|
|
51237
51241
|
999e7
|
|
51238
|
-
],
|
|
51242
|
+
], c4 = [
|
|
51239
51243
|
999.9,
|
|
51240
51244
|
999900,
|
|
51241
51245
|
9999e5,
|
|
51242
51246
|
99999e7,
|
|
51243
51247
|
99999e10
|
|
51244
|
-
],
|
|
51248
|
+
], l4 = (e, t) => t.map(e).join("\n"), u4 = (e, t) => {
|
|
51245
51249
|
let n = NE(t, !0), r = (t) => e.formatMessage({
|
|
51246
51250
|
id: "{done} / {total}",
|
|
51247
51251
|
defaultMessage: "{done} / {total}"
|
|
@@ -51251,10 +51255,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51251
51255
|
}), i = (t) => e.formatMessage({
|
|
51252
51256
|
id: "↓ {speed}",
|
|
51253
51257
|
defaultMessage: "↓ {speed}"
|
|
51254
|
-
}, { speed:
|
|
51258
|
+
}, { speed: oQ(t) }), a = (t) => e.formatMessage({
|
|
51255
51259
|
id: "↑ {speed}",
|
|
51256
51260
|
defaultMessage: "↑ {speed}"
|
|
51257
|
-
}, { speed:
|
|
51261
|
+
}, { speed: oQ(t) }), o = (t) => e.formatMessage({
|
|
51258
51262
|
id: "{count, plural, one {{count} peers} other {{count} peers}}",
|
|
51259
51263
|
defaultMessage: "{count, plural, one {{count} peers} other {{count} peers}}"
|
|
51260
51264
|
}, { count: t });
|
|
@@ -51264,24 +51268,24 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51264
51268
|
up: a,
|
|
51265
51269
|
peers: o,
|
|
51266
51270
|
rooms: {
|
|
51267
|
-
pair:
|
|
51268
|
-
down:
|
|
51269
|
-
up:
|
|
51271
|
+
pair: l4(r, c4),
|
|
51272
|
+
down: l4(i, s4),
|
|
51273
|
+
up: l4(a, s4),
|
|
51270
51274
|
peers: o(999)
|
|
51271
51275
|
}
|
|
51272
51276
|
};
|
|
51273
|
-
},
|
|
51277
|
+
}, d4 = (e, t) => {
|
|
51274
51278
|
if (e === t) return !0;
|
|
51275
51279
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
51276
51280
|
let n = Object.keys(e);
|
|
51277
|
-
return n.length === Object.keys(t).length && n.every((n) =>
|
|
51278
|
-
},
|
|
51279
|
-
let m = ci(), h =
|
|
51280
|
-
if (e.state === "starting") return /* @__PURE__ */ K(
|
|
51281
|
+
return n.length === Object.keys(t).length && n.every((n) => d4(e[n], t[n]));
|
|
51282
|
+
}, f4 = (0, y.memo)(({ t: e, saving: t, onToggle: n, onSave: r, onSaveZip: i, onStart: a, onOptions: o, selected: s, onSelect: c, checked: l, onPick: u, savedToUserStorage: d, rates: f, transport: p }) => {
|
|
51283
|
+
let m = ci(), h = EZ(e.infoHash), g = (0, y.useMemo)(() => u4(m, e.size), [m, e.size]);
|
|
51284
|
+
if (e.state === "starting") return /* @__PURE__ */ K(a4, {
|
|
51281
51285
|
t: e,
|
|
51282
51286
|
poster: h
|
|
51283
51287
|
});
|
|
51284
|
-
if (e.state === "missing") return /* @__PURE__ */ K(
|
|
51288
|
+
if (e.state === "missing") return /* @__PURE__ */ K(o4, {
|
|
51285
51289
|
t: e,
|
|
51286
51290
|
poster: h,
|
|
51287
51291
|
onStart: a,
|
|
@@ -51291,9 +51295,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51291
51295
|
checked: l,
|
|
51292
51296
|
onPick: u
|
|
51293
51297
|
});
|
|
51294
|
-
let _ = Fq(e), v = Nq(e.files), b = Aq(e.files).length > 1, x = t[
|
|
51298
|
+
let _ = Fq(e), v = Nq(e.files), b = Aq(e.files).length > 1, x = t[r4(e.id, b ? -1 : v)], S = e.progress >= 1, C = e.state !== "paused" && e.state !== "queued", w = {};
|
|
51295
51299
|
return e.files?.forEach((n, r) => {
|
|
51296
|
-
let i = t[
|
|
51300
|
+
let i = t[r4(e.id, r)];
|
|
51297
51301
|
i != null && (w[r] = i);
|
|
51298
51302
|
}), /* @__PURE__ */ q("div", {
|
|
51299
51303
|
className: "torrent surface" + (s ? " selected" : ""),
|
|
@@ -51308,12 +51312,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51308
51312
|
}));
|
|
51309
51313
|
},
|
|
51310
51314
|
children: [
|
|
51311
|
-
|
|
51315
|
+
d2(e) && /* @__PURE__ */ K(C2, {
|
|
51312
51316
|
name: e.name,
|
|
51313
51317
|
checked: l,
|
|
51314
51318
|
onChange: (t) => u(e, t)
|
|
51315
51319
|
}),
|
|
51316
|
-
/* @__PURE__ */ K(
|
|
51320
|
+
/* @__PURE__ */ K(i4, {
|
|
51317
51321
|
url: h,
|
|
51318
51322
|
t: e
|
|
51319
51323
|
}),
|
|
@@ -51340,7 +51344,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51340
51344
|
id: "Temporary download: options for {name}",
|
|
51341
51345
|
defaultMessage: "Temporary download: options for {name}"
|
|
51342
51346
|
}, { name: e.name }),
|
|
51343
|
-
...WY(m.formatMessage(
|
|
51347
|
+
...WY(m.formatMessage(R0)),
|
|
51344
51348
|
children: [/* @__PURE__ */ K(al, { "aria-hidden": "true" }), m.formatMessage({
|
|
51345
51349
|
id: "Temporary",
|
|
51346
51350
|
defaultMessage: "Temporary"
|
|
@@ -51396,7 +51400,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51396
51400
|
}),
|
|
51397
51401
|
e.retry ? /* @__PURE__ */ K("span", {
|
|
51398
51402
|
className: "retry",
|
|
51399
|
-
children:
|
|
51403
|
+
children: cQ(e, e.retry)
|
|
51400
51404
|
}) : e.noPeers && p === "direct" && /* @__PURE__ */ K("span", {
|
|
51401
51405
|
className: "retry",
|
|
51402
51406
|
children: iW(p)
|
|
@@ -51412,7 +51416,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51412
51416
|
})
|
|
51413
51417
|
]
|
|
51414
51418
|
}),
|
|
51415
|
-
f && /* @__PURE__ */ K(
|
|
51419
|
+
f && /* @__PURE__ */ K(n4, {
|
|
51416
51420
|
down: f.down,
|
|
51417
51421
|
up: f.up
|
|
51418
51422
|
}),
|
|
@@ -51421,7 +51425,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51421
51425
|
children: [
|
|
51422
51426
|
/* @__PURE__ */ K("span", {
|
|
51423
51427
|
className: `badge ${e.state}`,
|
|
51424
|
-
children: m.formatMessage(
|
|
51428
|
+
children: m.formatMessage(aQ[e.state])
|
|
51425
51429
|
}),
|
|
51426
51430
|
/* @__PURE__ */ K("span", {
|
|
51427
51431
|
className: "pct",
|
|
@@ -51521,7 +51525,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51521
51525
|
})
|
|
51522
51526
|
]
|
|
51523
51527
|
});
|
|
51524
|
-
},
|
|
51528
|
+
}, d4), p4 = () => {
|
|
51525
51529
|
let e = ci(), { torrents: t, list: n, inboundNow: r, addMagnet: i, addTorrentFile: a, pause: o, resume: s, retry: c, recheck: l, remove: u, start: d, removeMissing: f, storageUnavailable: p, workerError: m, reachable: h, transport: g, sampleOffered: _, answerSample: v, client: b } = cK(), [x, S] = (0, y.useState)(""), [C, w] = (0, y.useState)(null), [T, E] = (0, y.useState)({}), [D, O] = (0, y.useState)(() => navigator.onLine === !1), k = (0, y.useRef)(void 0), { confirm: A, confirmElement: j, confirmOpen: M } = HY(), N = os(), P = (0, y.useRef)(null), [F, I] = (0, y.useState)(!1), [L, R] = (0, y.useState)(null), [z, B] = (0, y.useState)(dD);
|
|
51526
51530
|
(0, y.useEffect)(() => b.onRateLimits(B), [b]);
|
|
51527
51531
|
let [V, H] = (0, y.useState)(null), ee = (0, y.useRef)(t);
|
|
@@ -51534,9 +51538,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51534
51538
|
return window.addEventListener("online", e), window.addEventListener("offline", e), () => {
|
|
51535
51539
|
window.removeEventListener("online", e), window.removeEventListener("offline", e);
|
|
51536
51540
|
};
|
|
51537
|
-
}, []), (0, y.useEffect)(() => b.onAddFailed(U), [b, U]),
|
|
51538
|
-
let [te] = (0, y.useState)(() => !
|
|
51539
|
-
let t = await
|
|
51541
|
+
}, []), (0, y.useEffect)(() => b.onAddFailed(U), [b, U]), TZ(b);
|
|
51542
|
+
let [te] = (0, y.useState)(() => !H$()), ne = (0, y.useCallback)(async () => {
|
|
51543
|
+
let t = await G$();
|
|
51540
51544
|
U(t === "installed" ? e.formatMessage({
|
|
51541
51545
|
id: "Ripple installed",
|
|
51542
51546
|
defaultMessage: "Ripple installed"
|
|
@@ -51550,13 +51554,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51550
51554
|
id: "Use your browser menu to install Ripple as an app.",
|
|
51551
51555
|
defaultMessage: "Use your browser menu to install Ripple as an app."
|
|
51552
51556
|
}));
|
|
51553
|
-
}, [U, e]), [re, ie] = (0, y.useState)(() =>
|
|
51557
|
+
}, [U, e]), [re, ie] = (0, y.useState)(() => D$((e) => localStorage.getItem(e))), ae = (e) => {
|
|
51554
51558
|
ie(e);
|
|
51555
51559
|
try {
|
|
51556
|
-
localStorage.setItem(
|
|
51560
|
+
localStorage.setItem(T$, e ? "1" : "0");
|
|
51557
51561
|
} catch {}
|
|
51558
51562
|
}, [W, oe] = (0, y.useState)(null), [se, ce] = (0, y.useState)(null), le = (0, y.useRef)(null), ue = (0, y.useCallback)((t, n, r = null) => {
|
|
51559
|
-
let i =
|
|
51563
|
+
let i = w$({ magnet: t });
|
|
51560
51564
|
if (!i.ok) {
|
|
51561
51565
|
U(i.problem);
|
|
51562
51566
|
return;
|
|
@@ -51584,7 +51588,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51584
51588
|
e
|
|
51585
51589
|
]), de = (0, y.useCallback)((t) => {
|
|
51586
51590
|
let n = t.trim();
|
|
51587
|
-
if (!
|
|
51591
|
+
if (!V2(n)) return !1;
|
|
51588
51592
|
let r = $E(n);
|
|
51589
51593
|
return r && ee.current.some((e) => e.magnet && $E(e.magnet) === r) ? (U(e.formatMessage({
|
|
51590
51594
|
id: "Already in your list",
|
|
@@ -51696,7 +51700,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51696
51700
|
let t = e.target;
|
|
51697
51701
|
if (t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable)) return;
|
|
51698
51702
|
let n = e.clipboardData?.getData("text") ?? "";
|
|
51699
|
-
|
|
51703
|
+
V2(n) && (e.preventDefault(), de(n));
|
|
51700
51704
|
};
|
|
51701
51705
|
return window.addEventListener("paste", e), () => window.removeEventListener("paste", e);
|
|
51702
51706
|
}, [
|
|
@@ -51709,9 +51713,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51709
51713
|
}, []);
|
|
51710
51714
|
(0, y.useEffect)(() => {
|
|
51711
51715
|
let e = (e) => {
|
|
51712
|
-
|
|
51716
|
+
H2(e.dataTransfer) && ++xe.current === 1 && be(!0);
|
|
51713
51717
|
}, t = (e) => {
|
|
51714
|
-
|
|
51718
|
+
H2(e.dataTransfer) && --xe.current <= 0 && we();
|
|
51715
51719
|
}, n = (e) => e.preventDefault(), r = (e) => {
|
|
51716
51720
|
e.preventDefault(), we(), he(e.dataTransfer);
|
|
51717
51721
|
};
|
|
@@ -51785,7 +51789,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51785
51789
|
defaultMessage: "Remove"
|
|
51786
51790
|
})
|
|
51787
51791
|
})) && (t.infoHash && IW(t.infoHash), t.state === "missing" ? t.infoHash && f(t.infoHash) : u(Number(t.id), !1));
|
|
51788
|
-
}, [je, Me] = (0, y.useState)(null), [Ne, Pe] = (0, y.useState)(null), Fe =
|
|
51792
|
+
}, [je, Me] = (0, y.useState)(null), [Ne, Pe] = (0, y.useState)(null), Fe = I1(b), [Ie, Le] = (0, y.useState)(!1), Re = (0, y.useCallback)(() => Le(!1), []), { waiting: ze, allow: Be } = L1(b, n, b.owns()), [Ve, He] = (0, y.useState)(null), Ue = (0, y.useCallback)((e) => He(e.id), []), We = (0, y.useCallback)((e, t) => {
|
|
51789
51793
|
t ? (Pe(null), Me({
|
|
51790
51794
|
id: e.id,
|
|
51791
51795
|
at: t
|
|
@@ -51863,21 +51867,21 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51863
51867
|
}
|
|
51864
51868
|
}), Ke = Ve ? t.find((e) => e.id === Ve) : void 0, qe = {};
|
|
51865
51869
|
Ke?.files?.forEach((e, t) => {
|
|
51866
|
-
let n = T[
|
|
51870
|
+
let n = T[r4(Ke.id, t)];
|
|
51867
51871
|
n != null && (qe[t] = n);
|
|
51868
51872
|
});
|
|
51869
|
-
let Je = je ? t.find((e) => e.id === je.id) : void 0, Ye = Ne ? t.find((e) => e.id === Ne) : void 0, Xe =
|
|
51873
|
+
let Je = je ? t.find((e) => e.id === je.id) : void 0, Ye = Ne ? t.find((e) => e.id === Ne) : void 0, Xe = R2(Je ?? Ye), Ze = (0, y.useCallback)((t, n) => {
|
|
51870
51874
|
let r = t.files?.[n];
|
|
51871
51875
|
if (!r) return;
|
|
51872
|
-
let i =
|
|
51876
|
+
let i = r4(t.id, n);
|
|
51873
51877
|
E((e) => ({
|
|
51874
51878
|
...e,
|
|
51875
51879
|
[i]: 0
|
|
51876
|
-
})),
|
|
51880
|
+
})), bZ(b, Number(t.id), n, r.name, r.size, (e) => E((t) => ({
|
|
51877
51881
|
...t,
|
|
51878
51882
|
[i]: e
|
|
51879
51883
|
}))).catch((t) => {
|
|
51880
|
-
|
|
51884
|
+
fZ(t) || U(e.formatMessage({
|
|
51881
51885
|
id: "Saving {name} failed",
|
|
51882
51886
|
defaultMessage: "Saving {name} failed"
|
|
51883
51887
|
}, { name: r.name }));
|
|
@@ -51891,15 +51895,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51891
51895
|
U
|
|
51892
51896
|
]), Qe = (0, y.useCallback)((t) => {
|
|
51893
51897
|
if (!Aq(t.files).length) return;
|
|
51894
|
-
let n =
|
|
51898
|
+
let n = r4(t.id, -1);
|
|
51895
51899
|
E((e) => ({
|
|
51896
51900
|
...e,
|
|
51897
51901
|
[n]: 0
|
|
51898
|
-
})),
|
|
51902
|
+
})), SZ(b, Number(t.id), t.name, t.files ?? [], (e) => E((t) => ({
|
|
51899
51903
|
...t,
|
|
51900
51904
|
[n]: e
|
|
51901
51905
|
}))).catch((n) => {
|
|
51902
|
-
|
|
51906
|
+
fZ(n) || U(e.formatMessage({
|
|
51903
51907
|
id: "Saving {name} failed",
|
|
51904
51908
|
defaultMessage: "Saving {name} failed"
|
|
51905
51909
|
}, { name: t.name }));
|
|
@@ -51911,21 +51915,21 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51911
51915
|
b,
|
|
51912
51916
|
e,
|
|
51913
51917
|
U
|
|
51914
|
-
]), { supported: $e, folder: et, permitted: tt, pick: nt, allow: rt, clear: it } =
|
|
51918
|
+
]), { supported: $e, folder: et, permitted: tt, pick: nt, allow: rt, clear: it } = vQ(), [at, ot] = (0, y.useState)(() => {
|
|
51915
51919
|
try {
|
|
51916
|
-
return
|
|
51920
|
+
return c$((e) => localStorage.getItem(e));
|
|
51917
51921
|
} catch {
|
|
51918
51922
|
return "browser";
|
|
51919
51923
|
}
|
|
51920
|
-
}), [st, ct] = (0, y.useState)(() =>
|
|
51924
|
+
}), [st, ct] = (0, y.useState)(() => a2((e) => localStorage.getItem(e))), [lt, ut] = (0, y.useState)(() => o2((e) => localStorage.getItem(e))), [dt, ft] = (0, y.useState)(() => c2((e) => localStorage.getItem(e))), pt = (e) => {
|
|
51921
51925
|
ct(e);
|
|
51922
51926
|
try {
|
|
51923
|
-
localStorage.setItem(
|
|
51927
|
+
localStorage.setItem(Q0, e);
|
|
51924
51928
|
} catch {}
|
|
51925
51929
|
}, mt = (e) => {
|
|
51926
51930
|
ut(e);
|
|
51927
51931
|
try {
|
|
51928
|
-
localStorage.setItem(
|
|
51932
|
+
localStorage.setItem(e2, e);
|
|
51929
51933
|
} catch {}
|
|
51930
51934
|
}, ht = (e, t) => {
|
|
51931
51935
|
ft({
|
|
@@ -51933,7 +51937,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51933
51937
|
dir: t
|
|
51934
51938
|
});
|
|
51935
51939
|
try {
|
|
51936
|
-
localStorage.setItem(
|
|
51940
|
+
localStorage.setItem($0, l2(e, t));
|
|
51937
51941
|
} catch {}
|
|
51938
51942
|
}, [gt, _t] = Oc(), vt = (0, y.useRef)(null), yt = gt.get("torrent");
|
|
51939
51943
|
(0, y.useEffect)(() => {
|
|
@@ -51951,7 +51955,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51951
51955
|
let bt = (e) => {
|
|
51952
51956
|
ot(e);
|
|
51953
51957
|
try {
|
|
51954
|
-
localStorage.setItem(
|
|
51958
|
+
localStorage.setItem(o$, e);
|
|
51955
51959
|
} catch {}
|
|
51956
51960
|
}, xt = V && typeof V.scope == "object" ? t.find((e) => e.id === V.scope.torrent) : void 0, G = (e) => {
|
|
51957
51961
|
if (!V) return;
|
|
@@ -51966,19 +51970,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
51966
51970
|
tt
|
|
51967
51971
|
]);
|
|
51968
51972
|
let St = (e) => ({
|
|
51969
|
-
intended:
|
|
51970
|
-
current:
|
|
51973
|
+
intended: l$(e, at),
|
|
51974
|
+
current: u$(e.stats?.savePath)
|
|
51971
51975
|
}), Ct = async (t, n) => {
|
|
51972
51976
|
if (!t.infoHash) return;
|
|
51973
51977
|
b.setLocation(t.infoHash, n);
|
|
51974
|
-
let { current: r } = St(t), i =
|
|
51978
|
+
let { current: r } = St(t), i = f$({
|
|
51975
51979
|
current: r,
|
|
51976
51980
|
intended: n,
|
|
51977
51981
|
complete: t.progress >= 1,
|
|
51978
51982
|
folderReady: !!et && tt
|
|
51979
51983
|
});
|
|
51980
51984
|
if (!i.move) {
|
|
51981
|
-
let t =
|
|
51985
|
+
let t = p$(i, et?.name, e);
|
|
51982
51986
|
t && U(t);
|
|
51983
51987
|
return;
|
|
51984
51988
|
}
|
|
@@ -52017,7 +52021,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52017
52021
|
if (et && tt && !Tt.current.has(t.id)) {
|
|
52018
52022
|
Tt.current.add(t.id);
|
|
52019
52023
|
try {
|
|
52020
|
-
await
|
|
52024
|
+
await _$({
|
|
52021
52025
|
client: b,
|
|
52022
52026
|
torrent: t,
|
|
52023
52027
|
folder: et,
|
|
@@ -52045,7 +52049,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52045
52049
|
(0, y.useEffect)(() => {
|
|
52046
52050
|
if (et && tt) for (let e of t) {
|
|
52047
52051
|
if (e.state === "missing") continue;
|
|
52048
|
-
let { intended: t, current: n } = St(e), r =
|
|
52052
|
+
let { intended: t, current: n } = St(e), r = f$({
|
|
52049
52053
|
current: n,
|
|
52050
52054
|
intended: t,
|
|
52051
52055
|
complete: e.progress >= 1,
|
|
@@ -52063,13 +52067,13 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52063
52067
|
if (!et || !tt) return;
|
|
52064
52068
|
let n = Date.now();
|
|
52065
52069
|
for (let r of t) {
|
|
52066
|
-
if (r.state !== "done" && r.state !== "seeding" ||
|
|
52070
|
+
if (r.state !== "done" && r.state !== "seeding" || s$(r) || !r.files?.length || Ot.current.has(r.id)) continue;
|
|
52067
52071
|
let t = Dt.current.get(r.id);
|
|
52068
|
-
if (t !== void 0 && (t ===
|
|
52072
|
+
if (t !== void 0 && (t === X2 || n < t)) continue;
|
|
52069
52073
|
Ot.current.add(r.id);
|
|
52070
52074
|
let i = kt.current;
|
|
52071
|
-
|
|
52072
|
-
i === kt.current && t !== null && (Dt.current.set(r.id,
|
|
52075
|
+
Q2(r, () => WQ(b, r, et)).then((t) => {
|
|
52076
|
+
i === kt.current && t !== null && (Dt.current.set(r.id, X2), jt((e) => e.has(r.id) ? e : new Set(e).add(r.id)), t && U(e.formatMessage({
|
|
52073
52077
|
id: "{name} saved to {folder}",
|
|
52074
52078
|
defaultMessage: "{name} saved to {folder}"
|
|
52075
52079
|
}, {
|
|
@@ -52077,7 +52081,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52077
52081
|
folder: et.name
|
|
52078
52082
|
})));
|
|
52079
52083
|
}).catch(() => {
|
|
52080
|
-
i === kt.current && (Dt.current.set(r.id, Date.now() +
|
|
52084
|
+
i === kt.current && (Dt.current.set(r.id, Date.now() + Z2), U(e.formatMessage({
|
|
52081
52085
|
id: "Saving {name} to {folder} failed, retrying",
|
|
52082
52086
|
defaultMessage: "Saving {name} to {folder} failed, retrying"
|
|
52083
52087
|
}, {
|
|
@@ -52096,7 +52100,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52096
52100
|
]);
|
|
52097
52101
|
let Mt = W ? t.find((e) => e.infoHash === W.infoHash && e.state !== "missing") : void 0, Nt = Mt?.files ?? [];
|
|
52098
52102
|
(0, y.useEffect)(() => {
|
|
52099
|
-
W && !se && Nt.length !== 0 && Mt && (ce(
|
|
52103
|
+
W && !se && Nt.length !== 0 && Mt && (ce(E$({
|
|
52100
52104
|
fileCount: Nt.length,
|
|
52101
52105
|
location: at
|
|
52102
52106
|
})), le.current = Number(Mt.id), o(Number(Mt.id)));
|
|
@@ -52119,7 +52123,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52119
52123
|
]), It = (0, y.useCallback)(() => {
|
|
52120
52124
|
if (!W || !se || !Mt) return;
|
|
52121
52125
|
let t = Number(Mt.id);
|
|
52122
|
-
i(W.magnet), b.setPlan(t,
|
|
52126
|
+
i(W.magnet), b.setPlan(t, O$(se, Nt.length)), b.setFlags(t, ...k$(se)), W.infoHash && b.setLocation(W.infoHash, se.location), se.topOfQueue && b.moveInQueue(t, "top"), se.start && s(t), U(se.start ? e.formatMessage({
|
|
52123
52127
|
id: "{name} added",
|
|
52124
52128
|
defaultMessage: "{name} added"
|
|
52125
52129
|
}, { name: W.name }) : e.formatMessage({
|
|
@@ -52181,10 +52185,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52181
52185
|
return n;
|
|
52182
52186
|
});
|
|
52183
52187
|
}, [t]);
|
|
52184
|
-
let Ht = t.reduce((e, t) => e + t.down, 0), Ut = t.reduce((e, t) => e + t.up, 0), Wt = Math.max(...Rt, 0), Gt =
|
|
52185
|
-
for (let e of
|
|
52188
|
+
let Ht = t.reduce((e, t) => e + t.down, 0), Ut = t.reduce((e, t) => e + t.up, 0), Wt = Math.max(...Rt, 0), Gt = l4(oQ, s4), Kt = t.filter((e) => QG(e.state)).length, qt = t.filter(B0).length, { rows: Jt, interaction: Yt } = j2(t, st, dt.key, dt.dir), Xt = b2(Jt), Zt = () => ee.current.filter((e) => d2(e) && Xt.picked.has(e.infoHash)), Qt = () => {
|
|
52189
|
+
for (let e of m2(Zt())) o(Number(e.id));
|
|
52186
52190
|
}, $t = () => {
|
|
52187
|
-
for (let e of
|
|
52191
|
+
for (let e of h2(Zt())) s(Number(e.id));
|
|
52188
52192
|
}, en = async () => {
|
|
52189
52193
|
let t = Xt.rows.filter((e) => e.state !== "missing");
|
|
52190
52194
|
if (t.length) {
|
|
@@ -52217,7 +52221,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52217
52221
|
};
|
|
52218
52222
|
return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
|
|
52219
52223
|
}, [tn, nn]);
|
|
52220
|
-
let rn = t.length - Jt.length, an = st === "library" ? t.filter(
|
|
52224
|
+
let rn = t.length - Jt.length, an = st === "library" ? t.filter(B0).reduce((e, t) => e + t.size, 0) : 0, on = yQ(t.some((e) => e.state !== "missing")), sn = GG(), cn = t.filter((e) => e.state === "retrying").length, ln = jQ(), un = xQ(`${t.length}:${ln.refreshKey}`), dn = !!un && un.limitBytes - un.usedBytes < 2e9, fn = SQ({
|
|
52221
52225
|
supported: $e,
|
|
52222
52226
|
folderName: et?.name,
|
|
52223
52227
|
permitted: tt,
|
|
@@ -52232,18 +52236,18 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52232
52236
|
return;
|
|
52233
52237
|
}
|
|
52234
52238
|
fn.kind === "move" && bt("folder");
|
|
52235
|
-
}, mn =
|
|
52239
|
+
}, mn = F0({
|
|
52236
52240
|
dragging: ye,
|
|
52237
52241
|
overField: Se,
|
|
52238
52242
|
shareOpen: F && !L
|
|
52239
52243
|
});
|
|
52240
52244
|
return /* @__PURE__ */ q("div", {
|
|
52241
|
-
css:
|
|
52245
|
+
css: $2,
|
|
52242
52246
|
"data-drag": mn === "page" || void 0,
|
|
52243
52247
|
children: [
|
|
52244
52248
|
j,
|
|
52245
|
-
je && Je && Xe && /* @__PURE__ */ K(
|
|
52246
|
-
groups:
|
|
52249
|
+
je && Je && Xe && /* @__PURE__ */ K(T0, {
|
|
52250
|
+
groups: L2(Je, Ge(Je, Xe.magnet), Lt(Je)),
|
|
52247
52251
|
at: je.at,
|
|
52248
52252
|
label: e.formatMessage({
|
|
52249
52253
|
id: "Options for {name}",
|
|
@@ -52251,9 +52255,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52251
52255
|
}, { name: Je.name }),
|
|
52252
52256
|
onClose: () => Me(null)
|
|
52253
52257
|
}),
|
|
52254
|
-
Ye && Xe && /* @__PURE__ */ K(
|
|
52258
|
+
Ye && Xe && /* @__PURE__ */ K(P0, {
|
|
52255
52259
|
title: Ye.name,
|
|
52256
|
-
groups:
|
|
52260
|
+
groups: L2(Ye, Ge(Ye, Xe.magnet), Lt(Ye)),
|
|
52257
52261
|
onClose: () => Pe(null)
|
|
52258
52262
|
}),
|
|
52259
52263
|
/* @__PURE__ */ K("div", {
|
|
@@ -52269,7 +52273,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52269
52273
|
children: [/* @__PURE__ */ K(Sc, {
|
|
52270
52274
|
className: "wordmark",
|
|
52271
52275
|
to: "/",
|
|
52272
|
-
children:
|
|
52276
|
+
children: z2
|
|
52273
52277
|
}), /* @__PURE__ */ K(fX, {
|
|
52274
52278
|
className: "powered",
|
|
52275
52279
|
label: e.formatMessage({
|
|
@@ -52407,9 +52411,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52407
52411
|
defaultMessage: "Open torrents with Ripple"
|
|
52408
52412
|
})
|
|
52409
52413
|
}),
|
|
52410
|
-
/* @__PURE__ */ K(
|
|
52414
|
+
/* @__PURE__ */ K(M0, { onToast: U })
|
|
52411
52415
|
] }),
|
|
52412
|
-
F && /* @__PURE__ */ K(
|
|
52416
|
+
F && /* @__PURE__ */ K(J$, {
|
|
52413
52417
|
torrent: L,
|
|
52414
52418
|
dragging: mn === "share",
|
|
52415
52419
|
onMagnet: pe,
|
|
@@ -52418,7 +52422,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52418
52422
|
onClose: _e,
|
|
52419
52423
|
onToast: U
|
|
52420
52424
|
}),
|
|
52421
|
-
Ie && /* @__PURE__ */ K(
|
|
52425
|
+
Ie && /* @__PURE__ */ K(_1, {
|
|
52422
52426
|
create: Fe,
|
|
52423
52427
|
onClose: Re,
|
|
52424
52428
|
onShare: (e) => {
|
|
@@ -52495,7 +52499,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52495
52499
|
defaultMessage: "{count, plural, one {A download hit a problem, retrying} other {{count} downloads hit a problem, retrying}}"
|
|
52496
52500
|
}, { count: cn }) })
|
|
52497
52501
|
}),
|
|
52498
|
-
un && dn && !p && /* @__PURE__ */ K(
|
|
52502
|
+
un && dn && !p && /* @__PURE__ */ K(IQ, {
|
|
52499
52503
|
storage: un,
|
|
52500
52504
|
relief: fn,
|
|
52501
52505
|
onAct: () => void pn(),
|
|
@@ -52516,7 +52520,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52516
52520
|
description: "a speed"
|
|
52517
52521
|
}) }), /* @__PURE__ */ K("strong", {
|
|
52518
52522
|
"data-room": Gt,
|
|
52519
|
-
children:
|
|
52523
|
+
children: oQ(Ht)
|
|
52520
52524
|
})]
|
|
52521
52525
|
}),
|
|
52522
52526
|
/* @__PURE__ */ q("div", {
|
|
@@ -52527,7 +52531,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52527
52531
|
description: "a speed"
|
|
52528
52532
|
}) }), /* @__PURE__ */ K("strong", {
|
|
52529
52533
|
"data-room": Gt,
|
|
52530
|
-
children:
|
|
52534
|
+
children: oQ(Ut)
|
|
52531
52535
|
})]
|
|
52532
52536
|
}),
|
|
52533
52537
|
/* @__PURE__ */ q("div", {
|
|
@@ -52537,7 +52541,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52537
52541
|
defaultMessage: "Peak down"
|
|
52538
52542
|
}) }), /* @__PURE__ */ K("strong", {
|
|
52539
52543
|
"data-room": Gt,
|
|
52540
|
-
children:
|
|
52544
|
+
children: oQ(Wt)
|
|
52541
52545
|
})]
|
|
52542
52546
|
}),
|
|
52543
52547
|
/* @__PURE__ */ q("div", {
|
|
@@ -52553,25 +52557,25 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52553
52557
|
total: t.length
|
|
52554
52558
|
}) })]
|
|
52555
52559
|
}),
|
|
52556
|
-
g !== "direct" && /* @__PURE__ */ K(
|
|
52560
|
+
g !== "direct" && /* @__PURE__ */ K(q2, {
|
|
52557
52561
|
reachable: h,
|
|
52558
52562
|
inboundNow: r
|
|
52559
52563
|
}),
|
|
52560
|
-
un && /* @__PURE__ */ K(
|
|
52564
|
+
un && /* @__PURE__ */ K(W2, {
|
|
52561
52565
|
storage: un,
|
|
52562
52566
|
low: dn
|
|
52563
52567
|
}),
|
|
52564
|
-
on && /* @__PURE__ */ K(
|
|
52568
|
+
on && /* @__PURE__ */ K(U2, { quota: on })
|
|
52565
52569
|
] }),
|
|
52566
52570
|
/* @__PURE__ */ K(QY, {
|
|
52567
52571
|
reachable: h,
|
|
52568
52572
|
transport: g
|
|
52569
52573
|
}),
|
|
52570
|
-
t.length > 0 && /* @__PURE__ */ K(
|
|
52574
|
+
t.length > 0 && /* @__PURE__ */ K(K2, { state: sn })
|
|
52571
52575
|
]
|
|
52572
|
-
}), t.length > 0 && /* @__PURE__ */ K(
|
|
52576
|
+
}), t.length > 0 && /* @__PURE__ */ K(t4, { history: Rt })]
|
|
52573
52577
|
}),
|
|
52574
|
-
t.length > 0 && /* @__PURE__ */ K(
|
|
52578
|
+
t.length > 0 && /* @__PURE__ */ K(N2, {
|
|
52575
52579
|
filter: st,
|
|
52576
52580
|
onFilter: pt,
|
|
52577
52581
|
sortKey: dt.key,
|
|
@@ -52587,7 +52591,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52587
52591
|
/* @__PURE__ */ q("main", {
|
|
52588
52592
|
...Yt,
|
|
52589
52593
|
children: [
|
|
52590
|
-
_ && t.length === 0 && /* @__PURE__ */ K(
|
|
52594
|
+
_ && t.length === 0 && /* @__PURE__ */ K(H1, { onAnswer: v }),
|
|
52591
52595
|
t.length === 0 ? /* @__PURE__ */ q("div", {
|
|
52592
52596
|
className: "empty",
|
|
52593
52597
|
children: [/* @__PURE__ */ q("h1", { children: [
|
|
@@ -52630,7 +52634,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52630
52634
|
})
|
|
52631
52635
|
})
|
|
52632
52636
|
})]
|
|
52633
|
-
}) : lt === "table" ? /* @__PURE__ */ K(
|
|
52637
|
+
}) : lt === "table" ? /* @__PURE__ */ K(A2, {
|
|
52634
52638
|
torrents: Jt,
|
|
52635
52639
|
transport: g,
|
|
52636
52640
|
sortKey: dt.key,
|
|
@@ -52641,7 +52645,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52641
52645
|
onOptions: We,
|
|
52642
52646
|
picked: Xt.picked,
|
|
52643
52647
|
onPick: Xt.toggle
|
|
52644
|
-
}) : Jt.map((e) => /* @__PURE__ */ K(
|
|
52648
|
+
}) : Jt.map((e) => /* @__PURE__ */ K(f4, {
|
|
52645
52649
|
t: e,
|
|
52646
52650
|
saving: T,
|
|
52647
52651
|
onToggle: Te,
|
|
@@ -52682,10 +52686,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52682
52686
|
})
|
|
52683
52687
|
]
|
|
52684
52688
|
}),
|
|
52685
|
-
tn && /* @__PURE__ */ K(
|
|
52689
|
+
tn && /* @__PURE__ */ K(T2, {
|
|
52686
52690
|
count: Xt.rows.length,
|
|
52687
|
-
canPause:
|
|
52688
|
-
canResume:
|
|
52691
|
+
canPause: m2(Xt.rows).length > 0,
|
|
52692
|
+
canResume: h2(Xt.rows).length > 0,
|
|
52689
52693
|
onPause: Qt,
|
|
52690
52694
|
onResume: $t,
|
|
52691
52695
|
onRemove: () => {
|
|
@@ -52693,19 +52697,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52693
52697
|
},
|
|
52694
52698
|
onClear: Xt.clear
|
|
52695
52699
|
}),
|
|
52696
|
-
Ke && /* @__PURE__ */ K(
|
|
52700
|
+
Ke && /* @__PURE__ */ K(h0, {
|
|
52697
52701
|
t: Ke,
|
|
52698
52702
|
handle: Number.isFinite(Number(Ke.id)) ? Number(Ke.id) : null,
|
|
52699
52703
|
saving: qe,
|
|
52700
52704
|
onSave: (e) => Ze(Ke, e),
|
|
52701
52705
|
onClose: () => He(null)
|
|
52702
52706
|
}),
|
|
52703
|
-
W && /* @__PURE__ */ K(
|
|
52707
|
+
W && /* @__PURE__ */ K(L$, {
|
|
52704
52708
|
name: W.name,
|
|
52705
52709
|
from: W.from,
|
|
52706
52710
|
external: W.external,
|
|
52707
52711
|
files: Nt,
|
|
52708
|
-
choices: se ??
|
|
52712
|
+
choices: se ?? E$({
|
|
52709
52713
|
fileCount: 0,
|
|
52710
52714
|
location: at
|
|
52711
52715
|
}),
|
|
@@ -52719,7 +52723,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52719
52723
|
onCancel: Ft,
|
|
52720
52724
|
onNeverAsk: W.external ? void 0 : () => ae(!1)
|
|
52721
52725
|
}),
|
|
52722
|
-
V && (V.scope === "session" || xt) && /* @__PURE__ */ K(
|
|
52726
|
+
V && (V.scope === "session" || xt) && /* @__PURE__ */ K(z$, {
|
|
52723
52727
|
title: V.direction === "down" ? V.scope === "session" ? e.formatMessage({
|
|
52724
52728
|
id: "Total download rate limit",
|
|
52725
52729
|
defaultMessage: "Total download rate limit"
|
|
@@ -52768,14 +52772,14 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52768
52772
|
}),
|
|
52769
52773
|
/* @__PURE__ */ K("a", {
|
|
52770
52774
|
className: "build",
|
|
52771
|
-
href: "https://github.com/banou26/ripple/commit/
|
|
52775
|
+
href: "https://github.com/banou26/ripple/commit/e5ad2c2d38e0b7d3ade202ac38c9e0fb8414b0bb",
|
|
52772
52776
|
target: "_blank",
|
|
52773
52777
|
rel: "noreferrer",
|
|
52774
52778
|
...WY(e.formatMessage({
|
|
52775
52779
|
id: "commit {hash}",
|
|
52776
52780
|
defaultMessage: "commit {hash}"
|
|
52777
|
-
}, { hash: "
|
|
52778
|
-
children:
|
|
52781
|
+
}, { hash: "e5ad2c2d38e0b7d3ade202ac38c9e0fb8414b0bb" })),
|
|
52782
|
+
children: B2
|
|
52779
52783
|
}),
|
|
52780
52784
|
/* @__PURE__ */ q("div", {
|
|
52781
52785
|
className: "controls",
|
|
@@ -52833,9 +52837,9 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52833
52837
|
children: [/* @__PURE__ */ K("span", { children: e.formatMessage({
|
|
52834
52838
|
id: "Language",
|
|
52835
52839
|
defaultMessage: "Language"
|
|
52836
|
-
}) }), /* @__PURE__ */ K(
|
|
52840
|
+
}) }), /* @__PURE__ */ K(B1, {})]
|
|
52837
52841
|
}),
|
|
52838
|
-
/* @__PURE__ */ K(
|
|
52842
|
+
/* @__PURE__ */ K(R1, {
|
|
52839
52843
|
persist: ln,
|
|
52840
52844
|
onAsk: () => void ln.request()
|
|
52841
52845
|
}),
|
|
@@ -52889,12 +52893,12 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52889
52893
|
C && (0, jY.createPortal)(/* @__PURE__ */ K("div", {
|
|
52890
52894
|
role: "status",
|
|
52891
52895
|
className: "toast",
|
|
52892
|
-
css:
|
|
52896
|
+
css: e4,
|
|
52893
52897
|
children: C
|
|
52894
52898
|
}), document.body)
|
|
52895
52899
|
]
|
|
52896
52900
|
});
|
|
52897
|
-
},
|
|
52901
|
+
}, m4 = G`
|
|
52898
52902
|
position: relative;
|
|
52899
52903
|
/* vh minus the strip the broker reserved, same contract as the library page. A bare 100vh here
|
|
52900
52904
|
would still be a full viewport tall inside a root the reservation already shortened. */
|
|
@@ -52977,8 +52981,8 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52977
52981
|
background: ${uE};
|
|
52978
52982
|
}
|
|
52979
52983
|
}
|
|
52980
|
-
`,
|
|
52981
|
-
css:
|
|
52984
|
+
`, h4 = ({ children: e }) => /* @__PURE__ */ K("div", {
|
|
52985
|
+
css: m4,
|
|
52982
52986
|
children: /* @__PURE__ */ q("div", {
|
|
52983
52987
|
className: "shell",
|
|
52984
52988
|
children: [/* @__PURE__ */ K(Sc, {
|
|
@@ -52987,10 +52991,10 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52987
52991
|
children: "Ripple"
|
|
52988
52992
|
}), e]
|
|
52989
52993
|
})
|
|
52990
|
-
}),
|
|
52994
|
+
}), g4 = vc([
|
|
52991
52995
|
{
|
|
52992
52996
|
path: Lc(Pc.HOME),
|
|
52993
|
-
element: /* @__PURE__ */ K(
|
|
52997
|
+
element: /* @__PURE__ */ K(p4, {})
|
|
52994
52998
|
},
|
|
52995
52999
|
{
|
|
52996
53000
|
path: Lc(Pc.ADD),
|
|
@@ -52998,15 +53002,15 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
52998
53002
|
},
|
|
52999
53003
|
{
|
|
53000
53004
|
path: Lc(Pc.WATCH),
|
|
53001
|
-
element: /* @__PURE__ */ K(
|
|
53005
|
+
element: /* @__PURE__ */ K(fQ, {})
|
|
53002
53006
|
},
|
|
53003
53007
|
{
|
|
53004
53008
|
path: Lc(Pc.DOWNLOAD),
|
|
53005
|
-
element: /* @__PURE__ */ K(
|
|
53009
|
+
element: /* @__PURE__ */ K(fQ, { mode: "download" })
|
|
53006
53010
|
},
|
|
53007
53011
|
{
|
|
53008
53012
|
path: Lc(Pc.LEGAL),
|
|
53009
|
-
element: /* @__PURE__ */ K(() => /* @__PURE__ */ q(
|
|
53013
|
+
element: /* @__PURE__ */ K(() => /* @__PURE__ */ q(h4, { children: [
|
|
53010
53014
|
/* @__PURE__ */ K("h1", { children: "Legal & Terms" }),
|
|
53011
53015
|
/* @__PURE__ */ K("div", {
|
|
53012
53016
|
className: "updated",
|
|
@@ -53048,7 +53052,7 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
53048
53052
|
},
|
|
53049
53053
|
{
|
|
53050
53054
|
path: Lc(Pc.PRIVACY),
|
|
53051
|
-
element: /* @__PURE__ */ K(() => /* @__PURE__ */ q(
|
|
53055
|
+
element: /* @__PURE__ */ K(() => /* @__PURE__ */ q(h4, { children: [
|
|
53052
53056
|
/* @__PURE__ */ K("h1", { children: "Privacy" }),
|
|
53053
53057
|
/* @__PURE__ */ K("div", {
|
|
53054
53058
|
className: "updated",
|
|
@@ -53113,12 +53117,19 @@ var B$ = () => window.location.origin + "/?magnet=%s", V$ = () => typeof window
|
|
|
53113
53117
|
"."
|
|
53114
53118
|
] })
|
|
53115
53119
|
] }), {})
|
|
53120
|
+
},
|
|
53121
|
+
{
|
|
53122
|
+
path: "*",
|
|
53123
|
+
element: /* @__PURE__ */ K(Ns, {
|
|
53124
|
+
to: Rc(Pc.HOME),
|
|
53125
|
+
replace: !0
|
|
53126
|
+
})
|
|
53116
53127
|
}
|
|
53117
53128
|
]);
|
|
53118
|
-
|
|
53129
|
+
g4.subscribe(() => {
|
|
53119
53130
|
DE() !== WE() && XE();
|
|
53120
53131
|
});
|
|
53121
|
-
var
|
|
53132
|
+
var _4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router: g4 }), /* @__PURE__ */ K(KY, {})] }), v4 = 50, y4 = ({ onActive: e, onInactive: t }) => {
|
|
53122
53133
|
let [n, r] = (0, y.useState)("probing"), i = (0, y.useRef)("probing"), [a, o] = (0, y.useState)(), [s] = (0, y.useState)(() => new BroadcastChannel("ripple-window-instance-guard")), c = (0, y.useRef)(e), l = (0, y.useRef)(t), u = (0, y.useRef)(void 0);
|
|
53123
53134
|
c.current = e, l.current = t, u.current = a;
|
|
53124
53135
|
let d = (0, y.useCallback)(() => {
|
|
@@ -53138,7 +53149,7 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53138
53149
|
window.clearTimeout(e), i.current = "inactive", r("inactive");
|
|
53139
53150
|
}
|
|
53140
53151
|
};
|
|
53141
|
-
return s.addEventListener("message", t), s.postMessage("check"), e = window.setTimeout(d,
|
|
53152
|
+
return s.addEventListener("message", t), s.postMessage("check"), e = window.setTimeout(d, v4), () => {
|
|
53142
53153
|
window.clearTimeout(e), s.removeEventListener("message", t);
|
|
53143
53154
|
};
|
|
53144
53155
|
}, [d, s]), (0, y.useEffect)(() => () => s.close(), [s]), {
|
|
@@ -53147,22 +53158,22 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53147
53158
|
value: a,
|
|
53148
53159
|
activate: d
|
|
53149
53160
|
};
|
|
53150
|
-
},
|
|
53161
|
+
}, b4 = () => {
|
|
53151
53162
|
try {
|
|
53152
53163
|
location.reload();
|
|
53153
53164
|
} catch {}
|
|
53154
|
-
},
|
|
53165
|
+
}, x4 = {
|
|
53155
53166
|
adoptWindowMs: 1e4,
|
|
53156
53167
|
takeWaitMs: 5e3,
|
|
53157
53168
|
recheckMs: 1e3
|
|
53158
|
-
},
|
|
53169
|
+
}, S4 = 9e5, C4 = "ripple-update-reloads", w4 = 2, T4 = 3e5, E4 = () => {
|
|
53159
53170
|
try {
|
|
53160
|
-
let e = Date.now(), t = JSON.parse(sessionStorage.getItem(
|
|
53161
|
-
return t.length >=
|
|
53171
|
+
let e = Date.now(), t = JSON.parse(sessionStorage.getItem(C4) ?? "[]").filter((t) => e - t < T4);
|
|
53172
|
+
return t.length >= w4 ? !1 : (sessionStorage.setItem(C4, JSON.stringify([...t, e])), !0);
|
|
53162
53173
|
} catch {
|
|
53163
53174
|
return !1;
|
|
53164
53175
|
}
|
|
53165
|
-
},
|
|
53176
|
+
}, D4 = /* @__PURE__ */ new Set([
|
|
53166
53177
|
"button",
|
|
53167
53178
|
"checkbox",
|
|
53168
53179
|
"color",
|
|
@@ -53173,27 +53184,27 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53173
53184
|
"range",
|
|
53174
53185
|
"reset",
|
|
53175
53186
|
"submit"
|
|
53176
|
-
]),
|
|
53187
|
+
]), O4 = () => {
|
|
53177
53188
|
if ([...document.querySelectorAll("video")].some((e) => !e.paused && !e.ended) || document.querySelector("[role=\"dialog\"][aria-modal=\"true\"]")) return !0;
|
|
53178
53189
|
let e = document.activeElement;
|
|
53179
|
-
return e instanceof HTMLInputElement ? !
|
|
53180
|
-
},
|
|
53190
|
+
return e instanceof HTMLInputElement ? !D4.has(e.type) && !e.readOnly && e.value !== "" : e instanceof HTMLTextAreaElement ? !e.readOnly && e.value !== "" : e instanceof HTMLElement && e.isContentEditable && e.textContent !== "";
|
|
53191
|
+
}, k4 = (e, t, n) => new Promise((r) => {
|
|
53181
53192
|
let i = () => {
|
|
53182
53193
|
e.removeEventListener("controllerchange", i), clearTimeout(a), r();
|
|
53183
53194
|
}, a = setTimeout(i, n);
|
|
53184
53195
|
e.addEventListener("controllerchange", i), t.postMessage({ type: "take-over" });
|
|
53185
|
-
}),
|
|
53196
|
+
}), A4 = (e = x4) => {
|
|
53186
53197
|
let [t, n] = (0, y.useState)(!1);
|
|
53187
53198
|
return (0, y.useEffect)(() => {
|
|
53188
53199
|
let t = typeof navigator < "u" && "serviceWorker" in navigator ? navigator.serviceWorker : null, r = !1, i = null, a = !1, o = t !== null && t.controller !== null, s = null, c = !1, l = !1, u, d = async () => {
|
|
53189
53200
|
l = !0, n(!0);
|
|
53190
53201
|
let a = i?.waiting;
|
|
53191
|
-
a && t && await
|
|
53202
|
+
a && t && await k4(t, a, e.takeWaitMs), r || b4();
|
|
53192
53203
|
}, f = async () => {
|
|
53193
53204
|
if (r || c || l || s === null) return;
|
|
53194
53205
|
c = !0;
|
|
53195
53206
|
let e = await EU();
|
|
53196
|
-
c = !1, !(r || e) && (s === "adopt" ? (s = null, window.clearInterval(u), u = void 0, i?.waiting?.postMessage({ type: "take-over" })) : navigator.onLine && !
|
|
53207
|
+
c = !1, !(r || e) && (s === "adopt" ? (s = null, window.clearInterval(u), u = void 0, i?.waiting?.postMessage({ type: "take-over" })) : navigator.onLine && !O4() && E4() && d());
|
|
53197
53208
|
}, p = (t) => {
|
|
53198
53209
|
r || t === "reload" && RE() || (s !== "reload" && (s = t), u ??= window.setInterval(f, e.recheckMs), f());
|
|
53199
53210
|
}, m = SH.onUpdateTaken(() => p("reload")), h = () => {
|
|
@@ -53212,7 +53223,7 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53212
53223
|
}));
|
|
53213
53224
|
}, v = () => {
|
|
53214
53225
|
i?.update().catch(() => {});
|
|
53215
|
-
}, y = window.setInterval(v,
|
|
53226
|
+
}, y = window.setInterval(v, S4), b = () => {
|
|
53216
53227
|
document.visibilityState === "visible" && v();
|
|
53217
53228
|
};
|
|
53218
53229
|
return t && (t.addEventListener("controllerchange", g), document.addEventListener("visibilitychange", b), t.getRegistration().then((e) => {
|
|
@@ -53221,7 +53232,7 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53221
53232
|
r = !0, window.clearInterval(y), window.clearInterval(u), document.removeEventListener("visibilitychange", b), t?.removeEventListener("controllerchange", g), m();
|
|
53222
53233
|
};
|
|
53223
53234
|
}, [e]), t;
|
|
53224
|
-
},
|
|
53235
|
+
}, j4 = G`
|
|
53225
53236
|
position: fixed;
|
|
53226
53237
|
inset: 0;
|
|
53227
53238
|
z-index: ${MY};
|
|
@@ -53232,17 +53243,17 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53232
53243
|
color: ${X};
|
|
53233
53244
|
font-size: 1.1rem;
|
|
53234
53245
|
font-weight: 600;
|
|
53235
|
-
`,
|
|
53246
|
+
`, M4 = () => {
|
|
53236
53247
|
let e = ci();
|
|
53237
53248
|
return (0, jY.createPortal)(/* @__PURE__ */ K("div", {
|
|
53238
|
-
css:
|
|
53249
|
+
css: j4,
|
|
53239
53250
|
role: "status",
|
|
53240
53251
|
children: e.formatMessage({
|
|
53241
53252
|
id: "Updating Ripple",
|
|
53242
53253
|
defaultMessage: "Updating Ripple"
|
|
53243
53254
|
})
|
|
53244
53255
|
}), document.body);
|
|
53245
|
-
},
|
|
53256
|
+
}, N4 = G`
|
|
53246
53257
|
display: flex;
|
|
53247
53258
|
flex-direction: column;
|
|
53248
53259
|
justify-content: center;
|
|
@@ -53253,12 +53264,12 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53253
53264
|
& > div {
|
|
53254
53265
|
margin: 1rem;
|
|
53255
53266
|
}
|
|
53256
|
-
`,
|
|
53257
|
-
let e = ci(), { claim: t, activate: n } =
|
|
53267
|
+
`, P4 = () => {
|
|
53268
|
+
let e = ci(), { claim: t, activate: n } = y4({});
|
|
53258
53269
|
return (0, y.useEffect)(() => {
|
|
53259
53270
|
t === "inactive" && UU();
|
|
53260
53271
|
}, [t]), t === "probing" ? null : t === "inactive" ? /* @__PURE__ */ q("div", {
|
|
53261
|
-
css:
|
|
53272
|
+
css: N4,
|
|
53262
53273
|
children: [/* @__PURE__ */ K("div", { children: e.formatMessage({
|
|
53263
53274
|
id: "Ripple is open in another tab.",
|
|
53264
53275
|
defaultMessage: "Ripple is open in another tab."
|
|
@@ -53269,11 +53280,11 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53269
53280
|
defaultMessage: "Use it here instead"
|
|
53270
53281
|
})
|
|
53271
53282
|
}) })]
|
|
53272
|
-
}) : /* @__PURE__ */ K(
|
|
53273
|
-
},
|
|
53274
|
-
let e =
|
|
53275
|
-
return /* @__PURE__ */ q(zc, { children: [$H() ? /* @__PURE__ */ K(
|
|
53276
|
-
},
|
|
53283
|
+
}) : /* @__PURE__ */ K(_4, {});
|
|
53284
|
+
}, F4 = () => {
|
|
53285
|
+
let e = A4();
|
|
53286
|
+
return /* @__PURE__ */ q(zc, { children: [$H() ? /* @__PURE__ */ K(_4, {}) : /* @__PURE__ */ K(P4, {}), e && /* @__PURE__ */ K(M4, {})] });
|
|
53287
|
+
}, I4 = G`
|
|
53277
53288
|
/*
|
|
53278
53289
|
* What colours the scrollbars, the text caret, ::selection and the chrome the UA draws on form
|
|
53279
53290
|
* controls. Nothing in this repo touches the first three, so for those this one keyword is the
|
|
@@ -53325,10 +53336,10 @@ var g4 = () => /* @__PURE__ */ q(zc, { children: [/* @__PURE__ */ K(As, { router
|
|
|
53325
53336
|
body > .mount {
|
|
53326
53337
|
height: 100%;
|
|
53327
53338
|
}
|
|
53328
|
-
`,
|
|
53329
|
-
|
|
53330
|
-
var
|
|
53331
|
-
XE().then(() =>
|
|
53339
|
+
`, L4 = document.body.appendChild(document.createElement("div"));
|
|
53340
|
+
L4.classList.add("mount");
|
|
53341
|
+
var R4 = (0, Ot.createRoot)(L4);
|
|
53342
|
+
XE().then(() => R4.render(/* @__PURE__ */ q(qE, { children: [/* @__PURE__ */ K(xt, { styles: I4 }), /* @__PURE__ */ K(F4, {})] }))), "serviceWorker" in navigator && window.addEventListener("load", () => {
|
|
53332
53343
|
navigator.serviceWorker.register("/sw.js", { updateViaCache: "none" }).catch(() => {});
|
|
53333
53344
|
});
|
|
53334
53345
|
//#endregion
|