UNPKG

@aigamo/hydrangean-diva

Version:

An open-source online media player that can be deployed to and hosted on GitHub pages.

1,538 lines (1,536 loc) 74.7 kB
var Ir = Object.defineProperty; var Pr = (t, e, n) => e in t ? Ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var U = (t, e, n) => Pr(t, typeof e != "symbol" ? e + "" : e, n); import * as te from "react"; import Dt, { forwardRef as Rr, useContext as st, useCallback as $, memo as Z, useState as q, useLayoutEffect as wr, useMemo as zt, createContext as Lt, useEffect as Or } from "react"; import _r from "@emotion/cache"; import { useNostalgicDiva as ie, findVideoService as Ar, NostalgicDiva as kr } from "@aigamo/nostalgic-diva"; import { EuiRange as Vt, EuiButtonIcon as K, EuiFlexGroup as me, EuiFlexItem as G, EuiBottomBar as Mr, EuiFormRow as tt, EuiPopover as lt, EuiIcon as H, EuiContextMenu as Fr, EuiButton as ne, EuiModalHeaderTitle as jr, EuiModalHeader as Nr, EuiForm as $r, EuiFieldText as It, EuiModalBody as Dr, EuiModalFooter as zr, EuiButtonEmpty as Lr, EuiModal as Vr, useEuiTheme as Yt, EuiCheckbox as Bt, EuiTableHeaderCellCheckbox as Yr, EuiTableHeaderCell as Xe, EuiTableHeader as Br, EuiContextMenuItem as Wr, EuiHorizontalRule as Pt, EuiContextMenuPanel as Ur, EuiTableRowCell as rt, EuiTableRowCellCheckbox as qr, EuiLink as Hr, EuiTableRow as Gr, EuiTable as Jr, EuiCodeBlock as Kr, EuiFlyout as Xr, EuiSpacer as Wt, EuiEmptyPrompt as Zr, EuiPageTemplate as nt } from "@elastic/eui"; import { ArrowRepeat1Filled as Qr, ArrowRepeatAllFilled as en, ArrowRepeatAllOffFilled as tn, ArrowShuffleFilled as rn, ArrowShuffleOffFilled as nn, PreviousFilled as on, PauseFilled as an, PlayFilled as sn, NextFilled as ln, Speaker2Regular as Ut, MoreHorizontalFilled as qt, TopSpeedRegular as cn, SkipBack10Regular as un, SkipForward30Regular as fn, DismissRegular as ct, AddRegular as ut, ArrowUploadRegular as dn, ArrowDownloadRegular as mn, PlayRegular as hn, DeleteRegular as vn } from "@fluentui/react-icons"; import { observer as Y } from "mobx-react-lite"; import { ReactSortable as pn } from "react-sortablejs"; import { makeObservable as yn, action as y, computed as _, observable as re, reaction as gn } from "mobx"; import { pull as Rt } from "lodash-es"; import bn from "ajv"; var $e = { exports: {} }, xe = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var wt; function En() { if (wt) return xe; wt = 1; var t = Dt, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 }; function f(h, m, p) { var E, P = {}, D = null, j = null; p !== void 0 && (D = "" + p), m.key !== void 0 && (D = "" + m.key), m.ref !== void 0 && (j = m.ref); for (E in m) i.call(m, E) && !l.hasOwnProperty(E) && (P[E] = m[E]); if (h && h.defaultProps) for (E in m = h.defaultProps, m) P[E] === void 0 && (P[E] = m[E]); return { $$typeof: e, type: h, key: D, ref: j, props: P, _owner: a.current }; } return xe.Fragment = n, xe.jsx = f, xe.jsxs = f, xe; } var Se = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ot; function Tn() { return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && function() { var t = Dt, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), h = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), A = Symbol.iterator, B = "@@iterator"; function Q(r) { if (r === null || typeof r != "object") return null; var s = A && r[A] || r[B]; return typeof s == "function" ? s : null; } var z = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function I(r) { { for (var s = arguments.length, u = new Array(s > 1 ? s - 1 : 0), v = 1; v < s; v++) u[v - 1] = arguments[v]; k("error", r, u); } } function k(r, s, u) { { var v = z.ReactDebugCurrentFrame, T = v.getStackAddendum(); T !== "" && (s += "%s", u = u.concat([T])); var C = u.map(function(b) { return String(b); }); C.unshift("Warning: " + s), Function.prototype.apply.call(console[r], console, C); } } var w = !1, c = !1, L = !1, he = !1, Re = !1, we; we = Symbol.for("react.module.reference"); function Ve(r) { return !!(typeof r == "string" || typeof r == "function" || r === i || r === l || Re || r === a || r === p || r === E || he || r === j || w || c || L || typeof r == "object" && r !== null && (r.$$typeof === D || r.$$typeof === P || r.$$typeof === f || r.$$typeof === h || r.$$typeof === m || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. r.$$typeof === we || r.getModuleId !== void 0)); } function Ye(r, s, u) { var v = r.displayName; if (v) return v; var T = s.displayName || s.name || ""; return T !== "" ? u + "(" + T + ")" : u; } function Oe(r) { return r.displayName || "Context"; } function J(r) { if (r == null) return null; if (typeof r.tag == "number" && I("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function") return r.displayName || r.name || null; if (typeof r == "string") return r; switch (r) { case i: return "Fragment"; case n: return "Portal"; case l: return "Profiler"; case a: return "StrictMode"; case p: return "Suspense"; case E: return "SuspenseList"; } if (typeof r == "object") switch (r.$$typeof) { case h: var s = r; return Oe(s) + ".Consumer"; case f: var u = r; return Oe(u._context) + ".Provider"; case m: return Ye(r, r.render, "ForwardRef"); case P: var v = r.displayName || null; return v !== null ? v : J(r.type) || "Memo"; case D: { var T = r, C = T._payload, b = T._init; try { return J(b(C)); } catch { return null; } } } return null; } var ee = Object.assign, oe = 0, _e, Ae, ve, ke, pe, Me, Fe; function je() { } je.__reactDisabledLog = !0; function Be() { { if (oe === 0) { _e = console.log, Ae = console.info, ve = console.warn, ke = console.error, pe = console.group, Me = console.groupCollapsed, Fe = console.groupEnd; var r = { configurable: !0, enumerable: !0, value: je, writable: !0 }; Object.defineProperties(console, { info: r, log: r, warn: r, error: r, group: r, groupCollapsed: r, groupEnd: r }); } oe++; } } function We() { { if (oe--, oe === 0) { var r = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: ee({}, r, { value: _e }), info: ee({}, r, { value: Ae }), warn: ee({}, r, { value: ve }), error: ee({}, r, { value: ke }), group: ee({}, r, { value: pe }), groupCollapsed: ee({}, r, { value: Me }), groupEnd: ee({}, r, { value: Fe }) }); } oe < 0 && I("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var ye = z.ReactCurrentDispatcher, ge; function le(r, s, u) { { if (ge === void 0) try { throw Error(); } catch (T) { var v = T.stack.trim().match(/\n( *(at )?)/); ge = v && v[1] || ""; } return ` ` + ge + r; } } var be = !1, ce; { var Ue = typeof WeakMap == "function" ? WeakMap : Map; ce = new Ue(); } function d(r, s) { if (!r || be) return ""; { var u = ce.get(r); if (u !== void 0) return u; } var v; be = !0; var T = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var C; C = ye.current, ye.current = null, Be(); try { if (s) { var b = function() { throw Error(); }; if (Object.defineProperty(b.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(b, []); } catch (V) { v = V; } Reflect.construct(r, [], b); } else { try { b.call(); } catch (V) { v = V; } r.call(b.prototype); } } else { try { throw Error(); } catch (V) { v = V; } r(); } } catch (V) { if (V && v && typeof V.stack == "string") { for (var g = V.stack.split(` `), N = v.stack.split(` `), O = g.length - 1, M = N.length - 1; O >= 1 && M >= 0 && g[O] !== N[M]; ) M--; for (; O >= 1 && M >= 0; O--, M--) if (g[O] !== N[M]) { if (O !== 1 || M !== 1) do if (O--, M--, M < 0 || g[O] !== N[M]) { var W = ` ` + g[O].replace(" at new ", " at "); return r.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", r.displayName)), typeof r == "function" && ce.set(r, W), W; } while (O >= 1 && M >= 0); break; } } } finally { be = !1, ye.current = C, We(), Error.prepareStackTrace = T; } var de = r ? r.displayName || r.name : "", se = de ? le(de) : ""; return typeof r == "function" && ce.set(r, se), se; } function Ee(r, s, u) { return d(r, !1); } function ue(r) { var s = r.prototype; return !!(s && s.isReactComponent); } function ae(r, s, u) { if (r == null) return ""; if (typeof r == "function") return d(r, ue(r)); if (typeof r == "string") return le(r); switch (r) { case p: return le("Suspense"); case E: return le("SuspenseList"); } if (typeof r == "object") switch (r.$$typeof) { case m: return Ee(r.render); case P: return ae(r.type, s, u); case D: { var v = r, T = v._payload, C = v._init; try { return ae(C(T), s, u); } catch { } } } return ""; } var Te = Object.prototype.hasOwnProperty, ft = {}, dt = z.ReactDebugCurrentFrame; function Ne(r) { if (r) { var s = r._owner, u = ae(r.type, r._source, s ? s.type : null); dt.setExtraStackFrame(u); } else dt.setExtraStackFrame(null); } function nr(r, s, u, v, T) { { var C = Function.call.bind(Te); for (var b in r) if (C(r, b)) { var g = void 0; try { if (typeof r[b] != "function") { var N = Error((v || "React class") + ": " + u + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw N.name = "Invariant Violation", N; } g = r[b](s, b, v, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (O) { g = O; } g && !(g instanceof Error) && (Ne(T), I("%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", u, b, typeof g), Ne(null)), g instanceof Error && !(g.message in ft) && (ft[g.message] = !0, Ne(T), I("Failed %s type: %s", u, g.message), Ne(null)); } } } var ir = Array.isArray; function qe(r) { return ir(r); } function or(r) { { var s = typeof Symbol == "function" && Symbol.toStringTag, u = s && r[Symbol.toStringTag] || r.constructor.name || "Object"; return u; } } function ar(r) { try { return mt(r), !1; } catch { return !0; } } function mt(r) { return "" + r; } function ht(r) { if (ar(r)) return I("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", or(r)), mt(r); } var vt = z.ReactCurrentOwner, sr = { key: !0, ref: !0, __self: !0, __source: !0 }, pt, yt; function lr(r) { if (Te.call(r, "ref")) { var s = Object.getOwnPropertyDescriptor(r, "ref").get; if (s && s.isReactWarning) return !1; } return r.ref !== void 0; } function cr(r) { if (Te.call(r, "key")) { var s = Object.getOwnPropertyDescriptor(r, "key").get; if (s && s.isReactWarning) return !1; } return r.key !== void 0; } function ur(r, s) { typeof r.ref == "string" && vt.current; } function fr(r, s) { { var u = function() { pt || (pt = !0, I("%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)", s)); }; u.isReactWarning = !0, Object.defineProperty(r, "key", { get: u, configurable: !0 }); } } function dr(r, s) { { var u = function() { yt || (yt = !0, I("%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)", s)); }; u.isReactWarning = !0, Object.defineProperty(r, "ref", { get: u, configurable: !0 }); } } var mr = function(r, s, u, v, T, C, b) { var g = { // This tag allows us to uniquely identify this as a React Element $$typeof: e, // Built-in properties that belong on the element type: r, key: s, ref: u, props: b, // Record the component responsible for creating this element. _owner: C }; return g._store = {}, Object.defineProperty(g._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(g, "_self", { configurable: !1, enumerable: !1, writable: !1, value: v }), Object.defineProperty(g, "_source", { configurable: !1, enumerable: !1, writable: !1, value: T }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g; }; function hr(r, s, u, v, T) { { var C, b = {}, g = null, N = null; u !== void 0 && (ht(u), g = "" + u), cr(s) && (ht(s.key), g = "" + s.key), lr(s) && (N = s.ref, ur(s, T)); for (C in s) Te.call(s, C) && !sr.hasOwnProperty(C) && (b[C] = s[C]); if (r && r.defaultProps) { var O = r.defaultProps; for (C in O) b[C] === void 0 && (b[C] = O[C]); } if (g || N) { var M = typeof r == "function" ? r.displayName || r.name || "Unknown" : r; g && fr(b, M), N && dr(b, M); } return mr(r, g, N, T, v, vt.current, b); } } var He = z.ReactCurrentOwner, gt = z.ReactDebugCurrentFrame; function fe(r) { if (r) { var s = r._owner, u = ae(r.type, r._source, s ? s.type : null); gt.setExtraStackFrame(u); } else gt.setExtraStackFrame(null); } var Ge; Ge = !1; function Je(r) { return typeof r == "object" && r !== null && r.$$typeof === e; } function bt() { { if (He.current) { var r = J(He.current.type); if (r) return ` Check the render method of \`` + r + "`."; } return ""; } } function vr(r) { return ""; } var Et = {}; function pr(r) { { var s = bt(); if (!s) { var u = typeof r == "string" ? r : r.displayName || r.name; u && (s = ` Check the top-level render call using <` + u + ">."); } return s; } } function Tt(r, s) { { if (!r._store || r._store.validated || r.key != null) return; r._store.validated = !0; var u = pr(s); if (Et[u]) return; Et[u] = !0; var v = ""; r && r._owner && r._owner !== He.current && (v = " It was passed a child from " + J(r._owner.type) + "."), fe(r), I('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, v), fe(null); } } function xt(r, s) { { if (typeof r != "object") return; if (qe(r)) for (var u = 0; u < r.length; u++) { var v = r[u]; Je(v) && Tt(v, s); } else if (Je(r)) r._store && (r._store.validated = !0); else if (r) { var T = Q(r); if (typeof T == "function" && T !== r.entries) for (var C = T.call(r), b; !(b = C.next()).done; ) Je(b.value) && Tt(b.value, s); } } } function yr(r) { { var s = r.type; if (s == null || typeof s == "string") return; var u; if (typeof s == "function") u = s.propTypes; else if (typeof s == "object" && (s.$$typeof === m || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. s.$$typeof === P)) u = s.propTypes; else return; if (u) { var v = J(s); nr(u, r.props, "prop", v, r); } else if (s.PropTypes !== void 0 && !Ge) { Ge = !0; var T = J(s); I("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown"); } typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && I("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function gr(r) { { for (var s = Object.keys(r.props), u = 0; u < s.length; u++) { var v = s[u]; if (v !== "children" && v !== "key") { fe(r), I("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), fe(null); break; } } r.ref !== null && (fe(r), I("Invalid attribute `ref` supplied to `React.Fragment`."), fe(null)); } } var St = {}; function Ct(r, s, u, v, T, C) { { var b = Ve(r); if (!b) { var g = ""; (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); var N = vr(); N ? g += N : g += bt(); var O; r === null ? O = "null" : qe(r) ? O = "array" : r !== void 0 && r.$$typeof === e ? (O = "<" + (J(r.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : O = typeof r, I("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, g); } var M = hr(r, s, u, T, C); if (M == null) return M; if (b) { var W = s.children; if (W !== void 0) if (v) if (qe(W)) { for (var de = 0; de < W.length; de++) xt(W[de], r); Object.freeze && Object.freeze(W); } else I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); else xt(W, r); } if (Te.call(s, "key")) { var se = J(r), V = Object.keys(s).filter(function(Cr) { return Cr !== "key"; }), Ke = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!St[se + Ke]) { var Sr = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}"; I(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, Ke, se, Sr, se), St[se + Ke] = !0; } } return r === i ? gr(M) : yr(M), M; } } function br(r, s, u) { return Ct(r, s, u, !0); } function Er(r, s, u) { return Ct(r, s, u, !1); } var Tr = Er, xr = br; Se.Fragment = i, Se.jsx = Tr, Se.jsxs = xr; }()), Se; } var _t; function xn() { return _t || (_t = 1, process.env.NODE_ENV === "production" ? $e.exports = En() : $e.exports = Tn()), $e.exports; } var Ie = xn(), De = { exports: {} }, x = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var At; function Sn() { if (At) return x; At = 1; var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, l = t ? Symbol.for("react.profiler") : 60114, f = t ? Symbol.for("react.provider") : 60109, h = t ? Symbol.for("react.context") : 60110, m = t ? Symbol.for("react.async_mode") : 60111, p = t ? Symbol.for("react.concurrent_mode") : 60111, E = t ? Symbol.for("react.forward_ref") : 60112, P = t ? Symbol.for("react.suspense") : 60113, D = t ? Symbol.for("react.suspense_list") : 60120, j = t ? Symbol.for("react.memo") : 60115, A = t ? Symbol.for("react.lazy") : 60116, B = t ? Symbol.for("react.block") : 60121, Q = t ? Symbol.for("react.fundamental") : 60117, z = t ? Symbol.for("react.responder") : 60118, I = t ? Symbol.for("react.scope") : 60119; function k(c) { if (typeof c == "object" && c !== null) { var L = c.$$typeof; switch (L) { case e: switch (c = c.type, c) { case m: case p: case i: case l: case a: case P: return c; default: switch (c = c && c.$$typeof, c) { case h: case E: case A: case j: case f: return c; default: return L; } } case n: return L; } } } function w(c) { return k(c) === p; } return x.AsyncMode = m, x.ConcurrentMode = p, x.ContextConsumer = h, x.ContextProvider = f, x.Element = e, x.ForwardRef = E, x.Fragment = i, x.Lazy = A, x.Memo = j, x.Portal = n, x.Profiler = l, x.StrictMode = a, x.Suspense = P, x.isAsyncMode = function(c) { return w(c) || k(c) === m; }, x.isConcurrentMode = w, x.isContextConsumer = function(c) { return k(c) === h; }, x.isContextProvider = function(c) { return k(c) === f; }, x.isElement = function(c) { return typeof c == "object" && c !== null && c.$$typeof === e; }, x.isForwardRef = function(c) { return k(c) === E; }, x.isFragment = function(c) { return k(c) === i; }, x.isLazy = function(c) { return k(c) === A; }, x.isMemo = function(c) { return k(c) === j; }, x.isPortal = function(c) { return k(c) === n; }, x.isProfiler = function(c) { return k(c) === l; }, x.isStrictMode = function(c) { return k(c) === a; }, x.isSuspense = function(c) { return k(c) === P; }, x.isValidElementType = function(c) { return typeof c == "string" || typeof c == "function" || c === i || c === p || c === l || c === a || c === P || c === D || typeof c == "object" && c !== null && (c.$$typeof === A || c.$$typeof === j || c.$$typeof === f || c.$$typeof === h || c.$$typeof === E || c.$$typeof === Q || c.$$typeof === z || c.$$typeof === I || c.$$typeof === B); }, x.typeOf = k, x; } var S = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var kt; function Cn() { return kt || (kt = 1, process.env.NODE_ENV !== "production" && function() { var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, l = t ? Symbol.for("react.profiler") : 60114, f = t ? Symbol.for("react.provider") : 60109, h = t ? Symbol.for("react.context") : 60110, m = t ? Symbol.for("react.async_mode") : 60111, p = t ? Symbol.for("react.concurrent_mode") : 60111, E = t ? Symbol.for("react.forward_ref") : 60112, P = t ? Symbol.for("react.suspense") : 60113, D = t ? Symbol.for("react.suspense_list") : 60120, j = t ? Symbol.for("react.memo") : 60115, A = t ? Symbol.for("react.lazy") : 60116, B = t ? Symbol.for("react.block") : 60121, Q = t ? Symbol.for("react.fundamental") : 60117, z = t ? Symbol.for("react.responder") : 60118, I = t ? Symbol.for("react.scope") : 60119; function k(d) { return typeof d == "string" || typeof d == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. d === i || d === p || d === l || d === a || d === P || d === D || typeof d == "object" && d !== null && (d.$$typeof === A || d.$$typeof === j || d.$$typeof === f || d.$$typeof === h || d.$$typeof === E || d.$$typeof === Q || d.$$typeof === z || d.$$typeof === I || d.$$typeof === B); } function w(d) { if (typeof d == "object" && d !== null) { var Ee = d.$$typeof; switch (Ee) { case e: var ue = d.type; switch (ue) { case m: case p: case i: case l: case a: case P: return ue; default: var ae = ue && ue.$$typeof; switch (ae) { case h: case E: case A: case j: case f: return ae; default: return Ee; } } case n: return Ee; } } } var c = m, L = p, he = h, Re = f, we = e, Ve = E, Ye = i, Oe = A, J = j, ee = n, oe = l, _e = a, Ae = P, ve = !1; function ke(d) { return ve || (ve = !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.")), pe(d) || w(d) === m; } function pe(d) { return w(d) === p; } function Me(d) { return w(d) === h; } function Fe(d) { return w(d) === f; } function je(d) { return typeof d == "object" && d !== null && d.$$typeof === e; } function Be(d) { return w(d) === E; } function We(d) { return w(d) === i; } function ye(d) { return w(d) === A; } function ge(d) { return w(d) === j; } function le(d) { return w(d) === n; } function be(d) { return w(d) === l; } function ce(d) { return w(d) === a; } function Ue(d) { return w(d) === P; } S.AsyncMode = c, S.ConcurrentMode = L, S.ContextConsumer = he, S.ContextProvider = Re, S.Element = we, S.ForwardRef = Ve, S.Fragment = Ye, S.Lazy = Oe, S.Memo = J, S.Portal = ee, S.Profiler = oe, S.StrictMode = _e, S.Suspense = Ae, S.isAsyncMode = ke, S.isConcurrentMode = pe, S.isContextConsumer = Me, S.isContextProvider = Fe, S.isElement = je, S.isForwardRef = Be, S.isFragment = We, S.isLazy = ye, S.isMemo = ge, S.isPortal = le, S.isProfiler = be, S.isStrictMode = ce, S.isSuspense = Ue, S.isValidElementType = k, S.typeOf = w; }()), S; } var Mt; function In() { return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? De.exports = Sn() : De.exports = Cn()), De.exports; } var Ze, Ft; function Pn() { if (Ft) return Ze; Ft = 1; var t = In(), e = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, n = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, i = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, a = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, l = {}; l[t.ForwardRef] = i, l[t.Memo] = a; function f(A) { return t.isMemo(A) ? a : l[A.$$typeof] || e; } var h = Object.defineProperty, m = Object.getOwnPropertyNames, p = Object.getOwnPropertySymbols, E = Object.getOwnPropertyDescriptor, P = Object.getPrototypeOf, D = Object.prototype; function j(A, B, Q) { if (typeof B != "string") { if (D) { var z = P(B); z && z !== D && j(A, z, Q); } var I = m(B); p && (I = I.concat(p(B))); for (var k = f(A), w = f(B), c = 0; c < I.length; ++c) { var L = I[c]; if (!n[L] && !(Q && Q[L]) && !(w && w[L]) && !(k && k[L])) { var he = E(B, L); try { h(A, L, he); } catch { } } } } return A; } return Ze = j, Ze; } Pn(); var Rn = !0; function wn(t, e, n) { var i = ""; return n.split(" ").forEach(function(a) { t[a] !== void 0 ? e.push(t[a] + ";") : a && (i += a + " "); }), i; } var Ht = function(e, n, i) { var a = e.key + "-" + n.name; // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (i === !1 || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser Rn === !1) && e.registered[a] === void 0 && (e.registered[a] = n.styles); }, On = function(e, n, i) { Ht(e, n, i); var a = e.key + "-" + n.name; if (e.inserted[n.name] === void 0) { var l = n; do e.insert(n === l ? "." + a : "", l, e.sheet, !0), l = l.next; while (l !== void 0); } }; function _n(t) { for (var e = 0, n, i = 0, a = t.length; a >= 4; ++i, a -= 4) n = t.charCodeAt(i) & 255 | (t.charCodeAt(++i) & 255) << 8 | (t.charCodeAt(++i) & 255) << 16 | (t.charCodeAt(++i) & 255) << 24, n = /* Math.imul(k, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */ n >>> 24, e = /* Math.imul(k, m): */ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16); switch (a) { case 3: e ^= (t.charCodeAt(i + 2) & 255) << 16; case 2: e ^= (t.charCodeAt(i + 1) & 255) << 8; case 1: e ^= t.charCodeAt(i) & 255, e = /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16); } return e ^= e >>> 13, e = /* Math.imul(h, m): */ (e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36); } var An = { animationIterationCount: 1, aspectRatio: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, scale: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; function kn(t) { var e = /* @__PURE__ */ Object.create(null); return function(n) { return e[n] === void 0 && (e[n] = t(n)), e[n]; }; } var Mn = /[A-Z]|^ms/g, Fn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Gt = function(e) { return e.charCodeAt(1) === 45; }, jt = function(e) { return e != null && typeof e != "boolean"; }, Qe = /* @__PURE__ */ kn(function(t) { return Gt(t) ? t : t.replace(Mn, "-$&").toLowerCase(); }), Nt = function(e, n) { switch (e) { case "animation": case "animationName": if (typeof n == "string") return n.replace(Fn, function(i, a, l) { return X = { name: a, styles: l, next: X }, a; }); } return An[e] !== 1 && !Gt(e) && typeof n == "number" && n !== 0 ? n + "px" : n; }; function Pe(t, e, n) { if (n == null) return ""; var i = n; if (i.__emotion_styles !== void 0) return i; switch (typeof n) { case "boolean": return ""; case "object": { var a = n; if (a.anim === 1) return X = { name: a.name, styles: a.styles, next: X }, a.name; var l = n; if (l.styles !== void 0) { var f = l.next; if (f !== void 0) for (; f !== void 0; ) X = { name: f.name, styles: f.styles, next: X }, f = f.next; var h = l.styles + ";"; return h; } return jn(t, e, n); } case "function": { if (t !== void 0) { var m = X, p = n(t); return X = m, Pe(t, e, p); } break; } } var E = n; return E; } function jn(t, e, n) { var i = ""; if (Array.isArray(n)) for (var a = 0; a < n.length; a++) i += Pe(t, e, n[a]) + ";"; else for (var l in n) { var f = n[l]; if (typeof f != "object") { var h = f; jt(h) && (i += Qe(l) + ":" + Nt(l, h) + ";"); } else if (Array.isArray(f) && typeof f[0] == "string" && e == null) for (var m = 0; m < f.length; m++) jt(f[m]) && (i += Qe(l) + ":" + Nt(l, f[m]) + ";"); else { var p = Pe(t, e, f); switch (l) { case "animation": case "animationName": { i += Qe(l) + ":" + p + ";"; break; } default: i += l + "{" + p + "}"; } } } return i; } var $t = /label:\s*([^\s;{]+)\s*(;|$)/g, X; function Nn(t, e, n) { if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0) return t[0]; var i = !0, a = ""; X = void 0; var l = t[0]; if (l == null || l.raw === void 0) i = !1, a += Pe(n, e, l); else { var f = l; a += f[0]; } for (var h = 1; h < t.length; h++) if (a += Pe(n, e, t[h]), i) { var m = l; a += m[h]; } $t.lastIndex = 0; for (var p = "", E; (E = $t.exec(a)) !== null; ) p += "-" + E[1]; var P = _n(a) + p; return { name: P, styles: a, next: X }; } var $n = function(e) { return e(); }, Dn = te.useInsertionEffect ? te.useInsertionEffect : !1, zn = Dn || $n, Jt = /* @__PURE__ */ te.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement < "u" ? /* @__PURE__ */ _r({ key: "css" }) : null ); Jt.Provider; var Ln = function(e) { return /* @__PURE__ */ Rr(function(n, i) { var a = st(Jt); return e(n, a, i); }); }, Vn = /* @__PURE__ */ te.createContext({}), ze = {}.hasOwnProperty, it = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Kt = function(e, n) { var i = {}; for (var a in n) ze.call(n, a) && (i[a] = n[a]); return i[it] = e, i; }, Yn = function(e) { var n = e.cache, i = e.serialized, a = e.isStringTag; return Ht(n, i, a), zn(function() { return On(n, i, a); }), null; }, Bn = /* @__PURE__ */ Ln(function(t, e, n) { var i = t.css; typeof i == "string" && e.registered[i] !== void 0 && (i = e.registered[i]); var a = t[it], l = [i], f = ""; typeof t.className == "string" ? f = wn(e.registered, l, t.className) : t.className != null && (f = t.className + " "); var h = Nn(l, void 0, te.useContext(Vn)); f += e.key + "-" + h.name; var m = {}; for (var p in t) ze.call(t, p) && p !== "css" && p !== it && (m[p] = t[p]); return m.className = f, n && (m.ref = n), /* @__PURE__ */ te.createElement(te.Fragment, null, /* @__PURE__ */ te.createElement(Yn, { cache: e, serialized: h, isStringTag: typeof a == "string" }), /* @__PURE__ */ te.createElement(a, m)); }), Xt = Bn, Le = Ie.Fragment, o = function(e, n, i) { return ze.call(n, "css") ? Ie.jsx(Xt, Kt(e, n), i) : Ie.jsx(e, n, i); }, F = function(e, n, i) { return ze.call(n, "css") ? Ie.jsxs(Xt, Kt(e, n), i) : Ie.jsxs(e, n, i); }, R = /* @__PURE__ */ ((t) => (t.Off = "Off", t.All = "All", t.One = "One", t))(R || {}); const Zt = 80, Wn = Y( ({ playerStore: t, playQueueStore: e }) => { const n = ie(), i = $( (f) => { const h = Number(f.currentTarget.value) / 100; t.setPercent(h); }, [t] ), a = $( (f) => { f.button === 0 && t.setSeeking(!0); }, [t] ), l = $( async (f) => { if (f.button === 0) { const h = Number(f.currentTarget.value) / 100; t.setSeeking(!1); const m = await n.getDuration(); m !== void 0 && await n.setCurrentTime(m * h); } }, [t, n] ); return /* @__PURE__ */ o( Vt, { min: 0, max: 100, step: 1e-7, value: t.percent * 100, onChange: i, onMouseDown: a, onMouseUp: l, fullWidth: !0, showRange: !0, css: { blockSize: 32 }, disabled: e.isEmpty } ); } ), Un = Z( ({ button: t, isOpen: e, closePopover: n }) => { const [i, a] = q("0"), l = ie(); wr(() => { e && l.getVolume().then((h) => { h !== void 0 && a(Math.floor(h * 100).toString()); }); }, [e, l]); const f = $( async (h) => { a(h.currentTarget.value), await l.setVolume(Number(h.currentTarget.value) / 100); }, [l] ); return /* @__PURE__ */ o( lt, { button: t, isOpen: e, closePopover: n, anchorPosition: "upRight", children: /* @__PURE__ */ o(tt, { children: /* @__PURE__ */ F( me, { responsive: !1, gutterSize: "s", justifyContent: "center", alignItems: "center", children: [ /* @__PURE__ */ o( K, { title: "Mute", "aria-label": "Mute", iconType: Ut, size: "s", iconSize: "l" } ), /* @__PURE__ */ o( Vt, { min: 0, max: 100, step: 1, value: i, onChange: f, css: { blockSize: 32 } } ) ] } ) }) } ); } ), qn = Z( ({ playQueueStore: t, closePopover: e }) => { const n = ie(), i = $(async () => { const p = await n.getCurrentTime(); p !== void 0 && await n.setCurrentTime(p - 10), e(); }, [n, e]), a = $(async () => { const p = await n.getCurrentTime(); p !== void 0 && await n.setCurrentTime(p + 30), e(); }, [n, e]), l = $( async (p) => { await n.setPlaybackRate(p), e(); }, [n, e] ), f = $(async () => { t.currentItem !== void 0 && await t.removeItems([ t.currentItem ]), e(); }, [t, e]), [h] = q(), m = zt( () => [ { id: 0, items: [ { name: "Speed", icon: /* @__PURE__ */ o(H, { type: cn, size: "m" }), panel: 1 }, { name: "Skip back 10 seconds", icon: /* @__PURE__ */ o(H, { type: un, size: "m" }), onClick: i, disabled: t.isEmpty }, { name: "Skip forward 30 seconds", icon: /* @__PURE__ */ o(H, { type: fn, size: "m" }), onClick: a, disabled: t.isEmpty }, { isSeparator: !0 }, { name: "Remove from play queue", icon: /* @__PURE__ */ o(H, { type: ct, size: "m" }), onClick: f, disabled: t.isEmpty } ] }, { id: 1, title: "Speed", items: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2].map( (p) => ({ name: p.toString(), onClick: () => l(p), icon: p === h ? "check" : "empty" }) ) } ], [ t, i, a, f, l, h ] ); return /* @__PURE__ */ o(Fr, { initialPanelId: 0, panels: m }); } ), Hn = Z( ({ playQueueStore: t, button: e, isOpen: n, closePopover: i }) => /* @__PURE__ */ o( lt, { button: e, isOpen: n, closePopover: i, panelPaddingSize: "none", anchorPosition: "upRight", children: /* @__PURE__ */ o( qn, { playQueueStore: t, closePopover: i } ) } ) ), Gn = { [R.Off]: tn, [R.All]: en, [R.One]: Qr }, Jn = Y( ({ playerStore: t, playQueueStore: e }) => { const n = ie(), i = $(async () => { if (e.hasPreviousItem) { const a = await n.getCurrentTime(); a === void 0 || a < 5 ? await e.previous() : await n.setCurrentTime(0); } else await n.setCurrentTime(0); }, [e, n]); return /* @__PURE__ */ F( me, { responsive: !1, gutterSize: "s", justifyContent: "center", alignItems: "center", children: [ /* @__PURE__ */ o( K, { title: `Shuffle: ${e.shuffle ? "On" : "Off"}`, "aria-label": `Shuffle: ${e.shuffle ? "On" : "Off"}`, iconType: e.shuffle ? rn : nn, size: "s", iconSize: "l", onClick: e.toggleShuffle, disabled: !0 } ), /* @__PURE__ */ o( K, { title: "Previous", "aria-label": "Previous", iconType: on, size: "s", iconSize: "l", onClick: i, disabled: e.isEmpty } ), t.playing ? /* @__PURE__ */ o( K, { title: "Pause", "aria-label": "Pause", iconType: an, size: "s", iconSize: "l", onClick: () => n.pause(), disabled: !e.canPlay } ) : /* @__PURE__ */ o( K, { title: "Play", "aria-label": "Play", iconType: sn, size: "s", iconSize: "l", onClick: () => n.play(), disabled: !e.canPlay } ), /* @__PURE__ */ o( K, { title: "Next", "aria-label": "Next", iconType: ln, size: "s", iconSize: "l", onClick: e.next, disabled: !e.hasNextItem } ), /* @__PURE__ */ o( K, { title: `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`, "aria-label": `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`, iconType: Gn[e.repeat], size: "s", iconSize: "l", onClick: e.toggleRepeat } ) ] } ); } ), Kn = Z(() => { const [t, e] = q(!1); return /* @__PURE__ */ o( Un, { button: /* @__PURE__ */ o( K, { title: "Volume", "aria-label": "Volume", iconType: Ut, size: "s", iconSize: "l", onClick: () => e(!t) } ), isOpen: t, closePopover: () => e(!1) } ); }), Xn = Z( ({ playQueueStore: t }) => { const [e, n] = q(!1); return /* @__PURE__ */ o( Hn, { playQueueStore: t, button: /* @__PURE__ */ o( K, { title: "More options", "aria-label": "More options", iconType: qt, size: "s", iconSize: "l", onClick: () => n(!e) } ), isOpen: e, closePopover: () => n(!1) } ); } ), Zn = Z( ({ playQueueStore: t }) => /* @__PURE__ */ F( me, { responsive: !1, gutterSize: "s", justifyContent: "flexEnd", alignItems: "center", children: [ /* @__PURE__ */ o(Kn, {}), /* @__PURE__ */ o(Xn, { playQueueStore: t }) ] } ) ), wi = Y( ({ playerStore: t, playQueueStore: e }) => /* @__PURE__ */ o(Mr, { paddingSize: "s", children: /* @__PURE__ */ F(me, { direction: "column", gutterSize: "none", children: [ /* @__PURE__ */ o(G, { children: /* @__PURE__ */ o( Wn, { playerStore: t, playQueueStore: e } ) }), /* @__PURE__ */ o(G, { children: /* @__PURE__ */ F(me, { responsive: !1, children: [ /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" } }), /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o( Jn, { playerStore: t, playQueueStore: e } ) }), /* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o( Zn, { playQueueStore: e } ) }) ] }) }) ] }) }) ), Qn = ({ onCancel: t, onSave: e }) => { const [n, i] = q(""), [a, l] = q(""), [f, h] = q(!1); return /* @__PURE__ */ F(Vr, { onClose: t, initialFocus: "[name=url]", children: [ /* @__PURE__ */ o(Nr, { children: /* @__PURE__ */ o(jr, { ch