@devix-technologies/react-gjirafa-vp-player 1.0.20 → 1.0.22
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as le from "react";
|
|
2
2
|
import wt, { forwardRef as kt, useContext as st, useState as ne, useEffect as we, useRef as de, useMemo as ct, createContext as Et, useCallback as Ge } from "react";
|
|
3
|
-
var
|
|
3
|
+
var Ie = { exports: {} }, ve = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -48,20 +48,20 @@ function _t() {
|
|
|
48
48
|
function e(s) {
|
|
49
49
|
if (s == null) return null;
|
|
50
50
|
if (typeof s == "function")
|
|
51
|
-
return s.$$typeof ===
|
|
51
|
+
return s.$$typeof === P ? null : s.displayName || s.name || null;
|
|
52
52
|
if (typeof s == "string") return s;
|
|
53
53
|
switch (s) {
|
|
54
54
|
case d:
|
|
55
55
|
return "Fragment";
|
|
56
56
|
case v:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case m:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case O:
|
|
61
|
-
return "Suspense";
|
|
62
60
|
case j:
|
|
61
|
+
return "Suspense";
|
|
62
|
+
case $:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case V:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof s == "object")
|
|
@@ -70,14 +70,14 @@ function _t() {
|
|
|
70
70
|
), s.$$typeof) {
|
|
71
71
|
case g:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case
|
|
73
|
+
case O:
|
|
74
74
|
return (s.displayName || "Context") + ".Provider";
|
|
75
75
|
case E:
|
|
76
76
|
return (s._context.displayName || "Context") + ".Consumer";
|
|
77
77
|
case T:
|
|
78
78
|
var x = s.render;
|
|
79
79
|
return s = s.displayName, s || (s = x.displayName || x.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
|
|
80
|
-
case
|
|
80
|
+
case y:
|
|
81
81
|
return x = s.displayName || null, x !== null ? x : e(s.type) || "Memo";
|
|
82
82
|
case G:
|
|
83
83
|
x = s._payload, s = s._init;
|
|
@@ -100,11 +100,11 @@ function _t() {
|
|
|
100
100
|
}
|
|
101
101
|
if (x) {
|
|
102
102
|
x = console;
|
|
103
|
-
var
|
|
104
|
-
return
|
|
103
|
+
var N = x.error, B = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
104
|
+
return N.call(
|
|
105
105
|
x,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
107
|
+
B
|
|
108
108
|
), t(s);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -120,28 +120,28 @@ function _t() {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function a() {
|
|
123
|
-
var s =
|
|
123
|
+
var s = U.A;
|
|
124
124
|
return s === null ? null : s.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function i() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
129
|
function o(s) {
|
|
130
|
-
if (
|
|
130
|
+
if (_.call(s, "key")) {
|
|
131
131
|
var x = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
132
132
|
if (x && x.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return s.key !== void 0;
|
|
135
135
|
}
|
|
136
136
|
function c(s, x) {
|
|
137
|
-
function
|
|
138
|
-
|
|
137
|
+
function N() {
|
|
138
|
+
z || (z = !0, console.error(
|
|
139
139
|
"%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)",
|
|
140
140
|
x
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
N.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
144
|
+
get: N,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
@@ -151,14 +151,14 @@ function _t() {
|
|
|
151
151
|
"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."
|
|
152
152
|
)), s = this.props.ref, s !== void 0 ? s : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
154
|
+
function h(s, x, N, B, A, L, ee, ae) {
|
|
155
|
+
return N = L.ref, s = {
|
|
156
156
|
$$typeof: k,
|
|
157
157
|
type: s,
|
|
158
158
|
key: x,
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
159
|
+
props: L,
|
|
160
|
+
_owner: A
|
|
161
|
+
}, (N !== void 0 ? N : null) !== null ? Object.defineProperty(s, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
163
|
get: u
|
|
164
164
|
}) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
@@ -183,60 +183,60 @@ function _t() {
|
|
|
183
183
|
value: ae
|
|
184
184
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
185
185
|
}
|
|
186
|
-
function l(s, x,
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
p
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
186
|
+
function l(s, x, N, B, A, L, ee, ae) {
|
|
187
|
+
var p = x.children;
|
|
188
|
+
if (p !== void 0)
|
|
189
|
+
if (B)
|
|
190
|
+
if (M(p)) {
|
|
191
|
+
for (B = 0; B < p.length; B++)
|
|
192
|
+
f(p[B]);
|
|
193
|
+
Object.freeze && Object.freeze(p);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else p
|
|
199
|
-
if (
|
|
200
|
-
|
|
198
|
+
else f(p);
|
|
199
|
+
if (_.call(x, "key")) {
|
|
200
|
+
p = e(s);
|
|
201
201
|
var b = Object.keys(x).filter(function(C) {
|
|
202
202
|
return C !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
B = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", re[p + B] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
B,
|
|
212
|
+
p,
|
|
213
213
|
b,
|
|
214
|
-
|
|
215
|
-
), re[
|
|
214
|
+
p
|
|
215
|
+
), re[p + B] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
217
|
+
if (p = null, N !== void 0 && (r(N), p = "" + N), o(x) && (r(x.key), p = "" + x.key), "key" in x) {
|
|
218
|
+
N = {};
|
|
219
219
|
for (var R in x)
|
|
220
|
-
R !== "key" && (
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
220
|
+
R !== "key" && (N[R] = x[R]);
|
|
221
|
+
} else N = x;
|
|
222
|
+
return p && c(
|
|
223
|
+
N,
|
|
224
224
|
typeof s == "function" ? s.displayName || s.name || "Unknown" : s
|
|
225
|
-
),
|
|
225
|
+
), h(
|
|
226
226
|
s,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
p,
|
|
228
|
+
L,
|
|
229
|
+
A,
|
|
230
230
|
a(),
|
|
231
|
-
|
|
231
|
+
N,
|
|
232
232
|
ee,
|
|
233
233
|
ae
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function f(s) {
|
|
237
237
|
typeof s == "object" && s !== null && s.$$typeof === k && s._store && (s._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var w = wt, k = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), d = Symbol.for("react.fragment"),
|
|
239
|
+
var w = wt, k = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), O = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), $ = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), G = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), P = Symbol.for("react.client.reference"), U = w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _ = Object.prototype.hasOwnProperty, M = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
242
|
w = {
|
|
@@ -244,42 +244,42 @@ React keys must be passed directly to JSX without using spread:
|
|
|
244
244
|
return s();
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
var
|
|
247
|
+
var z, Q = {}, X = w["react-stack-bottom-frame"].bind(
|
|
248
248
|
w,
|
|
249
249
|
i
|
|
250
|
-
)(), te =
|
|
251
|
-
ge.Fragment = d, ge.jsx = function(s, x,
|
|
252
|
-
var
|
|
250
|
+
)(), te = F(n(i)), re = {};
|
|
251
|
+
ge.Fragment = d, ge.jsx = function(s, x, N, B, A) {
|
|
252
|
+
var L = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return l(
|
|
254
254
|
s,
|
|
255
255
|
x,
|
|
256
|
-
|
|
256
|
+
N,
|
|
257
257
|
!1,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
B,
|
|
259
|
+
A,
|
|
260
|
+
L ? Error("react-stack-top-frame") : X,
|
|
261
|
+
L ? F(n(s)) : te
|
|
262
262
|
);
|
|
263
|
-
}, ge.jsxs = function(s, x,
|
|
264
|
-
var
|
|
263
|
+
}, ge.jsxs = function(s, x, N, B, A) {
|
|
264
|
+
var L = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return l(
|
|
266
266
|
s,
|
|
267
267
|
x,
|
|
268
|
-
|
|
268
|
+
N,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
B,
|
|
271
|
+
A,
|
|
272
|
+
L ? Error("react-stack-top-frame") : X,
|
|
273
|
+
L ? F(n(s)) : te
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
276
|
}()), ge;
|
|
277
277
|
}
|
|
278
278
|
var Je;
|
|
279
|
-
function
|
|
280
|
-
return Je || (Je = 1, process.env.NODE_ENV === "production" ?
|
|
279
|
+
function It() {
|
|
280
|
+
return Je || (Je = 1, process.env.NODE_ENV === "production" ? Ie.exports = Pt() : Ie.exports = _t()), Ie.exports;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var W = It();
|
|
283
283
|
function Be() {
|
|
284
284
|
return Be = Object.assign ? Object.assign.bind() : function(e) {
|
|
285
285
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -289,18 +289,18 @@ function Be() {
|
|
|
289
289
|
return e;
|
|
290
290
|
}, Be.apply(null, arguments);
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function St(e) {
|
|
293
293
|
if (e.sheet)
|
|
294
294
|
return e.sheet;
|
|
295
295
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
296
296
|
if (document.styleSheets[t].ownerNode === e)
|
|
297
297
|
return document.styleSheets[t];
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Tt(e) {
|
|
300
300
|
var t = document.createElement("style");
|
|
301
301
|
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;
|
|
302
302
|
}
|
|
303
|
-
var
|
|
303
|
+
var Rt = /* @__PURE__ */ function() {
|
|
304
304
|
function e(r) {
|
|
305
305
|
var n = this;
|
|
306
306
|
this._insertTag = function(a) {
|
|
@@ -312,10 +312,10 @@ var Ct = /* @__PURE__ */ function() {
|
|
|
312
312
|
return t.hydrate = function(n) {
|
|
313
313
|
n.forEach(this._insertTag);
|
|
314
314
|
}, t.insert = function(n) {
|
|
315
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
315
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Tt(this));
|
|
316
316
|
var a = this.tags[this.tags.length - 1];
|
|
317
317
|
if (this.isSpeedy) {
|
|
318
|
-
var i =
|
|
318
|
+
var i = St(a);
|
|
319
319
|
try {
|
|
320
320
|
i.insertRule(n, i.cssRules.length);
|
|
321
321
|
} catch {
|
|
@@ -329,9 +329,9 @@ var Ct = /* @__PURE__ */ function() {
|
|
|
329
329
|
return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
|
|
330
330
|
}), this.tags = [], this.ctr = 0;
|
|
331
331
|
}, e;
|
|
332
|
-
}(),
|
|
332
|
+
}(), H = "-ms-", Ae = "-moz-", I = "-webkit-", lt = "comm", ze = "rule", We = "decl", Ct = "@import", ut = "@keyframes", At = "@layer", Ot = Math.abs, Oe = String.fromCharCode, jt = Object.assign;
|
|
333
333
|
function $t(e, t) {
|
|
334
|
-
return
|
|
334
|
+
return q(e, 0) ^ 45 ? (((t << 2 ^ q(e, 0)) << 2 ^ q(e, 1)) << 2 ^ q(e, 2)) << 2 ^ q(e, 3) : 0;
|
|
335
335
|
}
|
|
336
336
|
function dt(e) {
|
|
337
337
|
return e.trim();
|
|
@@ -345,7 +345,7 @@ function S(e, t, r) {
|
|
|
345
345
|
function De(e, t) {
|
|
346
346
|
return e.indexOf(t);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function q(e, t) {
|
|
349
349
|
return e.charCodeAt(t) | 0;
|
|
350
350
|
}
|
|
351
351
|
function ke(e, t, r) {
|
|
@@ -357,7 +357,7 @@ function ie(e) {
|
|
|
357
357
|
function Ye(e) {
|
|
358
358
|
return e.length;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Se(e, t) {
|
|
361
361
|
return t.push(e), e;
|
|
362
362
|
}
|
|
363
363
|
function Vt(e, t) {
|
|
@@ -374,15 +374,15 @@ function Lt() {
|
|
|
374
374
|
return D;
|
|
375
375
|
}
|
|
376
376
|
function Ft() {
|
|
377
|
-
return D = J > 0 ?
|
|
377
|
+
return D = J > 0 ? q(ye, --J) : 0, he--, D === 10 && (he = 1, je--), D;
|
|
378
378
|
}
|
|
379
379
|
function Z() {
|
|
380
|
-
return D = J < ft ?
|
|
380
|
+
return D = J < ft ? q(ye, J++) : 0, he++, D === 10 && (he = 1, je++), D;
|
|
381
381
|
}
|
|
382
382
|
function se() {
|
|
383
|
-
return
|
|
383
|
+
return q(ye, J);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Te() {
|
|
386
386
|
return J;
|
|
387
387
|
}
|
|
388
388
|
function _e(e, t) {
|
|
@@ -432,7 +432,7 @@ function pt(e) {
|
|
|
432
432
|
function ht(e) {
|
|
433
433
|
return ye = "", e;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function Re(e) {
|
|
436
436
|
return dt(_e(J - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
437
437
|
}
|
|
438
438
|
function Bt(e) {
|
|
@@ -443,7 +443,7 @@ function Bt(e) {
|
|
|
443
443
|
function Dt(e, t) {
|
|
444
444
|
for (; --t && Z() && !(D < 48 || D > 102 || D > 57 && D < 65 || D > 70 && D < 97); )
|
|
445
445
|
;
|
|
446
|
-
return _e(e,
|
|
446
|
+
return _e(e, Te() + (t < 6 && se() == 32 && Z() == 32));
|
|
447
447
|
}
|
|
448
448
|
function Ue(e) {
|
|
449
449
|
for (; Z(); )
|
|
@@ -479,48 +479,48 @@ function Mt(e) {
|
|
|
479
479
|
return _e(e, J);
|
|
480
480
|
}
|
|
481
481
|
function zt(e) {
|
|
482
|
-
return ht(
|
|
482
|
+
return ht(Ce("", null, null, null, [""], e = pt(e), 0, [0], e));
|
|
483
483
|
}
|
|
484
|
-
function
|
|
485
|
-
for (var
|
|
484
|
+
function Ce(e, t, r, n, a, i, o, c, u) {
|
|
485
|
+
for (var h = 0, l = 0, f = o, w = 0, k = 0, g = 0, d = 1, m = 1, v = 1, E = 0, O = "", T = a, j = i, $ = n, y = O; m; )
|
|
486
486
|
switch (g = E, E = Z()) {
|
|
487
487
|
// (
|
|
488
488
|
case 40:
|
|
489
|
-
if (g != 108 &&
|
|
490
|
-
De(
|
|
489
|
+
if (g != 108 && q(y, f - 1) == 58) {
|
|
490
|
+
De(y += S(Re(E), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
491
491
|
break;
|
|
492
492
|
}
|
|
493
493
|
// " ' [
|
|
494
494
|
case 34:
|
|
495
495
|
case 39:
|
|
496
496
|
case 91:
|
|
497
|
-
|
|
497
|
+
y += Re(E);
|
|
498
498
|
break;
|
|
499
499
|
// \t \n \r \s
|
|
500
500
|
case 9:
|
|
501
501
|
case 10:
|
|
502
502
|
case 13:
|
|
503
503
|
case 32:
|
|
504
|
-
|
|
504
|
+
y += Bt(g);
|
|
505
505
|
break;
|
|
506
506
|
// \
|
|
507
507
|
case 92:
|
|
508
|
-
|
|
508
|
+
y += Dt(Te() - 1, 7);
|
|
509
509
|
continue;
|
|
510
510
|
// /
|
|
511
511
|
case 47:
|
|
512
512
|
switch (se()) {
|
|
513
513
|
case 42:
|
|
514
514
|
case 47:
|
|
515
|
-
|
|
515
|
+
Se(Wt(Ut(Z(), Te()), t, r), u);
|
|
516
516
|
break;
|
|
517
517
|
default:
|
|
518
|
-
|
|
518
|
+
y += "/";
|
|
519
519
|
}
|
|
520
520
|
break;
|
|
521
521
|
// {
|
|
522
522
|
case 123 * d:
|
|
523
|
-
c[
|
|
523
|
+
c[h++] = ie(y) * v;
|
|
524
524
|
// } ; \0
|
|
525
525
|
case 125 * d:
|
|
526
526
|
case 59:
|
|
@@ -529,37 +529,37 @@ function Ie(e, t, r, n, a, i, o, c, u) {
|
|
|
529
529
|
// \0 }
|
|
530
530
|
case 0:
|
|
531
531
|
case 125:
|
|
532
|
-
|
|
532
|
+
m = 0;
|
|
533
533
|
// ;
|
|
534
534
|
case 59 + l:
|
|
535
|
-
v == -1 && (
|
|
535
|
+
v == -1 && (y = S(y, /\f/g, "")), k > 0 && ie(y) - f && Se(k > 32 ? Ze(y + ";", n, r, f - 1) : Ze(S(y, " ", "") + ";", n, r, f - 2), u);
|
|
536
536
|
break;
|
|
537
537
|
// @ ;
|
|
538
538
|
case 59:
|
|
539
|
-
|
|
539
|
+
y += ";";
|
|
540
540
|
// { rule/at-rule
|
|
541
541
|
default:
|
|
542
|
-
if (
|
|
542
|
+
if (Se($ = Ke(y, t, r, h, l, a, c, O, T = [], j = [], f), i), E === 123)
|
|
543
543
|
if (l === 0)
|
|
544
|
-
|
|
544
|
+
Ce(y, t, $, $, T, i, f, c, j);
|
|
545
545
|
else
|
|
546
|
-
switch (w === 99 &&
|
|
546
|
+
switch (w === 99 && q(y, 3) === 110 ? 100 : w) {
|
|
547
547
|
// d l m s
|
|
548
548
|
case 100:
|
|
549
549
|
case 108:
|
|
550
550
|
case 109:
|
|
551
551
|
case 115:
|
|
552
|
-
|
|
552
|
+
Ce(e, $, $, n && Se(Ke(e, $, $, 0, 0, a, c, O, a, T = [], f), j), a, j, f, c, n ? T : j);
|
|
553
553
|
break;
|
|
554
554
|
default:
|
|
555
|
-
|
|
555
|
+
Ce(y, $, $, $, [""], j, 0, c, j);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
h = l = k = 0, d = v = 1, O = y = "", f = o;
|
|
559
559
|
break;
|
|
560
560
|
// :
|
|
561
561
|
case 58:
|
|
562
|
-
|
|
562
|
+
f = 1 + ie(y), k = g;
|
|
563
563
|
default:
|
|
564
564
|
if (d < 1) {
|
|
565
565
|
if (E == 123)
|
|
@@ -567,31 +567,31 @@ function Ie(e, t, r, n, a, i, o, c, u) {
|
|
|
567
567
|
else if (E == 125 && d++ == 0 && Ft() == 125)
|
|
568
568
|
continue;
|
|
569
569
|
}
|
|
570
|
-
switch (
|
|
570
|
+
switch (y += Oe(E), E * d) {
|
|
571
571
|
// &
|
|
572
572
|
case 38:
|
|
573
|
-
v = l > 0 ? 1 : (
|
|
573
|
+
v = l > 0 ? 1 : (y += "\f", -1);
|
|
574
574
|
break;
|
|
575
575
|
// ,
|
|
576
576
|
case 44:
|
|
577
|
-
c[
|
|
577
|
+
c[h++] = (ie(y) - 1) * v, v = 1;
|
|
578
578
|
break;
|
|
579
579
|
// @
|
|
580
580
|
case 64:
|
|
581
|
-
se() === 45 && (
|
|
581
|
+
se() === 45 && (y += Re(Z())), w = se(), l = f = ie(O = y += Mt(Te())), E++;
|
|
582
582
|
break;
|
|
583
583
|
// -
|
|
584
584
|
case 45:
|
|
585
|
-
g === 45 && ie(
|
|
585
|
+
g === 45 && ie(y) == 2 && (d = 0);
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
return i;
|
|
589
589
|
}
|
|
590
|
-
function Ke(e, t, r, n, a, i, o, c, u,
|
|
591
|
-
for (var
|
|
592
|
-
for (var v = 0, E = ke(e,
|
|
593
|
-
(
|
|
594
|
-
return $e(e, t, r, a === 0 ? ze : c, u,
|
|
590
|
+
function Ke(e, t, r, n, a, i, o, c, u, h, l) {
|
|
591
|
+
for (var f = a - 1, w = a === 0 ? i : [""], k = Ye(w), g = 0, d = 0, m = 0; g < n; ++g)
|
|
592
|
+
for (var v = 0, E = ke(e, f + 1, f = Ot(d = o[g])), O = e; v < k; ++v)
|
|
593
|
+
(O = dt(d > 0 ? w[v] + " " + E : S(E, /&\f/g, w[v]))) && (u[m++] = O);
|
|
594
|
+
return $e(e, t, r, a === 0 ? ze : c, u, h, l);
|
|
595
595
|
}
|
|
596
596
|
function Wt(e, t, r) {
|
|
597
597
|
return $e(e, t, r, lt, Oe(Lt()), ke(e, 2, -2), 0);
|
|
@@ -608,7 +608,7 @@ function Yt(e, t, r, n) {
|
|
|
608
608
|
switch (e.type) {
|
|
609
609
|
case At:
|
|
610
610
|
if (e.children.length) break;
|
|
611
|
-
case
|
|
611
|
+
case Ct:
|
|
612
612
|
case We:
|
|
613
613
|
return e.return = e.return || e.value;
|
|
614
614
|
case lt:
|
|
@@ -651,7 +651,7 @@ var Ht = function(t, r, n) {
|
|
|
651
651
|
a === 38 && se() === 12 && (r[n] = 1), t[n] += Ht(J - 1, r, n);
|
|
652
652
|
break;
|
|
653
653
|
case 2:
|
|
654
|
-
t[n] +=
|
|
654
|
+
t[n] += Re(a);
|
|
655
655
|
break;
|
|
656
656
|
case 4:
|
|
657
657
|
if (a === 44) {
|
|
@@ -674,9 +674,9 @@ var Ht = function(t, r, n) {
|
|
|
674
674
|
if (n = n.parent, !n) return;
|
|
675
675
|
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !Qe.get(n)) && !a) {
|
|
676
676
|
Qe.set(t, !0);
|
|
677
|
-
for (var i = [], o = Jt(r, i), c = n.props, u = 0,
|
|
678
|
-
for (var l = 0; l < c.length; l++,
|
|
679
|
-
t.props[
|
|
677
|
+
for (var i = [], o = Jt(r, i), c = n.props, u = 0, h = 0; u < o.length; u++)
|
|
678
|
+
for (var l = 0; l < c.length; l++, h++)
|
|
679
|
+
t.props[h] = i[u] ? o[u].replace(/&\f/g, c[l]) : c[l] + " " + o[u];
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
}, Zt = function(t) {
|
|
@@ -691,7 +691,7 @@ function yt(e, t) {
|
|
|
691
691
|
switch ($t(e, t)) {
|
|
692
692
|
// color-adjust
|
|
693
693
|
case 5103:
|
|
694
|
-
return
|
|
694
|
+
return I + "print-" + e + e;
|
|
695
695
|
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
696
696
|
case 5737:
|
|
697
697
|
case 4201:
|
|
@@ -721,58 +721,58 @@ function yt(e, t) {
|
|
|
721
721
|
case 5365:
|
|
722
722
|
case 5621:
|
|
723
723
|
case 3829:
|
|
724
|
-
return
|
|
724
|
+
return I + e + e;
|
|
725
725
|
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
726
726
|
case 5349:
|
|
727
727
|
case 4246:
|
|
728
728
|
case 4810:
|
|
729
729
|
case 6968:
|
|
730
730
|
case 2756:
|
|
731
|
-
return
|
|
731
|
+
return I + e + Ae + e + H + e + e;
|
|
732
732
|
// flex, flex-direction
|
|
733
733
|
case 6828:
|
|
734
734
|
case 4268:
|
|
735
|
-
return
|
|
735
|
+
return I + e + H + e + e;
|
|
736
736
|
// order
|
|
737
737
|
case 6165:
|
|
738
|
-
return
|
|
738
|
+
return I + e + H + "flex-" + e + e;
|
|
739
739
|
// align-items
|
|
740
740
|
case 5187:
|
|
741
|
-
return
|
|
741
|
+
return I + e + S(e, /(\w+).+(:[^]+)/, I + "box-$1$2" + H + "flex-$1$2") + e;
|
|
742
742
|
// align-self
|
|
743
743
|
case 5443:
|
|
744
|
-
return
|
|
744
|
+
return I + e + H + "flex-item-" + S(e, /flex-|-self/, "") + e;
|
|
745
745
|
// align-content
|
|
746
746
|
case 4675:
|
|
747
|
-
return
|
|
747
|
+
return I + e + H + "flex-line-pack" + S(e, /align-content|flex-|-self/, "") + e;
|
|
748
748
|
// flex-shrink
|
|
749
749
|
case 5548:
|
|
750
|
-
return
|
|
750
|
+
return I + e + H + S(e, "shrink", "negative") + e;
|
|
751
751
|
// flex-basis
|
|
752
752
|
case 5292:
|
|
753
|
-
return
|
|
753
|
+
return I + e + H + S(e, "basis", "preferred-size") + e;
|
|
754
754
|
// flex-grow
|
|
755
755
|
case 6060:
|
|
756
|
-
return
|
|
756
|
+
return I + "box-" + S(e, "-grow", "") + I + e + H + S(e, "grow", "positive") + e;
|
|
757
757
|
// transition
|
|
758
758
|
case 4554:
|
|
759
|
-
return
|
|
759
|
+
return I + S(e, /([^-])(transform)/g, "$1" + I + "$2") + e;
|
|
760
760
|
// cursor
|
|
761
761
|
case 6187:
|
|
762
|
-
return S(S(S(e, /(zoom-|grab)/,
|
|
762
|
+
return S(S(S(e, /(zoom-|grab)/, I + "$1"), /(image-set)/, I + "$1"), e, "") + e;
|
|
763
763
|
// background, background-image
|
|
764
764
|
case 5495:
|
|
765
765
|
case 3959:
|
|
766
|
-
return S(e, /(image-set\([^]*)/,
|
|
766
|
+
return S(e, /(image-set\([^]*)/, I + "$1$`$1");
|
|
767
767
|
// justify-content
|
|
768
768
|
case 4968:
|
|
769
|
-
return S(S(e, /(.+:)(flex-)?(.*)/,
|
|
769
|
+
return S(S(e, /(.+:)(flex-)?(.*)/, I + "box-pack:$3" + H + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + I + e + e;
|
|
770
770
|
// (margin|padding)-inline-(start|end)
|
|
771
771
|
case 4095:
|
|
772
772
|
case 3583:
|
|
773
773
|
case 4068:
|
|
774
774
|
case 2532:
|
|
775
|
-
return S(e, /(.+)-inline(.+)/,
|
|
775
|
+
return S(e, /(.+)-inline(.+)/, I + "$1$2") + e;
|
|
776
776
|
// (min|max)?(width|height|inline-size|block-size)
|
|
777
777
|
case 8116:
|
|
778
778
|
case 7059:
|
|
@@ -786,13 +786,13 @@ function yt(e, t) {
|
|
|
786
786
|
case 5789:
|
|
787
787
|
case 5021:
|
|
788
788
|
case 4765:
|
|
789
|
-
if (ie(e) - 1 - t > 6) switch (
|
|
789
|
+
if (ie(e) - 1 - t > 6) switch (q(e, t + 1)) {
|
|
790
790
|
// (m)ax-content, (m)in-content
|
|
791
791
|
case 109:
|
|
792
|
-
if (
|
|
792
|
+
if (q(e, t + 4) !== 45) break;
|
|
793
793
|
// (f)ill-available, (f)it-content
|
|
794
794
|
case 102:
|
|
795
|
-
return S(e, /(.+:)(.+)-([^]+)/, "$1" +
|
|
795
|
+
return S(e, /(.+:)(.+)-([^]+)/, "$1" + I + "$2-$3$1" + Ae + (q(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
796
796
|
// (s)tretch
|
|
797
797
|
case 115:
|
|
798
798
|
return ~De(e, "stretch") ? yt(S(e, "stretch", "fill-available"), t) + e : e;
|
|
@@ -800,32 +800,32 @@ function yt(e, t) {
|
|
|
800
800
|
break;
|
|
801
801
|
// position: sticky
|
|
802
802
|
case 4949:
|
|
803
|
-
if (
|
|
803
|
+
if (q(e, t + 1) !== 115) break;
|
|
804
804
|
// display: (flex|inline-flex)
|
|
805
805
|
case 6444:
|
|
806
|
-
switch (
|
|
806
|
+
switch (q(e, ie(e) - 3 - (~De(e, "!important") && 10))) {
|
|
807
807
|
// stic(k)y
|
|
808
808
|
case 107:
|
|
809
|
-
return S(e, ":", ":" +
|
|
809
|
+
return S(e, ":", ":" + I) + e;
|
|
810
810
|
// (inline-)?fl(e)x
|
|
811
811
|
case 101:
|
|
812
|
-
return S(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" +
|
|
812
|
+
return S(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + I + (q(e, 14) === 45 ? "inline-" : "") + "box$3$1" + I + "$2$3$1" + H + "$2box$3") + e;
|
|
813
813
|
}
|
|
814
814
|
break;
|
|
815
815
|
// writing-mode
|
|
816
816
|
case 5936:
|
|
817
|
-
switch (
|
|
817
|
+
switch (q(e, t + 11)) {
|
|
818
818
|
// vertical-l(r)
|
|
819
819
|
case 114:
|
|
820
|
-
return
|
|
820
|
+
return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
821
821
|
// vertical-r(l)
|
|
822
822
|
case 108:
|
|
823
|
-
return
|
|
823
|
+
return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
824
824
|
// horizontal(-)tb
|
|
825
825
|
case 45:
|
|
826
|
-
return
|
|
826
|
+
return I + e + H + S(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
827
827
|
}
|
|
828
|
-
return
|
|
828
|
+
return I + e + H + e + e;
|
|
829
829
|
}
|
|
830
830
|
return e;
|
|
831
831
|
}
|
|
@@ -836,7 +836,7 @@ var Qt = function(t, r, n, a) {
|
|
|
836
836
|
break;
|
|
837
837
|
case ut:
|
|
838
838
|
return pe([be(t, {
|
|
839
|
-
value: S(t.value, "@", "@" +
|
|
839
|
+
value: S(t.value, "@", "@" + I)
|
|
840
840
|
})], a);
|
|
841
841
|
case ze:
|
|
842
842
|
if (t.length) return Vt(t.props, function(i) {
|
|
@@ -850,11 +850,11 @@ var Qt = function(t, r, n, a) {
|
|
|
850
850
|
// :placeholder
|
|
851
851
|
case "::placeholder":
|
|
852
852
|
return pe([be(t, {
|
|
853
|
-
props: [S(i, /:(plac\w+)/, ":" +
|
|
853
|
+
props: [S(i, /:(plac\w+)/, ":" + I + "input-$1")]
|
|
854
854
|
}), be(t, {
|
|
855
855
|
props: [S(i, /:(plac\w+)/, ":" + Ae + "$1")]
|
|
856
856
|
}), be(t, {
|
|
857
|
-
props: [S(i, /:(plac\w+)/,
|
|
857
|
+
props: [S(i, /:(plac\w+)/, H + "input-$1")]
|
|
858
858
|
})], a);
|
|
859
859
|
}
|
|
860
860
|
return "";
|
|
@@ -865,8 +865,8 @@ var Qt = function(t, r, n, a) {
|
|
|
865
865
|
if (r === "css") {
|
|
866
866
|
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
867
867
|
Array.prototype.forEach.call(n, function(d) {
|
|
868
|
-
var
|
|
869
|
-
|
|
868
|
+
var m = d.getAttribute("data-emotion");
|
|
869
|
+
m.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
var a = t.stylisPlugins || er, i = {}, o, c = [];
|
|
@@ -875,25 +875,25 @@ var Qt = function(t, r, n, a) {
|
|
|
875
875
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
876
876
|
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
877
877
|
function(d) {
|
|
878
|
-
for (var
|
|
879
|
-
i[
|
|
878
|
+
for (var m = d.getAttribute("data-emotion").split(" "), v = 1; v < m.length; v++)
|
|
879
|
+
i[m[v]] = !0;
|
|
880
880
|
c.push(d);
|
|
881
881
|
}
|
|
882
882
|
);
|
|
883
|
-
var u,
|
|
883
|
+
var u, h = [Kt, Zt];
|
|
884
884
|
{
|
|
885
|
-
var l,
|
|
885
|
+
var l, f = [Yt, Gt(function(d) {
|
|
886
886
|
l.insert(d);
|
|
887
|
-
})], w = qt(
|
|
888
|
-
return pe(zt(
|
|
887
|
+
})], w = qt(h.concat(a, f)), k = function(m) {
|
|
888
|
+
return pe(zt(m), w);
|
|
889
889
|
};
|
|
890
|
-
u = function(
|
|
891
|
-
l = E, k(
|
|
890
|
+
u = function(m, v, E, O) {
|
|
891
|
+
l = E, k(m ? m + "{" + v.styles + "}" : v.styles), O && (g.inserted[v.name] = !0);
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
var g = {
|
|
895
895
|
key: r,
|
|
896
|
-
sheet: new
|
|
896
|
+
sheet: new Rt({
|
|
897
897
|
key: r,
|
|
898
898
|
container: o,
|
|
899
899
|
nonce: t.nonce,
|
|
@@ -1059,8 +1059,8 @@ function Pe(e, t, r) {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
case "function": {
|
|
1061
1061
|
if (e !== void 0) {
|
|
1062
|
-
var u = oe,
|
|
1063
|
-
return oe = u, Pe(e, t,
|
|
1062
|
+
var u = oe, h = r(e);
|
|
1063
|
+
return oe = u, Pe(e, t, h);
|
|
1064
1064
|
}
|
|
1065
1065
|
break;
|
|
1066
1066
|
}
|
|
@@ -1068,8 +1068,8 @@ function Pe(e, t, r) {
|
|
|
1068
1068
|
var l = r;
|
|
1069
1069
|
if (t == null)
|
|
1070
1070
|
return l;
|
|
1071
|
-
var
|
|
1072
|
-
return
|
|
1071
|
+
var f = t[l];
|
|
1072
|
+
return f !== void 0 ? f : l;
|
|
1073
1073
|
}
|
|
1074
1074
|
function lr(e, t, r) {
|
|
1075
1075
|
var n = "";
|
|
@@ -1086,15 +1086,15 @@ function lr(e, t, r) {
|
|
|
1086
1086
|
for (var u = 0; u < o.length; u++)
|
|
1087
1087
|
et(o[u]) && (n += Ne(i) + ":" + tt(i, o[u]) + ";");
|
|
1088
1088
|
else {
|
|
1089
|
-
var
|
|
1089
|
+
var h = Pe(e, t, o);
|
|
1090
1090
|
switch (i) {
|
|
1091
1091
|
case "animation":
|
|
1092
1092
|
case "animationName": {
|
|
1093
|
-
n += Ne(i) + ":" +
|
|
1093
|
+
n += Ne(i) + ":" + h + ";";
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
1096
|
default:
|
|
1097
|
-
n += i + "{" +
|
|
1097
|
+
n += i + "{" + h + "}";
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
@@ -1119,11 +1119,11 @@ function ur(e, t, r) {
|
|
|
1119
1119
|
a += u[c];
|
|
1120
1120
|
}
|
|
1121
1121
|
rt.lastIndex = 0;
|
|
1122
|
-
for (var
|
|
1123
|
-
|
|
1124
|
-
var
|
|
1122
|
+
for (var h = "", l; (l = rt.exec(a)) !== null; )
|
|
1123
|
+
h += "-" + l[1];
|
|
1124
|
+
var f = ir(a) + h;
|
|
1125
1125
|
return {
|
|
1126
|
-
name:
|
|
1126
|
+
name: f,
|
|
1127
1127
|
styles: a,
|
|
1128
1128
|
next: oe
|
|
1129
1129
|
};
|
|
@@ -1176,46 +1176,46 @@ var hr = function(t) {
|
|
|
1176
1176
|
}, wr = function e(t, r) {
|
|
1177
1177
|
var n = t.__emotion_real === t, a = n && t.__emotion_base || t, i, o;
|
|
1178
1178
|
r !== void 0 && (i = r.label, o = r.target);
|
|
1179
|
-
var c = at(t, r, n), u = c || nt(a),
|
|
1179
|
+
var c = at(t, r, n), u = c || nt(a), h = !u("as");
|
|
1180
1180
|
return function() {
|
|
1181
|
-
var l = arguments,
|
|
1182
|
-
if (i !== void 0 &&
|
|
1183
|
-
|
|
1181
|
+
var l = arguments, f = n && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
|
|
1182
|
+
if (i !== void 0 && f.push("label:" + i + ";"), l[0] == null || l[0].raw === void 0)
|
|
1183
|
+
f.push.apply(f, l);
|
|
1184
1184
|
else {
|
|
1185
1185
|
var w = l[0];
|
|
1186
|
-
|
|
1186
|
+
f.push(w[0]);
|
|
1187
1187
|
for (var k = l.length, g = 1; g < k; g++)
|
|
1188
|
-
|
|
1188
|
+
f.push(l[g], w[g]);
|
|
1189
1189
|
}
|
|
1190
|
-
var d = hr(function(
|
|
1191
|
-
var
|
|
1192
|
-
if (
|
|
1193
|
-
|
|
1194
|
-
for (var
|
|
1195
|
-
|
|
1196
|
-
|
|
1190
|
+
var d = hr(function(m, v, E) {
|
|
1191
|
+
var O = h && m.as || a, T = "", j = [], $ = m;
|
|
1192
|
+
if (m.theme == null) {
|
|
1193
|
+
$ = {};
|
|
1194
|
+
for (var y in m)
|
|
1195
|
+
$[y] = m[y];
|
|
1196
|
+
$.theme = le.useContext(mr);
|
|
1197
1197
|
}
|
|
1198
|
-
typeof
|
|
1199
|
-
var G = ur(
|
|
1198
|
+
typeof m.className == "string" ? T = nr(v.registered, j, m.className) : m.className != null && (T = m.className + " ");
|
|
1199
|
+
var G = ur(f.concat(j), v.registered, $);
|
|
1200
1200
|
T += v.key + "-" + G.name, o !== void 0 && (T += " " + o);
|
|
1201
|
-
var
|
|
1202
|
-
for (var
|
|
1203
|
-
|
|
1204
|
-
return
|
|
1201
|
+
var V = h && c === void 0 ? nt(O) : u, P = {};
|
|
1202
|
+
for (var U in m)
|
|
1203
|
+
h && U === "as" || V(U) && (P[U] = m[U]);
|
|
1204
|
+
return P.className = T, E && (P.ref = E), /* @__PURE__ */ le.createElement(le.Fragment, null, /* @__PURE__ */ le.createElement(xr, {
|
|
1205
1205
|
cache: v,
|
|
1206
1206
|
serialized: G,
|
|
1207
|
-
isStringTag: typeof
|
|
1208
|
-
}), /* @__PURE__ */ le.createElement(
|
|
1207
|
+
isStringTag: typeof O == "string"
|
|
1208
|
+
}), /* @__PURE__ */ le.createElement(O, P));
|
|
1209
1209
|
});
|
|
1210
|
-
return d.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = a, d.__emotion_styles =
|
|
1210
|
+
return d.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = a, d.__emotion_styles = f, d.__emotion_forwardProp = c, Object.defineProperty(d, "toString", {
|
|
1211
1211
|
value: function() {
|
|
1212
1212
|
return "." + o;
|
|
1213
1213
|
}
|
|
1214
|
-
}), d.withComponent = function(
|
|
1215
|
-
var E = e(
|
|
1214
|
+
}), d.withComponent = function(m, v) {
|
|
1215
|
+
var E = e(m, Be({}, r, v, {
|
|
1216
1216
|
shouldForwardProp: at(d, v, !0)
|
|
1217
1217
|
}));
|
|
1218
|
-
return E.apply(void 0,
|
|
1218
|
+
return E.apply(void 0, f);
|
|
1219
1219
|
}, d;
|
|
1220
1220
|
};
|
|
1221
1221
|
}, kr = [
|
|
@@ -1399,7 +1399,7 @@ const Er = me.div`
|
|
|
1399
1399
|
return "";
|
|
1400
1400
|
}
|
|
1401
1401
|
}}
|
|
1402
|
-
`, Me = ({ type: e, children: t, className: r, icon: n, action: a }) =>
|
|
1402
|
+
`, Me = ({ type: e, children: t, className: r, icon: n, action: a }) => W.jsxs(Er, { type: e, className: r, children: [n && W.jsx("span", { children: n }), W.jsx("span", { children: t }), a && W.jsx("span", { children: a })] }), it = me.div`
|
|
1403
1403
|
width: ${({ width: e }) => e || "100%"};
|
|
1404
1404
|
height: ${({ height: e }) => e || "100%"};
|
|
1405
1405
|
border-radius: 0px !important; /* Force remove rounded corners on container */
|
|
@@ -1425,24 +1425,19 @@ const Er = me.div`
|
|
|
1425
1425
|
pointer-events: auto;
|
|
1426
1426
|
`, _r = me.div`
|
|
1427
1427
|
position: relative;
|
|
1428
|
-
width:
|
|
1429
|
-
max-width: 360px;
|
|
1428
|
+
max-width: 100vw;
|
|
1430
1429
|
aspect-ratio: 9 / 16;
|
|
1431
1430
|
height: auto;
|
|
1432
1431
|
z-index: 1001;
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
width: 100%;
|
|
1436
|
-
max-width: 100%;
|
|
1437
|
-
}
|
|
1438
|
-
`, Sr = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, ot = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Tr = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, Rr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, qe = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Ve = /* @__PURE__ */ new Map(), Cr = (e, t) => {
|
|
1432
|
+
max-height: 100vh;
|
|
1433
|
+
`, Ir = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, ot = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Sr = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, Tr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, qe = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Ve = /* @__PURE__ */ new Map(), Rr = (e, t) => {
|
|
1439
1434
|
const [r, n] = ne(!1), [a, i] = ne(null);
|
|
1440
1435
|
return we(() => {
|
|
1441
1436
|
let o = null, c, u = 0;
|
|
1442
|
-
const
|
|
1437
|
+
const h = 3;
|
|
1443
1438
|
let l;
|
|
1444
1439
|
try {
|
|
1445
|
-
l = t ||
|
|
1440
|
+
l = t || Tr(e || "latest");
|
|
1446
1441
|
} catch (k) {
|
|
1447
1442
|
const g = k instanceof Error ? k.message : String(k);
|
|
1448
1443
|
i(`Failed to resolve script URL: ${g}`), n(!1);
|
|
@@ -1462,15 +1457,15 @@ const Er = me.div`
|
|
|
1462
1457
|
}, 1e4), o.onload = () => {
|
|
1463
1458
|
clearTimeout(c), Ve.set(l, !0), n(!0), i(null);
|
|
1464
1459
|
}, o.onerror = () => {
|
|
1465
|
-
clearTimeout(c), u++, u <
|
|
1460
|
+
clearTimeout(c), u++, u < h ? setTimeout(w, 1e3 * u) : (n(!1), i(`Failed to load VP Player script after ${h} attempts: ${l}`));
|
|
1466
1461
|
}, document.body.appendChild(o);
|
|
1467
1462
|
};
|
|
1468
1463
|
return w(), () => {
|
|
1469
1464
|
clearTimeout(c), o && document.body.contains(o) && document.body.removeChild(o);
|
|
1470
1465
|
};
|
|
1471
1466
|
}, [e, t]), { isLoaded: r, error: a };
|
|
1472
|
-
},
|
|
1473
|
-
const [i, o] = ne(null), [c, u] = ne(null), [
|
|
1467
|
+
}, Cr = {}, xe = /* @__PURE__ */ new Map(), Ar = 3e4, Le = 5, Or = ({ projectId: e, videoId: t, playlistId: r, videoUrl: n, apiKey: a }) => {
|
|
1468
|
+
const [i, o] = ne(null), [c, u] = ne(null), [h, l] = ne(!1), [f, w] = ne(null), k = a || (typeof Cr < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
|
|
1474
1469
|
return we(() => {
|
|
1475
1470
|
const g = t ? `video:${t}` : r ? `playlist:${r}` : null;
|
|
1476
1471
|
if (!e || n || !t && !r) {
|
|
@@ -1487,15 +1482,15 @@ const Er = me.div`
|
|
|
1487
1482
|
return;
|
|
1488
1483
|
}
|
|
1489
1484
|
let d = !0;
|
|
1490
|
-
const
|
|
1491
|
-
var
|
|
1485
|
+
const m = new AbortController(), v = m.signal, O = setTimeout(async () => {
|
|
1486
|
+
var j, $, y, G;
|
|
1492
1487
|
if (!d)
|
|
1493
1488
|
return;
|
|
1494
1489
|
l(!0), w(null);
|
|
1495
1490
|
let T = 0;
|
|
1496
1491
|
for (; T < Le && d; )
|
|
1497
1492
|
try {
|
|
1498
|
-
const
|
|
1493
|
+
const V = t && !r ? Ir(e, t) : ot(e, r), P = setTimeout(() => m.abort(), Ar), U = await fetch(V, {
|
|
1499
1494
|
method: "GET",
|
|
1500
1495
|
headers: {
|
|
1501
1496
|
"api-key": k,
|
|
@@ -1505,20 +1500,20 @@ const Er = me.div`
|
|
|
1505
1500
|
},
|
|
1506
1501
|
signal: v
|
|
1507
1502
|
});
|
|
1508
|
-
if (clearTimeout(
|
|
1509
|
-
throw new Error(`Fetch failed with status ${
|
|
1510
|
-
const
|
|
1503
|
+
if (clearTimeout(P), !U.ok)
|
|
1504
|
+
throw new Error(`Fetch failed with status ${U.status}`);
|
|
1505
|
+
const _ = await U.json();
|
|
1511
1506
|
if (!d)
|
|
1512
1507
|
return;
|
|
1513
1508
|
if (t && !r) {
|
|
1514
|
-
const
|
|
1515
|
-
if (!(
|
|
1509
|
+
const M = ($ = (j = _.result) == null ? void 0 : j.items) == null ? void 0 : $.find((F) => F.mediaId === t);
|
|
1510
|
+
if (!(M != null && M.playbackUrl))
|
|
1516
1511
|
throw new Error("Invalid video data");
|
|
1517
|
-
o(
|
|
1512
|
+
o(M.playbackUrl), u(null), g && xe.set(g, { url: M.playbackUrl, playlist: null });
|
|
1518
1513
|
} else {
|
|
1519
|
-
if (!Array.isArray(
|
|
1514
|
+
if (!Array.isArray(_.result))
|
|
1520
1515
|
throw new Error("Invalid playlist format");
|
|
1521
|
-
const
|
|
1516
|
+
const M = Sr(e, r), F = await fetch(M, {
|
|
1522
1517
|
method: "GET",
|
|
1523
1518
|
headers: {
|
|
1524
1519
|
"api-key": k,
|
|
@@ -1527,11 +1522,11 @@ const Er = me.div`
|
|
|
1527
1522
|
},
|
|
1528
1523
|
signal: v
|
|
1529
1524
|
});
|
|
1530
|
-
if (
|
|
1531
|
-
const
|
|
1532
|
-
let Q = [...
|
|
1533
|
-
if ((
|
|
1534
|
-
const
|
|
1525
|
+
if (F.ok) {
|
|
1526
|
+
const z = await F.json();
|
|
1527
|
+
let Q = [..._.result];
|
|
1528
|
+
if ((y = z.result) != null && y.playlistBackupState && ((G = z.result) != null && G.playlistBackupId)) {
|
|
1529
|
+
const X = ot(e, z.result.playlistBackupId), te = await fetch(X, {
|
|
1535
1530
|
method: "GET",
|
|
1536
1531
|
headers: {
|
|
1537
1532
|
"api-key": k,
|
|
@@ -1553,26 +1548,26 @@ const Er = me.div`
|
|
|
1553
1548
|
}
|
|
1554
1549
|
u(Q), o(null), g && xe.set(g, { url: null, playlist: Q });
|
|
1555
1550
|
} else
|
|
1556
|
-
u(
|
|
1551
|
+
u(_.result), o(null), g && xe.set(g, { url: null, playlist: _.result });
|
|
1557
1552
|
}
|
|
1558
1553
|
break;
|
|
1559
|
-
} catch (
|
|
1554
|
+
} catch (V) {
|
|
1560
1555
|
if (v.aborted) {
|
|
1561
1556
|
d && w("Request timed out");
|
|
1562
1557
|
break;
|
|
1563
1558
|
}
|
|
1564
1559
|
if (T++, T >= Le) {
|
|
1565
|
-
const
|
|
1566
|
-
d && w(`Failed after ${Le} attempts: ${
|
|
1560
|
+
const P = V instanceof Error ? V.message : String(V);
|
|
1561
|
+
d && w(`Failed after ${Le} attempts: ${P}`);
|
|
1567
1562
|
} else
|
|
1568
|
-
await new Promise((
|
|
1563
|
+
await new Promise((P) => setTimeout(P, 2e3));
|
|
1569
1564
|
}
|
|
1570
1565
|
d && l(!1);
|
|
1571
1566
|
}, 100);
|
|
1572
1567
|
return () => {
|
|
1573
|
-
d = !1, clearTimeout(
|
|
1568
|
+
d = !1, clearTimeout(O), m.abort();
|
|
1574
1569
|
};
|
|
1575
|
-
}, [k, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading:
|
|
1570
|
+
}, [k, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: h, error: f };
|
|
1576
1571
|
}, jr = {
|
|
1577
1572
|
projectId: "vp-player-projectId",
|
|
1578
1573
|
video: {
|
|
@@ -1629,14 +1624,13 @@ const Er = me.div`
|
|
|
1629
1624
|
}, $r = ({
|
|
1630
1625
|
videoUrl: e,
|
|
1631
1626
|
fetchedPlaybackUrl: t,
|
|
1632
|
-
// fetchedPlaylist,
|
|
1633
1627
|
fetchedPlaylist: r,
|
|
1634
1628
|
projectId: n,
|
|
1635
1629
|
config: a = {},
|
|
1636
1630
|
isVerticalPlayer: i
|
|
1637
1631
|
// Distinguish between VP Player types
|
|
1638
1632
|
}) => {
|
|
1639
|
-
var l,
|
|
1633
|
+
var l, f, w, k, g, d, m, v, E, O, T, j, $, y, G, V;
|
|
1640
1634
|
const o = { ...jr, ...a }, c = { ...o.config, ...a.config };
|
|
1641
1635
|
if (e)
|
|
1642
1636
|
return {
|
|
@@ -1659,30 +1653,32 @@ const Er = me.div`
|
|
|
1659
1653
|
config: c
|
|
1660
1654
|
};
|
|
1661
1655
|
if (r && r.length > 0) {
|
|
1662
|
-
const
|
|
1656
|
+
const P = ((f = (l = a == null ? void 0 : a.video) == null ? void 0 : l.playlist) == null ? void 0 : f.playlistVideoIndex) ?? ((w = a == null ? void 0 : a.config) == null ? void 0 : w.playlistVideoIndex) ?? 0;
|
|
1663
1657
|
return i ? {
|
|
1664
1658
|
...o,
|
|
1665
1659
|
projectId: n || "vp-player-projectId",
|
|
1666
1660
|
video: {
|
|
1667
1661
|
...o.video,
|
|
1668
1662
|
// Set first video file (index 0) to avoid VP Player duplication
|
|
1669
|
-
|
|
1670
|
-
|
|
1663
|
+
videoId: (k = r[0]) == null ? void 0 : k.mediaId,
|
|
1664
|
+
// Add videoId for tracking
|
|
1665
|
+
file: (g = r[0]) == null ? void 0 : g.hlsUrl,
|
|
1666
|
+
title: (d = r[0]) == null ? void 0 : d.title,
|
|
1671
1667
|
// thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
|
|
1672
1668
|
playlist: {
|
|
1673
1669
|
state: !0,
|
|
1674
1670
|
playlistId: "",
|
|
1675
1671
|
// Will be set by API
|
|
1676
1672
|
// Use original playlistVideoIndex - VP Player will navigate to it
|
|
1677
|
-
playlistVideoIndex: Number(
|
|
1673
|
+
playlistVideoIndex: Number(P),
|
|
1678
1674
|
// Remove first video from playlist to avoid duplication (already in file)
|
|
1679
|
-
videos: r.slice(1).map((
|
|
1680
|
-
videoId: String(
|
|
1681
|
-
//
|
|
1682
|
-
title:
|
|
1683
|
-
file:
|
|
1684
|
-
thumbnailUrl:
|
|
1685
|
-
duration:
|
|
1675
|
+
videos: r.slice(1).map((_, M) => ({
|
|
1676
|
+
videoId: _.mediaId || String(M + 1),
|
|
1677
|
+
// Use mediaId if available
|
|
1678
|
+
title: _.title,
|
|
1679
|
+
file: _.hlsUrl,
|
|
1680
|
+
thumbnailUrl: _.thumbnailUrl,
|
|
1681
|
+
duration: _.duration
|
|
1686
1682
|
}))
|
|
1687
1683
|
}
|
|
1688
1684
|
},
|
|
@@ -1692,44 +1688,47 @@ const Er = me.div`
|
|
|
1692
1688
|
projectId: n || "vp-player-projectId",
|
|
1693
1689
|
video: {
|
|
1694
1690
|
...o.video,
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1691
|
+
videoId: ((m = r[Number(P)]) == null ? void 0 : m.mediaId) || ((v = r[0]) == null ? void 0 : v.mediaId),
|
|
1692
|
+
// Add videoId for tracking
|
|
1693
|
+
file: ((E = r[Number(P)]) == null ? void 0 : E.hlsUrl) || ((O = r[0]) == null ? void 0 : O.hlsUrl) || "",
|
|
1694
|
+
title: ((T = r[Number(P)]) == null ? void 0 : T.title) || ((j = r[0]) == null ? void 0 : j.title),
|
|
1695
|
+
thumbnail: (($ = r[Number(P)]) == null ? void 0 : $.thumbnailUrl) || ((y = r[0]) == null ? void 0 : y.thumbnailUrl),
|
|
1698
1696
|
playlist: {
|
|
1699
1697
|
state: !0,
|
|
1700
1698
|
// playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
|
|
1701
|
-
playlistVideoIndex: Number(
|
|
1702
|
-
videos: r.map((
|
|
1703
|
-
videoId: String(
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1699
|
+
playlistVideoIndex: Number(P),
|
|
1700
|
+
videos: r.map((_, M) => ({
|
|
1701
|
+
videoId: _.mediaId || String(M),
|
|
1702
|
+
// Use mediaId if available
|
|
1703
|
+
title: _.title,
|
|
1704
|
+
file: _.hlsUrl,
|
|
1705
|
+
thumbnailUrl: _.thumbnailUrl,
|
|
1706
|
+
duration: _.duration
|
|
1708
1707
|
}))
|
|
1709
1708
|
}
|
|
1710
1709
|
},
|
|
1711
1710
|
config: c
|
|
1712
1711
|
};
|
|
1713
1712
|
}
|
|
1714
|
-
const u = ((
|
|
1715
|
-
if (
|
|
1713
|
+
const u = ((G = a == null ? void 0 : a.video) == null ? void 0 : G.playlist) || o.video.playlist, h = (V = a == null ? void 0 : a.video) == null ? void 0 : V.file;
|
|
1714
|
+
if (h)
|
|
1716
1715
|
return {
|
|
1717
1716
|
...o,
|
|
1718
1717
|
video: {
|
|
1719
1718
|
...o.video,
|
|
1720
|
-
file:
|
|
1719
|
+
file: h,
|
|
1721
1720
|
playlist: void 0
|
|
1722
1721
|
// No playlist, just one video
|
|
1723
1722
|
},
|
|
1724
1723
|
config: c
|
|
1725
1724
|
};
|
|
1726
1725
|
if (u != null && u.videos && u.videos.length > 0) {
|
|
1727
|
-
const
|
|
1726
|
+
const P = u.videos[Number(u.playlistVideoIndex) || 0];
|
|
1728
1727
|
return {
|
|
1729
1728
|
...o,
|
|
1730
1729
|
video: {
|
|
1731
1730
|
...o.video,
|
|
1732
|
-
file: (
|
|
1731
|
+
file: (P == null ? void 0 : P.file) || "",
|
|
1733
1732
|
playlist: {
|
|
1734
1733
|
...u,
|
|
1735
1734
|
state: u.state ?? !0,
|
|
@@ -1750,179 +1749,179 @@ const Er = me.div`
|
|
|
1750
1749
|
return;
|
|
1751
1750
|
const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
|
|
1752
1751
|
return r ? r[2] : void 0;
|
|
1753
|
-
}, Vr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels:
|
|
1754
|
-
const w = de(null), k = de(null), g = de(!1), d = de(""),
|
|
1752
|
+
}, Vr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: h = !1, onPlaylistData: l, onVideoStarted: f }) => {
|
|
1753
|
+
const w = de(null), k = de(null), g = de(!1), d = de(""), m = de([]), v = de([]), E = de(null), { isLoaded: O, error: T } = Rr(r, o), j = t || Nr(o), [$, y] = ne(null), { fetchedPlaybackUrl: G, fetchedPlaylist: V, isLoading: P, error: U } = Or({
|
|
1755
1754
|
projectId: a,
|
|
1756
|
-
videoId:
|
|
1755
|
+
videoId: j,
|
|
1757
1756
|
playlistId: i,
|
|
1758
1757
|
videoUrl: n,
|
|
1759
1758
|
apiKey: u
|
|
1760
|
-
}),
|
|
1759
|
+
}), _ = qe(e, j);
|
|
1761
1760
|
we(() => {
|
|
1762
|
-
|
|
1763
|
-
}, [
|
|
1764
|
-
const
|
|
1765
|
-
const
|
|
1761
|
+
V && l && l(V);
|
|
1762
|
+
}, [V, l]);
|
|
1763
|
+
const M = ct(() => {
|
|
1764
|
+
const F = c.config || {}, z = h && !F.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : F.size || { sizeType: "FIXED", width: "100%" };
|
|
1766
1765
|
return {
|
|
1767
1766
|
...c,
|
|
1768
1767
|
config: {
|
|
1769
|
-
...
|
|
1770
|
-
size:
|
|
1768
|
+
...F,
|
|
1769
|
+
size: z
|
|
1771
1770
|
}
|
|
1772
1771
|
};
|
|
1773
|
-
}, [c,
|
|
1772
|
+
}, [c, h]);
|
|
1774
1773
|
return we(() => {
|
|
1775
1774
|
if (T) {
|
|
1776
|
-
|
|
1775
|
+
y(T);
|
|
1777
1776
|
return;
|
|
1778
1777
|
}
|
|
1779
|
-
if (!
|
|
1778
|
+
if (!O || P && !n)
|
|
1780
1779
|
return;
|
|
1781
|
-
let
|
|
1780
|
+
let F = !0;
|
|
1782
1781
|
const Q = setTimeout(async () => {
|
|
1783
1782
|
try {
|
|
1784
|
-
|
|
1785
|
-
const
|
|
1786
|
-
playerId:
|
|
1787
|
-
videoId: t ||
|
|
1783
|
+
m.current.forEach((L) => clearInterval(L)), m.current = [], v.current.forEach((L) => clearTimeout(L)), v.current = [], E.current = null;
|
|
1784
|
+
const X = (V == null ? void 0 : V.length) ?? 0, te = JSON.stringify({
|
|
1785
|
+
playerId: _,
|
|
1786
|
+
videoId: t || j,
|
|
1788
1787
|
playlistId: i,
|
|
1789
1788
|
videoUrl: n,
|
|
1790
1789
|
fetchedPlaybackUrl: G,
|
|
1791
1790
|
scriptUrl: o,
|
|
1792
|
-
isReels:
|
|
1791
|
+
isReels: h,
|
|
1793
1792
|
projectId: a,
|
|
1794
|
-
playlistLength:
|
|
1793
|
+
playlistLength: X
|
|
1795
1794
|
});
|
|
1796
1795
|
if (g.current && k.current && d.current === te)
|
|
1797
1796
|
return;
|
|
1798
1797
|
d.current !== te && (g.current = !1, d.current = te);
|
|
1799
1798
|
const re = o == null ? void 0 : o.includes("vertical-player");
|
|
1800
|
-
if (document.querySelectorAll('[id*="player"]').forEach((
|
|
1801
|
-
var ae,
|
|
1802
|
-
const ee =
|
|
1803
|
-
if (ee !==
|
|
1799
|
+
if (document.querySelectorAll('[id*="player"]').forEach((L) => {
|
|
1800
|
+
var ae, p;
|
|
1801
|
+
const ee = L.id;
|
|
1802
|
+
if (ee !== _)
|
|
1804
1803
|
try {
|
|
1805
|
-
const b = re ? (ae = window.vpVerticalPlayer) == null ? void 0 : ae.call(window, ee) : (
|
|
1804
|
+
const b = re ? (ae = window.vpVerticalPlayer) == null ? void 0 : ae.call(window, ee) : (p = window.vpPlayer) == null ? void 0 : p.call(window, ee);
|
|
1806
1805
|
b != null && b.destroy && b.destroy();
|
|
1807
1806
|
} catch (b) {
|
|
1808
1807
|
console.warn(`Failed to destroy existing player ${ee}:`, b);
|
|
1809
1808
|
}
|
|
1810
|
-
}), await new Promise((
|
|
1809
|
+
}), await new Promise((L) => setTimeout(L, 100)), !F || !w.current)
|
|
1811
1810
|
return;
|
|
1812
|
-
if (!document.getElementById(
|
|
1813
|
-
|
|
1811
|
+
if (!document.getElementById(_)) {
|
|
1812
|
+
y("DOM element not found after cleanup.");
|
|
1814
1813
|
return;
|
|
1815
1814
|
}
|
|
1816
1815
|
if (!window.vpPlayer && !window.vpVerticalPlayer) {
|
|
1817
|
-
|
|
1816
|
+
y("VP Player script not loaded.");
|
|
1818
1817
|
return;
|
|
1819
1818
|
}
|
|
1820
|
-
const
|
|
1821
|
-
if (
|
|
1822
|
-
|
|
1819
|
+
const N = re ? window.vpVerticalPlayer : window.vpPlayer;
|
|
1820
|
+
if (!N) {
|
|
1821
|
+
y(`VP ${re ? "Vertical " : ""}Player script not loaded.`);
|
|
1823
1822
|
return;
|
|
1824
1823
|
}
|
|
1825
|
-
const
|
|
1824
|
+
const B = $r({
|
|
1826
1825
|
videoUrl: n,
|
|
1827
1826
|
fetchedPlaybackUrl: G ?? void 0,
|
|
1828
|
-
fetchedPlaylist:
|
|
1827
|
+
fetchedPlaylist: V ?? void 0,
|
|
1829
1828
|
projectId: a,
|
|
1830
|
-
config:
|
|
1829
|
+
config: M,
|
|
1831
1830
|
isVerticalPlayer: re
|
|
1832
1831
|
// Pass player type to config builder
|
|
1833
|
-
}),
|
|
1834
|
-
if (!
|
|
1835
|
-
|
|
1832
|
+
}), A = N(_);
|
|
1833
|
+
if (!A) {
|
|
1834
|
+
y(`Failed to create VP ${re ? "Vertical " : ""}Player instance.`);
|
|
1836
1835
|
return;
|
|
1837
1836
|
}
|
|
1838
|
-
if (
|
|
1839
|
-
const
|
|
1837
|
+
if (F && w.current && (A.setup(B), k.current = A, g.current = !0, y(null), f && A.on)) {
|
|
1838
|
+
const L = () => {
|
|
1840
1839
|
var b;
|
|
1841
|
-
const
|
|
1842
|
-
if (
|
|
1843
|
-
const R =
|
|
1844
|
-
C && (
|
|
1845
|
-
} else
|
|
1846
|
-
return
|
|
1840
|
+
const p = {};
|
|
1841
|
+
if (V && V.length > 0) {
|
|
1842
|
+
const R = A.videoIndex ?? ((b = A.playlist) == null ? void 0 : b.playlistVideoIndex) ?? 0, C = V[R];
|
|
1843
|
+
C && (p.title = C.title, p.hlsUrl = C.hlsUrl, p.file = C.hlsUrl, p.thumbnailUrl = C.thumbnailUrl, p.duration = C.duration, p.videoIndex = R, p.playlistVideoIndex = R, p.isBackupPlaylist = C.isBackupPlaylist, p.mediaId = C.mediaId, p.videoId = C.mediaId || C.videoId);
|
|
1844
|
+
} else B.video && (p.title = B.video.title, p.file = B.video.file, p.hlsUrl = B.video.file, p.thumbnailUrl = B.video.thumbnail, p.videoId = t || j, p.videoIndex = 0, p.playlistVideoIndex = 0, A.getDuration && (p.duration = A.getDuration()));
|
|
1845
|
+
return p;
|
|
1847
1846
|
};
|
|
1848
1847
|
let ee = null;
|
|
1849
1848
|
const ae = async () => {
|
|
1850
|
-
var
|
|
1849
|
+
var p;
|
|
1851
1850
|
try {
|
|
1852
1851
|
ee && clearTimeout(ee), await new Promise((C) => setTimeout(C, 100));
|
|
1853
|
-
let b =
|
|
1852
|
+
let b = L();
|
|
1854
1853
|
const R = b.videoId || b.mediaId;
|
|
1855
1854
|
if (R && R === E.current)
|
|
1856
1855
|
return;
|
|
1857
1856
|
if (ee = window.setTimeout(() => {
|
|
1858
1857
|
E.current = null;
|
|
1859
|
-
}, 500),
|
|
1858
|
+
}, 500), h && R)
|
|
1860
1859
|
try {
|
|
1861
1860
|
const ce = `https://host.vpplayer.tech/player/ptkzurnx/${R}.json`, ue = await fetch(ce);
|
|
1862
1861
|
if (ue.ok) {
|
|
1863
|
-
const
|
|
1864
|
-
|
|
1862
|
+
const Y = await ue.json();
|
|
1863
|
+
Y && Y.video && (b = {
|
|
1865
1864
|
...b,
|
|
1866
|
-
title:
|
|
1867
|
-
description:
|
|
1868
|
-
publishDate:
|
|
1869
|
-
projectId:
|
|
1870
|
-
premium: ((
|
|
1871
|
-
author:
|
|
1872
|
-
tags:
|
|
1865
|
+
title: Y.video.title || b.title,
|
|
1866
|
+
description: Y.video.description,
|
|
1867
|
+
publishDate: Y.video.publishDate,
|
|
1868
|
+
projectId: Y.projectId || b.projectId,
|
|
1869
|
+
premium: ((p = Y.video.videoLocking) == null ? void 0 : p.isEnabled) || !1,
|
|
1870
|
+
author: Y.video.author,
|
|
1871
|
+
tags: Y.video.tags || []
|
|
1873
1872
|
});
|
|
1874
1873
|
}
|
|
1875
1874
|
} catch {
|
|
1876
1875
|
}
|
|
1877
|
-
E.current = R || null,
|
|
1876
|
+
E.current = R || null, f(b);
|
|
1878
1877
|
} catch (b) {
|
|
1879
1878
|
console.warn("Error in video-started handler:", b);
|
|
1880
1879
|
}
|
|
1881
1880
|
};
|
|
1882
|
-
if (
|
|
1883
|
-
let
|
|
1881
|
+
if (h) {
|
|
1882
|
+
let p = !1, b = -1;
|
|
1884
1883
|
const R = () => {
|
|
1885
|
-
if (!
|
|
1886
|
-
|
|
1884
|
+
if (!p) {
|
|
1885
|
+
p = !0;
|
|
1887
1886
|
try {
|
|
1888
|
-
|
|
1889
|
-
ae(), b =
|
|
1887
|
+
A.on && A.on("vp-video-started", ae), setTimeout(() => {
|
|
1888
|
+
ae(), b = A.videoIndex ?? 0;
|
|
1890
1889
|
}, 500);
|
|
1891
|
-
} catch (
|
|
1892
|
-
console.error("Error setting up event listeners:",
|
|
1890
|
+
} catch (Y) {
|
|
1891
|
+
console.error("Error setting up event listeners:", Y);
|
|
1893
1892
|
}
|
|
1894
1893
|
}
|
|
1895
1894
|
};
|
|
1896
1895
|
let C = 0;
|
|
1897
1896
|
const ce = 15, ue = setInterval(() => {
|
|
1898
1897
|
try {
|
|
1899
|
-
const
|
|
1900
|
-
if (!
|
|
1901
|
-
C++, (
|
|
1898
|
+
const Y = A.videoIndex !== void 0 || A.playlist;
|
|
1899
|
+
if (!p)
|
|
1900
|
+
C++, (Y || C >= ce) && R();
|
|
1902
1901
|
else {
|
|
1903
|
-
const fe =
|
|
1902
|
+
const fe = A.videoIndex ?? 0;
|
|
1904
1903
|
fe !== b && b !== -1 && (b = fe, ae());
|
|
1905
1904
|
}
|
|
1906
1905
|
} catch {
|
|
1907
1906
|
}
|
|
1908
1907
|
}, 200);
|
|
1909
|
-
|
|
1908
|
+
m.current.push(ue);
|
|
1910
1909
|
try {
|
|
1911
|
-
|
|
1910
|
+
A.on && A.on("vp-listen-ready", R);
|
|
1912
1911
|
} catch {
|
|
1913
1912
|
}
|
|
1914
1913
|
} else {
|
|
1915
|
-
const
|
|
1914
|
+
const p = async (b) => {
|
|
1916
1915
|
var R, C;
|
|
1917
1916
|
try {
|
|
1918
1917
|
const ce = o == null ? void 0 : o.match(/player\/([^/.]+)/), ue = ce == null ? void 0 : ce[1];
|
|
1919
1918
|
if (!ue || !b)
|
|
1920
|
-
return
|
|
1921
|
-
const
|
|
1919
|
+
return L();
|
|
1920
|
+
const Y = `https://host.vpplayer.tech/player/${ue}/${b}.json`, fe = await fetch(Y);
|
|
1922
1921
|
if (!fe.ok)
|
|
1923
|
-
return console.warn("Failed to fetch full video config:", fe.status),
|
|
1922
|
+
return console.warn("Failed to fetch full video config:", fe.status), L();
|
|
1924
1923
|
const K = await fe.json();
|
|
1925
|
-
return !K || !K.video ?
|
|
1924
|
+
return !K || !K.video ? L() : {
|
|
1926
1925
|
videoId: b,
|
|
1927
1926
|
title: K.video.title,
|
|
1928
1927
|
description: K.video.description,
|
|
@@ -1935,32 +1934,32 @@ const Er = me.div`
|
|
|
1935
1934
|
premium: ((R = K.video.videoLocking) == null ? void 0 : R.isEnabled) || !1,
|
|
1936
1935
|
author: K.video.author,
|
|
1937
1936
|
tags: K.video.tags || [],
|
|
1938
|
-
videoIndex:
|
|
1939
|
-
playlistVideoIndex: ((C =
|
|
1937
|
+
videoIndex: A.videoIndex ?? 0,
|
|
1938
|
+
playlistVideoIndex: ((C = A.playlist) == null ? void 0 : C.playlistVideoIndex) ?? 0
|
|
1940
1939
|
};
|
|
1941
1940
|
} catch (ce) {
|
|
1942
|
-
return console.warn("Error fetching full video data:", ce),
|
|
1941
|
+
return console.warn("Error fetching full video data:", ce), L();
|
|
1943
1942
|
}
|
|
1944
1943
|
};
|
|
1945
|
-
|
|
1944
|
+
A.on("ready", async (b) => {
|
|
1946
1945
|
try {
|
|
1947
|
-
const R = (b == null ? void 0 : b.id) || t ||
|
|
1946
|
+
const R = (b == null ? void 0 : b.id) || t || j;
|
|
1948
1947
|
if (R) {
|
|
1949
|
-
const C = await
|
|
1950
|
-
|
|
1948
|
+
const C = await p(R);
|
|
1949
|
+
f(C);
|
|
1951
1950
|
} else {
|
|
1952
|
-
const C =
|
|
1953
|
-
(C.title || C.file) &&
|
|
1951
|
+
const C = L();
|
|
1952
|
+
(C.title || C.file) && f(C);
|
|
1954
1953
|
}
|
|
1955
1954
|
} catch (R) {
|
|
1956
1955
|
console.warn("Error in ready handler:", R);
|
|
1957
1956
|
}
|
|
1958
|
-
}),
|
|
1957
|
+
}), A.on("playlistItem", async (b) => {
|
|
1959
1958
|
try {
|
|
1960
1959
|
const R = b == null ? void 0 : b.id;
|
|
1961
1960
|
if (R) {
|
|
1962
|
-
const C = await
|
|
1963
|
-
|
|
1961
|
+
const C = await p(R);
|
|
1962
|
+
f(C);
|
|
1964
1963
|
}
|
|
1965
1964
|
} catch (R) {
|
|
1966
1965
|
console.warn("Error in playlistItem handler:", R);
|
|
@@ -1968,44 +1967,44 @@ const Er = me.div`
|
|
|
1968
1967
|
});
|
|
1969
1968
|
}
|
|
1970
1969
|
}
|
|
1971
|
-
} catch (
|
|
1972
|
-
if (
|
|
1973
|
-
const te =
|
|
1974
|
-
|
|
1970
|
+
} catch (X) {
|
|
1971
|
+
if (F) {
|
|
1972
|
+
const te = X instanceof Error ? X.message : String(X);
|
|
1973
|
+
y(te), console.error("VP Player initialization error:", X);
|
|
1975
1974
|
}
|
|
1976
1975
|
}
|
|
1977
1976
|
}, 150);
|
|
1978
1977
|
return () => {
|
|
1979
|
-
|
|
1978
|
+
F = !1, clearTimeout(Q), m.current.forEach((X) => clearInterval(X)), m.current = [], v.current.forEach((X) => clearTimeout(X)), v.current = [], g.current = !1;
|
|
1980
1979
|
};
|
|
1981
1980
|
}, [
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1981
|
+
O,
|
|
1982
|
+
P,
|
|
1983
|
+
_,
|
|
1985
1984
|
T,
|
|
1986
1985
|
o
|
|
1987
1986
|
]), we(() => () => {
|
|
1988
1987
|
if (k.current) {
|
|
1989
1988
|
try {
|
|
1990
1989
|
k.current.destroy && k.current.destroy();
|
|
1991
|
-
} catch (
|
|
1992
|
-
console.warn(`Failed to destroy player ${
|
|
1990
|
+
} catch (z) {
|
|
1991
|
+
console.warn(`Failed to destroy player ${_}:`, z);
|
|
1993
1992
|
}
|
|
1994
1993
|
k.current = null;
|
|
1995
1994
|
}
|
|
1996
1995
|
g.current = !1;
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
}, [
|
|
1996
|
+
const F = document.getElementById(_);
|
|
1997
|
+
F && (F.innerHTML = "");
|
|
1998
|
+
}, [_]), {
|
|
2000
1999
|
playerRef: w,
|
|
2001
2000
|
playerInstanceRef: k,
|
|
2002
|
-
isScriptLoaded:
|
|
2003
|
-
isLoading:
|
|
2004
|
-
error:
|
|
2001
|
+
isScriptLoaded: O,
|
|
2002
|
+
isLoading: P,
|
|
2003
|
+
error: U || $ || T
|
|
2005
2004
|
};
|
|
2006
|
-
}, Lr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels:
|
|
2007
|
-
var
|
|
2008
|
-
const { playerRef: d, playerInstanceRef:
|
|
2005
|
+
}, Lr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: o, config: c = {}, apiKey: u, isReels: h = !1, hiddenClasses: l = [], onClose: f, className: w, onPlaylistData: k, onVideoStarted: g }) => {
|
|
2006
|
+
var U, _, M, F;
|
|
2007
|
+
const { playerRef: d, playerInstanceRef: m, isScriptLoaded: v, isLoading: E, error: O } = Vr({
|
|
2009
2008
|
playerId: e,
|
|
2010
2009
|
videoId: t,
|
|
2011
2010
|
version: r,
|
|
@@ -2015,31 +2014,31 @@ const Er = me.div`
|
|
|
2015
2014
|
scriptUrl: o,
|
|
2016
2015
|
config: c,
|
|
2017
2016
|
apiKey: u,
|
|
2018
|
-
isReels:
|
|
2017
|
+
isReels: h,
|
|
2019
2018
|
onPlaylistData: k,
|
|
2020
2019
|
onVideoStarted: g
|
|
2021
|
-
}), [T,
|
|
2022
|
-
var
|
|
2023
|
-
|
|
2024
|
-
}, G = (
|
|
2025
|
-
return
|
|
2020
|
+
}), [T, j] = ne(!0), $ = () => h && j(!0), y = () => {
|
|
2021
|
+
var z, Q;
|
|
2022
|
+
j(!1), (Q = (z = m.current) == null ? void 0 : z.play) == null || Q.call(z), f == null || f();
|
|
2023
|
+
}, G = (_ = (U = c == null ? void 0 : c.config) == null ? void 0 : U.size) != null && _.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, V = (F = (M = c == null ? void 0 : c.config) == null ? void 0 : M.size) != null && F.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0, P = qe(e, t);
|
|
2024
|
+
return O ? W.jsxs(Me, { type: "error", children: ["An error occurred: ", O] }) : E || !v ? W.jsx(Me, { type: "loading", children: "Loading..." }) : W.jsxs(W.Fragment, { children: [h && !T ? W.jsx("div", { onClick: $ }) : null, !h && W.jsx("div", { children: W.jsx(it, { id: P, ref: d, width: G || "100%", height: V || "auto", $hiddenClasses: l, className: w }) }, P), h && T && W.jsx(Pr, { onClick: y, className: w, children: W.jsx(_r, { className: w, onClick: (z) => z.stopPropagation(), children: W.jsx("div", { children: W.jsx(it, { id: P, ref: d, width: "100%", height: "auto", $hiddenClasses: l, className: w }) }, P) }) })] });
|
|
2026
2025
|
}, xt = Et(void 0), Br = ({ children: e }) => {
|
|
2027
2026
|
const [t, r] = ne(!1), [n, a] = ne(null), [i, o] = ne(null), c = Ge((l) => {
|
|
2028
2027
|
try {
|
|
2029
|
-
const
|
|
2030
|
-
a({ ...l, playerId:
|
|
2028
|
+
const f = qe(l.playerId, l.videoId);
|
|
2029
|
+
a({ ...l, playerId: f }), r(!0), o(null);
|
|
2031
2030
|
} catch {
|
|
2032
2031
|
o("Failed to show player.");
|
|
2033
2032
|
}
|
|
2034
2033
|
}, []), u = Ge(() => {
|
|
2035
2034
|
r(!1), a(null), o(null);
|
|
2036
|
-
}, []),
|
|
2035
|
+
}, []), h = ct(() => ({
|
|
2037
2036
|
showPlayer: c,
|
|
2038
2037
|
hidePlayer: u,
|
|
2039
2038
|
isPlayerVisible: t,
|
|
2040
2039
|
playerParams: n
|
|
2041
2040
|
}), [c, u, t, n]);
|
|
2042
|
-
return
|
|
2041
|
+
return W.jsxs(xt.Provider, { value: h, children: [e, i && W.jsx(Me, { type: "error", children: i }), t && (n == null ? void 0 : n.playerId) && W.jsx(Lr, { playerId: n.playerId, videoId: n.videoId, projectId: n.projectId, videoUrl: n.videoUrl, version: n.version, playlistId: n.playlistId, scriptUrl: n.scriptUrl, config: n.config, isReels: n.isReels, thumbnailUrl: n.thumbnailUrl, onClose: u, hiddenClasses: n.hiddenClasses || [], apiKey: n.apiKey, className: n.className })] });
|
|
2043
2042
|
}, Dr = () => {
|
|
2044
2043
|
const e = st(xt);
|
|
2045
2044
|
if (!e)
|
|
@@ -2140,6 +2139,6 @@ export {
|
|
|
2140
2139
|
Wr as getAdConfig,
|
|
2141
2140
|
Dr as useVPPlayer,
|
|
2142
2141
|
Vr as useVPPlayerLogic,
|
|
2143
|
-
|
|
2142
|
+
Rr as useVPPlayerScript,
|
|
2144
2143
|
Or as useVideoData
|
|
2145
2144
|
};
|