@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.
Files changed (67) hide show
  1. package/dist/AudioPlayer-BZVzeLpd.cjs +2 -0
  2. package/dist/{AudioPlayer-BSoA0atW.cjs.map → AudioPlayer-BZVzeLpd.cjs.map} +1 -1
  3. package/dist/{AudioPlayer-C6cCMWWw.js → AudioPlayer-D6hktnhD.js} +6 -7
  4. package/dist/{AudioPlayer-C6cCMWWw.js.map → AudioPlayer-D6hktnhD.js.map} +1 -1
  5. package/dist/DailymotionPlayer-Bi8E4whf.cjs +2 -0
  6. package/dist/{DailymotionPlayer-pgc9u0XA.cjs.map → DailymotionPlayer-Bi8E4whf.cjs.map} +1 -1
  7. package/dist/{DailymotionPlayer-rl7eyJO7.js → DailymotionPlayer-NqmzC1es.js} +3 -4
  8. package/dist/{DailymotionPlayer-rl7eyJO7.js.map → DailymotionPlayer-NqmzC1es.js.map} +1 -1
  9. package/dist/NiconicoPlayer-CJGCtIIc.cjs +2 -0
  10. package/dist/{NiconicoPlayer-BgqhLgtu.cjs.map → NiconicoPlayer-CJGCtIIc.cjs.map} +1 -1
  11. package/dist/{NiconicoPlayer-t_yI_jY1.js → NiconicoPlayer-mu8oAJRF.js} +6 -7
  12. package/dist/{NiconicoPlayer-t_yI_jY1.js.map → NiconicoPlayer-mu8oAJRF.js.map} +1 -1
  13. package/dist/SoundCloudPlayer-BP5pJQjT.cjs +2 -0
  14. package/dist/{SoundCloudPlayer-CJxrp_Af.cjs.map → SoundCloudPlayer-BP5pJQjT.cjs.map} +1 -1
  15. package/dist/{SoundCloudPlayer-IoMG-qjP.js → SoundCloudPlayer-CMm5InlF.js} +13 -14
  16. package/dist/{SoundCloudPlayer-IoMG-qjP.js.map → SoundCloudPlayer-CMm5InlF.js.map} +1 -1
  17. package/dist/TwitchPlayer-CMQ4ZQB0.cjs +2 -0
  18. package/dist/{TwitchPlayer-DkzrjCro.cjs.map → TwitchPlayer-CMQ4ZQB0.cjs.map} +1 -1
  19. package/dist/{TwitchPlayer-DZYWi-co.js → TwitchPlayer-EgP5jHii.js} +12 -13
  20. package/dist/{TwitchPlayer-DZYWi-co.js.map → TwitchPlayer-EgP5jHii.js.map} +1 -1
  21. package/dist/{VimeoPlayer-iwzPBDrd.js → VimeoPlayer-BAYaY4oI.js} +9 -10
  22. package/dist/{VimeoPlayer-iwzPBDrd.js.map → VimeoPlayer-BAYaY4oI.js.map} +1 -1
  23. package/dist/VimeoPlayer-CvFLZFMf.cjs +2 -0
  24. package/dist/{VimeoPlayer-BAFjSxqt.cjs.map → VimeoPlayer-CvFLZFMf.cjs.map} +1 -1
  25. package/dist/YouTubePlayer-B1_fn24Y.cjs +2 -0
  26. package/dist/{YouTubePlayer-DKoJ5sID.cjs.map → YouTubePlayer-B1_fn24Y.cjs.map} +1 -1
  27. package/dist/{YouTubePlayer-CyrztH-W.js → YouTubePlayer-CT5Q9YWC.js} +7 -8
  28. package/dist/{YouTubePlayer-CyrztH-W.js.map → YouTubePlayer-CT5Q9YWC.js.map} +1 -1
  29. package/dist/components/NostalgicDiva.d.ts +4 -2
  30. package/dist/components/index.d.ts +1 -0
  31. package/dist/controllers/PlayerController.d.ts +1 -10
  32. package/dist/controllers/index.d.ts +1 -0
  33. package/dist/{ensureScriptLoaded-CrePAY3C.js → ensureScriptLoaded-O_gkv8-u.js} +2 -2
  34. package/dist/{ensureScriptLoaded-CrePAY3C.js.map → ensureScriptLoaded-O_gkv8-u.js.map} +1 -1
  35. package/dist/{ensureScriptLoaded-gJ9wjztg.cjs → ensureScriptLoaded-jXzaqDQh.cjs} +2 -2
  36. package/dist/{ensureScriptLoaded-gJ9wjztg.cjs.map → ensureScriptLoaded-jXzaqDQh.cjs.map} +1 -1
  37. package/dist/index-B8wtI_1x.cjs +15 -0
  38. package/dist/index-B8wtI_1x.cjs.map +1 -0
  39. package/dist/{index-Dl2QgR_t.js → index-CLTpMeB0.js} +746 -683
  40. package/dist/index-CLTpMeB0.js.map +1 -0
  41. package/dist/index.cjs.js +1 -1
  42. package/dist/index.es.js +18 -15
  43. package/dist/services/AudioVideoService.d.ts +1 -2
  44. package/dist/services/DailymotionVideoService.d.ts +1 -2
  45. package/dist/services/NiconicoVideoService.d.ts +1 -2
  46. package/dist/services/SoundCloudVideoService.d.ts +1 -2
  47. package/dist/services/TwitchVideoService.d.ts +1 -2
  48. package/dist/services/VideoService.d.ts +3 -3
  49. package/dist/services/VimeoVideoService.d.ts +1 -2
  50. package/dist/services/YouTubeVideoService.d.ts +1 -2
  51. package/dist/services/findVideoService.d.ts +3 -10
  52. package/dist/services/index.d.ts +1 -0
  53. package/package.json +1 -1
  54. package/dist/AudioPlayer-BSoA0atW.cjs +0 -2
  55. package/dist/DailymotionPlayer-pgc9u0XA.cjs +0 -2
  56. package/dist/NiconicoPlayer-BgqhLgtu.cjs +0 -2
  57. package/dist/PlayerContainer-C5baCSwo.cjs +0 -2
  58. package/dist/PlayerContainer-C5baCSwo.cjs.map +0 -1
  59. package/dist/PlayerContainer-DX0Usz2N.js +0 -62
  60. package/dist/PlayerContainer-DX0Usz2N.js.map +0 -1
  61. package/dist/SoundCloudPlayer-CJxrp_Af.cjs +0 -2
  62. package/dist/TwitchPlayer-DkzrjCro.cjs +0 -2
  63. package/dist/VimeoPlayer-BAFjSxqt.cjs +0 -2
  64. package/dist/YouTubePlayer-DKoJ5sID.cjs +0 -2
  65. package/dist/index-BgnlhZhq.cjs +0 -15
  66. package/dist/index-BgnlhZhq.cjs.map +0 -1
  67. package/dist/index-Dl2QgR_t.js.map +0 -1
@@ -1,106 +1,106 @@
1
- import Le, { createContext as Vt, useContext as It, useRef as Nt, useCallback as w, useMemo as xt, lazy as M, memo as At, Suspense as Mt } from "react";
2
- import Ot from "react-dom";
3
- var Z = { exports: {} }, G = {};
4
- var Ae;
5
- function jt() {
6
- if (Ae) return G;
7
- Ae = 1;
8
- var i = Le, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), l = Object.prototype.hasOwnProperty, p = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
9
- function _(T, f, P) {
10
- var b, R = {}, k = null, N = null;
11
- P !== void 0 && (k = "" + P), f.key !== void 0 && (k = "" + f.key), f.ref !== void 0 && (N = f.ref);
12
- for (b in f) l.call(f, b) && !g.hasOwnProperty(b) && (R[b] = f[b]);
13
- if (T && T.defaultProps) for (b in f = T.defaultProps, f) R[b] === void 0 && (R[b] = f[b]);
14
- return { $$typeof: e, type: T, key: k, ref: N, props: R, _owner: p.current };
15
- }
16
- return G.Fragment = r, G.jsx = _, G.jsxs = _, G;
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 B = {};
19
- var Me;
20
- function Ut() {
21
- return Me || (Me = 1, process.env.NODE_ENV !== "production" && (function() {
22
- var i = Le, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), l = /* @__PURE__ */ Symbol.for("react.fragment"), p = /* @__PURE__ */ Symbol.for("react.strict_mode"), g = /* @__PURE__ */ Symbol.for("react.profiler"), _ = /* @__PURE__ */ Symbol.for("react.provider"), T = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), P = /* @__PURE__ */ Symbol.for("react.suspense"), b = /* @__PURE__ */ Symbol.for("react.suspense_list"), R = /* @__PURE__ */ Symbol.for("react.memo"), k = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.offscreen"), $ = Symbol.iterator, H = "@@iterator";
23
- function J(t) {
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 = $ && t[$] || t[H];
26
+ var a = M && t[M] || t[x];
27
27
  return typeof a == "function" ? a : null;
28
28
  }
29
- var V = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
30
- function c(t) {
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, n = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
33
- n[s - 1] = arguments[s];
34
- Ke("error", t, n);
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 Ke(t, a, n) {
37
+ function Qe(t, a, i) {
38
38
  {
39
- var s = V.ReactDebugCurrentFrame, d = s.getStackAddendum();
40
- d !== "" && (a += "%s", n = n.concat([d]));
41
- var h = n.map(function(u) {
42
- return String(u);
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
- h.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, h);
44
+ y.unshift("Warning: " + a), Function.prototype.apply.call(console[t], console, y);
45
45
  }
46
46
  }
47
- var ze = !1, Xe = !1, Ze = !1, Qe = !1, et = !1, le;
48
- le = /* @__PURE__ */ Symbol.for("react.module.reference");
49
- function tt(t) {
50
- return !!(typeof t == "string" || typeof t == "function" || t === l || t === g || et || t === p || t === P || t === b || Qe || t === N || ze || Xe || Ze || typeof t == "object" && t !== null && (t.$$typeof === k || t.$$typeof === R || t.$$typeof === _ || t.$$typeof === T || t.$$typeof === f || // This needs to include all possible module reference object
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 === le || t.getModuleId !== void 0));
54
+ t.$$typeof === he || t.getModuleId !== void 0));
55
55
  }
56
- function rt(t, a, n) {
56
+ function st(t, a, i) {
57
57
  var s = t.displayName;
58
58
  if (s)
59
59
  return s;
60
- var d = a.displayName || a.name || "";
61
- return d !== "" ? n + "(" + d + ")" : n;
60
+ var h = a.displayName || a.name || "";
61
+ return h !== "" ? i + "(" + h + ")" : i;
62
62
  }
63
- function ce(t) {
63
+ function pe(t) {
64
64
  return t.displayName || "Context";
65
65
  }
66
- function I(t) {
66
+ function N(t) {
67
67
  if (t == null)
68
68
  return null;
69
- if (typeof t.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
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 l:
74
+ case o:
75
75
  return "Fragment";
76
76
  case r:
77
77
  return "Portal";
78
- case g:
78
+ case m:
79
79
  return "Profiler";
80
- case p:
80
+ case c:
81
81
  return "StrictMode";
82
- case P:
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 T:
89
+ case w:
90
90
  var a = t;
91
- return ce(a) + ".Consumer";
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 : I(t.type) || "Memo";
99
+ return s !== null ? s : N(t.type) || "Memo";
100
100
  case k: {
101
- var d = t, h = d._payload, u = d._init;
101
+ var h = t, y = h._payload, l = h._init;
102
102
  try {
103
- return I(u(h));
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 x = Object.assign, W = 0, de, he, pe, ye, me, fe, ve;
112
- function ge() {
111
+ var O = Object.assign, G = 0, ye, fe, me, ve, ge, be, Ee;
112
+ function we() {
113
113
  }
114
- ge.__reactDisabledLog = !0;
115
- function at() {
114
+ we.__reactDisabledLog = !0;
115
+ function ot() {
116
116
  {
117
- if (W === 0) {
118
- de = console.log, he = console.info, pe = console.warn, ye = console.error, me = console.group, fe = console.groupCollapsed, ve = console.groupEnd;
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: ge,
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
- W++;
135
+ G++;
136
136
  }
137
137
  }
138
- function it() {
138
+ function ut() {
139
139
  {
140
- if (W--, W === 0) {
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: x({}, t, {
148
- value: de
147
+ log: O({}, t, {
148
+ value: ye
149
149
  }),
150
- info: x({}, t, {
151
- value: he
150
+ info: O({}, t, {
151
+ value: fe
152
152
  }),
153
- warn: x({}, t, {
154
- value: pe
153
+ warn: O({}, t, {
154
+ value: me
155
155
  }),
156
- error: x({}, t, {
157
- value: ye
156
+ error: O({}, t, {
157
+ value: ve
158
158
  }),
159
- group: x({}, t, {
160
- value: me
159
+ group: O({}, t, {
160
+ value: ge
161
161
  }),
162
- groupCollapsed: x({}, t, {
163
- value: fe
162
+ groupCollapsed: O({}, t, {
163
+ value: be
164
164
  }),
165
- groupEnd: x({}, t, {
166
- value: ve
165
+ groupEnd: O({}, t, {
166
+ value: Ee
167
167
  })
168
168
  });
169
169
  }
170
- W < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
+ G < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
171
171
  }
172
172
  }
173
- var Q = V.ReactCurrentDispatcher, ee;
174
- function q(t, a, n) {
173
+ var ee = E.ReactCurrentDispatcher, te;
174
+ function J(t, a, i) {
175
175
  {
176
- if (ee === void 0)
176
+ if (te === void 0)
177
177
  try {
178
178
  throw Error();
179
- } catch (d) {
180
- var s = d.stack.trim().match(/\n( *(at )?)/);
181
- ee = s && s[1] || "";
179
+ } catch (h) {
180
+ var s = h.stack.trim().match(/\n( *(at )?)/);
181
+ te = s && s[1] || "";
182
182
  }
183
183
  return `
184
- ` + ee + t;
184
+ ` + te + t;
185
185
  }
186
186
  }
187
- var te = !1, K;
187
+ var re = !1, K;
188
188
  {
189
- var nt = typeof WeakMap == "function" ? WeakMap : Map;
190
- K = new nt();
189
+ var lt = typeof WeakMap == "function" ? WeakMap : Map;
190
+ K = new lt();
191
191
  }
192
- function be(t, a) {
193
- if (!t || te)
192
+ function Ce(t, a) {
193
+ if (!t || re)
194
194
  return "";
195
195
  {
196
- var n = K.get(t);
197
- if (n !== void 0)
198
- return n;
196
+ var i = K.get(t);
197
+ if (i !== void 0)
198
+ return i;
199
199
  }
200
200
  var s;
201
- te = !0;
202
- var d = Error.prepareStackTrace;
201
+ re = !0;
202
+ var h = Error.prepareStackTrace;
203
203
  Error.prepareStackTrace = void 0;
204
- var h;
205
- h = Q.current, Q.current = null, at();
204
+ var y;
205
+ y = ee.current, ee.current = null, ot();
206
206
  try {
207
207
  if (a) {
208
- var u = function() {
208
+ var l = function() {
209
209
  throw Error();
210
210
  };
211
- if (Object.defineProperty(u.prototype, "props", {
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(u, []);
218
- } catch (C) {
219
- s = C;
217
+ Reflect.construct(l, []);
218
+ } catch (_) {
219
+ s = _;
220
220
  }
221
- Reflect.construct(t, [], u);
221
+ Reflect.construct(t, [], l);
222
222
  } else {
223
223
  try {
224
- u.call();
225
- } catch (C) {
226
- s = C;
224
+ l.call();
225
+ } catch (_) {
226
+ s = _;
227
227
  }
228
- t.call(u.prototype);
228
+ t.call(l.prototype);
229
229
  }
230
230
  } else {
231
231
  try {
232
232
  throw Error();
233
- } catch (C) {
234
- s = C;
233
+ } catch (_) {
234
+ s = _;
235
235
  }
236
236
  t();
237
237
  }
238
- } catch (C) {
239
- if (C && s && typeof C.stack == "string") {
240
- for (var o = C.stack.split(`
241
- `), E = s.stack.split(`
242
- `), m = o.length - 1, v = E.length - 1; m >= 1 && v >= 0 && o[m] !== E[v]; )
243
- v--;
244
- for (; m >= 1 && v >= 0; m--, v--)
245
- if (o[m] !== E[v]) {
246
- if (m !== 1 || v !== 1)
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 (m--, v--, v < 0 || o[m] !== E[v]) {
249
- var D = `
250
- ` + o[m].replace(" at new ", " at ");
251
- return t.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", t.displayName)), typeof t == "function" && K.set(t, D), D;
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 (m >= 1 && v >= 0);
253
+ while (v >= 1 && g >= 0);
254
254
  break;
255
255
  }
256
256
  }
257
257
  } finally {
258
- te = !1, Q.current = h, it(), Error.prepareStackTrace = d;
258
+ re = !1, ee.current = y, ut(), Error.prepareStackTrace = h;
259
259
  }
260
- var F = t ? t.displayName || t.name : "", A = F ? q(F) : "";
261
- return typeof t == "function" && K.set(t, A), A;
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 st(t, a, n) {
264
- return be(t, !1);
263
+ function ct(t, a, i) {
264
+ return Ce(t, !1);
265
265
  }
266
- function ot(t) {
266
+ function dt(t) {
267
267
  var a = t.prototype;
268
268
  return !!(a && a.isReactComponent);
269
269
  }
270
- function z(t, a, n) {
270
+ function z(t, a, i) {
271
271
  if (t == null)
272
272
  return "";
273
273
  if (typeof t == "function")
274
- return be(t, ot(t));
274
+ return Ce(t, dt(t));
275
275
  if (typeof t == "string")
276
- return q(t);
276
+ return J(t);
277
277
  switch (t) {
278
- case P:
279
- return q("Suspense");
278
+ case C:
279
+ return J("Suspense");
280
280
  case b:
281
- return q("SuspenseList");
281
+ return J("SuspenseList");
282
282
  }
283
283
  if (typeof t == "object")
284
284
  switch (t.$$typeof) {
285
285
  case f:
286
- return st(t.render);
287
- case R:
288
- return z(t.type, a, n);
286
+ return ct(t.render);
287
+ case P:
288
+ return z(t.type, a, i);
289
289
  case k: {
290
- var s = t, d = s._payload, h = s._init;
290
+ var s = t, h = s._payload, y = s._init;
291
291
  try {
292
- return z(h(d), a, n);
292
+ return z(y(h), a, i);
293
293
  } catch {
294
294
  }
295
295
  }
296
296
  }
297
297
  return "";
298
298
  }
299
- var L = Object.prototype.hasOwnProperty, Ee = {}, we = V.ReactDebugCurrentFrame;
299
+ var B = Object.prototype.hasOwnProperty, Pe = {}, Te = E.ReactDebugCurrentFrame;
300
300
  function X(t) {
301
301
  if (t) {
302
- var a = t._owner, n = z(t.type, t._source, a ? a.type : null);
303
- we.setExtraStackFrame(n);
302
+ var a = t._owner, i = z(t.type, t._source, a ? a.type : null);
303
+ Te.setExtraStackFrame(i);
304
304
  } else
305
- we.setExtraStackFrame(null);
305
+ Te.setExtraStackFrame(null);
306
306
  }
307
- function ut(t, a, n, s, d) {
307
+ function ht(t, a, i, s, h) {
308
308
  {
309
- var h = Function.call.bind(L);
310
- for (var u in t)
311
- if (h(t, u)) {
312
- var o = void 0;
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[u] != "function") {
315
- var E = Error((s || "React class") + ": " + n + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
316
- throw E.name = "Invariant Violation", E;
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
- o = t[u](a, u, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
319
- } catch (m) {
320
- o = m;
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
- o && !(o instanceof Error) && (X(d), c("%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", n, u, typeof o), X(null)), o instanceof Error && !(o.message in Ee) && (Ee[o.message] = !0, X(d), c("Failed %s type: %s", n, o.message), X(null));
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 lt = Array.isArray;
327
- function re(t) {
328
- return lt(t);
326
+ var pt = Array.isArray;
327
+ function ae(t) {
328
+ return pt(t);
329
329
  }
330
- function ct(t) {
330
+ function yt(t) {
331
331
  {
332
- var a = typeof Symbol == "function" && Symbol.toStringTag, n = a && t[Symbol.toStringTag] || t.constructor.name || "Object";
333
- return n;
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 dt(t) {
336
+ function ft(t) {
337
337
  try {
338
- return Ce(t), !1;
338
+ return Re(t), !1;
339
339
  } catch {
340
340
  return !0;
341
341
  }
342
342
  }
343
- function Ce(t) {
343
+ function Re(t) {
344
344
  return "" + t;
345
345
  }
346
- function Te(t) {
347
- if (dt(t))
348
- return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(t)), Ce(t);
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 Pe = V.ReactCurrentOwner, ht = {
350
+ var _e = E.ReactCurrentOwner, mt = {
351
351
  key: !0,
352
352
  ref: !0,
353
353
  __self: !0,
354
354
  __source: !0
355
- }, Re, De;
356
- function pt(t) {
357
- if (L.call(t, "ref")) {
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 yt(t) {
365
- if (L.call(t, "key")) {
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 mt(t, a) {
373
- typeof t.ref == "string" && Pe.current;
372
+ function bt(t, a) {
373
+ typeof t.ref == "string" && _e.current;
374
374
  }
375
- function ft(t, a) {
375
+ function Et(t, a) {
376
376
  {
377
- var n = function() {
378
- Re || (Re = !0, c("%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));
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
- n.isReactWarning = !0, Object.defineProperty(t, "key", {
381
- get: n,
380
+ i.isReactWarning = !0, Object.defineProperty(t, "key", {
381
+ get: i,
382
382
  configurable: !0
383
383
  });
384
384
  }
385
385
  }
386
- function vt(t, a) {
386
+ function wt(t, a) {
387
387
  {
388
- var n = function() {
389
- De || (De = !0, c("%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));
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
- n.isReactWarning = !0, Object.defineProperty(t, "ref", {
392
- get: n,
391
+ i.isReactWarning = !0, Object.defineProperty(t, "ref", {
392
+ get: i,
393
393
  configurable: !0
394
394
  });
395
395
  }
396
396
  }
397
- var gt = function(t, a, n, s, d, h, u) {
398
- var o = {
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: n,
405
- props: u,
404
+ ref: i,
405
+ props: l,
406
406
  // Record the component responsible for creating this element.
407
- _owner: h
407
+ _owner: y
408
408
  };
409
- return o._store = {}, Object.defineProperty(o._store, "validated", {
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(o, "_self", {
414
+ }), Object.defineProperty(u, "_self", {
415
415
  configurable: !1,
416
416
  enumerable: !1,
417
417
  writable: !1,
418
418
  value: s
419
- }), Object.defineProperty(o, "_source", {
419
+ }), Object.defineProperty(u, "_source", {
420
420
  configurable: !1,
421
421
  enumerable: !1,
422
422
  writable: !1,
423
- value: d
424
- }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
423
+ value: h
424
+ }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
425
425
  };
426
- function bt(t, a, n, s, d) {
426
+ function Pt(t, a, i, s, h) {
427
427
  {
428
- var h, u = {}, o = null, E = null;
429
- n !== void 0 && (Te(n), o = "" + n), yt(a) && (Te(a.key), o = "" + a.key), pt(a) && (E = a.ref, mt(a, d));
430
- for (h in a)
431
- L.call(a, h) && !ht.hasOwnProperty(h) && (u[h] = a[h]);
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 m = t.defaultProps;
434
- for (h in m)
435
- u[h] === void 0 && (u[h] = m[h]);
433
+ var v = t.defaultProps;
434
+ for (y in v)
435
+ l[y] === void 0 && (l[y] = v[y]);
436
436
  }
437
- if (o || E) {
438
- var v = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
439
- o && ft(u, v), E && vt(u, v);
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 gt(t, o, E, d, s, Pe.current, u);
441
+ return Ct(t, u, D, h, s, _e.current, l);
442
442
  }
443
443
  }
444
- var ae = V.ReactCurrentOwner, _e = V.ReactDebugCurrentFrame;
445
- function Y(t) {
444
+ var ne = E.ReactCurrentOwner, Ve = E.ReactDebugCurrentFrame;
445
+ function $(t) {
446
446
  if (t) {
447
- var a = t._owner, n = z(t.type, t._source, a ? a.type : null);
448
- _e.setExtraStackFrame(n);
447
+ var a = t._owner, i = z(t.type, t._source, a ? a.type : null);
448
+ Ve.setExtraStackFrame(i);
449
449
  } else
450
- _e.setExtraStackFrame(null);
450
+ Ve.setExtraStackFrame(null);
451
451
  }
452
452
  var ie;
453
453
  ie = !1;
454
- function ne(t) {
454
+ function se(t) {
455
455
  return typeof t == "object" && t !== null && t.$$typeof === e;
456
456
  }
457
- function ke() {
457
+ function Ie() {
458
458
  {
459
- if (ae.current) {
460
- var t = I(ae.current.type);
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 Et(t) {
469
+ function Tt(t) {
470
470
  return "";
471
471
  }
472
- var Se = {};
473
- function wt(t) {
472
+ var xe = {};
473
+ function Rt(t) {
474
474
  {
475
- var a = ke();
475
+ var a = Ie();
476
476
  if (!a) {
477
- var n = typeof t == "string" ? t : t.displayName || t.name;
478
- n && (a = `
477
+ var i = typeof t == "string" ? t : t.displayName || t.name;
478
+ i && (a = `
479
479
 
480
- Check the top-level render call using <` + n + ">.");
480
+ Check the top-level render call using <` + i + ">.");
481
481
  }
482
482
  return a;
483
483
  }
484
484
  }
485
- function Ve(t, a) {
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 n = wt(a);
491
- if (Se[n])
490
+ var i = Rt(a);
491
+ if (xe[i])
492
492
  return;
493
- Se[n] = !0;
493
+ xe[i] = !0;
494
494
  var s = "";
495
- t && t._owner && t._owner !== ae.current && (s = " It was passed a child from " + I(t._owner.type) + "."), Y(t), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), Y(null);
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 Ie(t, a) {
498
+ function Me(t, a) {
499
499
  {
500
500
  if (typeof t != "object")
501
501
  return;
502
- if (re(t))
503
- for (var n = 0; n < t.length; n++) {
504
- var s = t[n];
505
- ne(s) && Ve(s, a);
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 (ne(t))
507
+ else if (se(t))
508
508
  t._store && (t._store.validated = !0);
509
509
  else if (t) {
510
- var d = J(t);
511
- if (typeof d == "function" && d !== t.entries)
512
- for (var h = d.call(t), u; !(u = h.next()).done; )
513
- ne(u.value) && Ve(u.value, a);
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 Ct(t) {
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 n;
522
+ var i;
523
523
  if (typeof a == "function")
524
- n = a.propTypes;
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 === R))
528
- n = a.propTypes;
527
+ a.$$typeof === P))
528
+ i = a.propTypes;
529
529
  else
530
530
  return;
531
- if (n) {
532
- var s = I(a);
533
- ut(n, t.props, "prop", s, t);
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 d = I(a);
537
- c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
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 && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
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 Tt(t) {
542
+ function _t(t) {
543
543
  {
544
- for (var a = Object.keys(t.props), n = 0; n < a.length; n++) {
545
- var s = a[n];
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
- Y(t), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), Y(null);
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 && (Y(t), c("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
551
+ t.ref !== null && ($(t), d("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
552
552
  }
553
553
  }
554
- var Ne = {};
555
- function xe(t, a, n, s, d, h) {
554
+ var Ae = {};
555
+ function Oe(t, a, i, s, h, y) {
556
556
  {
557
- var u = tt(t);
558
- if (!u) {
559
- var o = "";
560
- (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (o += " 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 E = Et();
562
- E ? o += E : o += ke();
563
- var m;
564
- t === null ? m = "null" : re(t) ? m = "array" : t !== void 0 && t.$$typeof === e ? (m = "<" + (I(t.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : m = typeof t, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, o);
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 v = bt(t, a, n, d, h);
567
- if (v == null)
568
- return v;
569
- if (u) {
570
- var D = a.children;
571
- if (D !== void 0)
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 (re(D)) {
574
- for (var F = 0; F < D.length; F++)
575
- Ie(D[F], t);
576
- Object.freeze && Object.freeze(D);
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
- c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
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
- Ie(D, t);
580
+ Me(S, t);
581
581
  }
582
- if (L.call(a, "key")) {
583
- var A = I(t), C = Object.keys(a).filter(function(St) {
584
- return St !== "key";
585
- }), se = C.length > 0 ? "{key: someKey, " + C.join(": ..., ") + ": ...}" : "{key: someKey}";
586
- if (!Ne[A + se]) {
587
- var kt = C.length > 0 ? "{" + C.join(": ..., ") + ": ...}" : "{}";
588
- c(`A props object containing a "key" prop is being spread into JSX:
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} />`, se, A, kt, A), Ne[A + se] = !0;
593
+ <%s key={someKey} {...props} />`, oe, j, xt, j), Ae[j + oe] = !0;
594
594
  }
595
595
  }
596
- return t === l ? Tt(v) : Ct(v), v;
596
+ return t === o ? _t(g) : Dt(g), g;
597
597
  }
598
598
  }
599
- function Pt(t, a, n) {
600
- return xe(t, a, n, !0);
599
+ function kt(t, a, i) {
600
+ return Oe(t, a, i, !0);
601
601
  }
602
- function Rt(t, a, n) {
603
- return xe(t, a, n, !1);
602
+ function St(t, a, i) {
603
+ return Oe(t, a, i, !1);
604
604
  }
605
- var Dt = Rt, _t = Pt;
606
- B.Fragment = l, B.jsx = Dt, B.jsxs = _t;
607
- })()), B;
605
+ var Vt = St, It = kt;
606
+ q.Fragment = o, q.jsx = Vt, q.jsxs = It;
607
+ })()), q;
608
608
  }
609
- var Oe;
610
- function Yt() {
611
- return Oe || (Oe = 1, process.env.NODE_ENV === "production" ? Z.exports = jt() : Z.exports = Ut()), Z.exports;
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 O = Yt(), y = /* @__PURE__ */ ((i) => (i[i.Trace = 0] = "Trace", i[i.Debug = 1] = "Debug", i[i.Information = 2] = "Information", i[i.Warning = 3] = "Warning", i[i.Error = 4] = "Error", i[i.Critical = 5] = "Critical", i[i.None = 6] = "None", i))(y || {});
614
- class Ft {
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, ...l) {
631
+ log(e, r, ...o) {
632
632
  switch (e) {
633
633
  case 1:
634
- this.debug(r, ...l);
634
+ this.debug(r, ...o);
635
635
  break;
636
636
  case 3:
637
- this.warn(r, ...l);
637
+ this.warn(r, ...o);
638
638
  break;
639
639
  case 4:
640
- this.error(r, ...l);
640
+ this.error(r, ...o);
641
641
  break;
642
642
  }
643
643
  }
644
644
  }
645
- const $t = new Ft();
646
- class Wt {
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 Ge = new Wt(), Be = Vt(
684
+ const Q = new Gt(), ze = Mt(
685
685
  void 0
686
- ), Lt = ({
687
- children: i,
688
- logger: e = $t
686
+ ), Bt = ({
687
+ children: n,
688
+ logger: e = Lt
689
689
  }) => {
690
- const r = Nt(Ge), l = w(
691
- (c) => {
690
+ const r = L(Q), o = T(
691
+ (d) => {
692
692
  e.log(
693
- y.Debug,
693
+ p.Debug,
694
694
  "NostalgicDivaProvider.handleControllerChange",
695
695
  r.current,
696
- c
697
- ), r.current = c;
696
+ d
697
+ ), r.current = d;
698
698
  },
699
699
  [e]
700
- ), p = w(
701
- async (c) => {
700
+ ), c = T(
701
+ async (d) => {
702
702
  e.log(
703
- y.Debug,
703
+ p.Debug,
704
704
  "NostalgicDivaProvider.loadVideo",
705
705
  r.current
706
- ), await r.current.loadVideo(c);
706
+ ), await r.current.loadVideo(d);
707
707
  },
708
708
  [e]
709
- ), g = w(async () => {
709
+ ), m = T(async () => {
710
710
  e.log(
711
- y.Debug,
711
+ p.Debug,
712
712
  "NostalgicDivaProvider.play",
713
713
  r.current
714
714
  ), await r.current.play();
715
- }, [e]), _ = w(async () => {
715
+ }, [e]), R = T(async () => {
716
716
  e.log(
717
- y.Debug,
717
+ p.Debug,
718
718
  "NostalgicDivaProvider.pause",
719
719
  r.current
720
720
  ), await r.current.pause();
721
- }, [e]), T = w(
722
- async (c) => {
721
+ }, [e]), w = T(
722
+ async (d) => {
723
723
  e.log(
724
- y.Debug,
724
+ p.Debug,
725
725
  "NostalgicDivaProvider.setCurrentTime",
726
726
  r.current
727
- ), await r.current.setCurrentTime(c), await r.current.play();
727
+ ), await r.current.setCurrentTime(d), await r.current.play();
728
728
  },
729
729
  [e]
730
- ), f = w(
731
- async (c) => {
730
+ ), f = T(
731
+ async (d) => {
732
732
  e.log(
733
- y.Debug,
733
+ p.Debug,
734
734
  "NostalgicDivaProvider.setVolume",
735
735
  r.current
736
- ), await r.current.setVolume(c);
736
+ ), await r.current.setVolume(d);
737
737
  },
738
738
  [e]
739
- ), P = w(
740
- async (c) => {
739
+ ), C = T(
740
+ async (d) => {
741
741
  e.log(
742
- y.Debug,
742
+ p.Debug,
743
743
  "NostalgicDivaProvider.setMuted",
744
744
  r.current
745
- ), await r.current.setMuted(c);
745
+ ), await r.current.setMuted(d);
746
746
  },
747
747
  [e]
748
- ), b = w(
749
- async (c) => {
748
+ ), b = T(
749
+ async (d) => {
750
750
  e.log(
751
- y.Debug,
751
+ p.Debug,
752
752
  "NostalgicDivaProvider.setPlaybackRate",
753
753
  r.current
754
- ), await r.current.setPlaybackRate(c);
754
+ ), await r.current.setPlaybackRate(d);
755
755
  },
756
756
  [e]
757
- ), R = w(async () => (e.log(
758
- y.Debug,
757
+ ), P = T(async () => (e.log(
758
+ p.Debug,
759
759
  "NostalgicDivaProvider.getDuration",
760
760
  r.current
761
- ), await r.current.getDuration()), [e]), k = w(async () => (e.log(
762
- y.Debug,
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]), N = w(async () => (e.log(
766
- y.Debug,
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]), $ = w(async () => (e.log(
770
- y.Debug,
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]), H = w(async () => (e.log(
774
- y.Debug,
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]), J = w(
778
- (c) => r.current.supports(c),
777
+ ), await r.current.getPlaybackRate()), [e]), A = T(
778
+ (d) => r.current.supports(d),
779
779
  []
780
- ), V = xt(
780
+ ), E = Ot(
781
781
  () => ({
782
782
  logger: e,
783
- handleControllerChange: l,
784
- loadVideo: p,
785
- play: g,
786
- pause: _,
787
- setCurrentTime: T,
783
+ handleControllerChange: o,
784
+ loadVideo: c,
785
+ play: m,
786
+ pause: R,
787
+ setCurrentTime: w,
788
788
  setVolume: f,
789
- setMuted: P,
789
+ setMuted: C,
790
790
  setPlaybackRate: b,
791
- getDuration: R,
791
+ getDuration: P,
792
792
  getCurrentTime: k,
793
- getVolume: N,
794
- getMuted: $,
795
- getPlaybackRate: H,
796
- supports: J
793
+ getVolume: I,
794
+ getMuted: M,
795
+ getPlaybackRate: x,
796
+ supports: A
797
797
  }),
798
798
  [
799
799
  e,
800
- l,
801
- p,
802
- g,
803
- _,
804
- T,
800
+ o,
801
+ c,
802
+ m,
803
+ R,
804
+ w,
805
805
  f,
806
- P,
806
+ C,
807
807
  b,
808
- R,
808
+ P,
809
809
  k,
810
- N,
811
- $,
812
- H,
813
- J
810
+ I,
811
+ M,
812
+ x,
813
+ A
814
814
  ]
815
815
  );
816
- return /* @__PURE__ */ O.jsx(Be.Provider, { value: V, children: i });
817
- }, Gt = () => It(Be);
818
- class j {
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 Bt = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, Ht = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i;
972
- class Jt extends U {
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(S.Audio);
826
+ super("Audio");
975
827
  }
976
828
  canPlay(e) {
977
- return Bt.test(e) || Ht.test(e);
829
+ return qt.test(e) || Jt.test(e);
978
830
  }
979
831
  extractVideoId(e) {
980
832
  return e;
981
833
  }
982
834
  }
983
- const je = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/;
984
- class qt extends U {
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(S.Dailymotion);
838
+ super("Dailymotion");
987
839
  }
988
840
  canPlay(e) {
989
- return je.test(e);
841
+ return $e.test(e);
990
842
  }
991
843
  extractVideoId(e) {
992
- return je.exec(e)?.[1];
844
+ return $e.exec(e)?.[1];
993
845
  }
994
846
  }
995
- const Ue = /(?:www\.|)?nicovideo\.jp\/watch\/(\w+)$/;
996
- class Kt extends U {
847
+ const We = /(?:www\.|)?nicovideo\.jp\/watch\/(\w+)$/;
848
+ class Xt extends F {
997
849
  constructor() {
998
- super(S.Niconico);
850
+ super("Niconico");
999
851
  }
1000
852
  canPlay(e) {
1001
- return Ue.test(e);
853
+ return We.test(e);
1002
854
  }
1003
855
  extractVideoId(e) {
1004
- return Ue.exec(e)?.[1];
856
+ return We.exec(e)?.[1];
1005
857
  }
1006
858
  }
1007
- const zt = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
1008
- class Xt extends U {
859
+ const Zt = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
860
+ class Qt extends F {
1009
861
  constructor() {
1010
- super(S.SoundCloud);
862
+ super("SoundCloud");
1011
863
  }
1012
864
  canPlay(e) {
1013
- return zt.test(e);
865
+ return Zt.test(e);
1014
866
  }
1015
867
  extractVideoId(e) {
1016
868
  return e;
1017
869
  }
1018
870
  }
1019
- const Ye = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
1020
- class Zt extends U {
871
+ const Le = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
872
+ class er extends F {
1021
873
  constructor() {
1022
- super(S.Twitch);
874
+ super("Twitch");
1023
875
  }
1024
876
  canPlay(e) {
1025
- return Ye.test(e);
877
+ return Le.test(e);
1026
878
  }
1027
879
  extractVideoId(e) {
1028
- return Ye.exec(e)?.[1];
880
+ return Le.exec(e)?.[1];
1029
881
  }
1030
882
  }
1031
- const Fe = /vimeo\.com\/(\d+)$/;
1032
- class Qt extends U {
883
+ const Ge = /vimeo\.com\/(\d+)$/;
884
+ class tr extends F {
1033
885
  constructor() {
1034
- super(S.Vimeo);
886
+ super("Vimeo");
1035
887
  }
1036
888
  canPlay(e) {
1037
- return Fe.test(e);
889
+ return Ge.test(e);
1038
890
  }
1039
891
  extractVideoId(e) {
1040
- return Fe.exec(e)?.[1];
892
+ return Ge.exec(e)?.[1];
1041
893
  }
1042
894
  }
1043
- const $e = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//;
1044
- class er extends U {
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(S.YouTube);
898
+ super("YouTube");
1047
899
  }
1048
900
  canPlay(e) {
1049
- return $e.test(e);
901
+ return Be.test(e);
1050
902
  }
1051
903
  extractVideoId(e) {
1052
- return $e.exec(e)?.[1];
904
+ return Be.exec(e)?.[1];
1053
905
  }
1054
906
  }
1055
- const tr = [
1056
- new Jt(),
1057
- new qt(),
1058
- new Kt(),
1059
- new Xt(),
1060
- new Zt(),
907
+ const ar = [
908
+ new rr(),
909
+ new er(),
910
+ new tr(),
911
+ new zt(),
1061
912
  new Qt(),
1062
- new er()
913
+ new Kt(),
914
+ new Xt()
1063
915
  ];
1064
- function rr(i) {
1065
- return tr.find((e) => e.canPlay(i));
916
+ function nr(n) {
917
+ return ar.find((e) => e.canPlay(n));
1066
918
  }
1067
- const ar = {
1068
- Audio: M(() => import("./AudioPlayer-C6cCMWWw.js")),
1069
- Dailymotion: M(() => import("./DailymotionPlayer-rl7eyJO7.js")),
1070
- Niconico: M(() => import("./NiconicoPlayer-t_yI_jY1.js")),
1071
- SoundCloud: M(() => import("./SoundCloudPlayer-IoMG-qjP.js")),
1072
- Twitch: M(() => import("./TwitchPlayer-DZYWi-co.js")),
1073
- Vimeo: M(() => import("./VimeoPlayer-iwzPBDrd.js")),
1074
- YouTube: M(() => import("./YouTubePlayer-CyrztH-W.js"))
1075
- };
1076
- function ir(i) {
1077
- const e = rr(i);
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: l } = e, p = l(i);
1081
- if (p !== void 0)
1082
- return { type: r, videoId: p };
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 nr = At(
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: i,
951
+ src: n,
1087
952
  options: e,
1088
953
  onControllerChange: r
1089
954
  }) => {
1090
- const l = Gt(), p = w(
1091
- (P) => {
1092
- l.handleControllerChange(P), r?.(P);
955
+ const o = Ht(), c = T(
956
+ (C) => {
957
+ o.handleControllerChange(C), r?.(C);
1093
958
  },
1094
- [l, r]
959
+ [o, r]
1095
960
  );
1096
- l.logger.log(y.Debug, "NostalgicDiva");
1097
- const g = ir(i);
1098
- if (g === void 0)
1099
- return /* @__PURE__ */ O.jsx("div", { style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ O.jsx(
1100
- "iframe",
1101
- {
1102
- src: "about:blank",
1103
- title: "about:blank",
1104
- style: {
1105
- width: "100%",
1106
- height: "100%",
1107
- border: 0
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: l.logger,
1116
- type: _,
1117
- onControllerChange: p,
1118
- videoId: T,
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 sr extends HTMLElement {
984
+ class ur extends HTMLElement {
1125
985
  static observedAttributes = ["src"];
1126
986
  container;
1127
- controller = Ge;
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
- Ot.render(
1152
- /* @__PURE__ */ O.jsx(Lt, { children: /* @__PURE__ */ O.jsx(
1153
- nr,
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 cr() {
1215
- customElements.define("nostalgic-diva", sr);
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 dr extends j {
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 We = [
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 hr extends j {
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 We)
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 We)
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 oe = /* @__PURE__ */ ((i) => (i[i.Play = 2] = "Play", i[i.Pause = 3] = "Pause", i[i.End = 4] = "End", i))(oe || {});
1347
- class ue extends j {
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 !== ue.origin) return;
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
- y.Debug,
1360
- `player status changed: ${oe[r.data.playerStatus] ?? r.data.playerStatus}`
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
- y.Debug,
1366
- `status changed: ${oe[r.data.playerStatus] ?? r.data.playerStatus}`
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(y.Debug, "load completed"), this.duration = r.data.videoInfo.lengthInSeconds, this.options?.onLoaded?.({ id: r.data.videoInfo.watchId });
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
- y.Debug,
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, l) => {
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
- ue.origin
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 Je extends j {
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, l) => {
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 (p) => {
1478
- const g = await this.getDurationCore();
1537
+ async (c) => {
1538
+ const m = await this.getDurationCore();
1479
1539
  this.options?.onTimeUpdate?.({
1480
- duration: g / 1e3,
1481
- percent: p.currentPosition / g,
1482
- seconds: p.currentPosition / 1e3
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
- (p) => this.options?.onError?.(p)
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, l) {
1505
- return new Promise((p, g) => {
1506
- e.load(r, { ...l, callback: p });
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 Je.playerLoadAsync(this.player, e, {
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 pr extends j {
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 yr extends j {
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 qe = /* @__PURE__ */ ((i) => (i[i.UNSTARTED = -1] = "UNSTARTED", i[i.ENDED = 0] = "ENDED", i[i.PLAYING = 1] = "PLAYING", i[i.PAUSED = 2] = "PAUSED", i[i.BUFFERING = 3] = "BUFFERING", i[i.CUED = 5] = "CUED", i))(qe || {});
1662
- class mr extends j {
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
- y.Debug,
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 l = e.getDuration();
1735
+ const o = e.getDuration();
1676
1736
  this.options?.onTimeUpdate?.({
1677
- duration: l,
1678
- percent: r / l,
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(y.Debug, "setTimeUpdateInterval"), this.clearTimeUpdateInterval(), this.timeUpdateIntervalId = window.setInterval(
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
- y.Debug,
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, l) => {
1753
+ return new Promise((r, o) => {
1694
1754
  this.player.addEventListener("onReady", async () => {
1695
1755
  this.player.addEventListener(
1696
1756
  "onError",
1697
- (p) => this.options?.onError?.(p.data)
1757
+ (c) => this.options?.onError?.(c.data)
1698
1758
  ), this.player.addEventListener(
1699
1759
  "onStateChange",
1700
- (p) => {
1760
+ (c) => {
1701
1761
  switch (this.logger.log(
1702
- y.Debug,
1703
- `state changed: ${qe[p.data]}`
1704
- ), p.data) {
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
- dr as A,
1765
- hr as D,
1766
- y as L,
1767
- ue as N,
1768
- He as P,
1769
- Je as S,
1770
- pr as T,
1771
- yr as V,
1772
- mr as Y,
1773
- nr as a,
1774
- Lt as b,
1775
- sr as c,
1776
- cr as d,
1777
- S as e,
1778
- rr as f,
1779
- O as j,
1780
- Ge as n,
1781
- Gt as u,
1782
- lr as v
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-Dl2QgR_t.js.map
1847
+ //# sourceMappingURL=index-CLTpMeB0.js.map