@aigamo/hydrangean-diva 0.0.1-alpha.32 → 0.0.1-alpha.33

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 (107) hide show
  1. package/dist/App.d.ts +9 -0
  2. package/dist/api/apis/MediaPlayerPlaylistsApi.d.ts +79 -0
  3. package/dist/api/apis/index.d.ts +1 -0
  4. package/dist/api/index.d.ts +3 -0
  5. package/dist/api/models/HydrangeanDivaMediaPlayerContractsPlaylistsDtosGetPlaylistResponseDto.d.ts +22 -0
  6. package/dist/api/models/HydrangeanDivaMediaPlayerContractsPlaylistsDtosListPlaylistsResponseDto.d.ts +22 -0
  7. package/dist/api/models/HydrangeanDivaMediaPlayerContractsPlaylistsDtosListTracksResponseDto.d.ts +22 -0
  8. package/dist/api/models/HydrangeanDivaMediaPlayerContractsPlaylistsDtosPlaylistDto.d.ts +38 -0
  9. package/dist/api/models/HydrangeanDivaMediaPlayerContractsPlaylistsDtosTrackDto.d.ts +56 -0
  10. package/dist/api/models/HydrangeanDivaMediaPlayerEndpointsPlaylistsCreatePlaylistRequest.d.ts +32 -0
  11. package/dist/api/models/HydrangeanDivaMediaPlayerEndpointsPlaylistsRenamePlaylistRequest.d.ts +32 -0
  12. package/dist/api/models/index.d.ts +7 -0
  13. package/dist/api/runtime.d.ts +184 -0
  14. package/dist/common/components/AppLink.d.ts +6 -0
  15. package/dist/common/components/AppPageTemplateHeader.d.ts +18 -0
  16. package/dist/favicon.svg +39 -0
  17. package/dist/features/common/components/Compose.d.ts +7 -0
  18. package/dist/features/common/components/useLocationStateHandler.d.ts +10 -0
  19. package/dist/features/common/helpers/bottomBarHeight.d.ts +1 -0
  20. package/dist/features/common/helpers/featureFlags.d.ts +5 -0
  21. package/dist/features/common/helpers/index.d.ts +1 -0
  22. package/dist/features/common/helpers/miniPlayerSize.d.ts +4 -0
  23. package/dist/features/common/helpers/videoServiceIcons.d.ts +2 -0
  24. package/dist/features/common/index.d.ts +3 -0
  25. package/dist/features/common/interfaces/IObservableStateProvider.d.ts +4 -0
  26. package/dist/features/common/interfaces/index.d.ts +1 -0
  27. package/dist/features/common/stores/MobXObservableStateProvider.d.ts +5 -0
  28. package/dist/features/common/stores/ObservableStateProvider.d.ts +5 -0
  29. package/dist/features/common/stores/getOrAddSchema.d.ts +2 -0
  30. package/dist/features/common/stores/index.d.ts +2 -0
  31. package/dist/features/index.d.ts +5 -0
  32. package/dist/features/media-player/components/HydrangeanDivaProvider.d.ts +7 -0
  33. package/dist/features/media-player/components/index.d.ts +1 -0
  34. package/dist/features/media-player/index.d.ts +1 -0
  35. package/dist/features/media-player.header/components/Header.d.ts +2 -0
  36. package/dist/features/media-player.play-queue/components/AddToSelectablePopover.d.ts +8 -0
  37. package/dist/features/media-player.play-queue/components/AddVideoButton.d.ts +10 -0
  38. package/dist/features/media-player.play-queue/components/DeveloperToolsButton.d.ts +9 -0
  39. package/dist/features/media-player.play-queue/components/PlayQueue.d.ts +9 -0
  40. package/dist/features/media-player.play-queue/components/PlayQueueProvider.d.ts +6 -0
  41. package/dist/features/media-player.play-queue/components/PlayQueueTable.d.ts +9 -0
  42. package/dist/features/media-player.play-queue/components/index.d.ts +1 -0
  43. package/dist/features/media-player.play-queue/helpers/isNoembedResult.d.ts +5 -0
  44. package/dist/features/media-player.play-queue/helpers/mediaPlayerPlaylistsApi.d.ts +2 -0
  45. package/dist/features/media-player.play-queue/index.d.ts +2 -0
  46. package/dist/features/media-player.play-queue/pages/PlayQueuePage.d.ts +2 -0
  47. package/dist/features/media-player.play-queue/pages/index.d.ts +1 -0
  48. package/dist/features/media-player.play-queue/stores/PlayQueueItemStore.d.ts +40 -0
  49. package/dist/features/media-player.play-queue/stores/PlayQueueStore.d.ts +61 -0
  50. package/dist/features/media-player.play-queue.abstractions/contexts/PlayQueueContext.d.ts +3 -0
  51. package/dist/features/media-player.play-queue.abstractions/contexts/index.d.ts +1 -0
  52. package/dist/features/media-player.play-queue.abstractions/index.d.ts +2 -0
  53. package/dist/features/media-player.play-queue.abstractions/interfaces/IPlayQueueItemStore.d.ts +29 -0
  54. package/dist/features/media-player.play-queue.abstractions/interfaces/IPlayQueueStore.d.ts +48 -0
  55. package/dist/features/media-player.play-queue.abstractions/interfaces/PlayQueueDto.d.ts +11 -0
  56. package/dist/features/media-player.play-queue.abstractions/interfaces/PlayQueueItemDto.d.ts +9 -0
  57. package/dist/features/media-player.play-queue.abstractions/interfaces/RepeatMode.d.ts +5 -0
  58. package/dist/features/media-player.play-queue.abstractions/interfaces/index.d.ts +3 -0
  59. package/dist/features/media-player.player/components/CookieConsentPanel.d.ts +8 -0
  60. package/dist/features/media-player.player/components/MediaPlayerLayout.d.ts +8 -0
  61. package/dist/features/media-player.player/components/PlayerProvider.d.ts +6 -0
  62. package/dist/features/media-player.player/components/bottom-bar/BottomBar.d.ts +8 -0
  63. package/dist/features/media-player.player/components/bottom-bar/BottomBarCenterControls.d.ts +4 -0
  64. package/dist/features/media-player.player/components/bottom-bar/BottomBarLeftControls.d.ts +4 -0
  65. package/dist/features/media-player.player/components/bottom-bar/BottomBarProvider.d.ts +6 -0
  66. package/dist/features/media-player.player/components/bottom-bar/BottomBarRightControls.d.ts +6 -0
  67. package/dist/features/media-player.player/components/bottom-bar/SeekBar.d.ts +4 -0
  68. package/dist/features/media-player.player/components/bottom-bar/index.d.ts +1 -0
  69. package/dist/features/media-player.player/components/index.d.ts +3 -0
  70. package/dist/features/media-player.player/components/mini-player/MiniPlayer.d.ts +4 -0
  71. package/dist/features/media-player.player/components/mini-player/MiniPlayerProvider.d.ts +6 -0
  72. package/dist/features/media-player.player/components/mini-player/index.d.ts +1 -0
  73. package/dist/features/media-player.player/contexts/BottomBarContext.d.ts +3 -0
  74. package/dist/features/media-player.player/contexts/MiniPlayerContext.d.ts +3 -0
  75. package/dist/features/media-player.player/contexts/PlayerContext.d.ts +3 -0
  76. package/dist/features/media-player.player/index.d.ts +2 -0
  77. package/dist/features/media-player.player/interfaces/IBottomBarStore.d.ts +32 -0
  78. package/dist/features/media-player.player/interfaces/IMiniPlayerStore.d.ts +12 -0
  79. package/dist/features/media-player.player/interfaces/IPlayerStore.d.ts +13 -0
  80. package/dist/features/media-player.player/interfaces/index.d.ts +3 -0
  81. package/dist/features/media-player.player/stores/BottomBarStore.d.ts +39 -0
  82. package/dist/features/media-player.player/stores/MiniPlayerStore.d.ts +18 -0
  83. package/dist/features/media-player.player/stores/PlayerStore.d.ts +18 -0
  84. package/dist/features/media-player.playlists/components/CreatePlaylistButton.d.ts +10 -0
  85. package/dist/features/media-player.playlists/components/PlaylistTable.d.ts +9 -0
  86. package/dist/features/media-player.playlists/helpers/mediaPlayerPlaylistsApi.d.ts +2 -0
  87. package/dist/features/media-player.playlists/pages/PlaylistDetailsPage.d.ts +9 -0
  88. package/dist/features/media-player.playlists/pages/PlaylistListPage.d.ts +2 -0
  89. package/dist/features/media-player.playlists/stores/PlaylistItemStore.d.ts +20 -0
  90. package/dist/features/media-player.playlists/stores/PlaylistListStore.d.ts +16 -0
  91. package/dist/features/media-player.playlists/stores/PlaylistStore.d.ts +33 -0
  92. package/dist/icons.d.ts +1 -0
  93. package/dist/index.cjs.js +15 -0
  94. package/dist/index.cjs.js.map +1 -0
  95. package/dist/index.d.ts +1 -0
  96. package/dist/index.es.js +3374 -0
  97. package/dist/index.es.js.map +1 -0
  98. package/dist/main.d.ts +1 -0
  99. package/dist/routeTree.gen.d.ts +91 -0
  100. package/dist/routes/__root.d.ts +1 -0
  101. package/dist/routes/_authenticated/index.d.ts +1 -0
  102. package/dist/routes/_authenticated/play-queue.d.ts +1 -0
  103. package/dist/routes/_authenticated/playlists/$playlistId.index.d.ts +1 -0
  104. package/dist/routes/_authenticated/playlists/index.d.ts +1 -0
  105. package/dist/routes/_authenticated.d.ts +1 -0
  106. package/dist/sw.d.ts +1 -0
  107. package/package.json +4 -7
@@ -0,0 +1,3374 @@
1
+ import { makeObservable as zr, action as m, computed as g, observable as Z, reaction as Lr } from "mobx";
2
+ import * as re from "react";
3
+ import Ut, { forwardRef as qr, useContext as Oe, createContext as Ue, useState as $, useEffect as Yt, memo as ne, useCallback as B, useMemo as Ye, useLayoutEffect as Qr } from "react";
4
+ import Vr from "@emotion/cache";
5
+ import Ur from "ajv";
6
+ import { useNostalgicDiva as ce, nullPlayerController as Yr, NostalgicDivaProvider as Wr, findVideoService as Hr, NostalgicDiva as Gr } from "@aigamo/nostalgic-diva";
7
+ import { pull as At } from "lodash-es";
8
+ import { EuiSelectable as Jr, EuiPopoverTitle as Kr, EuiPopoverFooter as Xr, EuiButton as J, EuiPopover as ke, useGeneratedHtmlId as Zr, EuiModalHeaderTitle as en, EuiModalHeader as tn, EuiForm as rn, EuiFormRow as ut, EuiFieldText as Ft, EuiModalBody as nn, EuiModalFooter as an, EuiButtonEmpty as Wt, EuiModal as on, EuiCodeBlock as sn, EuiFlyout as ln, useEuiTheme as Ht, EuiCheckbox as Gt, EuiTableHeaderCellCheckbox as cn, EuiTableHeaderCell as ot, EuiTableHeader as un, EuiIcon as U, EuiContextMenu as mt, EuiButtonIcon as Y, EuiTableRowCell as dt, EuiTableRowCellCheckbox as dn, EuiLink as fn, EuiTableRow as pn, EuiTable as mn, EuiFlexGroup as le, EuiFlexItem as G, EuiSpacer as Jt, EuiEmptyPrompt as hn, EuiPageTemplate as ht, EuiRange as Kt, EuiBottomBar as yn } from "@elastic/eui";
9
+ import { AddRegular as Ee, WindowDevToolsRegular as vn, ArrowUploadRegular as gn, ArrowDownloadRegular as bn, MoreHorizontalFilled as Xt, PlayRegular as Pn, DismissRegular as yt, DeleteRegular as Sn, ArrowShuffleFilled as wn, ArrowShuffleOffFilled as Tn, PreviousFilled as Rn, SkipBack10Regular as Zt, PauseFilled as Cn, PlayFilled as En, SkipForward30Regular as er, NextFilled as In, ArrowRepeat1Filled as xn, ArrowRepeatAllFilled as On, ArrowRepeatAllOffFilled as kn, OpenRegular as _n, Speaker2Regular as tr, TopSpeedRegular as An, NavigationPlayRegular as Fn } from "@fluentui/react-icons";
10
+ import { observer as I } from "mobx-react-lite";
11
+ import { ReactSortable as Mn } from "react-sortablejs";
12
+ import { useRouter as Dn } from "@tanstack/react-router";
13
+ const rr = 81;
14
+ class We {
15
+ makeObservable(e, r) {
16
+ return zr(e, r);
17
+ }
18
+ }
19
+ class Mi {
20
+ makeObservable(e, r) {
21
+ return e;
22
+ }
23
+ }
24
+ var qe = { exports: {} }, Te = {};
25
+ var Mt;
26
+ function Nn() {
27
+ if (Mt) return Te;
28
+ Mt = 1;
29
+ var t = Ut, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
30
+ function c(f, p, y) {
31
+ var P, w = {}, L = null, N = null;
32
+ y !== void 0 && (L = "" + y), p.key !== void 0 && (L = "" + p.key), p.ref !== void 0 && (N = p.ref);
33
+ for (P in p) a.call(p, P) && !s.hasOwnProperty(P) && (w[P] = p[P]);
34
+ if (f && f.defaultProps) for (P in p = f.defaultProps, p) w[P] === void 0 && (w[P] = p[P]);
35
+ return { $$typeof: e, type: f, key: L, ref: N, props: w, _owner: i.current };
36
+ }
37
+ return Te.Fragment = r, Te.jsx = c, Te.jsxs = c, Te;
38
+ }
39
+ var Re = {};
40
+ var Dt;
41
+ function $n() {
42
+ return Dt || (Dt = 1, process.env.NODE_ENV !== "production" && (function() {
43
+ var t = Ut, e = /* @__PURE__ */ Symbol.for("react.element"), r = /* @__PURE__ */ Symbol.for("react.portal"), a = /* @__PURE__ */ Symbol.for("react.fragment"), i = /* @__PURE__ */ Symbol.for("react.strict_mode"), s = /* @__PURE__ */ Symbol.for("react.profiler"), c = /* @__PURE__ */ Symbol.for("react.provider"), f = /* @__PURE__ */ Symbol.for("react.context"), p = /* @__PURE__ */ Symbol.for("react.forward_ref"), y = /* @__PURE__ */ Symbol.for("react.suspense"), P = /* @__PURE__ */ Symbol.for("react.suspense_list"), w = /* @__PURE__ */ Symbol.for("react.memo"), L = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.offscreen"), A = Symbol.iterator, W = "@@iterator";
44
+ function ee(n) {
45
+ if (n === null || typeof n != "object")
46
+ return null;
47
+ var l = A && n[A] || n[W];
48
+ return typeof l == "function" ? l : null;
49
+ }
50
+ var q = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
+ function x(n) {
52
+ {
53
+ for (var l = arguments.length, d = new Array(l > 1 ? l - 1 : 0), v = 1; v < l; v++)
54
+ d[v - 1] = arguments[v];
55
+ F("error", n, d);
56
+ }
57
+ }
58
+ function F(n, l, d) {
59
+ {
60
+ var v = q.ReactDebugCurrentFrame, T = v.getStackAddendum();
61
+ T !== "" && (l += "%s", d = d.concat([T]));
62
+ var E = d.map(function(S) {
63
+ return String(S);
64
+ });
65
+ E.unshift("Warning: " + l), Function.prototype.apply.call(console[n], console, E);
66
+ }
67
+ }
68
+ var k = !1, u = !1, Q = !1, he = !1, Ae = !1, Fe;
69
+ Fe = /* @__PURE__ */ Symbol.for("react.module.reference");
70
+ function Je(n) {
71
+ return !!(typeof n == "string" || typeof n == "function" || n === a || n === s || Ae || n === i || n === y || n === P || he || n === N || k || u || Q || typeof n == "object" && n !== null && (n.$$typeof === L || n.$$typeof === w || n.$$typeof === c || n.$$typeof === f || n.$$typeof === p || // This needs to include all possible module reference object
72
+ // types supported by any Flight configuration anywhere since
73
+ // we don't know which Flight build this will end up being used
74
+ // with.
75
+ n.$$typeof === Fe || n.getModuleId !== void 0));
76
+ }
77
+ function Ke(n, l, d) {
78
+ var v = n.displayName;
79
+ if (v)
80
+ return v;
81
+ var T = l.displayName || l.name || "";
82
+ return T !== "" ? d + "(" + T + ")" : d;
83
+ }
84
+ function Me(n) {
85
+ return n.displayName || "Context";
86
+ }
87
+ function K(n) {
88
+ if (n == null)
89
+ return null;
90
+ if (typeof n.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
91
+ return n.displayName || n.name || null;
92
+ if (typeof n == "string")
93
+ return n;
94
+ switch (n) {
95
+ case a:
96
+ return "Fragment";
97
+ case r:
98
+ return "Portal";
99
+ case s:
100
+ return "Profiler";
101
+ case i:
102
+ return "StrictMode";
103
+ case y:
104
+ return "Suspense";
105
+ case P:
106
+ return "SuspenseList";
107
+ }
108
+ if (typeof n == "object")
109
+ switch (n.$$typeof) {
110
+ case f:
111
+ var l = n;
112
+ return Me(l) + ".Consumer";
113
+ case c:
114
+ var d = n;
115
+ return Me(d._context) + ".Provider";
116
+ case p:
117
+ return Ke(n, n.render, "ForwardRef");
118
+ case w:
119
+ var v = n.displayName || null;
120
+ return v !== null ? v : K(n.type) || "Memo";
121
+ case L: {
122
+ var T = n, E = T._payload, S = T._init;
123
+ try {
124
+ return K(S(E));
125
+ } catch {
126
+ return null;
127
+ }
128
+ }
129
+ }
130
+ return null;
131
+ }
132
+ var te = Object.assign, ae = 0, De, Ne, ye, $e, ve, Be, je;
133
+ function ze() {
134
+ }
135
+ ze.__reactDisabledLog = !0;
136
+ function Xe() {
137
+ {
138
+ if (ae === 0) {
139
+ De = console.log, Ne = console.info, ye = console.warn, $e = console.error, ve = console.group, Be = console.groupCollapsed, je = console.groupEnd;
140
+ var n = {
141
+ configurable: !0,
142
+ enumerable: !0,
143
+ value: ze,
144
+ writable: !0
145
+ };
146
+ Object.defineProperties(console, {
147
+ info: n,
148
+ log: n,
149
+ warn: n,
150
+ error: n,
151
+ group: n,
152
+ groupCollapsed: n,
153
+ groupEnd: n
154
+ });
155
+ }
156
+ ae++;
157
+ }
158
+ }
159
+ function Ze() {
160
+ {
161
+ if (ae--, ae === 0) {
162
+ var n = {
163
+ configurable: !0,
164
+ enumerable: !0,
165
+ writable: !0
166
+ };
167
+ Object.defineProperties(console, {
168
+ log: te({}, n, {
169
+ value: De
170
+ }),
171
+ info: te({}, n, {
172
+ value: Ne
173
+ }),
174
+ warn: te({}, n, {
175
+ value: ye
176
+ }),
177
+ error: te({}, n, {
178
+ value: $e
179
+ }),
180
+ group: te({}, n, {
181
+ value: ve
182
+ }),
183
+ groupCollapsed: te({}, n, {
184
+ value: Be
185
+ }),
186
+ groupEnd: te({}, n, {
187
+ value: je
188
+ })
189
+ });
190
+ }
191
+ ae < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ }
193
+ }
194
+ var ge = q.ReactCurrentDispatcher, be;
195
+ function ue(n, l, d) {
196
+ {
197
+ if (be === void 0)
198
+ try {
199
+ throw Error();
200
+ } catch (T) {
201
+ var v = T.stack.trim().match(/\n( *(at )?)/);
202
+ be = v && v[1] || "";
203
+ }
204
+ return `
205
+ ` + be + n;
206
+ }
207
+ }
208
+ var Pe = !1, de;
209
+ {
210
+ var et = typeof WeakMap == "function" ? WeakMap : Map;
211
+ de = new et();
212
+ }
213
+ function h(n, l) {
214
+ if (!n || Pe)
215
+ return "";
216
+ {
217
+ var d = de.get(n);
218
+ if (d !== void 0)
219
+ return d;
220
+ }
221
+ var v;
222
+ Pe = !0;
223
+ var T = Error.prepareStackTrace;
224
+ Error.prepareStackTrace = void 0;
225
+ var E;
226
+ E = ge.current, ge.current = null, Xe();
227
+ try {
228
+ if (l) {
229
+ var S = function() {
230
+ throw Error();
231
+ };
232
+ if (Object.defineProperty(S.prototype, "props", {
233
+ set: function() {
234
+ throw Error();
235
+ }
236
+ }), typeof Reflect == "object" && Reflect.construct) {
237
+ try {
238
+ Reflect.construct(S, []);
239
+ } catch (V) {
240
+ v = V;
241
+ }
242
+ Reflect.construct(n, [], S);
243
+ } else {
244
+ try {
245
+ S.call();
246
+ } catch (V) {
247
+ v = V;
248
+ }
249
+ n.call(S.prototype);
250
+ }
251
+ } else {
252
+ try {
253
+ throw Error();
254
+ } catch (V) {
255
+ v = V;
256
+ }
257
+ n();
258
+ }
259
+ } catch (V) {
260
+ if (V && v && typeof V.stack == "string") {
261
+ for (var b = V.stack.split(`
262
+ `), j = v.stack.split(`
263
+ `), _ = b.length - 1, M = j.length - 1; _ >= 1 && M >= 0 && b[_] !== j[M]; )
264
+ M--;
265
+ for (; _ >= 1 && M >= 0; _--, M--)
266
+ if (b[_] !== j[M]) {
267
+ if (_ !== 1 || M !== 1)
268
+ do
269
+ if (_--, M--, M < 0 || b[_] !== j[M]) {
270
+ var H = `
271
+ ` + b[_].replace(" at new ", " at ");
272
+ return n.displayName && H.includes("<anonymous>") && (H = H.replace("<anonymous>", n.displayName)), typeof n == "function" && de.set(n, H), H;
273
+ }
274
+ while (_ >= 1 && M >= 0);
275
+ break;
276
+ }
277
+ }
278
+ } finally {
279
+ Pe = !1, ge.current = E, Ze(), Error.prepareStackTrace = T;
280
+ }
281
+ var me = n ? n.displayName || n.name : "", oe = me ? ue(me) : "";
282
+ return typeof n == "function" && de.set(n, oe), oe;
283
+ }
284
+ function Se(n, l, d) {
285
+ return h(n, !1);
286
+ }
287
+ function fe(n) {
288
+ var l = n.prototype;
289
+ return !!(l && l.isReactComponent);
290
+ }
291
+ function ie(n, l, d) {
292
+ if (n == null)
293
+ return "";
294
+ if (typeof n == "function")
295
+ return h(n, fe(n));
296
+ if (typeof n == "string")
297
+ return ue(n);
298
+ switch (n) {
299
+ case y:
300
+ return ue("Suspense");
301
+ case P:
302
+ return ue("SuspenseList");
303
+ }
304
+ if (typeof n == "object")
305
+ switch (n.$$typeof) {
306
+ case p:
307
+ return Se(n.render);
308
+ case w:
309
+ return ie(n.type, l, d);
310
+ case L: {
311
+ var v = n, T = v._payload, E = v._init;
312
+ try {
313
+ return ie(E(T), l, d);
314
+ } catch {
315
+ }
316
+ }
317
+ }
318
+ return "";
319
+ }
320
+ var we = Object.prototype.hasOwnProperty, gt = {}, bt = q.ReactDebugCurrentFrame;
321
+ function Le(n) {
322
+ if (n) {
323
+ var l = n._owner, d = ie(n.type, n._source, l ? l.type : null);
324
+ bt.setExtraStackFrame(d);
325
+ } else
326
+ bt.setExtraStackFrame(null);
327
+ }
328
+ function gr(n, l, d, v, T) {
329
+ {
330
+ var E = Function.call.bind(we);
331
+ for (var S in n)
332
+ if (E(n, S)) {
333
+ var b = void 0;
334
+ try {
335
+ if (typeof n[S] != "function") {
336
+ var j = Error((v || "React class") + ": " + d + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
+ throw j.name = "Invariant Violation", j;
338
+ }
339
+ b = n[S](l, S, v, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
+ } catch (_) {
341
+ b = _;
342
+ }
343
+ b && !(b instanceof Error) && (Le(T), x("%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).", v || "React class", d, S, typeof b), Le(null)), b instanceof Error && !(b.message in gt) && (gt[b.message] = !0, Le(T), x("Failed %s type: %s", d, b.message), Le(null));
344
+ }
345
+ }
346
+ }
347
+ var br = Array.isArray;
348
+ function tt(n) {
349
+ return br(n);
350
+ }
351
+ function Pr(n) {
352
+ {
353
+ var l = typeof Symbol == "function" && Symbol.toStringTag, d = l && n[Symbol.toStringTag] || n.constructor.name || "Object";
354
+ return d;
355
+ }
356
+ }
357
+ function Sr(n) {
358
+ try {
359
+ return Pt(n), !1;
360
+ } catch {
361
+ return !0;
362
+ }
363
+ }
364
+ function Pt(n) {
365
+ return "" + n;
366
+ }
367
+ function St(n) {
368
+ if (Sr(n))
369
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pr(n)), Pt(n);
370
+ }
371
+ var wt = q.ReactCurrentOwner, wr = {
372
+ key: !0,
373
+ ref: !0,
374
+ __self: !0,
375
+ __source: !0
376
+ }, Tt, Rt;
377
+ function Tr(n) {
378
+ if (we.call(n, "ref")) {
379
+ var l = Object.getOwnPropertyDescriptor(n, "ref").get;
380
+ if (l && l.isReactWarning)
381
+ return !1;
382
+ }
383
+ return n.ref !== void 0;
384
+ }
385
+ function Rr(n) {
386
+ if (we.call(n, "key")) {
387
+ var l = Object.getOwnPropertyDescriptor(n, "key").get;
388
+ if (l && l.isReactWarning)
389
+ return !1;
390
+ }
391
+ return n.key !== void 0;
392
+ }
393
+ function Cr(n, l) {
394
+ typeof n.ref == "string" && wt.current;
395
+ }
396
+ function Er(n, l) {
397
+ {
398
+ var d = function() {
399
+ Tt || (Tt = !0, x("%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)", l));
400
+ };
401
+ d.isReactWarning = !0, Object.defineProperty(n, "key", {
402
+ get: d,
403
+ configurable: !0
404
+ });
405
+ }
406
+ }
407
+ function Ir(n, l) {
408
+ {
409
+ var d = function() {
410
+ Rt || (Rt = !0, x("%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)", l));
411
+ };
412
+ d.isReactWarning = !0, Object.defineProperty(n, "ref", {
413
+ get: d,
414
+ configurable: !0
415
+ });
416
+ }
417
+ }
418
+ var xr = function(n, l, d, v, T, E, S) {
419
+ var b = {
420
+ // This tag allows us to uniquely identify this as a React Element
421
+ $$typeof: e,
422
+ // Built-in properties that belong on the element
423
+ type: n,
424
+ key: l,
425
+ ref: d,
426
+ props: S,
427
+ // Record the component responsible for creating this element.
428
+ _owner: E
429
+ };
430
+ return b._store = {}, Object.defineProperty(b._store, "validated", {
431
+ configurable: !1,
432
+ enumerable: !1,
433
+ writable: !0,
434
+ value: !1
435
+ }), Object.defineProperty(b, "_self", {
436
+ configurable: !1,
437
+ enumerable: !1,
438
+ writable: !1,
439
+ value: v
440
+ }), Object.defineProperty(b, "_source", {
441
+ configurable: !1,
442
+ enumerable: !1,
443
+ writable: !1,
444
+ value: T
445
+ }), Object.freeze && (Object.freeze(b.props), Object.freeze(b)), b;
446
+ };
447
+ function Or(n, l, d, v, T) {
448
+ {
449
+ var E, S = {}, b = null, j = null;
450
+ d !== void 0 && (St(d), b = "" + d), Rr(l) && (St(l.key), b = "" + l.key), Tr(l) && (j = l.ref, Cr(l, T));
451
+ for (E in l)
452
+ we.call(l, E) && !wr.hasOwnProperty(E) && (S[E] = l[E]);
453
+ if (n && n.defaultProps) {
454
+ var _ = n.defaultProps;
455
+ for (E in _)
456
+ S[E] === void 0 && (S[E] = _[E]);
457
+ }
458
+ if (b || j) {
459
+ var M = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
460
+ b && Er(S, M), j && Ir(S, M);
461
+ }
462
+ return xr(n, b, j, T, v, wt.current, S);
463
+ }
464
+ }
465
+ var rt = q.ReactCurrentOwner, Ct = q.ReactDebugCurrentFrame;
466
+ function pe(n) {
467
+ if (n) {
468
+ var l = n._owner, d = ie(n.type, n._source, l ? l.type : null);
469
+ Ct.setExtraStackFrame(d);
470
+ } else
471
+ Ct.setExtraStackFrame(null);
472
+ }
473
+ var nt;
474
+ nt = !1;
475
+ function at(n) {
476
+ return typeof n == "object" && n !== null && n.$$typeof === e;
477
+ }
478
+ function Et() {
479
+ {
480
+ if (rt.current) {
481
+ var n = K(rt.current.type);
482
+ if (n)
483
+ return `
484
+
485
+ Check the render method of \`` + n + "`.";
486
+ }
487
+ return "";
488
+ }
489
+ }
490
+ function kr(n) {
491
+ return "";
492
+ }
493
+ var It = {};
494
+ function _r(n) {
495
+ {
496
+ var l = Et();
497
+ if (!l) {
498
+ var d = typeof n == "string" ? n : n.displayName || n.name;
499
+ d && (l = `
500
+
501
+ Check the top-level render call using <` + d + ">.");
502
+ }
503
+ return l;
504
+ }
505
+ }
506
+ function xt(n, l) {
507
+ {
508
+ if (!n._store || n._store.validated || n.key != null)
509
+ return;
510
+ n._store.validated = !0;
511
+ var d = _r(l);
512
+ if (It[d])
513
+ return;
514
+ It[d] = !0;
515
+ var v = "";
516
+ n && n._owner && n._owner !== rt.current && (v = " It was passed a child from " + K(n._owner.type) + "."), pe(n), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, v), pe(null);
517
+ }
518
+ }
519
+ function Ot(n, l) {
520
+ {
521
+ if (typeof n != "object")
522
+ return;
523
+ if (tt(n))
524
+ for (var d = 0; d < n.length; d++) {
525
+ var v = n[d];
526
+ at(v) && xt(v, l);
527
+ }
528
+ else if (at(n))
529
+ n._store && (n._store.validated = !0);
530
+ else if (n) {
531
+ var T = ee(n);
532
+ if (typeof T == "function" && T !== n.entries)
533
+ for (var E = T.call(n), S; !(S = E.next()).done; )
534
+ at(S.value) && xt(S.value, l);
535
+ }
536
+ }
537
+ }
538
+ function Ar(n) {
539
+ {
540
+ var l = n.type;
541
+ if (l == null || typeof l == "string")
542
+ return;
543
+ var d;
544
+ if (typeof l == "function")
545
+ d = l.propTypes;
546
+ else if (typeof l == "object" && (l.$$typeof === p || // Note: Memo only checks outer props here.
547
+ // Inner props are checked in the reconciler.
548
+ l.$$typeof === w))
549
+ d = l.propTypes;
550
+ else
551
+ return;
552
+ if (d) {
553
+ var v = K(l);
554
+ gr(d, n.props, "prop", v, n);
555
+ } else if (l.PropTypes !== void 0 && !nt) {
556
+ nt = !0;
557
+ var T = K(l);
558
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
559
+ }
560
+ typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
+ }
562
+ }
563
+ function Fr(n) {
564
+ {
565
+ for (var l = Object.keys(n.props), d = 0; d < l.length; d++) {
566
+ var v = l[d];
567
+ if (v !== "children" && v !== "key") {
568
+ pe(n), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), pe(null);
569
+ break;
570
+ }
571
+ }
572
+ n.ref !== null && (pe(n), x("Invalid attribute `ref` supplied to `React.Fragment`."), pe(null));
573
+ }
574
+ }
575
+ var kt = {};
576
+ function _t(n, l, d, v, T, E) {
577
+ {
578
+ var S = Je(n);
579
+ if (!S) {
580
+ var b = "";
581
+ (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (b += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
+ var j = kr();
583
+ j ? b += j : b += Et();
584
+ var _;
585
+ n === null ? _ = "null" : tt(n) ? _ = "array" : n !== void 0 && n.$$typeof === e ? (_ = "<" + (K(n.type) || "Unknown") + " />", b = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof n, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, b);
586
+ }
587
+ var M = Or(n, l, d, T, E);
588
+ if (M == null)
589
+ return M;
590
+ if (S) {
591
+ var H = l.children;
592
+ if (H !== void 0)
593
+ if (v)
594
+ if (tt(H)) {
595
+ for (var me = 0; me < H.length; me++)
596
+ Ot(H[me], n);
597
+ Object.freeze && Object.freeze(H);
598
+ } else
599
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
600
+ else
601
+ Ot(H, n);
602
+ }
603
+ if (we.call(l, "key")) {
604
+ var oe = K(n), V = Object.keys(l).filter(function(jr) {
605
+ return jr !== "key";
606
+ }), it = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
607
+ if (!kt[oe + it]) {
608
+ var Br = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
609
+ x(`A props object containing a "key" prop is being spread into JSX:
610
+ let props = %s;
611
+ <%s {...props} />
612
+ React keys must be passed directly to JSX without using spread:
613
+ let props = %s;
614
+ <%s key={someKey} {...props} />`, it, oe, Br, oe), kt[oe + it] = !0;
615
+ }
616
+ }
617
+ return n === a ? Fr(M) : Ar(M), M;
618
+ }
619
+ }
620
+ function Mr(n, l, d) {
621
+ return _t(n, l, d, !0);
622
+ }
623
+ function Dr(n, l, d) {
624
+ return _t(n, l, d, !1);
625
+ }
626
+ var Nr = Dr, $r = Mr;
627
+ Re.Fragment = a, Re.jsx = Nr, Re.jsxs = $r;
628
+ })()), Re;
629
+ }
630
+ var Nt;
631
+ function Bn() {
632
+ return Nt || (Nt = 1, process.env.NODE_ENV === "production" ? qe.exports = Nn() : qe.exports = $n()), qe.exports;
633
+ }
634
+ var Ie = Bn(), Qe = { exports: {} }, R = {};
635
+ var $t;
636
+ function jn() {
637
+ if ($t) return R;
638
+ $t = 1;
639
+ var t = typeof Symbol == "function" && Symbol.for, e = t ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = t ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, a = t ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = t ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, s = t ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = t ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, f = t ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = t ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, y = t ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, P = t ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, w = t ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, L = t ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, N = t ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, A = t ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, W = t ? /* @__PURE__ */ Symbol.for("react.block") : 60121, ee = t ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, q = t ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, x = t ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
640
+ function F(u) {
641
+ if (typeof u == "object" && u !== null) {
642
+ var Q = u.$$typeof;
643
+ switch (Q) {
644
+ case e:
645
+ switch (u = u.type, u) {
646
+ case p:
647
+ case y:
648
+ case a:
649
+ case s:
650
+ case i:
651
+ case w:
652
+ return u;
653
+ default:
654
+ switch (u = u && u.$$typeof, u) {
655
+ case f:
656
+ case P:
657
+ case A:
658
+ case N:
659
+ case c:
660
+ return u;
661
+ default:
662
+ return Q;
663
+ }
664
+ }
665
+ case r:
666
+ return Q;
667
+ }
668
+ }
669
+ }
670
+ function k(u) {
671
+ return F(u) === y;
672
+ }
673
+ return R.AsyncMode = p, R.ConcurrentMode = y, R.ContextConsumer = f, R.ContextProvider = c, R.Element = e, R.ForwardRef = P, R.Fragment = a, R.Lazy = A, R.Memo = N, R.Portal = r, R.Profiler = s, R.StrictMode = i, R.Suspense = w, R.isAsyncMode = function(u) {
674
+ return k(u) || F(u) === p;
675
+ }, R.isConcurrentMode = k, R.isContextConsumer = function(u) {
676
+ return F(u) === f;
677
+ }, R.isContextProvider = function(u) {
678
+ return F(u) === c;
679
+ }, R.isElement = function(u) {
680
+ return typeof u == "object" && u !== null && u.$$typeof === e;
681
+ }, R.isForwardRef = function(u) {
682
+ return F(u) === P;
683
+ }, R.isFragment = function(u) {
684
+ return F(u) === a;
685
+ }, R.isLazy = function(u) {
686
+ return F(u) === A;
687
+ }, R.isMemo = function(u) {
688
+ return F(u) === N;
689
+ }, R.isPortal = function(u) {
690
+ return F(u) === r;
691
+ }, R.isProfiler = function(u) {
692
+ return F(u) === s;
693
+ }, R.isStrictMode = function(u) {
694
+ return F(u) === i;
695
+ }, R.isSuspense = function(u) {
696
+ return F(u) === w;
697
+ }, R.isValidElementType = function(u) {
698
+ return typeof u == "string" || typeof u == "function" || u === a || u === y || u === s || u === i || u === w || u === L || typeof u == "object" && u !== null && (u.$$typeof === A || u.$$typeof === N || u.$$typeof === c || u.$$typeof === f || u.$$typeof === P || u.$$typeof === ee || u.$$typeof === q || u.$$typeof === x || u.$$typeof === W);
699
+ }, R.typeOf = F, R;
700
+ }
701
+ var C = {};
702
+ var Bt;
703
+ function zn() {
704
+ return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && (function() {
705
+ var t = typeof Symbol == "function" && Symbol.for, e = t ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = t ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, a = t ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = t ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, s = t ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, c = t ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, f = t ? /* @__PURE__ */ Symbol.for("react.context") : 60110, p = t ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, y = t ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, P = t ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, w = t ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, L = t ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, N = t ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, A = t ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, W = t ? /* @__PURE__ */ Symbol.for("react.block") : 60121, ee = t ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, q = t ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, x = t ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
706
+ function F(h) {
707
+ return typeof h == "string" || typeof h == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
708
+ h === a || h === y || h === s || h === i || h === w || h === L || typeof h == "object" && h !== null && (h.$$typeof === A || h.$$typeof === N || h.$$typeof === c || h.$$typeof === f || h.$$typeof === P || h.$$typeof === ee || h.$$typeof === q || h.$$typeof === x || h.$$typeof === W);
709
+ }
710
+ function k(h) {
711
+ if (typeof h == "object" && h !== null) {
712
+ var Se = h.$$typeof;
713
+ switch (Se) {
714
+ case e:
715
+ var fe = h.type;
716
+ switch (fe) {
717
+ case p:
718
+ case y:
719
+ case a:
720
+ case s:
721
+ case i:
722
+ case w:
723
+ return fe;
724
+ default:
725
+ var ie = fe && fe.$$typeof;
726
+ switch (ie) {
727
+ case f:
728
+ case P:
729
+ case A:
730
+ case N:
731
+ case c:
732
+ return ie;
733
+ default:
734
+ return Se;
735
+ }
736
+ }
737
+ case r:
738
+ return Se;
739
+ }
740
+ }
741
+ }
742
+ var u = p, Q = y, he = f, Ae = c, Fe = e, Je = P, Ke = a, Me = A, K = N, te = r, ae = s, De = i, Ne = w, ye = !1;
743
+ function $e(h) {
744
+ return ye || (ye = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ve(h) || k(h) === p;
745
+ }
746
+ function ve(h) {
747
+ return k(h) === y;
748
+ }
749
+ function Be(h) {
750
+ return k(h) === f;
751
+ }
752
+ function je(h) {
753
+ return k(h) === c;
754
+ }
755
+ function ze(h) {
756
+ return typeof h == "object" && h !== null && h.$$typeof === e;
757
+ }
758
+ function Xe(h) {
759
+ return k(h) === P;
760
+ }
761
+ function Ze(h) {
762
+ return k(h) === a;
763
+ }
764
+ function ge(h) {
765
+ return k(h) === A;
766
+ }
767
+ function be(h) {
768
+ return k(h) === N;
769
+ }
770
+ function ue(h) {
771
+ return k(h) === r;
772
+ }
773
+ function Pe(h) {
774
+ return k(h) === s;
775
+ }
776
+ function de(h) {
777
+ return k(h) === i;
778
+ }
779
+ function et(h) {
780
+ return k(h) === w;
781
+ }
782
+ C.AsyncMode = u, C.ConcurrentMode = Q, C.ContextConsumer = he, C.ContextProvider = Ae, C.Element = Fe, C.ForwardRef = Je, C.Fragment = Ke, C.Lazy = Me, C.Memo = K, C.Portal = te, C.Profiler = ae, C.StrictMode = De, C.Suspense = Ne, C.isAsyncMode = $e, C.isConcurrentMode = ve, C.isContextConsumer = Be, C.isContextProvider = je, C.isElement = ze, C.isForwardRef = Xe, C.isFragment = Ze, C.isLazy = ge, C.isMemo = be, C.isPortal = ue, C.isProfiler = Pe, C.isStrictMode = de, C.isSuspense = et, C.isValidElementType = F, C.typeOf = k;
783
+ })()), C;
784
+ }
785
+ var jt;
786
+ function Ln() {
787
+ return jt || (jt = 1, process.env.NODE_ENV === "production" ? Qe.exports = jn() : Qe.exports = zn()), Qe.exports;
788
+ }
789
+ var st, zt;
790
+ function qn() {
791
+ if (zt) return st;
792
+ zt = 1;
793
+ var t = Ln(), e = {
794
+ childContextTypes: !0,
795
+ contextType: !0,
796
+ contextTypes: !0,
797
+ defaultProps: !0,
798
+ displayName: !0,
799
+ getDefaultProps: !0,
800
+ getDerivedStateFromError: !0,
801
+ getDerivedStateFromProps: !0,
802
+ mixins: !0,
803
+ propTypes: !0,
804
+ type: !0
805
+ }, r = {
806
+ name: !0,
807
+ length: !0,
808
+ prototype: !0,
809
+ caller: !0,
810
+ callee: !0,
811
+ arguments: !0,
812
+ arity: !0
813
+ }, a = {
814
+ $$typeof: !0,
815
+ render: !0,
816
+ defaultProps: !0,
817
+ displayName: !0,
818
+ propTypes: !0
819
+ }, i = {
820
+ $$typeof: !0,
821
+ compare: !0,
822
+ defaultProps: !0,
823
+ displayName: !0,
824
+ propTypes: !0,
825
+ type: !0
826
+ }, s = {};
827
+ s[t.ForwardRef] = a, s[t.Memo] = i;
828
+ function c(A) {
829
+ return t.isMemo(A) ? i : s[A.$$typeof] || e;
830
+ }
831
+ var f = Object.defineProperty, p = Object.getOwnPropertyNames, y = Object.getOwnPropertySymbols, P = Object.getOwnPropertyDescriptor, w = Object.getPrototypeOf, L = Object.prototype;
832
+ function N(A, W, ee) {
833
+ if (typeof W != "string") {
834
+ if (L) {
835
+ var q = w(W);
836
+ q && q !== L && N(A, q, ee);
837
+ }
838
+ var x = p(W);
839
+ y && (x = x.concat(y(W)));
840
+ for (var F = c(A), k = c(W), u = 0; u < x.length; ++u) {
841
+ var Q = x[u];
842
+ if (!r[Q] && !(ee && ee[Q]) && !(k && k[Q]) && !(F && F[Q])) {
843
+ var he = P(W, Q);
844
+ try {
845
+ f(A, Q, he);
846
+ } catch {
847
+ }
848
+ }
849
+ }
850
+ }
851
+ return A;
852
+ }
853
+ return st = N, st;
854
+ }
855
+ qn();
856
+ var Qn = !0;
857
+ function Vn(t, e, r) {
858
+ var a = "";
859
+ return r.split(" ").forEach(function(i) {
860
+ t[i] !== void 0 ? e.push(t[i] + ";") : i && (a += i + " ");
861
+ }), a;
862
+ }
863
+ var nr = function(e, r, a) {
864
+ var i = e.key + "-" + r.name;
865
+ // we only need to add the styles to the registered cache if the
866
+ // class name could be used further down
867
+ // the tree but if it's a string tag, we know it won't
868
+ // so we don't have to add it to registered cache.
869
+ // this improves memory usage since we can avoid storing the whole style string
870
+ (a === !1 || // we need to always store it if we're in compat mode and
871
+ // in node since emotion-server relies on whether a style is in
872
+ // the registered cache to know whether a style is global or not
873
+ // also, note that this check will be dead code eliminated in the browser
874
+ Qn === !1) && e.registered[i] === void 0 && (e.registered[i] = r.styles);
875
+ }, Un = function(e, r, a) {
876
+ nr(e, r, a);
877
+ var i = e.key + "-" + r.name;
878
+ if (e.inserted[r.name] === void 0) {
879
+ var s = r;
880
+ do
881
+ e.insert(r === s ? "." + i : "", s, e.sheet, !0), s = s.next;
882
+ while (s !== void 0);
883
+ }
884
+ };
885
+ function Yn(t) {
886
+ for (var e = 0, r, a = 0, i = t.length; i >= 4; ++a, i -= 4)
887
+ r = t.charCodeAt(a) & 255 | (t.charCodeAt(++a) & 255) << 8 | (t.charCodeAt(++a) & 255) << 16 | (t.charCodeAt(++a) & 255) << 24, r = /* Math.imul(k, m): */
888
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
889
+ r >>> 24, e = /* Math.imul(k, m): */
890
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
891
+ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
892
+ switch (i) {
893
+ case 3:
894
+ e ^= (t.charCodeAt(a + 2) & 255) << 16;
895
+ case 2:
896
+ e ^= (t.charCodeAt(a + 1) & 255) << 8;
897
+ case 1:
898
+ e ^= t.charCodeAt(a) & 255, e = /* Math.imul(h, m): */
899
+ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
900
+ }
901
+ return e ^= e >>> 13, e = /* Math.imul(h, m): */
902
+ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
903
+ }
904
+ var Wn = {
905
+ animationIterationCount: 1,
906
+ aspectRatio: 1,
907
+ borderImageOutset: 1,
908
+ borderImageSlice: 1,
909
+ borderImageWidth: 1,
910
+ boxFlex: 1,
911
+ boxFlexGroup: 1,
912
+ boxOrdinalGroup: 1,
913
+ columnCount: 1,
914
+ columns: 1,
915
+ flex: 1,
916
+ flexGrow: 1,
917
+ flexPositive: 1,
918
+ flexShrink: 1,
919
+ flexNegative: 1,
920
+ flexOrder: 1,
921
+ gridRow: 1,
922
+ gridRowEnd: 1,
923
+ gridRowSpan: 1,
924
+ gridRowStart: 1,
925
+ gridColumn: 1,
926
+ gridColumnEnd: 1,
927
+ gridColumnSpan: 1,
928
+ gridColumnStart: 1,
929
+ msGridRow: 1,
930
+ msGridRowSpan: 1,
931
+ msGridColumn: 1,
932
+ msGridColumnSpan: 1,
933
+ fontWeight: 1,
934
+ lineHeight: 1,
935
+ opacity: 1,
936
+ order: 1,
937
+ orphans: 1,
938
+ scale: 1,
939
+ tabSize: 1,
940
+ widows: 1,
941
+ zIndex: 1,
942
+ zoom: 1,
943
+ WebkitLineClamp: 1,
944
+ // SVG-related properties
945
+ fillOpacity: 1,
946
+ floodOpacity: 1,
947
+ stopOpacity: 1,
948
+ strokeDasharray: 1,
949
+ strokeDashoffset: 1,
950
+ strokeMiterlimit: 1,
951
+ strokeOpacity: 1,
952
+ strokeWidth: 1
953
+ };
954
+ function Hn(t) {
955
+ var e = /* @__PURE__ */ Object.create(null);
956
+ return function(r) {
957
+ return e[r] === void 0 && (e[r] = t(r)), e[r];
958
+ };
959
+ }
960
+ var Gn = /[A-Z]|^ms/g, Jn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, ar = function(e) {
961
+ return e.charCodeAt(1) === 45;
962
+ }, Lt = function(e) {
963
+ return e != null && typeof e != "boolean";
964
+ }, lt = /* @__PURE__ */ Hn(function(t) {
965
+ return ar(t) ? t : t.replace(Gn, "-$&").toLowerCase();
966
+ }), qt = function(e, r) {
967
+ switch (e) {
968
+ case "animation":
969
+ case "animationName":
970
+ if (typeof r == "string")
971
+ return r.replace(Jn, function(a, i, s) {
972
+ return X = {
973
+ name: i,
974
+ styles: s,
975
+ next: X
976
+ }, i;
977
+ });
978
+ }
979
+ return Wn[e] !== 1 && !ar(e) && typeof r == "number" && r !== 0 ? r + "px" : r;
980
+ };
981
+ function xe(t, e, r) {
982
+ if (r == null)
983
+ return "";
984
+ var a = r;
985
+ if (a.__emotion_styles !== void 0)
986
+ return a;
987
+ switch (typeof r) {
988
+ case "boolean":
989
+ return "";
990
+ case "object": {
991
+ var i = r;
992
+ if (i.anim === 1)
993
+ return X = {
994
+ name: i.name,
995
+ styles: i.styles,
996
+ next: X
997
+ }, i.name;
998
+ var s = r;
999
+ if (s.styles !== void 0) {
1000
+ var c = s.next;
1001
+ if (c !== void 0)
1002
+ for (; c !== void 0; )
1003
+ X = {
1004
+ name: c.name,
1005
+ styles: c.styles,
1006
+ next: X
1007
+ }, c = c.next;
1008
+ var f = s.styles + ";";
1009
+ return f;
1010
+ }
1011
+ return Kn(t, e, r);
1012
+ }
1013
+ case "function": {
1014
+ if (t !== void 0) {
1015
+ var p = X, y = r(t);
1016
+ return X = p, xe(t, e, y);
1017
+ }
1018
+ break;
1019
+ }
1020
+ }
1021
+ var P = r;
1022
+ return P;
1023
+ }
1024
+ function Kn(t, e, r) {
1025
+ var a = "";
1026
+ if (Array.isArray(r))
1027
+ for (var i = 0; i < r.length; i++)
1028
+ a += xe(t, e, r[i]) + ";";
1029
+ else
1030
+ for (var s in r) {
1031
+ var c = r[s];
1032
+ if (typeof c != "object") {
1033
+ var f = c;
1034
+ Lt(f) && (a += lt(s) + ":" + qt(s, f) + ";");
1035
+ } else if (Array.isArray(c) && typeof c[0] == "string" && e == null)
1036
+ for (var p = 0; p < c.length; p++)
1037
+ Lt(c[p]) && (a += lt(s) + ":" + qt(s, c[p]) + ";");
1038
+ else {
1039
+ var y = xe(t, e, c);
1040
+ switch (s) {
1041
+ case "animation":
1042
+ case "animationName": {
1043
+ a += lt(s) + ":" + y + ";";
1044
+ break;
1045
+ }
1046
+ default:
1047
+ a += s + "{" + y + "}";
1048
+ }
1049
+ }
1050
+ }
1051
+ return a;
1052
+ }
1053
+ var Qt = /label:\s*([^\s;{]+)\s*(;|$)/g, X;
1054
+ function Xn(t, e, r) {
1055
+ if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0)
1056
+ return t[0];
1057
+ var a = !0, i = "";
1058
+ X = void 0;
1059
+ var s = t[0];
1060
+ if (s == null || s.raw === void 0)
1061
+ a = !1, i += xe(r, e, s);
1062
+ else {
1063
+ var c = s;
1064
+ i += c[0];
1065
+ }
1066
+ for (var f = 1; f < t.length; f++)
1067
+ if (i += xe(r, e, t[f]), a) {
1068
+ var p = s;
1069
+ i += p[f];
1070
+ }
1071
+ Qt.lastIndex = 0;
1072
+ for (var y = "", P; (P = Qt.exec(i)) !== null; )
1073
+ y += "-" + P[1];
1074
+ var w = Yn(i) + y;
1075
+ return {
1076
+ name: w,
1077
+ styles: i,
1078
+ next: X
1079
+ };
1080
+ }
1081
+ var Zn = function(e) {
1082
+ return e();
1083
+ }, ea = re.useInsertionEffect ? re.useInsertionEffect : !1, ta = ea || Zn, ir = /* @__PURE__ */ re.createContext(
1084
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
1085
+ // because this module is primarily intended for the browser and node
1086
+ // but it's also required in react native and similar environments sometimes
1087
+ // and we could have a special build just for that
1088
+ // but this is much easier and the native packages
1089
+ // might use a different theme context in the future anyway
1090
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Vr({
1091
+ key: "css"
1092
+ }) : null
1093
+ );
1094
+ ir.Provider;
1095
+ var ra = function(e) {
1096
+ return /* @__PURE__ */ qr(function(r, a) {
1097
+ var i = Oe(ir);
1098
+ return e(r, i, a);
1099
+ });
1100
+ }, na = /* @__PURE__ */ re.createContext({}), He = {}.hasOwnProperty, ft = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", or = function(e, r) {
1101
+ var a = {};
1102
+ for (var i in r)
1103
+ He.call(r, i) && (a[i] = r[i]);
1104
+ return a[ft] = e, a;
1105
+ }, aa = function(e) {
1106
+ var r = e.cache, a = e.serialized, i = e.isStringTag;
1107
+ return nr(r, a, i), ta(function() {
1108
+ return Un(r, a, i);
1109
+ }), null;
1110
+ }, ia = /* @__PURE__ */ ra(function(t, e, r) {
1111
+ var a = t.css;
1112
+ typeof a == "string" && e.registered[a] !== void 0 && (a = e.registered[a]);
1113
+ var i = t[ft], s = [a], c = "";
1114
+ typeof t.className == "string" ? c = Vn(e.registered, s, t.className) : t.className != null && (c = t.className + " ");
1115
+ var f = Xn(s, void 0, re.useContext(na));
1116
+ c += e.key + "-" + f.name;
1117
+ var p = {};
1118
+ for (var y in t)
1119
+ He.call(t, y) && y !== "css" && y !== ft && (p[y] = t[y]);
1120
+ return p.className = c, r && (p.ref = r), /* @__PURE__ */ re.createElement(re.Fragment, null, /* @__PURE__ */ re.createElement(aa, {
1121
+ cache: e,
1122
+ serialized: f,
1123
+ isStringTag: typeof i == "string"
1124
+ }), /* @__PURE__ */ re.createElement(i, p));
1125
+ }), sr = ia, _e = Ie.Fragment, o = function(e, r, a) {
1126
+ return He.call(r, "css") ? Ie.jsx(sr, or(e, r), a) : Ie.jsx(e, r, a);
1127
+ }, D = function(e, r, a) {
1128
+ return He.call(r, "css") ? Ie.jsxs(sr, or(e, r), a) : Ie.jsxs(e, r, a);
1129
+ };
1130
+ const oa = ({
1131
+ components: t = [],
1132
+ children: e
1133
+ }) => /* @__PURE__ */ o(_e, { children: t.reduceRight(
1134
+ (r, a) => /* @__PURE__ */ o(a, { children: r }),
1135
+ e
1136
+ ) }), lr = Ue(void 0), Ge = () => Oe(lr), ct = new Ur({
1137
+ coerceTypes: !0
1138
+ });
1139
+ function sa(t, e) {
1140
+ let r;
1141
+ if (r = ct.getSchema(e), r === void 0 && (ct.addSchema(t, e), r = ct.getSchema(e)), r === void 0 || r.schema !== t)
1142
+ throw new Error(
1143
+ `Invalid schema. Expected: '${JSON.stringify(
1144
+ t
1145
+ )}', but got '${JSON.stringify(r?.schema)}'.`
1146
+ );
1147
+ return r;
1148
+ }
1149
+ const la = {
1150
+ type: "object",
1151
+ properties: {
1152
+ url: {
1153
+ type: "string"
1154
+ },
1155
+ type: {
1156
+ type: "string"
1157
+ },
1158
+ videoId: {
1159
+ type: "string"
1160
+ },
1161
+ title: {
1162
+ type: "string"
1163
+ }
1164
+ },
1165
+ required: ["url", "type", "videoId", "title"]
1166
+ };
1167
+ var O = /* @__PURE__ */ ((t) => (t.Off = "Off", t.All = "All", t.One = "One", t))(O || {});
1168
+ const ca = {
1169
+ type: "object",
1170
+ properties: {
1171
+ version: {
1172
+ type: "string",
1173
+ nullable: !0
1174
+ },
1175
+ repeat: {
1176
+ type: "string",
1177
+ enum: Object.values(O),
1178
+ nullable: !0
1179
+ },
1180
+ shuffle: {
1181
+ type: "boolean",
1182
+ nullable: !0
1183
+ },
1184
+ items: {
1185
+ type: "array",
1186
+ nullable: !0,
1187
+ items: la
1188
+ },
1189
+ currentIndex: {
1190
+ type: "integer",
1191
+ nullable: !0
1192
+ }
1193
+ }
1194
+ };
1195
+ class Ve {
1196
+ constructor(e, r, a) {
1197
+ this.observableStateProvider = e, this.playQueue = r, this.dto = a, this.id = Ve.nextId++, e.makeObservable(this, {
1198
+ isSelected: Z,
1199
+ isCurrent: g,
1200
+ index: g,
1201
+ isFirst: g,
1202
+ isLast: g,
1203
+ canMoveToTop: g,
1204
+ canMoveToBottom: g,
1205
+ canRemoveToTop: g,
1206
+ canRemoveOthers: g,
1207
+ unselect: m,
1208
+ select: m,
1209
+ toggleSelected: m.bound,
1210
+ play: m,
1211
+ remove: m.bound,
1212
+ playFirst: m.bound,
1213
+ playNext: m.bound,
1214
+ addToPlayQueue: m.bound,
1215
+ moveToTop: m.bound,
1216
+ moveToBottom: m.bound,
1217
+ removeToTop: m.bound,
1218
+ removeOthers: m.bound
1219
+ });
1220
+ }
1221
+ static nextId = 1;
1222
+ id;
1223
+ isSelected = !1;
1224
+ static fromDto(e, r, a) {
1225
+ return new Ve(e, r, a);
1226
+ }
1227
+ get url() {
1228
+ return this.dto.url;
1229
+ }
1230
+ get type() {
1231
+ return this.dto.type;
1232
+ }
1233
+ get videoId() {
1234
+ return this.dto.videoId;
1235
+ }
1236
+ get title() {
1237
+ return this.dto.title;
1238
+ }
1239
+ get isCurrent() {
1240
+ return this.playQueue.currentItem === this;
1241
+ }
1242
+ get index() {
1243
+ return this.playQueue.items.indexOf(this);
1244
+ }
1245
+ get isFirst() {
1246
+ return this.index === 0;
1247
+ }
1248
+ get isLast() {
1249
+ return this.index === this.playQueue.items.length - 1;
1250
+ }
1251
+ get canMoveToTop() {
1252
+ return !this.isFirst;
1253
+ }
1254
+ get canMoveToBottom() {
1255
+ return !this.isLast;
1256
+ }
1257
+ get canRemoveToTop() {
1258
+ return !this.isFirst;
1259
+ }
1260
+ get canRemoveOthers() {
1261
+ return this.playQueue.hasMultipleItems;
1262
+ }
1263
+ clone() {
1264
+ return this.playQueue.createItem(this.dto);
1265
+ }
1266
+ unselect() {
1267
+ this.isSelected = !1;
1268
+ }
1269
+ select() {
1270
+ this.isSelected = !0;
1271
+ }
1272
+ toggleSelected() {
1273
+ this.isSelected = !this.isSelected;
1274
+ }
1275
+ play() {
1276
+ this.playQueue.setCurrentItem(this);
1277
+ }
1278
+ remove() {
1279
+ return this.playQueue.removeItems([this]);
1280
+ }
1281
+ async playFirst() {
1282
+ await this.playQueue.playFirst([this.clone()]);
1283
+ }
1284
+ async playNext() {
1285
+ await this.playQueue.playNext([this.clone()]);
1286
+ }
1287
+ async addToPlayQueue() {
1288
+ await this.playQueue.addItems([this.clone()]);
1289
+ }
1290
+ moveToTop() {
1291
+ this.playQueue.moveItem(this, 0);
1292
+ }
1293
+ moveToBottom() {
1294
+ this.playQueue.moveItem(this, this.playQueue.items.length - 1);
1295
+ }
1296
+ removeToTop() {
1297
+ return this.playQueue.removeItemsAbove(this);
1298
+ }
1299
+ removeOthers() {
1300
+ return this.playQueue.removeOtherItems(this);
1301
+ }
1302
+ }
1303
+ class ua {
1304
+ constructor(e) {
1305
+ this.observableStateProvider = e, e.makeObservable(this, {
1306
+ interacted: Z,
1307
+ items: Z,
1308
+ currentId: Z,
1309
+ repeat: Z,
1310
+ shuffle: Z,
1311
+ localStorageState: g.struct,
1312
+ isEmpty: g,
1313
+ canClear: g,
1314
+ currentItem: g,
1315
+ canPlay: g,
1316
+ canPause: g,
1317
+ hasMultipleItems: g,
1318
+ currentIndex: g,
1319
+ hasPreviousItem: g,
1320
+ hasNextItem: g,
1321
+ isLastItem: g,
1322
+ selectedItems: g,
1323
+ allItemsSelected: g,
1324
+ hasSelectedItems: g,
1325
+ selectedItemsOrAllItems: g,
1326
+ canAddSelectedItems: g,
1327
+ canPlaySelectedItemsNext: g,
1328
+ canRemoveSelectedItems: g,
1329
+ setItems: m,
1330
+ interact: m,
1331
+ clear: m.bound,
1332
+ unselectAll: m,
1333
+ selectAll: m,
1334
+ setCurrentItem: m,
1335
+ setNextItems: m,
1336
+ clearAndSetItems: m,
1337
+ playNext: m,
1338
+ playSelectedItemsNext: m.bound,
1339
+ addItems: m,
1340
+ addSelectedItems: m.bound,
1341
+ playFirst: m,
1342
+ moveItem: m,
1343
+ goToFirst: m,
1344
+ removeItems: m,
1345
+ removeSelectedItems: m.bound,
1346
+ removeOtherItems: m,
1347
+ removeItemsAbove: m,
1348
+ toggleRepeat: m.bound,
1349
+ toggleShuffle: m.bound,
1350
+ previous: m,
1351
+ next: m.bound
1352
+ });
1353
+ }
1354
+ interacted = !1;
1355
+ items = [];
1356
+ currentId;
1357
+ repeat = O.Off;
1358
+ shuffle = !1;
1359
+ createItem(e) {
1360
+ return Ve.fromDto(this.observableStateProvider, this, {
1361
+ url: e.url,
1362
+ type: e.type,
1363
+ videoId: e.videoId,
1364
+ title: e.title
1365
+ });
1366
+ }
1367
+ get localStorageState() {
1368
+ return {
1369
+ version: "1.0",
1370
+ repeat: this.repeat,
1371
+ shuffle: this.shuffle,
1372
+ items: this.items.map((e) => e.dto),
1373
+ currentIndex: this.currentIndex
1374
+ };
1375
+ }
1376
+ set localStorageState(e) {
1377
+ this.repeat = e.repeat ?? O.Off, this.shuffle = e.shuffle ?? !1, this.items = e.items?.map((r) => this.createItem(r)) ?? [], this.currentIndex = e.currentIndex;
1378
+ }
1379
+ validateLocalStorageState(e) {
1380
+ return sa(
1381
+ ca,
1382
+ "PlayQueueDto"
1383
+ )(e);
1384
+ }
1385
+ get isEmpty() {
1386
+ return this.items.length === 0;
1387
+ }
1388
+ get canClear() {
1389
+ return !this.isEmpty;
1390
+ }
1391
+ get currentItem() {
1392
+ return this.items.find((e) => e.id === this.currentId);
1393
+ }
1394
+ get canPlay() {
1395
+ return this.currentItem !== void 0;
1396
+ }
1397
+ get canPause() {
1398
+ return this.currentItem !== void 0;
1399
+ }
1400
+ get hasMultipleItems() {
1401
+ return this.items.length > 1;
1402
+ }
1403
+ get currentIndex() {
1404
+ return this.currentId !== void 0 ? this.items.findIndex((e) => e.id === this.currentId) : void 0;
1405
+ }
1406
+ set currentIndex(e) {
1407
+ this.currentId = e !== void 0 ? this.items.at(e)?.id : void 0;
1408
+ }
1409
+ get hasPreviousItem() {
1410
+ return this.hasMultipleItems && this.currentIndex !== void 0 && this.currentIndex > 0;
1411
+ }
1412
+ get hasNextItem() {
1413
+ return this.hasMultipleItems && this.currentIndex !== void 0 && this.currentIndex < this.items.length - 1;
1414
+ }
1415
+ get isLastItem() {
1416
+ return this.currentIndex !== void 0 && this.currentIndex === this.items.length - 1;
1417
+ }
1418
+ get selectedItems() {
1419
+ return this.items.filter((e) => e.isSelected);
1420
+ }
1421
+ get allItemsSelected() {
1422
+ return this.selectedItems.length === this.items.length;
1423
+ }
1424
+ get hasSelectedItems() {
1425
+ return this.selectedItems.length > 0;
1426
+ }
1427
+ get selectedItemsOrAllItems() {
1428
+ return this.hasSelectedItems ? this.selectedItems : this.items;
1429
+ }
1430
+ get canAddSelectedItems() {
1431
+ return !this.isEmpty && this.hasSelectedItems;
1432
+ }
1433
+ get canPlaySelectedItemsNext() {
1434
+ return !this.isEmpty && this.hasSelectedItems;
1435
+ }
1436
+ get canRemoveSelectedItems() {
1437
+ return !this.isEmpty && this.hasSelectedItems;
1438
+ }
1439
+ setItems(e) {
1440
+ this.items = e;
1441
+ }
1442
+ interact() {
1443
+ this.interacted = !0;
1444
+ }
1445
+ clear() {
1446
+ this.interact(), this.currentIndex = void 0, this.items = [];
1447
+ }
1448
+ unselectAll() {
1449
+ for (const e of this.items)
1450
+ e.unselect();
1451
+ }
1452
+ selectAll() {
1453
+ for (const e of this.items)
1454
+ e.select();
1455
+ }
1456
+ setCurrentItem(e) {
1457
+ this.interact(), this.currentId = e?.id;
1458
+ }
1459
+ setNextItems(e) {
1460
+ this.currentIndex !== void 0 && this.items.splice(this.currentIndex + 1, 0, ...e);
1461
+ }
1462
+ clearAndSetItems(e) {
1463
+ this.clear(), this.setCurrentItem(e[0]), this.setNextItems(e);
1464
+ }
1465
+ async playNext(e) {
1466
+ if (this.isEmpty) {
1467
+ this.clearAndSetItems(e);
1468
+ return;
1469
+ }
1470
+ this.setNextItems(e);
1471
+ }
1472
+ async playSelectedItemsNext() {
1473
+ await this.playNext(
1474
+ this.selectedItemsOrAllItems.map((e) => e.clone())
1475
+ ), this.unselectAll();
1476
+ }
1477
+ async addItems(e) {
1478
+ if (this.isEmpty) {
1479
+ this.clearAndSetItems(e);
1480
+ return;
1481
+ }
1482
+ this.items.push(...e);
1483
+ }
1484
+ async addSelectedItems() {
1485
+ await this.addItems(
1486
+ this.selectedItemsOrAllItems.map((e) => e.clone())
1487
+ ), this.unselectAll();
1488
+ }
1489
+ async playFirst(e) {
1490
+ if (this.isEmpty) {
1491
+ this.clearAndSetItems(e);
1492
+ return;
1493
+ }
1494
+ const { currentIndex: r } = this;
1495
+ r !== void 0 && (this.interact(), this.items.splice(r, 0, ...e), this.currentIndex = r);
1496
+ }
1497
+ moveItem(e, r) {
1498
+ const a = this.items.splice(this.items.indexOf(e), 1)[0];
1499
+ this.items.splice(r, 0, a);
1500
+ }
1501
+ async goToFirst() {
1502
+ this.currentIndex !== void 0 && (this.currentIndex = 0);
1503
+ }
1504
+ async removeItems(e) {
1505
+ const { currentItem: r } = this;
1506
+ At(this.items, ...e.filter((s) => s !== r));
1507
+ const { currentIndex: a, isLastItem: i } = this;
1508
+ At(
1509
+ this.items,
1510
+ e.find((s) => s === r)
1511
+ ), this.currentItem !== r && (this.interact(), i ? await this.goToFirst() : this.currentIndex = a);
1512
+ }
1513
+ async removeSelectedItems() {
1514
+ await this.removeItems(this.selectedItemsOrAllItems), this.unselectAll();
1515
+ }
1516
+ async removeOtherItems(e) {
1517
+ const r = e.id;
1518
+ return this.removeItems(
1519
+ this.items.filter((a) => a.id !== r)
1520
+ );
1521
+ }
1522
+ async removeItemsAbove(e) {
1523
+ const r = this.items.indexOf(e);
1524
+ return this.removeItems(
1525
+ this.items.filter((a, i) => i < r)
1526
+ );
1527
+ }
1528
+ toggleRepeat() {
1529
+ switch (this.repeat) {
1530
+ case O.Off:
1531
+ this.repeat = O.All;
1532
+ break;
1533
+ case O.All:
1534
+ this.repeat = O.One;
1535
+ break;
1536
+ case O.One:
1537
+ this.repeat = O.Off;
1538
+ break;
1539
+ }
1540
+ }
1541
+ toggleShuffle() {
1542
+ this.shuffle = !this.shuffle;
1543
+ }
1544
+ async previous() {
1545
+ this.currentIndex !== void 0 && this.hasPreviousItem && (this.interact(), this.currentIndex--);
1546
+ }
1547
+ async next() {
1548
+ this.currentIndex !== void 0 && this.hasNextItem && (this.interact(), this.currentIndex++);
1549
+ }
1550
+ }
1551
+ const da = ({
1552
+ children: t
1553
+ }) => {
1554
+ const [e] = $(
1555
+ () => new ua(new We())
1556
+ ), r = ce();
1557
+ return Yt(() => Lr(
1558
+ () => e.currentItem,
1559
+ async (a, i) => {
1560
+ a === void 0 || i === void 0 || a.type === i.type && a.videoId === i.videoId && await r.setCurrentTime(0);
1561
+ }
1562
+ ), [e, r]), /* @__PURE__ */ o(lr.Provider, { value: e, children: t });
1563
+ }, cr = Ue(void 0), ur = () => Oe(cr);
1564
+ class fa {
1565
+ controller = Yr;
1566
+ playing = !1;
1567
+ percent = 0;
1568
+ seeking = !1;
1569
+ constructor(e) {
1570
+ e.makeObservable(this, {
1571
+ controller: Z,
1572
+ playing: Z,
1573
+ percent: Z,
1574
+ seeking: Z,
1575
+ setPlaying: m,
1576
+ setPercent: m,
1577
+ setSeeking: m,
1578
+ onControllerChange: m.bound,
1579
+ onPlay: m.bound,
1580
+ onPause: m.bound,
1581
+ onEnded: m.bound,
1582
+ onTimeUpdate: m.bound
1583
+ });
1584
+ }
1585
+ setPlaying(e) {
1586
+ this.playing = e;
1587
+ }
1588
+ setPercent(e) {
1589
+ this.percent = e;
1590
+ }
1591
+ setSeeking(e) {
1592
+ this.seeking = e;
1593
+ }
1594
+ onControllerChange(e) {
1595
+ this.controller = e;
1596
+ }
1597
+ onPlay() {
1598
+ this.playing = !0;
1599
+ }
1600
+ onPause() {
1601
+ this.playing = !1;
1602
+ }
1603
+ onEnded() {
1604
+ this.playing = !1;
1605
+ }
1606
+ onTimeUpdate({ percent: e }) {
1607
+ e !== void 0 && (this.seeking || (this.percent = e));
1608
+ }
1609
+ }
1610
+ const pa = ({
1611
+ children: t
1612
+ }) => {
1613
+ const [e] = $(
1614
+ () => new fa(new We())
1615
+ );
1616
+ return /* @__PURE__ */ o(cr.Provider, { value: e, children: t });
1617
+ }, dr = Ue(void 0), z = () => Oe(dr);
1618
+ class ma {
1619
+ constructor(e, r, a) {
1620
+ this.player = r, this.playQueue = a, e.makeObservable(this, {
1621
+ controller: g,
1622
+ playing: g,
1623
+ percent: g,
1624
+ canSeek: g,
1625
+ currentItem: g,
1626
+ repeat: g,
1627
+ shuffle: g,
1628
+ canToggleRepeat: g,
1629
+ canToggleShuffle: g,
1630
+ canPlay: g,
1631
+ canPause: g,
1632
+ canPrevious: g,
1633
+ canNext: g,
1634
+ canSkipBack10: g,
1635
+ canSkipForward30: g,
1636
+ canRemoveFromPlayQueue: g,
1637
+ setPercent: m.bound,
1638
+ setSeeking: m.bound,
1639
+ toggleRepeat: m.bound,
1640
+ toggleShuffle: m.bound,
1641
+ play: m.bound,
1642
+ pause: m.bound,
1643
+ previous: m.bound,
1644
+ next: m.bound,
1645
+ skipBack10: m.bound,
1646
+ skipForward30: m.bound,
1647
+ removeFromPlayQueue: m.bound
1648
+ });
1649
+ }
1650
+ get controller() {
1651
+ return this.player.controller;
1652
+ }
1653
+ get playing() {
1654
+ return this.player.playing;
1655
+ }
1656
+ get percent() {
1657
+ return this.player.percent;
1658
+ }
1659
+ get canSeek() {
1660
+ return !this.playQueue.isEmpty && this.controller.supports("setCurrentTime");
1661
+ }
1662
+ get currentItem() {
1663
+ return this.playQueue.currentItem;
1664
+ }
1665
+ get repeat() {
1666
+ return this.playQueue.repeat;
1667
+ }
1668
+ get shuffle() {
1669
+ return this.playQueue.shuffle;
1670
+ }
1671
+ get canToggleRepeat() {
1672
+ return !0;
1673
+ }
1674
+ get canToggleShuffle() {
1675
+ return !1;
1676
+ }
1677
+ get canPlay() {
1678
+ return this.playQueue.canPlay && this.controller.supports("play");
1679
+ }
1680
+ get canPause() {
1681
+ return this.playQueue.canPause && this.controller.supports("pause");
1682
+ }
1683
+ get canPrevious() {
1684
+ return !this.playQueue.isEmpty;
1685
+ }
1686
+ get canNext() {
1687
+ return this.playQueue.hasNextItem;
1688
+ }
1689
+ get canSkipBack10() {
1690
+ return this.canSeek;
1691
+ }
1692
+ get canSkipForward30() {
1693
+ return this.canSeek;
1694
+ }
1695
+ get canRemoveFromPlayQueue() {
1696
+ return !this.playQueue.isEmpty;
1697
+ }
1698
+ setPercent(e) {
1699
+ this.player.setPercent(e);
1700
+ }
1701
+ setSeeking(e) {
1702
+ this.player.setSeeking(e);
1703
+ }
1704
+ toggleRepeat() {
1705
+ this.playQueue.toggleRepeat();
1706
+ }
1707
+ toggleShuffle() {
1708
+ this.playQueue.toggleShuffle();
1709
+ }
1710
+ play() {
1711
+ return this.controller.play();
1712
+ }
1713
+ pause() {
1714
+ return this.controller.pause();
1715
+ }
1716
+ async previous() {
1717
+ if (this.playQueue.hasPreviousItem) {
1718
+ const e = await this.controller.getCurrentTime();
1719
+ e === void 0 || e < 5 ? await this.playQueue.previous() : await this.controller.setCurrentTime(0);
1720
+ } else
1721
+ await this.controller.setCurrentTime(0);
1722
+ }
1723
+ next() {
1724
+ return this.playQueue.next();
1725
+ }
1726
+ async skipBack10() {
1727
+ const e = await this.controller.getCurrentTime();
1728
+ e !== void 0 && await this.controller.setCurrentTime(e - 10);
1729
+ }
1730
+ async skipForward30() {
1731
+ const e = await this.controller.getCurrentTime();
1732
+ e !== void 0 && await this.controller.setCurrentTime(e + 30);
1733
+ }
1734
+ async removeFromPlayQueue() {
1735
+ this.currentItem !== void 0 && await this.playQueue.removeItems([this.currentItem]);
1736
+ }
1737
+ }
1738
+ const ha = ({
1739
+ children: t
1740
+ }) => {
1741
+ const e = ur(), r = Ge(), [a] = $(
1742
+ () => new ma(
1743
+ new We(),
1744
+ e,
1745
+ r
1746
+ )
1747
+ );
1748
+ return /* @__PURE__ */ o(dr.Provider, { value: a, children: t });
1749
+ }, fr = Ue(void 0), ya = () => Oe(fr);
1750
+ class va {
1751
+ constructor(e, r, a) {
1752
+ this.player = r, this.playQueue = a, e.makeObservable(this, {
1753
+ controller: g,
1754
+ currentItem: g,
1755
+ onLoaded: m.bound,
1756
+ onPlay: m.bound,
1757
+ onPause: m.bound,
1758
+ onEnded: m.bound,
1759
+ onTimeUpdate: m.bound,
1760
+ onControllerChange: m.bound
1761
+ });
1762
+ }
1763
+ get controller() {
1764
+ return this.player.controller;
1765
+ }
1766
+ get currentItem() {
1767
+ return this.playQueue.currentItem;
1768
+ }
1769
+ async onLoaded() {
1770
+ this.playQueue.interacted && await this.controller.play();
1771
+ }
1772
+ onPlay() {
1773
+ this.player.onPlay();
1774
+ }
1775
+ onPause() {
1776
+ this.player.onPause();
1777
+ }
1778
+ async onEnded() {
1779
+ switch (this.playQueue.repeat) {
1780
+ case O.One:
1781
+ await this.controller.setCurrentTime(0);
1782
+ break;
1783
+ case O.Off:
1784
+ case O.All:
1785
+ if (this.playQueue.isLastItem)
1786
+ switch (this.playQueue.repeat) {
1787
+ case O.Off:
1788
+ this.player.onEnded();
1789
+ break;
1790
+ case O.All:
1791
+ this.playQueue.hasMultipleItems ? await this.playQueue.goToFirst() : await this.controller.setCurrentTime(0);
1792
+ break;
1793
+ }
1794
+ else
1795
+ await this.playQueue.next();
1796
+ break;
1797
+ }
1798
+ }
1799
+ onTimeUpdate(e) {
1800
+ this.player.onTimeUpdate(e);
1801
+ }
1802
+ onControllerChange(e) {
1803
+ this.player.onControllerChange(e);
1804
+ }
1805
+ }
1806
+ const ga = ({
1807
+ children: t
1808
+ }) => {
1809
+ const e = ur(), r = Ge(), [a] = $(
1810
+ () => new va(
1811
+ new We(),
1812
+ e,
1813
+ r
1814
+ )
1815
+ );
1816
+ return /* @__PURE__ */ o(fr.Provider, { value: a, children: t });
1817
+ }, Di = ({
1818
+ children: t,
1819
+ nostalgicDivaProps: e
1820
+ }) => /* @__PURE__ */ o(Wr, { ...e, children: /* @__PURE__ */ o(
1821
+ oa,
1822
+ {
1823
+ components: [
1824
+ pa,
1825
+ da,
1826
+ ga,
1827
+ ha
1828
+ ],
1829
+ children: t
1830
+ }
1831
+ ) }), ba = {
1832
+ mediaPlayer: {
1833
+ enablePlaylists: process.env.NODE_ENV !== "production"
1834
+ }
1835
+ }, Pa = "http://localhost".replace(/\/+$/, "");
1836
+ class pr {
1837
+ constructor(e = {}) {
1838
+ this.configuration = e;
1839
+ }
1840
+ set config(e) {
1841
+ this.configuration = e;
1842
+ }
1843
+ get basePath() {
1844
+ return this.configuration.basePath != null ? this.configuration.basePath : Pa;
1845
+ }
1846
+ get fetchApi() {
1847
+ return this.configuration.fetchApi;
1848
+ }
1849
+ get middleware() {
1850
+ return this.configuration.middleware || [];
1851
+ }
1852
+ get queryParamsStringify() {
1853
+ return this.configuration.queryParamsStringify || mr;
1854
+ }
1855
+ get username() {
1856
+ return this.configuration.username;
1857
+ }
1858
+ get password() {
1859
+ return this.configuration.password;
1860
+ }
1861
+ get apiKey() {
1862
+ const e = this.configuration.apiKey;
1863
+ if (e)
1864
+ return typeof e == "function" ? e : () => e;
1865
+ }
1866
+ get accessToken() {
1867
+ const e = this.configuration.accessToken;
1868
+ if (e)
1869
+ return typeof e == "function" ? e : async () => e;
1870
+ }
1871
+ get headers() {
1872
+ return this.configuration.headers;
1873
+ }
1874
+ get credentials() {
1875
+ return this.configuration.credentials;
1876
+ }
1877
+ }
1878
+ const Sa = new pr();
1879
+ class vt {
1880
+ constructor(e = Sa) {
1881
+ this.configuration = e, this.middleware = e.middleware;
1882
+ }
1883
+ static jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
1884
+ middleware;
1885
+ withMiddleware(...e) {
1886
+ const r = this.clone();
1887
+ return r.middleware = r.middleware.concat(...e), r;
1888
+ }
1889
+ withPreMiddleware(...e) {
1890
+ const r = e.map((a) => ({ pre: a }));
1891
+ return this.withMiddleware(...r);
1892
+ }
1893
+ withPostMiddleware(...e) {
1894
+ const r = e.map((a) => ({ post: a }));
1895
+ return this.withMiddleware(...r);
1896
+ }
1897
+ /**
1898
+ * Check if the given MIME is a JSON MIME.
1899
+ * JSON MIME examples:
1900
+ * application/json
1901
+ * application/json; charset=UTF8
1902
+ * APPLICATION/JSON
1903
+ * application/vnd.company+json
1904
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
1905
+ * @return True if the given MIME is JSON, false otherwise.
1906
+ */
1907
+ isJsonMime(e) {
1908
+ return e ? vt.jsonRegex.test(e) : !1;
1909
+ }
1910
+ async request(e, r) {
1911
+ const { url: a, init: i } = await this.createFetchParams(e, r), s = await this.fetchApi(a, i);
1912
+ if (s && s.status >= 200 && s.status < 300)
1913
+ return s;
1914
+ throw new Ra(s, "Response returned an error code");
1915
+ }
1916
+ async createFetchParams(e, r) {
1917
+ let a = this.configuration.basePath + e.path;
1918
+ e.query !== void 0 && Object.keys(e.query).length !== 0 && (a += "?" + this.configuration.queryParamsStringify(e.query));
1919
+ const i = Object.assign({}, this.configuration.headers, e.headers);
1920
+ Object.keys(i).forEach((P) => i[P] === void 0 ? delete i[P] : {});
1921
+ const s = typeof r == "function" ? r : async () => r, c = {
1922
+ method: e.method,
1923
+ headers: i,
1924
+ body: e.body,
1925
+ credentials: this.configuration.credentials
1926
+ }, f = {
1927
+ ...c,
1928
+ ...await s({
1929
+ init: c,
1930
+ context: e
1931
+ })
1932
+ };
1933
+ let p;
1934
+ Ta(f.body) || f.body instanceof URLSearchParams || wa(f.body) ? p = f.body : this.isJsonMime(i["Content-Type"]) ? p = JSON.stringify(f.body) : p = f.body;
1935
+ const y = {
1936
+ ...f,
1937
+ body: p
1938
+ };
1939
+ return { url: a, init: y };
1940
+ }
1941
+ fetchApi = async (e, r) => {
1942
+ let a = { url: e, init: r };
1943
+ for (const s of this.middleware)
1944
+ s.pre && (a = await s.pre({
1945
+ fetch: this.fetchApi,
1946
+ ...a
1947
+ }) || a);
1948
+ let i;
1949
+ try {
1950
+ i = await (this.configuration.fetchApi || fetch)(a.url, a.init);
1951
+ } catch (s) {
1952
+ for (const c of this.middleware)
1953
+ c.onError && (i = await c.onError({
1954
+ fetch: this.fetchApi,
1955
+ url: a.url,
1956
+ init: a.init,
1957
+ error: s,
1958
+ response: i ? i.clone() : void 0
1959
+ }) || i);
1960
+ if (i === void 0)
1961
+ throw s instanceof Error ? new Ca(s, "The request failed and the interceptors did not return an alternative response") : s;
1962
+ }
1963
+ for (const s of this.middleware)
1964
+ s.post && (i = await s.post({
1965
+ fetch: this.fetchApi,
1966
+ url: a.url,
1967
+ init: a.init,
1968
+ response: i.clone()
1969
+ }) || i);
1970
+ return i;
1971
+ };
1972
+ /**
1973
+ * Create a shallow clone of `this` by constructing a new instance
1974
+ * and then shallow cloning data members.
1975
+ */
1976
+ clone() {
1977
+ const e = this.constructor, r = new e(this.configuration);
1978
+ return r.middleware = this.middleware.slice(), r;
1979
+ }
1980
+ }
1981
+ function wa(t) {
1982
+ return typeof Blob < "u" && t instanceof Blob;
1983
+ }
1984
+ function Ta(t) {
1985
+ return typeof FormData < "u" && t instanceof FormData;
1986
+ }
1987
+ class Ra extends Error {
1988
+ constructor(e, r) {
1989
+ super(r), this.response = e;
1990
+ }
1991
+ name = "ResponseError";
1992
+ }
1993
+ class Ca extends Error {
1994
+ constructor(e, r) {
1995
+ super(r), this.cause = e;
1996
+ }
1997
+ name = "FetchError";
1998
+ }
1999
+ class Ce extends Error {
2000
+ constructor(e, r) {
2001
+ super(r), this.field = e;
2002
+ }
2003
+ name = "RequiredError";
2004
+ }
2005
+ function mr(t, e = "") {
2006
+ return Object.keys(t).map((r) => hr(r, t[r], e)).filter((r) => r.length > 0).join("&");
2007
+ }
2008
+ function hr(t, e, r = "") {
2009
+ const a = r + (r.length ? `[${t}]` : t);
2010
+ if (e instanceof Array) {
2011
+ const i = e.map((s) => encodeURIComponent(String(s))).join(`&${encodeURIComponent(a)}=`);
2012
+ return `${encodeURIComponent(a)}=${i}`;
2013
+ }
2014
+ if (e instanceof Set) {
2015
+ const i = Array.from(e);
2016
+ return hr(t, i, r);
2017
+ }
2018
+ return e instanceof Date ? `${encodeURIComponent(a)}=${encodeURIComponent(e.toISOString())}` : e instanceof Object ? mr(e, a) : `${encodeURIComponent(a)}=${encodeURIComponent(String(e))}`;
2019
+ }
2020
+ class se {
2021
+ constructor(e, r = (a) => a) {
2022
+ this.raw = e, this.transformer = r;
2023
+ }
2024
+ async value() {
2025
+ return this.transformer(await this.raw.json());
2026
+ }
2027
+ }
2028
+ function yr(t) {
2029
+ return Ea(t);
2030
+ }
2031
+ function Ea(t, e) {
2032
+ return t == null ? t : {
2033
+ id: t.id,
2034
+ name: t.name
2035
+ };
2036
+ }
2037
+ function Ia(t) {
2038
+ return xa(t);
2039
+ }
2040
+ function xa(t, e) {
2041
+ return t == null ? t : {
2042
+ playlist: yr(t.playlist)
2043
+ };
2044
+ }
2045
+ function Oa(t) {
2046
+ return ka(t);
2047
+ }
2048
+ function ka(t, e) {
2049
+ return t == null ? t : {
2050
+ items: t.items.map(yr)
2051
+ };
2052
+ }
2053
+ function _a(t) {
2054
+ return Aa(t);
2055
+ }
2056
+ function Aa(t, e) {
2057
+ return t == null ? t : {
2058
+ id: t.id,
2059
+ url: t.url,
2060
+ type: t.type,
2061
+ videoId: t.videoId,
2062
+ title: t.title
2063
+ };
2064
+ }
2065
+ function Fa(t) {
2066
+ return Ma(t);
2067
+ }
2068
+ function Ma(t, e) {
2069
+ return t == null ? t : {
2070
+ items: t.items.map(_a)
2071
+ };
2072
+ }
2073
+ function Da(t) {
2074
+ return Na(t, !1);
2075
+ }
2076
+ function Na(t, e = !1) {
2077
+ return t == null ? t : {
2078
+ name: t.name
2079
+ };
2080
+ }
2081
+ function $a(t) {
2082
+ return Ba(t, !1);
2083
+ }
2084
+ function Ba(t, e = !1) {
2085
+ return t == null ? t : {
2086
+ name: t.name
2087
+ };
2088
+ }
2089
+ class ja extends vt {
2090
+ /**
2091
+ */
2092
+ async mediaPlayerPlaylistsGetRaw(e) {
2093
+ const r = {}, a = {}, s = await this.request({
2094
+ path: "/media-player/playlists",
2095
+ method: "GET",
2096
+ headers: a,
2097
+ query: r
2098
+ }, e);
2099
+ return new se(s, (c) => Oa(c));
2100
+ }
2101
+ /**
2102
+ */
2103
+ async mediaPlayerPlaylistsGet(e) {
2104
+ return await (await this.mediaPlayerPlaylistsGetRaw(e)).value();
2105
+ }
2106
+ /**
2107
+ */
2108
+ async mediaPlayerPlaylistsIdDeleteRaw(e, r) {
2109
+ if (e.id == null)
2110
+ throw new Ce(
2111
+ "id",
2112
+ 'Required parameter "id" was null or undefined when calling mediaPlayerPlaylistsIdDelete().'
2113
+ );
2114
+ const a = {}, i = {};
2115
+ let s = "/media-player/playlists/{id}";
2116
+ s = s.replace("{id}", encodeURIComponent(String(e.id)));
2117
+ const c = await this.request({
2118
+ path: s,
2119
+ method: "DELETE",
2120
+ headers: i,
2121
+ query: a
2122
+ }, r);
2123
+ return new se(c);
2124
+ }
2125
+ /**
2126
+ */
2127
+ async mediaPlayerPlaylistsIdDelete(e, r) {
2128
+ return await (await this.mediaPlayerPlaylistsIdDeleteRaw(e, r)).value();
2129
+ }
2130
+ /**
2131
+ */
2132
+ async mediaPlayerPlaylistsIdGetRaw(e, r) {
2133
+ if (e.id == null)
2134
+ throw new Ce(
2135
+ "id",
2136
+ 'Required parameter "id" was null or undefined when calling mediaPlayerPlaylistsIdGet().'
2137
+ );
2138
+ const a = {}, i = {};
2139
+ let s = "/media-player/playlists/{id}";
2140
+ s = s.replace("{id}", encodeURIComponent(String(e.id)));
2141
+ const c = await this.request({
2142
+ path: s,
2143
+ method: "GET",
2144
+ headers: i,
2145
+ query: a
2146
+ }, r);
2147
+ return new se(c, (f) => Ia(f));
2148
+ }
2149
+ /**
2150
+ */
2151
+ async mediaPlayerPlaylistsIdGet(e, r) {
2152
+ return await (await this.mediaPlayerPlaylistsIdGetRaw(e, r)).value();
2153
+ }
2154
+ /**
2155
+ */
2156
+ async mediaPlayerPlaylistsIdRenamePostRaw(e, r) {
2157
+ if (e.id == null)
2158
+ throw new Ce(
2159
+ "id",
2160
+ 'Required parameter "id" was null or undefined when calling mediaPlayerPlaylistsIdRenamePost().'
2161
+ );
2162
+ const a = {}, i = {};
2163
+ i["Content-Type"] = "application/json";
2164
+ let s = "/media-player/playlists/{id}:rename";
2165
+ s = s.replace("{id}", encodeURIComponent(String(e.id)));
2166
+ const c = await this.request({
2167
+ path: s,
2168
+ method: "POST",
2169
+ headers: i,
2170
+ query: a,
2171
+ body: $a(e.hydrangeanDivaMediaPlayerEndpointsPlaylistsRenamePlaylistRequest)
2172
+ }, r);
2173
+ return new se(c);
2174
+ }
2175
+ /**
2176
+ */
2177
+ async mediaPlayerPlaylistsIdRenamePost(e, r) {
2178
+ return await (await this.mediaPlayerPlaylistsIdRenamePostRaw(e, r)).value();
2179
+ }
2180
+ /**
2181
+ */
2182
+ async mediaPlayerPlaylistsIdTracksGetRaw(e, r) {
2183
+ if (e.id == null)
2184
+ throw new Ce(
2185
+ "id",
2186
+ 'Required parameter "id" was null or undefined when calling mediaPlayerPlaylistsIdTracksGet().'
2187
+ );
2188
+ const a = {}, i = {};
2189
+ let s = "/media-player/playlists/{id}/tracks";
2190
+ s = s.replace("{id}", encodeURIComponent(String(e.id)));
2191
+ const c = await this.request({
2192
+ path: s,
2193
+ method: "GET",
2194
+ headers: i,
2195
+ query: a
2196
+ }, r);
2197
+ return new se(c, (f) => Fa(f));
2198
+ }
2199
+ /**
2200
+ */
2201
+ async mediaPlayerPlaylistsIdTracksGet(e, r) {
2202
+ return await (await this.mediaPlayerPlaylistsIdTracksGetRaw(e, r)).value();
2203
+ }
2204
+ /**
2205
+ */
2206
+ async mediaPlayerPlaylistsIdTracksPutRaw(e, r) {
2207
+ if (e.id == null)
2208
+ throw new Ce(
2209
+ "id",
2210
+ 'Required parameter "id" was null or undefined when calling mediaPlayerPlaylistsIdTracksPut().'
2211
+ );
2212
+ const a = {}, i = {};
2213
+ let s = "/media-player/playlists/{id}/tracks";
2214
+ s = s.replace("{id}", encodeURIComponent(String(e.id)));
2215
+ const c = await this.request({
2216
+ path: s,
2217
+ method: "PUT",
2218
+ headers: i,
2219
+ query: a
2220
+ }, r);
2221
+ return new se(c);
2222
+ }
2223
+ /**
2224
+ */
2225
+ async mediaPlayerPlaylistsIdTracksPut(e, r) {
2226
+ return await (await this.mediaPlayerPlaylistsIdTracksPutRaw(e, r)).value();
2227
+ }
2228
+ /**
2229
+ */
2230
+ async mediaPlayerPlaylistsPostRaw(e, r) {
2231
+ const a = {}, i = {};
2232
+ i["Content-Type"] = "application/json";
2233
+ const c = await this.request({
2234
+ path: "/media-player/playlists",
2235
+ method: "POST",
2236
+ headers: i,
2237
+ query: a,
2238
+ body: Da(e.hydrangeanDivaMediaPlayerEndpointsPlaylistsCreatePlaylistRequest)
2239
+ }, r);
2240
+ return new se(c);
2241
+ }
2242
+ /**
2243
+ */
2244
+ async mediaPlayerPlaylistsPost(e = {}, r) {
2245
+ return await (await this.mediaPlayerPlaylistsPostRaw(e, r)).value();
2246
+ }
2247
+ }
2248
+ const za = new pr({
2249
+ basePath: new URL("api", window.location.origin).toString()
2250
+ }), La = new ja(
2251
+ za
2252
+ ), qa = ({
2253
+ disabled: t,
2254
+ onAddToPlaylist: e
2255
+ }) => {
2256
+ const [r, a] = $(!1), [i, s] = $(
2257
+ "loading"
2258
+ );
2259
+ return Yt(() => {
2260
+ La.mediaPlayerPlaylistsGet().then(
2261
+ (c) => s(
2262
+ c.items.map((f) => ({
2263
+ key: f.id,
2264
+ label: f.name
2265
+ }))
2266
+ )
2267
+ );
2268
+ }, []), /* @__PURE__ */ o(
2269
+ ke,
2270
+ {
2271
+ panelPaddingSize: "none",
2272
+ button: /* @__PURE__ */ o(
2273
+ J,
2274
+ {
2275
+ iconType: Ee,
2276
+ onClick: () => a(!r),
2277
+ disabled: t,
2278
+ children: "Add to"
2279
+ }
2280
+ ),
2281
+ isOpen: r,
2282
+ closePopover: () => a(!1),
2283
+ children: /* @__PURE__ */ o(
2284
+ Jr,
2285
+ {
2286
+ searchable: !0,
2287
+ searchProps: {
2288
+ compressed: !0
2289
+ },
2290
+ options: i === "loading" ? void 0 : i,
2291
+ isLoading: i === "loading",
2292
+ onChange: async (c, f, p) => {
2293
+ a(!1), await e(p);
2294
+ },
2295
+ singleSelection: !0,
2296
+ children: (c, f) => /* @__PURE__ */ D("div", { style: { width: 240 }, children: [
2297
+ /* @__PURE__ */ o(Kr, { paddingSize: "s", children: f }),
2298
+ c,
2299
+ /* @__PURE__ */ o(Xr, { paddingSize: "s", children: /* @__PURE__ */ o(J, { size: "s", fullWidth: !0, iconType: Ee, children: "New playlist" }) })
2300
+ ] })
2301
+ }
2302
+ )
2303
+ }
2304
+ );
2305
+ }, Qa = ({
2306
+ onCancel: t,
2307
+ onSave: e
2308
+ }) => {
2309
+ const r = Zr({ prefix: "modalForm" }), [a, i] = $(""), [s, c] = $(""), [f, p] = $(!1);
2310
+ return /* @__PURE__ */ D(on, { onClose: t, initialFocus: "[name=url]", children: [
2311
+ /* @__PURE__ */ o(tn, { children: /* @__PURE__ */ o(en, { children: "Add video" }) }),
2312
+ /* @__PURE__ */ o(nn, { children: /* @__PURE__ */ D(
2313
+ rn,
2314
+ {
2315
+ id: r,
2316
+ component: "form",
2317
+ onSubmit: async (y) => {
2318
+ y.preventDefault();
2319
+ try {
2320
+ p(!0), await e({ url: a, title: s });
2321
+ } finally {
2322
+ p(!1);
2323
+ }
2324
+ },
2325
+ children: [
2326
+ /* @__PURE__ */ o(ut, { label: "URL", children: /* @__PURE__ */ o(
2327
+ Ft,
2328
+ {
2329
+ name: "url",
2330
+ value: a,
2331
+ onChange: (y) => i(y.target.value)
2332
+ }
2333
+ ) }),
2334
+ /* @__PURE__ */ o(ut, { label: "Title", children: /* @__PURE__ */ o(
2335
+ Ft,
2336
+ {
2337
+ name: "title",
2338
+ value: s,
2339
+ onChange: (y) => c(y.target.value)
2340
+ }
2341
+ ) })
2342
+ ]
2343
+ }
2344
+ ) }),
2345
+ /* @__PURE__ */ D(an, { children: [
2346
+ /* @__PURE__ */ o(Wt, { onClick: t, children: "Cancel" }),
2347
+ /* @__PURE__ */ o(
2348
+ J,
2349
+ {
2350
+ type: "submit",
2351
+ form: r,
2352
+ fill: !0,
2353
+ disabled: a.trim().length === 0,
2354
+ isLoading: f,
2355
+ children: "Add video"
2356
+ }
2357
+ )
2358
+ ] })
2359
+ ] });
2360
+ }, Vt = ne(
2361
+ ({ onSave: t }) => {
2362
+ const [e, r] = $(!1), a = B(
2363
+ async (i) => {
2364
+ await t(i), r(!1);
2365
+ },
2366
+ [t]
2367
+ );
2368
+ return /* @__PURE__ */ D(_e, { children: [
2369
+ /* @__PURE__ */ o(
2370
+ J,
2371
+ {
2372
+ onClick: () => r(!0),
2373
+ iconType: Ee,
2374
+ color: "primary",
2375
+ children: "Add video"
2376
+ }
2377
+ ),
2378
+ e && /* @__PURE__ */ o(
2379
+ Qa,
2380
+ {
2381
+ onCancel: () => r(!1),
2382
+ onSave: a
2383
+ }
2384
+ )
2385
+ ] });
2386
+ }
2387
+ );
2388
+ I(
2389
+ ({ playQueue: t }) => {
2390
+ const [e, r] = $(!1);
2391
+ return /* @__PURE__ */ D(_e, { children: [
2392
+ e && /* @__PURE__ */ o(
2393
+ ln,
2394
+ {
2395
+ type: "push",
2396
+ size: "s",
2397
+ onClose: () => r(!1),
2398
+ children: /* @__PURE__ */ o("div", { style: { blockSize: "100%" }, children: /* @__PURE__ */ o(
2399
+ sn,
2400
+ {
2401
+ language: "json",
2402
+ overflowHeight: "100%",
2403
+ isCopyable: !0,
2404
+ isVirtualized: !0,
2405
+ children: JSON.stringify(
2406
+ t.localStorageState,
2407
+ void 0,
2408
+ 2
2409
+ )
2410
+ }
2411
+ ) })
2412
+ }
2413
+ ),
2414
+ /* @__PURE__ */ o(
2415
+ J,
2416
+ {
2417
+ onClick: () => r((a) => !a),
2418
+ iconType: vn,
2419
+ children: "Developer tools"
2420
+ }
2421
+ )
2422
+ ] });
2423
+ }
2424
+ );
2425
+ const vr = {
2426
+ Audio: "",
2427
+ Dailymotion: "https://www.dailymotion.com/favicon.ico",
2428
+ Niconico: "https://www.nicovideo.jp/favicon.ico",
2429
+ SoundCloud: "https://soundcloud.com/favicon.ico",
2430
+ Twitch: "https://www.twitch.tv/favicon.ico",
2431
+ Vimeo: "https://vimeo.com/favicon.ico",
2432
+ YouTube: "https://www.youtube.com/favicon.ico"
2433
+ }, Va = I(
2434
+ ({ playQueue: t }) => {
2435
+ const { euiTheme: e } = Ht();
2436
+ return /* @__PURE__ */ D(
2437
+ un,
2438
+ {
2439
+ style: {
2440
+ position: "sticky",
2441
+ top: 112,
2442
+ zIndex: 998,
2443
+ background: e.colors.backgroundBasePlain
2444
+ },
2445
+ children: [
2446
+ /* @__PURE__ */ o(cn, { children: /* @__PURE__ */ o(
2447
+ Gt,
2448
+ {
2449
+ id: "",
2450
+ checked: t.allItemsSelected,
2451
+ onChange: (r) => {
2452
+ r.target.checked ? t.selectAll() : t.unselectAll();
2453
+ }
2454
+ }
2455
+ ) }),
2456
+ /* @__PURE__ */ o(ot, { width: 24 }),
2457
+ /* @__PURE__ */ o(ot, { children: "Title" }),
2458
+ /* @__PURE__ */ o(ot, {})
2459
+ ]
2460
+ }
2461
+ );
2462
+ }
2463
+ ), Ua = ne(
2464
+ ({
2465
+ item: t,
2466
+ closePopover: e
2467
+ }) => {
2468
+ const r = Ye(
2469
+ () => [
2470
+ {
2471
+ id: 0,
2472
+ items: [
2473
+ {
2474
+ name: "Play first",
2475
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2476
+ onClick: async () => {
2477
+ e(), await t.playFirst();
2478
+ }
2479
+ },
2480
+ {
2481
+ name: "Play next",
2482
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2483
+ onClick: async () => {
2484
+ e(), await t.playNext();
2485
+ }
2486
+ },
2487
+ {
2488
+ name: "Add to play queue",
2489
+ icon: /* @__PURE__ */ o(U, { type: Ee }),
2490
+ onClick: async () => {
2491
+ e(), await t.addToPlayQueue();
2492
+ }
2493
+ },
2494
+ {
2495
+ isSeparator: !0
2496
+ },
2497
+ {
2498
+ name: "Move to the top",
2499
+ icon: /* @__PURE__ */ o(U, { type: gn }),
2500
+ onClick: async () => {
2501
+ e(), t.moveToTop();
2502
+ },
2503
+ disabled: !t.canMoveToTop
2504
+ },
2505
+ {
2506
+ name: "Move to the bottom",
2507
+ icon: /* @__PURE__ */ o(U, { type: bn }),
2508
+ onClick: async () => {
2509
+ e(), t.moveToBottom();
2510
+ },
2511
+ disabled: !t.canMoveToBottom
2512
+ },
2513
+ {
2514
+ isSeparator: !0
2515
+ },
2516
+ {
2517
+ name: "Remove to the top",
2518
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2519
+ onClick: async () => {
2520
+ e(), await t.removeToTop();
2521
+ },
2522
+ disabled: !t.canRemoveToTop
2523
+ },
2524
+ {
2525
+ name: "Remove others",
2526
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2527
+ onClick: async () => {
2528
+ e(), await t.removeOthers();
2529
+ },
2530
+ disabled: !t.canRemoveOthers
2531
+ }
2532
+ ]
2533
+ }
2534
+ ],
2535
+ [e, t]
2536
+ );
2537
+ return /* @__PURE__ */ o(mt, { initialPanelId: 0, panels: r });
2538
+ }
2539
+ ), Ya = ne(
2540
+ ({ item: t }) => {
2541
+ const [e, r] = $(!1), a = B(() => r(!e), [e]), i = B(() => r(!1), []);
2542
+ return /* @__PURE__ */ o(
2543
+ ke,
2544
+ {
2545
+ button: /* @__PURE__ */ o(
2546
+ Y,
2547
+ {
2548
+ title: "More options",
2549
+ "aria-label": "More options",
2550
+ iconType: Xt,
2551
+ size: "s",
2552
+ color: "text",
2553
+ onClick: a
2554
+ }
2555
+ ),
2556
+ isOpen: e,
2557
+ closePopover: i,
2558
+ panelPaddingSize: "none",
2559
+ anchorPosition: "leftCenter",
2560
+ children: /* @__PURE__ */ o(
2561
+ Ua,
2562
+ {
2563
+ item: t,
2564
+ closePopover: i
2565
+ }
2566
+ )
2567
+ }
2568
+ );
2569
+ }
2570
+ ), Wa = I(
2571
+ ({ item: t }) => {
2572
+ const e = ce();
2573
+ return /* @__PURE__ */ D(dt, { textOnly: !1, hasActions: !0, align: "right", children: [
2574
+ /* @__PURE__ */ o(
2575
+ J,
2576
+ {
2577
+ iconType: Pn,
2578
+ size: "s",
2579
+ onClick: async () => {
2580
+ t.isCurrent ? await e.setCurrentTime(0) : t.play();
2581
+ },
2582
+ children: "Play"
2583
+ }
2584
+ ),
2585
+ /* @__PURE__ */ o(
2586
+ J,
2587
+ {
2588
+ iconType: yt,
2589
+ size: "s",
2590
+ onClick: t.remove,
2591
+ children: "Remove"
2592
+ }
2593
+ ),
2594
+ /* @__PURE__ */ o(Ya, { item: t })
2595
+ ] });
2596
+ }
2597
+ ), Ha = I(
2598
+ ({ item: t }) => {
2599
+ const e = ce();
2600
+ return /* @__PURE__ */ D(pn, { isSelected: t.isCurrent, children: [
2601
+ /* @__PURE__ */ o(dn, { children: /* @__PURE__ */ o(
2602
+ Gt,
2603
+ {
2604
+ id: t.id.toString(),
2605
+ checked: t.isSelected,
2606
+ onChange: t.toggleSelected
2607
+ }
2608
+ ) }),
2609
+ /* @__PURE__ */ o(dt, { textOnly: !1, children: /* @__PURE__ */ o(
2610
+ "img",
2611
+ {
2612
+ src: vr[t.type],
2613
+ width: 16,
2614
+ height: 16,
2615
+ alt: t.type
2616
+ }
2617
+ ) }),
2618
+ /* @__PURE__ */ o(dt, { children: /* @__PURE__ */ o(
2619
+ fn,
2620
+ {
2621
+ href: t.url,
2622
+ target: "_blank",
2623
+ external: !0,
2624
+ onClick: () => e.pause(),
2625
+ children: t.title
2626
+ }
2627
+ ) }),
2628
+ /* @__PURE__ */ o(Wa, { item: t })
2629
+ ] }, t.id);
2630
+ }
2631
+ ), Ga = I(
2632
+ ({ playQueue: t }) => /* @__PURE__ */ o(
2633
+ Mn,
2634
+ {
2635
+ tag: "tbody",
2636
+ list: t.items,
2637
+ setList: (e) => t.setItems(e),
2638
+ children: t.items.map((e) => /* @__PURE__ */ o(Ha, { item: e }, e.id))
2639
+ }
2640
+ )
2641
+ ), Ja = I(
2642
+ ({ playQueue: t }) => /* @__PURE__ */ D(mn, { children: [
2643
+ /* @__PURE__ */ o(Va, { playQueue: t }),
2644
+ /* @__PURE__ */ o(Ga, { playQueue: t })
2645
+ ] })
2646
+ );
2647
+ function Ka(t) {
2648
+ return t !== null && typeof t == "object" && "title" in t && typeof t.title == "string";
2649
+ }
2650
+ const Xa = I(
2651
+ ({ playQueue: t }) => /* @__PURE__ */ o(
2652
+ J,
2653
+ {
2654
+ iconType: Ee,
2655
+ onClick: t.addSelectedItems,
2656
+ disabled: !t.canAddSelectedItems,
2657
+ children: "Add to play queue"
2658
+ }
2659
+ )
2660
+ ), Za = I(
2661
+ ({ playQueue: t }) => {
2662
+ const { euiTheme: e } = Ht(), r = B(async () => {
2663
+ }, []), a = B(
2664
+ async (i) => {
2665
+ const s = Hr(i.url);
2666
+ if (s === void 0)
2667
+ return;
2668
+ const c = s.extractVideoId(i.url);
2669
+ if (c === void 0)
2670
+ return;
2671
+ const p = await (await fetch(
2672
+ `https://noembed.com/embed?url=${encodeURIComponent(
2673
+ i.url
2674
+ )}`
2675
+ )).json(), y = t.createItem({
2676
+ url: i.url,
2677
+ type: s.type,
2678
+ videoId: c,
2679
+ title: i.title || (Ka(p) ? p.title : c)
2680
+ });
2681
+ await t.addItems([y]);
2682
+ },
2683
+ [t]
2684
+ );
2685
+ return /* @__PURE__ */ D(_e, { children: [
2686
+ /* @__PURE__ */ D(
2687
+ le,
2688
+ {
2689
+ alignItems: "center",
2690
+ gutterSize: "m",
2691
+ style: {
2692
+ position: "sticky",
2693
+ top: 48,
2694
+ zIndex: 998,
2695
+ background: e.colors.backgroundBasePlain
2696
+ },
2697
+ children: [
2698
+ /* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
2699
+ J,
2700
+ {
2701
+ disabled: !t.canPlaySelectedItemsNext,
2702
+ onClick: t.playSelectedItemsNext,
2703
+ children: "Play next"
2704
+ }
2705
+ ) }),
2706
+ /* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(Xa, { playQueue: t }) }),
2707
+ /* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
2708
+ qa,
2709
+ {
2710
+ disabled: !ba.mediaPlayer.enablePlaylists,
2711
+ onAddToPlaylist: r
2712
+ }
2713
+ ) }),
2714
+ /* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
2715
+ J,
2716
+ {
2717
+ iconType: yt,
2718
+ onClick: t.removeSelectedItems,
2719
+ disabled: !t.canRemoveSelectedItems,
2720
+ children: "Remove"
2721
+ }
2722
+ ) }),
2723
+ /* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
2724
+ J,
2725
+ {
2726
+ iconType: Sn,
2727
+ onClick: t.clear,
2728
+ disabled: !t.canClear,
2729
+ children: "Clear"
2730
+ }
2731
+ ) }),
2732
+ /* @__PURE__ */ o(G, { grow: !0 }),
2733
+ /* @__PURE__ */ D(G, { grow: !1, children: [
2734
+ !1,
2735
+ /* @__PURE__ */ o(Vt, { onSave: a })
2736
+ ] })
2737
+ ]
2738
+ }
2739
+ ),
2740
+ /* @__PURE__ */ o(
2741
+ Jt,
2742
+ {
2743
+ size: "l",
2744
+ style: {
2745
+ position: "sticky",
2746
+ top: 88,
2747
+ zIndex: 998,
2748
+ background: e.colors.backgroundBasePlain
2749
+ }
2750
+ }
2751
+ ),
2752
+ t.isEmpty ? /* @__PURE__ */ o(
2753
+ hn,
2754
+ {
2755
+ title: /* @__PURE__ */ o("h2", { children: "We couldn't find any videos" }),
2756
+ body: /* @__PURE__ */ o("p", { children: "Your video library doesn't contain any video content." }),
2757
+ actions: /* @__PURE__ */ o(Vt, { onSave: a })
2758
+ }
2759
+ ) : /* @__PURE__ */ o(Ja, { playQueue: t })
2760
+ ] });
2761
+ }
2762
+ ), ei = ({
2763
+ breadcrumbs: t,
2764
+ tabs: e,
2765
+ ...r
2766
+ }) => {
2767
+ const a = Dn();
2768
+ return /* @__PURE__ */ o(
2769
+ ht.Header,
2770
+ {
2771
+ ...r,
2772
+ breadcrumbs: t?.map(({ linkProps: i, ...s }) => ({
2773
+ ...s,
2774
+ href: i === void 0 ? void 0 : a.buildLocation(
2775
+ i
2776
+ /* FIXME */
2777
+ ).href,
2778
+ onClick: i === void 0 ? void 0 : async (c) => {
2779
+ c.preventDefault(), await a.navigate(i);
2780
+ }
2781
+ })),
2782
+ tabs: e?.map(({ linkProps: i, ...s }) => ({
2783
+ ...s,
2784
+ href: i === void 0 ? void 0 : a.buildLocation(
2785
+ i
2786
+ /* FIXME */
2787
+ ).href,
2788
+ onClick: i === void 0 ? void 0 : async (c) => {
2789
+ c.preventDefault(), await a.navigate(i);
2790
+ }
2791
+ }))
2792
+ }
2793
+ );
2794
+ }, Ni = () => {
2795
+ const t = Ge();
2796
+ return /* @__PURE__ */ D(_e, { children: [
2797
+ /* @__PURE__ */ o(
2798
+ ei,
2799
+ {
2800
+ pageTitle: "Play queue",
2801
+ rightSideItems: []
2802
+ }
2803
+ ),
2804
+ /* @__PURE__ */ o(ht.Section, { children: /* @__PURE__ */ o(Za, { playQueue: t }) })
2805
+ ] });
2806
+ }, ti = I(() => {
2807
+ const t = z();
2808
+ return /* @__PURE__ */ o(
2809
+ Y,
2810
+ {
2811
+ title: `Shuffle: ${t.shuffle ? "On" : "Off"}`,
2812
+ "aria-label": `Shuffle: ${t.shuffle ? "On" : "Off"}`,
2813
+ iconType: t.shuffle ? wn : Tn,
2814
+ size: "s",
2815
+ iconSize: "l",
2816
+ onClick: t.toggleShuffle,
2817
+ disabled: !t.canToggleShuffle
2818
+ }
2819
+ );
2820
+ }), ri = I(() => {
2821
+ const t = z();
2822
+ return /* @__PURE__ */ o(
2823
+ Y,
2824
+ {
2825
+ title: "Previous",
2826
+ "aria-label": "Previous",
2827
+ iconType: Rn,
2828
+ size: "s",
2829
+ iconSize: "l",
2830
+ onClick: t.previous,
2831
+ disabled: !t.canPrevious
2832
+ }
2833
+ );
2834
+ }), ni = I(() => {
2835
+ const t = z();
2836
+ return /* @__PURE__ */ o(
2837
+ Y,
2838
+ {
2839
+ title: "Skip back 10 seconds",
2840
+ "aria-label": "Skip back 10 seconds",
2841
+ iconType: Zt,
2842
+ size: "s",
2843
+ iconSize: "l",
2844
+ onClick: t.skipBack10,
2845
+ disabled: !t.canSkipBack10
2846
+ }
2847
+ );
2848
+ }), ai = I(() => {
2849
+ const t = z();
2850
+ return /* @__PURE__ */ o(
2851
+ Y,
2852
+ {
2853
+ title: "Pause",
2854
+ "aria-label": "Pause",
2855
+ iconType: Cn,
2856
+ size: "s",
2857
+ iconSize: "l",
2858
+ onClick: t.pause,
2859
+ disabled: !t.canPause
2860
+ }
2861
+ );
2862
+ }), ii = I(() => {
2863
+ const t = z();
2864
+ return /* @__PURE__ */ o(
2865
+ Y,
2866
+ {
2867
+ title: "Play",
2868
+ "aria-label": "Play",
2869
+ iconType: En,
2870
+ size: "s",
2871
+ iconSize: "l",
2872
+ onClick: t.play,
2873
+ disabled: !t.canPlay
2874
+ }
2875
+ );
2876
+ }), oi = I(() => {
2877
+ const t = z();
2878
+ return /* @__PURE__ */ o(
2879
+ Y,
2880
+ {
2881
+ title: "Skip forward 30 seconds",
2882
+ "aria-label": "Skip forward 30 seconds",
2883
+ iconType: er,
2884
+ size: "s",
2885
+ iconSize: "l",
2886
+ onClick: t.skipForward30,
2887
+ disabled: !t.canSkipForward30
2888
+ }
2889
+ );
2890
+ }), si = I(() => {
2891
+ const t = z();
2892
+ return /* @__PURE__ */ o(
2893
+ Y,
2894
+ {
2895
+ title: "Next",
2896
+ "aria-label": "Next",
2897
+ iconType: In,
2898
+ size: "s",
2899
+ iconSize: "l",
2900
+ onClick: t.next,
2901
+ disabled: !t.canNext
2902
+ }
2903
+ );
2904
+ }), li = {
2905
+ [O.Off]: kn,
2906
+ [O.All]: On,
2907
+ [O.One]: xn
2908
+ }, ci = I(() => {
2909
+ const t = z();
2910
+ return /* @__PURE__ */ o(
2911
+ Y,
2912
+ {
2913
+ title: `Repeat: ${t.repeat === O.All ? "All" : t.repeat === O.One ? "One" : "Off"}`,
2914
+ "aria-label": `Repeat: ${t.repeat === O.All ? "All" : t.repeat === O.One ? "One" : "Off"}`,
2915
+ iconType: li[t.repeat],
2916
+ size: "s",
2917
+ iconSize: "l",
2918
+ onClick: t.toggleRepeat,
2919
+ disabled: !t.canToggleRepeat
2920
+ }
2921
+ );
2922
+ }), ui = I(() => {
2923
+ const t = z();
2924
+ return /* @__PURE__ */ D(
2925
+ le,
2926
+ {
2927
+ responsive: !1,
2928
+ gutterSize: "s",
2929
+ justifyContent: "center",
2930
+ alignItems: "center",
2931
+ children: [
2932
+ /* @__PURE__ */ o(ti, {}),
2933
+ /* @__PURE__ */ o(ri, {}),
2934
+ /* @__PURE__ */ o(ni, {}),
2935
+ t.playing ? /* @__PURE__ */ o(ai, {}) : /* @__PURE__ */ o(ii, {}),
2936
+ /* @__PURE__ */ o(oi, {}),
2937
+ /* @__PURE__ */ o(si, {}),
2938
+ /* @__PURE__ */ o(ci, {})
2939
+ ]
2940
+ }
2941
+ );
2942
+ }), di = ne(
2943
+ ({ item: t, closePopover: e }) => {
2944
+ const r = ce(), a = Ye(
2945
+ () => [
2946
+ {
2947
+ id: 0,
2948
+ items: [
2949
+ {
2950
+ name: "Open in new tab",
2951
+ icon: /* @__PURE__ */ o(U, { type: _n }),
2952
+ onClick: async () => {
2953
+ e(), await r.pause(), window.open(t.dto.url, "_blank");
2954
+ }
2955
+ },
2956
+ {
2957
+ name: "Copy link address",
2958
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2959
+ onClick: async () => {
2960
+ e(), await navigator.clipboard.writeText(
2961
+ t.dto.url
2962
+ );
2963
+ }
2964
+ },
2965
+ {
2966
+ name: "Copy link text",
2967
+ icon: /* @__PURE__ */ o(U, { type: "" }),
2968
+ onClick: async () => {
2969
+ e(), await navigator.clipboard.writeText(
2970
+ t.dto.title
2971
+ );
2972
+ }
2973
+ }
2974
+ ]
2975
+ }
2976
+ ],
2977
+ [e, r, t]
2978
+ );
2979
+ return /* @__PURE__ */ o(mt, { initialPanelId: 0, panels: a });
2980
+ }
2981
+ ), fi = ne(
2982
+ ({ item: t }) => {
2983
+ const [e, r] = $(!1), a = B(() => r(!e), [e]), i = B(() => r(!1), []);
2984
+ return /* @__PURE__ */ o(
2985
+ ke,
2986
+ {
2987
+ button: /* @__PURE__ */ o(
2988
+ Wt,
2989
+ {
2990
+ iconType: vr[t.type],
2991
+ size: "s",
2992
+ onClick: a,
2993
+ children: t.title
2994
+ }
2995
+ ),
2996
+ isOpen: e,
2997
+ closePopover: i,
2998
+ panelPaddingSize: "none",
2999
+ anchorPosition: "upLeft",
3000
+ children: /* @__PURE__ */ o(
3001
+ di,
3002
+ {
3003
+ item: t,
3004
+ closePopover: i
3005
+ }
3006
+ )
3007
+ }
3008
+ );
3009
+ }
3010
+ ), pi = I(() => {
3011
+ const t = z();
3012
+ return /* @__PURE__ */ o(
3013
+ le,
3014
+ {
3015
+ responsive: !1,
3016
+ gutterSize: "s",
3017
+ justifyContent: "flexStart",
3018
+ alignItems: "center",
3019
+ children: t.currentItem && /* @__PURE__ */ o(fi, { item: t.currentItem })
3020
+ }
3021
+ );
3022
+ }), mi = I(() => {
3023
+ const t = z();
3024
+ return /* @__PURE__ */ o(
3025
+ Y,
3026
+ {
3027
+ title: "Mute",
3028
+ "aria-label": "Mute",
3029
+ iconType: tr,
3030
+ size: "s",
3031
+ iconSize: "l",
3032
+ disabled: !t.controller.supports("setMuted")
3033
+ }
3034
+ );
3035
+ }), hi = I(
3036
+ ({ button: t, isOpen: e, closePopover: r }) => {
3037
+ const a = z(), [i, s] = $("0"), c = ce();
3038
+ Qr(() => {
3039
+ e && c.getVolume().then((p) => {
3040
+ p !== void 0 && s(Math.floor(p * 100).toString());
3041
+ });
3042
+ }, [e, c]);
3043
+ const f = B(
3044
+ async (p) => {
3045
+ s(p.currentTarget.value), await c.setVolume(Number(p.currentTarget.value) / 100);
3046
+ },
3047
+ [c]
3048
+ );
3049
+ return /* @__PURE__ */ o(
3050
+ ke,
3051
+ {
3052
+ button: t,
3053
+ isOpen: e,
3054
+ closePopover: r,
3055
+ anchorPosition: "upRight",
3056
+ children: /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ D(
3057
+ le,
3058
+ {
3059
+ responsive: !1,
3060
+ gutterSize: "s",
3061
+ justifyContent: "center",
3062
+ alignItems: "center",
3063
+ children: [
3064
+ /* @__PURE__ */ o(mi, {}),
3065
+ /* @__PURE__ */ o(
3066
+ Kt,
3067
+ {
3068
+ min: 0,
3069
+ max: 100,
3070
+ step: 1,
3071
+ value: i,
3072
+ onChange: f,
3073
+ css: { blockSize: 32 },
3074
+ disabled: !a.controller.supports("setVolume")
3075
+ }
3076
+ )
3077
+ ]
3078
+ }
3079
+ ) })
3080
+ }
3081
+ );
3082
+ }
3083
+ ), yi = I(() => {
3084
+ const t = z(), [e, r] = $(!1);
3085
+ return /* @__PURE__ */ o(
3086
+ hi,
3087
+ {
3088
+ button: /* @__PURE__ */ o(
3089
+ Y,
3090
+ {
3091
+ title: "Volume",
3092
+ "aria-label": "Volume",
3093
+ iconType: tr,
3094
+ size: "s",
3095
+ iconSize: "l",
3096
+ onClick: () => r(!e),
3097
+ disabled: !t.controller.supports("getVolume")
3098
+ }
3099
+ ),
3100
+ isOpen: e,
3101
+ closePopover: () => r(!1)
3102
+ }
3103
+ );
3104
+ }), vi = ({
3105
+ onClickPlayQueueButton: t
3106
+ }) => /* @__PURE__ */ o(
3107
+ Y,
3108
+ {
3109
+ title: "Play queue",
3110
+ "aria-label": "Play queue",
3111
+ iconType: Fn,
3112
+ size: "s",
3113
+ iconSize: "l",
3114
+ onClick: t
3115
+ }
3116
+ ), gi = I(
3117
+ ({ closePopover: t }) => {
3118
+ const e = z(), r = ce(), a = B(async () => {
3119
+ await e.skipBack10(), t();
3120
+ }, [e, t]), i = B(async () => {
3121
+ await e.skipForward30(), t();
3122
+ }, [e, t]), s = B(
3123
+ async (w) => {
3124
+ await r.setPlaybackRate(w), t();
3125
+ },
3126
+ [r, t]
3127
+ ), c = B(async () => {
3128
+ await e.removeFromPlayQueue(), t();
3129
+ }, [e, t]), [f, p] = $(), y = B(async () => {
3130
+ await e.controller.getPlaybackRate().then((w) => p(w));
3131
+ }, [e]), P = Ye(
3132
+ () => [
3133
+ {
3134
+ id: 0,
3135
+ items: [
3136
+ {
3137
+ name: "Speed",
3138
+ icon: /* @__PURE__ */ o(U, { type: An }),
3139
+ panel: 1,
3140
+ onClick: y,
3141
+ disabled: !e.controller.supports(
3142
+ "getPlaybackRate"
3143
+ )
3144
+ },
3145
+ {
3146
+ name: "Skip back 10 seconds",
3147
+ icon: /* @__PURE__ */ o(U, { type: Zt }),
3148
+ onClick: a,
3149
+ disabled: !e.canSkipBack10
3150
+ },
3151
+ {
3152
+ name: "Skip forward 30 seconds",
3153
+ icon: /* @__PURE__ */ o(U, { type: er }),
3154
+ onClick: i,
3155
+ disabled: !e.canSkipForward30
3156
+ },
3157
+ {
3158
+ isSeparator: !0
3159
+ },
3160
+ {
3161
+ name: "Remove from play queue",
3162
+ icon: /* @__PURE__ */ o(U, { type: yt }),
3163
+ onClick: c,
3164
+ disabled: !e.canRemoveFromPlayQueue
3165
+ }
3166
+ ]
3167
+ },
3168
+ {
3169
+ id: 1,
3170
+ title: "Speed",
3171
+ items: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2].map(
3172
+ (w) => ({
3173
+ name: w.toString(),
3174
+ onClick: () => s(w),
3175
+ icon: w === f ? "check" : "empty",
3176
+ disabled: !e.controller.supports(
3177
+ "setPlaybackRate"
3178
+ )
3179
+ })
3180
+ )
3181
+ }
3182
+ ],
3183
+ [
3184
+ e,
3185
+ y,
3186
+ a,
3187
+ i,
3188
+ c,
3189
+ s,
3190
+ f
3191
+ ]
3192
+ );
3193
+ return /* @__PURE__ */ o(mt, { initialPanelId: 0, panels: P });
3194
+ }
3195
+ ), bi = ne(
3196
+ ({
3197
+ button: t,
3198
+ isOpen: e,
3199
+ closePopover: r
3200
+ }) => /* @__PURE__ */ o(
3201
+ ke,
3202
+ {
3203
+ button: t,
3204
+ isOpen: e,
3205
+ closePopover: r,
3206
+ panelPaddingSize: "none",
3207
+ anchorPosition: "upRight",
3208
+ children: /* @__PURE__ */ o(gi, { closePopover: r })
3209
+ }
3210
+ )
3211
+ ), Pi = ne(() => {
3212
+ const [t, e] = $(!1);
3213
+ return /* @__PURE__ */ o(
3214
+ bi,
3215
+ {
3216
+ button: /* @__PURE__ */ o(
3217
+ Y,
3218
+ {
3219
+ title: "More options",
3220
+ "aria-label": "More options",
3221
+ iconType: Xt,
3222
+ size: "s",
3223
+ iconSize: "l",
3224
+ onClick: () => e(!t)
3225
+ }
3226
+ ),
3227
+ isOpen: t,
3228
+ closePopover: () => e(!1)
3229
+ }
3230
+ );
3231
+ }), Si = ne(
3232
+ ({ onClickPlayQueueButton: t }) => /* @__PURE__ */ D(
3233
+ le,
3234
+ {
3235
+ responsive: !1,
3236
+ gutterSize: "s",
3237
+ justifyContent: "flexEnd",
3238
+ alignItems: "center",
3239
+ children: [
3240
+ /* @__PURE__ */ o(yi, {}),
3241
+ t && /* @__PURE__ */ o(
3242
+ vi,
3243
+ {
3244
+ onClickPlayQueueButton: t
3245
+ }
3246
+ ),
3247
+ /* @__PURE__ */ o(Pi, {})
3248
+ ]
3249
+ }
3250
+ )
3251
+ ), wi = I(() => {
3252
+ const t = z(), e = ce(), r = B(
3253
+ (s) => {
3254
+ const c = Number(s.currentTarget.value) / 100;
3255
+ t.setPercent(c);
3256
+ },
3257
+ [t]
3258
+ ), a = B(
3259
+ (s) => {
3260
+ s.button === 0 && t.setSeeking(!0);
3261
+ },
3262
+ [t]
3263
+ ), i = B(
3264
+ async (s) => {
3265
+ if (s.button === 0) {
3266
+ const c = Number(s.currentTarget.value) / 100;
3267
+ t.setSeeking(!1);
3268
+ const f = await e.getDuration();
3269
+ f !== void 0 && await e.setCurrentTime(f * c);
3270
+ }
3271
+ },
3272
+ [t, e]
3273
+ );
3274
+ return /* @__PURE__ */ o(
3275
+ Kt,
3276
+ {
3277
+ min: 0,
3278
+ max: 100,
3279
+ step: 1e-7,
3280
+ value: t.percent * 100,
3281
+ onChange: r,
3282
+ onMouseDown: a,
3283
+ onMouseUp: i,
3284
+ fullWidth: !0,
3285
+ showRange: !0,
3286
+ css: { blockSize: 32 },
3287
+ disabled: !t.canSeek
3288
+ }
3289
+ );
3290
+ }), $i = I(
3291
+ ({ onClickPlayQueueButton: t }) => /* @__PURE__ */ o(yn, { paddingSize: "s", children: /* @__PURE__ */ D(le, { direction: "column", gutterSize: "none", children: [
3292
+ /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(wi, {}) }),
3293
+ /* @__PURE__ */ o(G, { children: /* @__PURE__ */ D(le, { responsive: !1, children: [
3294
+ /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(pi, {}) }),
3295
+ /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(ui, {}) }),
3296
+ /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(
3297
+ Si,
3298
+ {
3299
+ onClickPlayQueueButton: t
3300
+ }
3301
+ ) })
3302
+ ] }) })
3303
+ ] }) })
3304
+ ), pt = {
3305
+ width: 400,
3306
+ height: 225
3307
+ }, Bi = I(() => {
3308
+ const t = ya(), e = Ye(
3309
+ () => ({
3310
+ onLoaded: t.onLoaded,
3311
+ onPlay: t.onPlay,
3312
+ onPause: t.onPause,
3313
+ onEnded: t.onEnded,
3314
+ onTimeUpdate: t.onTimeUpdate
3315
+ }),
3316
+ [t]
3317
+ );
3318
+ return /* @__PURE__ */ o(
3319
+ "div",
3320
+ {
3321
+ css: {
3322
+ position: "fixed",
3323
+ right: 0,
3324
+ bottom: rr,
3325
+ width: pt.width,
3326
+ height: pt.height,
3327
+ zIndex: 998,
3328
+ backgroundColor: "rgb(39, 39, 39)",
3329
+ display: "flex",
3330
+ flexDirection: "column"
3331
+ },
3332
+ children: /* @__PURE__ */ o("div", { css: { flexGrow: 1, backgroundColor: "black" }, children: t.currentItem && /* @__PURE__ */ o(
3333
+ Gr,
3334
+ {
3335
+ src: t.currentItem.url,
3336
+ options: e,
3337
+ onControllerChange: t.onControllerChange
3338
+ }
3339
+ ) })
3340
+ }
3341
+ );
3342
+ }), ji = I(
3343
+ ({ children: t }) => {
3344
+ const e = Ge();
3345
+ return /* @__PURE__ */ D(
3346
+ ht,
3347
+ {
3348
+ panelled: !0,
3349
+ style: {
3350
+ minBlockSize: `max(460px, 100vh - ${rr}px)`
3351
+ },
3352
+ children: [
3353
+ t,
3354
+ !e.isEmpty && /* @__PURE__ */ o(Jt, { style: { blockSize: pt.height } })
3355
+ ]
3356
+ }
3357
+ );
3358
+ }
3359
+ );
3360
+ export {
3361
+ $i as BottomBar,
3362
+ Di as HydrangeanDivaProvider,
3363
+ ji as MediaPlayerLayout,
3364
+ Bi as MiniPlayer,
3365
+ We as MobXObservableStateProvider,
3366
+ Mi as ObservableStateProvider,
3367
+ Za as PlayQueue,
3368
+ lr as PlayQueueContext,
3369
+ Ni as PlayQueuePage,
3370
+ O as RepeatMode,
3371
+ rr as bottomBarHeight,
3372
+ Ge as usePlayQueue
3373
+ };
3374
+ //# sourceMappingURL=index.es.js.map