@aigamo/nostalgic-diva 1.16.9 → 1.17.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/dist/AudioPlayer-BZVzeLpd.cjs +2 -0
- package/dist/{AudioPlayer-BSoA0atW.cjs.map → AudioPlayer-BZVzeLpd.cjs.map} +1 -1
- package/dist/{AudioPlayer-C6cCMWWw.js → AudioPlayer-D6hktnhD.js} +6 -7
- package/dist/{AudioPlayer-C6cCMWWw.js.map → AudioPlayer-D6hktnhD.js.map} +1 -1
- package/dist/DailymotionPlayer-Bi8E4whf.cjs +2 -0
- package/dist/{DailymotionPlayer-pgc9u0XA.cjs.map → DailymotionPlayer-Bi8E4whf.cjs.map} +1 -1
- package/dist/{DailymotionPlayer-rl7eyJO7.js → DailymotionPlayer-NqmzC1es.js} +3 -4
- package/dist/{DailymotionPlayer-rl7eyJO7.js.map → DailymotionPlayer-NqmzC1es.js.map} +1 -1
- package/dist/NiconicoPlayer-CJGCtIIc.cjs +2 -0
- package/dist/{NiconicoPlayer-BgqhLgtu.cjs.map → NiconicoPlayer-CJGCtIIc.cjs.map} +1 -1
- package/dist/{NiconicoPlayer-t_yI_jY1.js → NiconicoPlayer-mu8oAJRF.js} +6 -7
- package/dist/{NiconicoPlayer-t_yI_jY1.js.map → NiconicoPlayer-mu8oAJRF.js.map} +1 -1
- package/dist/SoundCloudPlayer-BP5pJQjT.cjs +2 -0
- package/dist/{SoundCloudPlayer-CJxrp_Af.cjs.map → SoundCloudPlayer-BP5pJQjT.cjs.map} +1 -1
- package/dist/{SoundCloudPlayer-IoMG-qjP.js → SoundCloudPlayer-CMm5InlF.js} +13 -14
- package/dist/{SoundCloudPlayer-IoMG-qjP.js.map → SoundCloudPlayer-CMm5InlF.js.map} +1 -1
- package/dist/TwitchPlayer-CMQ4ZQB0.cjs +2 -0
- package/dist/{TwitchPlayer-DkzrjCro.cjs.map → TwitchPlayer-CMQ4ZQB0.cjs.map} +1 -1
- package/dist/{TwitchPlayer-DZYWi-co.js → TwitchPlayer-EgP5jHii.js} +12 -13
- package/dist/{TwitchPlayer-DZYWi-co.js.map → TwitchPlayer-EgP5jHii.js.map} +1 -1
- package/dist/{VimeoPlayer-iwzPBDrd.js → VimeoPlayer-BAYaY4oI.js} +9 -10
- package/dist/{VimeoPlayer-iwzPBDrd.js.map → VimeoPlayer-BAYaY4oI.js.map} +1 -1
- package/dist/VimeoPlayer-CvFLZFMf.cjs +2 -0
- package/dist/{VimeoPlayer-BAFjSxqt.cjs.map → VimeoPlayer-CvFLZFMf.cjs.map} +1 -1
- package/dist/YouTubePlayer-B1_fn24Y.cjs +2 -0
- package/dist/{YouTubePlayer-DKoJ5sID.cjs.map → YouTubePlayer-B1_fn24Y.cjs.map} +1 -1
- package/dist/{YouTubePlayer-CyrztH-W.js → YouTubePlayer-CT5Q9YWC.js} +7 -8
- package/dist/{YouTubePlayer-CyrztH-W.js.map → YouTubePlayer-CT5Q9YWC.js.map} +1 -1
- package/dist/components/NostalgicDiva.d.ts +4 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/controllers/PlayerController.d.ts +1 -10
- package/dist/controllers/index.d.ts +1 -0
- package/dist/{ensureScriptLoaded-CrePAY3C.js → ensureScriptLoaded-O_gkv8-u.js} +2 -2
- package/dist/{ensureScriptLoaded-CrePAY3C.js.map → ensureScriptLoaded-O_gkv8-u.js.map} +1 -1
- package/dist/{ensureScriptLoaded-gJ9wjztg.cjs → ensureScriptLoaded-jXzaqDQh.cjs} +2 -2
- package/dist/{ensureScriptLoaded-gJ9wjztg.cjs.map → ensureScriptLoaded-jXzaqDQh.cjs.map} +1 -1
- package/dist/index-B8wtI_1x.cjs +15 -0
- package/dist/index-B8wtI_1x.cjs.map +1 -0
- package/dist/{index-Dl2QgR_t.js → index-CLTpMeB0.js} +746 -683
- package/dist/index-CLTpMeB0.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +18 -15
- package/dist/services/AudioVideoService.d.ts +1 -2
- package/dist/services/DailymotionVideoService.d.ts +1 -2
- package/dist/services/NiconicoVideoService.d.ts +1 -2
- package/dist/services/SoundCloudVideoService.d.ts +1 -2
- package/dist/services/TwitchVideoService.d.ts +1 -2
- package/dist/services/VideoService.d.ts +3 -3
- package/dist/services/VimeoVideoService.d.ts +1 -2
- package/dist/services/YouTubeVideoService.d.ts +1 -2
- package/dist/services/findVideoService.d.ts +3 -10
- package/dist/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/AudioPlayer-BSoA0atW.cjs +0 -2
- package/dist/DailymotionPlayer-pgc9u0XA.cjs +0 -2
- package/dist/NiconicoPlayer-BgqhLgtu.cjs +0 -2
- package/dist/PlayerContainer-C5baCSwo.cjs +0 -2
- package/dist/PlayerContainer-C5baCSwo.cjs.map +0 -1
- package/dist/PlayerContainer-DX0Usz2N.js +0 -62
- package/dist/PlayerContainer-DX0Usz2N.js.map +0 -1
- package/dist/SoundCloudPlayer-CJxrp_Af.cjs +0 -2
- package/dist/TwitchPlayer-DkzrjCro.cjs +0 -2
- package/dist/VimeoPlayer-BAFjSxqt.cjs +0 -2
- package/dist/YouTubePlayer-DKoJ5sID.cjs +0 -2
- package/dist/index-BgnlhZhq.cjs +0 -15
- package/dist/index-BgnlhZhq.cjs.map +0 -1
- package/dist/index-Dl2QgR_t.js.map +0 -1
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var Z = { exports: {} },
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
var b,
|
|
11
|
-
|
|
12
|
-
for (b in f)
|
|
13
|
-
if (
|
|
14
|
-
return { $$typeof: e, type:
|
|
15
|
-
}
|
|
16
|
-
return
|
|
1
|
+
import Je, { createContext as Mt, useContext as At, useRef as L, useCallback as T, useMemo as Ot, lazy as U, memo as Ke, Suspense as jt, useState as je, useEffect as ue } from "react";
|
|
2
|
+
import Ut from "react-dom";
|
|
3
|
+
var Z = { exports: {} }, H = {};
|
|
4
|
+
var Ue;
|
|
5
|
+
function Ft() {
|
|
6
|
+
if (Ue) return H;
|
|
7
|
+
Ue = 1;
|
|
8
|
+
var n = Je, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, c = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
9
|
+
function R(w, f, C) {
|
|
10
|
+
var b, P = {}, k = null, I = null;
|
|
11
|
+
C !== void 0 && (k = "" + C), f.key !== void 0 && (k = "" + f.key), f.ref !== void 0 && (I = f.ref);
|
|
12
|
+
for (b in f) o.call(f, b) && !m.hasOwnProperty(b) && (P[b] = f[b]);
|
|
13
|
+
if (w && w.defaultProps) for (b in f = w.defaultProps, f) P[b] === void 0 && (P[b] = f[b]);
|
|
14
|
+
return { $$typeof: e, type: w, key: k, ref: I, props: P, _owner: c.current };
|
|
15
|
+
}
|
|
16
|
+
return H.Fragment = r, H.jsx = R, H.jsxs = R, H;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
return
|
|
22
|
-
var
|
|
23
|
-
function
|
|
18
|
+
var q = {};
|
|
19
|
+
var Fe;
|
|
20
|
+
function Yt() {
|
|
21
|
+
return Fe || (Fe = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
22
|
+
var n = Je, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), c = /* @__PURE__ */ Symbol.for("react.strict_mode"), m = /* @__PURE__ */ Symbol.for("react.profiler"), R = /* @__PURE__ */ Symbol.for("react.provider"), w = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), C = /* @__PURE__ */ Symbol.for("react.suspense"), b = /* @__PURE__ */ Symbol.for("react.suspense_list"), P = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.offscreen"), M = Symbol.iterator, x = "@@iterator";
|
|
23
|
+
function A(t) {
|
|
24
24
|
if (t === null || typeof t != "object")
|
|
25
25
|
return null;
|
|
26
|
-
var a =
|
|
26
|
+
var a = M && t[M] || t[x];
|
|
27
27
|
return typeof a == "function" ? a : null;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
30
|
-
function
|
|
29
|
+
var E = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
30
|
+
function d(t) {
|
|
31
31
|
{
|
|
32
|
-
for (var a = arguments.length,
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
|
|
33
|
+
i[s - 1] = arguments[s];
|
|
34
|
+
Qe("error", t, i);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Qe(t, a, i) {
|
|
38
38
|
{
|
|
39
|
-
var s =
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
return String(
|
|
39
|
+
var s = E.ReactDebugCurrentFrame, h = s.getStackAddendum();
|
|
40
|
+
h !== "" && (a += "%s", i = i.concat([h]));
|
|
41
|
+
var y = i.map(function(l) {
|
|
42
|
+
return String(l);
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
y.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, y);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
function
|
|
50
|
-
return !!(typeof t == "string" || typeof t == "function" || t ===
|
|
47
|
+
var et = !1, tt = !1, rt = !1, at = !1, nt = !1, he;
|
|
48
|
+
he = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
49
|
+
function it(t) {
|
|
50
|
+
return !!(typeof t == "string" || typeof t == "function" || t === o || t === m || nt || t === c || t === C || t === b || at || t === I || et || tt || rt || typeof t == "object" && t !== null && (t.$$typeof === k || t.$$typeof === P || t.$$typeof === R || t.$$typeof === w || t.$$typeof === f || // This needs to include all possible module reference object
|
|
51
51
|
// types supported by any Flight configuration anywhere since
|
|
52
52
|
// we don't know which Flight build this will end up being used
|
|
53
53
|
// with.
|
|
54
|
-
t.$$typeof ===
|
|
54
|
+
t.$$typeof === he || t.getModuleId !== void 0));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function st(t, a, i) {
|
|
57
57
|
var s = t.displayName;
|
|
58
58
|
if (s)
|
|
59
59
|
return s;
|
|
60
|
-
var
|
|
61
|
-
return
|
|
60
|
+
var h = a.displayName || a.name || "";
|
|
61
|
+
return h !== "" ? i + "(" + h + ")" : i;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function pe(t) {
|
|
64
64
|
return t.displayName || "Context";
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function N(t) {
|
|
67
67
|
if (t == null)
|
|
68
68
|
return null;
|
|
69
|
-
if (typeof t.tag == "number" &&
|
|
69
|
+
if (typeof t.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
70
70
|
return t.displayName || t.name || null;
|
|
71
71
|
if (typeof t == "string")
|
|
72
72
|
return t;
|
|
73
73
|
switch (t) {
|
|
74
|
-
case
|
|
74
|
+
case o:
|
|
75
75
|
return "Fragment";
|
|
76
76
|
case r:
|
|
77
77
|
return "Portal";
|
|
78
|
-
case
|
|
78
|
+
case m:
|
|
79
79
|
return "Profiler";
|
|
80
|
-
case
|
|
80
|
+
case c:
|
|
81
81
|
return "StrictMode";
|
|
82
|
-
case
|
|
82
|
+
case C:
|
|
83
83
|
return "Suspense";
|
|
84
84
|
case b:
|
|
85
85
|
return "SuspenseList";
|
|
86
86
|
}
|
|
87
87
|
if (typeof t == "object")
|
|
88
88
|
switch (t.$$typeof) {
|
|
89
|
-
case
|
|
89
|
+
case w:
|
|
90
90
|
var a = t;
|
|
91
|
-
return
|
|
92
|
-
case _:
|
|
93
|
-
var n = t;
|
|
94
|
-
return ce(n._context) + ".Provider";
|
|
95
|
-
case f:
|
|
96
|
-
return rt(t, t.render, "ForwardRef");
|
|
91
|
+
return pe(a) + ".Consumer";
|
|
97
92
|
case R:
|
|
93
|
+
var i = t;
|
|
94
|
+
return pe(i._context) + ".Provider";
|
|
95
|
+
case f:
|
|
96
|
+
return st(t, t.render, "ForwardRef");
|
|
97
|
+
case P:
|
|
98
98
|
var s = t.displayName || null;
|
|
99
|
-
return s !== null ? s :
|
|
99
|
+
return s !== null ? s : N(t.type) || "Memo";
|
|
100
100
|
case k: {
|
|
101
|
-
var
|
|
101
|
+
var h = t, y = h._payload, l = h._init;
|
|
102
102
|
try {
|
|
103
|
-
return
|
|
103
|
+
return N(l(y));
|
|
104
104
|
} catch {
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
@@ -108,18 +108,18 @@ function Ut() {
|
|
|
108
108
|
}
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
111
|
+
var O = Object.assign, G = 0, ye, fe, me, ve, ge, be, Ee;
|
|
112
|
+
function we() {
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
function
|
|
114
|
+
we.__reactDisabledLog = !0;
|
|
115
|
+
function ot() {
|
|
116
116
|
{
|
|
117
|
-
if (
|
|
118
|
-
|
|
117
|
+
if (G === 0) {
|
|
118
|
+
ye = console.log, fe = console.info, me = console.warn, ve = console.error, ge = console.group, be = console.groupCollapsed, Ee = console.groupEnd;
|
|
119
119
|
var t = {
|
|
120
120
|
configurable: !0,
|
|
121
121
|
enumerable: !0,
|
|
122
|
-
value:
|
|
122
|
+
value: we,
|
|
123
123
|
writable: !0
|
|
124
124
|
};
|
|
125
125
|
Object.defineProperties(console, {
|
|
@@ -132,332 +132,332 @@ function Ut() {
|
|
|
132
132
|
groupEnd: t
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
G++;
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function ut() {
|
|
139
139
|
{
|
|
140
|
-
if (
|
|
140
|
+
if (G--, G === 0) {
|
|
141
141
|
var t = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
147
|
-
log:
|
|
148
|
-
value:
|
|
147
|
+
log: O({}, t, {
|
|
148
|
+
value: ye
|
|
149
149
|
}),
|
|
150
|
-
info:
|
|
151
|
-
value:
|
|
150
|
+
info: O({}, t, {
|
|
151
|
+
value: fe
|
|
152
152
|
}),
|
|
153
|
-
warn:
|
|
154
|
-
value:
|
|
153
|
+
warn: O({}, t, {
|
|
154
|
+
value: me
|
|
155
155
|
}),
|
|
156
|
-
error:
|
|
157
|
-
value:
|
|
156
|
+
error: O({}, t, {
|
|
157
|
+
value: ve
|
|
158
158
|
}),
|
|
159
|
-
group:
|
|
160
|
-
value:
|
|
159
|
+
group: O({}, t, {
|
|
160
|
+
value: ge
|
|
161
161
|
}),
|
|
162
|
-
groupCollapsed:
|
|
163
|
-
value:
|
|
162
|
+
groupCollapsed: O({}, t, {
|
|
163
|
+
value: be
|
|
164
164
|
}),
|
|
165
|
-
groupEnd:
|
|
166
|
-
value:
|
|
165
|
+
groupEnd: O({}, t, {
|
|
166
|
+
value: Ee
|
|
167
167
|
})
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
G < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
var
|
|
174
|
-
function
|
|
173
|
+
var ee = E.ReactCurrentDispatcher, te;
|
|
174
|
+
function J(t, a, i) {
|
|
175
175
|
{
|
|
176
|
-
if (
|
|
176
|
+
if (te === void 0)
|
|
177
177
|
try {
|
|
178
178
|
throw Error();
|
|
179
|
-
} catch (
|
|
180
|
-
var s =
|
|
181
|
-
|
|
179
|
+
} catch (h) {
|
|
180
|
+
var s = h.stack.trim().match(/\n( *(at )?)/);
|
|
181
|
+
te = s && s[1] || "";
|
|
182
182
|
}
|
|
183
183
|
return `
|
|
184
|
-
` +
|
|
184
|
+
` + te + t;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var re = !1, K;
|
|
188
188
|
{
|
|
189
|
-
var
|
|
190
|
-
K = new
|
|
189
|
+
var lt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
190
|
+
K = new lt();
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
if (!t ||
|
|
192
|
+
function Ce(t, a) {
|
|
193
|
+
if (!t || re)
|
|
194
194
|
return "";
|
|
195
195
|
{
|
|
196
|
-
var
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
196
|
+
var i = K.get(t);
|
|
197
|
+
if (i !== void 0)
|
|
198
|
+
return i;
|
|
199
199
|
}
|
|
200
200
|
var s;
|
|
201
|
-
|
|
202
|
-
var
|
|
201
|
+
re = !0;
|
|
202
|
+
var h = Error.prepareStackTrace;
|
|
203
203
|
Error.prepareStackTrace = void 0;
|
|
204
|
-
var
|
|
205
|
-
|
|
204
|
+
var y;
|
|
205
|
+
y = ee.current, ee.current = null, ot();
|
|
206
206
|
try {
|
|
207
207
|
if (a) {
|
|
208
|
-
var
|
|
208
|
+
var l = function() {
|
|
209
209
|
throw Error();
|
|
210
210
|
};
|
|
211
|
-
if (Object.defineProperty(
|
|
211
|
+
if (Object.defineProperty(l.prototype, "props", {
|
|
212
212
|
set: function() {
|
|
213
213
|
throw Error();
|
|
214
214
|
}
|
|
215
215
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
216
216
|
try {
|
|
217
|
-
Reflect.construct(
|
|
218
|
-
} catch (
|
|
219
|
-
s =
|
|
217
|
+
Reflect.construct(l, []);
|
|
218
|
+
} catch (_) {
|
|
219
|
+
s = _;
|
|
220
220
|
}
|
|
221
|
-
Reflect.construct(t, [],
|
|
221
|
+
Reflect.construct(t, [], l);
|
|
222
222
|
} else {
|
|
223
223
|
try {
|
|
224
|
-
|
|
225
|
-
} catch (
|
|
226
|
-
s =
|
|
224
|
+
l.call();
|
|
225
|
+
} catch (_) {
|
|
226
|
+
s = _;
|
|
227
227
|
}
|
|
228
|
-
t.call(
|
|
228
|
+
t.call(l.prototype);
|
|
229
229
|
}
|
|
230
230
|
} else {
|
|
231
231
|
try {
|
|
232
232
|
throw Error();
|
|
233
|
-
} catch (
|
|
234
|
-
s =
|
|
233
|
+
} catch (_) {
|
|
234
|
+
s = _;
|
|
235
235
|
}
|
|
236
236
|
t();
|
|
237
237
|
}
|
|
238
|
-
} catch (
|
|
239
|
-
if (
|
|
240
|
-
for (var
|
|
241
|
-
`),
|
|
242
|
-
`),
|
|
243
|
-
|
|
244
|
-
for (;
|
|
245
|
-
if (
|
|
246
|
-
if (
|
|
238
|
+
} catch (_) {
|
|
239
|
+
if (_ && s && typeof _.stack == "string") {
|
|
240
|
+
for (var u = _.stack.split(`
|
|
241
|
+
`), D = s.stack.split(`
|
|
242
|
+
`), v = u.length - 1, g = D.length - 1; v >= 1 && g >= 0 && u[v] !== D[g]; )
|
|
243
|
+
g--;
|
|
244
|
+
for (; v >= 1 && g >= 0; v--, g--)
|
|
245
|
+
if (u[v] !== D[g]) {
|
|
246
|
+
if (v !== 1 || g !== 1)
|
|
247
247
|
do
|
|
248
|
-
if (
|
|
249
|
-
var
|
|
250
|
-
` +
|
|
251
|
-
return t.displayName &&
|
|
248
|
+
if (v--, g--, g < 0 || u[v] !== D[g]) {
|
|
249
|
+
var S = `
|
|
250
|
+
` + u[v].replace(" at new ", " at ");
|
|
251
|
+
return t.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", t.displayName)), typeof t == "function" && K.set(t, S), S;
|
|
252
252
|
}
|
|
253
|
-
while (
|
|
253
|
+
while (v >= 1 && g >= 0);
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
} finally {
|
|
258
|
-
|
|
258
|
+
re = !1, ee.current = y, ut(), Error.prepareStackTrace = h;
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
return typeof t == "function" && K.set(t,
|
|
260
|
+
var W = t ? t.displayName || t.name : "", j = W ? J(W) : "";
|
|
261
|
+
return typeof t == "function" && K.set(t, j), j;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function ct(t, a, i) {
|
|
264
|
+
return Ce(t, !1);
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function dt(t) {
|
|
267
267
|
var a = t.prototype;
|
|
268
268
|
return !!(a && a.isReactComponent);
|
|
269
269
|
}
|
|
270
|
-
function z(t, a,
|
|
270
|
+
function z(t, a, i) {
|
|
271
271
|
if (t == null)
|
|
272
272
|
return "";
|
|
273
273
|
if (typeof t == "function")
|
|
274
|
-
return
|
|
274
|
+
return Ce(t, dt(t));
|
|
275
275
|
if (typeof t == "string")
|
|
276
|
-
return
|
|
276
|
+
return J(t);
|
|
277
277
|
switch (t) {
|
|
278
|
-
case
|
|
279
|
-
return
|
|
278
|
+
case C:
|
|
279
|
+
return J("Suspense");
|
|
280
280
|
case b:
|
|
281
|
-
return
|
|
281
|
+
return J("SuspenseList");
|
|
282
282
|
}
|
|
283
283
|
if (typeof t == "object")
|
|
284
284
|
switch (t.$$typeof) {
|
|
285
285
|
case f:
|
|
286
|
-
return
|
|
287
|
-
case
|
|
288
|
-
return z(t.type, a,
|
|
286
|
+
return ct(t.render);
|
|
287
|
+
case P:
|
|
288
|
+
return z(t.type, a, i);
|
|
289
289
|
case k: {
|
|
290
|
-
var s = t,
|
|
290
|
+
var s = t, h = s._payload, y = s._init;
|
|
291
291
|
try {
|
|
292
|
-
return z(h
|
|
292
|
+
return z(y(h), a, i);
|
|
293
293
|
} catch {
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
return "";
|
|
298
298
|
}
|
|
299
|
-
var
|
|
299
|
+
var B = Object.prototype.hasOwnProperty, Pe = {}, Te = E.ReactDebugCurrentFrame;
|
|
300
300
|
function X(t) {
|
|
301
301
|
if (t) {
|
|
302
|
-
var a = t._owner,
|
|
303
|
-
|
|
302
|
+
var a = t._owner, i = z(t.type, t._source, a ? a.type : null);
|
|
303
|
+
Te.setExtraStackFrame(i);
|
|
304
304
|
} else
|
|
305
|
-
|
|
305
|
+
Te.setExtraStackFrame(null);
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function ht(t, a, i, s, h) {
|
|
308
308
|
{
|
|
309
|
-
var
|
|
310
|
-
for (var
|
|
311
|
-
if (
|
|
312
|
-
var
|
|
309
|
+
var y = Function.call.bind(B);
|
|
310
|
+
for (var l in t)
|
|
311
|
+
if (y(t, l)) {
|
|
312
|
+
var u = void 0;
|
|
313
313
|
try {
|
|
314
|
-
if (typeof t[
|
|
315
|
-
var
|
|
316
|
-
throw
|
|
314
|
+
if (typeof t[l] != "function") {
|
|
315
|
+
var D = Error((s || "React class") + ": " + i + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
316
|
+
throw D.name = "Invariant Violation", D;
|
|
317
317
|
}
|
|
318
|
-
|
|
319
|
-
} catch (
|
|
320
|
-
|
|
318
|
+
u = t[l](a, l, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
319
|
+
} catch (v) {
|
|
320
|
+
u = v;
|
|
321
321
|
}
|
|
322
|
-
|
|
322
|
+
u && !(u instanceof Error) && (X(h), d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", i, l, typeof u), X(null)), u instanceof Error && !(u.message in Pe) && (Pe[u.message] = !0, X(h), d("Failed %s type: %s", i, u.message), X(null));
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
function
|
|
328
|
-
return
|
|
326
|
+
var pt = Array.isArray;
|
|
327
|
+
function ae(t) {
|
|
328
|
+
return pt(t);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function yt(t) {
|
|
331
331
|
{
|
|
332
|
-
var a = typeof Symbol == "function" && Symbol.toStringTag,
|
|
333
|
-
return
|
|
332
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, i = a && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
333
|
+
return i;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ft(t) {
|
|
337
337
|
try {
|
|
338
|
-
return
|
|
338
|
+
return Re(t), !1;
|
|
339
339
|
} catch {
|
|
340
340
|
return !0;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Re(t) {
|
|
344
344
|
return "" + t;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
if (
|
|
348
|
-
return
|
|
346
|
+
function De(t) {
|
|
347
|
+
if (ft(t))
|
|
348
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yt(t)), Re(t);
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var _e = E.ReactCurrentOwner, mt = {
|
|
351
351
|
key: !0,
|
|
352
352
|
ref: !0,
|
|
353
353
|
__self: !0,
|
|
354
354
|
__source: !0
|
|
355
|
-
},
|
|
356
|
-
function
|
|
357
|
-
if (
|
|
355
|
+
}, ke, Se;
|
|
356
|
+
function vt(t) {
|
|
357
|
+
if (B.call(t, "ref")) {
|
|
358
358
|
var a = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
359
359
|
if (a && a.isReactWarning)
|
|
360
360
|
return !1;
|
|
361
361
|
}
|
|
362
362
|
return t.ref !== void 0;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
365
|
-
if (
|
|
364
|
+
function gt(t) {
|
|
365
|
+
if (B.call(t, "key")) {
|
|
366
366
|
var a = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
367
367
|
if (a && a.isReactWarning)
|
|
368
368
|
return !1;
|
|
369
369
|
}
|
|
370
370
|
return t.key !== void 0;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
typeof t.ref == "string" &&
|
|
372
|
+
function bt(t, a) {
|
|
373
|
+
typeof t.ref == "string" && _e.current;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Et(t, a) {
|
|
376
376
|
{
|
|
377
|
-
var
|
|
378
|
-
|
|
377
|
+
var i = function() {
|
|
378
|
+
ke || (ke = !0, d("%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://reactjs.org/link/special-props)", a));
|
|
379
379
|
};
|
|
380
|
-
|
|
381
|
-
get:
|
|
380
|
+
i.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
381
|
+
get: i,
|
|
382
382
|
configurable: !0
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function wt(t, a) {
|
|
387
387
|
{
|
|
388
|
-
var
|
|
389
|
-
|
|
388
|
+
var i = function() {
|
|
389
|
+
Se || (Se = !0, d("%s: `ref` 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://reactjs.org/link/special-props)", a));
|
|
390
390
|
};
|
|
391
|
-
|
|
392
|
-
get:
|
|
391
|
+
i.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
392
|
+
get: i,
|
|
393
393
|
configurable: !0
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
var
|
|
398
|
-
var
|
|
397
|
+
var Ct = function(t, a, i, s, h, y, l) {
|
|
398
|
+
var u = {
|
|
399
399
|
// This tag allows us to uniquely identify this as a React Element
|
|
400
400
|
$$typeof: e,
|
|
401
401
|
// Built-in properties that belong on the element
|
|
402
402
|
type: t,
|
|
403
403
|
key: a,
|
|
404
|
-
ref:
|
|
405
|
-
props:
|
|
404
|
+
ref: i,
|
|
405
|
+
props: l,
|
|
406
406
|
// Record the component responsible for creating this element.
|
|
407
|
-
_owner:
|
|
407
|
+
_owner: y
|
|
408
408
|
};
|
|
409
|
-
return
|
|
409
|
+
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
410
410
|
configurable: !1,
|
|
411
411
|
enumerable: !1,
|
|
412
412
|
writable: !0,
|
|
413
413
|
value: !1
|
|
414
|
-
}), Object.defineProperty(
|
|
414
|
+
}), Object.defineProperty(u, "_self", {
|
|
415
415
|
configurable: !1,
|
|
416
416
|
enumerable: !1,
|
|
417
417
|
writable: !1,
|
|
418
418
|
value: s
|
|
419
|
-
}), Object.defineProperty(
|
|
419
|
+
}), Object.defineProperty(u, "_source", {
|
|
420
420
|
configurable: !1,
|
|
421
421
|
enumerable: !1,
|
|
422
422
|
writable: !1,
|
|
423
|
-
value:
|
|
424
|
-
}), Object.freeze && (Object.freeze(
|
|
423
|
+
value: h
|
|
424
|
+
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
425
425
|
};
|
|
426
|
-
function
|
|
426
|
+
function Pt(t, a, i, s, h) {
|
|
427
427
|
{
|
|
428
|
-
var
|
|
429
|
-
|
|
430
|
-
for (
|
|
431
|
-
|
|
428
|
+
var y, l = {}, u = null, D = null;
|
|
429
|
+
i !== void 0 && (De(i), u = "" + i), gt(a) && (De(a.key), u = "" + a.key), vt(a) && (D = a.ref, bt(a, h));
|
|
430
|
+
for (y in a)
|
|
431
|
+
B.call(a, y) && !mt.hasOwnProperty(y) && (l[y] = a[y]);
|
|
432
432
|
if (t && t.defaultProps) {
|
|
433
|
-
var
|
|
434
|
-
for (
|
|
435
|
-
|
|
433
|
+
var v = t.defaultProps;
|
|
434
|
+
for (y in v)
|
|
435
|
+
l[y] === void 0 && (l[y] = v[y]);
|
|
436
436
|
}
|
|
437
|
-
if (
|
|
438
|
-
var
|
|
439
|
-
|
|
437
|
+
if (u || D) {
|
|
438
|
+
var g = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
439
|
+
u && Et(l, g), D && wt(l, g);
|
|
440
440
|
}
|
|
441
|
-
return
|
|
441
|
+
return Ct(t, u, D, h, s, _e.current, l);
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
var
|
|
445
|
-
function
|
|
444
|
+
var ne = E.ReactCurrentOwner, Ve = E.ReactDebugCurrentFrame;
|
|
445
|
+
function $(t) {
|
|
446
446
|
if (t) {
|
|
447
|
-
var a = t._owner,
|
|
448
|
-
|
|
447
|
+
var a = t._owner, i = z(t.type, t._source, a ? a.type : null);
|
|
448
|
+
Ve.setExtraStackFrame(i);
|
|
449
449
|
} else
|
|
450
|
-
|
|
450
|
+
Ve.setExtraStackFrame(null);
|
|
451
451
|
}
|
|
452
452
|
var ie;
|
|
453
453
|
ie = !1;
|
|
454
|
-
function
|
|
454
|
+
function se(t) {
|
|
455
455
|
return typeof t == "object" && t !== null && t.$$typeof === e;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Ie() {
|
|
458
458
|
{
|
|
459
|
-
if (
|
|
460
|
-
var t =
|
|
459
|
+
if (ne.current) {
|
|
460
|
+
var t = N(ne.current.type);
|
|
461
461
|
if (t)
|
|
462
462
|
return `
|
|
463
463
|
|
|
@@ -466,152 +466,152 @@ Check the render method of \`` + t + "`.";
|
|
|
466
466
|
return "";
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function Tt(t) {
|
|
470
470
|
return "";
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
function
|
|
472
|
+
var xe = {};
|
|
473
|
+
function Rt(t) {
|
|
474
474
|
{
|
|
475
|
-
var a =
|
|
475
|
+
var a = Ie();
|
|
476
476
|
if (!a) {
|
|
477
|
-
var
|
|
478
|
-
|
|
477
|
+
var i = typeof t == "string" ? t : t.displayName || t.name;
|
|
478
|
+
i && (a = `
|
|
479
479
|
|
|
480
|
-
Check the top-level render call using <` +
|
|
480
|
+
Check the top-level render call using <` + i + ">.");
|
|
481
481
|
}
|
|
482
482
|
return a;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Ne(t, a) {
|
|
486
486
|
{
|
|
487
487
|
if (!t._store || t._store.validated || t.key != null)
|
|
488
488
|
return;
|
|
489
489
|
t._store.validated = !0;
|
|
490
|
-
var
|
|
491
|
-
if (
|
|
490
|
+
var i = Rt(a);
|
|
491
|
+
if (xe[i])
|
|
492
492
|
return;
|
|
493
|
-
|
|
493
|
+
xe[i] = !0;
|
|
494
494
|
var s = "";
|
|
495
|
-
t && t._owner && t._owner !==
|
|
495
|
+
t && t._owner && t._owner !== ne.current && (s = " It was passed a child from " + N(t._owner.type) + "."), $(t), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, s), $(null);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Me(t, a) {
|
|
499
499
|
{
|
|
500
500
|
if (typeof t != "object")
|
|
501
501
|
return;
|
|
502
|
-
if (
|
|
503
|
-
for (var
|
|
504
|
-
var s = t[
|
|
505
|
-
|
|
502
|
+
if (ae(t))
|
|
503
|
+
for (var i = 0; i < t.length; i++) {
|
|
504
|
+
var s = t[i];
|
|
505
|
+
se(s) && Ne(s, a);
|
|
506
506
|
}
|
|
507
|
-
else if (
|
|
507
|
+
else if (se(t))
|
|
508
508
|
t._store && (t._store.validated = !0);
|
|
509
509
|
else if (t) {
|
|
510
|
-
var
|
|
511
|
-
if (typeof
|
|
512
|
-
for (var
|
|
513
|
-
|
|
510
|
+
var h = A(t);
|
|
511
|
+
if (typeof h == "function" && h !== t.entries)
|
|
512
|
+
for (var y = h.call(t), l; !(l = y.next()).done; )
|
|
513
|
+
se(l.value) && Ne(l.value, a);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Dt(t) {
|
|
518
518
|
{
|
|
519
519
|
var a = t.type;
|
|
520
520
|
if (a == null || typeof a == "string")
|
|
521
521
|
return;
|
|
522
|
-
var
|
|
522
|
+
var i;
|
|
523
523
|
if (typeof a == "function")
|
|
524
|
-
|
|
524
|
+
i = a.propTypes;
|
|
525
525
|
else if (typeof a == "object" && (a.$$typeof === f || // Note: Memo only checks outer props here.
|
|
526
526
|
// Inner props are checked in the reconciler.
|
|
527
|
-
a.$$typeof ===
|
|
528
|
-
|
|
527
|
+
a.$$typeof === P))
|
|
528
|
+
i = a.propTypes;
|
|
529
529
|
else
|
|
530
530
|
return;
|
|
531
|
-
if (
|
|
532
|
-
var s =
|
|
533
|
-
|
|
531
|
+
if (i) {
|
|
532
|
+
var s = N(a);
|
|
533
|
+
ht(i, t.props, "prop", s, t);
|
|
534
534
|
} else if (a.PropTypes !== void 0 && !ie) {
|
|
535
535
|
ie = !0;
|
|
536
|
-
var
|
|
537
|
-
|
|
536
|
+
var h = N(a);
|
|
537
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
|
|
538
538
|
}
|
|
539
|
-
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved &&
|
|
539
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function _t(t) {
|
|
543
543
|
{
|
|
544
|
-
for (var a = Object.keys(t.props),
|
|
545
|
-
var s = a[
|
|
544
|
+
for (var a = Object.keys(t.props), i = 0; i < a.length; i++) {
|
|
545
|
+
var s = a[i];
|
|
546
546
|
if (s !== "children" && s !== "key") {
|
|
547
|
-
|
|
547
|
+
$(t), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), $(null);
|
|
548
548
|
break;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
t.ref !== null && (
|
|
551
|
+
t.ref !== null && ($(t), d("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
function
|
|
554
|
+
var Ae = {};
|
|
555
|
+
function Oe(t, a, i, s, h, y) {
|
|
556
556
|
{
|
|
557
|
-
var
|
|
558
|
-
if (!
|
|
559
|
-
var
|
|
560
|
-
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (
|
|
561
|
-
var
|
|
562
|
-
|
|
563
|
-
var
|
|
564
|
-
t === null ?
|
|
557
|
+
var l = it(t);
|
|
558
|
+
if (!l) {
|
|
559
|
+
var u = "";
|
|
560
|
+
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
561
|
+
var D = Tt();
|
|
562
|
+
D ? u += D : u += Ie();
|
|
563
|
+
var v;
|
|
564
|
+
t === null ? v = "null" : ae(t) ? v = "array" : t !== void 0 && t.$$typeof === e ? (v = "<" + (N(t.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : v = typeof t, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, u);
|
|
565
565
|
}
|
|
566
|
-
var
|
|
567
|
-
if (
|
|
568
|
-
return
|
|
569
|
-
if (
|
|
570
|
-
var
|
|
571
|
-
if (
|
|
566
|
+
var g = Pt(t, a, i, h, y);
|
|
567
|
+
if (g == null)
|
|
568
|
+
return g;
|
|
569
|
+
if (l) {
|
|
570
|
+
var S = a.children;
|
|
571
|
+
if (S !== void 0)
|
|
572
572
|
if (s)
|
|
573
|
-
if (
|
|
574
|
-
for (var
|
|
575
|
-
|
|
576
|
-
Object.freeze && Object.freeze(
|
|
573
|
+
if (ae(S)) {
|
|
574
|
+
for (var W = 0; W < S.length; W++)
|
|
575
|
+
Me(S[W], t);
|
|
576
|
+
Object.freeze && Object.freeze(S);
|
|
577
577
|
} else
|
|
578
|
-
|
|
578
|
+
d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
579
579
|
else
|
|
580
|
-
|
|
580
|
+
Me(S, t);
|
|
581
581
|
}
|
|
582
|
-
if (
|
|
583
|
-
var
|
|
584
|
-
return
|
|
585
|
-
}),
|
|
586
|
-
if (!
|
|
587
|
-
var
|
|
588
|
-
|
|
582
|
+
if (B.call(a, "key")) {
|
|
583
|
+
var j = N(t), _ = Object.keys(a).filter(function(Nt) {
|
|
584
|
+
return Nt !== "key";
|
|
585
|
+
}), oe = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
586
|
+
if (!Ae[j + oe]) {
|
|
587
|
+
var xt = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
|
|
588
|
+
d(`A props object containing a "key" prop is being spread into JSX:
|
|
589
589
|
let props = %s;
|
|
590
590
|
<%s {...props} />
|
|
591
591
|
React keys must be passed directly to JSX without using spread:
|
|
592
592
|
let props = %s;
|
|
593
|
-
<%s key={someKey} {...props} />`,
|
|
593
|
+
<%s key={someKey} {...props} />`, oe, j, xt, j), Ae[j + oe] = !0;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
return t ===
|
|
596
|
+
return t === o ? _t(g) : Dt(g), g;
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
599
|
+
function kt(t, a, i) {
|
|
600
|
+
return Oe(t, a, i, !0);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
603
|
-
return
|
|
602
|
+
function St(t, a, i) {
|
|
603
|
+
return Oe(t, a, i, !1);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
|
|
607
|
-
})()),
|
|
605
|
+
var Vt = St, It = kt;
|
|
606
|
+
q.Fragment = o, q.jsx = Vt, q.jsxs = It;
|
|
607
|
+
})()), q;
|
|
608
608
|
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
return
|
|
609
|
+
var Ye;
|
|
610
|
+
function $t() {
|
|
611
|
+
return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? Z.exports = Ft() : Z.exports = Yt()), Z.exports;
|
|
612
612
|
}
|
|
613
|
-
var
|
|
614
|
-
class
|
|
613
|
+
var V = $t(), p = /* @__PURE__ */ ((n) => (n[n.Trace = 0] = "Trace", n[n.Debug = 1] = "Debug", n[n.Information = 2] = "Information", n[n.Warning = 3] = "Warning", n[n.Error = 4] = "Error", n[n.Critical = 5] = "Critical", n[n.None = 6] = "None", n))(p || {});
|
|
614
|
+
class Wt {
|
|
615
615
|
title = "nostalgic-diva";
|
|
616
616
|
createMessage(e) {
|
|
617
617
|
return `[${this.title}] ${e}`;
|
|
@@ -628,22 +628,22 @@ class Ft {
|
|
|
628
628
|
isEnabled() {
|
|
629
629
|
return !0;
|
|
630
630
|
}
|
|
631
|
-
log(e, r, ...
|
|
631
|
+
log(e, r, ...o) {
|
|
632
632
|
switch (e) {
|
|
633
633
|
case 1:
|
|
634
|
-
this.debug(r, ...
|
|
634
|
+
this.debug(r, ...o);
|
|
635
635
|
break;
|
|
636
636
|
case 3:
|
|
637
|
-
this.warn(r, ...
|
|
637
|
+
this.warn(r, ...o);
|
|
638
638
|
break;
|
|
639
639
|
case 4:
|
|
640
|
-
this.error(r, ...
|
|
640
|
+
this.error(r, ...o);
|
|
641
641
|
break;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
const
|
|
646
|
-
class
|
|
645
|
+
const Lt = new Wt();
|
|
646
|
+
class Gt {
|
|
647
647
|
async attach() {
|
|
648
648
|
}
|
|
649
649
|
async detach() {
|
|
@@ -681,450 +681,310 @@ class Wt {
|
|
|
681
681
|
return !1;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
const
|
|
684
|
+
const Q = new Gt(), ze = Mt(
|
|
685
685
|
void 0
|
|
686
|
-
),
|
|
687
|
-
children:
|
|
688
|
-
logger: e =
|
|
686
|
+
), Bt = ({
|
|
687
|
+
children: n,
|
|
688
|
+
logger: e = Lt
|
|
689
689
|
}) => {
|
|
690
|
-
const r =
|
|
691
|
-
(
|
|
690
|
+
const r = L(Q), o = T(
|
|
691
|
+
(d) => {
|
|
692
692
|
e.log(
|
|
693
|
-
|
|
693
|
+
p.Debug,
|
|
694
694
|
"NostalgicDivaProvider.handleControllerChange",
|
|
695
695
|
r.current,
|
|
696
|
-
|
|
697
|
-
), r.current =
|
|
696
|
+
d
|
|
697
|
+
), r.current = d;
|
|
698
698
|
},
|
|
699
699
|
[e]
|
|
700
|
-
),
|
|
701
|
-
async (
|
|
700
|
+
), c = T(
|
|
701
|
+
async (d) => {
|
|
702
702
|
e.log(
|
|
703
|
-
|
|
703
|
+
p.Debug,
|
|
704
704
|
"NostalgicDivaProvider.loadVideo",
|
|
705
705
|
r.current
|
|
706
|
-
), await r.current.loadVideo(
|
|
706
|
+
), await r.current.loadVideo(d);
|
|
707
707
|
},
|
|
708
708
|
[e]
|
|
709
|
-
),
|
|
709
|
+
), m = T(async () => {
|
|
710
710
|
e.log(
|
|
711
|
-
|
|
711
|
+
p.Debug,
|
|
712
712
|
"NostalgicDivaProvider.play",
|
|
713
713
|
r.current
|
|
714
714
|
), await r.current.play();
|
|
715
|
-
}, [e]),
|
|
715
|
+
}, [e]), R = T(async () => {
|
|
716
716
|
e.log(
|
|
717
|
-
|
|
717
|
+
p.Debug,
|
|
718
718
|
"NostalgicDivaProvider.pause",
|
|
719
719
|
r.current
|
|
720
720
|
), await r.current.pause();
|
|
721
|
-
}, [e]),
|
|
722
|
-
async (
|
|
721
|
+
}, [e]), w = T(
|
|
722
|
+
async (d) => {
|
|
723
723
|
e.log(
|
|
724
|
-
|
|
724
|
+
p.Debug,
|
|
725
725
|
"NostalgicDivaProvider.setCurrentTime",
|
|
726
726
|
r.current
|
|
727
|
-
), await r.current.setCurrentTime(
|
|
727
|
+
), await r.current.setCurrentTime(d), await r.current.play();
|
|
728
728
|
},
|
|
729
729
|
[e]
|
|
730
|
-
), f =
|
|
731
|
-
async (
|
|
730
|
+
), f = T(
|
|
731
|
+
async (d) => {
|
|
732
732
|
e.log(
|
|
733
|
-
|
|
733
|
+
p.Debug,
|
|
734
734
|
"NostalgicDivaProvider.setVolume",
|
|
735
735
|
r.current
|
|
736
|
-
), await r.current.setVolume(
|
|
736
|
+
), await r.current.setVolume(d);
|
|
737
737
|
},
|
|
738
738
|
[e]
|
|
739
|
-
),
|
|
740
|
-
async (
|
|
739
|
+
), C = T(
|
|
740
|
+
async (d) => {
|
|
741
741
|
e.log(
|
|
742
|
-
|
|
742
|
+
p.Debug,
|
|
743
743
|
"NostalgicDivaProvider.setMuted",
|
|
744
744
|
r.current
|
|
745
|
-
), await r.current.setMuted(
|
|
745
|
+
), await r.current.setMuted(d);
|
|
746
746
|
},
|
|
747
747
|
[e]
|
|
748
|
-
), b =
|
|
749
|
-
async (
|
|
748
|
+
), b = T(
|
|
749
|
+
async (d) => {
|
|
750
750
|
e.log(
|
|
751
|
-
|
|
751
|
+
p.Debug,
|
|
752
752
|
"NostalgicDivaProvider.setPlaybackRate",
|
|
753
753
|
r.current
|
|
754
|
-
), await r.current.setPlaybackRate(
|
|
754
|
+
), await r.current.setPlaybackRate(d);
|
|
755
755
|
},
|
|
756
756
|
[e]
|
|
757
|
-
),
|
|
758
|
-
|
|
757
|
+
), P = T(async () => (e.log(
|
|
758
|
+
p.Debug,
|
|
759
759
|
"NostalgicDivaProvider.getDuration",
|
|
760
760
|
r.current
|
|
761
|
-
), await r.current.getDuration()), [e]), k =
|
|
762
|
-
|
|
761
|
+
), await r.current.getDuration()), [e]), k = T(async () => (e.log(
|
|
762
|
+
p.Debug,
|
|
763
763
|
"NostalgicDivaProvider.getCurrentTime",
|
|
764
764
|
r.current
|
|
765
|
-
), await r.current.getCurrentTime()), [e]),
|
|
766
|
-
|
|
765
|
+
), await r.current.getCurrentTime()), [e]), I = T(async () => (e.log(
|
|
766
|
+
p.Debug,
|
|
767
767
|
"NostalgicDivaProvider.getVolume",
|
|
768
768
|
r.current
|
|
769
|
-
), await r.current.getVolume()), [e]),
|
|
770
|
-
|
|
769
|
+
), await r.current.getVolume()), [e]), M = T(async () => (e.log(
|
|
770
|
+
p.Debug,
|
|
771
771
|
"NostalgicDivaProvider.getMuted",
|
|
772
772
|
r.current
|
|
773
|
-
), await r.current.getMuted()), [e]),
|
|
774
|
-
|
|
773
|
+
), await r.current.getMuted()), [e]), x = T(async () => (e.log(
|
|
774
|
+
p.Debug,
|
|
775
775
|
"NostalgicDivaProvider.getPlaybackRate",
|
|
776
776
|
r.current
|
|
777
|
-
), await r.current.getPlaybackRate()), [e]),
|
|
778
|
-
(
|
|
777
|
+
), await r.current.getPlaybackRate()), [e]), A = T(
|
|
778
|
+
(d) => r.current.supports(d),
|
|
779
779
|
[]
|
|
780
|
-
),
|
|
780
|
+
), E = Ot(
|
|
781
781
|
() => ({
|
|
782
782
|
logger: e,
|
|
783
|
-
handleControllerChange:
|
|
784
|
-
loadVideo:
|
|
785
|
-
play:
|
|
786
|
-
pause:
|
|
787
|
-
setCurrentTime:
|
|
783
|
+
handleControllerChange: o,
|
|
784
|
+
loadVideo: c,
|
|
785
|
+
play: m,
|
|
786
|
+
pause: R,
|
|
787
|
+
setCurrentTime: w,
|
|
788
788
|
setVolume: f,
|
|
789
|
-
setMuted:
|
|
789
|
+
setMuted: C,
|
|
790
790
|
setPlaybackRate: b,
|
|
791
|
-
getDuration:
|
|
791
|
+
getDuration: P,
|
|
792
792
|
getCurrentTime: k,
|
|
793
|
-
getVolume:
|
|
794
|
-
getMuted:
|
|
795
|
-
getPlaybackRate:
|
|
796
|
-
supports:
|
|
793
|
+
getVolume: I,
|
|
794
|
+
getMuted: M,
|
|
795
|
+
getPlaybackRate: x,
|
|
796
|
+
supports: A
|
|
797
797
|
}),
|
|
798
798
|
[
|
|
799
799
|
e,
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
800
|
+
o,
|
|
801
|
+
c,
|
|
802
|
+
m,
|
|
803
|
+
R,
|
|
804
|
+
w,
|
|
805
805
|
f,
|
|
806
|
-
|
|
806
|
+
C,
|
|
807
807
|
b,
|
|
808
|
-
|
|
808
|
+
P,
|
|
809
809
|
k,
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
810
|
+
I,
|
|
811
|
+
M,
|
|
812
|
+
x,
|
|
813
|
+
A
|
|
814
814
|
]
|
|
815
815
|
);
|
|
816
|
-
return /* @__PURE__ */
|
|
817
|
-
},
|
|
818
|
-
class
|
|
819
|
-
constructor(e, r, l) {
|
|
820
|
-
this.logger = e, this.player = r, this.options = l, this.logger.log(y.Debug, "ctor");
|
|
821
|
-
}
|
|
822
|
-
supports(e) {
|
|
823
|
-
return this[e] !== void 0;
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
var S = /* @__PURE__ */ ((i) => (i.Audio = "Audio", i.Dailymotion = "Dailymotion", i.Niconico = "Niconico", i.SoundCloud = "SoundCloud", i.Twitch = "Twitch", i.Vimeo = "Vimeo", i.YouTube = "YouTube", i))(S || {});
|
|
827
|
-
function lr(i) {
|
|
828
|
-
return S[i] !== void 0;
|
|
829
|
-
}
|
|
830
|
-
class He {
|
|
831
|
-
constructor(e, r, l, p, g) {
|
|
832
|
-
this.logger = e, this.type = r, this.player = l, this.options = p, this.controllerFactory = g, this.id = He.nextId++;
|
|
833
|
-
}
|
|
834
|
-
static nextId = 1;
|
|
835
|
-
id;
|
|
836
|
-
impl;
|
|
837
|
-
createMessage(e) {
|
|
838
|
-
return `${this.type}#${this.id} ${e}`;
|
|
839
|
-
}
|
|
840
|
-
debug(e, ...r) {
|
|
841
|
-
this.logger.log(
|
|
842
|
-
y.Debug,
|
|
843
|
-
this.createMessage(e),
|
|
844
|
-
...r
|
|
845
|
-
);
|
|
846
|
-
}
|
|
847
|
-
error(e, ...r) {
|
|
848
|
-
this.logger.log(
|
|
849
|
-
y.Error,
|
|
850
|
-
this.createMessage(e),
|
|
851
|
-
...r
|
|
852
|
-
);
|
|
853
|
-
}
|
|
854
|
-
async attach(e) {
|
|
855
|
-
if (this.debug("attach", e), this.impl) {
|
|
856
|
-
this.debug("player is already attached");
|
|
857
|
-
return;
|
|
858
|
-
}
|
|
859
|
-
this.debug("Attaching player..."), this.impl = new this.controllerFactory(
|
|
860
|
-
this.logger,
|
|
861
|
-
this.player,
|
|
862
|
-
this.options
|
|
863
|
-
), await this.impl.attach(e), this.debug("player attached");
|
|
864
|
-
}
|
|
865
|
-
createPlayerNotAttachedError() {
|
|
866
|
-
return this.error("player is not attached"), new Error("player is not attached");
|
|
867
|
-
}
|
|
868
|
-
createCommandNotSupportedError(e) {
|
|
869
|
-
return new Error(`${e} is not supported`);
|
|
870
|
-
}
|
|
871
|
-
async detach() {
|
|
872
|
-
if (this.debug("detach"), this.impl === void 0)
|
|
873
|
-
throw this.createPlayerNotAttachedError();
|
|
874
|
-
await this.impl.detach(), this.impl = void 0;
|
|
875
|
-
}
|
|
876
|
-
async loadVideo(e) {
|
|
877
|
-
if (this.debug("loadVideo", e), this.impl === void 0)
|
|
878
|
-
throw this.createPlayerNotAttachedError();
|
|
879
|
-
if (this.impl.loadVideo === void 0)
|
|
880
|
-
throw this.createCommandNotSupportedError("loadVideo");
|
|
881
|
-
this.debug("Loading video..."), await this.impl.loadVideo(e), this.debug("video loaded", e);
|
|
882
|
-
}
|
|
883
|
-
play() {
|
|
884
|
-
if (this.debug("play"), this.impl === void 0)
|
|
885
|
-
throw this.createPlayerNotAttachedError();
|
|
886
|
-
if (this.impl.play === void 0)
|
|
887
|
-
throw this.createCommandNotSupportedError("play");
|
|
888
|
-
return this.impl.play();
|
|
889
|
-
}
|
|
890
|
-
pause() {
|
|
891
|
-
if (this.debug("pause"), this.impl === void 0)
|
|
892
|
-
throw this.createPlayerNotAttachedError();
|
|
893
|
-
if (this.impl.pause === void 0)
|
|
894
|
-
throw this.createCommandNotSupportedError("pause");
|
|
895
|
-
return this.impl.pause();
|
|
896
|
-
}
|
|
897
|
-
setCurrentTime(e) {
|
|
898
|
-
if (this.debug("setCurrentTime", e), this.impl === void 0)
|
|
899
|
-
throw this.createPlayerNotAttachedError();
|
|
900
|
-
if (this.impl.setCurrentTime === void 0)
|
|
901
|
-
throw this.createCommandNotSupportedError("setCurrentTime");
|
|
902
|
-
return this.impl.setCurrentTime(e);
|
|
903
|
-
}
|
|
904
|
-
setVolume(e) {
|
|
905
|
-
if (this.debug("setVolume", e), this.impl === void 0)
|
|
906
|
-
throw this.createPlayerNotAttachedError();
|
|
907
|
-
if (this.impl.setVolume === void 0)
|
|
908
|
-
throw this.createCommandNotSupportedError("setVolume");
|
|
909
|
-
return this.impl.setVolume(e);
|
|
910
|
-
}
|
|
911
|
-
setMuted(e) {
|
|
912
|
-
if (this.debug("setMuted", e), this.impl === void 0)
|
|
913
|
-
throw this.createPlayerNotAttachedError();
|
|
914
|
-
if (this.impl.setMuted === void 0)
|
|
915
|
-
throw this.createCommandNotSupportedError("setMuted");
|
|
916
|
-
return this.impl.setMuted(e);
|
|
917
|
-
}
|
|
918
|
-
setPlaybackRate(e) {
|
|
919
|
-
if (this.debug("setPlaybackRate", e), this.impl === void 0)
|
|
920
|
-
throw this.createPlayerNotAttachedError();
|
|
921
|
-
if (this.impl.setPlaybackRate === void 0)
|
|
922
|
-
throw this.createCommandNotSupportedError("setPlaybackRate");
|
|
923
|
-
return this.impl.setPlaybackRate(e);
|
|
924
|
-
}
|
|
925
|
-
getDuration() {
|
|
926
|
-
if (this.debug("getDuration"), this.impl === void 0)
|
|
927
|
-
throw this.createPlayerNotAttachedError();
|
|
928
|
-
if (this.impl.getDuration === void 0)
|
|
929
|
-
throw this.createCommandNotSupportedError("getDuration");
|
|
930
|
-
return this.impl.getDuration();
|
|
931
|
-
}
|
|
932
|
-
getCurrentTime() {
|
|
933
|
-
if (this.debug("getCurrentTime"), this.impl === void 0)
|
|
934
|
-
throw this.createPlayerNotAttachedError();
|
|
935
|
-
if (this.impl.getCurrentTime === void 0)
|
|
936
|
-
throw this.createCommandNotSupportedError("getCurrentTime");
|
|
937
|
-
return this.impl.getCurrentTime();
|
|
938
|
-
}
|
|
939
|
-
getVolume() {
|
|
940
|
-
if (this.debug("getVolume"), this.impl === void 0)
|
|
941
|
-
throw this.createPlayerNotAttachedError();
|
|
942
|
-
if (this.impl.getVolume === void 0)
|
|
943
|
-
throw this.createCommandNotSupportedError("getVolume");
|
|
944
|
-
return this.impl.getVolume();
|
|
945
|
-
}
|
|
946
|
-
getMuted() {
|
|
947
|
-
if (this.debug("getMuted"), this.impl === void 0)
|
|
948
|
-
throw this.createPlayerNotAttachedError();
|
|
949
|
-
if (this.impl.getMuted === void 0)
|
|
950
|
-
throw this.createCommandNotSupportedError("getMuted");
|
|
951
|
-
return this.impl.getMuted();
|
|
952
|
-
}
|
|
953
|
-
getPlaybackRate() {
|
|
954
|
-
if (this.debug("getPlaybackRate"), this.impl === void 0)
|
|
955
|
-
throw this.createPlayerNotAttachedError();
|
|
956
|
-
if (this.impl.getPlaybackRate === void 0)
|
|
957
|
-
throw this.createCommandNotSupportedError("getPlaybackRate");
|
|
958
|
-
return this.impl.getPlaybackRate();
|
|
959
|
-
}
|
|
960
|
-
supports(e) {
|
|
961
|
-
if (this.impl === void 0)
|
|
962
|
-
throw this.createPlayerNotAttachedError();
|
|
963
|
-
return this.impl.supports(e);
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
class U {
|
|
816
|
+
return /* @__PURE__ */ V.jsx(ze.Provider, { value: E, children: n });
|
|
817
|
+
}, Ht = () => At(ze);
|
|
818
|
+
class F {
|
|
967
819
|
constructor(e) {
|
|
968
820
|
this.type = e;
|
|
969
821
|
}
|
|
970
822
|
}
|
|
971
|
-
const
|
|
972
|
-
class
|
|
823
|
+
const qt = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, Jt = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;
|
|
824
|
+
class Kt extends F {
|
|
973
825
|
constructor() {
|
|
974
|
-
super(
|
|
826
|
+
super("Audio");
|
|
975
827
|
}
|
|
976
828
|
canPlay(e) {
|
|
977
|
-
return
|
|
829
|
+
return qt.test(e) || Jt.test(e);
|
|
978
830
|
}
|
|
979
831
|
extractVideoId(e) {
|
|
980
832
|
return e;
|
|
981
833
|
}
|
|
982
834
|
}
|
|
983
|
-
const
|
|
984
|
-
class
|
|
835
|
+
const $e = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/;
|
|
836
|
+
class zt extends F {
|
|
985
837
|
constructor() {
|
|
986
|
-
super(
|
|
838
|
+
super("Dailymotion");
|
|
987
839
|
}
|
|
988
840
|
canPlay(e) {
|
|
989
|
-
return
|
|
841
|
+
return $e.test(e);
|
|
990
842
|
}
|
|
991
843
|
extractVideoId(e) {
|
|
992
|
-
return
|
|
844
|
+
return $e.exec(e)?.[1];
|
|
993
845
|
}
|
|
994
846
|
}
|
|
995
|
-
const
|
|
996
|
-
class
|
|
847
|
+
const We = /(?:www\.|)?nicovideo\.jp\/watch\/(\w+)$/;
|
|
848
|
+
class Xt extends F {
|
|
997
849
|
constructor() {
|
|
998
|
-
super(
|
|
850
|
+
super("Niconico");
|
|
999
851
|
}
|
|
1000
852
|
canPlay(e) {
|
|
1001
|
-
return
|
|
853
|
+
return We.test(e);
|
|
1002
854
|
}
|
|
1003
855
|
extractVideoId(e) {
|
|
1004
|
-
return
|
|
856
|
+
return We.exec(e)?.[1];
|
|
1005
857
|
}
|
|
1006
858
|
}
|
|
1007
|
-
const
|
|
1008
|
-
class
|
|
859
|
+
const Zt = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
860
|
+
class Qt extends F {
|
|
1009
861
|
constructor() {
|
|
1010
|
-
super(
|
|
862
|
+
super("SoundCloud");
|
|
1011
863
|
}
|
|
1012
864
|
canPlay(e) {
|
|
1013
|
-
return
|
|
865
|
+
return Zt.test(e);
|
|
1014
866
|
}
|
|
1015
867
|
extractVideoId(e) {
|
|
1016
868
|
return e;
|
|
1017
869
|
}
|
|
1018
870
|
}
|
|
1019
|
-
const
|
|
1020
|
-
class
|
|
871
|
+
const Le = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
872
|
+
class er extends F {
|
|
1021
873
|
constructor() {
|
|
1022
|
-
super(
|
|
874
|
+
super("Twitch");
|
|
1023
875
|
}
|
|
1024
876
|
canPlay(e) {
|
|
1025
|
-
return
|
|
877
|
+
return Le.test(e);
|
|
1026
878
|
}
|
|
1027
879
|
extractVideoId(e) {
|
|
1028
|
-
return
|
|
880
|
+
return Le.exec(e)?.[1];
|
|
1029
881
|
}
|
|
1030
882
|
}
|
|
1031
|
-
const
|
|
1032
|
-
class
|
|
883
|
+
const Ge = /vimeo\.com\/(\d+)$/;
|
|
884
|
+
class tr extends F {
|
|
1033
885
|
constructor() {
|
|
1034
|
-
super(
|
|
886
|
+
super("Vimeo");
|
|
1035
887
|
}
|
|
1036
888
|
canPlay(e) {
|
|
1037
|
-
return
|
|
889
|
+
return Ge.test(e);
|
|
1038
890
|
}
|
|
1039
891
|
extractVideoId(e) {
|
|
1040
|
-
return
|
|
892
|
+
return Ge.exec(e)?.[1];
|
|
1041
893
|
}
|
|
1042
894
|
}
|
|
1043
|
-
const
|
|
1044
|
-
class
|
|
895
|
+
const Be = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;
|
|
896
|
+
class rr extends F {
|
|
1045
897
|
constructor() {
|
|
1046
|
-
super(
|
|
898
|
+
super("YouTube");
|
|
1047
899
|
}
|
|
1048
900
|
canPlay(e) {
|
|
1049
|
-
return
|
|
901
|
+
return Be.test(e);
|
|
1050
902
|
}
|
|
1051
903
|
extractVideoId(e) {
|
|
1052
|
-
return
|
|
904
|
+
return Be.exec(e)?.[1];
|
|
1053
905
|
}
|
|
1054
906
|
}
|
|
1055
|
-
const
|
|
1056
|
-
new
|
|
1057
|
-
new
|
|
1058
|
-
new
|
|
1059
|
-
new
|
|
1060
|
-
new Zt(),
|
|
907
|
+
const ar = [
|
|
908
|
+
new rr(),
|
|
909
|
+
new er(),
|
|
910
|
+
new tr(),
|
|
911
|
+
new zt(),
|
|
1061
912
|
new Qt(),
|
|
1062
|
-
new
|
|
913
|
+
new Kt(),
|
|
914
|
+
new Xt()
|
|
1063
915
|
];
|
|
1064
|
-
function
|
|
1065
|
-
return
|
|
916
|
+
function nr(n) {
|
|
917
|
+
return ar.find((e) => e.canPlay(n));
|
|
1066
918
|
}
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
919
|
+
const ir = new Map(
|
|
920
|
+
Object.entries({
|
|
921
|
+
Audio: U(() => import("./AudioPlayer-D6hktnhD.js")),
|
|
922
|
+
Dailymotion: U(() => import("./DailymotionPlayer-NqmzC1es.js")),
|
|
923
|
+
Niconico: U(() => import("./NiconicoPlayer-mu8oAJRF.js")),
|
|
924
|
+
SoundCloud: U(() => import("./SoundCloudPlayer-CMm5InlF.js")),
|
|
925
|
+
Twitch: U(() => import("./TwitchPlayer-EgP5jHii.js")),
|
|
926
|
+
Vimeo: U(() => import("./VimeoPlayer-BAYaY4oI.js")),
|
|
927
|
+
YouTube: U(() => import("./YouTubePlayer-CT5Q9YWC.js"))
|
|
928
|
+
})
|
|
929
|
+
);
|
|
930
|
+
function sr(n) {
|
|
931
|
+
const e = nr(n);
|
|
1078
932
|
if (e === void 0)
|
|
1079
933
|
return;
|
|
1080
|
-
const { type: r, extractVideoId:
|
|
1081
|
-
if (
|
|
1082
|
-
return { type: r, videoId:
|
|
934
|
+
const { type: r, extractVideoId: o } = e, c = o(n);
|
|
935
|
+
if (c !== void 0)
|
|
936
|
+
return { type: r, videoId: c };
|
|
1083
937
|
}
|
|
1084
|
-
const
|
|
938
|
+
const He = Ke(() => /* @__PURE__ */ V.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ V.jsx(
|
|
939
|
+
"iframe",
|
|
940
|
+
{
|
|
941
|
+
src: "about:blank",
|
|
942
|
+
title: "about:blank",
|
|
943
|
+
style: {
|
|
944
|
+
width: "100%",
|
|
945
|
+
height: "100%",
|
|
946
|
+
border: 0
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
) })), or = Ke(
|
|
1085
950
|
({
|
|
1086
|
-
src:
|
|
951
|
+
src: n,
|
|
1087
952
|
options: e,
|
|
1088
953
|
onControllerChange: r
|
|
1089
954
|
}) => {
|
|
1090
|
-
const
|
|
1091
|
-
(
|
|
1092
|
-
|
|
955
|
+
const o = Ht(), c = T(
|
|
956
|
+
(C) => {
|
|
957
|
+
o.handleControllerChange(C), r?.(C);
|
|
1093
958
|
},
|
|
1094
|
-
[
|
|
959
|
+
[o, r]
|
|
1095
960
|
);
|
|
1096
|
-
|
|
1097
|
-
const
|
|
1098
|
-
if (
|
|
1099
|
-
return
|
|
1100
|
-
|
|
1101
|
-
{
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
) });
|
|
1111
|
-
const { type: _, videoId: T } = g, f = ar[_];
|
|
1112
|
-
return /* @__PURE__ */ O.jsx(Mt, { fallback: null, children: /* @__PURE__ */ O.jsx(
|
|
961
|
+
o.logger.log(p.Debug, "NostalgicDiva");
|
|
962
|
+
const m = sr(n);
|
|
963
|
+
if (m === void 0)
|
|
964
|
+
return o.logger.log(
|
|
965
|
+
p.Warning,
|
|
966
|
+
`Failed to extract type and videoId from src: "${n}". Returning EmptyPlayer.`
|
|
967
|
+
), /* @__PURE__ */ V.jsx(He, {});
|
|
968
|
+
const { type: R, videoId: w } = m, f = ir.get(R);
|
|
969
|
+
return f === void 0 ? (o.logger.log(
|
|
970
|
+
p.Warning,
|
|
971
|
+
`No player found for type "${R}" (videoId: "${w}"). Returning EmptyPlayer.`
|
|
972
|
+
), /* @__PURE__ */ V.jsx(He, {})) : /* @__PURE__ */ V.jsx(jt, { fallback: null, children: /* @__PURE__ */ V.jsx(
|
|
1113
973
|
f,
|
|
1114
974
|
{
|
|
1115
|
-
logger:
|
|
1116
|
-
type:
|
|
1117
|
-
onControllerChange:
|
|
1118
|
-
videoId:
|
|
975
|
+
logger: o.logger,
|
|
976
|
+
type: R,
|
|
977
|
+
onControllerChange: c,
|
|
978
|
+
videoId: w,
|
|
1119
979
|
options: e
|
|
1120
980
|
}
|
|
1121
981
|
) });
|
|
1122
982
|
}
|
|
1123
983
|
);
|
|
1124
|
-
class
|
|
984
|
+
class ur extends HTMLElement {
|
|
1125
985
|
static observedAttributes = ["src"];
|
|
1126
986
|
container;
|
|
1127
|
-
controller =
|
|
987
|
+
controller = Q;
|
|
1128
988
|
constructor() {
|
|
1129
989
|
super(), this.container = this.attachShadow({ mode: "closed" });
|
|
1130
990
|
}
|
|
@@ -1148,9 +1008,9 @@ class sr extends HTMLElement {
|
|
|
1148
1008
|
), this.controller = e;
|
|
1149
1009
|
};
|
|
1150
1010
|
#e() {
|
|
1151
|
-
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
|
|
1011
|
+
Ut.render(
|
|
1012
|
+
/* @__PURE__ */ V.jsx(Bt, { children: /* @__PURE__ */ V.jsx(
|
|
1013
|
+
or,
|
|
1154
1014
|
{
|
|
1155
1015
|
src: this.src,
|
|
1156
1016
|
options: this.#t,
|
|
@@ -1211,10 +1071,210 @@ class sr extends HTMLElement {
|
|
|
1211
1071
|
return this.controller.supports(e);
|
|
1212
1072
|
}
|
|
1213
1073
|
}
|
|
1214
|
-
function
|
|
1215
|
-
customElements.define("nostalgic-diva",
|
|
1074
|
+
function yr() {
|
|
1075
|
+
customElements.define("nostalgic-diva", ur);
|
|
1076
|
+
}
|
|
1077
|
+
function lr() {
|
|
1078
|
+
const n = L(!0);
|
|
1079
|
+
return n.current ? (n.current = !1, !0) : n.current;
|
|
1080
|
+
}
|
|
1081
|
+
const cr = (n, e) => n === e;
|
|
1082
|
+
function dr(n, e = cr) {
|
|
1083
|
+
const r = L(), o = L(n);
|
|
1084
|
+
return !lr() && !e(o.current, n) && (r.current = o.current, o.current = n), r.current;
|
|
1085
|
+
}
|
|
1086
|
+
class Y {
|
|
1087
|
+
constructor(e, r, o) {
|
|
1088
|
+
this.logger = e, this.player = r, this.options = o, this.logger.log(p.Debug, "ctor");
|
|
1089
|
+
}
|
|
1090
|
+
supports(e) {
|
|
1091
|
+
return this[e] !== void 0;
|
|
1092
|
+
}
|
|
1216
1093
|
}
|
|
1217
|
-
class
|
|
1094
|
+
class de {
|
|
1095
|
+
constructor(e, r, o, c, m) {
|
|
1096
|
+
this.logger = e, this.type = r, this.player = o, this.options = c, this.controllerFactory = m, this.id = de.nextId++;
|
|
1097
|
+
}
|
|
1098
|
+
static nextId = 1;
|
|
1099
|
+
id;
|
|
1100
|
+
impl;
|
|
1101
|
+
createMessage(e) {
|
|
1102
|
+
return `${this.type}#${this.id} ${e}`;
|
|
1103
|
+
}
|
|
1104
|
+
debug(e, ...r) {
|
|
1105
|
+
this.logger.log(
|
|
1106
|
+
p.Debug,
|
|
1107
|
+
this.createMessage(e),
|
|
1108
|
+
...r
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
error(e, ...r) {
|
|
1112
|
+
this.logger.log(
|
|
1113
|
+
p.Error,
|
|
1114
|
+
this.createMessage(e),
|
|
1115
|
+
...r
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
async attach(e) {
|
|
1119
|
+
if (this.debug("attach", e), this.impl) {
|
|
1120
|
+
this.debug("player is already attached");
|
|
1121
|
+
return;
|
|
1122
|
+
}
|
|
1123
|
+
this.debug("Attaching player..."), this.impl = new this.controllerFactory(
|
|
1124
|
+
this.logger,
|
|
1125
|
+
this.player,
|
|
1126
|
+
this.options
|
|
1127
|
+
), await this.impl.attach(e), this.debug("player attached");
|
|
1128
|
+
}
|
|
1129
|
+
createPlayerNotAttachedError() {
|
|
1130
|
+
return this.error("player is not attached"), new Error("player is not attached");
|
|
1131
|
+
}
|
|
1132
|
+
createCommandNotSupportedError(e) {
|
|
1133
|
+
return new Error(`${e} is not supported`);
|
|
1134
|
+
}
|
|
1135
|
+
async detach() {
|
|
1136
|
+
if (this.debug("detach"), this.impl === void 0)
|
|
1137
|
+
throw this.createPlayerNotAttachedError();
|
|
1138
|
+
await this.impl.detach(), this.impl = void 0;
|
|
1139
|
+
}
|
|
1140
|
+
async loadVideo(e) {
|
|
1141
|
+
if (this.debug("loadVideo", e), this.impl === void 0)
|
|
1142
|
+
throw this.createPlayerNotAttachedError();
|
|
1143
|
+
if (this.impl.loadVideo === void 0)
|
|
1144
|
+
throw this.createCommandNotSupportedError("loadVideo");
|
|
1145
|
+
this.debug("Loading video..."), await this.impl.loadVideo(e), this.debug("video loaded", e);
|
|
1146
|
+
}
|
|
1147
|
+
play() {
|
|
1148
|
+
if (this.debug("play"), this.impl === void 0)
|
|
1149
|
+
throw this.createPlayerNotAttachedError();
|
|
1150
|
+
if (this.impl.play === void 0)
|
|
1151
|
+
throw this.createCommandNotSupportedError("play");
|
|
1152
|
+
return this.impl.play();
|
|
1153
|
+
}
|
|
1154
|
+
pause() {
|
|
1155
|
+
if (this.debug("pause"), this.impl === void 0)
|
|
1156
|
+
throw this.createPlayerNotAttachedError();
|
|
1157
|
+
if (this.impl.pause === void 0)
|
|
1158
|
+
throw this.createCommandNotSupportedError("pause");
|
|
1159
|
+
return this.impl.pause();
|
|
1160
|
+
}
|
|
1161
|
+
setCurrentTime(e) {
|
|
1162
|
+
if (this.debug("setCurrentTime", e), this.impl === void 0)
|
|
1163
|
+
throw this.createPlayerNotAttachedError();
|
|
1164
|
+
if (this.impl.setCurrentTime === void 0)
|
|
1165
|
+
throw this.createCommandNotSupportedError("setCurrentTime");
|
|
1166
|
+
return this.impl.setCurrentTime(e);
|
|
1167
|
+
}
|
|
1168
|
+
setVolume(e) {
|
|
1169
|
+
if (this.debug("setVolume", e), this.impl === void 0)
|
|
1170
|
+
throw this.createPlayerNotAttachedError();
|
|
1171
|
+
if (this.impl.setVolume === void 0)
|
|
1172
|
+
throw this.createCommandNotSupportedError("setVolume");
|
|
1173
|
+
return this.impl.setVolume(e);
|
|
1174
|
+
}
|
|
1175
|
+
setMuted(e) {
|
|
1176
|
+
if (this.debug("setMuted", e), this.impl === void 0)
|
|
1177
|
+
throw this.createPlayerNotAttachedError();
|
|
1178
|
+
if (this.impl.setMuted === void 0)
|
|
1179
|
+
throw this.createCommandNotSupportedError("setMuted");
|
|
1180
|
+
return this.impl.setMuted(e);
|
|
1181
|
+
}
|
|
1182
|
+
setPlaybackRate(e) {
|
|
1183
|
+
if (this.debug("setPlaybackRate", e), this.impl === void 0)
|
|
1184
|
+
throw this.createPlayerNotAttachedError();
|
|
1185
|
+
if (this.impl.setPlaybackRate === void 0)
|
|
1186
|
+
throw this.createCommandNotSupportedError("setPlaybackRate");
|
|
1187
|
+
return this.impl.setPlaybackRate(e);
|
|
1188
|
+
}
|
|
1189
|
+
getDuration() {
|
|
1190
|
+
if (this.debug("getDuration"), this.impl === void 0)
|
|
1191
|
+
throw this.createPlayerNotAttachedError();
|
|
1192
|
+
if (this.impl.getDuration === void 0)
|
|
1193
|
+
throw this.createCommandNotSupportedError("getDuration");
|
|
1194
|
+
return this.impl.getDuration();
|
|
1195
|
+
}
|
|
1196
|
+
getCurrentTime() {
|
|
1197
|
+
if (this.debug("getCurrentTime"), this.impl === void 0)
|
|
1198
|
+
throw this.createPlayerNotAttachedError();
|
|
1199
|
+
if (this.impl.getCurrentTime === void 0)
|
|
1200
|
+
throw this.createCommandNotSupportedError("getCurrentTime");
|
|
1201
|
+
return this.impl.getCurrentTime();
|
|
1202
|
+
}
|
|
1203
|
+
getVolume() {
|
|
1204
|
+
if (this.debug("getVolume"), this.impl === void 0)
|
|
1205
|
+
throw this.createPlayerNotAttachedError();
|
|
1206
|
+
if (this.impl.getVolume === void 0)
|
|
1207
|
+
throw this.createCommandNotSupportedError("getVolume");
|
|
1208
|
+
return this.impl.getVolume();
|
|
1209
|
+
}
|
|
1210
|
+
getMuted() {
|
|
1211
|
+
if (this.debug("getMuted"), this.impl === void 0)
|
|
1212
|
+
throw this.createPlayerNotAttachedError();
|
|
1213
|
+
if (this.impl.getMuted === void 0)
|
|
1214
|
+
throw this.createCommandNotSupportedError("getMuted");
|
|
1215
|
+
return this.impl.getMuted();
|
|
1216
|
+
}
|
|
1217
|
+
getPlaybackRate() {
|
|
1218
|
+
if (this.debug("getPlaybackRate"), this.impl === void 0)
|
|
1219
|
+
throw this.createPlayerNotAttachedError();
|
|
1220
|
+
if (this.impl.getPlaybackRate === void 0)
|
|
1221
|
+
throw this.createCommandNotSupportedError("getPlaybackRate");
|
|
1222
|
+
return this.impl.getPlaybackRate();
|
|
1223
|
+
}
|
|
1224
|
+
supports(e) {
|
|
1225
|
+
if (this.impl === void 0)
|
|
1226
|
+
throw this.createPlayerNotAttachedError();
|
|
1227
|
+
return this.impl.supports(e);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
const fr = ({
|
|
1231
|
+
logger: n,
|
|
1232
|
+
type: e,
|
|
1233
|
+
loadScript: r,
|
|
1234
|
+
playerFactory: o,
|
|
1235
|
+
onControllerChange: c,
|
|
1236
|
+
videoId: m,
|
|
1237
|
+
options: R,
|
|
1238
|
+
controllerFactory: w,
|
|
1239
|
+
children: f
|
|
1240
|
+
}) => {
|
|
1241
|
+
n.log(p.Debug, "PlayerContainer");
|
|
1242
|
+
const C = L(m), b = L(void 0), [P, k] = je(), [I, M] = je(Q), x = T(
|
|
1243
|
+
(E) => {
|
|
1244
|
+
M(E), c?.(E);
|
|
1245
|
+
},
|
|
1246
|
+
[c]
|
|
1247
|
+
);
|
|
1248
|
+
ue(() => {
|
|
1249
|
+
(r?.() ?? Promise.resolve()).then(() => o(b.current, C.current)).then((E) => k(E));
|
|
1250
|
+
}, [r, o]), ue(() => {
|
|
1251
|
+
if (P === void 0)
|
|
1252
|
+
return;
|
|
1253
|
+
const E = new de(
|
|
1254
|
+
n,
|
|
1255
|
+
e,
|
|
1256
|
+
P,
|
|
1257
|
+
R,
|
|
1258
|
+
w
|
|
1259
|
+
);
|
|
1260
|
+
return E.attach(C.current).then(() => x(E)), () => {
|
|
1261
|
+
E.detach().finally(() => x(Q));
|
|
1262
|
+
};
|
|
1263
|
+
}, [
|
|
1264
|
+
n,
|
|
1265
|
+
e,
|
|
1266
|
+
r,
|
|
1267
|
+
P,
|
|
1268
|
+
R,
|
|
1269
|
+
w,
|
|
1270
|
+
x
|
|
1271
|
+
]);
|
|
1272
|
+
const A = dr(m);
|
|
1273
|
+
return ue(() => {
|
|
1274
|
+
A !== void 0 && I.loadVideo(m);
|
|
1275
|
+
}, [A, m, I]), /* @__PURE__ */ V.jsx(V.Fragment, { children: f(b, C.current) });
|
|
1276
|
+
};
|
|
1277
|
+
class mr extends Y {
|
|
1218
1278
|
async attach() {
|
|
1219
1279
|
this.player.onerror = (e) => this.options?.onError?.(e), this.player.onloadeddata = () => this.options?.onLoaded?.({ id: this.player.src }), this.player.onplay = () => this.options?.onPlay?.(), this.player.onpause = () => this.options?.onPause?.(), this.player.onended = () => this.options?.onEnded?.(), this.player.ontimeupdate = () => {
|
|
1220
1280
|
this.options?.onTimeUpdate?.({
|
|
@@ -1264,7 +1324,7 @@ class dr extends j {
|
|
|
1264
1324
|
return this.player.playbackRate;
|
|
1265
1325
|
}
|
|
1266
1326
|
}
|
|
1267
|
-
const
|
|
1327
|
+
const qe = [
|
|
1268
1328
|
"apiready",
|
|
1269
1329
|
"seeked",
|
|
1270
1330
|
"video_end",
|
|
@@ -1273,7 +1333,7 @@ const We = [
|
|
|
1273
1333
|
"playing",
|
|
1274
1334
|
"error"
|
|
1275
1335
|
];
|
|
1276
|
-
class
|
|
1336
|
+
class vr extends Y {
|
|
1277
1337
|
handlePlayerEvents = (e) => {
|
|
1278
1338
|
switch (e.type) {
|
|
1279
1339
|
case "apiready":
|
|
@@ -1303,11 +1363,11 @@ class hr extends j {
|
|
|
1303
1363
|
}
|
|
1304
1364
|
};
|
|
1305
1365
|
async attach(e) {
|
|
1306
|
-
for (const r of
|
|
1366
|
+
for (const r of qe)
|
|
1307
1367
|
this.player.addEventListener(r, this.handlePlayerEvents);
|
|
1308
1368
|
}
|
|
1309
1369
|
async detach() {
|
|
1310
|
-
for (const e of
|
|
1370
|
+
for (const e of qe)
|
|
1311
1371
|
this.player.removeEventListener(e, this.handlePlayerEvents);
|
|
1312
1372
|
}
|
|
1313
1373
|
async loadVideo(e) {
|
|
@@ -1343,27 +1403,27 @@ class hr extends j {
|
|
|
1343
1403
|
}
|
|
1344
1404
|
getPlaybackRate = void 0;
|
|
1345
1405
|
}
|
|
1346
|
-
var
|
|
1347
|
-
class
|
|
1406
|
+
var le = /* @__PURE__ */ ((n) => (n[n.Play = 2] = "Play", n[n.Pause = 3] = "Pause", n[n.End = 4] = "End", n))(le || {});
|
|
1407
|
+
class ce extends Y {
|
|
1348
1408
|
static origin = "https://embed.nicovideo.jp";
|
|
1349
1409
|
duration = 0;
|
|
1350
1410
|
currentTime = 0;
|
|
1351
1411
|
volume = 0;
|
|
1352
1412
|
muted = !1;
|
|
1353
1413
|
handleMessage = (e) => {
|
|
1354
|
-
if (e.origin !==
|
|
1414
|
+
if (e.origin !== ce.origin) return;
|
|
1355
1415
|
const r = e.data;
|
|
1356
1416
|
switch (r.eventName) {
|
|
1357
1417
|
case "playerStatusChange":
|
|
1358
1418
|
this.logger.log(
|
|
1359
|
-
|
|
1360
|
-
`player status changed: ${
|
|
1419
|
+
p.Debug,
|
|
1420
|
+
`player status changed: ${le[r.data.playerStatus] ?? r.data.playerStatus}`
|
|
1361
1421
|
);
|
|
1362
1422
|
break;
|
|
1363
1423
|
case "statusChange":
|
|
1364
1424
|
switch (this.logger.log(
|
|
1365
|
-
|
|
1366
|
-
`status changed: ${
|
|
1425
|
+
p.Debug,
|
|
1426
|
+
`status changed: ${le[r.data.playerStatus] ?? r.data.playerStatus}`
|
|
1367
1427
|
), r.data.playerStatus) {
|
|
1368
1428
|
case 2:
|
|
1369
1429
|
this.options?.onPlay?.();
|
|
@@ -1384,7 +1444,7 @@ class ue extends j {
|
|
|
1384
1444
|
});
|
|
1385
1445
|
break;
|
|
1386
1446
|
case "loadComplete":
|
|
1387
|
-
this.logger.log(
|
|
1447
|
+
this.logger.log(p.Debug, "load completed"), this.duration = r.data.videoInfo.lengthInSeconds, this.options?.onLoaded?.({ id: r.data.videoInfo.watchId });
|
|
1388
1448
|
break;
|
|
1389
1449
|
case "error":
|
|
1390
1450
|
this.options?.onError?.(r);
|
|
@@ -1395,7 +1455,7 @@ class ue extends j {
|
|
|
1395
1455
|
break;
|
|
1396
1456
|
default:
|
|
1397
1457
|
this.logger.log(
|
|
1398
|
-
|
|
1458
|
+
p.Debug,
|
|
1399
1459
|
"message",
|
|
1400
1460
|
r.eventName,
|
|
1401
1461
|
r.data
|
|
@@ -1410,7 +1470,7 @@ class ue extends j {
|
|
|
1410
1470
|
window.removeEventListener("message", this.handleMessage);
|
|
1411
1471
|
}
|
|
1412
1472
|
async loadVideo(e) {
|
|
1413
|
-
return new Promise((r,
|
|
1473
|
+
return new Promise((r, o) => {
|
|
1414
1474
|
this.duration = 0, this.currentTime = 0, this.volume = 0, this.muted = !1, this.player.onload = () => {
|
|
1415
1475
|
this.player.onload = null, r();
|
|
1416
1476
|
}, this.player.src = `https://embed.nicovideo.jp/watch/${e}?jsapi=1&playerId=1`;
|
|
@@ -1424,7 +1484,7 @@ class ue extends j {
|
|
|
1424
1484
|
playerId: "1",
|
|
1425
1485
|
sourceConnectorType: 1
|
|
1426
1486
|
},
|
|
1427
|
-
|
|
1487
|
+
ce.origin
|
|
1428
1488
|
);
|
|
1429
1489
|
}
|
|
1430
1490
|
async play() {
|
|
@@ -1463,28 +1523,28 @@ class ue extends j {
|
|
|
1463
1523
|
}
|
|
1464
1524
|
getPlaybackRate = void 0;
|
|
1465
1525
|
}
|
|
1466
|
-
class
|
|
1526
|
+
class Xe extends Y {
|
|
1467
1527
|
getDurationCore() {
|
|
1468
1528
|
return new Promise((e, r) => {
|
|
1469
1529
|
this.player.getDuration(e);
|
|
1470
1530
|
});
|
|
1471
1531
|
}
|
|
1472
1532
|
attach(e) {
|
|
1473
|
-
return new Promise((r,
|
|
1533
|
+
return new Promise((r, o) => {
|
|
1474
1534
|
this.player.bind(SC.Widget.Events.READY, () => {
|
|
1475
1535
|
this.player.bind(
|
|
1476
1536
|
SC.Widget.Events.PLAY_PROGRESS,
|
|
1477
|
-
async (
|
|
1478
|
-
const
|
|
1537
|
+
async (c) => {
|
|
1538
|
+
const m = await this.getDurationCore();
|
|
1479
1539
|
this.options?.onTimeUpdate?.({
|
|
1480
|
-
duration:
|
|
1481
|
-
percent:
|
|
1482
|
-
seconds:
|
|
1540
|
+
duration: m / 1e3,
|
|
1541
|
+
percent: c.currentPosition / m,
|
|
1542
|
+
seconds: c.currentPosition / 1e3
|
|
1483
1543
|
});
|
|
1484
1544
|
}
|
|
1485
1545
|
), this.player.bind(
|
|
1486
1546
|
SC.Widget.Events.ERROR,
|
|
1487
|
-
(
|
|
1547
|
+
(c) => this.options?.onError?.(c)
|
|
1488
1548
|
), this.player.bind(
|
|
1489
1549
|
SC.Widget.Events.PLAY,
|
|
1490
1550
|
() => this.options?.onPlay?.()
|
|
@@ -1501,13 +1561,13 @@ class Je extends j {
|
|
|
1501
1561
|
async detach() {
|
|
1502
1562
|
this.player.unbind(SC.Widget.Events.READY), this.player.unbind(SC.Widget.Events.PLAY_PROGRESS), this.player.unbind(SC.Widget.Events.ERROR), this.player.unbind(SC.Widget.Events.PLAY), this.player.unbind(SC.Widget.Events.PAUSE), this.player.unbind(SC.Widget.Events.FINISH);
|
|
1503
1563
|
}
|
|
1504
|
-
static playerLoadAsync(e, r,
|
|
1505
|
-
return new Promise((
|
|
1506
|
-
e.load(r, { ...
|
|
1564
|
+
static playerLoadAsync(e, r, o) {
|
|
1565
|
+
return new Promise((c, m) => {
|
|
1566
|
+
e.load(r, { ...o, callback: c });
|
|
1507
1567
|
});
|
|
1508
1568
|
}
|
|
1509
1569
|
async loadVideo(e) {
|
|
1510
|
-
await
|
|
1570
|
+
await Xe.playerLoadAsync(this.player, e, {
|
|
1511
1571
|
auto_play: !0
|
|
1512
1572
|
}), this.options?.onLoaded?.({ id: e });
|
|
1513
1573
|
}
|
|
@@ -1547,7 +1607,7 @@ class Je extends j {
|
|
|
1547
1607
|
getMuted = void 0;
|
|
1548
1608
|
getPlaybackRate = void 0;
|
|
1549
1609
|
}
|
|
1550
|
-
class
|
|
1610
|
+
class gr extends Y {
|
|
1551
1611
|
handleReady = () => {
|
|
1552
1612
|
this.options?.onLoaded?.({ id: this.player.getVideo() });
|
|
1553
1613
|
};
|
|
@@ -1605,7 +1665,7 @@ class pr extends j {
|
|
|
1605
1665
|
}
|
|
1606
1666
|
getPlaybackRate = void 0;
|
|
1607
1667
|
}
|
|
1608
|
-
class
|
|
1668
|
+
class br extends Y {
|
|
1609
1669
|
async attach() {
|
|
1610
1670
|
await this.player.ready(), this.player.on("error", (e) => this.options?.onError?.(e)), this.player.on(
|
|
1611
1671
|
"loaded",
|
|
@@ -1658,13 +1718,13 @@ class yr extends j {
|
|
|
1658
1718
|
return this.player.getPlaybackRate();
|
|
1659
1719
|
}
|
|
1660
1720
|
}
|
|
1661
|
-
var
|
|
1662
|
-
class
|
|
1721
|
+
var Ze = /* @__PURE__ */ ((n) => (n[n.UNSTARTED = -1] = "UNSTARTED", n[n.ENDED = 0] = "ENDED", n[n.PLAYING = 1] = "PLAYING", n[n.PAUSED = 2] = "PAUSED", n[n.BUFFERING = 3] = "BUFFERING", n[n.CUED = 5] = "CUED", n))(Ze || {});
|
|
1722
|
+
class Er extends Y {
|
|
1663
1723
|
previousTime;
|
|
1664
1724
|
timeUpdateIntervalId;
|
|
1665
1725
|
clearTimeUpdateInterval() {
|
|
1666
1726
|
this.logger.log(
|
|
1667
|
-
|
|
1727
|
+
p.Debug,
|
|
1668
1728
|
"clearTimeUpdateInterval",
|
|
1669
1729
|
this.timeUpdateIntervalId
|
|
1670
1730
|
), window.clearInterval(this.timeUpdateIntervalId), this.timeUpdateIntervalId = void 0;
|
|
@@ -1672,36 +1732,36 @@ class mr extends j {
|
|
|
1672
1732
|
invokeTimeUpdate(e) {
|
|
1673
1733
|
const r = e.getCurrentTime();
|
|
1674
1734
|
if (r === this.previousTime) return;
|
|
1675
|
-
const
|
|
1735
|
+
const o = e.getDuration();
|
|
1676
1736
|
this.options?.onTimeUpdate?.({
|
|
1677
|
-
duration:
|
|
1678
|
-
percent: r /
|
|
1737
|
+
duration: o,
|
|
1738
|
+
percent: r / o,
|
|
1679
1739
|
seconds: r
|
|
1680
1740
|
}), this.previousTime = r;
|
|
1681
1741
|
}
|
|
1682
1742
|
setTimeUpdateInterval() {
|
|
1683
|
-
this.logger.log(
|
|
1743
|
+
this.logger.log(p.Debug, "setTimeUpdateInterval"), this.clearTimeUpdateInterval(), this.timeUpdateIntervalId = window.setInterval(
|
|
1684
1744
|
() => this.invokeTimeUpdate(this.player),
|
|
1685
1745
|
250
|
|
1686
1746
|
), this.logger.log(
|
|
1687
|
-
|
|
1747
|
+
p.Debug,
|
|
1688
1748
|
"timeUpdateIntervalId",
|
|
1689
1749
|
this.timeUpdateIntervalId
|
|
1690
1750
|
), this.invokeTimeUpdate(this.player);
|
|
1691
1751
|
}
|
|
1692
1752
|
attach(e) {
|
|
1693
|
-
return new Promise((r,
|
|
1753
|
+
return new Promise((r, o) => {
|
|
1694
1754
|
this.player.addEventListener("onReady", async () => {
|
|
1695
1755
|
this.player.addEventListener(
|
|
1696
1756
|
"onError",
|
|
1697
|
-
(
|
|
1757
|
+
(c) => this.options?.onError?.(c.data)
|
|
1698
1758
|
), this.player.addEventListener(
|
|
1699
1759
|
"onStateChange",
|
|
1700
|
-
(
|
|
1760
|
+
(c) => {
|
|
1701
1761
|
switch (this.logger.log(
|
|
1702
|
-
|
|
1703
|
-
`state changed: ${
|
|
1704
|
-
),
|
|
1762
|
+
p.Debug,
|
|
1763
|
+
`state changed: ${Ze[c.data]}`
|
|
1764
|
+
), c.data) {
|
|
1705
1765
|
case YT.PlayerState.CUED:
|
|
1706
1766
|
this.options?.onLoaded?.({ id: e });
|
|
1707
1767
|
break;
|
|
@@ -1761,24 +1821,27 @@ class mr extends j {
|
|
|
1761
1821
|
}
|
|
1762
1822
|
}
|
|
1763
1823
|
export {
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1824
|
+
mr as A,
|
|
1825
|
+
vr as D,
|
|
1826
|
+
p as L,
|
|
1827
|
+
ce as N,
|
|
1828
|
+
fr as P,
|
|
1829
|
+
Xe as S,
|
|
1830
|
+
gr as T,
|
|
1831
|
+
br as V,
|
|
1832
|
+
Er as Y,
|
|
1833
|
+
or as a,
|
|
1834
|
+
Bt as b,
|
|
1835
|
+
ur as c,
|
|
1836
|
+
yr as d,
|
|
1837
|
+
de as e,
|
|
1838
|
+
Y as f,
|
|
1839
|
+
nr as g,
|
|
1840
|
+
F as h,
|
|
1841
|
+
V as j,
|
|
1842
|
+
Q as n,
|
|
1843
|
+
ir as p,
|
|
1844
|
+
Ht as u,
|
|
1845
|
+
ar as v
|
|
1783
1846
|
};
|
|
1784
|
-
//# sourceMappingURL=index-
|
|
1847
|
+
//# sourceMappingURL=index-CLTpMeB0.js.map
|