@banou/media-player 0.6.2 → 0.8.0
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/README.md +149 -3
- package/dist/engine/index.d.ts +10 -0
- package/dist/engine/index.js +2 -0
- package/dist/engine/picture-in-picture.d.ts +27 -0
- package/dist/engine/playback.d.ts +45 -0
- package/dist/engine/source-buffer.d.ts +12 -0
- package/dist/engine/subtitles.d.ts +36 -0
- package/dist/engine/thumbnails.d.ts +22 -0
- package/dist/engine-Dmc7JSd9.js +470 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +1610 -0
- package/dist/react/components/chrome.d.ts +12 -0
- package/dist/react/components/control-bar.d.ts +2 -0
- package/dist/react/components/overlay.d.ts +4 -0
- package/dist/react/components/playback-slider.d.ts +2 -0
- package/dist/react/components/progress-bar.d.ts +2 -0
- package/dist/react/components/settings.d.ts +2 -0
- package/dist/react/components/sound.d.ts +7 -0
- package/{build → dist/react}/components/tooltip-display.d.ts +8 -8
- package/dist/react/components/volume-slider.d.ts +6 -0
- package/dist/react/hooks/use-drag-value.d.ts +23 -0
- package/dist/react/hooks/use-picture-in-picture.d.ts +2 -0
- package/dist/react/hooks/use-playback.d.ts +8 -0
- package/dist/react/hooks/use-thumbnails.d.ts +12 -0
- package/dist/react/media.d.ts +98 -0
- package/dist/react/player.d.ts +26 -0
- package/dist/react/source-feature.d.ts +106 -0
- package/dist/react/video-player.d.ts +83 -0
- package/dist/utils/source.d.ts +30 -0
- package/dist/utils/track-label.d.ts +31 -0
- package/dist/utils/volume-utils.d.ts +6 -0
- package/package.json +58 -37
- package/src/lib/engine/index.ts +14 -0
- package/src/lib/engine/picture-in-picture.ts +250 -0
- package/src/lib/engine/playback.ts +352 -0
- package/src/lib/engine/source-buffer.ts +61 -0
- package/src/lib/engine/subtitles.ts +210 -0
- package/src/lib/engine/thumbnails.ts +137 -0
- package/src/lib/globals.d.ts +8 -0
- package/src/lib/index.tsx +51 -0
- package/src/lib/react/components/chrome.tsx +130 -0
- package/src/{components → lib/react/components}/control-bar.tsx +74 -96
- package/src/lib/react/components/overlay.tsx +125 -0
- package/src/{components → lib/react/components}/playback-slider.tsx +30 -52
- package/src/lib/react/components/progress-bar.tsx +341 -0
- package/src/lib/react/components/settings.tsx +384 -0
- package/src/lib/react/components/sound.tsx +133 -0
- package/src/{components → lib/react/components}/tooltip-display.tsx +15 -12
- package/src/{components → lib/react/components}/volume-slider.tsx +32 -46
- package/src/lib/react/hooks/use-drag-value.ts +73 -0
- package/src/lib/react/hooks/use-picture-in-picture.ts +36 -0
- package/src/lib/react/hooks/use-playback.ts +146 -0
- package/src/lib/react/hooks/use-thumbnails.ts +78 -0
- package/src/lib/react/media.ts +124 -0
- package/src/lib/react/player.ts +20 -0
- package/src/lib/react/source-feature.ts +108 -0
- package/src/lib/react/video-player.tsx +223 -0
- package/src/lib/utils/fonts.ts +160 -0
- package/src/lib/utils/source.ts +60 -0
- package/src/lib/utils/track-label.ts +51 -0
- package/src/lib/utils/volume-utils.ts +13 -0
- package/build/components/chrome.d.ts +0 -7
- package/build/components/control-bar.d.ts +0 -6
- package/build/components/overlay.d.ts +0 -4
- package/build/components/playback-slider.d.ts +0 -2
- package/build/components/progress-bar.d.ts +0 -1
- package/build/components/settings.d.ts +0 -2
- package/build/components/sound.d.ts +0 -4
- package/build/components/volume-slider.d.ts +0 -6
- package/build/index.d.ts +0 -26
- package/build/index.js +0 -3416
- package/build/main.d.ts +0 -1
- package/build/state-machines/data-source.d.ts +0 -27
- package/build/state-machines/index.d.ts +0 -34038
- package/build/state-machines/media-properties.d.ts +0 -45
- package/build/state-machines/media-source.d.ts +0 -34
- package/build/state-machines/media.d.ts +0 -8558
- package/build/state-machines/subtitles.d.ts +0 -56
- package/build/state-machines/thumbnails.d.ts +0 -24
- package/build/state-machines/utils.d.ts +0 -26
- package/build/utils/actor-utils.d.ts +0 -2
- package/build/utils/context.d.ts +0 -14
- package/build/utils/index.d.ts +0 -4
- package/build/utils/languages.d.ts +0 -260
- package/build/utils/mp4box.d.ts +0 -61
- package/build/utils/use-local-storage.d.ts +0 -3
- package/build/utils/use-scrub.d.ts +0 -11
- package/build/utils/volume-utils.d.ts +0 -17
- package/build/utils/window-height.d.ts +0 -2
- package/src/components/chrome.tsx +0 -95
- package/src/components/overlay.tsx +0 -91
- package/src/components/progress-bar.tsx +0 -251
- package/src/components/settings.tsx +0 -322
- package/src/components/sound.tsx +0 -101
- package/src/index.tsx +0 -195
- package/src/main.tsx +0 -169
- package/src/state-machines/data-source.ts +0 -84
- package/src/state-machines/index.ts +0 -5
- package/src/state-machines/media-properties.ts +0 -82
- package/src/state-machines/media-source.ts +0 -129
- package/src/state-machines/media.ts +0 -255
- package/src/state-machines/subtitles.ts +0 -285
- package/src/state-machines/thumbnails.ts +0 -123
- package/src/state-machines/utils.ts +0 -94
- package/src/utils/actor-utils.ts +0 -19
- package/src/utils/context.ts +0 -23
- package/src/utils/fonts.ts +0 -160
- package/src/utils/index.ts +0 -229
- package/src/utils/languages.ts +0 -262
- package/src/utils/mp4box.ts +0 -74
- package/src/utils/use-local-storage.ts +0 -30
- package/src/utils/use-scrub.ts +0 -40
- package/src/utils/volume-utils.ts +0 -39
- package/src/utils/window-height.ts +0 -19
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -9
- /package/{build → dist}/utils/colors.d.ts +0 -0
- /package/{build → dist}/utils/fonts.d.ts +0 -0
- /package/{build → dist}/utils/time.d.ts +0 -0
- /package/src/{assets → lib/assets}/picture-in-picture.svg +0 -0
- /package/src/{utils → lib/utils}/colors.ts +0 -0
- /package/src/{utils → lib/utils}/time.ts +0 -0
package/build/index.js
DELETED
|
@@ -1,3416 +0,0 @@
|
|
|
1
|
-
import * as ce from "react";
|
|
2
|
-
import pr, { forwardRef as hr, useContext as Te, createContext as vr, useState as J, useEffect as j, useCallback as ot, useRef as xe, useMemo as pe } from "react";
|
|
3
|
-
import { css as K } from "@emotion/react";
|
|
4
|
-
import { createActorContext as Er } from "@xstate/react";
|
|
5
|
-
import { fromCallback as Ht, setup as gr, enqueueActions as br, assign as z, sendTo as G } from "xstate";
|
|
6
|
-
import qt from "p-queue";
|
|
7
|
-
import { makeRemuxer as Kt } from "libav-wasm";
|
|
8
|
-
import yr from "jassub";
|
|
9
|
-
import { parse as Le, stringify as Pt } from "ass-compiler";
|
|
10
|
-
import { Settings as xr, ChevronRight as pt, ChevronLeft as Ke, VolumeX as Sr, Volume1 as Tr, Volume2 as wr, RotateCcw as Rr, Play as Ar, Pause as _r, Minimize as Cr, Maximize as Pr } from "react-feather";
|
|
11
|
-
import { Tooltip as Nr } from "react-tooltip";
|
|
12
|
-
var Je = { exports: {} }, Me = {};
|
|
13
|
-
/**
|
|
14
|
-
* @license React
|
|
15
|
-
* react-jsx-runtime.production.js
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the MIT license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
var Nt;
|
|
23
|
-
function Mr() {
|
|
24
|
-
if (Nt) return Me;
|
|
25
|
-
Nt = 1;
|
|
26
|
-
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
27
|
-
function r(n, o, a) {
|
|
28
|
-
var s = null;
|
|
29
|
-
if (a !== void 0 && (s = "" + a), o.key !== void 0 && (s = "" + o.key), "key" in o) {
|
|
30
|
-
a = {};
|
|
31
|
-
for (var c in o)
|
|
32
|
-
c !== "key" && (a[c] = o[c]);
|
|
33
|
-
} else a = o;
|
|
34
|
-
return o = a.ref, {
|
|
35
|
-
$$typeof: e,
|
|
36
|
-
type: n,
|
|
37
|
-
key: s,
|
|
38
|
-
ref: o !== void 0 ? o : null,
|
|
39
|
-
props: a
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return Me.Fragment = t, Me.jsx = r, Me.jsxs = r, Me;
|
|
43
|
-
}
|
|
44
|
-
var Oe = {};
|
|
45
|
-
/**
|
|
46
|
-
* @license React
|
|
47
|
-
* react-jsx-runtime.development.js
|
|
48
|
-
*
|
|
49
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
50
|
-
*
|
|
51
|
-
* This source code is licensed under the MIT license found in the
|
|
52
|
-
* LICENSE file in the root directory of this source tree.
|
|
53
|
-
*/
|
|
54
|
-
var Mt;
|
|
55
|
-
function Or() {
|
|
56
|
-
return Mt || (Mt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
57
|
-
function e(i) {
|
|
58
|
-
if (i == null) return null;
|
|
59
|
-
if (typeof i == "function")
|
|
60
|
-
return i.$$typeof === ze ? null : i.displayName || i.name || null;
|
|
61
|
-
if (typeof i == "string") return i;
|
|
62
|
-
switch (i) {
|
|
63
|
-
case w:
|
|
64
|
-
return "Fragment";
|
|
65
|
-
case f:
|
|
66
|
-
return "Portal";
|
|
67
|
-
case F:
|
|
68
|
-
return "Profiler";
|
|
69
|
-
case C:
|
|
70
|
-
return "StrictMode";
|
|
71
|
-
case ee:
|
|
72
|
-
return "Suspense";
|
|
73
|
-
case le:
|
|
74
|
-
return "SuspenseList";
|
|
75
|
-
}
|
|
76
|
-
if (typeof i == "object")
|
|
77
|
-
switch (typeof i.tag == "number" && console.error(
|
|
78
|
-
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
79
|
-
), i.$$typeof) {
|
|
80
|
-
case B:
|
|
81
|
-
return (i.displayName || "Context") + ".Provider";
|
|
82
|
-
case U:
|
|
83
|
-
return (i._context.displayName || "Context") + ".Consumer";
|
|
84
|
-
case V:
|
|
85
|
-
var R = i.render;
|
|
86
|
-
return i = i.displayName, i || (i = R.displayName || R.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
87
|
-
case Ae:
|
|
88
|
-
return R = i.displayName || null, R !== null ? R : e(i.type) || "Memo";
|
|
89
|
-
case _e:
|
|
90
|
-
R = i._payload, i = i._init;
|
|
91
|
-
try {
|
|
92
|
-
return e(i(R));
|
|
93
|
-
} catch {
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
function t(i) {
|
|
99
|
-
return "" + i;
|
|
100
|
-
}
|
|
101
|
-
function r(i) {
|
|
102
|
-
try {
|
|
103
|
-
t(i);
|
|
104
|
-
var R = !1;
|
|
105
|
-
} catch {
|
|
106
|
-
R = !0;
|
|
107
|
-
}
|
|
108
|
-
if (R) {
|
|
109
|
-
R = console;
|
|
110
|
-
var A = R.error, M = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
111
|
-
return A.call(
|
|
112
|
-
R,
|
|
113
|
-
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
114
|
-
M
|
|
115
|
-
), t(i);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
function n() {
|
|
119
|
-
}
|
|
120
|
-
function o() {
|
|
121
|
-
if (fe === 0) {
|
|
122
|
-
Fe = console.log, Ve = console.info, We = console.warn, Be = console.error, Xe = console.group, Ge = console.groupCollapsed, He = console.groupEnd;
|
|
123
|
-
var i = {
|
|
124
|
-
configurable: !0,
|
|
125
|
-
enumerable: !0,
|
|
126
|
-
value: n,
|
|
127
|
-
writable: !0
|
|
128
|
-
};
|
|
129
|
-
Object.defineProperties(console, {
|
|
130
|
-
info: i,
|
|
131
|
-
log: i,
|
|
132
|
-
warn: i,
|
|
133
|
-
error: i,
|
|
134
|
-
group: i,
|
|
135
|
-
groupCollapsed: i,
|
|
136
|
-
groupEnd: i
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
fe++;
|
|
140
|
-
}
|
|
141
|
-
function a() {
|
|
142
|
-
if (fe--, fe === 0) {
|
|
143
|
-
var i = { configurable: !0, enumerable: !0, writable: !0 };
|
|
144
|
-
Object.defineProperties(console, {
|
|
145
|
-
log: ie({}, i, { value: Fe }),
|
|
146
|
-
info: ie({}, i, { value: Ve }),
|
|
147
|
-
warn: ie({}, i, { value: We }),
|
|
148
|
-
error: ie({}, i, { value: Be }),
|
|
149
|
-
group: ie({}, i, { value: Xe }),
|
|
150
|
-
groupCollapsed: ie({}, i, { value: Ge }),
|
|
151
|
-
groupEnd: ie({}, i, { value: He })
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
0 > fe && console.error(
|
|
155
|
-
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
function s(i) {
|
|
159
|
-
if (_ === void 0)
|
|
160
|
-
try {
|
|
161
|
-
throw Error();
|
|
162
|
-
} catch (A) {
|
|
163
|
-
var R = A.stack.trim().match(/\n( *(at )?)/);
|
|
164
|
-
_ = R && R[1] || "", ve = -1 < A.stack.indexOf(`
|
|
165
|
-
at`) ? " (<anonymous>)" : -1 < A.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
166
|
-
}
|
|
167
|
-
return `
|
|
168
|
-
` + _ + i + ve;
|
|
169
|
-
}
|
|
170
|
-
function c(i, R) {
|
|
171
|
-
if (!i || ue) return "";
|
|
172
|
-
var A = Ee.get(i);
|
|
173
|
-
if (A !== void 0) return A;
|
|
174
|
-
ue = !0, A = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
175
|
-
var M = null;
|
|
176
|
-
M = oe.H, oe.H = null, o();
|
|
177
|
-
try {
|
|
178
|
-
var X = {
|
|
179
|
-
DetermineComponentFrameRoot: function() {
|
|
180
|
-
try {
|
|
181
|
-
if (R) {
|
|
182
|
-
var de = function() {
|
|
183
|
-
throw Error();
|
|
184
|
-
};
|
|
185
|
-
if (Object.defineProperty(de.prototype, "props", {
|
|
186
|
-
set: function() {
|
|
187
|
-
throw Error();
|
|
188
|
-
}
|
|
189
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
190
|
-
try {
|
|
191
|
-
Reflect.construct(de, []);
|
|
192
|
-
} catch (se) {
|
|
193
|
-
var qe = se;
|
|
194
|
-
}
|
|
195
|
-
Reflect.construct(i, [], de);
|
|
196
|
-
} else {
|
|
197
|
-
try {
|
|
198
|
-
de.call();
|
|
199
|
-
} catch (se) {
|
|
200
|
-
qe = se;
|
|
201
|
-
}
|
|
202
|
-
i.call(de.prototype);
|
|
203
|
-
}
|
|
204
|
-
} else {
|
|
205
|
-
try {
|
|
206
|
-
throw Error();
|
|
207
|
-
} catch (se) {
|
|
208
|
-
qe = se;
|
|
209
|
-
}
|
|
210
|
-
(de = i()) && typeof de.catch == "function" && de.catch(function() {
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
} catch (se) {
|
|
214
|
-
if (se && qe && typeof se.stack == "string")
|
|
215
|
-
return [se.stack, qe.stack];
|
|
216
|
-
}
|
|
217
|
-
return [null, null];
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
X.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
|
|
221
|
-
var D = Object.getOwnPropertyDescriptor(
|
|
222
|
-
X.DetermineComponentFrameRoot,
|
|
223
|
-
"name"
|
|
224
|
-
);
|
|
225
|
-
D && D.configurable && Object.defineProperty(
|
|
226
|
-
X.DetermineComponentFrameRoot,
|
|
227
|
-
"name",
|
|
228
|
-
{ value: "DetermineComponentFrameRoot" }
|
|
229
|
-
);
|
|
230
|
-
var P = X.DetermineComponentFrameRoot(), ae = P[0], ge = P[1];
|
|
231
|
-
if (ae && ge) {
|
|
232
|
-
var q = ae.split(`
|
|
233
|
-
`), me = ge.split(`
|
|
234
|
-
`);
|
|
235
|
-
for (P = D = 0; D < q.length && !q[D].includes(
|
|
236
|
-
"DetermineComponentFrameRoot"
|
|
237
|
-
); )
|
|
238
|
-
D++;
|
|
239
|
-
for (; P < me.length && !me[P].includes(
|
|
240
|
-
"DetermineComponentFrameRoot"
|
|
241
|
-
); )
|
|
242
|
-
P++;
|
|
243
|
-
if (D === q.length || P === me.length)
|
|
244
|
-
for (D = q.length - 1, P = me.length - 1; 1 <= D && 0 <= P && q[D] !== me[P]; )
|
|
245
|
-
P--;
|
|
246
|
-
for (; 1 <= D && 0 <= P; D--, P--)
|
|
247
|
-
if (q[D] !== me[P]) {
|
|
248
|
-
if (D !== 1 || P !== 1)
|
|
249
|
-
do
|
|
250
|
-
if (D--, P--, 0 > P || q[D] !== me[P]) {
|
|
251
|
-
var Ne = `
|
|
252
|
-
` + q[D].replace(
|
|
253
|
-
" at new ",
|
|
254
|
-
" at "
|
|
255
|
-
);
|
|
256
|
-
return i.displayName && Ne.includes("<anonymous>") && (Ne = Ne.replace("<anonymous>", i.displayName)), typeof i == "function" && Ee.set(i, Ne), Ne;
|
|
257
|
-
}
|
|
258
|
-
while (1 <= D && 0 <= P);
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
} finally {
|
|
263
|
-
ue = !1, oe.H = M, a(), Error.prepareStackTrace = A;
|
|
264
|
-
}
|
|
265
|
-
return q = (q = i ? i.displayName || i.name : "") ? s(q) : "", typeof i == "function" && Ee.set(i, q), q;
|
|
266
|
-
}
|
|
267
|
-
function u(i) {
|
|
268
|
-
if (i == null) return "";
|
|
269
|
-
if (typeof i == "function") {
|
|
270
|
-
var R = i.prototype;
|
|
271
|
-
return c(
|
|
272
|
-
i,
|
|
273
|
-
!(!R || !R.isReactComponent)
|
|
274
|
-
);
|
|
275
|
-
}
|
|
276
|
-
if (typeof i == "string") return s(i);
|
|
277
|
-
switch (i) {
|
|
278
|
-
case ee:
|
|
279
|
-
return s("Suspense");
|
|
280
|
-
case le:
|
|
281
|
-
return s("SuspenseList");
|
|
282
|
-
}
|
|
283
|
-
if (typeof i == "object")
|
|
284
|
-
switch (i.$$typeof) {
|
|
285
|
-
case V:
|
|
286
|
-
return i = c(i.render, !1), i;
|
|
287
|
-
case Ae:
|
|
288
|
-
return u(i.type);
|
|
289
|
-
case _e:
|
|
290
|
-
R = i._payload, i = i._init;
|
|
291
|
-
try {
|
|
292
|
-
return u(i(R));
|
|
293
|
-
} catch {
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return "";
|
|
297
|
-
}
|
|
298
|
-
function h() {
|
|
299
|
-
var i = oe.A;
|
|
300
|
-
return i === null ? null : i.getOwner();
|
|
301
|
-
}
|
|
302
|
-
function p(i) {
|
|
303
|
-
if (Ce.call(i, "key")) {
|
|
304
|
-
var R = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
305
|
-
if (R && R.isReactWarning) return !1;
|
|
306
|
-
}
|
|
307
|
-
return i.key !== void 0;
|
|
308
|
-
}
|
|
309
|
-
function g(i, R) {
|
|
310
|
-
function A() {
|
|
311
|
-
Rt || (Rt = !0, console.error(
|
|
312
|
-
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
313
|
-
R
|
|
314
|
-
));
|
|
315
|
-
}
|
|
316
|
-
A.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
317
|
-
get: A,
|
|
318
|
-
configurable: !0
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
function b() {
|
|
322
|
-
var i = e(this.type);
|
|
323
|
-
return At[i] || (At[i] = !0, console.error(
|
|
324
|
-
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
325
|
-
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
326
|
-
}
|
|
327
|
-
function T(i, R, A, M, X, D) {
|
|
328
|
-
return A = D.ref, i = {
|
|
329
|
-
$$typeof: S,
|
|
330
|
-
type: i,
|
|
331
|
-
key: R,
|
|
332
|
-
props: D,
|
|
333
|
-
_owner: X
|
|
334
|
-
}, (A !== void 0 ? A : null) !== null ? Object.defineProperty(i, "ref", {
|
|
335
|
-
enumerable: !1,
|
|
336
|
-
get: b
|
|
337
|
-
}) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
338
|
-
configurable: !1,
|
|
339
|
-
enumerable: !1,
|
|
340
|
-
writable: !0,
|
|
341
|
-
value: 0
|
|
342
|
-
}), Object.defineProperty(i, "_debugInfo", {
|
|
343
|
-
configurable: !1,
|
|
344
|
-
enumerable: !1,
|
|
345
|
-
writable: !0,
|
|
346
|
-
value: null
|
|
347
|
-
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
348
|
-
}
|
|
349
|
-
function x(i, R, A, M, X, D) {
|
|
350
|
-
if (typeof i == "string" || typeof i == "function" || i === w || i === F || i === C || i === ee || i === le || i === ft || typeof i == "object" && i !== null && (i.$$typeof === _e || i.$$typeof === Ae || i.$$typeof === B || i.$$typeof === U || i.$$typeof === V || i.$$typeof === mt || i.getModuleId !== void 0)) {
|
|
351
|
-
var P = R.children;
|
|
352
|
-
if (P !== void 0)
|
|
353
|
-
if (M)
|
|
354
|
-
if (Pe(P)) {
|
|
355
|
-
for (M = 0; M < P.length; M++)
|
|
356
|
-
y(P[M], i);
|
|
357
|
-
Object.freeze && Object.freeze(P);
|
|
358
|
-
} else
|
|
359
|
-
console.error(
|
|
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
|
-
);
|
|
362
|
-
else y(P, i);
|
|
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 ? M = "null" : Pe(i) ? M = "array" : i !== void 0 && i.$$typeof === S ? (M = "<" + (e(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : M = typeof i, console.error(
|
|
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
|
-
M,
|
|
367
|
-
P
|
|
368
|
-
);
|
|
369
|
-
if (Ce.call(R, "key")) {
|
|
370
|
-
P = e(i);
|
|
371
|
-
var ae = Object.keys(R).filter(function(q) {
|
|
372
|
-
return q !== "key";
|
|
373
|
-
});
|
|
374
|
-
M = 0 < ae.length ? "{key: someKey, " + ae.join(": ..., ") + ": ...}" : "{key: someKey}", _t[P + M] || (ae = 0 < ae.length ? "{" + ae.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
375
|
-
`A props object containing a "key" prop is being spread into JSX:
|
|
376
|
-
let props = %s;
|
|
377
|
-
<%s {...props} />
|
|
378
|
-
React keys must be passed directly to JSX without using spread:
|
|
379
|
-
let props = %s;
|
|
380
|
-
<%s key={someKey} {...props} />`,
|
|
381
|
-
M,
|
|
382
|
-
P,
|
|
383
|
-
ae,
|
|
384
|
-
P
|
|
385
|
-
), _t[P + M] = !0);
|
|
386
|
-
}
|
|
387
|
-
if (P = null, A !== void 0 && (r(A), P = "" + A), p(R) && (r(R.key), P = "" + R.key), "key" in R) {
|
|
388
|
-
A = {};
|
|
389
|
-
for (var ge in R)
|
|
390
|
-
ge !== "key" && (A[ge] = R[ge]);
|
|
391
|
-
} else A = R;
|
|
392
|
-
return P && g(
|
|
393
|
-
A,
|
|
394
|
-
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
395
|
-
), T(i, P, D, X, h(), A);
|
|
396
|
-
}
|
|
397
|
-
function y(i, R) {
|
|
398
|
-
if (typeof i == "object" && i && i.$$typeof !== mr) {
|
|
399
|
-
if (Pe(i))
|
|
400
|
-
for (var A = 0; A < i.length; A++) {
|
|
401
|
-
var M = i[A];
|
|
402
|
-
l(M) && d(M, R);
|
|
403
|
-
}
|
|
404
|
-
else if (l(i))
|
|
405
|
-
i._store && (i._store.validated = 1);
|
|
406
|
-
else if (i === null || typeof i != "object" ? A = null : (A = Ye && i[Ye] || i["@@iterator"], A = typeof A == "function" ? A : null), typeof A == "function" && A !== i.entries && (A = A.call(i), A !== i))
|
|
407
|
-
for (; !(i = A.next()).done; )
|
|
408
|
-
l(i.value) && d(i.value, R);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function l(i) {
|
|
412
|
-
return typeof i == "object" && i !== null && i.$$typeof === S;
|
|
413
|
-
}
|
|
414
|
-
function d(i, R) {
|
|
415
|
-
if (i._store && !i._store.validated && i.key == null && (i._store.validated = 1, R = m(R), !Ct[R])) {
|
|
416
|
-
Ct[R] = !0;
|
|
417
|
-
var A = "";
|
|
418
|
-
i && i._owner != null && i._owner !== h() && (A = null, typeof i._owner.tag == "number" ? A = e(i._owner.type) : typeof i._owner.name == "string" && (A = i._owner.name), A = " It was passed a child from " + A + ".");
|
|
419
|
-
var M = oe.getCurrentStack;
|
|
420
|
-
oe.getCurrentStack = function() {
|
|
421
|
-
var X = u(i.type);
|
|
422
|
-
return M && (X += M() || ""), X;
|
|
423
|
-
}, console.error(
|
|
424
|
-
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
425
|
-
R,
|
|
426
|
-
A
|
|
427
|
-
), oe.getCurrentStack = M;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
function m(i) {
|
|
431
|
-
var R = "", A = h();
|
|
432
|
-
return A && (A = e(A.type)) && (R = `
|
|
433
|
-
|
|
434
|
-
Check the render method of \`` + A + "`."), R || (i = e(i)) && (R = `
|
|
435
|
-
|
|
436
|
-
Check the top-level render call using <` + i + ">."), R;
|
|
437
|
-
}
|
|
438
|
-
var v = pr, S = Symbol.for("react.transitional.element"), f = Symbol.for("react.portal"), w = Symbol.for("react.fragment"), C = Symbol.for("react.strict_mode"), F = Symbol.for("react.profiler"), U = Symbol.for("react.consumer"), B = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), ee = Symbol.for("react.suspense"), le = Symbol.for("react.suspense_list"), Ae = Symbol.for("react.memo"), _e = Symbol.for("react.lazy"), ft = Symbol.for("react.offscreen"), Ye = Symbol.iterator, ze = Symbol.for("react.client.reference"), oe = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Ce = Object.prototype.hasOwnProperty, ie = Object.assign, mt = Symbol.for("react.client.reference"), Pe = Array.isArray, fe = 0, Fe, Ve, We, Be, Xe, Ge, He;
|
|
439
|
-
n.__reactDisabledLog = !0;
|
|
440
|
-
var _, ve, ue = !1, Ee = new (typeof WeakMap == "function" ? WeakMap : Map)(), mr = Symbol.for("react.client.reference"), Rt, At = {}, _t = {}, Ct = {};
|
|
441
|
-
Oe.Fragment = w, Oe.jsx = function(i, R, A, M, X) {
|
|
442
|
-
return x(i, R, A, !1, M, X);
|
|
443
|
-
}, Oe.jsxs = function(i, R, A, M, X) {
|
|
444
|
-
return x(i, R, A, !0, M, X);
|
|
445
|
-
};
|
|
446
|
-
}()), Oe;
|
|
447
|
-
}
|
|
448
|
-
var Ot;
|
|
449
|
-
function kr() {
|
|
450
|
-
return Ot || (Ot = 1, process.env.NODE_ENV === "production" ? Je.exports = Mr() : Je.exports = Or()), Je.exports;
|
|
451
|
-
}
|
|
452
|
-
var Ie = kr();
|
|
453
|
-
function Lr(e) {
|
|
454
|
-
if (e.sheet)
|
|
455
|
-
return e.sheet;
|
|
456
|
-
for (var t = 0; t < document.styleSheets.length; t++)
|
|
457
|
-
if (document.styleSheets[t].ownerNode === e)
|
|
458
|
-
return document.styleSheets[t];
|
|
459
|
-
}
|
|
460
|
-
function Ir(e) {
|
|
461
|
-
var t = document.createElement("style");
|
|
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
|
-
}
|
|
464
|
-
var $r = /* @__PURE__ */ function() {
|
|
465
|
-
function e(r) {
|
|
466
|
-
var n = this;
|
|
467
|
-
this._insertTag = function(o) {
|
|
468
|
-
var a;
|
|
469
|
-
n.tags.length === 0 ? n.insertionPoint ? a = n.insertionPoint.nextSibling : n.prepend ? a = n.container.firstChild : a = n.before : a = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(o, a), n.tags.push(o);
|
|
470
|
-
}, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
|
|
471
|
-
}
|
|
472
|
-
var t = e.prototype;
|
|
473
|
-
return t.hydrate = function(n) {
|
|
474
|
-
n.forEach(this._insertTag);
|
|
475
|
-
}, t.insert = function(n) {
|
|
476
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Ir(this));
|
|
477
|
-
var o = this.tags[this.tags.length - 1];
|
|
478
|
-
if (this.isSpeedy) {
|
|
479
|
-
var a = Lr(o);
|
|
480
|
-
try {
|
|
481
|
-
a.insertRule(n, a.cssRules.length);
|
|
482
|
-
} catch {
|
|
483
|
-
}
|
|
484
|
-
} else
|
|
485
|
-
o.appendChild(document.createTextNode(n));
|
|
486
|
-
this.ctr++;
|
|
487
|
-
}, t.flush = function() {
|
|
488
|
-
this.tags.forEach(function(n) {
|
|
489
|
-
var o;
|
|
490
|
-
return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
|
|
491
|
-
}), this.tags = [], this.ctr = 0;
|
|
492
|
-
}, e;
|
|
493
|
-
}(), H = "-ms-", it = "-moz-", O = "-webkit-", Jt = "comm", xt = "rule", St = "decl", Ur = "@import", Zt = "@keyframes", Dr = "@layer", jr = Math.abs, st = String.fromCharCode, Yr = Object.assign;
|
|
494
|
-
function zr(e, t) {
|
|
495
|
-
return W(e, 0) ^ 45 ? (((t << 2 ^ W(e, 0)) << 2 ^ W(e, 1)) << 2 ^ W(e, 2)) << 2 ^ W(e, 3) : 0;
|
|
496
|
-
}
|
|
497
|
-
function Qt(e) {
|
|
498
|
-
return e.trim();
|
|
499
|
-
}
|
|
500
|
-
function Fr(e, t) {
|
|
501
|
-
return (e = t.exec(e)) ? e[0] : e;
|
|
502
|
-
}
|
|
503
|
-
function k(e, t, r) {
|
|
504
|
-
return e.replace(t, r);
|
|
505
|
-
}
|
|
506
|
-
function Et(e, t) {
|
|
507
|
-
return e.indexOf(t);
|
|
508
|
-
}
|
|
509
|
-
function W(e, t) {
|
|
510
|
-
return e.charCodeAt(t) | 0;
|
|
511
|
-
}
|
|
512
|
-
function $e(e, t, r) {
|
|
513
|
-
return e.slice(t, r);
|
|
514
|
-
}
|
|
515
|
-
function te(e) {
|
|
516
|
-
return e.length;
|
|
517
|
-
}
|
|
518
|
-
function Tt(e) {
|
|
519
|
-
return e.length;
|
|
520
|
-
}
|
|
521
|
-
function Ze(e, t) {
|
|
522
|
-
return t.push(e), e;
|
|
523
|
-
}
|
|
524
|
-
function Vr(e, t) {
|
|
525
|
-
return e.map(t).join("");
|
|
526
|
-
}
|
|
527
|
-
var ct = 1, Se = 1, er = 0, Z = 0, Y = 0, we = "";
|
|
528
|
-
function lt(e, t, r, n, o, a, s) {
|
|
529
|
-
return { value: e, root: t, parent: r, type: n, props: o, children: a, line: ct, column: Se, length: s, return: "" };
|
|
530
|
-
}
|
|
531
|
-
function ke(e, t) {
|
|
532
|
-
return Yr(lt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
533
|
-
}
|
|
534
|
-
function Wr() {
|
|
535
|
-
return Y;
|
|
536
|
-
}
|
|
537
|
-
function Br() {
|
|
538
|
-
return Y = Z > 0 ? W(we, --Z) : 0, Se--, Y === 10 && (Se = 1, ct--), Y;
|
|
539
|
-
}
|
|
540
|
-
function Q() {
|
|
541
|
-
return Y = Z < er ? W(we, Z++) : 0, Se++, Y === 10 && (Se = 1, ct++), Y;
|
|
542
|
-
}
|
|
543
|
-
function ne() {
|
|
544
|
-
return W(we, Z);
|
|
545
|
-
}
|
|
546
|
-
function et() {
|
|
547
|
-
return Z;
|
|
548
|
-
}
|
|
549
|
-
function je(e, t) {
|
|
550
|
-
return $e(we, e, t);
|
|
551
|
-
}
|
|
552
|
-
function Ue(e) {
|
|
553
|
-
switch (e) {
|
|
554
|
-
// \0 \t \n \r \s whitespace token
|
|
555
|
-
case 0:
|
|
556
|
-
case 9:
|
|
557
|
-
case 10:
|
|
558
|
-
case 13:
|
|
559
|
-
case 32:
|
|
560
|
-
return 5;
|
|
561
|
-
// ! + , / > @ ~ isolate token
|
|
562
|
-
case 33:
|
|
563
|
-
case 43:
|
|
564
|
-
case 44:
|
|
565
|
-
case 47:
|
|
566
|
-
case 62:
|
|
567
|
-
case 64:
|
|
568
|
-
case 126:
|
|
569
|
-
// ; { } breakpoint token
|
|
570
|
-
case 59:
|
|
571
|
-
case 123:
|
|
572
|
-
case 125:
|
|
573
|
-
return 4;
|
|
574
|
-
// : accompanied token
|
|
575
|
-
case 58:
|
|
576
|
-
return 3;
|
|
577
|
-
// " ' ( [ opening delimit token
|
|
578
|
-
case 34:
|
|
579
|
-
case 39:
|
|
580
|
-
case 40:
|
|
581
|
-
case 91:
|
|
582
|
-
return 2;
|
|
583
|
-
// ) ] closing delimit token
|
|
584
|
-
case 41:
|
|
585
|
-
case 93:
|
|
586
|
-
return 1;
|
|
587
|
-
}
|
|
588
|
-
return 0;
|
|
589
|
-
}
|
|
590
|
-
function tr(e) {
|
|
591
|
-
return ct = Se = 1, er = te(we = e), Z = 0, [];
|
|
592
|
-
}
|
|
593
|
-
function rr(e) {
|
|
594
|
-
return we = "", e;
|
|
595
|
-
}
|
|
596
|
-
function tt(e) {
|
|
597
|
-
return Qt(je(Z - 1, gt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
598
|
-
}
|
|
599
|
-
function Xr(e) {
|
|
600
|
-
for (; (Y = ne()) && Y < 33; )
|
|
601
|
-
Q();
|
|
602
|
-
return Ue(e) > 2 || Ue(Y) > 3 ? "" : " ";
|
|
603
|
-
}
|
|
604
|
-
function Gr(e, t) {
|
|
605
|
-
for (; --t && Q() && !(Y < 48 || Y > 102 || Y > 57 && Y < 65 || Y > 70 && Y < 97); )
|
|
606
|
-
;
|
|
607
|
-
return je(e, et() + (t < 6 && ne() == 32 && Q() == 32));
|
|
608
|
-
}
|
|
609
|
-
function gt(e) {
|
|
610
|
-
for (; Q(); )
|
|
611
|
-
switch (Y) {
|
|
612
|
-
// ] ) " '
|
|
613
|
-
case e:
|
|
614
|
-
return Z;
|
|
615
|
-
// " '
|
|
616
|
-
case 34:
|
|
617
|
-
case 39:
|
|
618
|
-
e !== 34 && e !== 39 && gt(Y);
|
|
619
|
-
break;
|
|
620
|
-
// (
|
|
621
|
-
case 40:
|
|
622
|
-
e === 41 && gt(e);
|
|
623
|
-
break;
|
|
624
|
-
// \
|
|
625
|
-
case 92:
|
|
626
|
-
Q();
|
|
627
|
-
break;
|
|
628
|
-
}
|
|
629
|
-
return Z;
|
|
630
|
-
}
|
|
631
|
-
function Hr(e, t) {
|
|
632
|
-
for (; Q() && e + Y !== 57; )
|
|
633
|
-
if (e + Y === 84 && ne() === 47)
|
|
634
|
-
break;
|
|
635
|
-
return "/*" + je(t, Z - 1) + "*" + st(e === 47 ? e : Q());
|
|
636
|
-
}
|
|
637
|
-
function qr(e) {
|
|
638
|
-
for (; !Ue(ne()); )
|
|
639
|
-
Q();
|
|
640
|
-
return je(e, Z);
|
|
641
|
-
}
|
|
642
|
-
function Kr(e) {
|
|
643
|
-
return rr(rt("", null, null, null, [""], e = tr(e), 0, [0], e));
|
|
644
|
-
}
|
|
645
|
-
function rt(e, t, r, n, o, a, s, c, u) {
|
|
646
|
-
for (var h = 0, p = 0, g = s, b = 0, T = 0, x = 0, y = 1, l = 1, d = 1, m = 0, v = "", S = o, f = a, w = n, C = v; l; )
|
|
647
|
-
switch (x = m, m = Q()) {
|
|
648
|
-
// (
|
|
649
|
-
case 40:
|
|
650
|
-
if (x != 108 && W(C, g - 1) == 58) {
|
|
651
|
-
Et(C += k(tt(m), "&", "&\f"), "&\f") != -1 && (d = -1);
|
|
652
|
-
break;
|
|
653
|
-
}
|
|
654
|
-
// " ' [
|
|
655
|
-
case 34:
|
|
656
|
-
case 39:
|
|
657
|
-
case 91:
|
|
658
|
-
C += tt(m);
|
|
659
|
-
break;
|
|
660
|
-
// \t \n \r \s
|
|
661
|
-
case 9:
|
|
662
|
-
case 10:
|
|
663
|
-
case 13:
|
|
664
|
-
case 32:
|
|
665
|
-
C += Xr(x);
|
|
666
|
-
break;
|
|
667
|
-
// \
|
|
668
|
-
case 92:
|
|
669
|
-
C += Gr(et() - 1, 7);
|
|
670
|
-
continue;
|
|
671
|
-
// /
|
|
672
|
-
case 47:
|
|
673
|
-
switch (ne()) {
|
|
674
|
-
case 42:
|
|
675
|
-
case 47:
|
|
676
|
-
Ze(Jr(Hr(Q(), et()), t, r), u);
|
|
677
|
-
break;
|
|
678
|
-
default:
|
|
679
|
-
C += "/";
|
|
680
|
-
}
|
|
681
|
-
break;
|
|
682
|
-
// {
|
|
683
|
-
case 123 * y:
|
|
684
|
-
c[h++] = te(C) * d;
|
|
685
|
-
// } ; \0
|
|
686
|
-
case 125 * y:
|
|
687
|
-
case 59:
|
|
688
|
-
case 0:
|
|
689
|
-
switch (m) {
|
|
690
|
-
// \0 }
|
|
691
|
-
case 0:
|
|
692
|
-
case 125:
|
|
693
|
-
l = 0;
|
|
694
|
-
// ;
|
|
695
|
-
case 59 + p:
|
|
696
|
-
d == -1 && (C = k(C, /\f/g, "")), T > 0 && te(C) - g && Ze(T > 32 ? Lt(C + ";", n, r, g - 1) : Lt(k(C, " ", "") + ";", n, r, g - 2), u);
|
|
697
|
-
break;
|
|
698
|
-
// @ ;
|
|
699
|
-
case 59:
|
|
700
|
-
C += ";";
|
|
701
|
-
// { rule/at-rule
|
|
702
|
-
default:
|
|
703
|
-
if (Ze(w = kt(C, t, r, h, p, o, c, v, S = [], f = [], g), a), m === 123)
|
|
704
|
-
if (p === 0)
|
|
705
|
-
rt(C, t, w, w, S, a, g, c, f);
|
|
706
|
-
else
|
|
707
|
-
switch (b === 99 && W(C, 3) === 110 ? 100 : b) {
|
|
708
|
-
// d l m s
|
|
709
|
-
case 100:
|
|
710
|
-
case 108:
|
|
711
|
-
case 109:
|
|
712
|
-
case 115:
|
|
713
|
-
rt(e, w, w, n && Ze(kt(e, w, w, 0, 0, o, c, v, o, S = [], g), f), o, f, g, c, n ? S : f);
|
|
714
|
-
break;
|
|
715
|
-
default:
|
|
716
|
-
rt(C, w, w, w, [""], f, 0, c, f);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
h = p = T = 0, y = d = 1, v = C = "", g = s;
|
|
720
|
-
break;
|
|
721
|
-
// :
|
|
722
|
-
case 58:
|
|
723
|
-
g = 1 + te(C), T = x;
|
|
724
|
-
default:
|
|
725
|
-
if (y < 1) {
|
|
726
|
-
if (m == 123)
|
|
727
|
-
--y;
|
|
728
|
-
else if (m == 125 && y++ == 0 && Br() == 125)
|
|
729
|
-
continue;
|
|
730
|
-
}
|
|
731
|
-
switch (C += st(m), m * y) {
|
|
732
|
-
// &
|
|
733
|
-
case 38:
|
|
734
|
-
d = p > 0 ? 1 : (C += "\f", -1);
|
|
735
|
-
break;
|
|
736
|
-
// ,
|
|
737
|
-
case 44:
|
|
738
|
-
c[h++] = (te(C) - 1) * d, d = 1;
|
|
739
|
-
break;
|
|
740
|
-
// @
|
|
741
|
-
case 64:
|
|
742
|
-
ne() === 45 && (C += tt(Q())), b = ne(), p = g = te(v = C += qr(et())), m++;
|
|
743
|
-
break;
|
|
744
|
-
// -
|
|
745
|
-
case 45:
|
|
746
|
-
x === 45 && te(C) == 2 && (y = 0);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
return a;
|
|
750
|
-
}
|
|
751
|
-
function kt(e, t, r, n, o, a, s, c, u, h, p) {
|
|
752
|
-
for (var g = o - 1, b = o === 0 ? a : [""], T = Tt(b), x = 0, y = 0, l = 0; x < n; ++x)
|
|
753
|
-
for (var d = 0, m = $e(e, g + 1, g = jr(y = s[x])), v = e; d < T; ++d)
|
|
754
|
-
(v = Qt(y > 0 ? b[d] + " " + m : k(m, /&\f/g, b[d]))) && (u[l++] = v);
|
|
755
|
-
return lt(e, t, r, o === 0 ? xt : c, u, h, p);
|
|
756
|
-
}
|
|
757
|
-
function Jr(e, t, r) {
|
|
758
|
-
return lt(e, t, r, Jt, st(Wr()), $e(e, 2, -2), 0);
|
|
759
|
-
}
|
|
760
|
-
function Lt(e, t, r, n) {
|
|
761
|
-
return lt(e, t, r, St, $e(e, 0, n), $e(e, n + 1, -1), n);
|
|
762
|
-
}
|
|
763
|
-
function be(e, t) {
|
|
764
|
-
for (var r = "", n = Tt(e), o = 0; o < n; o++)
|
|
765
|
-
r += t(e[o], o, e, t) || "";
|
|
766
|
-
return r;
|
|
767
|
-
}
|
|
768
|
-
function Zr(e, t, r, n) {
|
|
769
|
-
switch (e.type) {
|
|
770
|
-
case Dr:
|
|
771
|
-
if (e.children.length) break;
|
|
772
|
-
case Ur:
|
|
773
|
-
case St:
|
|
774
|
-
return e.return = e.return || e.value;
|
|
775
|
-
case Jt:
|
|
776
|
-
return "";
|
|
777
|
-
case Zt:
|
|
778
|
-
return e.return = e.value + "{" + be(e.children, n) + "}";
|
|
779
|
-
case xt:
|
|
780
|
-
e.value = e.props.join(",");
|
|
781
|
-
}
|
|
782
|
-
return te(r = be(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
783
|
-
}
|
|
784
|
-
function Qr(e) {
|
|
785
|
-
var t = Tt(e);
|
|
786
|
-
return function(r, n, o, a) {
|
|
787
|
-
for (var s = "", c = 0; c < t; c++)
|
|
788
|
-
s += e[c](r, n, o, a) || "";
|
|
789
|
-
return s;
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
function en(e) {
|
|
793
|
-
return function(t) {
|
|
794
|
-
t.root || (t = t.return) && e(t);
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
function tn(e) {
|
|
798
|
-
var t = /* @__PURE__ */ Object.create(null);
|
|
799
|
-
return function(r) {
|
|
800
|
-
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
801
|
-
};
|
|
802
|
-
}
|
|
803
|
-
var rn = function(t, r, n) {
|
|
804
|
-
for (var o = 0, a = 0; o = a, a = ne(), o === 38 && a === 12 && (r[n] = 1), !Ue(a); )
|
|
805
|
-
Q();
|
|
806
|
-
return je(t, Z);
|
|
807
|
-
}, nn = function(t, r) {
|
|
808
|
-
var n = -1, o = 44;
|
|
809
|
-
do
|
|
810
|
-
switch (Ue(o)) {
|
|
811
|
-
case 0:
|
|
812
|
-
o === 38 && ne() === 12 && (r[n] = 1), t[n] += rn(Z - 1, r, n);
|
|
813
|
-
break;
|
|
814
|
-
case 2:
|
|
815
|
-
t[n] += tt(o);
|
|
816
|
-
break;
|
|
817
|
-
case 4:
|
|
818
|
-
if (o === 44) {
|
|
819
|
-
t[++n] = ne() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
820
|
-
break;
|
|
821
|
-
}
|
|
822
|
-
// fallthrough
|
|
823
|
-
default:
|
|
824
|
-
t[n] += st(o);
|
|
825
|
-
}
|
|
826
|
-
while (o = Q());
|
|
827
|
-
return t;
|
|
828
|
-
}, on = function(t, r) {
|
|
829
|
-
return rr(nn(tr(t), r));
|
|
830
|
-
}, It = /* @__PURE__ */ new WeakMap(), an = function(t) {
|
|
831
|
-
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
832
|
-
// negative .length indicates that this rule has been already prefixed
|
|
833
|
-
t.length < 1)) {
|
|
834
|
-
for (var r = t.value, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
835
|
-
if (n = n.parent, !n) return;
|
|
836
|
-
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !It.get(n)) && !o) {
|
|
837
|
-
It.set(t, !0);
|
|
838
|
-
for (var a = [], s = on(r, a), c = n.props, u = 0, h = 0; u < s.length; u++)
|
|
839
|
-
for (var p = 0; p < c.length; p++, h++)
|
|
840
|
-
t.props[h] = a[u] ? s[u].replace(/&\f/g, c[p]) : c[p] + " " + s[u];
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
}, sn = function(t) {
|
|
844
|
-
if (t.type === "decl") {
|
|
845
|
-
var r = t.value;
|
|
846
|
-
// charcode for l
|
|
847
|
-
r.charCodeAt(0) === 108 && // charcode for b
|
|
848
|
-
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
function nr(e, t) {
|
|
852
|
-
switch (zr(e, t)) {
|
|
853
|
-
// color-adjust
|
|
854
|
-
case 5103:
|
|
855
|
-
return O + "print-" + e + e;
|
|
856
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
857
|
-
case 5737:
|
|
858
|
-
case 4201:
|
|
859
|
-
case 3177:
|
|
860
|
-
case 3433:
|
|
861
|
-
case 1641:
|
|
862
|
-
case 4457:
|
|
863
|
-
case 2921:
|
|
864
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
865
|
-
case 5572:
|
|
866
|
-
case 6356:
|
|
867
|
-
case 5844:
|
|
868
|
-
case 3191:
|
|
869
|
-
case 6645:
|
|
870
|
-
case 3005:
|
|
871
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
872
|
-
case 6391:
|
|
873
|
-
case 5879:
|
|
874
|
-
case 5623:
|
|
875
|
-
case 6135:
|
|
876
|
-
case 4599:
|
|
877
|
-
case 4855:
|
|
878
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
879
|
-
case 4215:
|
|
880
|
-
case 6389:
|
|
881
|
-
case 5109:
|
|
882
|
-
case 5365:
|
|
883
|
-
case 5621:
|
|
884
|
-
case 3829:
|
|
885
|
-
return O + e + e;
|
|
886
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
887
|
-
case 5349:
|
|
888
|
-
case 4246:
|
|
889
|
-
case 4810:
|
|
890
|
-
case 6968:
|
|
891
|
-
case 2756:
|
|
892
|
-
return O + e + it + e + H + e + e;
|
|
893
|
-
// flex, flex-direction
|
|
894
|
-
case 6828:
|
|
895
|
-
case 4268:
|
|
896
|
-
return O + e + H + e + e;
|
|
897
|
-
// order
|
|
898
|
-
case 6165:
|
|
899
|
-
return O + e + H + "flex-" + e + e;
|
|
900
|
-
// align-items
|
|
901
|
-
case 5187:
|
|
902
|
-
return O + e + k(e, /(\w+).+(:[^]+)/, O + "box-$1$2" + H + "flex-$1$2") + e;
|
|
903
|
-
// align-self
|
|
904
|
-
case 5443:
|
|
905
|
-
return O + e + H + "flex-item-" + k(e, /flex-|-self/, "") + e;
|
|
906
|
-
// align-content
|
|
907
|
-
case 4675:
|
|
908
|
-
return O + e + H + "flex-line-pack" + k(e, /align-content|flex-|-self/, "") + e;
|
|
909
|
-
// flex-shrink
|
|
910
|
-
case 5548:
|
|
911
|
-
return O + e + H + k(e, "shrink", "negative") + e;
|
|
912
|
-
// flex-basis
|
|
913
|
-
case 5292:
|
|
914
|
-
return O + e + H + k(e, "basis", "preferred-size") + e;
|
|
915
|
-
// flex-grow
|
|
916
|
-
case 6060:
|
|
917
|
-
return O + "box-" + k(e, "-grow", "") + O + e + H + k(e, "grow", "positive") + e;
|
|
918
|
-
// transition
|
|
919
|
-
case 4554:
|
|
920
|
-
return O + k(e, /([^-])(transform)/g, "$1" + O + "$2") + e;
|
|
921
|
-
// cursor
|
|
922
|
-
case 6187:
|
|
923
|
-
return k(k(k(e, /(zoom-|grab)/, O + "$1"), /(image-set)/, O + "$1"), e, "") + e;
|
|
924
|
-
// background, background-image
|
|
925
|
-
case 5495:
|
|
926
|
-
case 3959:
|
|
927
|
-
return k(e, /(image-set\([^]*)/, O + "$1$`$1");
|
|
928
|
-
// justify-content
|
|
929
|
-
case 4968:
|
|
930
|
-
return k(k(e, /(.+:)(flex-)?(.*)/, O + "box-pack:$3" + H + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + O + e + e;
|
|
931
|
-
// (margin|padding)-inline-(start|end)
|
|
932
|
-
case 4095:
|
|
933
|
-
case 3583:
|
|
934
|
-
case 4068:
|
|
935
|
-
case 2532:
|
|
936
|
-
return k(e, /(.+)-inline(.+)/, O + "$1$2") + e;
|
|
937
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
938
|
-
case 8116:
|
|
939
|
-
case 7059:
|
|
940
|
-
case 5753:
|
|
941
|
-
case 5535:
|
|
942
|
-
case 5445:
|
|
943
|
-
case 5701:
|
|
944
|
-
case 4933:
|
|
945
|
-
case 4677:
|
|
946
|
-
case 5533:
|
|
947
|
-
case 5789:
|
|
948
|
-
case 5021:
|
|
949
|
-
case 4765:
|
|
950
|
-
if (te(e) - 1 - t > 6) switch (W(e, t + 1)) {
|
|
951
|
-
// (m)ax-content, (m)in-content
|
|
952
|
-
case 109:
|
|
953
|
-
if (W(e, t + 4) !== 45) break;
|
|
954
|
-
// (f)ill-available, (f)it-content
|
|
955
|
-
case 102:
|
|
956
|
-
return k(e, /(.+:)(.+)-([^]+)/, "$1" + O + "$2-$3$1" + it + (W(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
957
|
-
// (s)tretch
|
|
958
|
-
case 115:
|
|
959
|
-
return ~Et(e, "stretch") ? nr(k(e, "stretch", "fill-available"), t) + e : e;
|
|
960
|
-
}
|
|
961
|
-
break;
|
|
962
|
-
// position: sticky
|
|
963
|
-
case 4949:
|
|
964
|
-
if (W(e, t + 1) !== 115) break;
|
|
965
|
-
// display: (flex|inline-flex)
|
|
966
|
-
case 6444:
|
|
967
|
-
switch (W(e, te(e) - 3 - (~Et(e, "!important") && 10))) {
|
|
968
|
-
// stic(k)y
|
|
969
|
-
case 107:
|
|
970
|
-
return k(e, ":", ":" + O) + e;
|
|
971
|
-
// (inline-)?fl(e)x
|
|
972
|
-
case 101:
|
|
973
|
-
return k(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + O + (W(e, 14) === 45 ? "inline-" : "") + "box$3$1" + O + "$2$3$1" + H + "$2box$3") + e;
|
|
974
|
-
}
|
|
975
|
-
break;
|
|
976
|
-
// writing-mode
|
|
977
|
-
case 5936:
|
|
978
|
-
switch (W(e, t + 11)) {
|
|
979
|
-
// vertical-l(r)
|
|
980
|
-
case 114:
|
|
981
|
-
return O + e + H + k(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
982
|
-
// vertical-r(l)
|
|
983
|
-
case 108:
|
|
984
|
-
return O + e + H + k(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
985
|
-
// horizontal(-)tb
|
|
986
|
-
case 45:
|
|
987
|
-
return O + e + H + k(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
988
|
-
}
|
|
989
|
-
return O + e + H + e + e;
|
|
990
|
-
}
|
|
991
|
-
return e;
|
|
992
|
-
}
|
|
993
|
-
var cn = function(t, r, n, o) {
|
|
994
|
-
if (t.length > -1 && !t.return) switch (t.type) {
|
|
995
|
-
case St:
|
|
996
|
-
t.return = nr(t.value, t.length);
|
|
997
|
-
break;
|
|
998
|
-
case Zt:
|
|
999
|
-
return be([ke(t, {
|
|
1000
|
-
value: k(t.value, "@", "@" + O)
|
|
1001
|
-
})], o);
|
|
1002
|
-
case xt:
|
|
1003
|
-
if (t.length) return Vr(t.props, function(a) {
|
|
1004
|
-
switch (Fr(a, /(::plac\w+|:read-\w+)/)) {
|
|
1005
|
-
// :read-(only|write)
|
|
1006
|
-
case ":read-only":
|
|
1007
|
-
case ":read-write":
|
|
1008
|
-
return be([ke(t, {
|
|
1009
|
-
props: [k(a, /:(read-\w+)/, ":" + it + "$1")]
|
|
1010
|
-
})], o);
|
|
1011
|
-
// :placeholder
|
|
1012
|
-
case "::placeholder":
|
|
1013
|
-
return be([ke(t, {
|
|
1014
|
-
props: [k(a, /:(plac\w+)/, ":" + O + "input-$1")]
|
|
1015
|
-
}), ke(t, {
|
|
1016
|
-
props: [k(a, /:(plac\w+)/, ":" + it + "$1")]
|
|
1017
|
-
}), ke(t, {
|
|
1018
|
-
props: [k(a, /:(plac\w+)/, H + "input-$1")]
|
|
1019
|
-
})], o);
|
|
1020
|
-
}
|
|
1021
|
-
return "";
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
}, ln = [cn], un = function(t) {
|
|
1025
|
-
var r = t.key;
|
|
1026
|
-
if (r === "css") {
|
|
1027
|
-
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1028
|
-
Array.prototype.forEach.call(n, function(y) {
|
|
1029
|
-
var l = y.getAttribute("data-emotion");
|
|
1030
|
-
l.indexOf(" ") !== -1 && (document.head.appendChild(y), y.setAttribute("data-s", ""));
|
|
1031
|
-
});
|
|
1032
|
-
}
|
|
1033
|
-
var o = t.stylisPlugins || ln, a = {}, s, c = [];
|
|
1034
|
-
s = t.container || document.head, Array.prototype.forEach.call(
|
|
1035
|
-
// this means we will ignore elements which don't have a space in them which
|
|
1036
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1037
|
-
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
1038
|
-
function(y) {
|
|
1039
|
-
for (var l = y.getAttribute("data-emotion").split(" "), d = 1; d < l.length; d++)
|
|
1040
|
-
a[l[d]] = !0;
|
|
1041
|
-
c.push(y);
|
|
1042
|
-
}
|
|
1043
|
-
);
|
|
1044
|
-
var u, h = [an, sn];
|
|
1045
|
-
{
|
|
1046
|
-
var p, g = [Zr, en(function(y) {
|
|
1047
|
-
p.insert(y);
|
|
1048
|
-
})], b = Qr(h.concat(o, g)), T = function(l) {
|
|
1049
|
-
return be(Kr(l), b);
|
|
1050
|
-
};
|
|
1051
|
-
u = function(l, d, m, v) {
|
|
1052
|
-
p = m, T(l ? l + "{" + d.styles + "}" : d.styles), v && (x.inserted[d.name] = !0);
|
|
1053
|
-
};
|
|
1054
|
-
}
|
|
1055
|
-
var x = {
|
|
1056
|
-
key: r,
|
|
1057
|
-
sheet: new $r({
|
|
1058
|
-
key: r,
|
|
1059
|
-
container: s,
|
|
1060
|
-
nonce: t.nonce,
|
|
1061
|
-
speedy: t.speedy,
|
|
1062
|
-
prepend: t.prepend,
|
|
1063
|
-
insertionPoint: t.insertionPoint
|
|
1064
|
-
}),
|
|
1065
|
-
nonce: t.nonce,
|
|
1066
|
-
inserted: a,
|
|
1067
|
-
registered: {},
|
|
1068
|
-
insert: u
|
|
1069
|
-
};
|
|
1070
|
-
return x.sheet.hydrate(c), x;
|
|
1071
|
-
}, Qe = { exports: {} }, L = {};
|
|
1072
|
-
/** @license React v16.13.1
|
|
1073
|
-
* react-is.production.min.js
|
|
1074
|
-
*
|
|
1075
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1076
|
-
*
|
|
1077
|
-
* This source code is licensed under the MIT license found in the
|
|
1078
|
-
* LICENSE file in the root directory of this source tree.
|
|
1079
|
-
*/
|
|
1080
|
-
var $t;
|
|
1081
|
-
function dn() {
|
|
1082
|
-
if ($t) return L;
|
|
1083
|
-
$t = 1;
|
|
1084
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = 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, c = e ? Symbol.for("react.context") : 60110, u = e ? Symbol.for("react.async_mode") : 60111, h = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, T = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, l = e ? Symbol.for("react.fundamental") : 60117, d = e ? Symbol.for("react.responder") : 60118, m = e ? Symbol.for("react.scope") : 60119;
|
|
1085
|
-
function v(f) {
|
|
1086
|
-
if (typeof f == "object" && f !== null) {
|
|
1087
|
-
var w = f.$$typeof;
|
|
1088
|
-
switch (w) {
|
|
1089
|
-
case t:
|
|
1090
|
-
switch (f = f.type, f) {
|
|
1091
|
-
case u:
|
|
1092
|
-
case h:
|
|
1093
|
-
case n:
|
|
1094
|
-
case a:
|
|
1095
|
-
case o:
|
|
1096
|
-
case g:
|
|
1097
|
-
return f;
|
|
1098
|
-
default:
|
|
1099
|
-
switch (f = f && f.$$typeof, f) {
|
|
1100
|
-
case c:
|
|
1101
|
-
case p:
|
|
1102
|
-
case x:
|
|
1103
|
-
case T:
|
|
1104
|
-
case s:
|
|
1105
|
-
return f;
|
|
1106
|
-
default:
|
|
1107
|
-
return w;
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
case r:
|
|
1111
|
-
return w;
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
function S(f) {
|
|
1116
|
-
return v(f) === h;
|
|
1117
|
-
}
|
|
1118
|
-
return L.AsyncMode = u, L.ConcurrentMode = h, L.ContextConsumer = c, L.ContextProvider = s, L.Element = t, L.ForwardRef = p, L.Fragment = n, L.Lazy = x, L.Memo = T, L.Portal = r, L.Profiler = a, L.StrictMode = o, L.Suspense = g, L.isAsyncMode = function(f) {
|
|
1119
|
-
return S(f) || v(f) === u;
|
|
1120
|
-
}, L.isConcurrentMode = S, L.isContextConsumer = function(f) {
|
|
1121
|
-
return v(f) === c;
|
|
1122
|
-
}, L.isContextProvider = function(f) {
|
|
1123
|
-
return v(f) === s;
|
|
1124
|
-
}, L.isElement = function(f) {
|
|
1125
|
-
return typeof f == "object" && f !== null && f.$$typeof === t;
|
|
1126
|
-
}, L.isForwardRef = function(f) {
|
|
1127
|
-
return v(f) === p;
|
|
1128
|
-
}, L.isFragment = function(f) {
|
|
1129
|
-
return v(f) === n;
|
|
1130
|
-
}, L.isLazy = function(f) {
|
|
1131
|
-
return v(f) === x;
|
|
1132
|
-
}, L.isMemo = function(f) {
|
|
1133
|
-
return v(f) === T;
|
|
1134
|
-
}, L.isPortal = function(f) {
|
|
1135
|
-
return v(f) === r;
|
|
1136
|
-
}, L.isProfiler = function(f) {
|
|
1137
|
-
return v(f) === a;
|
|
1138
|
-
}, L.isStrictMode = function(f) {
|
|
1139
|
-
return v(f) === o;
|
|
1140
|
-
}, L.isSuspense = function(f) {
|
|
1141
|
-
return v(f) === g;
|
|
1142
|
-
}, L.isValidElementType = function(f) {
|
|
1143
|
-
return typeof f == "string" || typeof f == "function" || f === n || f === h || f === a || f === o || f === g || f === b || typeof f == "object" && f !== null && (f.$$typeof === x || f.$$typeof === T || f.$$typeof === s || f.$$typeof === c || f.$$typeof === p || f.$$typeof === l || f.$$typeof === d || f.$$typeof === m || f.$$typeof === y);
|
|
1144
|
-
}, L.typeOf = v, L;
|
|
1145
|
-
}
|
|
1146
|
-
var I = {};
|
|
1147
|
-
/** @license React v16.13.1
|
|
1148
|
-
* react-is.development.js
|
|
1149
|
-
*
|
|
1150
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1151
|
-
*
|
|
1152
|
-
* This source code is licensed under the MIT license found in the
|
|
1153
|
-
* LICENSE file in the root directory of this source tree.
|
|
1154
|
-
*/
|
|
1155
|
-
var Ut;
|
|
1156
|
-
function fn() {
|
|
1157
|
-
return Ut || (Ut = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1158
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = 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, c = e ? Symbol.for("react.context") : 60110, u = e ? Symbol.for("react.async_mode") : 60111, h = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, T = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, l = e ? Symbol.for("react.fundamental") : 60117, d = e ? Symbol.for("react.responder") : 60118, m = e ? Symbol.for("react.scope") : 60119;
|
|
1159
|
-
function v(_) {
|
|
1160
|
-
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1161
|
-
_ === n || _ === h || _ === a || _ === o || _ === g || _ === b || typeof _ == "object" && _ !== null && (_.$$typeof === x || _.$$typeof === T || _.$$typeof === s || _.$$typeof === c || _.$$typeof === p || _.$$typeof === l || _.$$typeof === d || _.$$typeof === m || _.$$typeof === y);
|
|
1162
|
-
}
|
|
1163
|
-
function S(_) {
|
|
1164
|
-
if (typeof _ == "object" && _ !== null) {
|
|
1165
|
-
var ve = _.$$typeof;
|
|
1166
|
-
switch (ve) {
|
|
1167
|
-
case t:
|
|
1168
|
-
var ue = _.type;
|
|
1169
|
-
switch (ue) {
|
|
1170
|
-
case u:
|
|
1171
|
-
case h:
|
|
1172
|
-
case n:
|
|
1173
|
-
case a:
|
|
1174
|
-
case o:
|
|
1175
|
-
case g:
|
|
1176
|
-
return ue;
|
|
1177
|
-
default:
|
|
1178
|
-
var Ee = ue && ue.$$typeof;
|
|
1179
|
-
switch (Ee) {
|
|
1180
|
-
case c:
|
|
1181
|
-
case p:
|
|
1182
|
-
case x:
|
|
1183
|
-
case T:
|
|
1184
|
-
case s:
|
|
1185
|
-
return Ee;
|
|
1186
|
-
default:
|
|
1187
|
-
return ve;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
case r:
|
|
1191
|
-
return ve;
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
var f = u, w = h, C = c, F = s, U = t, B = p, V = n, ee = x, le = T, Ae = r, _e = a, ft = o, Ye = g, ze = !1;
|
|
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.")), Ce(_) || S(_) === u;
|
|
1198
|
-
}
|
|
1199
|
-
function Ce(_) {
|
|
1200
|
-
return S(_) === h;
|
|
1201
|
-
}
|
|
1202
|
-
function ie(_) {
|
|
1203
|
-
return S(_) === c;
|
|
1204
|
-
}
|
|
1205
|
-
function mt(_) {
|
|
1206
|
-
return S(_) === s;
|
|
1207
|
-
}
|
|
1208
|
-
function Pe(_) {
|
|
1209
|
-
return typeof _ == "object" && _ !== null && _.$$typeof === t;
|
|
1210
|
-
}
|
|
1211
|
-
function fe(_) {
|
|
1212
|
-
return S(_) === p;
|
|
1213
|
-
}
|
|
1214
|
-
function Fe(_) {
|
|
1215
|
-
return S(_) === n;
|
|
1216
|
-
}
|
|
1217
|
-
function Ve(_) {
|
|
1218
|
-
return S(_) === x;
|
|
1219
|
-
}
|
|
1220
|
-
function We(_) {
|
|
1221
|
-
return S(_) === T;
|
|
1222
|
-
}
|
|
1223
|
-
function Be(_) {
|
|
1224
|
-
return S(_) === r;
|
|
1225
|
-
}
|
|
1226
|
-
function Xe(_) {
|
|
1227
|
-
return S(_) === a;
|
|
1228
|
-
}
|
|
1229
|
-
function Ge(_) {
|
|
1230
|
-
return S(_) === o;
|
|
1231
|
-
}
|
|
1232
|
-
function He(_) {
|
|
1233
|
-
return S(_) === g;
|
|
1234
|
-
}
|
|
1235
|
-
I.AsyncMode = f, I.ConcurrentMode = w, I.ContextConsumer = C, I.ContextProvider = F, I.Element = U, I.ForwardRef = B, I.Fragment = V, I.Lazy = ee, I.Memo = le, I.Portal = Ae, I.Profiler = _e, I.StrictMode = ft, I.Suspense = Ye, I.isAsyncMode = oe, I.isConcurrentMode = Ce, I.isContextConsumer = ie, I.isContextProvider = mt, I.isElement = Pe, I.isForwardRef = fe, I.isFragment = Fe, I.isLazy = Ve, I.isMemo = We, I.isPortal = Be, I.isProfiler = Xe, I.isStrictMode = Ge, I.isSuspense = He, I.isValidElementType = v, I.typeOf = S;
|
|
1236
|
-
}()), I;
|
|
1237
|
-
}
|
|
1238
|
-
var Dt;
|
|
1239
|
-
function mn() {
|
|
1240
|
-
return Dt || (Dt = 1, process.env.NODE_ENV === "production" ? Qe.exports = dn() : Qe.exports = fn()), Qe.exports;
|
|
1241
|
-
}
|
|
1242
|
-
var ht, jt;
|
|
1243
|
-
function pn() {
|
|
1244
|
-
if (jt) return ht;
|
|
1245
|
-
jt = 1;
|
|
1246
|
-
var e = mn(), t = {
|
|
1247
|
-
childContextTypes: !0,
|
|
1248
|
-
contextType: !0,
|
|
1249
|
-
contextTypes: !0,
|
|
1250
|
-
defaultProps: !0,
|
|
1251
|
-
displayName: !0,
|
|
1252
|
-
getDefaultProps: !0,
|
|
1253
|
-
getDerivedStateFromError: !0,
|
|
1254
|
-
getDerivedStateFromProps: !0,
|
|
1255
|
-
mixins: !0,
|
|
1256
|
-
propTypes: !0,
|
|
1257
|
-
type: !0
|
|
1258
|
-
}, r = {
|
|
1259
|
-
name: !0,
|
|
1260
|
-
length: !0,
|
|
1261
|
-
prototype: !0,
|
|
1262
|
-
caller: !0,
|
|
1263
|
-
callee: !0,
|
|
1264
|
-
arguments: !0,
|
|
1265
|
-
arity: !0
|
|
1266
|
-
}, n = {
|
|
1267
|
-
$$typeof: !0,
|
|
1268
|
-
render: !0,
|
|
1269
|
-
defaultProps: !0,
|
|
1270
|
-
displayName: !0,
|
|
1271
|
-
propTypes: !0
|
|
1272
|
-
}, o = {
|
|
1273
|
-
$$typeof: !0,
|
|
1274
|
-
compare: !0,
|
|
1275
|
-
defaultProps: !0,
|
|
1276
|
-
displayName: !0,
|
|
1277
|
-
propTypes: !0,
|
|
1278
|
-
type: !0
|
|
1279
|
-
}, a = {};
|
|
1280
|
-
a[e.ForwardRef] = n, a[e.Memo] = o;
|
|
1281
|
-
function s(x) {
|
|
1282
|
-
return e.isMemo(x) ? o : a[x.$$typeof] || t;
|
|
1283
|
-
}
|
|
1284
|
-
var c = Object.defineProperty, u = Object.getOwnPropertyNames, h = Object.getOwnPropertySymbols, p = Object.getOwnPropertyDescriptor, g = Object.getPrototypeOf, b = Object.prototype;
|
|
1285
|
-
function T(x, y, l) {
|
|
1286
|
-
if (typeof y != "string") {
|
|
1287
|
-
if (b) {
|
|
1288
|
-
var d = g(y);
|
|
1289
|
-
d && d !== b && T(x, d, l);
|
|
1290
|
-
}
|
|
1291
|
-
var m = u(y);
|
|
1292
|
-
h && (m = m.concat(h(y)));
|
|
1293
|
-
for (var v = s(x), S = s(y), f = 0; f < m.length; ++f) {
|
|
1294
|
-
var w = m[f];
|
|
1295
|
-
if (!r[w] && !(l && l[w]) && !(S && S[w]) && !(v && v[w])) {
|
|
1296
|
-
var C = p(y, w);
|
|
1297
|
-
try {
|
|
1298
|
-
c(x, w, C);
|
|
1299
|
-
} catch {
|
|
1300
|
-
}
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
return x;
|
|
1305
|
-
}
|
|
1306
|
-
return ht = T, ht;
|
|
1307
|
-
}
|
|
1308
|
-
pn();
|
|
1309
|
-
var hn = !0;
|
|
1310
|
-
function vn(e, t, r) {
|
|
1311
|
-
var n = "";
|
|
1312
|
-
return r.split(" ").forEach(function(o) {
|
|
1313
|
-
e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
|
|
1314
|
-
}), n;
|
|
1315
|
-
}
|
|
1316
|
-
var or = function(t, r, n) {
|
|
1317
|
-
var o = t.key + "-" + r.name;
|
|
1318
|
-
// we only need to add the styles to the registered cache if the
|
|
1319
|
-
// class name could be used further down
|
|
1320
|
-
// the tree but if it's a string tag, we know it won't
|
|
1321
|
-
// so we don't have to add it to registered cache.
|
|
1322
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
1323
|
-
(n === !1 || // we need to always store it if we're in compat mode and
|
|
1324
|
-
// in node since emotion-server relies on whether a style is in
|
|
1325
|
-
// the registered cache to know whether a style is global or not
|
|
1326
|
-
// also, note that this check will be dead code eliminated in the browser
|
|
1327
|
-
hn === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
|
|
1328
|
-
}, En = function(t, r, n) {
|
|
1329
|
-
or(t, r, n);
|
|
1330
|
-
var o = t.key + "-" + r.name;
|
|
1331
|
-
if (t.inserted[r.name] === void 0) {
|
|
1332
|
-
var a = r;
|
|
1333
|
-
do
|
|
1334
|
-
t.insert(r === a ? "." + o : "", a, t.sheet, !0), a = a.next;
|
|
1335
|
-
while (a !== void 0);
|
|
1336
|
-
}
|
|
1337
|
-
};
|
|
1338
|
-
function gn(e) {
|
|
1339
|
-
for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
|
|
1340
|
-
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
1341
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
1342
|
-
r >>> 24, t = /* Math.imul(k, m): */
|
|
1343
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
1344
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
1345
|
-
switch (o) {
|
|
1346
|
-
case 3:
|
|
1347
|
-
t ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
1348
|
-
case 2:
|
|
1349
|
-
t ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
1350
|
-
case 1:
|
|
1351
|
-
t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
|
|
1352
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
1353
|
-
}
|
|
1354
|
-
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
1355
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
1356
|
-
}
|
|
1357
|
-
var bn = {
|
|
1358
|
-
animationIterationCount: 1,
|
|
1359
|
-
aspectRatio: 1,
|
|
1360
|
-
borderImageOutset: 1,
|
|
1361
|
-
borderImageSlice: 1,
|
|
1362
|
-
borderImageWidth: 1,
|
|
1363
|
-
boxFlex: 1,
|
|
1364
|
-
boxFlexGroup: 1,
|
|
1365
|
-
boxOrdinalGroup: 1,
|
|
1366
|
-
columnCount: 1,
|
|
1367
|
-
columns: 1,
|
|
1368
|
-
flex: 1,
|
|
1369
|
-
flexGrow: 1,
|
|
1370
|
-
flexPositive: 1,
|
|
1371
|
-
flexShrink: 1,
|
|
1372
|
-
flexNegative: 1,
|
|
1373
|
-
flexOrder: 1,
|
|
1374
|
-
gridRow: 1,
|
|
1375
|
-
gridRowEnd: 1,
|
|
1376
|
-
gridRowSpan: 1,
|
|
1377
|
-
gridRowStart: 1,
|
|
1378
|
-
gridColumn: 1,
|
|
1379
|
-
gridColumnEnd: 1,
|
|
1380
|
-
gridColumnSpan: 1,
|
|
1381
|
-
gridColumnStart: 1,
|
|
1382
|
-
msGridRow: 1,
|
|
1383
|
-
msGridRowSpan: 1,
|
|
1384
|
-
msGridColumn: 1,
|
|
1385
|
-
msGridColumnSpan: 1,
|
|
1386
|
-
fontWeight: 1,
|
|
1387
|
-
lineHeight: 1,
|
|
1388
|
-
opacity: 1,
|
|
1389
|
-
order: 1,
|
|
1390
|
-
orphans: 1,
|
|
1391
|
-
scale: 1,
|
|
1392
|
-
tabSize: 1,
|
|
1393
|
-
widows: 1,
|
|
1394
|
-
zIndex: 1,
|
|
1395
|
-
zoom: 1,
|
|
1396
|
-
WebkitLineClamp: 1,
|
|
1397
|
-
// SVG-related properties
|
|
1398
|
-
fillOpacity: 1,
|
|
1399
|
-
floodOpacity: 1,
|
|
1400
|
-
stopOpacity: 1,
|
|
1401
|
-
strokeDasharray: 1,
|
|
1402
|
-
strokeDashoffset: 1,
|
|
1403
|
-
strokeMiterlimit: 1,
|
|
1404
|
-
strokeOpacity: 1,
|
|
1405
|
-
strokeWidth: 1
|
|
1406
|
-
}, yn = /[A-Z]|^ms/g, xn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ir = function(t) {
|
|
1407
|
-
return t.charCodeAt(1) === 45;
|
|
1408
|
-
}, Yt = function(t) {
|
|
1409
|
-
return t != null && typeof t != "boolean";
|
|
1410
|
-
}, vt = /* @__PURE__ */ tn(function(e) {
|
|
1411
|
-
return ir(e) ? e : e.replace(yn, "-$&").toLowerCase();
|
|
1412
|
-
}), zt = function(t, r) {
|
|
1413
|
-
switch (t) {
|
|
1414
|
-
case "animation":
|
|
1415
|
-
case "animationName":
|
|
1416
|
-
if (typeof r == "string")
|
|
1417
|
-
return r.replace(xn, function(n, o, a) {
|
|
1418
|
-
return re = {
|
|
1419
|
-
name: o,
|
|
1420
|
-
styles: a,
|
|
1421
|
-
next: re
|
|
1422
|
-
}, o;
|
|
1423
|
-
});
|
|
1424
|
-
}
|
|
1425
|
-
return bn[t] !== 1 && !ir(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1426
|
-
};
|
|
1427
|
-
function De(e, t, r) {
|
|
1428
|
-
if (r == null)
|
|
1429
|
-
return "";
|
|
1430
|
-
var n = r;
|
|
1431
|
-
if (n.__emotion_styles !== void 0)
|
|
1432
|
-
return n;
|
|
1433
|
-
switch (typeof r) {
|
|
1434
|
-
case "boolean":
|
|
1435
|
-
return "";
|
|
1436
|
-
case "object": {
|
|
1437
|
-
var o = r;
|
|
1438
|
-
if (o.anim === 1)
|
|
1439
|
-
return re = {
|
|
1440
|
-
name: o.name,
|
|
1441
|
-
styles: o.styles,
|
|
1442
|
-
next: re
|
|
1443
|
-
}, o.name;
|
|
1444
|
-
var a = r;
|
|
1445
|
-
if (a.styles !== void 0) {
|
|
1446
|
-
var s = a.next;
|
|
1447
|
-
if (s !== void 0)
|
|
1448
|
-
for (; s !== void 0; )
|
|
1449
|
-
re = {
|
|
1450
|
-
name: s.name,
|
|
1451
|
-
styles: s.styles,
|
|
1452
|
-
next: re
|
|
1453
|
-
}, s = s.next;
|
|
1454
|
-
var c = a.styles + ";";
|
|
1455
|
-
return c;
|
|
1456
|
-
}
|
|
1457
|
-
return Sn(e, t, r);
|
|
1458
|
-
}
|
|
1459
|
-
case "function": {
|
|
1460
|
-
if (e !== void 0) {
|
|
1461
|
-
var u = re, h = r(e);
|
|
1462
|
-
return re = u, De(e, t, h);
|
|
1463
|
-
}
|
|
1464
|
-
break;
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
var p = r;
|
|
1468
|
-
return p;
|
|
1469
|
-
}
|
|
1470
|
-
function Sn(e, t, r) {
|
|
1471
|
-
var n = "";
|
|
1472
|
-
if (Array.isArray(r))
|
|
1473
|
-
for (var o = 0; o < r.length; o++)
|
|
1474
|
-
n += De(e, t, r[o]) + ";";
|
|
1475
|
-
else
|
|
1476
|
-
for (var a in r) {
|
|
1477
|
-
var s = r[a];
|
|
1478
|
-
if (typeof s != "object") {
|
|
1479
|
-
var c = s;
|
|
1480
|
-
Yt(c) && (n += vt(a) + ":" + zt(a, c) + ";");
|
|
1481
|
-
} else if (Array.isArray(s) && typeof s[0] == "string" && t == null)
|
|
1482
|
-
for (var u = 0; u < s.length; u++)
|
|
1483
|
-
Yt(s[u]) && (n += vt(a) + ":" + zt(a, s[u]) + ";");
|
|
1484
|
-
else {
|
|
1485
|
-
var h = De(e, t, s);
|
|
1486
|
-
switch (a) {
|
|
1487
|
-
case "animation":
|
|
1488
|
-
case "animationName": {
|
|
1489
|
-
n += vt(a) + ":" + h + ";";
|
|
1490
|
-
break;
|
|
1491
|
-
}
|
|
1492
|
-
default:
|
|
1493
|
-
n += a + "{" + h + "}";
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
return n;
|
|
1498
|
-
}
|
|
1499
|
-
var Ft = /label:\s*([^\s;{]+)\s*(;|$)/g, re;
|
|
1500
|
-
function Tn(e, t, r) {
|
|
1501
|
-
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1502
|
-
return e[0];
|
|
1503
|
-
var n = !0, o = "";
|
|
1504
|
-
re = void 0;
|
|
1505
|
-
var a = e[0];
|
|
1506
|
-
if (a == null || a.raw === void 0)
|
|
1507
|
-
n = !1, o += De(r, t, a);
|
|
1508
|
-
else {
|
|
1509
|
-
var s = a;
|
|
1510
|
-
o += s[0];
|
|
1511
|
-
}
|
|
1512
|
-
for (var c = 1; c < e.length; c++)
|
|
1513
|
-
if (o += De(r, t, e[c]), n) {
|
|
1514
|
-
var u = a;
|
|
1515
|
-
o += u[c];
|
|
1516
|
-
}
|
|
1517
|
-
Ft.lastIndex = 0;
|
|
1518
|
-
for (var h = "", p; (p = Ft.exec(o)) !== null; )
|
|
1519
|
-
h += "-" + p[1];
|
|
1520
|
-
var g = gn(o) + h;
|
|
1521
|
-
return {
|
|
1522
|
-
name: g,
|
|
1523
|
-
styles: o,
|
|
1524
|
-
next: re
|
|
1525
|
-
};
|
|
1526
|
-
}
|
|
1527
|
-
var wn = function(t) {
|
|
1528
|
-
return t();
|
|
1529
|
-
}, Rn = ce.useInsertionEffect ? ce.useInsertionEffect : !1, An = Rn || wn, ar = /* @__PURE__ */ ce.createContext(
|
|
1530
|
-
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1531
|
-
// because this module is primarily intended for the browser and node
|
|
1532
|
-
// but it's also required in react native and similar environments sometimes
|
|
1533
|
-
// and we could have a special build just for that
|
|
1534
|
-
// but this is much easier and the native packages
|
|
1535
|
-
// might use a different theme context in the future anyway
|
|
1536
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */ un({
|
|
1537
|
-
key: "css"
|
|
1538
|
-
}) : null
|
|
1539
|
-
);
|
|
1540
|
-
ar.Provider;
|
|
1541
|
-
var _n = function(t) {
|
|
1542
|
-
return /* @__PURE__ */ hr(function(r, n) {
|
|
1543
|
-
var o = Te(ar);
|
|
1544
|
-
return t(r, o, n);
|
|
1545
|
-
});
|
|
1546
|
-
}, Cn = /* @__PURE__ */ ce.createContext({}), ut = {}.hasOwnProperty, bt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", sr = function(t, r) {
|
|
1547
|
-
var n = {};
|
|
1548
|
-
for (var o in r)
|
|
1549
|
-
ut.call(r, o) && (n[o] = r[o]);
|
|
1550
|
-
return n[bt] = t, n;
|
|
1551
|
-
}, Pn = function(t) {
|
|
1552
|
-
var r = t.cache, n = t.serialized, o = t.isStringTag;
|
|
1553
|
-
return or(r, n, o), An(function() {
|
|
1554
|
-
return En(r, n, o);
|
|
1555
|
-
}), null;
|
|
1556
|
-
}, Nn = /* @__PURE__ */ _n(function(e, t, r) {
|
|
1557
|
-
var n = e.css;
|
|
1558
|
-
typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
|
|
1559
|
-
var o = e[bt], a = [n], s = "";
|
|
1560
|
-
typeof e.className == "string" ? s = vn(t.registered, a, e.className) : e.className != null && (s = e.className + " ");
|
|
1561
|
-
var c = Tn(a, void 0, ce.useContext(Cn));
|
|
1562
|
-
s += t.key + "-" + c.name;
|
|
1563
|
-
var u = {};
|
|
1564
|
-
for (var h in e)
|
|
1565
|
-
ut.call(e, h) && h !== "css" && h !== bt && (u[h] = e[h]);
|
|
1566
|
-
return u.className = s, r && (u.ref = r), /* @__PURE__ */ ce.createElement(ce.Fragment, null, /* @__PURE__ */ ce.createElement(Pn, {
|
|
1567
|
-
cache: t,
|
|
1568
|
-
serialized: c,
|
|
1569
|
-
isStringTag: typeof o == "string"
|
|
1570
|
-
}), /* @__PURE__ */ ce.createElement(o, u));
|
|
1571
|
-
}), cr = Nn, lr = Ie.Fragment, E = function(t, r, n) {
|
|
1572
|
-
return ut.call(r, "css") ? Ie.jsx(cr, sr(t, r), n) : Ie.jsx(t, r, n);
|
|
1573
|
-
}, $ = function(t, r, n) {
|
|
1574
|
-
return ut.call(r, "css") ? Ie.jsxs(cr, sr(t, r), n) : Ie.jsxs(t, r, n);
|
|
1575
|
-
};
|
|
1576
|
-
const Mn = Ht(({ sendBack: e, receive: t, input: r }) => {
|
|
1577
|
-
const { videoElement: n } = r;
|
|
1578
|
-
t((b) => {
|
|
1579
|
-
b.type === "PLAY" && n.play().then(() => o()).catch((T) => {
|
|
1580
|
-
console.error(T);
|
|
1581
|
-
}), b.type === "PAUSE" && (n.pause(), a()), b.type === "SET_TIME" && (n.currentTime = b.value, c()), b.type === "SET_VOLUME" && (n.volume = b.volume, n.muted = b.muted, u()), b.type === "SET_PLAYBACK_RATE" && (n.playbackRate = b.playbackRate, h());
|
|
1582
|
-
});
|
|
1583
|
-
const o = () => e({ type: "PLAYING" }), a = () => e({ type: "PAUSED" }), s = () => e({ type: "ENDED" }), c = () => e({ type: "TIME_UPDATE", currentTime: n.currentTime }), u = () => e({ type: "VOLUME_UPDATE", muted: n.muted, volume: n.volume }), h = () => e({ type: "PLAYBACK_RATE_UPDATE", playbackRate: n.playbackRate }), p = () => e({ type: "SEEKING", currentTime: n.currentTime }), g = () => e({ type: "DURATION_UPDATE", duration: n.duration });
|
|
1584
|
-
return n.addEventListener("play", o), n.addEventListener("pause", a), n.addEventListener("ended", s), n.addEventListener("timeupdate", c), n.addEventListener("volumechange", u), n.addEventListener("ratechange", h), n.addEventListener("seeking", p), n.addEventListener("durationchange", g), () => {
|
|
1585
|
-
n.removeEventListener("play", o), n.removeEventListener("pause", a), n.removeEventListener("ended", s), n.removeEventListener("timeupdate", c), n.removeEventListener("volumechange", u), n.removeEventListener("ratechange", h), n.removeEventListener("seeking", p), n.removeEventListener("durationchange", g);
|
|
1586
|
-
};
|
|
1587
|
-
}), dt = (e) => Ht((...t) => {
|
|
1588
|
-
const r = e(...t);
|
|
1589
|
-
return () => {
|
|
1590
|
-
r.then((n) => n?.());
|
|
1591
|
-
};
|
|
1592
|
-
}), Vt = (e) => Array(e.buffered.length).fill(void 0).map((t, r) => ({
|
|
1593
|
-
index: r,
|
|
1594
|
-
start: e.buffered.start(r),
|
|
1595
|
-
end: e.buffered.end(r)
|
|
1596
|
-
})), Wt = (e, t, r) => {
|
|
1597
|
-
const n = (c) => {
|
|
1598
|
-
t(c), s();
|
|
1599
|
-
}, o = (c) => {
|
|
1600
|
-
t(c), s();
|
|
1601
|
-
}, a = (c) => {
|
|
1602
|
-
console.error(c), r(c), s();
|
|
1603
|
-
}, s = () => {
|
|
1604
|
-
e.removeEventListener("updateend", n), e.removeEventListener("abort", o), e.removeEventListener("error", a);
|
|
1605
|
-
};
|
|
1606
|
-
e.addEventListener("updateend", n, { once: !0 }), e.addEventListener("abort", o, { once: !0 }), e.addEventListener("error", a, { once: !0 });
|
|
1607
|
-
}, On = (e) => {
|
|
1608
|
-
const t = new qt({ concurrency: 1 });
|
|
1609
|
-
return {
|
|
1610
|
-
appendBuffer: (a) => t.add(
|
|
1611
|
-
() => new Promise((s, c) => {
|
|
1612
|
-
Wt(e, s, c), e.appendBuffer(a);
|
|
1613
|
-
})
|
|
1614
|
-
),
|
|
1615
|
-
unbufferRange: async (a, s) => t.add(
|
|
1616
|
-
() => new Promise((c, u) => {
|
|
1617
|
-
Wt(e, c, u), e.remove(a, s);
|
|
1618
|
-
})
|
|
1619
|
-
),
|
|
1620
|
-
updateTimestampOffset: (a) => t.add(() => {
|
|
1621
|
-
e.timestampOffset = a;
|
|
1622
|
-
})
|
|
1623
|
-
};
|
|
1624
|
-
}, kn = -20, Ln = 60, In = 30, $n = dt(async ({ sendBack: e, receive: t, input: r, self: n, emit: o }) => {
|
|
1625
|
-
const { videoElement: a, preEvictionTime: s, postEvictionTime: c, bufferTargetTime: u } = r, h = () => console.error(a.error);
|
|
1626
|
-
a.addEventListener("error", h);
|
|
1627
|
-
const p = new MediaSource(), g = URL.createObjectURL(p);
|
|
1628
|
-
a.src = g;
|
|
1629
|
-
const b = () => a.currentTime + (s ?? kn), T = () => a.currentTime + (c ?? Ln), x = () => a.currentTime + (u ?? In);
|
|
1630
|
-
let y;
|
|
1631
|
-
const l = await new Promise(
|
|
1632
|
-
(U) => p.addEventListener(
|
|
1633
|
-
"sourceopen",
|
|
1634
|
-
() => {
|
|
1635
|
-
let B = !1;
|
|
1636
|
-
t((V) => {
|
|
1637
|
-
if (!B && V.type === "METADATA") {
|
|
1638
|
-
const ee = p.addSourceBuffer(`video/mp4; codecs="${[V.info.output.videoMimeType, V.info.output.audioMimeType].filter(Boolean).join(",")}"`);
|
|
1639
|
-
ee.mode = "segments", p.duration = V.info.input.duration, y = V.data, B = !0, U(ee);
|
|
1640
|
-
}
|
|
1641
|
-
});
|
|
1642
|
-
},
|
|
1643
|
-
{ once: !0 }
|
|
1644
|
-
)
|
|
1645
|
-
);
|
|
1646
|
-
if (!y) throw new Error("No header buffer");
|
|
1647
|
-
const { appendBuffer: d, unbufferRange: m, updateTimestampOffset: v } = On(l);
|
|
1648
|
-
d(y), t(async (U) => {
|
|
1649
|
-
U.type === "DATA" ? await d(U.data) : U.type === "TIMESTAMP_OFFSET" && await v(U.timestampOffset);
|
|
1650
|
-
});
|
|
1651
|
-
const S = async () => {
|
|
1652
|
-
const U = b(), B = T(), V = Vt(l);
|
|
1653
|
-
for (const { start: ee, end: le } of V)
|
|
1654
|
-
ee < U && await m(
|
|
1655
|
-
ee,
|
|
1656
|
-
U
|
|
1657
|
-
), le > B && await m(
|
|
1658
|
-
B,
|
|
1659
|
-
le
|
|
1660
|
-
);
|
|
1661
|
-
}, f = setInterval(async () => {
|
|
1662
|
-
await S();
|
|
1663
|
-
const U = Vt(l);
|
|
1664
|
-
Math.max(...U.map(({ end: V }) => V)) < x() && e({ type: "NEED_DATA" });
|
|
1665
|
-
}, 100), w = () => e({ type: "SOURCE_OPEN" }), C = () => e({ type: "SOURCE_ENDED" }), F = () => e({ type: "SOURCE_ERROR" });
|
|
1666
|
-
return p.addEventListener("sourceopen", w), p.addEventListener("sourceended", C), p.addEventListener("error", F), () => {
|
|
1667
|
-
URL.revokeObjectURL(g), clearInterval(f), a.removeEventListener("error", h), p.removeEventListener("sourceopen", w), p.removeEventListener("sourceended", C), p.removeEventListener("error", F);
|
|
1668
|
-
};
|
|
1669
|
-
}), Un = (e, t) => {
|
|
1670
|
-
let r, n, o;
|
|
1671
|
-
const a = (s, c, u) => (h) => {
|
|
1672
|
-
const p = performance.now();
|
|
1673
|
-
return setTimeout(() => {
|
|
1674
|
-
if (!o) {
|
|
1675
|
-
r = void 0, n = void 0;
|
|
1676
|
-
return;
|
|
1677
|
-
}
|
|
1678
|
-
const g = (async () => t(...o))();
|
|
1679
|
-
o = void 0, g.then(c).catch((x) => {
|
|
1680
|
-
console.error(x), u(x);
|
|
1681
|
-
});
|
|
1682
|
-
let b, T;
|
|
1683
|
-
n = new Promise((x, y) => {
|
|
1684
|
-
b = x, T = y;
|
|
1685
|
-
}), r = g.then(a(p, b, T)).catch((x) => (console.error(x), a(s, b, T)(x)));
|
|
1686
|
-
}, e - (p - s)), h;
|
|
1687
|
-
};
|
|
1688
|
-
return (...s) => {
|
|
1689
|
-
if (o = s, r)
|
|
1690
|
-
return n;
|
|
1691
|
-
{
|
|
1692
|
-
const c = performance.now(), u = (async () => t(...s))();
|
|
1693
|
-
o = void 0;
|
|
1694
|
-
let h, p;
|
|
1695
|
-
return n = new Promise((g, b) => {
|
|
1696
|
-
h = g, p = b;
|
|
1697
|
-
}), r = u.then(a(c, h, p)).catch((g) => (console.error(g), a(c, h, p)(g))), u;
|
|
1698
|
-
}
|
|
1699
|
-
};
|
|
1700
|
-
}, Dn = dt(async ({ sendBack: e, receive: t, input: r, self: n, emit: o }) => {
|
|
1701
|
-
const { remuxerOptions: a } = r, { publicPath: s, workerUrl: c, bufferSize: u, length: h, read: p } = a, g = await Kt({
|
|
1702
|
-
publicPath: s,
|
|
1703
|
-
workerUrl: c,
|
|
1704
|
-
bufferSize: u,
|
|
1705
|
-
length: h,
|
|
1706
|
-
read: p
|
|
1707
|
-
}), b = await g.init();
|
|
1708
|
-
b.indexes && e({ type: "INDEXES", indexes: b.indexes }), b.attachments?.length && e({ type: "NEW_ATTACHMENTS", attachments: b.attachments }), b.subtitles?.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: b.subtitles }), e({ type: "METADATA", ...b });
|
|
1709
|
-
let T = !1, x = [];
|
|
1710
|
-
const y = Un(100, async () => {
|
|
1711
|
-
if (!(x.length || T))
|
|
1712
|
-
try {
|
|
1713
|
-
const { data: l, subtitles: d, finished: m } = await g.read();
|
|
1714
|
-
m && (T = !0), d.length && e({ type: "NEW_SUBTITLE_FRAGMENTS", subtitles: d }), e({ type: "DATA", data: l });
|
|
1715
|
-
} catch (l) {
|
|
1716
|
-
if (l.message === "Cancelled") return;
|
|
1717
|
-
console.error(l);
|
|
1718
|
-
}
|
|
1719
|
-
});
|
|
1720
|
-
return t(async (l) => {
|
|
1721
|
-
if (l.type === "NEED_DATA")
|
|
1722
|
-
y();
|
|
1723
|
-
else if (l.type === "SEEKING") {
|
|
1724
|
-
T = !1;
|
|
1725
|
-
const { currentTime: d } = l, m = { currentTime: d };
|
|
1726
|
-
x = [...x, m];
|
|
1727
|
-
try {
|
|
1728
|
-
const { data: v, pts: S } = await g.seek(d).finally(() => {
|
|
1729
|
-
x = x.filter((f) => f !== m);
|
|
1730
|
-
});
|
|
1731
|
-
e({ type: "TIMESTAMP_OFFSET", timestampOffset: S }), e({ type: "DATA", data: v });
|
|
1732
|
-
} catch (v) {
|
|
1733
|
-
if (v.message === "Cancelled") return;
|
|
1734
|
-
console.error(v);
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
}), () => {
|
|
1738
|
-
g.destroy();
|
|
1739
|
-
};
|
|
1740
|
-
}), Bt = (e) => new Date(e).toISOString().slice(11, 22), Xt = (e, t) => {
|
|
1741
|
-
e.createStyle({
|
|
1742
|
-
...t,
|
|
1743
|
-
SecondaryColour: Number(t.SecondaryColour),
|
|
1744
|
-
treat_fontname_as_pattern: 0,
|
|
1745
|
-
Blur: 0,
|
|
1746
|
-
Justify: 0,
|
|
1747
|
-
FontName: t.Fontname,
|
|
1748
|
-
FontSize: Number(t.Fontsize),
|
|
1749
|
-
PrimaryColour: Number(t.PrimaryColour),
|
|
1750
|
-
BackColour: Number(t.BackColour),
|
|
1751
|
-
OutlineColour: Number(t.OutlineColour),
|
|
1752
|
-
Bold: Number(t.Bold),
|
|
1753
|
-
Italic: Number(t.Italic),
|
|
1754
|
-
Underline: Number(t.Underline),
|
|
1755
|
-
StrikeOut: Number(t.StrikeOut),
|
|
1756
|
-
ScaleX: Number(t.ScaleX),
|
|
1757
|
-
ScaleY: Number(t.ScaleY),
|
|
1758
|
-
Spacing: Number(t.Spacing),
|
|
1759
|
-
Angle: Number(t.Angle),
|
|
1760
|
-
BorderStyle: Number(t.BorderStyle),
|
|
1761
|
-
Outline: Number(t.Outline),
|
|
1762
|
-
Shadow: Number(t.Shadow),
|
|
1763
|
-
Alignment: Number(t.Alignment),
|
|
1764
|
-
MarginL: Number(t.MarginL),
|
|
1765
|
-
MarginR: Number(t.MarginR),
|
|
1766
|
-
MarginV: Number(t.MarginV),
|
|
1767
|
-
Encoding: Number(t.Encoding)
|
|
1768
|
-
});
|
|
1769
|
-
}, jn = (e) => {
|
|
1770
|
-
const t = e.content.match(/\r\n\[Events\]\r\nFormat: (.*)/)?.[0], r = t?.trim().split(`
|
|
1771
|
-
`)[1];
|
|
1772
|
-
if (!t || !r)
|
|
1773
|
-
throw new Error("dialogueFormatContent is undefined");
|
|
1774
|
-
return {
|
|
1775
|
-
type: "header",
|
|
1776
|
-
streamIndex: e.streamIndex,
|
|
1777
|
-
content: e.content,
|
|
1778
|
-
eventsContent: t,
|
|
1779
|
-
dialogueFormatContent: r,
|
|
1780
|
-
parsed: Le(e.content)
|
|
1781
|
-
};
|
|
1782
|
-
}, Yn = (e, t) => {
|
|
1783
|
-
const [r, n] = t.content.split(","), o = Number(r), a = Bt(t.start), s = Bt(t.end), c = t.content.replace(`${o},${n},`, ""), u = `Dialogue: ${n},${a},${s},${c}`, p = Le(`${e.eventsContent}\r
|
|
1784
|
-
${u}`).events.dialogue[0];
|
|
1785
|
-
if (!p)
|
|
1786
|
-
throw new Error("dialogueEvent is undefined");
|
|
1787
|
-
return {
|
|
1788
|
-
type: "dialogue",
|
|
1789
|
-
streamIndex: t.streamIndex,
|
|
1790
|
-
index: o,
|
|
1791
|
-
content: u,
|
|
1792
|
-
parsed: Le(`${e.eventsContent}\r
|
|
1793
|
-
${u}`),
|
|
1794
|
-
assEvent: {
|
|
1795
|
-
...p,
|
|
1796
|
-
Effect: p.Effect ?? "",
|
|
1797
|
-
Text: p.Text.raw,
|
|
1798
|
-
Duration: (p.End - p.Start) * 1e3,
|
|
1799
|
-
Start: p.Start * 1e3,
|
|
1800
|
-
End: p.End * 1e3,
|
|
1801
|
-
ReadOrder: o,
|
|
1802
|
-
_index: o
|
|
1803
|
-
}
|
|
1804
|
-
};
|
|
1805
|
-
}, zn = dt(async ({ sendBack: e, receive: t, input: r, self: n, emit: o }) => {
|
|
1806
|
-
const { publicPath: a, subtitlesRendererOptions: s, videoElement: c, canvasElement: u } = r;
|
|
1807
|
-
let h = [], p;
|
|
1808
|
-
const g = /* @__PURE__ */ new Map();
|
|
1809
|
-
let b = [], T;
|
|
1810
|
-
const x = setInterval(() => {
|
|
1811
|
-
p && p.setCurrentTime(c.paused, c.currentTime, c.playbackRate);
|
|
1812
|
-
}, 100);
|
|
1813
|
-
return t((y) => {
|
|
1814
|
-
if (y.type === "TIME_UPDATE" && p && p.setCurrentTime(c.paused, y.currentTime, c.playbackRate), y.type === "SELECT_SUBTITLE_STREAM") {
|
|
1815
|
-
if (T = y.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: y.streamIndex }), !p || (p.freeTrack(), p.setCurrentTime(c.paused, c.currentTime, c.playbackRate), T === void 0))
|
|
1816
|
-
return;
|
|
1817
|
-
b = [];
|
|
1818
|
-
const l = g.get(T);
|
|
1819
|
-
if (!l)
|
|
1820
|
-
throw new Error("newSubtitleStreams is undefined");
|
|
1821
|
-
const d = Le(l.header.content), m = {
|
|
1822
|
-
...d,
|
|
1823
|
-
info: {
|
|
1824
|
-
...d.info,
|
|
1825
|
-
ScaledBorderAndShadow: "no",
|
|
1826
|
-
LayoutResX: "",
|
|
1827
|
-
LayoutResY: ""
|
|
1828
|
-
}
|
|
1829
|
-
}, v = Pt(m);
|
|
1830
|
-
p.setTrack(v), p.setCurrentTime(c.paused, c.currentTime, c.playbackRate);
|
|
1831
|
-
for (const S in l.header.parsed.styles) {
|
|
1832
|
-
const f = l.header.parsed.styles.style[Number(S)];
|
|
1833
|
-
f && Xt(p, f);
|
|
1834
|
-
}
|
|
1835
|
-
for (const S of l?.dialogues ?? [])
|
|
1836
|
-
b.filter((w) => w.type === "dialogue").find(
|
|
1837
|
-
(w) => w.streamIndex === S.streamIndex && w.index === S.index
|
|
1838
|
-
) || T !== S.streamIndex || (p?.createEvent(S.assEvent), b.push(S));
|
|
1839
|
-
}
|
|
1840
|
-
if (y.type === "NEW_SUBTITLE_FRAGMENTS") {
|
|
1841
|
-
const l = y.subtitles.map((d) => {
|
|
1842
|
-
if (d.type === "header") {
|
|
1843
|
-
const m = jn(d);
|
|
1844
|
-
return g.set(d.streamIndex, { header: m, dialogues: [] }), T === void 0 && (T = d.streamIndex, e({ type: "SELECTED_SUBTITLE_STREAM_UPDATED", streamIndex: d.streamIndex })), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), m;
|
|
1845
|
-
} else {
|
|
1846
|
-
const m = g.get(d.streamIndex)?.header;
|
|
1847
|
-
if (!m)
|
|
1848
|
-
throw new Error("SubtitleStream or its header is undefined");
|
|
1849
|
-
const v = Yn(m, d);
|
|
1850
|
-
return g.get(d.streamIndex)?.dialogues.push(v), e({ type: "SUBTITLE_STREAMS_UPDATED", subtitlesStreams: [...g.values()] }), v;
|
|
1851
|
-
}
|
|
1852
|
-
});
|
|
1853
|
-
for (const d of l)
|
|
1854
|
-
if (d.type === "dialogue") {
|
|
1855
|
-
if (b.filter((v) => v.type === "dialogue").find(
|
|
1856
|
-
(v) => v.streamIndex === d.streamIndex && v.index === d.index
|
|
1857
|
-
) || T !== d.streamIndex)
|
|
1858
|
-
continue;
|
|
1859
|
-
p?.createEvent(d.assEvent), b.push(d);
|
|
1860
|
-
} else if (d.type === "header") {
|
|
1861
|
-
if (!p) {
|
|
1862
|
-
const m = Le(d.content), v = {
|
|
1863
|
-
...m,
|
|
1864
|
-
info: {
|
|
1865
|
-
...m.info,
|
|
1866
|
-
ScaledBorderAndShadow: "no",
|
|
1867
|
-
LayoutResX: "",
|
|
1868
|
-
LayoutResY: ""
|
|
1869
|
-
}
|
|
1870
|
-
}, S = Pt(v);
|
|
1871
|
-
p = new yr({
|
|
1872
|
-
onDemandRender: !1,
|
|
1873
|
-
video: c,
|
|
1874
|
-
canvas: u,
|
|
1875
|
-
subContent: S,
|
|
1876
|
-
workerUrl: s.workerUrl,
|
|
1877
|
-
modernWasmUrl: s.wasmUrl,
|
|
1878
|
-
fonts: h.filter(Boolean).map(([f, w]) => w),
|
|
1879
|
-
availableFonts: { ...Object.fromEntries(h), "liberation sans": `${a}default.woff2` }
|
|
1880
|
-
// fallbackFont: 'liberation sans',
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
for (const m in d.parsed.styles) {
|
|
1884
|
-
const v = d.parsed.styles.style[Number(m)];
|
|
1885
|
-
v && Xt(p, v);
|
|
1886
|
-
}
|
|
1887
|
-
} else
|
|
1888
|
-
throw new Error("Unknown subtitlePart type");
|
|
1889
|
-
}
|
|
1890
|
-
y.type === "NEW_ATTACHMENTS" && (h = y.attachments.map((l) => [
|
|
1891
|
-
l.filename,
|
|
1892
|
-
new Uint8Array(l.data)
|
|
1893
|
-
]));
|
|
1894
|
-
}), () => {
|
|
1895
|
-
clearInterval(x), p?.destroy();
|
|
1896
|
-
};
|
|
1897
|
-
}), Fn = dt(async ({ sendBack: e, receive: t, input: r, self: n, emit: o }) => {
|
|
1898
|
-
const { remuxerOptions: a } = r, { publicPath: s, workerUrl: c, bufferSize: u, length: h, read: p } = a;
|
|
1899
|
-
let g;
|
|
1900
|
-
const b = new Promise((m) => {
|
|
1901
|
-
g = m;
|
|
1902
|
-
});
|
|
1903
|
-
t(async (m) => {
|
|
1904
|
-
await b, m.type === "DOWNLOADED_RANGES_UPDATED" && x.indexes.reduce((f, w) => {
|
|
1905
|
-
const C = f.at(-1);
|
|
1906
|
-
if (C && w.timestamp - C.timestamp < 5)
|
|
1907
|
-
return f;
|
|
1908
|
-
{
|
|
1909
|
-
const F = x.indexes.slice(w.index + 1).find((U) => U.timestamp > w.timestamp + 5);
|
|
1910
|
-
return F ? [...f, { ...w, duration: F.timestamp - w.timestamp }] : [...f, w];
|
|
1911
|
-
}
|
|
1912
|
-
}, []).filter((f) => {
|
|
1913
|
-
const w = x.indexes.at(f.index + 1), C = w ? w.pos : a.length, F = f.pos;
|
|
1914
|
-
return m.downloadedRanges.some(
|
|
1915
|
-
({ startByteOffset: B, endByteOffset: V }) => B <= F && C <= V
|
|
1916
|
-
);
|
|
1917
|
-
}).sort((f, w) => f.timestamp - w.timestamp).forEach((f) => d(f));
|
|
1918
|
-
});
|
|
1919
|
-
const T = await Kt({
|
|
1920
|
-
publicPath: s,
|
|
1921
|
-
workerUrl: c,
|
|
1922
|
-
bufferSize: u,
|
|
1923
|
-
length: h,
|
|
1924
|
-
read: p
|
|
1925
|
-
}), x = await T.init(), y = new qt({ concurrency: 1 });
|
|
1926
|
-
let l = [];
|
|
1927
|
-
const d = (m) => y.add(async () => {
|
|
1928
|
-
if (l.find((U) => U.index.index === m.index)) return;
|
|
1929
|
-
const v = await T.readKeyframe(m.timestamp), S = new Blob([v], { type: "image/png" }), f = URL.createObjectURL(S), w = x.indexes.at(m.index + 1), C = w ? w.timestamp - m.timestamp : x.info.input.duration - m.timestamp, F = {
|
|
1930
|
-
blob: S,
|
|
1931
|
-
url: f,
|
|
1932
|
-
timestamp: m.timestamp,
|
|
1933
|
-
duration: m.duration ?? C,
|
|
1934
|
-
index: m
|
|
1935
|
-
};
|
|
1936
|
-
l.push(F), e({ type: "NEW_THUMBNAIL", thumbnail: F });
|
|
1937
|
-
});
|
|
1938
|
-
return g(), () => {
|
|
1939
|
-
T.destroy();
|
|
1940
|
-
};
|
|
1941
|
-
}), Vn = gr({
|
|
1942
|
-
types: {},
|
|
1943
|
-
actions: {
|
|
1944
|
-
isReady: br(({ context: e, enqueue: t }) => {
|
|
1945
|
-
e.videoElement && e.canvasElement && e.remuxerOptions && e.subtitlesRendererOptions && e.mediaSourceOptions && t.raise({ type: "IS_READY" });
|
|
1946
|
-
})
|
|
1947
|
-
},
|
|
1948
|
-
actors: {
|
|
1949
|
-
mediaLogic: Mn,
|
|
1950
|
-
mediaSourceLogic: $n,
|
|
1951
|
-
dataSourceLogic: Dn,
|
|
1952
|
-
thumbnailsLogic: Fn,
|
|
1953
|
-
subtitlesLogic: zn
|
|
1954
|
-
}
|
|
1955
|
-
}).createMachine({
|
|
1956
|
-
context: {
|
|
1957
|
-
mediaSourceOptions: void 0,
|
|
1958
|
-
subtitlesRendererOptions: void 0,
|
|
1959
|
-
remuxerOptions: void 0,
|
|
1960
|
-
videoElement: void 0,
|
|
1961
|
-
canvasElement: void 0,
|
|
1962
|
-
media: {
|
|
1963
|
-
paused: !0,
|
|
1964
|
-
currentTime: 0,
|
|
1965
|
-
volume: 1,
|
|
1966
|
-
muted: !1,
|
|
1967
|
-
playbackRate: 1,
|
|
1968
|
-
duration: void 0
|
|
1969
|
-
},
|
|
1970
|
-
attachments: [],
|
|
1971
|
-
subtitleFragments: [],
|
|
1972
|
-
subtitleStreams: [],
|
|
1973
|
-
selectedSubtitleStreamIndex: void 0,
|
|
1974
|
-
indexes: [],
|
|
1975
|
-
thumbnails: [],
|
|
1976
|
-
isReady: !1
|
|
1977
|
-
},
|
|
1978
|
-
initial: "WAITING",
|
|
1979
|
-
on: {
|
|
1980
|
-
SET_VIDEO_ELEMENT: {
|
|
1981
|
-
actions: [
|
|
1982
|
-
z({
|
|
1983
|
-
videoElement: ({ event: e }) => e.videoElement
|
|
1984
|
-
}),
|
|
1985
|
-
{ type: "isReady" }
|
|
1986
|
-
]
|
|
1987
|
-
},
|
|
1988
|
-
SET_CANVAS_ELEMENT: {
|
|
1989
|
-
actions: [
|
|
1990
|
-
z({
|
|
1991
|
-
canvasElement: ({ event: e }) => e.canvasElement
|
|
1992
|
-
}),
|
|
1993
|
-
{ type: "isReady" }
|
|
1994
|
-
]
|
|
1995
|
-
},
|
|
1996
|
-
IS_READY: {
|
|
1997
|
-
target: ".OK",
|
|
1998
|
-
actions: z({ isReady: () => !0 })
|
|
1999
|
-
}
|
|
2000
|
-
},
|
|
2001
|
-
states: {
|
|
2002
|
-
WAITING: {
|
|
2003
|
-
on: {
|
|
2004
|
-
MEDIA_SOURCE_OPTIONS: {
|
|
2005
|
-
actions: [
|
|
2006
|
-
z({
|
|
2007
|
-
mediaSourceOptions: ({ event: e }) => e.mediaSourceOptions
|
|
2008
|
-
}),
|
|
2009
|
-
{ type: "isReady" }
|
|
2010
|
-
]
|
|
2011
|
-
},
|
|
2012
|
-
REMUXER_OPTIONS: {
|
|
2013
|
-
actions: [
|
|
2014
|
-
z({
|
|
2015
|
-
remuxerOptions: ({ event: e }) => e.remuxerOptions
|
|
2016
|
-
}),
|
|
2017
|
-
{ type: "isReady" }
|
|
2018
|
-
]
|
|
2019
|
-
},
|
|
2020
|
-
SUBTITLES_RENDERER_OPTIONS: {
|
|
2021
|
-
actions: [
|
|
2022
|
-
z({
|
|
2023
|
-
subtitlesRendererOptions: ({ event: e }) => e.subtitlesRendererOptions
|
|
2024
|
-
}),
|
|
2025
|
-
{ type: "isReady" }
|
|
2026
|
-
]
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
},
|
|
2030
|
-
OK: {
|
|
2031
|
-
type: "parallel",
|
|
2032
|
-
invoke: [
|
|
2033
|
-
{
|
|
2034
|
-
id: "media",
|
|
2035
|
-
src: "mediaLogic",
|
|
2036
|
-
input: ({ context: e }) => ({ videoElement: e.videoElement, remuxerOptions: e.remuxerOptions })
|
|
2037
|
-
},
|
|
2038
|
-
{
|
|
2039
|
-
id: "mediaSource",
|
|
2040
|
-
src: "mediaSourceLogic",
|
|
2041
|
-
input: ({ context: e }) => ({ videoElement: e.videoElement, remuxerOptions: e.remuxerOptions })
|
|
2042
|
-
},
|
|
2043
|
-
{
|
|
2044
|
-
id: "dataSource",
|
|
2045
|
-
src: "dataSourceLogic",
|
|
2046
|
-
input: ({ context: e }) => ({ remuxerOptions: e.remuxerOptions })
|
|
2047
|
-
},
|
|
2048
|
-
{
|
|
2049
|
-
id: "thumbnails",
|
|
2050
|
-
src: "thumbnailsLogic",
|
|
2051
|
-
input: ({ context: e }) => ({ remuxerOptions: e.remuxerOptions })
|
|
2052
|
-
},
|
|
2053
|
-
{
|
|
2054
|
-
id: "subtitles",
|
|
2055
|
-
src: "subtitlesLogic",
|
|
2056
|
-
input: ({ context: e }) => ({
|
|
2057
|
-
publicPath: e.remuxerOptions.publicPath,
|
|
2058
|
-
videoElement: e.videoElement,
|
|
2059
|
-
canvasElement: e.canvasElement,
|
|
2060
|
-
subtitlesRendererOptions: e.subtitlesRendererOptions
|
|
2061
|
-
})
|
|
2062
|
-
}
|
|
2063
|
-
],
|
|
2064
|
-
on: {
|
|
2065
|
-
PLAY: { actions: G("media", ({ event: e }) => e) },
|
|
2066
|
-
PAUSE: { actions: G("media", ({ event: e }) => e) },
|
|
2067
|
-
SET_TIME: { actions: G("media", ({ event: e }) => e) },
|
|
2068
|
-
SET_PLAYBACK_RATE: { actions: G("media", ({ event: e }) => e) },
|
|
2069
|
-
PLAYING: { actions: z({ media: ({ context: e }) => ({ ...e.media, paused: !1 }) }) },
|
|
2070
|
-
PAUSED: { actions: z({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
|
|
2071
|
-
ENDED: { actions: z({ media: ({ context: e }) => ({ ...e.media, paused: !0 }) }) },
|
|
2072
|
-
TIME_UPDATE: { actions: [
|
|
2073
|
-
z({ media: ({ context: e, event: t }) => ({ ...e.media, currentTime: t.currentTime }) }),
|
|
2074
|
-
G("subtitles", ({ event: e }) => e)
|
|
2075
|
-
] },
|
|
2076
|
-
VOLUME_UPDATE: { actions: z({ media: ({ context: e, event: t }) => ({ ...e.media, muted: t.muted, volume: t.volume }) }) },
|
|
2077
|
-
SET_VOLUME: { actions: G("media", ({ event: e }) => e) },
|
|
2078
|
-
PLAYBACK_RATE_UPDATE: { actions: z({ media: ({ context: e, event: t }) => ({ ...e.media, playbackRate: t.playbackRate }) }) },
|
|
2079
|
-
DURATION_UPDATE: { actions: z({ media: ({ context: e, event: t }) => ({ ...e.media, duration: t.duration }) }) },
|
|
2080
|
-
NEED_DATA: { actions: G("dataSource", ({ event: e }) => e) },
|
|
2081
|
-
METADATA: { actions: G("mediaSource", ({ event: e }) => e) },
|
|
2082
|
-
SEEKING: { actions: G("dataSource", ({ event: e }) => e) },
|
|
2083
|
-
DATA: { actions: G("mediaSource", ({ event: e }) => e) },
|
|
2084
|
-
TIMESTAMP_OFFSET: { actions: G("mediaSource", ({ event: e }) => e) },
|
|
2085
|
-
NEW_THUMBNAIL: { actions: [z({ thumbnails: ({ context: e, event: t }) => [...e.thumbnails, t.thumbnail] })] },
|
|
2086
|
-
DOWNLOADED_RANGES_UPDATED: { actions: G("thumbnails", ({ event: e }) => e) },
|
|
2087
|
-
INDEXES: {
|
|
2088
|
-
actions: [
|
|
2089
|
-
z({ indexes: ({ event: e }) => e.indexes })
|
|
2090
|
-
]
|
|
2091
|
-
},
|
|
2092
|
-
NEW_ATTACHMENTS: {
|
|
2093
|
-
actions: [
|
|
2094
|
-
z({ attachments: ({ context: e, event: t }) => [...e.attachments, ...t.attachments] }),
|
|
2095
|
-
G("subtitles", ({ event: e }) => e)
|
|
2096
|
-
]
|
|
2097
|
-
},
|
|
2098
|
-
NEW_SUBTITLE_FRAGMENTS: {
|
|
2099
|
-
actions: [
|
|
2100
|
-
z({ subtitleFragments: ({ context: e, event: t }) => [...e.subtitleFragments, ...t.subtitles] }),
|
|
2101
|
-
G("subtitles", ({ event: e }) => e)
|
|
2102
|
-
// emit(({ event }) => ({ type: 'NEW_SUBTITLE_FRAGMENTS', subtitles: event.subtitles }))
|
|
2103
|
-
]
|
|
2104
|
-
},
|
|
2105
|
-
SUBTITLE_STREAMS_UPDATED: {
|
|
2106
|
-
actions: [
|
|
2107
|
-
z({ subtitleStreams: ({ event: e }) => e.subtitlesStreams }),
|
|
2108
|
-
G("subtitles", ({ event: e }) => e)
|
|
2109
|
-
]
|
|
2110
|
-
},
|
|
2111
|
-
SELECT_SUBTITLE_STREAM: {
|
|
2112
|
-
actions: [
|
|
2113
|
-
G("subtitles", ({ event: e }) => e)
|
|
2114
|
-
]
|
|
2115
|
-
},
|
|
2116
|
-
SELECTED_SUBTITLE_STREAM_UPDATED: {
|
|
2117
|
-
actions: [
|
|
2118
|
-
z({ selectedSubtitleStreamIndex: ({ event: e }) => e.streamIndex })
|
|
2119
|
-
]
|
|
2120
|
-
},
|
|
2121
|
-
DESTROY: { target: "WAITING" }
|
|
2122
|
-
}
|
|
2123
|
-
},
|
|
2124
|
-
DESTROYED: {}
|
|
2125
|
-
}
|
|
2126
|
-
}), N = Er(Vn), Re = vr({}), at = (e, t) => {
|
|
2127
|
-
const [r, n] = J(() => localStorage.getItem(e) ?? t), o = (a) => {
|
|
2128
|
-
localStorage.setItem(e, a), n(a), window.dispatchEvent(new Event("storage"));
|
|
2129
|
-
};
|
|
2130
|
-
return j(() => {
|
|
2131
|
-
const a = () => {
|
|
2132
|
-
const s = localStorage.getItem(e);
|
|
2133
|
-
n(s ?? t);
|
|
2134
|
-
};
|
|
2135
|
-
return window.addEventListener("storage", a), () => {
|
|
2136
|
-
window.removeEventListener("storage", a);
|
|
2137
|
-
};
|
|
2138
|
-
}, [e]), [r, o];
|
|
2139
|
-
}, nt = (e, t, r, n) => {
|
|
2140
|
-
if (!e) throw new Error("Media actor not found");
|
|
2141
|
-
if (!r) throw new Error("Duration not found");
|
|
2142
|
-
r === n ? (e.send({ type: "SET_TIME", value: 0 }), e.send({ type: "PLAY" })) : t ? e.send({ type: "PLAY" }) : e.send({ type: "PAUSE" });
|
|
2143
|
-
}, he = {
|
|
2144
|
-
headings: {
|
|
2145
|
-
small: `
|
|
2146
|
-
font-weight: 500;
|
|
2147
|
-
font-size: 1.8rem;
|
|
2148
|
-
line-height: 1.9rem;
|
|
2149
|
-
@media (min-width: 960px) {
|
|
2150
|
-
font-size: 1.8rem;
|
|
2151
|
-
line-height: 2.2rem;
|
|
2152
|
-
}
|
|
2153
|
-
@media (min-width: 2560px) {
|
|
2154
|
-
font-size: 2.2rem;
|
|
2155
|
-
line-height: 2.6rem;
|
|
2156
|
-
}
|
|
2157
|
-
`
|
|
2158
|
-
},
|
|
2159
|
-
bMedium: {
|
|
2160
|
-
bold: `
|
|
2161
|
-
font-weight: 600;
|
|
2162
|
-
font-size: 1.2rem;
|
|
2163
|
-
line-height: 1.7rem;
|
|
2164
|
-
@media (min-width: 960px) {
|
|
2165
|
-
font-size: 1.4rem;
|
|
2166
|
-
line-height: 2rem;
|
|
2167
|
-
}
|
|
2168
|
-
`,
|
|
2169
|
-
regular: `
|
|
2170
|
-
font-weight: 400;
|
|
2171
|
-
font-size: 1.2rem;
|
|
2172
|
-
line-height: 1.7rem;
|
|
2173
|
-
@media (min-width: 960px) {
|
|
2174
|
-
font-size: 1.4rem;
|
|
2175
|
-
line-height: 2rem;
|
|
2176
|
-
}
|
|
2177
|
-
`
|
|
2178
|
-
},
|
|
2179
|
-
bSmall: {
|
|
2180
|
-
regular: `
|
|
2181
|
-
font-weight: 400;
|
|
2182
|
-
font-size: 1rem;
|
|
2183
|
-
line-height: 1.4rem;
|
|
2184
|
-
@media (min-width: 960px) {
|
|
2185
|
-
font-size: 1.2rem;
|
|
2186
|
-
line-height: 1.7rem;
|
|
2187
|
-
}
|
|
2188
|
-
`
|
|
2189
|
-
}
|
|
2190
|
-
}, Wn = K`
|
|
2191
|
-
top: unset !important;
|
|
2192
|
-
left: unset !important;
|
|
2193
|
-
width: 100%;
|
|
2194
|
-
height: 100%;
|
|
2195
|
-
margin: auto;
|
|
2196
|
-
pointer-events: none;
|
|
2197
|
-
`, Bn = K`
|
|
2198
|
-
position: absolute;
|
|
2199
|
-
top: 0;
|
|
2200
|
-
left: 0;
|
|
2201
|
-
width: 100%;
|
|
2202
|
-
padding: 2.4rem;
|
|
2203
|
-
${he.headings.small}
|
|
2204
|
-
color: white;
|
|
2205
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 1);
|
|
2206
|
-
z-index: 2;
|
|
2207
|
-
pointer-events: none;
|
|
2208
|
-
|
|
2209
|
-
background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 80%, transparent 100%);
|
|
2210
|
-
transition: opacity 0.1s cubic-bezier(.4,0,1,1);
|
|
2211
|
-
`, Xn = K`
|
|
2212
|
-
position: absolute;
|
|
2213
|
-
top: 0;
|
|
2214
|
-
left: 0;
|
|
2215
|
-
width: 100%;
|
|
2216
|
-
height: 100%;
|
|
2217
|
-
font-size: 2rem;
|
|
2218
|
-
color: white;
|
|
2219
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 1);
|
|
2220
|
-
z-index: 2;
|
|
2221
|
-
display: flex;
|
|
2222
|
-
justify-content: center;
|
|
2223
|
-
align-items: center;
|
|
2224
|
-
pointer-events: none;
|
|
2225
|
-
`, Gn = ({ loadingInformation: e }) => {
|
|
2226
|
-
const t = N.useActorRef(), r = N.useSelector((c) => c.context.media.duration), n = Te(Re), [o, a] = J(), s = ot((c) => {
|
|
2227
|
-
a(c);
|
|
2228
|
-
}, []);
|
|
2229
|
-
return j(() => {
|
|
2230
|
-
o && t.send({
|
|
2231
|
-
type: "SET_CANVAS_ELEMENT",
|
|
2232
|
-
canvasElement: o
|
|
2233
|
-
});
|
|
2234
|
-
}, [o]), /* @__PURE__ */ $(lr, { children: [
|
|
2235
|
-
n.title ? /* @__PURE__ */ E(
|
|
2236
|
-
"div",
|
|
2237
|
-
{
|
|
2238
|
-
css: Bn,
|
|
2239
|
-
style: { ...n.hideUI ? { opacity: "0", pointerEvents: "none" } : {} },
|
|
2240
|
-
children: n.title
|
|
2241
|
-
}
|
|
2242
|
-
) : void 0,
|
|
2243
|
-
r === void 0 && e ? /* @__PURE__ */ E("div", { css: Xn, children: e }) : void 0,
|
|
2244
|
-
/* @__PURE__ */ E("canvas", { ref: s, css: Wn })
|
|
2245
|
-
] });
|
|
2246
|
-
}, ur = 1e-4, yt = 1, dr = 2, fr = (e) => {
|
|
2247
|
-
const t = Math.max(ur, Math.min(yt, e));
|
|
2248
|
-
return Math.pow(t, dr);
|
|
2249
|
-
}, wt = (e) => {
|
|
2250
|
-
const t = Math.max(ur, Math.min(yt, e));
|
|
2251
|
-
return Math.pow(t, yt / dr);
|
|
2252
|
-
}, Hn = (e) => K`
|
|
2253
|
-
display: flex;
|
|
2254
|
-
justify-content: flex-end;
|
|
2255
|
-
|
|
2256
|
-
border-radius: 0.4rem;
|
|
2257
|
-
user-select: none;
|
|
2258
|
-
|
|
2259
|
-
z-index: 3;
|
|
2260
|
-
|
|
2261
|
-
* {
|
|
2262
|
-
${he.bMedium.regular}
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
${e === "sm" && K`
|
|
2266
|
-
padding: 0.4rem!important;
|
|
2267
|
-
`}
|
|
2268
|
-
${e === "md" && K`
|
|
2269
|
-
padding: 0.6rem!important;
|
|
2270
|
-
`}
|
|
2271
|
-
${e === "lg" && K`
|
|
2272
|
-
padding: 1.2rem!important;
|
|
2273
|
-
`}
|
|
2274
|
-
`, ye = ({
|
|
2275
|
-
id: e,
|
|
2276
|
-
toolTipText: t,
|
|
2277
|
-
text: r,
|
|
2278
|
-
delayShow: n = 0,
|
|
2279
|
-
closeDelay: o = 0,
|
|
2280
|
-
offset: a = 20,
|
|
2281
|
-
tooltipPlace: s = "top",
|
|
2282
|
-
disabled: c = !1,
|
|
2283
|
-
size: u = "md"
|
|
2284
|
-
/* md */
|
|
2285
|
-
}) => /* @__PURE__ */ $(lr, { children: [
|
|
2286
|
-
/* @__PURE__ */ E(
|
|
2287
|
-
"div",
|
|
2288
|
-
{
|
|
2289
|
-
"data-tooltip-id": e,
|
|
2290
|
-
"data-open": !0,
|
|
2291
|
-
"data-tooltip-offset": a,
|
|
2292
|
-
"data-tooltip-delay-show": n,
|
|
2293
|
-
"data-tooltip-delay-hide": o,
|
|
2294
|
-
"data-tooltip-place": s,
|
|
2295
|
-
children: r
|
|
2296
|
-
}
|
|
2297
|
-
),
|
|
2298
|
-
!c && /* @__PURE__ */ E(
|
|
2299
|
-
Nr,
|
|
2300
|
-
{
|
|
2301
|
-
css: Hn(u),
|
|
2302
|
-
id: e,
|
|
2303
|
-
noArrow: !0,
|
|
2304
|
-
children: t
|
|
2305
|
-
}
|
|
2306
|
-
)
|
|
2307
|
-
] }), qn = ({ ref: e, defaultValue: t }) => {
|
|
2308
|
-
const [r, n] = J(t), [o, a] = J(!1), s = (c) => {
|
|
2309
|
-
if (a(!0), !e.current) return;
|
|
2310
|
-
const { clientX: u } = c, { left: h, right: p } = e.current.getBoundingClientRect();
|
|
2311
|
-
n(Math.min(Math.max((u - h) / (p - h), 0), 1));
|
|
2312
|
-
};
|
|
2313
|
-
return j(() => {
|
|
2314
|
-
if (!o) return;
|
|
2315
|
-
const c = () => a(!1), u = (h) => {
|
|
2316
|
-
if (!e.current) return;
|
|
2317
|
-
const { clientX: p } = h, { left: g, right: b } = e.current.getBoundingClientRect();
|
|
2318
|
-
n(Math.min(Math.max((p - g) / (b - g), 0), 1));
|
|
2319
|
-
};
|
|
2320
|
-
return document.addEventListener("mousemove", u), document.addEventListener("mouseup", c), () => {
|
|
2321
|
-
document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", c);
|
|
2322
|
-
};
|
|
2323
|
-
}, [o]), {
|
|
2324
|
-
value: r,
|
|
2325
|
-
scrubbing: o,
|
|
2326
|
-
scrub: s,
|
|
2327
|
-
setValue: n
|
|
2328
|
-
};
|
|
2329
|
-
}, Kn = K`
|
|
2330
|
-
position: relative;
|
|
2331
|
-
height: .4rem;
|
|
2332
|
-
|
|
2333
|
-
transition: transform .2s ease-in-out;
|
|
2334
|
-
|
|
2335
|
-
margin: 0 12px;
|
|
2336
|
-
@media (min-width: 768px) {
|
|
2337
|
-
margin: 0 16px;
|
|
2338
|
-
}
|
|
2339
|
-
@media (min-width: 2560px) {
|
|
2340
|
-
margin: 0 24px;
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
user-select: none;
|
|
2344
|
-
cursor: pointer;
|
|
2345
|
-
|
|
2346
|
-
:hover {
|
|
2347
|
-
.background-bar {
|
|
2348
|
-
transform: scaleY(1.5);
|
|
2349
|
-
}
|
|
2350
|
-
.loaded {
|
|
2351
|
-
transform: scaleY(1.5);
|
|
2352
|
-
top: -.1rem;
|
|
2353
|
-
}
|
|
2354
|
-
.play-container {
|
|
2355
|
-
transform: scaleY(1.5);
|
|
2356
|
-
}
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
.background-bar {
|
|
2360
|
-
position: absolute;
|
|
2361
|
-
inset: 0;
|
|
2362
|
-
background-color: hsla(0, 100%, 100%, .2);
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
.cursor-time {
|
|
2366
|
-
display: flex;
|
|
2367
|
-
justify-content: center;
|
|
2368
|
-
|
|
2369
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 1);
|
|
2370
|
-
${he.bMedium.bold}
|
|
2371
|
-
|
|
2372
|
-
position: absolute;
|
|
2373
|
-
top: -2.5rem;
|
|
2374
|
-
width: 5rem;
|
|
2375
|
-
|
|
2376
|
-
margin-left: -2.5rem;
|
|
2377
|
-
pointer-events: none;
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
.loaded {
|
|
2381
|
-
transform-origin: 0 0;
|
|
2382
|
-
position: absolute;
|
|
2383
|
-
bottom: 0;
|
|
2384
|
-
height: .4rem;
|
|
2385
|
-
width: 100%;
|
|
2386
|
-
.loaded-part {
|
|
2387
|
-
transform-origin: 0 0;
|
|
2388
|
-
bottom: 0;
|
|
2389
|
-
height: .4rem;
|
|
2390
|
-
width: 100%;
|
|
2391
|
-
position: absolute;
|
|
2392
|
-
background-color: hsla(0, 100%, 100%, .4);
|
|
2393
|
-
}
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
.play-container {
|
|
2397
|
-
position: absolute;
|
|
2398
|
-
bottom: 0;
|
|
2399
|
-
width: 100%;
|
|
2400
|
-
height: .4rem;
|
|
2401
|
-
}
|
|
2402
|
-
|
|
2403
|
-
.play {
|
|
2404
|
-
transform-origin: 0 0;
|
|
2405
|
-
background-color: #f03;
|
|
2406
|
-
position: absolute;
|
|
2407
|
-
bottom: 0;
|
|
2408
|
-
height: .4rem;
|
|
2409
|
-
width: 100%;
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
.padding {
|
|
2413
|
-
position: absolute;
|
|
2414
|
-
bottom: -7.5px;
|
|
2415
|
-
height: 2rem;
|
|
2416
|
-
width: 100%;
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
.thumbnail {
|
|
2420
|
-
display: flex;
|
|
2421
|
-
justify-content: center;
|
|
2422
|
-
|
|
2423
|
-
position: absolute;
|
|
2424
|
-
top: -17.5rem;
|
|
2425
|
-
height: calc(25rem * 9/16);
|
|
2426
|
-
width: 25rem;
|
|
2427
|
-
|
|
2428
|
-
margin-left: -12.5rem;
|
|
2429
|
-
pointer-events: none;
|
|
2430
|
-
|
|
2431
|
-
img {
|
|
2432
|
-
border-radius: .4rem;
|
|
2433
|
-
box-shadow: 0 0 1rem rgba(0, 0, 0, .5);
|
|
2434
|
-
|
|
2435
|
-
width: 100%;
|
|
2436
|
-
height: 100%;
|
|
2437
|
-
object-fit: cover;
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
`, Jn = () => {
|
|
2441
|
-
const e = N.useActorRef(), t = N.useSelector((d) => d.context.media.currentTime), r = N.useSelector((d) => d.context.media.duration), n = N.useSelector((d) => d.context.indexes), o = N.useSelector((d) => d.context.thumbnails), a = Te(Re), s = xe(null), { scrub: c, value: u } = qn({ ref: s }), [h, p] = J(void 0), g = (d) => {
|
|
2442
|
-
const v = d.nativeEvent.offsetX / d.currentTarget.offsetWidth * (r ?? 0);
|
|
2443
|
-
p(v);
|
|
2444
|
-
}, b = () => {
|
|
2445
|
-
s.current && p(void 0);
|
|
2446
|
-
}, T = pe(
|
|
2447
|
-
() => a.downloadedRanges?.map((d, m) => {
|
|
2448
|
-
if (!a.size || !r) return null;
|
|
2449
|
-
const v = n.filter((B) => d.startByteOffset <= B.pos && B.pos <= d.endByteOffset), S = v.at(0), f = v.at(-1);
|
|
2450
|
-
if (!S || !f) return null;
|
|
2451
|
-
const w = S.timestamp / r, C = f.timestamp / r, F = Number((C - w).toFixed(2)), U = w * 100;
|
|
2452
|
-
return /* @__PURE__ */ E("div", { className: "loaded-part", style: { transform: `scaleX(${F})`, marginLeft: `${U}%` } }, m);
|
|
2453
|
-
}) ?? [],
|
|
2454
|
-
[r, n.length, a.downloadedRanges?.map(({ startByteOffset: d, endByteOffset: m }) => `${d}/${m}`).join(",")]
|
|
2455
|
-
), x = pe(() => {
|
|
2456
|
-
if (!h || h < 0) return;
|
|
2457
|
-
const d = Math.floor(h / 3600), m = Math.floor((h - d * 3600) / 60), v = Math.floor(h - d * 3600 - m * 60);
|
|
2458
|
-
return `${d > 0 ? `${d}:` : ""}${m < 10 ? "0" : ""}${m}:${v < 10 ? "0" : ""}${v}`;
|
|
2459
|
-
}, [h]);
|
|
2460
|
-
j(() => {
|
|
2461
|
-
if (!e || u === void 0 || !r) return;
|
|
2462
|
-
const d = u * r;
|
|
2463
|
-
e.send({ type: "SET_TIME", value: d });
|
|
2464
|
-
}, [e, u, r]);
|
|
2465
|
-
const y = pe(() => typeof r != "number" || typeof t != "number" ? 0 : 1 / ((r ?? 0) / (t ?? 0)), [r, t]), l = pe(() => {
|
|
2466
|
-
if (!(!o.length || !h))
|
|
2467
|
-
return o.find(
|
|
2468
|
-
({ timestamp: d, duration: m }) => d <= h && h <= d + m
|
|
2469
|
-
);
|
|
2470
|
-
}, [o.length, h]);
|
|
2471
|
-
return /* @__PURE__ */ $(
|
|
2472
|
-
"div",
|
|
2473
|
-
{
|
|
2474
|
-
css: Kn,
|
|
2475
|
-
ref: s,
|
|
2476
|
-
className: "progress-bar",
|
|
2477
|
-
onMouseMove: g,
|
|
2478
|
-
onMouseOut: b,
|
|
2479
|
-
children: [
|
|
2480
|
-
/* @__PURE__ */ E("div", { className: "background-bar" }),
|
|
2481
|
-
h ? /* @__PURE__ */ E(
|
|
2482
|
-
"div",
|
|
2483
|
-
{
|
|
2484
|
-
className: "cursor-time",
|
|
2485
|
-
style: { left: `clamp(1.8rem, ${1 / ((r ?? 0) / (h ?? 1)) * 100}%, calc(100% - 1.8rem))` },
|
|
2486
|
-
children: x
|
|
2487
|
-
}
|
|
2488
|
-
) : void 0,
|
|
2489
|
-
/* @__PURE__ */ E("div", { className: "progress" }),
|
|
2490
|
-
/* @__PURE__ */ E("div", { className: "loaded", children: T }),
|
|
2491
|
-
/* @__PURE__ */ E("div", { className: "hover" }),
|
|
2492
|
-
/* @__PURE__ */ E("div", { className: "play-container", children: /* @__PURE__ */ E("div", { className: "play", style: { transform: `scaleX(${y})` } }) }),
|
|
2493
|
-
/* @__PURE__ */ E("div", { className: "chapters" }),
|
|
2494
|
-
/* @__PURE__ */ E("div", { className: "scrubber" }),
|
|
2495
|
-
/* @__PURE__ */ E("div", { className: "padding", onMouseDown: c }),
|
|
2496
|
-
/* @__PURE__ */ E(
|
|
2497
|
-
"div",
|
|
2498
|
-
{
|
|
2499
|
-
className: "thumbnail",
|
|
2500
|
-
style: { left: `clamp(12.5rem, ${1 / ((r ?? 0) / (h ?? 1)) * 100}%, calc(100% - 12.5rem))` },
|
|
2501
|
-
children: l ? /* @__PURE__ */ E("img", { src: l.url }) : void 0
|
|
2502
|
-
}
|
|
2503
|
-
)
|
|
2504
|
-
]
|
|
2505
|
-
}
|
|
2506
|
-
);
|
|
2507
|
-
}, Gt = (e) => {
|
|
2508
|
-
if (e === void 0) return "0:00";
|
|
2509
|
-
const t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), n = Math.floor(e % 60);
|
|
2510
|
-
return t > 0 ? `${t}:${r < 10 ? "0" : ""}${r}:${n < 10 ? "0" : ""}${n}` : `${r}:${n < 10 ? "0" : ""}${n}`;
|
|
2511
|
-
}, Zn = (e, t) => `${Gt(e)} / ${Gt(t)}`, Qn = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23fff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20class='icon%20icon-tabler%20icons-tabler-outline%20icon-tabler-picture-in-picture'%3e%3cpath%20stroke='none'%20d='M0%200h24v24H0z'%20fill='none'%20/%3e%3cpath%20d='M11%2019h-6a2%202%200%200%201%20-2%20-2v-10a2%202%200%200%201%202%20-2h14a2%202%200%200%201%202%202v4'%20/%3e%3cpath%20d='M14%2014m0%201a1%201%200%200%201%201%20-1h5a1%201%200%200%201%201%201v3a1%201%200%200%201%20-1%201h-5a1%201%200%200%201%20-1%20-1z'%20/%3e%3c/svg%3e", eo = K`
|
|
2512
|
-
display: flex;
|
|
2513
|
-
align-items: center;
|
|
2514
|
-
justify-content: center;
|
|
2515
|
-
flex-direction: column;
|
|
2516
|
-
width: 100%;
|
|
2517
|
-
|
|
2518
|
-
.playback-slider {
|
|
2519
|
-
display: flex;
|
|
2520
|
-
align-items: center;
|
|
2521
|
-
|
|
2522
|
-
padding: 8px 4px;
|
|
2523
|
-
margin: 0 2px;
|
|
2524
|
-
|
|
2525
|
-
cursor: pointer;
|
|
2526
|
-
|
|
2527
|
-
> div {
|
|
2528
|
-
position: relative;
|
|
2529
|
-
|
|
2530
|
-
background: #ccc;
|
|
2531
|
-
border-radius: 4px;
|
|
2532
|
-
|
|
2533
|
-
width: 120px;
|
|
2534
|
-
height: 3px;
|
|
2535
|
-
@media (min-width: 768px) {
|
|
2536
|
-
height: 4px;
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
|
|
2540
|
-
.playback-handle {
|
|
2541
|
-
position: absolute;
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
background: #ffffff;
|
|
2545
|
-
border-radius: 50%;
|
|
2546
|
-
transform: translateX(-50%);
|
|
2547
|
-
pointer-events: none;
|
|
2548
|
-
|
|
2549
|
-
width: 10px;
|
|
2550
|
-
height: 10px;
|
|
2551
|
-
top: -3.5px;
|
|
2552
|
-
@media (min-width: 768px) {
|
|
2553
|
-
width: 12px;
|
|
2554
|
-
height: 12px;
|
|
2555
|
-
top: -4px;
|
|
2556
|
-
}
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
`, to = () => {
|
|
2560
|
-
const e = N.useSelector((v) => v.context.media.playbackRate), t = N.useActorRef(), r = xe(null), [n, o] = J(!1), a = 0.25, s = 3, c = s - a, u = (v, S = 0.05) => Math.round(v / S) * S, h = u(e || 1), p = (v) => (v - a) / c * 100, g = (v) => {
|
|
2561
|
-
if (!r.current) return h;
|
|
2562
|
-
const S = r.current.getBoundingClientRect(), f = v - S.left, w = Math.max(0, Math.min(f, S.width)) / S.width, C = a + w * c;
|
|
2563
|
-
return u(C);
|
|
2564
|
-
}, b = (v) => {
|
|
2565
|
-
o(!0);
|
|
2566
|
-
const S = g(v.clientX);
|
|
2567
|
-
t.send({ type: "SET_PLAYBACK_RATE", playbackRate: S });
|
|
2568
|
-
}, T = (v) => {
|
|
2569
|
-
if (!n) return;
|
|
2570
|
-
const S = g(v.clientX);
|
|
2571
|
-
t.send({ type: "SET_PLAYBACK_RATE", playbackRate: S });
|
|
2572
|
-
}, x = () => {
|
|
2573
|
-
o(!1);
|
|
2574
|
-
}, y = (v) => {
|
|
2575
|
-
v.preventDefault();
|
|
2576
|
-
const S = 0.05;
|
|
2577
|
-
let f = h;
|
|
2578
|
-
v.deltaY < 0 ? f = Math.min(s, f + S) : f = Math.max(a, f - S), t.send({ type: "SET_PLAYBACK_RATE", playbackRate: f });
|
|
2579
|
-
};
|
|
2580
|
-
j(() => (window.addEventListener("mousemove", T), window.addEventListener("mouseup", x), () => {
|
|
2581
|
-
window.removeEventListener("mousemove", T), window.removeEventListener("mouseup", x);
|
|
2582
|
-
}), [n]), j(() => {
|
|
2583
|
-
const v = r.current;
|
|
2584
|
-
return v && v.addEventListener("wheel", y, { passive: !1 }), () => {
|
|
2585
|
-
v && v.removeEventListener("wheel", y);
|
|
2586
|
-
};
|
|
2587
|
-
}, [e]);
|
|
2588
|
-
const l = p(h);
|
|
2589
|
-
return /* @__PURE__ */ $("div", { css: eo, children: [
|
|
2590
|
-
/* @__PURE__ */ $("div", { children: [
|
|
2591
|
-
h.toFixed(2),
|
|
2592
|
-
"x"
|
|
2593
|
-
] }),
|
|
2594
|
-
/* @__PURE__ */ E(
|
|
2595
|
-
"div",
|
|
2596
|
-
{
|
|
2597
|
-
className: "playback-slider",
|
|
2598
|
-
ref: r,
|
|
2599
|
-
onMouseDown: b,
|
|
2600
|
-
children: /* @__PURE__ */ E(
|
|
2601
|
-
"div",
|
|
2602
|
-
{
|
|
2603
|
-
style: {
|
|
2604
|
-
background: `linear-gradient(to right,
|
|
2605
|
-
#fff 0% ${l}%,
|
|
2606
|
-
#3A3A3A ${l}% 100%
|
|
2607
|
-
)`
|
|
2608
|
-
},
|
|
2609
|
-
children: /* @__PURE__ */ E(
|
|
2610
|
-
"div",
|
|
2611
|
-
{
|
|
2612
|
-
className: "playback-handle",
|
|
2613
|
-
style: {
|
|
2614
|
-
left: `${l}%`
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
)
|
|
2618
|
-
}
|
|
2619
|
-
)
|
|
2620
|
-
}
|
|
2621
|
-
)
|
|
2622
|
-
] });
|
|
2623
|
-
}, ro = K`
|
|
2624
|
-
position: relative;
|
|
2625
|
-
|
|
2626
|
-
.popover {
|
|
2627
|
-
position: absolute;
|
|
2628
|
-
right: 50%;
|
|
2629
|
-
transform: translateX(50%);
|
|
2630
|
-
|
|
2631
|
-
overflow-y: auto;
|
|
2632
|
-
width: 180px;
|
|
2633
|
-
height: 160px;
|
|
2634
|
-
top: -180px;
|
|
2635
|
-
@media (min-width: 768px) {
|
|
2636
|
-
width: 250px;
|
|
2637
|
-
height: 160px;
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
display: flex;
|
|
2641
|
-
flex-direction: column;
|
|
2642
|
-
|
|
2643
|
-
border-radius: 8px;
|
|
2644
|
-
background-color: rgba(28,28,28,0.95);
|
|
2645
|
-
${he.bMedium.regular}
|
|
2646
|
-
|
|
2647
|
-
z-index: 4;
|
|
2648
|
-
|
|
2649
|
-
> div {
|
|
2650
|
-
display: flex;
|
|
2651
|
-
align-items: center;
|
|
2652
|
-
justify-content: space-between;
|
|
2653
|
-
|
|
2654
|
-
color: #fff;
|
|
2655
|
-
outline: none;
|
|
2656
|
-
|
|
2657
|
-
padding: 8px 6px 8px 12px;
|
|
2658
|
-
|
|
2659
|
-
width: 100%;
|
|
2660
|
-
|
|
2661
|
-
:first-of-type {
|
|
2662
|
-
border-radius: 8px 8px 0 0;
|
|
2663
|
-
}
|
|
2664
|
-
:last-of-type {
|
|
2665
|
-
border-radius: 0 0 8px 8px;
|
|
2666
|
-
}
|
|
2667
|
-
:not(&.no-hover) {
|
|
2668
|
-
cursor: pointer;
|
|
2669
|
-
}
|
|
2670
|
-
:not(&.no-hover):hover {
|
|
2671
|
-
background-color: rgba(255,255,255,.1);
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
> div {
|
|
2675
|
-
display: flex;
|
|
2676
|
-
align-items: center;
|
|
2677
|
-
justify-content: center;
|
|
2678
|
-
|
|
2679
|
-
.secondary {
|
|
2680
|
-
color: #eee;
|
|
2681
|
-
${he.bSmall.regular}
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
|
-
}
|
|
2685
|
-
|
|
2686
|
-
.back {
|
|
2687
|
-
display: flex;
|
|
2688
|
-
align-items: center;
|
|
2689
|
-
justify-content: flex-start;
|
|
2690
|
-
border-bottom: 1px solid #4D4D4E;
|
|
2691
|
-
|
|
2692
|
-
svg {
|
|
2693
|
-
transform: translateX(-4px);
|
|
2694
|
-
transition: transform 0.2s ease-in-out;
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2697
|
-
:hover {
|
|
2698
|
-
svg {
|
|
2699
|
-
transform: translateX(-8px);
|
|
2700
|
-
}
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
.playback-rate {
|
|
2706
|
-
.slider {
|
|
2707
|
-
width: 100%;
|
|
2708
|
-
}
|
|
2709
|
-
.options {
|
|
2710
|
-
display: grid;
|
|
2711
|
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
|
2712
|
-
align-items: center;
|
|
2713
|
-
|
|
2714
|
-
padding: 8px 12px;
|
|
2715
|
-
|
|
2716
|
-
> div {
|
|
2717
|
-
display: flex;
|
|
2718
|
-
align-items: center;
|
|
2719
|
-
border-radius: 4px;
|
|
2720
|
-
|
|
2721
|
-
padding: 8px 6px;
|
|
2722
|
-
height: 100%;
|
|
2723
|
-
|
|
2724
|
-
cursor: pointer;
|
|
2725
|
-
:hover {
|
|
2726
|
-
background-color: rgba(255,255,255,.1);
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
|
-
.subtitle {
|
|
2733
|
-
.description {
|
|
2734
|
-
word-break: break-word;
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
`, no = () => {
|
|
2738
|
-
const e = N.useActorRef(), t = N.useSelector((l) => l.context.media.playbackRate), r = N.useSelector((l) => l.context.subtitleStreams), n = N.useSelector((l) => l.context.selectedSubtitleStreamIndex), [o, a] = at("hideMediaStats", "false"), [s, c] = J(!1), [u, h] = J(
|
|
2739
|
-
0
|
|
2740
|
-
/* Default */
|
|
2741
|
-
), p = xe(null), g = () => {
|
|
2742
|
-
c(!s), h(
|
|
2743
|
-
0
|
|
2744
|
-
/* Default */
|
|
2745
|
-
);
|
|
2746
|
-
}, b = (l) => {
|
|
2747
|
-
e.send({ type: "SET_PLAYBACK_RATE", playbackRate: l }), h(
|
|
2748
|
-
0
|
|
2749
|
-
/* Default */
|
|
2750
|
-
);
|
|
2751
|
-
};
|
|
2752
|
-
j(() => {
|
|
2753
|
-
const l = (d) => {
|
|
2754
|
-
s && p.current && !p.current.contains(d.target) && g();
|
|
2755
|
-
};
|
|
2756
|
-
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
2757
|
-
}, [s]);
|
|
2758
|
-
const T = pe(
|
|
2759
|
-
() => r.map(({ header: l }) => ({ streamIndex: l.streamIndex, language: l.parsed.info.Title })),
|
|
2760
|
-
[r.length]
|
|
2761
|
-
), x = (l) => () => {
|
|
2762
|
-
e.send({ type: "SELECT_SUBTITLE_STREAM", streamIndex: l.streamIndex }), g();
|
|
2763
|
-
}, y = (l) => () => {
|
|
2764
|
-
h(l);
|
|
2765
|
-
};
|
|
2766
|
-
return /* @__PURE__ */ $("div", { css: ro, ref: p, children: [
|
|
2767
|
-
/* @__PURE__ */ E(
|
|
2768
|
-
ye,
|
|
2769
|
-
{
|
|
2770
|
-
id: "settings",
|
|
2771
|
-
disabled: s,
|
|
2772
|
-
text: /* @__PURE__ */ E(
|
|
2773
|
-
"button",
|
|
2774
|
-
{
|
|
2775
|
-
className: "settings",
|
|
2776
|
-
type: "button",
|
|
2777
|
-
onClick: g,
|
|
2778
|
-
children: /* @__PURE__ */ E(xr, {})
|
|
2779
|
-
}
|
|
2780
|
-
),
|
|
2781
|
-
toolTipText: /* @__PURE__ */ E("span", { children: "Settings" })
|
|
2782
|
-
}
|
|
2783
|
-
),
|
|
2784
|
-
s && u === 0 && /* @__PURE__ */ $("div", { className: "popover menu", children: [
|
|
2785
|
-
/* @__PURE__ */ $("div", { onClick: y(
|
|
2786
|
-
2
|
|
2787
|
-
/* Advanced */
|
|
2788
|
-
), children: [
|
|
2789
|
-
/* @__PURE__ */ E("span", { children: "Advanced" }),
|
|
2790
|
-
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(pt, {}) })
|
|
2791
|
-
] }),
|
|
2792
|
-
/* @__PURE__ */ $("div", { onClick: y(
|
|
2793
|
-
4
|
|
2794
|
-
/* Subtitles */
|
|
2795
|
-
), children: [
|
|
2796
|
-
/* @__PURE__ */ E("div", { children: "Subtitles" }),
|
|
2797
|
-
/* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(pt, {}) })
|
|
2798
|
-
] }),
|
|
2799
|
-
/* @__PURE__ */ $("div", { onClick: y(
|
|
2800
|
-
1
|
|
2801
|
-
/* PlaybackRate */
|
|
2802
|
-
), children: [
|
|
2803
|
-
/* @__PURE__ */ E("div", { children: "Playback speed" }),
|
|
2804
|
-
/* @__PURE__ */ $("div", { children: [
|
|
2805
|
-
/* @__PURE__ */ E("span", { className: "secondary", children: t === 1 ? "(Default)" : t.toFixed(2) }),
|
|
2806
|
-
/* @__PURE__ */ E(pt, {})
|
|
2807
|
-
] })
|
|
2808
|
-
] })
|
|
2809
|
-
] }),
|
|
2810
|
-
s && u === 1 && /* @__PURE__ */ $("div", { className: "popover playback-rate", children: [
|
|
2811
|
-
/* @__PURE__ */ $("div", { className: "back", onClick: y(
|
|
2812
|
-
0
|
|
2813
|
-
/* Default */
|
|
2814
|
-
), children: [
|
|
2815
|
-
/* @__PURE__ */ E(Ke, {}),
|
|
2816
|
-
/* @__PURE__ */ E("span", { children: "Plackback speed" })
|
|
2817
|
-
] }),
|
|
2818
|
-
/* @__PURE__ */ E("div", { className: "slider no-hover", children: /* @__PURE__ */ E(to, {}) }),
|
|
2819
|
-
/* @__PURE__ */ $("div", { className: "options no-hover", children: [
|
|
2820
|
-
/* @__PURE__ */ E("div", { onClick: () => b(0.5), children: "0.5x" }),
|
|
2821
|
-
/* @__PURE__ */ E("div", { onClick: () => b(1), children: "1x" }),
|
|
2822
|
-
/* @__PURE__ */ E("div", { onClick: () => b(1.5), children: "1.5x" }),
|
|
2823
|
-
/* @__PURE__ */ E("div", { onClick: () => b(2), children: "2x" })
|
|
2824
|
-
] })
|
|
2825
|
-
] }),
|
|
2826
|
-
s && u === 2 && /* @__PURE__ */ $("div", { className: "popover advanced", children: [
|
|
2827
|
-
/* @__PURE__ */ $("div", { className: "back", onClick: y(
|
|
2828
|
-
0
|
|
2829
|
-
/* Default */
|
|
2830
|
-
), children: [
|
|
2831
|
-
/* @__PURE__ */ E(Ke, {}),
|
|
2832
|
-
/* @__PURE__ */ E("span", { children: "Advanced" })
|
|
2833
|
-
] }),
|
|
2834
|
-
/* @__PURE__ */ $("div", { onClick: () => a(o === "true" ? "false" : "true"), children: [
|
|
2835
|
-
/* @__PURE__ */ E("span", { children: "Hide stats" }),
|
|
2836
|
-
/* @__PURE__ */ E("span", { children: o === "true" ? "✓" : "" })
|
|
2837
|
-
] })
|
|
2838
|
-
] }),
|
|
2839
|
-
s && u === 3 && /* @__PURE__ */ E("div", { className: "popover sources", children: /* @__PURE__ */ $("div", { className: "back", onClick: y(
|
|
2840
|
-
0
|
|
2841
|
-
/* Default */
|
|
2842
|
-
), children: [
|
|
2843
|
-
/* @__PURE__ */ E(Ke, {}),
|
|
2844
|
-
/* @__PURE__ */ E("span", { children: "Select new sources" })
|
|
2845
|
-
] }) }),
|
|
2846
|
-
s && u === 4 && /* @__PURE__ */ $("div", { className: "popover subtitle", children: [
|
|
2847
|
-
/* @__PURE__ */ $("div", { className: "back", onClick: y(
|
|
2848
|
-
0
|
|
2849
|
-
/* Default */
|
|
2850
|
-
), children: [
|
|
2851
|
-
/* @__PURE__ */ E(Ke, {}),
|
|
2852
|
-
/* @__PURE__ */ E("span", { children: "Subtitles" })
|
|
2853
|
-
] }),
|
|
2854
|
-
/* @__PURE__ */ $("div", { onClick: x({ streamIndex: void 0 }), children: [
|
|
2855
|
-
/* @__PURE__ */ E("span", { children: "Disable" }),
|
|
2856
|
-
/* @__PURE__ */ E("span", { children: n === void 0 ? "✓" : "" })
|
|
2857
|
-
] }),
|
|
2858
|
-
T.map((l) => /* @__PURE__ */ $(
|
|
2859
|
-
"div",
|
|
2860
|
-
{
|
|
2861
|
-
onClick: x(l),
|
|
2862
|
-
className: "description",
|
|
2863
|
-
children: [
|
|
2864
|
-
/* @__PURE__ */ E("span", { children: l.language }),
|
|
2865
|
-
/* @__PURE__ */ E("span", { children: n === l.streamIndex ? "✓" : "" })
|
|
2866
|
-
]
|
|
2867
|
-
},
|
|
2868
|
-
l.streamIndex
|
|
2869
|
-
))
|
|
2870
|
-
] })
|
|
2871
|
-
] });
|
|
2872
|
-
}, oo = {
|
|
2873
|
-
hover: "rgba(255, 255, 255, 0.13)"
|
|
2874
|
-
}, io = K`
|
|
2875
|
-
display: flex;
|
|
2876
|
-
align-items: center;
|
|
2877
|
-
|
|
2878
|
-
padding: 16px 4px;
|
|
2879
|
-
margin: 0 2px;
|
|
2880
|
-
|
|
2881
|
-
cursor: pointer;
|
|
2882
|
-
|
|
2883
|
-
> div {
|
|
2884
|
-
position: relative;
|
|
2885
|
-
|
|
2886
|
-
background: #ccc;
|
|
2887
|
-
border-radius: 4px;
|
|
2888
|
-
|
|
2889
|
-
width: 80px;
|
|
2890
|
-
height: 3px;
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
.volume-handle {
|
|
2894
|
-
position: absolute;
|
|
2895
|
-
top: -3.5px;
|
|
2896
|
-
|
|
2897
|
-
background: #ffffff;
|
|
2898
|
-
border-radius: 50%;
|
|
2899
|
-
transform: translateX(-50%);
|
|
2900
|
-
pointer-events: none;
|
|
2901
|
-
|
|
2902
|
-
width: 10px;
|
|
2903
|
-
height: 10px;
|
|
2904
|
-
}
|
|
2905
|
-
`, ao = ({ value: e, onChange: t }) => {
|
|
2906
|
-
const r = N.useSelector((l) => l.context.media.volume), n = N.useSelector((l) => l.context.media.muted), o = xe(null), [a, s] = J(!1), c = (l) => {
|
|
2907
|
-
if (!o.current) return e;
|
|
2908
|
-
const d = o.current.getBoundingClientRect(), m = l - d.left;
|
|
2909
|
-
return Math.max(0, Math.min(m, d.width)) / d.width;
|
|
2910
|
-
}, u = (l) => {
|
|
2911
|
-
s(!0);
|
|
2912
|
-
const d = c(l.clientX);
|
|
2913
|
-
t(d);
|
|
2914
|
-
}, h = (l) => {
|
|
2915
|
-
if (!a) return;
|
|
2916
|
-
const d = c(l.clientX);
|
|
2917
|
-
t(d);
|
|
2918
|
-
}, p = () => {
|
|
2919
|
-
s(!1);
|
|
2920
|
-
}, g = (l) => {
|
|
2921
|
-
l.preventDefault();
|
|
2922
|
-
const d = 0.05;
|
|
2923
|
-
let m = e;
|
|
2924
|
-
l.deltaY < 0 ? m = Math.min(1, m + d) : m = Math.max(0, m - d), t(m);
|
|
2925
|
-
};
|
|
2926
|
-
j(() => (window.addEventListener("mousemove", h), window.addEventListener("mouseup", p), () => {
|
|
2927
|
-
window.removeEventListener("mousemove", h), window.removeEventListener("mouseup", p);
|
|
2928
|
-
}), [a]), j(() => {
|
|
2929
|
-
const l = o.current;
|
|
2930
|
-
return l && l.addEventListener("wheel", g, { passive: !1 }), () => {
|
|
2931
|
-
l && l.removeEventListener("wheel", g);
|
|
2932
|
-
};
|
|
2933
|
-
}, [e]);
|
|
2934
|
-
const b = e * 100, T = "#fff", x = "#3A3A3A", y = pe(
|
|
2935
|
-
() => Math.round(n ? 0 : wt(r) * 100),
|
|
2936
|
-
[r]
|
|
2937
|
-
);
|
|
2938
|
-
return /* @__PURE__ */ E(
|
|
2939
|
-
ye,
|
|
2940
|
-
{
|
|
2941
|
-
id: "volume-slider",
|
|
2942
|
-
text: /* @__PURE__ */ E(
|
|
2943
|
-
"div",
|
|
2944
|
-
{
|
|
2945
|
-
ref: o,
|
|
2946
|
-
css: io,
|
|
2947
|
-
onMouseDown: u,
|
|
2948
|
-
children: /* @__PURE__ */ E(
|
|
2949
|
-
"div",
|
|
2950
|
-
{
|
|
2951
|
-
style: {
|
|
2952
|
-
background: `linear-gradient(to right,
|
|
2953
|
-
${T} 0% ${b}%,
|
|
2954
|
-
${x} ${b}% 100%
|
|
2955
|
-
)`
|
|
2956
|
-
},
|
|
2957
|
-
children: /* @__PURE__ */ E(
|
|
2958
|
-
"div",
|
|
2959
|
-
{
|
|
2960
|
-
className: "volume-handle",
|
|
2961
|
-
style: {
|
|
2962
|
-
left: `${e * 100}%`
|
|
2963
|
-
}
|
|
2964
|
-
}
|
|
2965
|
-
)
|
|
2966
|
-
}
|
|
2967
|
-
)
|
|
2968
|
-
}
|
|
2969
|
-
),
|
|
2970
|
-
toolTipText: /* @__PURE__ */ $("div", { className: "volume-value", children: [
|
|
2971
|
-
y,
|
|
2972
|
-
"%"
|
|
2973
|
-
] })
|
|
2974
|
-
}
|
|
2975
|
-
);
|
|
2976
|
-
}, so = K`
|
|
2977
|
-
position: relative;
|
|
2978
|
-
display: flex;
|
|
2979
|
-
align-items: center;
|
|
2980
|
-
|
|
2981
|
-
.volume-slider-container {
|
|
2982
|
-
display: flex;
|
|
2983
|
-
align-items: center;
|
|
2984
|
-
|
|
2985
|
-
width: 0;
|
|
2986
|
-
margin-right: 0;
|
|
2987
|
-
overflow: hidden;
|
|
2988
|
-
pointer-events: none;
|
|
2989
|
-
|
|
2990
|
-
transition: margin .2s cubic-bezier(0.4,0,1,1), width .2s cubic-bezier(0.4,0,1,1);
|
|
2991
|
-
-webkit-transition: margin .2s cubic-bezier(0.4,0,1,1), width .2s cubic-bezier(0.4,0,1,1);
|
|
2992
|
-
|
|
2993
|
-
.volume-slider-background {
|
|
2994
|
-
display: flex;
|
|
2995
|
-
flex-direction: row;
|
|
2996
|
-
align-items: center;
|
|
2997
|
-
|
|
2998
|
-
border-radius: 4px;
|
|
2999
|
-
|
|
3000
|
-
.volume-value {
|
|
3001
|
-
${he.bMedium.regular};
|
|
3002
|
-
color: #ffffff;
|
|
3003
|
-
}
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
&:hover .volume-slider-container {
|
|
3008
|
-
width: 9rem;
|
|
3009
|
-
|
|
3010
|
-
transition: margin .2s cubic-bezier(0,0,0.2,1), width .2s cubic-bezier(0,0,0.2,1);
|
|
3011
|
-
-webkit-transition: margin .2s cubic-bezier(0,0,0.2,1), width .2s cubic-bezier(0,0,0.2,1);
|
|
3012
|
-
|
|
3013
|
-
pointer-events: auto;
|
|
3014
|
-
}
|
|
3015
|
-
`, co = ({ ref: e }) => {
|
|
3016
|
-
const t = N.useActorRef(), r = N.useSelector((s) => s.context.media.volume), n = N.useSelector((s) => s.context.media.muted), o = pe(() => wt(r), [r]), a = (s, c) => t.send({
|
|
3017
|
-
type: "SET_VOLUME",
|
|
3018
|
-
muted: c,
|
|
3019
|
-
volume: fr(s)
|
|
3020
|
-
});
|
|
3021
|
-
return /* @__PURE__ */ $("div", { css: so, children: [
|
|
3022
|
-
/* @__PURE__ */ E(
|
|
3023
|
-
ye,
|
|
3024
|
-
{
|
|
3025
|
-
id: "sound",
|
|
3026
|
-
text: /* @__PURE__ */ E(
|
|
3027
|
-
"button",
|
|
3028
|
-
{
|
|
3029
|
-
className: "sound",
|
|
3030
|
-
type: "button",
|
|
3031
|
-
onClick: () => a(o, !n),
|
|
3032
|
-
ref: e,
|
|
3033
|
-
children: n || r === 0 ? /* @__PURE__ */ E(Sr, { size: 18, color: "#fff" }) : r <= 0.5 ? /* @__PURE__ */ E(Tr, { size: 18, color: "#fff" }) : /* @__PURE__ */ E(wr, { size: 18, color: "#fff" })
|
|
3034
|
-
}
|
|
3035
|
-
),
|
|
3036
|
-
toolTipText: /* @__PURE__ */ E("span", { children: n ? "Unmute (m)" : "Mute (m)" })
|
|
3037
|
-
}
|
|
3038
|
-
),
|
|
3039
|
-
/* @__PURE__ */ E("div", { className: "volume-slider-container", children: /* @__PURE__ */ E("div", { className: "volume-slider-background", children: /* @__PURE__ */ E(
|
|
3040
|
-
ao,
|
|
3041
|
-
{
|
|
3042
|
-
value: n ? 0 : o,
|
|
3043
|
-
onChange: (s) => a(s, !1)
|
|
3044
|
-
}
|
|
3045
|
-
) }) })
|
|
3046
|
-
] });
|
|
3047
|
-
}, lo = K`
|
|
3048
|
-
position: absolute;
|
|
3049
|
-
bottom: 0;
|
|
3050
|
-
width: 100%;
|
|
3051
|
-
|
|
3052
|
-
background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.45) 20%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.15) 70%, transparent 100%);
|
|
3053
|
-
transition: opacity 0.1s cubic-bezier(.4,0,1,1);
|
|
3054
|
-
|
|
3055
|
-
.actions {
|
|
3056
|
-
display: flex;
|
|
3057
|
-
justify-content: space-between;
|
|
3058
|
-
|
|
3059
|
-
padding: 6px 12px;
|
|
3060
|
-
@media (min-width: 768px) {
|
|
3061
|
-
padding: 8px 16px;
|
|
3062
|
-
}
|
|
3063
|
-
@media (min-width: 2560px) {
|
|
3064
|
-
padding: 8px 24px;
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
|
-
.left, .right {
|
|
3068
|
-
display: flex;
|
|
3069
|
-
align-items: center;
|
|
3070
|
-
|
|
3071
|
-
button {
|
|
3072
|
-
display: flex;
|
|
3073
|
-
align-items: center;
|
|
3074
|
-
|
|
3075
|
-
outline: none;
|
|
3076
|
-
border: none;
|
|
3077
|
-
background: none;
|
|
3078
|
-
|
|
3079
|
-
svg {
|
|
3080
|
-
width: 18px;
|
|
3081
|
-
height: 18px;
|
|
3082
|
-
@media (min-width: 768px) {
|
|
3083
|
-
width: 24px;
|
|
3084
|
-
height: 24px;
|
|
3085
|
-
}
|
|
3086
|
-
@media (min-width: 2560px) {
|
|
3087
|
-
width: 28px;
|
|
3088
|
-
height: 28px;
|
|
3089
|
-
}
|
|
3090
|
-
}
|
|
3091
|
-
|
|
3092
|
-
svg {
|
|
3093
|
-
stroke: #fff;
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
|
|
3097
|
-
// Add basic styling for all the actions
|
|
3098
|
-
.play, .sound, .time, .settings, .picture-in-picture, .full-screen {
|
|
3099
|
-
display: flex;
|
|
3100
|
-
align-items: center;
|
|
3101
|
-
|
|
3102
|
-
height: 100%;
|
|
3103
|
-
|
|
3104
|
-
border-radius: 4px;
|
|
3105
|
-
user-select: none;
|
|
3106
|
-
|
|
3107
|
-
padding: 8px;
|
|
3108
|
-
@media (min-width: 768px) {
|
|
3109
|
-
padding: 8px 12px;
|
|
3110
|
-
}
|
|
3111
|
-
@media (min-width: 2560px) {
|
|
3112
|
-
padding: 8px 12px;
|
|
3113
|
-
}
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
// Add styling to the actions that have some interactivity
|
|
3117
|
-
.play, .sound, .settings, .picture-in-picture, .full-screen {
|
|
3118
|
-
border-radius: 4px;
|
|
3119
|
-
|
|
3120
|
-
padding: 8px;
|
|
3121
|
-
@media (min-width: 768px) {
|
|
3122
|
-
padding: 8px 12px;
|
|
3123
|
-
}
|
|
3124
|
-
@media (min-width: 2560px) {
|
|
3125
|
-
padding: 8px 12px;
|
|
3126
|
-
}
|
|
3127
|
-
|
|
3128
|
-
cursor: pointer;
|
|
3129
|
-
|
|
3130
|
-
:hover {
|
|
3131
|
-
background-color: ${oo.hover};
|
|
3132
|
-
}
|
|
3133
|
-
}
|
|
3134
|
-
}
|
|
3135
|
-
|
|
3136
|
-
.left {
|
|
3137
|
-
.time {
|
|
3138
|
-
${he.bMedium.regular}
|
|
3139
|
-
text-shadow: 0 0 4px rgba(0, 0, 0, 1);
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
.right {
|
|
3143
|
-
.picture-in-picture {
|
|
3144
|
-
img {
|
|
3145
|
-
width: 22px;
|
|
3146
|
-
height: 22px;
|
|
3147
|
-
@media (min-width: 768px) {
|
|
3148
|
-
width: 28px;
|
|
3149
|
-
height: 28px;
|
|
3150
|
-
}
|
|
3151
|
-
@media (min-width: 2560px) {
|
|
3152
|
-
width: 32px;
|
|
3153
|
-
height: 32px;
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
}
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
`, uo = ({ mediaInformation: e, containerRef: t }) => {
|
|
3160
|
-
const r = N.useActorRef(), n = Te(Re), o = N.useSelector((m) => m.context.media.paused), a = N.useSelector((m) => m.context.media.volume), s = N.useSelector((m) => m.context.media.muted), c = N.useSelector((m) => m.context.media.currentTime), u = N.useSelector((m) => m.context.media.duration), [h, p] = J(), [g, b] = at("hideMediaStats", "false"), [T, x] = J(!1);
|
|
3161
|
-
j(() => {
|
|
3162
|
-
const m = () => {
|
|
3163
|
-
x(!!document.fullscreenElement);
|
|
3164
|
-
};
|
|
3165
|
-
return document.addEventListener("fullscreenchange", m), () => {
|
|
3166
|
-
document.removeEventListener("fullscreenchange", m);
|
|
3167
|
-
};
|
|
3168
|
-
}, []);
|
|
3169
|
-
const y = () => {
|
|
3170
|
-
document.fullscreenElement ? document.exitFullscreen() : t.current && t.current.requestFullscreen();
|
|
3171
|
-
}, l = ot(({ direction: m, stepSize: v }) => {
|
|
3172
|
-
if (!r) return;
|
|
3173
|
-
const S = wt(a), f = m === "up" ? v : -v, w = Math.max(0, Math.min(1, S + f)), C = fr(w);
|
|
3174
|
-
r.send({
|
|
3175
|
-
type: "SET_VOLUME",
|
|
3176
|
-
muted: s,
|
|
3177
|
-
volume: C
|
|
3178
|
-
});
|
|
3179
|
-
}, [r.id, s, a]);
|
|
3180
|
-
j(() => {
|
|
3181
|
-
const m = (v) => {
|
|
3182
|
-
let S = !0;
|
|
3183
|
-
if (v.key === "f") y();
|
|
3184
|
-
else if (v.key === "k") nt(r, o, u, c);
|
|
3185
|
-
else if (v.key === " ") nt(r, o, u, c);
|
|
3186
|
-
else if (v.key === "m")
|
|
3187
|
-
r.send({ type: "SET_VOLUME", muted: !s, volume: a });
|
|
3188
|
-
else if (v.key === "ArrowUp")
|
|
3189
|
-
l({ direction: "up", stepSize: 0.05 });
|
|
3190
|
-
else if (v.key === "ArrowDown")
|
|
3191
|
-
l({ direction: "down", stepSize: 0.05 });
|
|
3192
|
-
else if (v.key === "ArrowRight") {
|
|
3193
|
-
if (!u) return;
|
|
3194
|
-
c + 5 >= u ? r.send({ type: "SET_TIME", value: u }) : r.send({ type: "SET_TIME", value: c + 5 });
|
|
3195
|
-
} else v.key === "ArrowLeft" ? c - 5 < 0 ? r.send({ type: "SET_TIME", value: 0 }) : r.send({ type: "SET_TIME", value: c - 5 }) : S = !1;
|
|
3196
|
-
S && v.preventDefault();
|
|
3197
|
-
};
|
|
3198
|
-
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
3199
|
-
}, [r, a, s, o, c, u]);
|
|
3200
|
-
const d = ot((m) => {
|
|
3201
|
-
m.preventDefault(), m.deltaY < 0 ? l({ direction: "up", stepSize: 0.05 }) : l({ direction: "down", stepSize: 0.05 });
|
|
3202
|
-
}, [l]);
|
|
3203
|
-
return j(() => {
|
|
3204
|
-
if (h)
|
|
3205
|
-
return h.addEventListener("wheel", d, { passive: !1 }), () => h.removeEventListener("wheel", d);
|
|
3206
|
-
}, [h, l]), /* @__PURE__ */ $("div", { css: lo, style: { ...n.hideUI ? { opacity: "0", pointerEvents: "none" } : {} }, children: [
|
|
3207
|
-
/* @__PURE__ */ E(Jn, {}),
|
|
3208
|
-
/* @__PURE__ */ $("div", { className: "actions", children: [
|
|
3209
|
-
/* @__PURE__ */ $("div", { className: "left", children: [
|
|
3210
|
-
/* @__PURE__ */ E(
|
|
3211
|
-
ye,
|
|
3212
|
-
{
|
|
3213
|
-
id: "play",
|
|
3214
|
-
tooltipPlace: "top-start",
|
|
3215
|
-
text: /* @__PURE__ */ E(
|
|
3216
|
-
"button",
|
|
3217
|
-
{
|
|
3218
|
-
className: "play",
|
|
3219
|
-
type: "button",
|
|
3220
|
-
onClick: () => nt(r, o, u, c),
|
|
3221
|
-
children: u === c ? /* @__PURE__ */ E(Rr, {}) : o ? /* @__PURE__ */ E(Ar, {}) : /* @__PURE__ */ E(_r, {})
|
|
3222
|
-
}
|
|
3223
|
-
),
|
|
3224
|
-
toolTipText: /* @__PURE__ */ E("span", { children: u === c ? "Replay (k)" : o ? "Play (k)" : "Pause (k)" })
|
|
3225
|
-
}
|
|
3226
|
-
),
|
|
3227
|
-
/* @__PURE__ */ E(co, { ref: p }),
|
|
3228
|
-
/* @__PURE__ */ E("div", { className: "time", children: Zn(c, u) })
|
|
3229
|
-
] }),
|
|
3230
|
-
/* @__PURE__ */ $("div", { className: "right", children: [
|
|
3231
|
-
g !== "true" ? e : null,
|
|
3232
|
-
/* @__PURE__ */ E(no, {}),
|
|
3233
|
-
/* @__PURE__ */ E(
|
|
3234
|
-
ye,
|
|
3235
|
-
{
|
|
3236
|
-
id: "picture-in-picture",
|
|
3237
|
-
text: /* @__PURE__ */ E(
|
|
3238
|
-
"button",
|
|
3239
|
-
{
|
|
3240
|
-
className: "picture-in-picture",
|
|
3241
|
-
type: "button",
|
|
3242
|
-
children: /* @__PURE__ */ E("img", { src: Qn })
|
|
3243
|
-
}
|
|
3244
|
-
),
|
|
3245
|
-
toolTipText: /* @__PURE__ */ E("span", { children: "Picture in picture" })
|
|
3246
|
-
}
|
|
3247
|
-
),
|
|
3248
|
-
/* @__PURE__ */ E(
|
|
3249
|
-
ye,
|
|
3250
|
-
{
|
|
3251
|
-
id: "full-screen",
|
|
3252
|
-
tooltipPlace: "top-end",
|
|
3253
|
-
text: /* @__PURE__ */ E(
|
|
3254
|
-
"button",
|
|
3255
|
-
{
|
|
3256
|
-
className: "full-screen",
|
|
3257
|
-
type: "button",
|
|
3258
|
-
onClick: y,
|
|
3259
|
-
children: T ? /* @__PURE__ */ E(Cr, {}) : /* @__PURE__ */ E(Pr, {})
|
|
3260
|
-
}
|
|
3261
|
-
),
|
|
3262
|
-
toolTipText: /* @__PURE__ */ E("span", { children: T ? "Exit full screen (f)" : "Full screen (f)" })
|
|
3263
|
-
}
|
|
3264
|
-
)
|
|
3265
|
-
] })
|
|
3266
|
-
] })
|
|
3267
|
-
] });
|
|
3268
|
-
}, fo = K`
|
|
3269
|
-
position: relative;
|
|
3270
|
-
background-color: black;
|
|
3271
|
-
display: flex;
|
|
3272
|
-
justify-content: center;
|
|
3273
|
-
align-items: center;
|
|
3274
|
-
height: 100%;
|
|
3275
|
-
width: 100%;
|
|
3276
|
-
|
|
3277
|
-
& > div:not(:last-of-type) {
|
|
3278
|
-
position: absolute;
|
|
3279
|
-
z-index: 2;
|
|
3280
|
-
}
|
|
3281
|
-
|
|
3282
|
-
canvas {
|
|
3283
|
-
height: 100%;
|
|
3284
|
-
width: 100%;
|
|
3285
|
-
pointer-events: none;
|
|
3286
|
-
position: absolute;
|
|
3287
|
-
z-index: 1;
|
|
3288
|
-
}
|
|
3289
|
-
|
|
3290
|
-
.video, video {
|
|
3291
|
-
height: 100%;
|
|
3292
|
-
width: 100%;
|
|
3293
|
-
background-color: black;
|
|
3294
|
-
object-fit: contain;
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
|
-
&.hide {
|
|
3298
|
-
cursor: none;
|
|
3299
|
-
}
|
|
3300
|
-
`, mo = ({ children: e, mediaInformation: t, loadingInformation: r }) => {
|
|
3301
|
-
const n = N.useActorRef(), o = Te(Re), a = N.useSelector((b) => b.context.media.paused), s = N.useSelector((b) => b.context.media.currentTime), c = N.useSelector((b) => b.context.media.duration), u = xe(), h = xe(null);
|
|
3302
|
-
return /* @__PURE__ */ $(
|
|
3303
|
-
"div",
|
|
3304
|
-
{
|
|
3305
|
-
css: fo,
|
|
3306
|
-
ref: h,
|
|
3307
|
-
onMouseMove: (b) => {
|
|
3308
|
-
o.update({ ...o, hideUI: !1 }), u.current && clearInterval(u.current);
|
|
3309
|
-
const T = setTimeout(() => {
|
|
3310
|
-
o.update({ ...o, hideUI: !0 });
|
|
3311
|
-
}, 3e3);
|
|
3312
|
-
u.current = T;
|
|
3313
|
-
},
|
|
3314
|
-
onMouseOut: (b) => {
|
|
3315
|
-
b.currentTarget.parentElement !== b.relatedTarget && b.relatedTarget !== null || o.update({ ...o, hideUI: !0 });
|
|
3316
|
-
},
|
|
3317
|
-
className: o.hideUI ? "hide" : "",
|
|
3318
|
-
children: [
|
|
3319
|
-
/* @__PURE__ */ E(Gn, { loadingInformation: r }),
|
|
3320
|
-
/* @__PURE__ */ E(uo, { mediaInformation: t, containerRef: h }),
|
|
3321
|
-
/* @__PURE__ */ E(
|
|
3322
|
-
"div",
|
|
3323
|
-
{
|
|
3324
|
-
className: "video",
|
|
3325
|
-
onClick: () => nt(n, a, c, s),
|
|
3326
|
-
children: e
|
|
3327
|
-
}
|
|
3328
|
-
)
|
|
3329
|
-
]
|
|
3330
|
-
}
|
|
3331
|
-
);
|
|
3332
|
-
}, po = 25e5, ho = K`
|
|
3333
|
-
display: flex;
|
|
3334
|
-
justify-content: center;
|
|
3335
|
-
background-color: #111;
|
|
3336
|
-
height: 100%;
|
|
3337
|
-
width: 100%;
|
|
3338
|
-
overflow: hidden;
|
|
3339
|
-
`, vo = ({ options: e, videoElement: t, children: r }) => {
|
|
3340
|
-
const n = Te(Re), o = N.useActorRef(), a = N.useSelector((l) => l.value), s = N.useSelector((l) => l.context.media.volume), c = N.useSelector((l) => l.context.media.muted), u = N.useSelector((l) => l.context.isReady), h = N.useSelector((l) => l.context.media.duration), [p, g] = at("mediaVolume", "1"), [b, T] = at("mediaMute", "false"), [x, y] = J(!0);
|
|
3341
|
-
return j(() => {
|
|
3342
|
-
o.send({
|
|
3343
|
-
type: "MEDIA_SOURCE_OPTIONS",
|
|
3344
|
-
mediaSourceOptions: {}
|
|
3345
|
-
});
|
|
3346
|
-
}, []), j(() => {
|
|
3347
|
-
!e.autoplay || h === void 0 || o.send({ type: "PLAY" });
|
|
3348
|
-
}, [h, e.autoplay]), j(
|
|
3349
|
-
() => {
|
|
3350
|
-
!o || !u || !n.downloadedRanges || o.send({
|
|
3351
|
-
type: "DOWNLOADED_RANGES_UPDATED",
|
|
3352
|
-
downloadedRanges: n.downloadedRanges
|
|
3353
|
-
});
|
|
3354
|
-
},
|
|
3355
|
-
[
|
|
3356
|
-
o,
|
|
3357
|
-
u,
|
|
3358
|
-
(n.downloadedRanges?.map((l) => `${l.startByteOffset}-${l.endByteOffset}`) ?? []).join(",")
|
|
3359
|
-
]
|
|
3360
|
-
), j(() => {
|
|
3361
|
-
const { size: l, read: d, publicPath: m, libavWorkerUrl: v, jassubWasmUrl: S } = e;
|
|
3362
|
-
!d || !l || !m || !v || !S || o.send({
|
|
3363
|
-
type: "REMUXER_OPTIONS",
|
|
3364
|
-
remuxerOptions: {
|
|
3365
|
-
publicPath: m,
|
|
3366
|
-
workerUrl: v,
|
|
3367
|
-
bufferSize: e.bufferSize ?? po,
|
|
3368
|
-
length: l,
|
|
3369
|
-
read: d
|
|
3370
|
-
}
|
|
3371
|
-
});
|
|
3372
|
-
}, [e.read, e.size, e.publicPath, e.libavWorkerUrl, e.bufferSize]), j(() => {
|
|
3373
|
-
const { jassubWorkerUrl: l, jassubWasmUrl: d, jassubModernWasmUrl: m } = e;
|
|
3374
|
-
!l || !d || !m || o.send({
|
|
3375
|
-
type: "SUBTITLES_RENDERER_OPTIONS",
|
|
3376
|
-
subtitlesRendererOptions: {
|
|
3377
|
-
workerUrl: l,
|
|
3378
|
-
wasmUrl: d,
|
|
3379
|
-
modernWasmUrl: m
|
|
3380
|
-
}
|
|
3381
|
-
});
|
|
3382
|
-
}, [e.publicPath, e.jassubWorkerUrl, e.jassubWasmUrl]), j(() => {
|
|
3383
|
-
t && o.send({
|
|
3384
|
-
type: "SET_VIDEO_ELEMENT",
|
|
3385
|
-
videoElement: t
|
|
3386
|
-
});
|
|
3387
|
-
}, [t]), j(() => {
|
|
3388
|
-
u && (x ? (o.send({
|
|
3389
|
-
type: "SET_VOLUME",
|
|
3390
|
-
muted: b === "true",
|
|
3391
|
-
volume: isNaN(Number(p)) ? 1 : Number(p)
|
|
3392
|
-
}), y(!1)) : (g(s.toString()), T(c ? "true" : "false")));
|
|
3393
|
-
}, [u, s, c, x]), j(() => {
|
|
3394
|
-
if (a === "OK")
|
|
3395
|
-
return () => {
|
|
3396
|
-
o.send({ type: "DESTROY" });
|
|
3397
|
-
};
|
|
3398
|
-
}, [a]), /* @__PURE__ */ E("div", { css: ho, children: /* @__PURE__ */ E(mo, { mediaInformation: e.mediaInformation, loadingInformation: e.loadingInformation, children: r }) });
|
|
3399
|
-
}, _o = ({ ref: e, ...t }) => {
|
|
3400
|
-
const r = (u) => o({ ...u, update: r }), [n, o] = J({ update: r }), [a, s] = J(), c = ot((u) => {
|
|
3401
|
-
typeof e == "function" ? e(u) : e && "current" in e && (e.current = u), s(u ?? void 0);
|
|
3402
|
-
}, []);
|
|
3403
|
-
return j(() => {
|
|
3404
|
-
o((u) => ({
|
|
3405
|
-
...u,
|
|
3406
|
-
videoElement: a,
|
|
3407
|
-
title: t?.title,
|
|
3408
|
-
size: t?.size,
|
|
3409
|
-
downloadedRanges: t?.downloadedRanges
|
|
3410
|
-
}));
|
|
3411
|
-
}, [a, t?.title, t?.size, t?.downloadedRanges]), /* @__PURE__ */ E(Re.Provider, { value: n, children: /* @__PURE__ */ E(N.Provider, { children: /* @__PURE__ */ E(vo, { options: t, videoElement: a, children: /* @__PURE__ */ E("video", { ref: c, controls: !1 }) }) }) });
|
|
3412
|
-
};
|
|
3413
|
-
export {
|
|
3414
|
-
vo as FKNVideoRoot,
|
|
3415
|
-
_o as default
|
|
3416
|
-
};
|