@banou/media-player 0.4.4 → 0.4.6
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/build/index.js +479 -463
- package/package.json +1 -1
- package/src/components/progress-bar.tsx +1 -0
- package/src/state-machines/subtitles.ts +22 -4
package/build/index.js
CHANGED
|
@@ -2,12 +2,12 @@ import * as ce from "react";
|
|
|
2
2
|
import mr, { forwardRef as pr, useContext as Ue, createContext as hr, useState as Z, useEffect as z, useCallback as ot, useRef as Ne, useMemo as pe } from "react";
|
|
3
3
|
import { css as Q } from "@emotion/react";
|
|
4
4
|
import { createActorContext as vr } from "@xstate/react";
|
|
5
|
-
import { fromCallback as
|
|
6
|
-
import
|
|
5
|
+
import { fromCallback as Xt, setup as Er, enqueueActions as br, assign as Y, sendTo as q } from "xstate";
|
|
6
|
+
import qt from "p-queue";
|
|
7
7
|
import { makeRemuxer as Ht } from "libav-wasm";
|
|
8
8
|
import gr from "jassub";
|
|
9
9
|
import { parse as Me, stringify as _t } from "ass-compiler";
|
|
10
|
-
import { Settings as yr, ChevronRight as Ke, VolumeX as Sr, Volume1 as xr, Volume2 as Tr, RotateCcw as wr, Play as
|
|
10
|
+
import { Settings as yr, ChevronRight as Ke, VolumeX as Sr, Volume1 as xr, Volume2 as Tr, RotateCcw as wr, Play as Rr, Pause as Ar, Minimize as _r, Maximize as Cr } from "react-feather";
|
|
11
11
|
import { Tooltip as Pr } from "react-tooltip";
|
|
12
12
|
var Je = { exports: {} }, Ce = {};
|
|
13
13
|
/**
|
|
@@ -62,7 +62,7 @@ function Nr() {
|
|
|
62
62
|
switch (i) {
|
|
63
63
|
case _:
|
|
64
64
|
return "Fragment";
|
|
65
|
-
case
|
|
65
|
+
case f:
|
|
66
66
|
return "Portal";
|
|
67
67
|
case W:
|
|
68
68
|
return "Profiler";
|
|
@@ -119,7 +119,7 @@ function Nr() {
|
|
|
119
119
|
}
|
|
120
120
|
function o() {
|
|
121
121
|
if (fe === 0) {
|
|
122
|
-
Fe = console.log, Ve = console.info, We = console.warn, Be = console.error, Ge = console.group,
|
|
122
|
+
Fe = console.log, Ve = console.info, We = console.warn, Be = console.error, Ge = console.group, Xe = console.groupCollapsed, qe = console.groupEnd;
|
|
123
123
|
var i = {
|
|
124
124
|
configurable: !0,
|
|
125
125
|
enumerable: !0,
|
|
@@ -147,8 +147,8 @@ function Nr() {
|
|
|
147
147
|
warn: ie({}, i, { value: We }),
|
|
148
148
|
error: ie({}, i, { value: Be }),
|
|
149
149
|
group: ie({}, i, { value: Ge }),
|
|
150
|
-
groupCollapsed: ie({}, i, { value:
|
|
151
|
-
groupEnd: ie({}, i, { value:
|
|
150
|
+
groupCollapsed: ie({}, i, { value: Xe }),
|
|
151
|
+
groupEnd: ie({}, i, { value: qe })
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
0 > fe && console.error(
|
|
@@ -156,16 +156,16 @@ function Nr() {
|
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
function s(i) {
|
|
159
|
-
if (
|
|
159
|
+
if (R === void 0)
|
|
160
160
|
try {
|
|
161
161
|
throw Error();
|
|
162
162
|
} catch (T) {
|
|
163
163
|
var x = T.stack.trim().match(/\n( *(at )?)/);
|
|
164
|
-
|
|
164
|
+
R = x && x[1] || "", he = -1 < T.stack.indexOf(`
|
|
165
165
|
at`) ? " (<anonymous>)" : -1 < T.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
166
166
|
}
|
|
167
167
|
return `
|
|
168
|
-
` +
|
|
168
|
+
` + R + i + he;
|
|
169
169
|
}
|
|
170
170
|
function u(i, x) {
|
|
171
171
|
if (!i || le) return "";
|
|
@@ -229,10 +229,10 @@ function Nr() {
|
|
|
229
229
|
);
|
|
230
230
|
var P = B.DetermineComponentFrameRoot(), ae = P[0], Ee = P[1];
|
|
231
231
|
if (ae && Ee) {
|
|
232
|
-
var
|
|
232
|
+
var X = ae.split(`
|
|
233
233
|
`), me = Ee.split(`
|
|
234
234
|
`);
|
|
235
|
-
for (P = U = 0; U <
|
|
235
|
+
for (P = U = 0; U < X.length && !X[U].includes(
|
|
236
236
|
"DetermineComponentFrameRoot"
|
|
237
237
|
); )
|
|
238
238
|
U++;
|
|
@@ -240,16 +240,16 @@ function Nr() {
|
|
|
240
240
|
"DetermineComponentFrameRoot"
|
|
241
241
|
); )
|
|
242
242
|
P++;
|
|
243
|
-
if (U ===
|
|
244
|
-
for (U =
|
|
243
|
+
if (U === X.length || P === me.length)
|
|
244
|
+
for (U = X.length - 1, P = me.length - 1; 1 <= U && 0 <= P && X[U] !== me[P]; )
|
|
245
245
|
P--;
|
|
246
246
|
for (; 1 <= U && 0 <= P; U--, P--)
|
|
247
|
-
if (
|
|
247
|
+
if (X[U] !== me[P]) {
|
|
248
248
|
if (U !== 1 || P !== 1)
|
|
249
249
|
do
|
|
250
|
-
if (U--, P--, 0 > P ||
|
|
250
|
+
if (U--, P--, 0 > P || X[U] !== me[P]) {
|
|
251
251
|
var _e = `
|
|
252
|
-
` +
|
|
252
|
+
` + X[U].replace(
|
|
253
253
|
" at new ",
|
|
254
254
|
" at "
|
|
255
255
|
);
|
|
@@ -262,7 +262,7 @@ function Nr() {
|
|
|
262
262
|
} finally {
|
|
263
263
|
le = !1, oe.H = O, a(), Error.prepareStackTrace = T;
|
|
264
264
|
}
|
|
265
|
-
return
|
|
265
|
+
return X = (X = i ? i.displayName || i.name : "") ? s(X) : "", typeof i == "function" && ve.set(i, X), X;
|
|
266
266
|
}
|
|
267
267
|
function l(i) {
|
|
268
268
|
if (i == null) return "";
|
|
@@ -295,12 +295,12 @@ function Nr() {
|
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function E() {
|
|
299
299
|
var i = oe.A;
|
|
300
300
|
return i === null ? null : i.getOwner();
|
|
301
301
|
}
|
|
302
302
|
function d(i) {
|
|
303
|
-
if (
|
|
303
|
+
if (Re.call(i, "key")) {
|
|
304
304
|
var x = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
305
305
|
if (x && x.isReactWarning) return !1;
|
|
306
306
|
}
|
|
@@ -326,7 +326,7 @@ function Nr() {
|
|
|
326
326
|
}
|
|
327
327
|
function y(i, x, T, O, B, U) {
|
|
328
328
|
return T = U.ref, i = {
|
|
329
|
-
$$typeof:
|
|
329
|
+
$$typeof: A,
|
|
330
330
|
type: i,
|
|
331
331
|
key: x,
|
|
332
332
|
props: U,
|
|
@@ -351,27 +351,27 @@ function Nr() {
|
|
|
351
351
|
var P = x.children;
|
|
352
352
|
if (P !== void 0)
|
|
353
353
|
if (O)
|
|
354
|
-
if (
|
|
354
|
+
if (Ae(P)) {
|
|
355
355
|
for (O = 0; O < P.length; O++)
|
|
356
|
-
|
|
356
|
+
m(P[O], i);
|
|
357
357
|
Object.freeze && Object.freeze(P);
|
|
358
358
|
} else
|
|
359
359
|
console.error(
|
|
360
360
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
361
361
|
);
|
|
362
|
-
else
|
|
362
|
+
else m(P, i);
|
|
363
363
|
} else
|
|
364
|
-
P = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? O = "null" :
|
|
364
|
+
P = "", (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), i === null ? O = "null" : Ae(i) ? O = "array" : i !== void 0 && i.$$typeof === A ? (O = "<" + (e(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : O = typeof i, console.error(
|
|
365
365
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
366
366
|
O,
|
|
367
367
|
P
|
|
368
368
|
);
|
|
369
|
-
if (
|
|
369
|
+
if (Re.call(x, "key")) {
|
|
370
370
|
P = e(i);
|
|
371
|
-
var ae = Object.keys(x).filter(function(
|
|
372
|
-
return
|
|
371
|
+
var ae = Object.keys(x).filter(function(X) {
|
|
372
|
+
return X !== "key";
|
|
373
373
|
});
|
|
374
|
-
O = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
374
|
+
O = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", Rt[P + O] || (ae = 0 < ae.length ? "{" + ae.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
375
375
|
`A props object containing a "key" prop is being spread into JSX:
|
|
376
376
|
let props = %s;
|
|
377
377
|
<%s {...props} />
|
|
@@ -382,7 +382,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
382
382
|
P,
|
|
383
383
|
ae,
|
|
384
384
|
P
|
|
385
|
-
),
|
|
385
|
+
), Rt[P + O] = !0);
|
|
386
386
|
}
|
|
387
387
|
if (P = null, T !== void 0 && (n(T), P = "" + T), d(x) && (n(x.key), P = "" + x.key), "key" in x) {
|
|
388
388
|
T = {};
|
|
@@ -392,30 +392,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
392
392
|
return P && g(
|
|
393
393
|
T,
|
|
394
394
|
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
395
|
-
), y(i, P, U, B,
|
|
395
|
+
), y(i, P, U, B, E(), T);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function m(i, x) {
|
|
398
398
|
if (typeof i == "object" && i && i.$$typeof !== fr) {
|
|
399
|
-
if (
|
|
399
|
+
if (Ae(i))
|
|
400
400
|
for (var T = 0; T < i.length; T++) {
|
|
401
401
|
var O = i[T];
|
|
402
|
-
c(O) &&
|
|
402
|
+
c(O) && v(O, x);
|
|
403
403
|
}
|
|
404
404
|
else if (c(i))
|
|
405
405
|
i._store && (i._store.validated = 1);
|
|
406
406
|
else if (i === null || typeof i != "object" ? T = null : (T = Ye && i[Ye] || i["@@iterator"], T = typeof T == "function" ? T : null), typeof T == "function" && T !== i.entries && (T = T.call(i), T !== i))
|
|
407
407
|
for (; !(i = T.next()).done; )
|
|
408
|
-
c(i.value) &&
|
|
408
|
+
c(i.value) && v(i.value, x);
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
function c(i) {
|
|
412
|
-
return typeof i == "object" && i !== null && i.$$typeof ===
|
|
412
|
+
return typeof i == "object" && i !== null && i.$$typeof === A;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x =
|
|
416
|
-
|
|
414
|
+
function v(i, x) {
|
|
415
|
+
if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, x = b(x), !At[x])) {
|
|
416
|
+
At[x] = !0;
|
|
417
417
|
var T = "";
|
|
418
|
-
i && i._owner != null && i._owner !==
|
|
418
|
+
i && i._owner != null && i._owner !== E() && (T = null, typeof i._owner.tag == "number" ? T = e(i._owner.type) : typeof i._owner.name == "string" && (T = i._owner.name), T = " It was passed a child from " + T + ".");
|
|
419
419
|
var O = oe.getCurrentStack;
|
|
420
420
|
oe.getCurrentStack = function() {
|
|
421
421
|
var B = l(i.type);
|
|
@@ -427,17 +427,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
427
427
|
), oe.getCurrentStack = O;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
function
|
|
431
|
-
var x = "", T =
|
|
430
|
+
function b(i) {
|
|
431
|
+
var x = "", T = E();
|
|
432
432
|
return T && (T = e(T.type)) && (x = `
|
|
433
433
|
|
|
434
434
|
Check the render method of \`` + T + "`."), x || (i = e(i)) && (x = `
|
|
435
435
|
|
|
436
436
|
Check the top-level render call using <` + i + ">."), x;
|
|
437
437
|
}
|
|
438
|
-
var
|
|
438
|
+
var w = mr, A = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), D = Symbol.for("react.consumer"), K = Symbol.for("react.context"), F = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), ue = Symbol.for("react.suspense_list"), Te = Symbol.for("react.memo"), we = Symbol.for("react.lazy"), dt = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Re = Object.prototype.hasOwnProperty, ie = Object.assign, ft = Symbol.for("react.client.reference"), Ae = Array.isArray, fe = 0, Fe, Ve, We, Be, Ge, Xe, qe;
|
|
439
439
|
r.__reactDisabledLog = !0;
|
|
440
|
-
var
|
|
440
|
+
var R, he, le = !1, ve = new (typeof WeakMap == "function" ? WeakMap : Map)(), fr = Symbol.for("react.client.reference"), Tt, wt = {}, Rt = {}, At = {};
|
|
441
441
|
Pe.Fragment = _, Pe.jsx = function(i, x, T, O, B) {
|
|
442
442
|
return p(i, x, T, !1, O, B);
|
|
443
443
|
}, Pe.jsxs = function(i, x, T, O, B) {
|
|
@@ -449,15 +449,15 @@ var Ot;
|
|
|
449
449
|
function Mr() {
|
|
450
450
|
return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Je.exports = Or() : Je.exports = Nr()), Je.exports;
|
|
451
451
|
}
|
|
452
|
-
var
|
|
453
|
-
function
|
|
452
|
+
var Le = Mr();
|
|
453
|
+
function Lr(e) {
|
|
454
454
|
if (e.sheet)
|
|
455
455
|
return e.sheet;
|
|
456
456
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
457
457
|
if (document.styleSheets[t].ownerNode === e)
|
|
458
458
|
return document.styleSheets[t];
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function kr(e) {
|
|
461
461
|
var t = document.createElement("style");
|
|
462
462
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
463
463
|
}
|
|
@@ -473,10 +473,10 @@ var $r = /* @__PURE__ */ function() {
|
|
|
473
473
|
return t.hydrate = function(r) {
|
|
474
474
|
r.forEach(this._insertTag);
|
|
475
475
|
}, t.insert = function(r) {
|
|
476
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
476
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(kr(this));
|
|
477
477
|
var o = this.tags[this.tags.length - 1];
|
|
478
478
|
if (this.isSpeedy) {
|
|
479
|
-
var a =
|
|
479
|
+
var a = Lr(o);
|
|
480
480
|
try {
|
|
481
481
|
a.insertRule(r, a.cssRules.length);
|
|
482
482
|
} catch {
|
|
@@ -509,7 +509,7 @@ function ht(e, t) {
|
|
|
509
509
|
function V(e, t) {
|
|
510
510
|
return e.charCodeAt(t) | 0;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function ke(e, t, n) {
|
|
513
513
|
return e.slice(t, n);
|
|
514
514
|
}
|
|
515
515
|
function te(e) {
|
|
@@ -547,7 +547,7 @@ function et() {
|
|
|
547
547
|
return H;
|
|
548
548
|
}
|
|
549
549
|
function De(e, t) {
|
|
550
|
-
return
|
|
550
|
+
return ke(xe, e, t);
|
|
551
551
|
}
|
|
552
552
|
function $e(e) {
|
|
553
553
|
switch (e) {
|
|
@@ -628,13 +628,13 @@ function vt(e) {
|
|
|
628
628
|
}
|
|
629
629
|
return H;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Xr(e, t) {
|
|
632
632
|
for (; J() && e + j !== 57; )
|
|
633
633
|
if (e + j === 84 && ne() === 47)
|
|
634
634
|
break;
|
|
635
635
|
return "/*" + De(t, H - 1) + "*" + at(e === 47 ? e : J());
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function qr(e) {
|
|
638
638
|
for (; !$e(ne()); )
|
|
639
639
|
J();
|
|
640
640
|
return De(e, H);
|
|
@@ -643,19 +643,19 @@ function Hr(e) {
|
|
|
643
643
|
return tr(rt("", null, null, null, [""], e = er(e), 0, [0], e));
|
|
644
644
|
}
|
|
645
645
|
function rt(e, t, n, r, o, a, s, u, l) {
|
|
646
|
-
for (var
|
|
647
|
-
switch (p =
|
|
646
|
+
for (var E = 0, d = 0, g = s, S = 0, y = 0, p = 0, m = 1, c = 1, v = 1, b = 0, w = "", A = o, f = a, _ = r, C = w; c; )
|
|
647
|
+
switch (p = b, b = J()) {
|
|
648
648
|
// (
|
|
649
649
|
case 40:
|
|
650
650
|
if (p != 108 && V(C, g - 1) == 58) {
|
|
651
|
-
ht(C += M(tt(
|
|
651
|
+
ht(C += M(tt(b), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
652
652
|
break;
|
|
653
653
|
}
|
|
654
654
|
// " ' [
|
|
655
655
|
case 34:
|
|
656
656
|
case 39:
|
|
657
657
|
case 91:
|
|
658
|
-
C += tt(
|
|
658
|
+
C += tt(b);
|
|
659
659
|
break;
|
|
660
660
|
// \t \n \r \s
|
|
661
661
|
case 9:
|
|
@@ -673,36 +673,36 @@ function rt(e, t, n, r, o, a, s, u, l) {
|
|
|
673
673
|
switch (ne()) {
|
|
674
674
|
case 42:
|
|
675
675
|
case 47:
|
|
676
|
-
Ze(Kr(
|
|
676
|
+
Ze(Kr(Xr(J(), et()), t, n), l);
|
|
677
677
|
break;
|
|
678
678
|
default:
|
|
679
679
|
C += "/";
|
|
680
680
|
}
|
|
681
681
|
break;
|
|
682
682
|
// {
|
|
683
|
-
case 123 *
|
|
684
|
-
u[
|
|
683
|
+
case 123 * m:
|
|
684
|
+
u[E++] = te(C) * v;
|
|
685
685
|
// } ; \0
|
|
686
|
-
case 125 *
|
|
686
|
+
case 125 * m:
|
|
687
687
|
case 59:
|
|
688
688
|
case 0:
|
|
689
|
-
switch (
|
|
689
|
+
switch (b) {
|
|
690
690
|
// \0 }
|
|
691
691
|
case 0:
|
|
692
692
|
case 125:
|
|
693
693
|
c = 0;
|
|
694
694
|
// ;
|
|
695
695
|
case 59 + d:
|
|
696
|
-
|
|
696
|
+
v == -1 && (C = M(C, /\f/g, "")), y > 0 && te(C) - g && Ze(y > 32 ? Mt(C + ";", r, n, g - 1) : Mt(M(C, " ", "") + ";", r, n, g - 2), l);
|
|
697
697
|
break;
|
|
698
698
|
// @ ;
|
|
699
699
|
case 59:
|
|
700
700
|
C += ";";
|
|
701
701
|
// { rule/at-rule
|
|
702
702
|
default:
|
|
703
|
-
if (Ze(_ = Nt(C, t, n,
|
|
703
|
+
if (Ze(_ = Nt(C, t, n, E, d, o, u, w, A = [], f = [], g), a), b === 123)
|
|
704
704
|
if (d === 0)
|
|
705
|
-
rt(C, t, _, _,
|
|
705
|
+
rt(C, t, _, _, A, a, g, u, f);
|
|
706
706
|
else
|
|
707
707
|
switch (S === 99 && V(C, 3) === 110 ? 100 : S) {
|
|
708
708
|
// d l m s
|
|
@@ -710,55 +710,55 @@ function rt(e, t, n, r, o, a, s, u, l) {
|
|
|
710
710
|
case 108:
|
|
711
711
|
case 109:
|
|
712
712
|
case 115:
|
|
713
|
-
rt(e, _, _, r && Ze(Nt(e, _, _, 0, 0, o, u,
|
|
713
|
+
rt(e, _, _, r && Ze(Nt(e, _, _, 0, 0, o, u, w, o, A = [], g), f), o, f, g, u, r ? A : f);
|
|
714
714
|
break;
|
|
715
715
|
default:
|
|
716
|
-
rt(C, _, _, _, [""],
|
|
716
|
+
rt(C, _, _, _, [""], f, 0, u, f);
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
|
|
719
|
+
E = d = y = 0, m = v = 1, w = C = "", g = s;
|
|
720
720
|
break;
|
|
721
721
|
// :
|
|
722
722
|
case 58:
|
|
723
723
|
g = 1 + te(C), y = p;
|
|
724
724
|
default:
|
|
725
|
-
if (
|
|
726
|
-
if (
|
|
727
|
-
--
|
|
728
|
-
else if (
|
|
725
|
+
if (m < 1) {
|
|
726
|
+
if (b == 123)
|
|
727
|
+
--m;
|
|
728
|
+
else if (b == 125 && m++ == 0 && Wr() == 125)
|
|
729
729
|
continue;
|
|
730
730
|
}
|
|
731
|
-
switch (C += at(
|
|
731
|
+
switch (C += at(b), b * m) {
|
|
732
732
|
// &
|
|
733
733
|
case 38:
|
|
734
|
-
|
|
734
|
+
v = d > 0 ? 1 : (C += "\f", -1);
|
|
735
735
|
break;
|
|
736
736
|
// ,
|
|
737
737
|
case 44:
|
|
738
|
-
u[
|
|
738
|
+
u[E++] = (te(C) - 1) * v, v = 1;
|
|
739
739
|
break;
|
|
740
740
|
// @
|
|
741
741
|
case 64:
|
|
742
|
-
ne() === 45 && (C += tt(J())), S = ne(), d = g = te(
|
|
742
|
+
ne() === 45 && (C += tt(J())), S = ne(), d = g = te(w = C += qr(et())), b++;
|
|
743
743
|
break;
|
|
744
744
|
// -
|
|
745
745
|
case 45:
|
|
746
|
-
p === 45 && te(C) == 2 && (
|
|
746
|
+
p === 45 && te(C) == 2 && (m = 0);
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
749
|
return a;
|
|
750
750
|
}
|
|
751
|
-
function Nt(e, t, n, r, o, a, s, u, l,
|
|
752
|
-
for (var g = o - 1, S = o === 0 ? a : [""], y = St(S), p = 0,
|
|
753
|
-
for (var
|
|
754
|
-
(
|
|
755
|
-
return ct(e, t, n, o === 0 ? gt : u, l,
|
|
751
|
+
function Nt(e, t, n, r, o, a, s, u, l, E, d) {
|
|
752
|
+
for (var g = o - 1, S = o === 0 ? a : [""], y = St(S), p = 0, m = 0, c = 0; p < r; ++p)
|
|
753
|
+
for (var v = 0, b = ke(e, g + 1, g = Dr(m = s[p])), w = e; v < y; ++v)
|
|
754
|
+
(w = Zt(m > 0 ? S[v] + " " + b : M(b, /&\f/g, S[v]))) && (l[c++] = w);
|
|
755
|
+
return ct(e, t, n, o === 0 ? gt : u, l, E, d);
|
|
756
756
|
}
|
|
757
757
|
function Kr(e, t, n) {
|
|
758
|
-
return ct(e, t, n, Kt, at(Vr()),
|
|
758
|
+
return ct(e, t, n, Kt, at(Vr()), ke(e, 2, -2), 0);
|
|
759
759
|
}
|
|
760
760
|
function Mt(e, t, n, r) {
|
|
761
|
-
return ct(e, t, n, yt,
|
|
761
|
+
return ct(e, t, n, yt, ke(e, 0, r), ke(e, r + 1, -1), r);
|
|
762
762
|
}
|
|
763
763
|
function be(e, t) {
|
|
764
764
|
for (var n = "", r = St(e), o = 0; o < r; o++)
|
|
@@ -827,17 +827,17 @@ var tn = function(t, n, r) {
|
|
|
827
827
|
return t;
|
|
828
828
|
}, nn = function(t, n) {
|
|
829
829
|
return tr(rn(er(t), n));
|
|
830
|
-
},
|
|
830
|
+
}, Lt = /* @__PURE__ */ new WeakMap(), on = function(t) {
|
|
831
831
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
832
832
|
// negative .length indicates that this rule has been already prefixed
|
|
833
833
|
t.length < 1)) {
|
|
834
834
|
for (var n = t.value, r = t.parent, o = t.column === r.column && t.line === r.line; r.type !== "rule"; )
|
|
835
835
|
if (r = r.parent, !r) return;
|
|
836
|
-
if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !
|
|
837
|
-
|
|
838
|
-
for (var a = [], s = nn(n, a), u = r.props, l = 0,
|
|
839
|
-
for (var d = 0; d < u.length; d++,
|
|
840
|
-
t.props[
|
|
836
|
+
if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !Lt.get(r)) && !o) {
|
|
837
|
+
Lt.set(t, !0);
|
|
838
|
+
for (var a = [], s = nn(n, a), u = r.props, l = 0, E = 0; l < s.length; l++)
|
|
839
|
+
for (var d = 0; d < u.length; d++, E++)
|
|
840
|
+
t.props[E] = a[l] ? s[l].replace(/&\f/g, u[d]) : u[d] + " " + s[l];
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
}, an = function(t) {
|
|
@@ -1025,9 +1025,9 @@ var sn = function(t, n, r, o) {
|
|
|
1025
1025
|
var n = t.key;
|
|
1026
1026
|
if (n === "css") {
|
|
1027
1027
|
var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1028
|
-
Array.prototype.forEach.call(r, function(
|
|
1029
|
-
var c =
|
|
1030
|
-
c.indexOf(" ") !== -1 && (document.head.appendChild(
|
|
1028
|
+
Array.prototype.forEach.call(r, function(m) {
|
|
1029
|
+
var c = m.getAttribute("data-emotion");
|
|
1030
|
+
c.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
var o = t.stylisPlugins || cn, a = {}, s, u = [];
|
|
@@ -1035,21 +1035,21 @@ var sn = function(t, n, r, o) {
|
|
|
1035
1035
|
// this means we will ignore elements which don't have a space in them which
|
|
1036
1036
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1037
1037
|
document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
|
|
1038
|
-
function(
|
|
1039
|
-
for (var c =
|
|
1040
|
-
a[c[
|
|
1041
|
-
u.push(
|
|
1038
|
+
function(m) {
|
|
1039
|
+
for (var c = m.getAttribute("data-emotion").split(" "), v = 1; v < c.length; v++)
|
|
1040
|
+
a[c[v]] = !0;
|
|
1041
|
+
u.push(m);
|
|
1042
1042
|
}
|
|
1043
1043
|
);
|
|
1044
|
-
var l,
|
|
1044
|
+
var l, E = [on, an];
|
|
1045
1045
|
{
|
|
1046
|
-
var d, g = [Jr, Qr(function(
|
|
1047
|
-
d.insert(
|
|
1048
|
-
})], S = Zr(
|
|
1046
|
+
var d, g = [Jr, Qr(function(m) {
|
|
1047
|
+
d.insert(m);
|
|
1048
|
+
})], S = Zr(E.concat(o, g)), y = function(c) {
|
|
1049
1049
|
return be(Hr(c), S);
|
|
1050
1050
|
};
|
|
1051
|
-
l = function(c,
|
|
1052
|
-
d =
|
|
1051
|
+
l = function(c, v, b, w) {
|
|
1052
|
+
d = b, y(c ? c + "{" + v.styles + "}" : v.styles), w && (p.inserted[v.name] = !0);
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
1055
|
var p = {
|
|
@@ -1068,7 +1068,7 @@ var sn = function(t, n, r, o) {
|
|
|
1068
1068
|
insert: l
|
|
1069
1069
|
};
|
|
1070
1070
|
return p.sheet.hydrate(u), p;
|
|
1071
|
-
}, Qe = { exports: {} },
|
|
1071
|
+
}, Qe = { exports: {} }, L = {};
|
|
1072
1072
|
/** @license React v16.13.1
|
|
1073
1073
|
* react-is.production.min.js
|
|
1074
1074
|
*
|
|
@@ -1077,32 +1077,32 @@ var sn = function(t, n, r, o) {
|
|
|
1077
1077
|
* This source code is licensed under the MIT license found in the
|
|
1078
1078
|
* LICENSE file in the root directory of this source tree.
|
|
1079
1079
|
*/
|
|
1080
|
-
var
|
|
1080
|
+
var kt;
|
|
1081
1081
|
function ln() {
|
|
1082
|
-
if (
|
|
1083
|
-
|
|
1084
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1085
|
-
function
|
|
1086
|
-
if (typeof
|
|
1087
|
-
var _ =
|
|
1082
|
+
if (kt) return L;
|
|
1083
|
+
kt = 1;
|
|
1084
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, E = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
|
|
1085
|
+
function w(f) {
|
|
1086
|
+
if (typeof f == "object" && f !== null) {
|
|
1087
|
+
var _ = f.$$typeof;
|
|
1088
1088
|
switch (_) {
|
|
1089
1089
|
case t:
|
|
1090
|
-
switch (
|
|
1090
|
+
switch (f = f.type, f) {
|
|
1091
1091
|
case l:
|
|
1092
|
-
case
|
|
1092
|
+
case E:
|
|
1093
1093
|
case r:
|
|
1094
1094
|
case a:
|
|
1095
1095
|
case o:
|
|
1096
1096
|
case g:
|
|
1097
|
-
return
|
|
1097
|
+
return f;
|
|
1098
1098
|
default:
|
|
1099
|
-
switch (
|
|
1099
|
+
switch (f = f && f.$$typeof, f) {
|
|
1100
1100
|
case u:
|
|
1101
1101
|
case d:
|
|
1102
1102
|
case p:
|
|
1103
1103
|
case y:
|
|
1104
1104
|
case s:
|
|
1105
|
-
return
|
|
1105
|
+
return f;
|
|
1106
1106
|
default:
|
|
1107
1107
|
return _;
|
|
1108
1108
|
}
|
|
@@ -1112,38 +1112,38 @@ function ln() {
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1115
|
+
function A(f) {
|
|
1116
|
+
return w(f) === E;
|
|
1117
1117
|
}
|
|
1118
|
-
return
|
|
1119
|
-
return
|
|
1120
|
-
},
|
|
1121
|
-
return
|
|
1122
|
-
},
|
|
1123
|
-
return
|
|
1124
|
-
},
|
|
1125
|
-
return typeof
|
|
1126
|
-
},
|
|
1127
|
-
return
|
|
1128
|
-
},
|
|
1129
|
-
return
|
|
1130
|
-
},
|
|
1131
|
-
return
|
|
1132
|
-
},
|
|
1133
|
-
return
|
|
1134
|
-
},
|
|
1135
|
-
return
|
|
1136
|
-
},
|
|
1137
|
-
return
|
|
1138
|
-
},
|
|
1139
|
-
return
|
|
1140
|
-
},
|
|
1141
|
-
return
|
|
1142
|
-
},
|
|
1143
|
-
return typeof
|
|
1144
|
-
},
|
|
1118
|
+
return L.AsyncMode = l, L.ConcurrentMode = E, L.ContextConsumer = u, L.ContextProvider = s, L.Element = t, L.ForwardRef = d, L.Fragment = r, L.Lazy = p, L.Memo = y, L.Portal = n, L.Profiler = a, L.StrictMode = o, L.Suspense = g, L.isAsyncMode = function(f) {
|
|
1119
|
+
return A(f) || w(f) === l;
|
|
1120
|
+
}, L.isConcurrentMode = A, L.isContextConsumer = function(f) {
|
|
1121
|
+
return w(f) === u;
|
|
1122
|
+
}, L.isContextProvider = function(f) {
|
|
1123
|
+
return w(f) === s;
|
|
1124
|
+
}, L.isElement = function(f) {
|
|
1125
|
+
return typeof f == "object" && f !== null && f.$$typeof === t;
|
|
1126
|
+
}, L.isForwardRef = function(f) {
|
|
1127
|
+
return w(f) === d;
|
|
1128
|
+
}, L.isFragment = function(f) {
|
|
1129
|
+
return w(f) === r;
|
|
1130
|
+
}, L.isLazy = function(f) {
|
|
1131
|
+
return w(f) === p;
|
|
1132
|
+
}, L.isMemo = function(f) {
|
|
1133
|
+
return w(f) === y;
|
|
1134
|
+
}, L.isPortal = function(f) {
|
|
1135
|
+
return w(f) === n;
|
|
1136
|
+
}, L.isProfiler = function(f) {
|
|
1137
|
+
return w(f) === a;
|
|
1138
|
+
}, L.isStrictMode = function(f) {
|
|
1139
|
+
return w(f) === o;
|
|
1140
|
+
}, L.isSuspense = function(f) {
|
|
1141
|
+
return w(f) === g;
|
|
1142
|
+
}, L.isValidElementType = function(f) {
|
|
1143
|
+
return typeof f == "string" || typeof f == "function" || f === r || f === E || f === a || f === o || f === g || f === S || typeof f == "object" && f !== null && (f.$$typeof === p || f.$$typeof === y || f.$$typeof === s || f.$$typeof === u || f.$$typeof === d || f.$$typeof === c || f.$$typeof === v || f.$$typeof === b || f.$$typeof === m);
|
|
1144
|
+
}, L.typeOf = w, L;
|
|
1145
1145
|
}
|
|
1146
|
-
var
|
|
1146
|
+
var k = {};
|
|
1147
1147
|
/** @license React v16.13.1
|
|
1148
1148
|
* react-is.development.js
|
|
1149
1149
|
*
|
|
@@ -1155,20 +1155,20 @@ var L = {};
|
|
|
1155
1155
|
var $t;
|
|
1156
1156
|
function dn() {
|
|
1157
1157
|
return $t || ($t = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1158
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1159
|
-
function
|
|
1160
|
-
return typeof
|
|
1161
|
-
|
|
1162
|
-
}
|
|
1163
|
-
function R
|
|
1164
|
-
if (typeof
|
|
1165
|
-
var he =
|
|
1158
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, E = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, y = e ? Symbol.for("react.memo") : 60115, p = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, c = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, b = e ? Symbol.for("react.scope") : 60119;
|
|
1159
|
+
function w(R) {
|
|
1160
|
+
return typeof R == "string" || typeof R == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1161
|
+
R === r || R === E || R === a || R === o || R === g || R === S || typeof R == "object" && R !== null && (R.$$typeof === p || R.$$typeof === y || R.$$typeof === s || R.$$typeof === u || R.$$typeof === d || R.$$typeof === c || R.$$typeof === v || R.$$typeof === b || R.$$typeof === m);
|
|
1162
|
+
}
|
|
1163
|
+
function A(R) {
|
|
1164
|
+
if (typeof R == "object" && R !== null) {
|
|
1165
|
+
var he = R.$$typeof;
|
|
1166
1166
|
switch (he) {
|
|
1167
1167
|
case t:
|
|
1168
|
-
var le =
|
|
1168
|
+
var le = R.type;
|
|
1169
1169
|
switch (le) {
|
|
1170
1170
|
case l:
|
|
1171
|
-
case
|
|
1171
|
+
case E:
|
|
1172
1172
|
case r:
|
|
1173
1173
|
case a:
|
|
1174
1174
|
case o:
|
|
@@ -1192,48 +1192,48 @@ function dn() {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
1195
|
-
var
|
|
1196
|
-
function oe(
|
|
1197
|
-
return ze || (ze = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
1195
|
+
var f = l, _ = E, C = u, W = s, D = t, K = d, F = r, ee = p, ue = y, Te = n, we = a, dt = o, Ye = g, ze = !1;
|
|
1196
|
+
function oe(R) {
|
|
1197
|
+
return ze || (ze = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Re(R) || A(R) === l;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return R
|
|
1199
|
+
function Re(R) {
|
|
1200
|
+
return A(R) === E;
|
|
1201
1201
|
}
|
|
1202
|
-
function ie(
|
|
1203
|
-
return R
|
|
1202
|
+
function ie(R) {
|
|
1203
|
+
return A(R) === u;
|
|
1204
1204
|
}
|
|
1205
|
-
function ft(
|
|
1206
|
-
return R
|
|
1205
|
+
function ft(R) {
|
|
1206
|
+
return A(R) === s;
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return typeof
|
|
1208
|
+
function Ae(R) {
|
|
1209
|
+
return typeof R == "object" && R !== null && R.$$typeof === t;
|
|
1210
1210
|
}
|
|
1211
|
-
function fe(
|
|
1212
|
-
return R
|
|
1211
|
+
function fe(R) {
|
|
1212
|
+
return A(R) === d;
|
|
1213
1213
|
}
|
|
1214
|
-
function Fe(
|
|
1215
|
-
return R
|
|
1214
|
+
function Fe(R) {
|
|
1215
|
+
return A(R) === r;
|
|
1216
1216
|
}
|
|
1217
|
-
function Ve(
|
|
1218
|
-
return R
|
|
1217
|
+
function Ve(R) {
|
|
1218
|
+
return A(R) === p;
|
|
1219
1219
|
}
|
|
1220
|
-
function We(
|
|
1221
|
-
return R
|
|
1220
|
+
function We(R) {
|
|
1221
|
+
return A(R) === y;
|
|
1222
1222
|
}
|
|
1223
|
-
function Be(
|
|
1224
|
-
return R
|
|
1223
|
+
function Be(R) {
|
|
1224
|
+
return A(R) === n;
|
|
1225
1225
|
}
|
|
1226
|
-
function Ge(
|
|
1227
|
-
return R
|
|
1226
|
+
function Ge(R) {
|
|
1227
|
+
return A(R) === a;
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1230
|
-
return R
|
|
1229
|
+
function Xe(R) {
|
|
1230
|
+
return A(R) === o;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return R
|
|
1232
|
+
function qe(R) {
|
|
1233
|
+
return A(R) === g;
|
|
1234
1234
|
}
|
|
1235
|
-
|
|
1236
|
-
}()),
|
|
1235
|
+
k.AsyncMode = f, k.ConcurrentMode = _, k.ContextConsumer = C, k.ContextProvider = W, k.Element = D, k.ForwardRef = K, k.Fragment = F, k.Lazy = ee, k.Memo = ue, k.Portal = Te, k.Profiler = we, k.StrictMode = dt, k.Suspense = Ye, k.isAsyncMode = oe, k.isConcurrentMode = Re, k.isContextConsumer = ie, k.isContextProvider = ft, k.isElement = Ae, k.isForwardRef = fe, k.isFragment = Fe, k.isLazy = Ve, k.isMemo = We, k.isPortal = Be, k.isProfiler = Ge, k.isStrictMode = Xe, k.isSuspense = qe, k.isValidElementType = w, k.typeOf = A;
|
|
1236
|
+
}()), k;
|
|
1237
1237
|
}
|
|
1238
1238
|
var It;
|
|
1239
1239
|
function fn() {
|
|
@@ -1281,19 +1281,19 @@ function mn() {
|
|
|
1281
1281
|
function s(p) {
|
|
1282
1282
|
return e.isMemo(p) ? o : a[p.$$typeof] || t;
|
|
1283
1283
|
}
|
|
1284
|
-
var u = Object.defineProperty, l = Object.getOwnPropertyNames,
|
|
1285
|
-
function y(p,
|
|
1286
|
-
if (typeof
|
|
1284
|
+
var u = Object.defineProperty, l = Object.getOwnPropertyNames, E = Object.getOwnPropertySymbols, d = Object.getOwnPropertyDescriptor, g = Object.getPrototypeOf, S = Object.prototype;
|
|
1285
|
+
function y(p, m, c) {
|
|
1286
|
+
if (typeof m != "string") {
|
|
1287
1287
|
if (S) {
|
|
1288
|
-
var
|
|
1289
|
-
|
|
1288
|
+
var v = g(m);
|
|
1289
|
+
v && v !== S && y(p, v, c);
|
|
1290
1290
|
}
|
|
1291
|
-
var
|
|
1292
|
-
|
|
1293
|
-
for (var
|
|
1294
|
-
var _ =
|
|
1295
|
-
if (!n[_] && !(c && c[_]) && !(
|
|
1296
|
-
var C = d(
|
|
1291
|
+
var b = l(m);
|
|
1292
|
+
E && (b = b.concat(E(m)));
|
|
1293
|
+
for (var w = s(p), A = s(m), f = 0; f < b.length; ++f) {
|
|
1294
|
+
var _ = b[f];
|
|
1295
|
+
if (!n[_] && !(c && c[_]) && !(A && A[_]) && !(w && w[_])) {
|
|
1296
|
+
var C = d(m, _);
|
|
1297
1297
|
try {
|
|
1298
1298
|
u(p, _, C);
|
|
1299
1299
|
} catch {
|
|
@@ -1458,8 +1458,8 @@ function Ie(e, t, n) {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
case "function": {
|
|
1460
1460
|
if (e !== void 0) {
|
|
1461
|
-
var l = re,
|
|
1462
|
-
return re = l, Ie(e, t,
|
|
1461
|
+
var l = re, E = n(e);
|
|
1462
|
+
return re = l, Ie(e, t, E);
|
|
1463
1463
|
}
|
|
1464
1464
|
break;
|
|
1465
1465
|
}
|
|
@@ -1482,15 +1482,15 @@ function Sn(e, t, n) {
|
|
|
1482
1482
|
for (var l = 0; l < s.length; l++)
|
|
1483
1483
|
Dt(s[l]) && (r += pt(a) + ":" + jt(a, s[l]) + ";");
|
|
1484
1484
|
else {
|
|
1485
|
-
var
|
|
1485
|
+
var E = Ie(e, t, s);
|
|
1486
1486
|
switch (a) {
|
|
1487
1487
|
case "animation":
|
|
1488
1488
|
case "animationName": {
|
|
1489
|
-
r += pt(a) + ":" +
|
|
1489
|
+
r += pt(a) + ":" + E + ";";
|
|
1490
1490
|
break;
|
|
1491
1491
|
}
|
|
1492
1492
|
default:
|
|
1493
|
-
r += a + "{" +
|
|
1493
|
+
r += a + "{" + E + "}";
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
}
|
|
@@ -1515,9 +1515,9 @@ function xn(e, t, n) {
|
|
|
1515
1515
|
o += l[u];
|
|
1516
1516
|
}
|
|
1517
1517
|
Yt.lastIndex = 0;
|
|
1518
|
-
for (var
|
|
1519
|
-
|
|
1520
|
-
var g = En(o) +
|
|
1518
|
+
for (var E = "", d; (d = Yt.exec(o)) !== null; )
|
|
1519
|
+
E += "-" + d[1];
|
|
1520
|
+
var g = En(o) + E;
|
|
1521
1521
|
return {
|
|
1522
1522
|
name: g,
|
|
1523
1523
|
styles: o,
|
|
@@ -1526,7 +1526,7 @@ function xn(e, t, n) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
var Tn = function(t) {
|
|
1528
1528
|
return t();
|
|
1529
|
-
}, wn = ce.useInsertionEffect ? ce.useInsertionEffect : !1,
|
|
1529
|
+
}, wn = ce.useInsertionEffect ? ce.useInsertionEffect : !1, Rn = wn || Tn, ir = /* @__PURE__ */ ce.createContext(
|
|
1530
1530
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1531
1531
|
// because this module is primarily intended for the browser and node
|
|
1532
1532
|
// but it's also required in react native and similar environments sometimes
|
|
@@ -1538,7 +1538,7 @@ var Tn = function(t) {
|
|
|
1538
1538
|
}) : null
|
|
1539
1539
|
);
|
|
1540
1540
|
ir.Provider;
|
|
1541
|
-
var
|
|
1541
|
+
var An = function(t) {
|
|
1542
1542
|
return /* @__PURE__ */ pr(function(n, r) {
|
|
1543
1543
|
var o = Ue(ir);
|
|
1544
1544
|
return t(n, o, r);
|
|
@@ -1550,10 +1550,10 @@ var Rn = function(t) {
|
|
|
1550
1550
|
return r[Et] = t, r;
|
|
1551
1551
|
}, Cn = function(t) {
|
|
1552
1552
|
var n = t.cache, r = t.serialized, o = t.isStringTag;
|
|
1553
|
-
return nr(n, r, o),
|
|
1553
|
+
return nr(n, r, o), Rn(function() {
|
|
1554
1554
|
return vn(n, r, o);
|
|
1555
1555
|
}), null;
|
|
1556
|
-
}, Pn = /* @__PURE__ */
|
|
1556
|
+
}, Pn = /* @__PURE__ */ An(function(e, t, n) {
|
|
1557
1557
|
var r = e.css;
|
|
1558
1558
|
typeof r == "string" && t.registered[r] !== void 0 && (r = t.registered[r]);
|
|
1559
1559
|
var o = e[Et], a = [r], s = "";
|
|
@@ -1561,28 +1561,28 @@ var Rn = function(t) {
|
|
|
1561
1561
|
var u = xn(a, void 0, ce.useContext(_n));
|
|
1562
1562
|
s += t.key + "-" + u.name;
|
|
1563
1563
|
var l = {};
|
|
1564
|
-
for (var
|
|
1565
|
-
ut.call(e,
|
|
1564
|
+
for (var E in e)
|
|
1565
|
+
ut.call(e, E) && E !== "css" && E !== Et && (l[E] = e[E]);
|
|
1566
1566
|
return l.className = s, n && (l.ref = n), /* @__PURE__ */ ce.createElement(ce.Fragment, null, /* @__PURE__ */ ce.createElement(Cn, {
|
|
1567
1567
|
cache: t,
|
|
1568
1568
|
serialized: u,
|
|
1569
1569
|
isStringTag: typeof o == "string"
|
|
1570
1570
|
}), /* @__PURE__ */ ce.createElement(o, l));
|
|
1571
|
-
}), sr = Pn, cr =
|
|
1572
|
-
return ut.call(n, "css") ?
|
|
1571
|
+
}), sr = Pn, cr = Le.Fragment, h = function(t, n, r) {
|
|
1572
|
+
return ut.call(n, "css") ? Le.jsx(sr, ar(t, n), r) : Le.jsx(t, n, r);
|
|
1573
1573
|
}, I = function(t, n, r) {
|
|
1574
|
-
return ut.call(n, "css") ?
|
|
1574
|
+
return ut.call(n, "css") ? Le.jsxs(sr, ar(t, n), r) : Le.jsxs(t, n, r);
|
|
1575
1575
|
};
|
|
1576
|
-
const On =
|
|
1576
|
+
const On = Xt(({ sendBack: e, receive: t, input: n }) => {
|
|
1577
1577
|
const { videoElement: r } = n;
|
|
1578
1578
|
t((S) => {
|
|
1579
|
-
S.type === "PLAY" && (r.play(), o()), S.type === "PAUSE" && (r.pause(), o()), S.type === "SET_TIME" && (r.currentTime = S.value, u()), S.type === "SET_VOLUME" && (r.volume = S.volume, r.muted = S.muted, l()), S.type === "SET_PLAYBACK_RATE" && (r.playbackRate = S.playbackRate,
|
|
1579
|
+
S.type === "PLAY" && (r.play(), o()), S.type === "PAUSE" && (r.pause(), o()), S.type === "SET_TIME" && (r.currentTime = S.value, u()), S.type === "SET_VOLUME" && (r.volume = S.volume, r.muted = S.muted, l()), S.type === "SET_PLAYBACK_RATE" && (r.playbackRate = S.playbackRate, E());
|
|
1580
1580
|
});
|
|
1581
|
-
const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), u = () => e({ type: "TIME_UPDATE", currentTime: r.currentTime }), l = () => e({ type: "VOLUME_UPDATE", muted: r.muted, volume: r.volume }),
|
|
1582
|
-
return r.addEventListener("play", o), r.addEventListener("pause", a), r.addEventListener("ended", s), r.addEventListener("timeupdate", u), r.addEventListener("volumechange", l), r.addEventListener("ratechange",
|
|
1583
|
-
r.removeEventListener("play", o), r.removeEventListener("pause", a), r.removeEventListener("ended", s), r.removeEventListener("timeupdate", u), r.removeEventListener("volumechange", l), r.removeEventListener("ratechange",
|
|
1581
|
+
const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), u = () => e({ type: "TIME_UPDATE", currentTime: r.currentTime }), l = () => e({ type: "VOLUME_UPDATE", muted: r.muted, volume: r.volume }), E = () => e({ type: "PLAYBACK_RATE_UPDATE", playbackRate: r.playbackRate }), d = () => e({ type: "SEEKING", currentTime: r.currentTime }), g = () => e({ type: "DURATION_UPDATE", duration: r.duration });
|
|
1582
|
+
return r.addEventListener("play", o), r.addEventListener("pause", a), r.addEventListener("ended", s), r.addEventListener("timeupdate", u), r.addEventListener("volumechange", l), r.addEventListener("ratechange", E), r.addEventListener("seeking", d), r.addEventListener("durationchange", g), () => {
|
|
1583
|
+
r.removeEventListener("play", o), r.removeEventListener("pause", a), r.removeEventListener("ended", s), r.removeEventListener("timeupdate", u), r.removeEventListener("volumechange", l), r.removeEventListener("ratechange", E), r.removeEventListener("seeking", d), r.removeEventListener("durationchange", g);
|
|
1584
1584
|
};
|
|
1585
|
-
}), lt = (e) =>
|
|
1585
|
+
}), lt = (e) => Xt((...t) => {
|
|
1586
1586
|
const n = e(...t);
|
|
1587
1587
|
return () => {
|
|
1588
1588
|
n.then((r) => r?.());
|
|
@@ -1603,7 +1603,7 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1603
1603
|
};
|
|
1604
1604
|
e.addEventListener("updateend", r, { once: !0 }), e.addEventListener("abort", o, { once: !0 }), e.addEventListener("error", a, { once: !0 });
|
|
1605
1605
|
}, Nn = (e) => {
|
|
1606
|
-
const t = new
|
|
1606
|
+
const t = new qt({ concurrency: 1 });
|
|
1607
1607
|
return {
|
|
1608
1608
|
appendBuffer: (a) => t.add(
|
|
1609
1609
|
() => new Promise((s, u) => {
|
|
@@ -1619,13 +1619,13 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1619
1619
|
e.timestampOffset = a;
|
|
1620
1620
|
})
|
|
1621
1621
|
};
|
|
1622
|
-
}, Mn = -20,
|
|
1623
|
-
const { videoElement: a, preEvictionTime: s, postEvictionTime: u, bufferTargetTime: l } = n,
|
|
1624
|
-
a.addEventListener("error",
|
|
1622
|
+
}, Mn = -20, Ln = 60, kn = 30, $n = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
|
|
1623
|
+
const { videoElement: a, preEvictionTime: s, postEvictionTime: u, bufferTargetTime: l } = n, E = () => console.error(a.error);
|
|
1624
|
+
a.addEventListener("error", E);
|
|
1625
1625
|
const d = new MediaSource(), g = URL.createObjectURL(d);
|
|
1626
1626
|
a.src = g;
|
|
1627
|
-
const S = () => a.currentTime + (s ?? Mn), y = () => a.currentTime + (u ??
|
|
1628
|
-
let
|
|
1627
|
+
const S = () => a.currentTime + (s ?? Mn), y = () => a.currentTime + (u ?? Ln), p = () => a.currentTime + (l ?? kn);
|
|
1628
|
+
let m;
|
|
1629
1629
|
const c = await new Promise(
|
|
1630
1630
|
(D) => d.addEventListener(
|
|
1631
1631
|
"sourceopen",
|
|
@@ -1634,39 +1634,39 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1634
1634
|
t((F) => {
|
|
1635
1635
|
if (!K && F.type === "METADATA") {
|
|
1636
1636
|
const ee = d.addSourceBuffer(`video/mp4; codecs="${F.info.input.videoMimeType},${F.info.input.audioMimeType}"`);
|
|
1637
|
-
ee.mode = "segments", d.duration = F.info.input.duration,
|
|
1637
|
+
ee.mode = "segments", d.duration = F.info.input.duration, m = F.data, K = !0, D(ee);
|
|
1638
1638
|
}
|
|
1639
1639
|
});
|
|
1640
1640
|
},
|
|
1641
1641
|
{ once: !0 }
|
|
1642
1642
|
)
|
|
1643
1643
|
);
|
|
1644
|
-
if (!
|
|
1645
|
-
const { appendBuffer:
|
|
1646
|
-
|
|
1647
|
-
D.type === "DATA" ? await
|
|
1644
|
+
if (!m) throw new Error("No header buffer");
|
|
1645
|
+
const { appendBuffer: v, unbufferRange: b, updateTimestampOffset: w } = Nn(c);
|
|
1646
|
+
v(m), t(async (D) => {
|
|
1647
|
+
D.type === "DATA" ? await v(D.data) : D.type === "TIMESTAMP_OFFSET" && await w(D.timestampOffset);
|
|
1648
1648
|
});
|
|
1649
|
-
const
|
|
1649
|
+
const A = async () => {
|
|
1650
1650
|
const D = S(), K = y(), F = zt(c);
|
|
1651
1651
|
for (const { start: ee, end: ue } of F)
|
|
1652
|
-
ee < D && await
|
|
1652
|
+
ee < D && await b(
|
|
1653
1653
|
ee,
|
|
1654
1654
|
D
|
|
1655
|
-
), ue > K && await
|
|
1655
|
+
), ue > K && await b(
|
|
1656
1656
|
K,
|
|
1657
1657
|
ue
|
|
1658
1658
|
);
|
|
1659
|
-
},
|
|
1660
|
-
await
|
|
1659
|
+
}, f = setInterval(async () => {
|
|
1660
|
+
await A();
|
|
1661
1661
|
const D = zt(c);
|
|
1662
1662
|
Math.max(...D.map(({ end: F }) => F)) < p() && e({ type: "NEED_DATA" });
|
|
1663
1663
|
}, 100), _ = () => e({ type: "SOURCE_OPEN" }), C = () => e({ type: "SOURCE_ENDED" }), W = () => e({ type: "SOURCE_ERROR" });
|
|
1664
1664
|
return d.addEventListener("sourceopen", _), d.addEventListener("sourceended", C), d.addEventListener("error", W), () => {
|
|
1665
|
-
URL.revokeObjectURL(g), clearInterval(
|
|
1665
|
+
URL.revokeObjectURL(g), clearInterval(f), a.removeEventListener("error", E), d.removeEventListener("sourceopen", _), d.removeEventListener("sourceended", C), d.removeEventListener("error", W);
|
|
1666
1666
|
};
|
|
1667
1667
|
}), In = (e, t) => {
|
|
1668
1668
|
let n, r, o;
|
|
1669
|
-
const a = (s, u, l) => (
|
|
1669
|
+
const a = (s, u, l) => (E) => {
|
|
1670
1670
|
const d = performance.now();
|
|
1671
1671
|
return setTimeout(() => {
|
|
1672
1672
|
if (!o) {
|
|
@@ -1678,10 +1678,10 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1678
1678
|
console.error(p), l(p);
|
|
1679
1679
|
});
|
|
1680
1680
|
let S, y;
|
|
1681
|
-
r = new Promise((p,
|
|
1682
|
-
S = p, y =
|
|
1681
|
+
r = new Promise((p, m) => {
|
|
1682
|
+
S = p, y = m;
|
|
1683
1683
|
}), n = g.then(a(d, S, y)).catch((p) => (console.error(p), a(s, S, y)(p)));
|
|
1684
|
-
}, e - (d - s)),
|
|
1684
|
+
}, e - (d - s)), E;
|
|
1685
1685
|
};
|
|
1686
1686
|
return (...s) => {
|
|
1687
1687
|
if (o = s, n)
|
|
@@ -1689,27 +1689,27 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1689
1689
|
{
|
|
1690
1690
|
const u = performance.now(), l = (async () => t(...s))();
|
|
1691
1691
|
o = void 0;
|
|
1692
|
-
let
|
|
1692
|
+
let E, d;
|
|
1693
1693
|
return r = new Promise((g, S) => {
|
|
1694
|
-
|
|
1695
|
-
}), n = l.then(a(u,
|
|
1694
|
+
E = g, d = S;
|
|
1695
|
+
}), n = l.then(a(u, E, d)).catch((g) => (console.error(g), a(u, E, d)(g))), l;
|
|
1696
1696
|
}
|
|
1697
1697
|
};
|
|
1698
1698
|
}, Un = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
|
|
1699
|
-
const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length:
|
|
1699
|
+
const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: E, read: d } = a, g = await Ht({
|
|
1700
1700
|
publicPath: s,
|
|
1701
1701
|
workerUrl: u,
|
|
1702
1702
|
bufferSize: l,
|
|
1703
|
-
length:
|
|
1703
|
+
length: E,
|
|
1704
1704
|
read: d
|
|
1705
1705
|
}), S = await g.init();
|
|
1706
1706
|
S.attachments?.length && e({ type: "NEW_ATTACHMENTS", attachments: S.attachments }), S.subtitles?.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: S.subtitles }), e({ type: "METADATA", ...S });
|
|
1707
1707
|
let y = !1, p = [];
|
|
1708
|
-
const
|
|
1708
|
+
const m = In(100, async () => {
|
|
1709
1709
|
if (!(p.length || y))
|
|
1710
1710
|
try {
|
|
1711
|
-
const { data: c, subtitles:
|
|
1712
|
-
|
|
1711
|
+
const { data: c, subtitles: v, finished: b } = await g.read();
|
|
1712
|
+
b && (y = !0), v.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: v }), e({ type: "DATA", data: c });
|
|
1713
1713
|
} catch (c) {
|
|
1714
1714
|
if (c.message === "Cancelled") return;
|
|
1715
1715
|
console.error(c);
|
|
@@ -1717,19 +1717,19 @@ const On = qt(({ sendBack: e, receive: t, input: n }) => {
|
|
|
1717
1717
|
});
|
|
1718
1718
|
return t(async (c) => {
|
|
1719
1719
|
if (c.type === "NEED_DATA")
|
|
1720
|
-
|
|
1720
|
+
m();
|
|
1721
1721
|
else if (c.type === "SEEKING") {
|
|
1722
1722
|
y = !1;
|
|
1723
|
-
const { currentTime:
|
|
1724
|
-
p = [...p,
|
|
1723
|
+
const { currentTime: v } = c, b = { currentTime: v };
|
|
1724
|
+
p = [...p, b];
|
|
1725
1725
|
try {
|
|
1726
|
-
const { data:
|
|
1727
|
-
p = p.filter((
|
|
1726
|
+
const { data: w, pts: A } = await g.seek(v).finally(() => {
|
|
1727
|
+
p = p.filter((f) => f !== b);
|
|
1728
1728
|
});
|
|
1729
|
-
e({ type: "TIMESTAMP_OFFSET", timestampOffset:
|
|
1730
|
-
} catch (
|
|
1731
|
-
if (
|
|
1732
|
-
console.error(
|
|
1729
|
+
e({ type: "TIMESTAMP_OFFSET", timestampOffset: A }), e({ type: "DATA", data: w });
|
|
1730
|
+
} catch (w) {
|
|
1731
|
+
if (w.message === "Cancelled") return;
|
|
1732
|
+
console.error(w);
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
}), () => {
|
|
@@ -1802,113 +1802,129 @@ ${l}`),
|
|
|
1802
1802
|
};
|
|
1803
1803
|
}, Yn = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
|
|
1804
1804
|
const { publicPath: a, subtitlesRendererOptions: s, videoElement: u, canvasElement: l } = n;
|
|
1805
|
-
let
|
|
1805
|
+
let E = [], d;
|
|
1806
1806
|
const g = /* @__PURE__ */ new Map();
|
|
1807
1807
|
let S = [], y;
|
|
1808
1808
|
return t((p) => {
|
|
1809
1809
|
if (p.type === "SELECT_SUBTITLE_STREAM") {
|
|
1810
1810
|
if (y = p.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: p.streamIndex }), !d) return;
|
|
1811
1811
|
d.freeTrack(), S = [];
|
|
1812
|
-
const
|
|
1813
|
-
if (!
|
|
1812
|
+
const m = g.get(y);
|
|
1813
|
+
if (!m)
|
|
1814
1814
|
throw new Error("newSubtitleStreams is undefined");
|
|
1815
|
-
const c = Me(
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1815
|
+
const c = Me(m.header.content), v = {
|
|
1816
|
+
...c,
|
|
1817
|
+
info: {
|
|
1818
|
+
...c.info,
|
|
1819
|
+
ScaledBorderAndShadow: "no",
|
|
1820
|
+
LayoutResX: "",
|
|
1821
|
+
LayoutResY: ""
|
|
1822
|
+
}
|
|
1823
|
+
}, b = _t(v);
|
|
1824
|
+
d.setTrack(b), d.setCurrentTime(u.paused, u.currentTime, u.playbackRate);
|
|
1825
|
+
for (const w in m.header.parsed.styles) {
|
|
1826
|
+
const A = m.header.parsed.styles.style[Number(w)];
|
|
1819
1827
|
A && Wt(d, A);
|
|
1820
1828
|
}
|
|
1821
|
-
for (const
|
|
1822
|
-
S.filter((
|
|
1823
|
-
(
|
|
1824
|
-
) || y !==
|
|
1829
|
+
for (const w of m?.dialogues ?? [])
|
|
1830
|
+
S.filter((f) => f.type === "dialogue").find(
|
|
1831
|
+
(f) => f.streamIndex === w.streamIndex && f.index === w.index
|
|
1832
|
+
) || y !== w.streamIndex || (d?.createEvent(w.assEvent), S.push(w));
|
|
1825
1833
|
}
|
|
1826
1834
|
if (p.type === "NEW_SUBTITLE_FRAGMENTS") {
|
|
1827
|
-
const
|
|
1835
|
+
const m = p.subtitles.map((c) => {
|
|
1828
1836
|
if (c.type === "header") {
|
|
1829
|
-
const
|
|
1830
|
-
return g.set(c.streamIndex, { header:
|
|
1837
|
+
const v = Dn(c);
|
|
1838
|
+
return g.set(c.streamIndex, { header: v, dialogues: [] }), y === void 0 && (y = c.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: c.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), v;
|
|
1831
1839
|
} else {
|
|
1832
|
-
const
|
|
1833
|
-
if (!
|
|
1840
|
+
const v = g.get(c.streamIndex)?.header;
|
|
1841
|
+
if (!v)
|
|
1834
1842
|
throw new Error("SubtitleStream or its header is undefined");
|
|
1835
|
-
const
|
|
1836
|
-
return g.get(c.streamIndex)?.dialogues.push(
|
|
1843
|
+
const b = jn(v, c);
|
|
1844
|
+
return g.get(c.streamIndex)?.dialogues.push(b), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), b;
|
|
1837
1845
|
}
|
|
1838
1846
|
});
|
|
1839
|
-
for (const c of
|
|
1847
|
+
for (const c of m)
|
|
1840
1848
|
if (c.type === "dialogue") {
|
|
1841
|
-
if (S.filter((
|
|
1842
|
-
(
|
|
1849
|
+
if (S.filter((b) => b.type === "dialogue").find(
|
|
1850
|
+
(b) => b.streamIndex === c.streamIndex && b.index === c.index
|
|
1843
1851
|
) || y !== c.streamIndex)
|
|
1844
1852
|
continue;
|
|
1845
1853
|
d?.createEvent(c.assEvent), S.push(c);
|
|
1846
1854
|
} else if (c.type === "header") {
|
|
1847
1855
|
if (!d) {
|
|
1848
|
-
const
|
|
1856
|
+
const v = Me(c.content), b = {
|
|
1857
|
+
...v,
|
|
1858
|
+
info: {
|
|
1859
|
+
...v.info,
|
|
1860
|
+
ScaledBorderAndShadow: "no",
|
|
1861
|
+
LayoutResX: "",
|
|
1862
|
+
LayoutResY: ""
|
|
1863
|
+
}
|
|
1864
|
+
}, w = _t(b);
|
|
1849
1865
|
d = new gr({
|
|
1850
1866
|
video: u,
|
|
1851
1867
|
canvas: l,
|
|
1852
|
-
subContent:
|
|
1868
|
+
subContent: w,
|
|
1853
1869
|
workerUrl: s.workerUrl,
|
|
1854
1870
|
modernWasmUrl: s.wasmUrl,
|
|
1855
|
-
fonts:
|
|
1856
|
-
availableFonts: { ...Object.fromEntries(
|
|
1871
|
+
fonts: E.filter(Boolean).map(([A, f]) => f),
|
|
1872
|
+
availableFonts: { ...Object.fromEntries(E), "liberation sans": `${a}default.woff2` }
|
|
1857
1873
|
// fallbackFont: 'liberation sans',
|
|
1858
1874
|
});
|
|
1859
1875
|
}
|
|
1860
|
-
for (const
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1876
|
+
for (const v in c.parsed.styles) {
|
|
1877
|
+
const b = c.parsed.styles.style[Number(v)];
|
|
1878
|
+
b && Wt(d, b);
|
|
1863
1879
|
}
|
|
1864
1880
|
} else
|
|
1865
1881
|
throw new Error("Unknown subtitlePart type");
|
|
1866
1882
|
}
|
|
1867
|
-
p.type === "NEW_ATTACHMENTS" && (
|
|
1868
|
-
|
|
1869
|
-
new Uint8Array(
|
|
1883
|
+
p.type === "NEW_ATTACHMENTS" && (E = p.attachments.map((m) => [
|
|
1884
|
+
m.filename,
|
|
1885
|
+
new Uint8Array(m.data)
|
|
1870
1886
|
]));
|
|
1871
1887
|
}), () => {
|
|
1872
1888
|
d?.destroy();
|
|
1873
1889
|
};
|
|
1874
1890
|
}), zn = lt(async ({ sendBack: e, receive: t, input: n, self: r, emit: o }) => {
|
|
1875
|
-
const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length:
|
|
1891
|
+
const { remuxerOptions: a } = n, { publicPath: s, workerUrl: u, bufferSize: l, length: E, read: d } = a;
|
|
1876
1892
|
let g;
|
|
1877
|
-
const S = new Promise((
|
|
1878
|
-
g =
|
|
1893
|
+
const S = new Promise((b) => {
|
|
1894
|
+
g = b;
|
|
1879
1895
|
});
|
|
1880
|
-
t(async (
|
|
1881
|
-
await S,
|
|
1882
|
-
const C =
|
|
1896
|
+
t(async (b) => {
|
|
1897
|
+
await S, b.type === "DOWNLOADED_RANGES_UPDATED" && p.indexes.reduce((f, _) => {
|
|
1898
|
+
const C = f.at(-1);
|
|
1883
1899
|
if (C && _.timestamp - C.timestamp < 5)
|
|
1884
|
-
return
|
|
1900
|
+
return f;
|
|
1885
1901
|
{
|
|
1886
1902
|
const W = p.indexes.slice(_.index + 1).find((D) => D.timestamp > _.timestamp + 5);
|
|
1887
|
-
return W ? [...
|
|
1903
|
+
return W ? [...f, { ..._, duration: W.timestamp - _.timestamp }] : [...f, _];
|
|
1888
1904
|
}
|
|
1889
|
-
}, []).filter((
|
|
1890
|
-
const _ = p.indexes.at(
|
|
1891
|
-
return
|
|
1905
|
+
}, []).filter((f) => {
|
|
1906
|
+
const _ = p.indexes.at(f.index + 1), C = _ ? _.pos : a.length, W = f.pos;
|
|
1907
|
+
return b.downloadedRanges.some(
|
|
1892
1908
|
({ startByteOffset: K, endByteOffset: F }) => K <= W && C <= F
|
|
1893
1909
|
);
|
|
1894
|
-
}).sort((
|
|
1910
|
+
}).sort((f, _) => f.timestamp - _.timestamp).forEach((f) => v(f));
|
|
1895
1911
|
});
|
|
1896
1912
|
const y = await Ht({
|
|
1897
1913
|
publicPath: s,
|
|
1898
1914
|
workerUrl: u,
|
|
1899
1915
|
bufferSize: l,
|
|
1900
|
-
length:
|
|
1916
|
+
length: E,
|
|
1901
1917
|
read: d
|
|
1902
|
-
}), p = await y.init(),
|
|
1918
|
+
}), p = await y.init(), m = new qt({ concurrency: 1 });
|
|
1903
1919
|
let c = [];
|
|
1904
|
-
const
|
|
1905
|
-
if (c.find((D) => D.index.index ===
|
|
1906
|
-
const
|
|
1907
|
-
blob:
|
|
1908
|
-
url:
|
|
1909
|
-
timestamp:
|
|
1910
|
-
duration:
|
|
1911
|
-
index:
|
|
1920
|
+
const v = (b) => m.add(async () => {
|
|
1921
|
+
if (c.find((D) => D.index.index === b.index)) return;
|
|
1922
|
+
const w = await y.readKeyframe(b.timestamp), A = new Blob([w], { type: "image/png" }), f = URL.createObjectURL(A), _ = p.indexes.at(b.index + 1), C = _ ? _.timestamp - b.timestamp : p.info.input.duration - b.timestamp, W = {
|
|
1923
|
+
blob: A,
|
|
1924
|
+
url: f,
|
|
1925
|
+
timestamp: b.timestamp,
|
|
1926
|
+
duration: b.duration ?? C,
|
|
1927
|
+
index: b
|
|
1912
1928
|
};
|
|
1913
1929
|
c.push(W), e({ type: "NEW_THUMBNAIL", thumbnail: W });
|
|
1914
1930
|
});
|
|
@@ -2038,47 +2054,47 @@ ${l}`),
|
|
|
2038
2054
|
}
|
|
2039
2055
|
],
|
|
2040
2056
|
on: {
|
|
2041
|
-
PLAY: { actions:
|
|
2042
|
-
PAUSE: { actions:
|
|
2043
|
-
SET_TIME: { actions:
|
|
2044
|
-
SET_PLAYBACK_RATE: { actions:
|
|
2057
|
+
PLAY: { actions: q("media", ({ event: e }) => e) },
|
|
2058
|
+
PAUSE: { actions: q("media", ({ event: e }) => e) },
|
|
2059
|
+
SET_TIME: { actions: q("media", ({ event: e }) => e) },
|
|
2060
|
+
SET_PLAYBACK_RATE: { actions: q("media", ({ event: e }) => e) },
|
|
2045
2061
|
PLAYING: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !1 }) }) },
|
|
2046
2062
|
PAUSED: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
|
|
2047
2063
|
ENDED: { actions: Y({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
|
|
2048
2064
|
TIME_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, currentTime: t.currentTime }) }) },
|
|
2049
2065
|
VOLUME_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, muted: t.muted, volume: t.volume }) }) },
|
|
2050
|
-
SET_VOLUME: { actions:
|
|
2066
|
+
SET_VOLUME: { actions: q("media", ({ event: e }) => e) },
|
|
2051
2067
|
PLAYBACK_RATE_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, playbackRate: t.playbackRate }) }) },
|
|
2052
2068
|
DURATION_UPDATE: { actions: Y({ media: ({ context: e, event: t }) => ({ ...e.media, duration: t.duration }) }) },
|
|
2053
|
-
NEED_DATA: { actions:
|
|
2054
|
-
METADATA: { actions:
|
|
2055
|
-
SEEKING: { actions:
|
|
2056
|
-
DATA: { actions:
|
|
2057
|
-
TIMESTAMP_OFFSET: { actions:
|
|
2069
|
+
NEED_DATA: { actions: q("dataSource", ({ event: e }) => e) },
|
|
2070
|
+
METADATA: { actions: q("mediaSource", ({ event: e }) => e) },
|
|
2071
|
+
SEEKING: { actions: q("dataSource", ({ event: e }) => e) },
|
|
2072
|
+
DATA: { actions: q("mediaSource", ({ event: e }) => e) },
|
|
2073
|
+
TIMESTAMP_OFFSET: { actions: q("mediaSource", ({ event: e }) => e) },
|
|
2058
2074
|
NEW_THUMBNAIL: { actions: [Y({ thumbnails: ({ context: e, event: t }) => [...e.thumbnails, t.thumbnail] })] },
|
|
2059
|
-
DOWNLOADED_RANGES_UPDATED: { actions:
|
|
2075
|
+
DOWNLOADED_RANGES_UPDATED: { actions: q("thumbnails", ({ event: e }) => e) },
|
|
2060
2076
|
NEW_ATTACHMENTS: {
|
|
2061
2077
|
actions: [
|
|
2062
2078
|
Y({ attachments: ({ context: e, event: t }) => [...e.attachments, ...t.attachments] }),
|
|
2063
|
-
|
|
2079
|
+
q("subtitles", ({ event: e }) => e)
|
|
2064
2080
|
]
|
|
2065
2081
|
},
|
|
2066
2082
|
NEW_SUBTITLE_FRAGMENTS: {
|
|
2067
2083
|
actions: [
|
|
2068
2084
|
Y({ subtitleFragments: ({ context: e, event: t }) => [...e.subtitleFragments, ...t.subtitles] }),
|
|
2069
|
-
|
|
2085
|
+
q("subtitles", ({ event: e }) => e)
|
|
2070
2086
|
// emit(({ event }) => ({ type: 'NEW_SUBTITLE_FRAGMENTS', subtitles: event.subtitles }))
|
|
2071
2087
|
]
|
|
2072
2088
|
},
|
|
2073
2089
|
SUBTITLE_STREAMS_UPDATED: {
|
|
2074
2090
|
actions: [
|
|
2075
2091
|
Y({ subtitleStreams: ({ event: e }) => e.subtitlesStreams }),
|
|
2076
|
-
|
|
2092
|
+
q("subtitles", ({ event: e }) => e)
|
|
2077
2093
|
]
|
|
2078
2094
|
},
|
|
2079
2095
|
SELECT_SUBTITLE_STREAM: {
|
|
2080
2096
|
actions: [
|
|
2081
|
-
|
|
2097
|
+
q("subtitles", ({ event: e }) => e)
|
|
2082
2098
|
]
|
|
2083
2099
|
},
|
|
2084
2100
|
SELECTED_SUBTITLE_STREAM_UPDATED: {
|
|
@@ -2123,7 +2139,7 @@ ${l}`),
|
|
|
2123
2139
|
type: "SET_CANVAS_ELEMENT",
|
|
2124
2140
|
canvasElement: t
|
|
2125
2141
|
});
|
|
2126
|
-
}, [t]), /* @__PURE__ */
|
|
2142
|
+
}, [t]), /* @__PURE__ */ h(cr, { children: /* @__PURE__ */ h("canvas", { ref: r, css: Vn }) });
|
|
2127
2143
|
}, ur = 1e-4, bt = 1, lr = 2, dr = (e) => {
|
|
2128
2144
|
const t = Math.max(ur, Math.min(bt, e));
|
|
2129
2145
|
return Math.pow(t, lr);
|
|
@@ -2196,7 +2212,7 @@ ${l}`),
|
|
|
2196
2212
|
size: l = "md"
|
|
2197
2213
|
/* md */
|
|
2198
2214
|
}) => /* @__PURE__ */ I(cr, { children: [
|
|
2199
|
-
/* @__PURE__ */
|
|
2215
|
+
/* @__PURE__ */ h(
|
|
2200
2216
|
"div",
|
|
2201
2217
|
{
|
|
2202
2218
|
"data-tooltip-id": e,
|
|
@@ -2208,7 +2224,7 @@ ${l}`),
|
|
|
2208
2224
|
children: n
|
|
2209
2225
|
}
|
|
2210
2226
|
),
|
|
2211
|
-
!u && /* @__PURE__ */
|
|
2227
|
+
!u && /* @__PURE__ */ h(
|
|
2212
2228
|
Pr,
|
|
2213
2229
|
{
|
|
2214
2230
|
css: Bn(l),
|
|
@@ -2220,14 +2236,14 @@ ${l}`),
|
|
|
2220
2236
|
] }), Gn = ({ ref: e, defaultValue: t }) => {
|
|
2221
2237
|
const [n, r] = Z(t), [o, a] = Z(!1), s = (u) => {
|
|
2222
2238
|
if (a(!0), !e.current) return;
|
|
2223
|
-
const { clientX: l } = u, { left:
|
|
2224
|
-
r(Math.min(Math.max((l -
|
|
2239
|
+
const { clientX: l } = u, { left: E, right: d } = e.current.getBoundingClientRect();
|
|
2240
|
+
r(Math.min(Math.max((l - E) / (d - E), 0), 1));
|
|
2225
2241
|
};
|
|
2226
2242
|
return z(() => {
|
|
2227
2243
|
if (!o) return;
|
|
2228
|
-
const u = () => a(!1), l = (
|
|
2244
|
+
const u = () => a(!1), l = (E) => {
|
|
2229
2245
|
if (!e.current) return;
|
|
2230
|
-
const { clientX: d } =
|
|
2246
|
+
const { clientX: d } = E, { left: g, right: S } = e.current.getBoundingClientRect();
|
|
2231
2247
|
r(Math.min(Math.max((d - g) / (S - g), 0), 1));
|
|
2232
2248
|
};
|
|
2233
2249
|
return document.addEventListener("mousemove", l), document.addEventListener("mouseup", u), () => {
|
|
@@ -2239,7 +2255,7 @@ ${l}`),
|
|
|
2239
2255
|
scrub: s,
|
|
2240
2256
|
setValue: r
|
|
2241
2257
|
};
|
|
2242
|
-
},
|
|
2258
|
+
}, Xn = Q`
|
|
2243
2259
|
position: relative;
|
|
2244
2260
|
height: .4rem;
|
|
2245
2261
|
|
|
@@ -2350,48 +2366,48 @@ ${l}`),
|
|
|
2350
2366
|
object-fit: cover;
|
|
2351
2367
|
}
|
|
2352
2368
|
}
|
|
2353
|
-
`,
|
|
2354
|
-
const e = $.useActorRef(), t = $.useSelector((c) => c.context.media.currentTime), n = $.useSelector((c) => c.context.media.duration), r = $.useSelector((c) => c.context.thumbnails), o = Ue(je), a = Ne(null), { scrub: s, value: u } = Gn({ ref: a }), [l,
|
|
2355
|
-
const
|
|
2356
|
-
b
|
|
2369
|
+
`, qn = () => {
|
|
2370
|
+
const e = $.useActorRef(), t = $.useSelector((c) => c.context.media.currentTime), n = $.useSelector((c) => c.context.media.duration), r = $.useSelector((c) => c.context.thumbnails), o = Ue(je), a = Ne(null), { scrub: s, value: u } = Gn({ ref: a }), [l, E] = Z(void 0), d = (c) => {
|
|
2371
|
+
const b = c.nativeEvent.offsetX / c.currentTarget.offsetWidth * (n ?? 0);
|
|
2372
|
+
E(b);
|
|
2357
2373
|
}, g = () => {
|
|
2358
|
-
a.current &&
|
|
2374
|
+
a.current && E(void 0);
|
|
2359
2375
|
}, S = pe(
|
|
2360
|
-
() => o.downloadedRanges?.map((c,
|
|
2376
|
+
() => o.downloadedRanges?.map((c, v) => {
|
|
2361
2377
|
if ("startByteOffset" in c && "endByteOffset" in c && o.size) {
|
|
2362
|
-
const
|
|
2363
|
-
return /* @__PURE__ */
|
|
2378
|
+
const b = c.startByteOffset / o.size, A = c.endByteOffset / o.size - b, f = b * 100;
|
|
2379
|
+
return /* @__PURE__ */ h("div", { className: "loaded-part", style: { transform: `scaleX(${A})`, marginLeft: `${f}%` } }, v);
|
|
2364
2380
|
} else
|
|
2365
2381
|
return null;
|
|
2366
2382
|
}) ?? [],
|
|
2367
|
-
[o.downloadedRanges?.map(({ startByteOffset: c, endByteOffset:
|
|
2383
|
+
[o.downloadedRanges?.map(({ startByteOffset: c, endByteOffset: v }) => `${c}/${v}`).join(",")]
|
|
2368
2384
|
), y = pe(() => {
|
|
2369
2385
|
if (!l || l < 0) return;
|
|
2370
|
-
const c = Math.floor(l / 3600),
|
|
2371
|
-
return `${c > 0 ? `${c}:` : ""}${
|
|
2386
|
+
const c = Math.floor(l / 3600), v = Math.floor((l - c * 3600) / 60), b = Math.floor(l - c * 3600 - v * 60);
|
|
2387
|
+
return `${c > 0 ? `${c}:` : ""}${v < 10 ? "0" : ""}${v}:${b < 10 ? "0" : ""}${b}`;
|
|
2372
2388
|
}, [l]);
|
|
2373
2389
|
z(() => {
|
|
2374
2390
|
if (!e || u === void 0 || !n) return;
|
|
2375
2391
|
const c = u * n;
|
|
2376
2392
|
e.send({ type: "SET_TIME", value: c });
|
|
2377
2393
|
}, [e, u, n]);
|
|
2378
|
-
const p = pe(() => typeof n != "number" || typeof t != "number" ? 0 : 1 / ((n ?? 0) / (t ?? 0)), [n, t]),
|
|
2394
|
+
const p = pe(() => typeof n != "number" || typeof t != "number" ? 0 : 1 / ((n ?? 0) / (t ?? 0)), [n, t]), m = pe(() => {
|
|
2379
2395
|
if (!(!r.length || !l))
|
|
2380
2396
|
return r.find(
|
|
2381
|
-
({ timestamp: c, duration:
|
|
2397
|
+
({ timestamp: c, duration: v }) => c <= l && l <= c + v
|
|
2382
2398
|
);
|
|
2383
2399
|
}, [r.length, l]);
|
|
2384
2400
|
return /* @__PURE__ */ I(
|
|
2385
2401
|
"div",
|
|
2386
2402
|
{
|
|
2387
|
-
css:
|
|
2403
|
+
css: Xn,
|
|
2388
2404
|
ref: a,
|
|
2389
2405
|
className: "progress-bar",
|
|
2390
2406
|
onMouseMove: d,
|
|
2391
2407
|
onMouseOut: g,
|
|
2392
2408
|
children: [
|
|
2393
|
-
/* @__PURE__ */
|
|
2394
|
-
l ? /* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ h("div", { className: "background-bar" }),
|
|
2410
|
+
l ? /* @__PURE__ */ h(
|
|
2395
2411
|
"div",
|
|
2396
2412
|
{
|
|
2397
2413
|
className: "cursor-time",
|
|
@@ -2399,19 +2415,19 @@ ${l}`),
|
|
|
2399
2415
|
children: y
|
|
2400
2416
|
}
|
|
2401
2417
|
) : void 0,
|
|
2402
|
-
/* @__PURE__ */
|
|
2403
|
-
/* @__PURE__ */
|
|
2404
|
-
/* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
2407
|
-
/* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2409
|
-
/* @__PURE__ */
|
|
2418
|
+
/* @__PURE__ */ h("div", { className: "progress" }),
|
|
2419
|
+
/* @__PURE__ */ h("div", { className: "loaded", children: S }),
|
|
2420
|
+
/* @__PURE__ */ h("div", { className: "hover" }),
|
|
2421
|
+
/* @__PURE__ */ h("div", { className: "play-container", children: /* @__PURE__ */ h("div", { className: "play", style: { transform: `scaleX(${p})` } }) }),
|
|
2422
|
+
/* @__PURE__ */ h("div", { className: "chapters" }),
|
|
2423
|
+
/* @__PURE__ */ h("div", { className: "scrubber" }),
|
|
2424
|
+
/* @__PURE__ */ h("div", { className: "padding", onMouseDown: s }),
|
|
2425
|
+
/* @__PURE__ */ h(
|
|
2410
2426
|
"div",
|
|
2411
2427
|
{
|
|
2412
2428
|
className: "thumbnail",
|
|
2413
2429
|
style: { left: `clamp(12.5rem, ${1 / ((n ?? 0) / (l ?? 1)) * 100}%, calc(100% - 12.5rem))` },
|
|
2414
|
-
children:
|
|
2430
|
+
children: m ? /* @__PURE__ */ h("img", { src: m.url }) : void 0
|
|
2415
2431
|
}
|
|
2416
2432
|
)
|
|
2417
2433
|
]
|
|
@@ -2486,7 +2502,7 @@ position: relative;
|
|
|
2486
2502
|
const e = $.useActorRef(), t = $.useSelector((p) => p.context.media.playbackRate), n = $.useSelector((p) => p.context.subtitleStreams), r = $.useSelector((p) => p.context.selectedSubtitleStreamIndex), [o, a] = Z(!1), [s, u] = Z(
|
|
2487
2503
|
0
|
|
2488
2504
|
/* Default */
|
|
2489
|
-
), l = Ne(null),
|
|
2505
|
+
), l = Ne(null), E = () => {
|
|
2490
2506
|
a(!o), u(
|
|
2491
2507
|
0
|
|
2492
2508
|
/* Default */
|
|
@@ -2498,8 +2514,8 @@ position: relative;
|
|
|
2498
2514
|
);
|
|
2499
2515
|
};
|
|
2500
2516
|
z(() => {
|
|
2501
|
-
const p = (
|
|
2502
|
-
o && l.current && !l.current.contains(
|
|
2517
|
+
const p = (m) => {
|
|
2518
|
+
o && l.current && !l.current.contains(m.target) && E();
|
|
2503
2519
|
};
|
|
2504
2520
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
2505
2521
|
}, [o]);
|
|
@@ -2507,26 +2523,26 @@ position: relative;
|
|
|
2507
2523
|
() => n.map(({ header: p }) => ({ streamIndex: p.streamIndex, language: p.parsed.info.Title })),
|
|
2508
2524
|
[n.length]
|
|
2509
2525
|
), S = (p) => () => {
|
|
2510
|
-
e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: p.streamIndex }),
|
|
2526
|
+
e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: p.streamIndex }), E();
|
|
2511
2527
|
}, y = (p) => () => {
|
|
2512
2528
|
u(p);
|
|
2513
2529
|
};
|
|
2514
2530
|
return /* @__PURE__ */ I("div", { css: Jn, ref: l, children: [
|
|
2515
|
-
/* @__PURE__ */
|
|
2531
|
+
/* @__PURE__ */ h(
|
|
2516
2532
|
ge,
|
|
2517
2533
|
{
|
|
2518
2534
|
id: "settings",
|
|
2519
2535
|
disabled: o,
|
|
2520
|
-
text: /* @__PURE__ */
|
|
2536
|
+
text: /* @__PURE__ */ h(
|
|
2521
2537
|
"button",
|
|
2522
2538
|
{
|
|
2523
2539
|
className: "settings",
|
|
2524
2540
|
type: "button",
|
|
2525
|
-
onClick:
|
|
2526
|
-
children: /* @__PURE__ */
|
|
2541
|
+
onClick: E,
|
|
2542
|
+
children: /* @__PURE__ */ h(yr, {})
|
|
2527
2543
|
}
|
|
2528
2544
|
),
|
|
2529
|
-
toolTipText: /* @__PURE__ */
|
|
2545
|
+
toolTipText: /* @__PURE__ */ h("span", { children: "Settings" })
|
|
2530
2546
|
}
|
|
2531
2547
|
),
|
|
2532
2548
|
o && s === 0 && /* @__PURE__ */ I("div", { className: "popover", children: [
|
|
@@ -2534,31 +2550,31 @@ position: relative;
|
|
|
2534
2550
|
2
|
|
2535
2551
|
/* Advanced */
|
|
2536
2552
|
), children: [
|
|
2537
|
-
/* @__PURE__ */
|
|
2538
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ h("span", { children: "Advanced" }),
|
|
2554
|
+
/* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
|
|
2539
2555
|
] }),
|
|
2540
2556
|
/* @__PURE__ */ I("div", { onClick: y(
|
|
2541
2557
|
3
|
|
2542
2558
|
/* SelectNewSources */
|
|
2543
2559
|
), children: [
|
|
2544
|
-
/* @__PURE__ */
|
|
2545
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ h("div", { children: "Select new sources" }),
|
|
2561
|
+
/* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
|
|
2546
2562
|
] }),
|
|
2547
2563
|
/* @__PURE__ */ I("div", { onClick: y(
|
|
2548
2564
|
4
|
|
2549
2565
|
/* Subtitles */
|
|
2550
2566
|
), children: [
|
|
2551
|
-
/* @__PURE__ */
|
|
2552
|
-
/* @__PURE__ */
|
|
2567
|
+
/* @__PURE__ */ h("div", { children: "Subtitles" }),
|
|
2568
|
+
/* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(Ke, {}) })
|
|
2553
2569
|
] }),
|
|
2554
2570
|
/* @__PURE__ */ I("div", { onClick: y(
|
|
2555
2571
|
1
|
|
2556
2572
|
/* PlaybackRate */
|
|
2557
2573
|
), children: [
|
|
2558
|
-
/* @__PURE__ */
|
|
2574
|
+
/* @__PURE__ */ h("div", { children: "Playback speed" }),
|
|
2559
2575
|
/* @__PURE__ */ I("div", { children: [
|
|
2560
|
-
/* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ h("span", { className: "secondary", children: t === 1 ? "(Default)" : t.toFixed(2) }),
|
|
2577
|
+
/* @__PURE__ */ h(Ke, {})
|
|
2562
2578
|
] })
|
|
2563
2579
|
] })
|
|
2564
2580
|
] }),
|
|
@@ -2567,13 +2583,13 @@ position: relative;
|
|
|
2567
2583
|
0
|
|
2568
2584
|
/* Default */
|
|
2569
2585
|
), children: [
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2586
|
+
/* @__PURE__ */ h("div", { children: "Back" }),
|
|
2587
|
+
/* @__PURE__ */ h("div", {})
|
|
2572
2588
|
] }),
|
|
2573
2589
|
/* @__PURE__ */ I("div", { children: [
|
|
2574
|
-
/* @__PURE__ */
|
|
2590
|
+
/* @__PURE__ */ h("div", { children: "Playback speed" }),
|
|
2575
2591
|
/* @__PURE__ */ I("div", { children: [
|
|
2576
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ h(
|
|
2577
2593
|
"button",
|
|
2578
2594
|
{
|
|
2579
2595
|
type: "button",
|
|
@@ -2581,7 +2597,7 @@ position: relative;
|
|
|
2581
2597
|
children: "0.5x"
|
|
2582
2598
|
}
|
|
2583
2599
|
),
|
|
2584
|
-
/* @__PURE__ */
|
|
2600
|
+
/* @__PURE__ */ h(
|
|
2585
2601
|
"button",
|
|
2586
2602
|
{
|
|
2587
2603
|
type: "button",
|
|
@@ -2589,7 +2605,7 @@ position: relative;
|
|
|
2589
2605
|
children: "1x"
|
|
2590
2606
|
}
|
|
2591
2607
|
),
|
|
2592
|
-
/* @__PURE__ */
|
|
2608
|
+
/* @__PURE__ */ h(
|
|
2593
2609
|
"button",
|
|
2594
2610
|
{
|
|
2595
2611
|
type: "button",
|
|
@@ -2597,7 +2613,7 @@ position: relative;
|
|
|
2597
2613
|
children: "1.5x"
|
|
2598
2614
|
}
|
|
2599
2615
|
),
|
|
2600
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ h(
|
|
2601
2617
|
"button",
|
|
2602
2618
|
{
|
|
2603
2619
|
type: "button",
|
|
@@ -2608,19 +2624,19 @@ position: relative;
|
|
|
2608
2624
|
] })
|
|
2609
2625
|
] })
|
|
2610
2626
|
] }),
|
|
2611
|
-
o && s === 2 && /* @__PURE__ */
|
|
2627
|
+
o && s === 2 && /* @__PURE__ */ h("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
|
|
2612
2628
|
0
|
|
2613
2629
|
/* Default */
|
|
2614
2630
|
), children: [
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */
|
|
2631
|
+
/* @__PURE__ */ h("div", { children: "Back" }),
|
|
2632
|
+
/* @__PURE__ */ h("div", {})
|
|
2617
2633
|
] }) }),
|
|
2618
|
-
o && s === 3 && /* @__PURE__ */
|
|
2634
|
+
o && s === 3 && /* @__PURE__ */ h("div", { className: "popover", children: /* @__PURE__ */ I("div", { onClick: y(
|
|
2619
2635
|
0
|
|
2620
2636
|
/* Default */
|
|
2621
2637
|
), children: [
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2638
|
+
/* @__PURE__ */ h("div", { children: "Back" }),
|
|
2639
|
+
/* @__PURE__ */ h("div", {})
|
|
2624
2640
|
] }) }),
|
|
2625
2641
|
o && s === 4 && /* @__PURE__ */ I("div", { className: "popover", children: [
|
|
2626
2642
|
g.map((p) => /* @__PURE__ */ I(
|
|
@@ -2628,8 +2644,8 @@ position: relative;
|
|
|
2628
2644
|
{
|
|
2629
2645
|
onClick: S(p),
|
|
2630
2646
|
children: [
|
|
2631
|
-
/* @__PURE__ */
|
|
2632
|
-
/* @__PURE__ */
|
|
2647
|
+
/* @__PURE__ */ h("div", { children: p.language }),
|
|
2648
|
+
/* @__PURE__ */ h("div", { children: r === p.streamIndex ? "✓" : "" })
|
|
2633
2649
|
]
|
|
2634
2650
|
},
|
|
2635
2651
|
p.streamIndex
|
|
@@ -2638,8 +2654,8 @@ position: relative;
|
|
|
2638
2654
|
0
|
|
2639
2655
|
/* Default */
|
|
2640
2656
|
), children: [
|
|
2641
|
-
/* @__PURE__ */
|
|
2642
|
-
/* @__PURE__ */
|
|
2657
|
+
/* @__PURE__ */ h("div", { children: "Back" }),
|
|
2658
|
+
/* @__PURE__ */ h("div", {})
|
|
2643
2659
|
] })
|
|
2644
2660
|
] })
|
|
2645
2661
|
] });
|
|
@@ -2679,47 +2695,47 @@ position: relative;
|
|
|
2679
2695
|
`, to = ({ value: e, onChange: t }) => {
|
|
2680
2696
|
const n = $.useSelector((c) => c.context.media.volume), r = $.useSelector((c) => c.context.media.muted), o = Ne(null), [a, s] = Z(!1), u = (c) => {
|
|
2681
2697
|
if (!o.current) return e;
|
|
2682
|
-
const
|
|
2683
|
-
return Math.max(0, Math.min(
|
|
2698
|
+
const v = o.current.getBoundingClientRect(), b = c - v.left;
|
|
2699
|
+
return Math.max(0, Math.min(b, v.width)) / v.width;
|
|
2684
2700
|
}, l = (c) => {
|
|
2685
2701
|
s(!0);
|
|
2686
|
-
const
|
|
2687
|
-
t(
|
|
2688
|
-
},
|
|
2702
|
+
const v = u(c.clientX);
|
|
2703
|
+
t(v);
|
|
2704
|
+
}, E = (c) => {
|
|
2689
2705
|
if (!a) return;
|
|
2690
|
-
const
|
|
2691
|
-
t(
|
|
2706
|
+
const v = u(c.clientX);
|
|
2707
|
+
t(v);
|
|
2692
2708
|
}, d = () => {
|
|
2693
2709
|
s(!1);
|
|
2694
2710
|
}, g = (c) => {
|
|
2695
2711
|
c.preventDefault();
|
|
2696
|
-
const
|
|
2697
|
-
let
|
|
2698
|
-
c.deltaY < 0 ?
|
|
2712
|
+
const v = 0.05;
|
|
2713
|
+
let b = e;
|
|
2714
|
+
c.deltaY < 0 ? b = Math.min(1, b + v) : b = Math.max(0, b - v), t(b);
|
|
2699
2715
|
};
|
|
2700
|
-
z(() => (window.addEventListener("mousemove",
|
|
2701
|
-
window.removeEventListener("mousemove",
|
|
2716
|
+
z(() => (window.addEventListener("mousemove", E), window.addEventListener("mouseup", d), () => {
|
|
2717
|
+
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", d);
|
|
2702
2718
|
}), [a]), z(() => {
|
|
2703
2719
|
const c = o.current;
|
|
2704
2720
|
return c && c.addEventListener("wheel", g, { passive: !1 }), () => {
|
|
2705
2721
|
c && c.removeEventListener("wheel", g);
|
|
2706
2722
|
};
|
|
2707
2723
|
}, [e]);
|
|
2708
|
-
const S = e * 100, y = "#fff", p = "#3A3A3A",
|
|
2724
|
+
const S = e * 100, y = "#fff", p = "#3A3A3A", m = pe(
|
|
2709
2725
|
() => Math.round(r ? 0 : xt(n) * 100),
|
|
2710
2726
|
[n]
|
|
2711
2727
|
);
|
|
2712
|
-
return /* @__PURE__ */
|
|
2728
|
+
return /* @__PURE__ */ h(
|
|
2713
2729
|
ge,
|
|
2714
2730
|
{
|
|
2715
2731
|
id: "volume-slider",
|
|
2716
|
-
text: /* @__PURE__ */
|
|
2732
|
+
text: /* @__PURE__ */ h(
|
|
2717
2733
|
"div",
|
|
2718
2734
|
{
|
|
2719
2735
|
ref: o,
|
|
2720
2736
|
css: eo,
|
|
2721
2737
|
onMouseDown: l,
|
|
2722
|
-
children: /* @__PURE__ */
|
|
2738
|
+
children: /* @__PURE__ */ h(
|
|
2723
2739
|
"div",
|
|
2724
2740
|
{
|
|
2725
2741
|
style: {
|
|
@@ -2728,7 +2744,7 @@ position: relative;
|
|
|
2728
2744
|
${p} ${S}% 100%
|
|
2729
2745
|
)`
|
|
2730
2746
|
},
|
|
2731
|
-
children: /* @__PURE__ */
|
|
2747
|
+
children: /* @__PURE__ */ h(
|
|
2732
2748
|
"div",
|
|
2733
2749
|
{
|
|
2734
2750
|
className: "volume-handle",
|
|
@@ -2742,7 +2758,7 @@ position: relative;
|
|
|
2742
2758
|
}
|
|
2743
2759
|
),
|
|
2744
2760
|
toolTipText: /* @__PURE__ */ I("div", { className: "volume-value", children: [
|
|
2745
|
-
|
|
2761
|
+
m,
|
|
2746
2762
|
"%"
|
|
2747
2763
|
] })
|
|
2748
2764
|
}
|
|
@@ -2793,24 +2809,24 @@ position: relative;
|
|
|
2793
2809
|
volume: dr(s)
|
|
2794
2810
|
});
|
|
2795
2811
|
return /* @__PURE__ */ I("div", { css: ro, children: [
|
|
2796
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ h(
|
|
2797
2813
|
ge,
|
|
2798
2814
|
{
|
|
2799
2815
|
id: "sound",
|
|
2800
|
-
text: /* @__PURE__ */
|
|
2816
|
+
text: /* @__PURE__ */ h(
|
|
2801
2817
|
"button",
|
|
2802
2818
|
{
|
|
2803
2819
|
className: "sound",
|
|
2804
2820
|
type: "button",
|
|
2805
2821
|
onClick: () => a(o, !r),
|
|
2806
2822
|
ref: e,
|
|
2807
|
-
children: r || n === 0 ? /* @__PURE__ */
|
|
2823
|
+
children: r || n === 0 ? /* @__PURE__ */ h(Sr, { size: 18, color: "#fff" }) : n <= 0.5 ? /* @__PURE__ */ h(xr, { size: 18, color: "#fff" }) : /* @__PURE__ */ h(Tr, { size: 18, color: "#fff" })
|
|
2808
2824
|
}
|
|
2809
2825
|
),
|
|
2810
|
-
toolTipText: /* @__PURE__ */
|
|
2826
|
+
toolTipText: /* @__PURE__ */ h("span", { children: r ? "Unmute (m)" : "Mute (m)" })
|
|
2811
2827
|
}
|
|
2812
2828
|
),
|
|
2813
|
-
/* @__PURE__ */
|
|
2829
|
+
/* @__PURE__ */ h("div", { className: "volume-slider-container", children: /* @__PURE__ */ h("div", { className: "volume-slider-background", children: /* @__PURE__ */ h(
|
|
2814
2830
|
to,
|
|
2815
2831
|
{
|
|
2816
2832
|
value: r ? 0 : o,
|
|
@@ -2933,29 +2949,29 @@ position: relative;
|
|
|
2933
2949
|
`, io = ({
|
|
2934
2950
|
containerRef: e
|
|
2935
2951
|
}) => {
|
|
2936
|
-
const t = $.useActorRef(), n = Ue(je), r = $.useSelector((
|
|
2952
|
+
const t = $.useActorRef(), n = Ue(je), r = $.useSelector((m) => m.context.media.paused), o = $.useSelector((m) => m.context.media.volume), a = $.useSelector((m) => m.context.media.muted), s = $.useSelector((m) => m.context.media.currentTime), u = $.useSelector((m) => m.context.media.duration), [l, E] = Z(), [d, g] = Z(!1);
|
|
2937
2953
|
z(() => {
|
|
2938
|
-
const
|
|
2954
|
+
const m = () => {
|
|
2939
2955
|
g(!!document.fullscreenElement);
|
|
2940
2956
|
};
|
|
2941
|
-
return document.addEventListener("fullscreenchange",
|
|
2942
|
-
document.removeEventListener("fullscreenchange",
|
|
2957
|
+
return document.addEventListener("fullscreenchange", m), () => {
|
|
2958
|
+
document.removeEventListener("fullscreenchange", m);
|
|
2943
2959
|
};
|
|
2944
2960
|
}, []);
|
|
2945
2961
|
const S = () => {
|
|
2946
2962
|
document.fullscreenElement ? document.exitFullscreen() : e.current && e.current.requestFullscreen();
|
|
2947
|
-
}, y = ot(({ direction:
|
|
2963
|
+
}, y = ot(({ direction: m, stepSize: c }) => {
|
|
2948
2964
|
if (!t) return;
|
|
2949
|
-
const
|
|
2965
|
+
const v = xt(o), b = m === "up" ? c : -c, w = Math.max(0, Math.min(1, v + b)), A = dr(w);
|
|
2950
2966
|
t.send({
|
|
2951
2967
|
type: "SET_VOLUME",
|
|
2952
2968
|
muted: a,
|
|
2953
|
-
volume:
|
|
2969
|
+
volume: A
|
|
2954
2970
|
});
|
|
2955
2971
|
}, [t.id, a, o]);
|
|
2956
2972
|
z(() => {
|
|
2957
|
-
const
|
|
2958
|
-
let
|
|
2973
|
+
const m = (c) => {
|
|
2974
|
+
let v = !0;
|
|
2959
2975
|
if (c.key === "f") S();
|
|
2960
2976
|
else if (c.key === "k") nt(t, r, u, s);
|
|
2961
2977
|
else if (c.key === " ") nt(t, r, u, s);
|
|
@@ -2968,73 +2984,73 @@ position: relative;
|
|
|
2968
2984
|
else if (c.key === "ArrowRight") {
|
|
2969
2985
|
if (!u) return;
|
|
2970
2986
|
s + 5 >= u ? t.send({ type: "SET_TIME", value: u }) : t.send({ type: "SET_TIME", value: s + 5 });
|
|
2971
|
-
} else c.key === "ArrowLeft" ? s - 5 < 0 ? t.send({ type: "SET_TIME", value: 0 }) : t.send({ type: "SET_TIME", value: s - 5 }) :
|
|
2972
|
-
|
|
2987
|
+
} else c.key === "ArrowLeft" ? s - 5 < 0 ? t.send({ type: "SET_TIME", value: 0 }) : t.send({ type: "SET_TIME", value: s - 5 }) : v = !1;
|
|
2988
|
+
v && c.preventDefault();
|
|
2973
2989
|
};
|
|
2974
|
-
return window.addEventListener("keydown",
|
|
2990
|
+
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
2975
2991
|
}, [t, o, a, r, s, u]);
|
|
2976
|
-
const p = ot((
|
|
2977
|
-
|
|
2992
|
+
const p = ot((m) => {
|
|
2993
|
+
m.preventDefault(), m.deltaY < 0 ? y({ direction: "up", stepSize: 0.05 }) : y({ direction: "down", stepSize: 0.05 });
|
|
2978
2994
|
}, [y]);
|
|
2979
2995
|
return z(() => {
|
|
2980
2996
|
if (l)
|
|
2981
2997
|
return l.addEventListener("wheel", p, { passive: !1 }), () => l.removeEventListener("wheel", p);
|
|
2982
2998
|
}, [l, y]), /* @__PURE__ */ I("div", { css: oo, style: { ...n.hideUI ? { opacity: "0", pointerEvents: "none" } : {} }, children: [
|
|
2983
|
-
/* @__PURE__ */
|
|
2999
|
+
/* @__PURE__ */ h(qn, {}),
|
|
2984
3000
|
/* @__PURE__ */ I("div", { className: "actions", children: [
|
|
2985
3001
|
/* @__PURE__ */ I("div", { className: "left", children: [
|
|
2986
|
-
/* @__PURE__ */
|
|
3002
|
+
/* @__PURE__ */ h(
|
|
2987
3003
|
ge,
|
|
2988
3004
|
{
|
|
2989
3005
|
id: "play",
|
|
2990
3006
|
tooltipPlace: "top-start",
|
|
2991
|
-
text: /* @__PURE__ */
|
|
3007
|
+
text: /* @__PURE__ */ h(
|
|
2992
3008
|
"button",
|
|
2993
3009
|
{
|
|
2994
3010
|
className: "play",
|
|
2995
3011
|
type: "button",
|
|
2996
3012
|
onClick: () => nt(t, r, u, s),
|
|
2997
|
-
children: u === s ? /* @__PURE__ */
|
|
3013
|
+
children: u === s ? /* @__PURE__ */ h(wr, {}) : r ? /* @__PURE__ */ h(Rr, {}) : /* @__PURE__ */ h(Ar, {})
|
|
2998
3014
|
}
|
|
2999
3015
|
),
|
|
3000
|
-
toolTipText: /* @__PURE__ */
|
|
3016
|
+
toolTipText: /* @__PURE__ */ h("span", { children: u === s ? "Replay (k)" : r ? "Play (k)" : "Pause (k)" })
|
|
3001
3017
|
}
|
|
3002
3018
|
),
|
|
3003
|
-
/* @__PURE__ */
|
|
3004
|
-
/* @__PURE__ */
|
|
3019
|
+
/* @__PURE__ */ h(no, { ref: E }),
|
|
3020
|
+
/* @__PURE__ */ h("div", { className: "time", children: Hn(s, u) })
|
|
3005
3021
|
] }),
|
|
3006
3022
|
/* @__PURE__ */ I("div", { className: "right", children: [
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ h(Zn, {}),
|
|
3024
|
+
/* @__PURE__ */ h(
|
|
3009
3025
|
ge,
|
|
3010
3026
|
{
|
|
3011
3027
|
id: "picture-in-picture",
|
|
3012
|
-
text: /* @__PURE__ */
|
|
3028
|
+
text: /* @__PURE__ */ h(
|
|
3013
3029
|
"button",
|
|
3014
3030
|
{
|
|
3015
3031
|
className: "picture-in-picture",
|
|
3016
3032
|
type: "button",
|
|
3017
|
-
children: /* @__PURE__ */
|
|
3033
|
+
children: /* @__PURE__ */ h("img", { src: Kn })
|
|
3018
3034
|
}
|
|
3019
3035
|
),
|
|
3020
|
-
toolTipText: /* @__PURE__ */
|
|
3036
|
+
toolTipText: /* @__PURE__ */ h("span", { children: "Picture in picture" })
|
|
3021
3037
|
}
|
|
3022
3038
|
),
|
|
3023
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ h(
|
|
3024
3040
|
ge,
|
|
3025
3041
|
{
|
|
3026
3042
|
id: "full-screen",
|
|
3027
3043
|
tooltipPlace: "top-end",
|
|
3028
|
-
text: /* @__PURE__ */
|
|
3044
|
+
text: /* @__PURE__ */ h(
|
|
3029
3045
|
"button",
|
|
3030
3046
|
{
|
|
3031
3047
|
className: "full-screen",
|
|
3032
3048
|
type: "button",
|
|
3033
3049
|
onClick: S,
|
|
3034
|
-
children: d ? /* @__PURE__ */
|
|
3050
|
+
children: d ? /* @__PURE__ */ h(_r, {}) : /* @__PURE__ */ h(Cr, {})
|
|
3035
3051
|
}
|
|
3036
3052
|
),
|
|
3037
|
-
toolTipText: /* @__PURE__ */
|
|
3053
|
+
toolTipText: /* @__PURE__ */ h("span", { children: d ? "Exit full screen (f)" : "Full screen (f)" })
|
|
3038
3054
|
}
|
|
3039
3055
|
)
|
|
3040
3056
|
] })
|
|
@@ -3088,9 +3104,9 @@ position: relative;
|
|
|
3088
3104
|
},
|
|
3089
3105
|
className: n.hideUI ? "hide" : "",
|
|
3090
3106
|
children: [
|
|
3091
|
-
/* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3107
|
+
/* @__PURE__ */ h(Wn, {}),
|
|
3108
|
+
/* @__PURE__ */ h(io, { containerRef: u }),
|
|
3109
|
+
/* @__PURE__ */ h(
|
|
3094
3110
|
"div",
|
|
3095
3111
|
{
|
|
3096
3112
|
className: "video",
|
|
@@ -3108,7 +3124,7 @@ position: relative;
|
|
|
3108
3124
|
height: 100%;
|
|
3109
3125
|
overflow: hidden;
|
|
3110
3126
|
`, lo = ({ options: e, videoElement: t, children: n }) => {
|
|
3111
|
-
const r = Ue(je), o = $.useActorRef(), a = $.useSelector((
|
|
3127
|
+
const r = Ue(je), o = $.useActorRef(), a = $.useSelector((m) => m.value), s = $.useSelector((m) => m.context.media.volume), u = $.useSelector((m) => m.context.media.muted), l = $.useSelector((m) => m.context.isReady), [E, d] = Bt("mediaVolume", "1"), [g, S] = Bt("mediaMute", "false"), [y, p] = Z(!0);
|
|
3112
3128
|
return z(
|
|
3113
3129
|
() => o.send({
|
|
3114
3130
|
type: "MEDIA_SOURCE_OPTIONS",
|
|
@@ -3125,28 +3141,28 @@ position: relative;
|
|
|
3125
3141
|
[
|
|
3126
3142
|
o,
|
|
3127
3143
|
l,
|
|
3128
|
-
(r.downloadedRanges?.map((
|
|
3144
|
+
(r.downloadedRanges?.map((m) => `${m.startByteOffset}-${m.endByteOffset}`) ?? []).join(",")
|
|
3129
3145
|
]
|
|
3130
3146
|
), z(() => {
|
|
3131
|
-
const { size:
|
|
3132
|
-
!c || !
|
|
3147
|
+
const { size: m, read: c, publicPath: v, libavWorkerUrl: b, jassubWasmUrl: w } = e;
|
|
3148
|
+
!c || !m || !v || !b || !w || o.send({
|
|
3133
3149
|
type: "REMUXER_OPTIONS",
|
|
3134
3150
|
remuxerOptions: {
|
|
3135
|
-
publicPath:
|
|
3136
|
-
workerUrl:
|
|
3151
|
+
publicPath: v,
|
|
3152
|
+
workerUrl: b,
|
|
3137
3153
|
bufferSize: e.bufferSize ?? co,
|
|
3138
|
-
length:
|
|
3154
|
+
length: m,
|
|
3139
3155
|
read: c
|
|
3140
3156
|
}
|
|
3141
3157
|
});
|
|
3142
3158
|
}, [e.read, e.size, e.publicPath, e.libavWorkerUrl, e.bufferSize]), z(() => {
|
|
3143
|
-
const { jassubWorkerUrl:
|
|
3144
|
-
!
|
|
3159
|
+
const { jassubWorkerUrl: m, jassubWasmUrl: c, jassubModernWasmUrl: v } = e;
|
|
3160
|
+
!m || !c || !v || o.send({
|
|
3145
3161
|
type: "SUBTITLES_RENDERER_OPTIONS",
|
|
3146
3162
|
subtitlesRendererOptions: {
|
|
3147
|
-
workerUrl:
|
|
3163
|
+
workerUrl: m,
|
|
3148
3164
|
wasmUrl: c,
|
|
3149
|
-
modernWasmUrl:
|
|
3165
|
+
modernWasmUrl: v
|
|
3150
3166
|
}
|
|
3151
3167
|
});
|
|
3152
3168
|
}, [e.publicPath, e.jassubWorkerUrl, e.jassubWasmUrl]), z(() => {
|
|
@@ -3158,14 +3174,14 @@ position: relative;
|
|
|
3158
3174
|
l && (y ? (o.send({
|
|
3159
3175
|
type: "SET_VOLUME",
|
|
3160
3176
|
muted: g === "true",
|
|
3161
|
-
volume: isNaN(Number(
|
|
3177
|
+
volume: isNaN(Number(E)) ? 1 : Number(E)
|
|
3162
3178
|
}), p(!1)) : (d(s.toString()), S(u ? "true" : "false")));
|
|
3163
3179
|
}, [l, s, u, y]), z(() => {
|
|
3164
3180
|
if (a === "OK")
|
|
3165
3181
|
return () => {
|
|
3166
3182
|
o.send({ type: "DESTROY" });
|
|
3167
3183
|
};
|
|
3168
|
-
}, [a]), /* @__PURE__ */
|
|
3184
|
+
}, [a]), /* @__PURE__ */ h("div", { css: uo, children: /* @__PURE__ */ h(so, { children: n }) });
|
|
3169
3185
|
}, xo = ({ ref: e, ...t }) => {
|
|
3170
3186
|
const n = (l) => o({ ...l, update: n }), [r, o] = Z({ update: n }), [a, s] = Z(), u = ot((l) => {
|
|
3171
3187
|
typeof e == "function" ? e(l) : e && "current" in e && (e.current = l), s(l ?? void 0);
|
|
@@ -3178,7 +3194,7 @@ position: relative;
|
|
|
3178
3194
|
size: t?.size,
|
|
3179
3195
|
downloadedRanges: t?.downloadedRanges
|
|
3180
3196
|
}));
|
|
3181
|
-
}, [a, t?.title, t?.size, t?.downloadedRanges]), /* @__PURE__ */
|
|
3197
|
+
}, [a, t?.title, t?.size, t?.downloadedRanges]), /* @__PURE__ */ h(je.Provider, { value: r, children: /* @__PURE__ */ h($.Provider, { children: /* @__PURE__ */ h(lo, { options: t, videoElement: a, children: /* @__PURE__ */ h("video", { ref: u, controls: !1 }) }) }) });
|
|
3182
3198
|
};
|
|
3183
3199
|
export {
|
|
3184
3200
|
lo as FKNVideoRoot,
|