@aigamo/hydrangean-diva 0.0.1-alpha.11 → 0.0.1-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/common/index.d.ts +2 -0
- package/dist/features/common/interfaces/index.d.ts +1 -0
- package/dist/features/{media-player → common}/stores/MobXObservableStateProvider.d.ts +1 -1
- package/dist/features/{media-player → common}/stores/ObservableStateProvider.d.ts +1 -1
- package/dist/features/common/stores/index.d.ts +2 -0
- package/dist/features/{media-player → media-player.play-queue}/components/AddVideoButton.d.ts +2 -2
- package/dist/features/media-player.play-queue/components/HydrangeanDiva.d.ts +9 -0
- package/dist/features/{media-player → media-player.play-queue}/components/PlayQueueTable.d.ts +2 -2
- package/dist/features/media-player.play-queue/components/index.d.ts +2 -0
- package/dist/features/media-player.play-queue/index.d.ts +2 -0
- package/dist/features/{media-player/stores → media-player.play-queue/interfaces}/IPlayQueueItemStore.d.ts +1 -6
- package/dist/features/media-player.play-queue/interfaces/IPlayQueueStore.d.ts +37 -0
- package/dist/features/media-player.play-queue/interfaces/PlayQueueDto.d.ts +11 -0
- package/dist/features/media-player.play-queue/interfaces/PlayQueueItemDto.d.ts +9 -0
- package/dist/features/media-player.play-queue/interfaces/index.d.ts +3 -0
- package/dist/features/{media-player → media-player.play-queue}/stores/PlayQueueItemStore.d.ts +5 -5
- package/dist/features/{media-player → media-player.play-queue}/stores/PlayQueueStore.d.ts +10 -9
- package/dist/features/media-player.player/components/BottomBar.d.ts +12 -0
- package/dist/features/{media-player → media-player.player}/components/MiniPlayer.d.ts +4 -4
- package/dist/features/{media-player → media-player.player}/components/PlayerStoreContext.d.ts +2 -2
- package/dist/features/{media-player → media-player.player}/components/index.d.ts +0 -2
- package/dist/features/{media-player → media-player.player}/index.d.ts +0 -1
- package/dist/features/media-player.player/interfaces/IPlayerStore.d.ts +11 -0
- package/dist/features/{media-player → media-player.player}/stores/PlayerStore.d.ts +3 -2
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +954 -948
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -1
- package/dist/features/media-player/components/BottomBar.d.ts +0 -12
- package/dist/features/media-player/components/HydrangeanDiva.d.ts +0 -11
- package/dist/features/media-player/stores/IPlayQueueStore.d.ts +0 -15
- package/dist/features/media-player/stores/PlayQueueLocalStorageState.d.ts +0 -10
- package/dist/features/media-player/stores/index.d.ts +0 -6
- /package/dist/features/{media-player/stores → common/interfaces}/IObservableStateProvider.d.ts +0 -0
- /package/dist/features/{media-player → common}/stores/getOrAddSchema.d.ts +0 -0
- /package/dist/features/{media-player → media-player.play-queue}/components/PlayQueueStoreContext.d.ts +0 -0
- /package/dist/features/{media-player/stores → media-player.play-queue/interfaces}/RepeatMode.d.ts +0 -0
- /package/dist/features/{media-player → media-player.play-queue}/pages/PlayQueuePage.d.ts +0 -0
- /package/dist/features/{media-player → media-player.player}/components/MediaPlayerLayout.d.ts +0 -0
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
var Ir = Object.defineProperty;
|
|
2
2
|
var Pr = (t, e, n) => e in t ? Ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var U = (t, e, n) => Pr(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import _r from "
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { makeObservable as Rr, action as y, computed as _, observable as te, reaction as wr } from "mobx";
|
|
5
|
+
import * as re from "react";
|
|
6
|
+
import zt, { forwardRef as Or, useContext as st, memo as Z, useState as q, useCallback as $, createContext as Lt, useEffect as _r, useLayoutEffect as Ar, useMemo as Vt } from "react";
|
|
7
|
+
import kr from "@emotion/cache";
|
|
8
|
+
import { EuiButton as ne, EuiModalHeaderTitle as Mr, EuiModalHeader as Fr, EuiForm as jr, EuiFormRow as tt, EuiFieldText as It, EuiModalBody as Nr, EuiModalFooter as $r, EuiButtonEmpty as Dr, EuiModal as zr, useEuiTheme as Yt, EuiCheckbox as Bt, EuiTableHeaderCellCheckbox as Lr, EuiTableHeader as Vr, EuiContextMenuItem as Yr, EuiContextMenuPanel as Br, EuiTableRowCell as rt, EuiTableRowCellCheckbox as Wr, EuiLink as Ur, EuiTableRow as qr, EuiTable as Hr, EuiButtonIcon as K, EuiPopover as lt, EuiIcon as H, EuiHorizontalRule as Pt, EuiTableHeaderCell as Xe, EuiCodeBlock as Gr, EuiFlyout as Jr, EuiFlexGroup as me, EuiFlexItem as G, EuiSpacer as Wt, EuiEmptyPrompt as Kr, EuiPageTemplate as nt, EuiRange as Ut, EuiContextMenu as Xr, EuiBottomBar as Zr } from "@elastic/eui";
|
|
9
|
+
import { AddRegular as ct, PlayRegular as Qr, DismissRegular as ut, MoreHorizontalFilled as qt, ArrowUploadRegular as en, ArrowDownloadRegular as tn, WindowDevToolsRegular as rn, DeleteRegular as nn, Speaker2Regular as Ht, TopSpeedRegular as on, SkipBack10Regular as an, SkipForward30Regular as sn, ArrowRepeat1Filled as ln, ArrowRepeatAllFilled as cn, ArrowRepeatAllOffFilled as un, ArrowShuffleFilled as fn, ArrowShuffleOffFilled as dn, PreviousFilled as mn, PauseFilled as hn, PlayFilled as vn, NextFilled as pn } from "@fluentui/react-icons";
|
|
10
10
|
import { observer as Y } from "mobx-react-lite";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { findVideoService as yn, useNostalgicDiva as ie, NostalgicDiva as gn } from "@aigamo/nostalgic-diva";
|
|
12
|
+
import { ReactSortable as bn } from "react-sortablejs";
|
|
13
13
|
import { pull as Rt } from "lodash-es";
|
|
14
|
-
import
|
|
14
|
+
import En from "ajv";
|
|
15
|
+
class Gt {
|
|
16
|
+
makeObservable(e, n) {
|
|
17
|
+
return Rr(e, n);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
class wi {
|
|
21
|
+
makeObservable(e, n) {
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
15
25
|
var $e = { exports: {} }, xe = {};
|
|
16
26
|
/**
|
|
17
27
|
* @license React
|
|
@@ -23,10 +33,10 @@ var $e = { exports: {} }, xe = {};
|
|
|
23
33
|
* LICENSE file in the root directory of this source tree.
|
|
24
34
|
*/
|
|
25
35
|
var wt;
|
|
26
|
-
function
|
|
36
|
+
function Tn() {
|
|
27
37
|
if (wt) return xe;
|
|
28
38
|
wt = 1;
|
|
29
|
-
var t =
|
|
39
|
+
var t = zt, 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 };
|
|
30
40
|
function f(h, m, p) {
|
|
31
41
|
var E, P = {}, D = null, j = null;
|
|
32
42
|
p !== void 0 && (D = "" + p), m.key !== void 0 && (D = "" + m.key), m.ref !== void 0 && (j = m.ref);
|
|
@@ -47,9 +57,9 @@ var Se = {};
|
|
|
47
57
|
* LICENSE file in the root directory of this source tree.
|
|
48
58
|
*/
|
|
49
59
|
var Ot;
|
|
50
|
-
function
|
|
60
|
+
function xn() {
|
|
51
61
|
return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
-
var t =
|
|
62
|
+
var t = zt, 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";
|
|
53
63
|
function Q(r) {
|
|
54
64
|
if (r === null || typeof r != "object")
|
|
55
65
|
return null;
|
|
@@ -637,10 +647,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
637
647
|
}()), Se;
|
|
638
648
|
}
|
|
639
649
|
var _t;
|
|
640
|
-
function
|
|
641
|
-
return _t || (_t = 1, process.env.NODE_ENV === "production" ? $e.exports =
|
|
650
|
+
function Sn() {
|
|
651
|
+
return _t || (_t = 1, process.env.NODE_ENV === "production" ? $e.exports = Tn() : $e.exports = xn()), $e.exports;
|
|
642
652
|
}
|
|
643
|
-
var Ie =
|
|
653
|
+
var Ie = Sn(), De = { exports: {} }, x = {};
|
|
644
654
|
/** @license React v16.13.1
|
|
645
655
|
* react-is.production.min.js
|
|
646
656
|
*
|
|
@@ -650,7 +660,7 @@ var Ie = xn(), De = { exports: {} }, x = {};
|
|
|
650
660
|
* LICENSE file in the root directory of this source tree.
|
|
651
661
|
*/
|
|
652
662
|
var At;
|
|
653
|
-
function
|
|
663
|
+
function Cn() {
|
|
654
664
|
if (At) return x;
|
|
655
665
|
At = 1;
|
|
656
666
|
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;
|
|
@@ -725,7 +735,7 @@ var S = {};
|
|
|
725
735
|
* LICENSE file in the root directory of this source tree.
|
|
726
736
|
*/
|
|
727
737
|
var kt;
|
|
728
|
-
function
|
|
738
|
+
function In() {
|
|
729
739
|
return kt || (kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
730
740
|
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;
|
|
731
741
|
function k(d) {
|
|
@@ -808,14 +818,14 @@ function Cn() {
|
|
|
808
818
|
}()), S;
|
|
809
819
|
}
|
|
810
820
|
var Mt;
|
|
811
|
-
function
|
|
812
|
-
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? De.exports =
|
|
821
|
+
function Pn() {
|
|
822
|
+
return Mt || (Mt = 1, process.env.NODE_ENV === "production" ? De.exports = Cn() : De.exports = In()), De.exports;
|
|
813
823
|
}
|
|
814
824
|
var Ze, Ft;
|
|
815
|
-
function
|
|
825
|
+
function Rn() {
|
|
816
826
|
if (Ft) return Ze;
|
|
817
827
|
Ft = 1;
|
|
818
|
-
var t =
|
|
828
|
+
var t = Pn(), e = {
|
|
819
829
|
childContextTypes: !0,
|
|
820
830
|
contextType: !0,
|
|
821
831
|
contextTypes: !0,
|
|
@@ -877,15 +887,15 @@ function Pn() {
|
|
|
877
887
|
}
|
|
878
888
|
return Ze = j, Ze;
|
|
879
889
|
}
|
|
880
|
-
|
|
881
|
-
var
|
|
882
|
-
function
|
|
890
|
+
Rn();
|
|
891
|
+
var wn = !0;
|
|
892
|
+
function On(t, e, n) {
|
|
883
893
|
var i = "";
|
|
884
894
|
return n.split(" ").forEach(function(a) {
|
|
885
895
|
t[a] !== void 0 ? e.push(t[a] + ";") : a && (i += a + " ");
|
|
886
896
|
}), i;
|
|
887
897
|
}
|
|
888
|
-
var
|
|
898
|
+
var Jt = function(e, n, i) {
|
|
889
899
|
var a = e.key + "-" + n.name;
|
|
890
900
|
// we only need to add the styles to the registered cache if the
|
|
891
901
|
// class name could be used further down
|
|
@@ -896,9 +906,9 @@ var Ht = function(e, n, i) {
|
|
|
896
906
|
// in node since emotion-server relies on whether a style is in
|
|
897
907
|
// the registered cache to know whether a style is global or not
|
|
898
908
|
// also, note that this check will be dead code eliminated in the browser
|
|
899
|
-
|
|
900
|
-
},
|
|
901
|
-
|
|
909
|
+
wn === !1) && e.registered[a] === void 0 && (e.registered[a] = n.styles);
|
|
910
|
+
}, _n = function(e, n, i) {
|
|
911
|
+
Jt(e, n, i);
|
|
902
912
|
var a = e.key + "-" + n.name;
|
|
903
913
|
if (e.inserted[n.name] === void 0) {
|
|
904
914
|
var l = n;
|
|
@@ -907,7 +917,7 @@ var Ht = function(e, n, i) {
|
|
|
907
917
|
while (l !== void 0);
|
|
908
918
|
}
|
|
909
919
|
};
|
|
910
|
-
function
|
|
920
|
+
function An(t) {
|
|
911
921
|
for (var e = 0, n, i = 0, a = t.length; a >= 4; ++i, a -= 4)
|
|
912
922
|
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): */
|
|
913
923
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
@@ -926,7 +936,7 @@ function _n(t) {
|
|
|
926
936
|
return e ^= e >>> 13, e = /* Math.imul(h, m): */
|
|
927
937
|
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
|
|
928
938
|
}
|
|
929
|
-
var
|
|
939
|
+
var kn = {
|
|
930
940
|
animationIterationCount: 1,
|
|
931
941
|
aspectRatio: 1,
|
|
932
942
|
borderImageOutset: 1,
|
|
@@ -976,24 +986,24 @@ var An = {
|
|
|
976
986
|
strokeOpacity: 1,
|
|
977
987
|
strokeWidth: 1
|
|
978
988
|
};
|
|
979
|
-
function
|
|
989
|
+
function Mn(t) {
|
|
980
990
|
var e = /* @__PURE__ */ Object.create(null);
|
|
981
991
|
return function(n) {
|
|
982
992
|
return e[n] === void 0 && (e[n] = t(n)), e[n];
|
|
983
993
|
};
|
|
984
994
|
}
|
|
985
|
-
var
|
|
995
|
+
var Fn = /[A-Z]|^ms/g, jn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Kt = function(e) {
|
|
986
996
|
return e.charCodeAt(1) === 45;
|
|
987
997
|
}, jt = function(e) {
|
|
988
998
|
return e != null && typeof e != "boolean";
|
|
989
|
-
}, Qe = /* @__PURE__ */
|
|
990
|
-
return
|
|
999
|
+
}, Qe = /* @__PURE__ */ Mn(function(t) {
|
|
1000
|
+
return Kt(t) ? t : t.replace(Fn, "-$&").toLowerCase();
|
|
991
1001
|
}), Nt = function(e, n) {
|
|
992
1002
|
switch (e) {
|
|
993
1003
|
case "animation":
|
|
994
1004
|
case "animationName":
|
|
995
1005
|
if (typeof n == "string")
|
|
996
|
-
return n.replace(
|
|
1006
|
+
return n.replace(jn, function(i, a, l) {
|
|
997
1007
|
return X = {
|
|
998
1008
|
name: a,
|
|
999
1009
|
styles: l,
|
|
@@ -1001,7 +1011,7 @@ var Mn = /[A-Z]|^ms/g, Fn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Gt = function(e) {
|
|
|
1001
1011
|
}, a;
|
|
1002
1012
|
});
|
|
1003
1013
|
}
|
|
1004
|
-
return
|
|
1014
|
+
return kn[e] !== 1 && !Kt(e) && typeof n == "number" && n !== 0 ? n + "px" : n;
|
|
1005
1015
|
};
|
|
1006
1016
|
function Pe(t, e, n) {
|
|
1007
1017
|
if (n == null)
|
|
@@ -1033,7 +1043,7 @@ function Pe(t, e, n) {
|
|
|
1033
1043
|
var h = l.styles + ";";
|
|
1034
1044
|
return h;
|
|
1035
1045
|
}
|
|
1036
|
-
return
|
|
1046
|
+
return Nn(t, e, n);
|
|
1037
1047
|
}
|
|
1038
1048
|
case "function": {
|
|
1039
1049
|
if (t !== void 0) {
|
|
@@ -1046,7 +1056,7 @@ function Pe(t, e, n) {
|
|
|
1046
1056
|
var E = n;
|
|
1047
1057
|
return E;
|
|
1048
1058
|
}
|
|
1049
|
-
function
|
|
1059
|
+
function Nn(t, e, n) {
|
|
1050
1060
|
var i = "";
|
|
1051
1061
|
if (Array.isArray(n))
|
|
1052
1062
|
for (var a = 0; a < n.length; a++)
|
|
@@ -1076,7 +1086,7 @@ function jn(t, e, n) {
|
|
|
1076
1086
|
return i;
|
|
1077
1087
|
}
|
|
1078
1088
|
var $t = /label:\s*([^\s;{]+)\s*(;|$)/g, X;
|
|
1079
|
-
function
|
|
1089
|
+
function $n(t, e, n) {
|
|
1080
1090
|
if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && t[0].styles !== void 0)
|
|
1081
1091
|
return t[0];
|
|
1082
1092
|
var i = !0, a = "";
|
|
@@ -1096,383 +1106,278 @@ function Nn(t, e, n) {
|
|
|
1096
1106
|
$t.lastIndex = 0;
|
|
1097
1107
|
for (var p = "", E; (E = $t.exec(a)) !== null; )
|
|
1098
1108
|
p += "-" + E[1];
|
|
1099
|
-
var P =
|
|
1109
|
+
var P = An(a) + p;
|
|
1100
1110
|
return {
|
|
1101
1111
|
name: P,
|
|
1102
1112
|
styles: a,
|
|
1103
1113
|
next: X
|
|
1104
1114
|
};
|
|
1105
1115
|
}
|
|
1106
|
-
var
|
|
1116
|
+
var Dn = function(e) {
|
|
1107
1117
|
return e();
|
|
1108
|
-
},
|
|
1118
|
+
}, zn = re.useInsertionEffect ? re.useInsertionEffect : !1, Ln = zn || Dn, Xt = /* @__PURE__ */ re.createContext(
|
|
1109
1119
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1110
1120
|
// because this module is primarily intended for the browser and node
|
|
1111
1121
|
// but it's also required in react native and similar environments sometimes
|
|
1112
1122
|
// and we could have a special build just for that
|
|
1113
1123
|
// but this is much easier and the native packages
|
|
1114
1124
|
// might use a different theme context in the future anyway
|
|
1115
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1125
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ kr({
|
|
1116
1126
|
key: "css"
|
|
1117
1127
|
}) : null
|
|
1118
1128
|
);
|
|
1119
|
-
|
|
1120
|
-
var
|
|
1121
|
-
return /* @__PURE__ */
|
|
1122
|
-
var a = st(
|
|
1129
|
+
Xt.Provider;
|
|
1130
|
+
var Vn = function(e) {
|
|
1131
|
+
return /* @__PURE__ */ Or(function(n, i) {
|
|
1132
|
+
var a = st(Xt);
|
|
1123
1133
|
return e(n, a, i);
|
|
1124
1134
|
});
|
|
1125
|
-
},
|
|
1135
|
+
}, Yn = /* @__PURE__ */ re.createContext({}), ze = {}.hasOwnProperty, it = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Zt = function(e, n) {
|
|
1126
1136
|
var i = {};
|
|
1127
1137
|
for (var a in n)
|
|
1128
1138
|
ze.call(n, a) && (i[a] = n[a]);
|
|
1129
1139
|
return i[it] = e, i;
|
|
1130
|
-
},
|
|
1140
|
+
}, Bn = function(e) {
|
|
1131
1141
|
var n = e.cache, i = e.serialized, a = e.isStringTag;
|
|
1132
|
-
return
|
|
1133
|
-
return
|
|
1142
|
+
return Jt(n, i, a), Ln(function() {
|
|
1143
|
+
return _n(n, i, a);
|
|
1134
1144
|
}), null;
|
|
1135
|
-
},
|
|
1145
|
+
}, Wn = /* @__PURE__ */ Vn(function(t, e, n) {
|
|
1136
1146
|
var i = t.css;
|
|
1137
1147
|
typeof i == "string" && e.registered[i] !== void 0 && (i = e.registered[i]);
|
|
1138
1148
|
var a = t[it], l = [i], f = "";
|
|
1139
|
-
typeof t.className == "string" ? f =
|
|
1140
|
-
var h =
|
|
1149
|
+
typeof t.className == "string" ? f = On(e.registered, l, t.className) : t.className != null && (f = t.className + " ");
|
|
1150
|
+
var h = $n(l, void 0, re.useContext(Yn));
|
|
1141
1151
|
f += e.key + "-" + h.name;
|
|
1142
1152
|
var m = {};
|
|
1143
1153
|
for (var p in t)
|
|
1144
1154
|
ze.call(t, p) && p !== "css" && p !== it && (m[p] = t[p]);
|
|
1145
|
-
return m.className = f, n && (m.ref = n), /* @__PURE__ */
|
|
1155
|
+
return m.className = f, n && (m.ref = n), /* @__PURE__ */ re.createElement(re.Fragment, null, /* @__PURE__ */ re.createElement(Bn, {
|
|
1146
1156
|
cache: e,
|
|
1147
1157
|
serialized: h,
|
|
1148
1158
|
isStringTag: typeof a == "string"
|
|
1149
|
-
}), /* @__PURE__ */
|
|
1150
|
-
}),
|
|
1151
|
-
return ze.call(n, "css") ? Ie.jsx(
|
|
1159
|
+
}), /* @__PURE__ */ re.createElement(a, m));
|
|
1160
|
+
}), Qt = Wn, Le = Ie.Fragment, o = function(e, n, i) {
|
|
1161
|
+
return ze.call(n, "css") ? Ie.jsx(Qt, Zt(e, n), i) : Ie.jsx(e, n, i);
|
|
1152
1162
|
}, F = function(e, n, i) {
|
|
1153
|
-
return ze.call(n, "css") ? Ie.jsxs(
|
|
1154
|
-
}
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1163
|
+
return ze.call(n, "css") ? Ie.jsxs(Qt, Zt(e, n), i) : Ie.jsxs(e, n, i);
|
|
1164
|
+
};
|
|
1165
|
+
const Un = ({
|
|
1166
|
+
onCancel: t,
|
|
1167
|
+
onSave: e
|
|
1168
|
+
}) => {
|
|
1169
|
+
const [n, i] = q(""), [a, l] = q(""), [f, h] = q(!1);
|
|
1170
|
+
return /* @__PURE__ */ F(zr, { onClose: t, initialFocus: "[name=url]", children: [
|
|
1171
|
+
/* @__PURE__ */ o(Fr, { children: /* @__PURE__ */ o(Mr, { children: "Add video" }) }),
|
|
1172
|
+
/* @__PURE__ */ o(Nr, { children: /* @__PURE__ */ F(jr, { component: "form", children: [
|
|
1173
|
+
/* @__PURE__ */ o(tt, { label: "URL", children: /* @__PURE__ */ o(
|
|
1174
|
+
It,
|
|
1175
|
+
{
|
|
1176
|
+
name: "url",
|
|
1177
|
+
value: n,
|
|
1178
|
+
onChange: (m) => i(m.target.value)
|
|
1179
|
+
}
|
|
1180
|
+
) }),
|
|
1181
|
+
/* @__PURE__ */ o(tt, { label: "Title", children: /* @__PURE__ */ o(
|
|
1182
|
+
It,
|
|
1183
|
+
{
|
|
1184
|
+
name: "title",
|
|
1185
|
+
value: a,
|
|
1186
|
+
onChange: (m) => l(m.target.value)
|
|
1187
|
+
}
|
|
1188
|
+
) })
|
|
1189
|
+
] }) }),
|
|
1190
|
+
/* @__PURE__ */ F($r, { children: [
|
|
1191
|
+
/* @__PURE__ */ o(Dr, { onClick: t, children: "Cancel" }),
|
|
1192
|
+
/* @__PURE__ */ o(
|
|
1193
|
+
ne,
|
|
1194
|
+
{
|
|
1195
|
+
type: "submit",
|
|
1196
|
+
onClick: async () => {
|
|
1197
|
+
try {
|
|
1198
|
+
h(!0), await e({ url: n, title: a });
|
|
1199
|
+
} finally {
|
|
1200
|
+
h(!1);
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
fill: !0,
|
|
1204
|
+
disabled: n.trim().length === 0,
|
|
1205
|
+
isLoading: f,
|
|
1206
|
+
children: "Save"
|
|
1207
|
+
}
|
|
1208
|
+
)
|
|
1209
|
+
] })
|
|
1210
|
+
] });
|
|
1211
|
+
};
|
|
1212
|
+
function qn(t) {
|
|
1213
|
+
return t !== null && typeof t == "object" && "title" in t && typeof t.title == "string";
|
|
1214
|
+
}
|
|
1215
|
+
const Dt = Z(
|
|
1216
|
+
({ playQueueStore: t }) => {
|
|
1217
|
+
const [e, n] = q(!1), i = $(
|
|
1218
|
+
async (a) => {
|
|
1219
|
+
const l = yn(a.url);
|
|
1220
|
+
if (l !== void 0) {
|
|
1221
|
+
const f = l.extractVideoId(a.url);
|
|
1222
|
+
if (f !== void 0) {
|
|
1223
|
+
const m = await (await fetch(
|
|
1224
|
+
`https://noembed.com/embed?url=${encodeURIComponent(
|
|
1225
|
+
a.url
|
|
1226
|
+
)}`
|
|
1227
|
+
)).json();
|
|
1228
|
+
await t.addItems([
|
|
1229
|
+
t.createItem({
|
|
1230
|
+
url: a.url,
|
|
1231
|
+
type: l.type,
|
|
1232
|
+
videoId: f,
|
|
1233
|
+
title: a.title || (qn(m) ? m.title : f)
|
|
1234
|
+
})
|
|
1235
|
+
]);
|
|
1236
|
+
}
|
|
1175
1237
|
}
|
|
1238
|
+
n(!1);
|
|
1176
1239
|
},
|
|
1177
|
-
[t
|
|
1178
|
-
);
|
|
1179
|
-
return /* @__PURE__ */ o(
|
|
1180
|
-
Vt,
|
|
1181
|
-
{
|
|
1182
|
-
min: 0,
|
|
1183
|
-
max: 100,
|
|
1184
|
-
step: 1e-7,
|
|
1185
|
-
value: t.percent * 100,
|
|
1186
|
-
onChange: i,
|
|
1187
|
-
onMouseDown: a,
|
|
1188
|
-
onMouseUp: l,
|
|
1189
|
-
fullWidth: !0,
|
|
1190
|
-
showRange: !0,
|
|
1191
|
-
css: { blockSize: 32 },
|
|
1192
|
-
disabled: e.isEmpty
|
|
1193
|
-
}
|
|
1240
|
+
[t]
|
|
1194
1241
|
);
|
|
1242
|
+
return /* @__PURE__ */ F(Le, { children: [
|
|
1243
|
+
/* @__PURE__ */ o(
|
|
1244
|
+
ne,
|
|
1245
|
+
{
|
|
1246
|
+
onClick: () => n(!0),
|
|
1247
|
+
iconType: ct,
|
|
1248
|
+
color: "primary",
|
|
1249
|
+
children: "Add video"
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
e && /* @__PURE__ */ o(
|
|
1253
|
+
Un,
|
|
1254
|
+
{
|
|
1255
|
+
onCancel: () => n(!1),
|
|
1256
|
+
onSave: i
|
|
1257
|
+
}
|
|
1258
|
+
)
|
|
1259
|
+
] });
|
|
1195
1260
|
}
|
|
1196
|
-
),
|
|
1197
|
-
({
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
h !== void 0 && a(Math.floor(h * 100).toString());
|
|
1202
|
-
});
|
|
1203
|
-
}, [e, l]);
|
|
1204
|
-
const f = $(
|
|
1205
|
-
async (h) => {
|
|
1206
|
-
a(h.currentTarget.value), await l.setVolume(Number(h.currentTarget.value) / 100);
|
|
1207
|
-
},
|
|
1208
|
-
[l]
|
|
1209
|
-
);
|
|
1210
|
-
return /* @__PURE__ */ o(
|
|
1211
|
-
lt,
|
|
1261
|
+
), Hn = Y(
|
|
1262
|
+
({ playQueueStore: t }) => {
|
|
1263
|
+
const { euiTheme: e } = Yt();
|
|
1264
|
+
return /* @__PURE__ */ F(
|
|
1265
|
+
Vr,
|
|
1212
1266
|
{
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
),
|
|
1235
|
-
/* @__PURE__ */ o(
|
|
1236
|
-
Vt,
|
|
1237
|
-
{
|
|
1238
|
-
min: 0,
|
|
1239
|
-
max: 100,
|
|
1240
|
-
step: 1,
|
|
1241
|
-
value: i,
|
|
1242
|
-
onChange: f,
|
|
1243
|
-
css: { blockSize: 32 }
|
|
1244
|
-
}
|
|
1245
|
-
)
|
|
1246
|
-
]
|
|
1247
|
-
}
|
|
1248
|
-
) })
|
|
1267
|
+
style: {
|
|
1268
|
+
position: "sticky",
|
|
1269
|
+
top: 112,
|
|
1270
|
+
zIndex: 998,
|
|
1271
|
+
background: e.colors.backgroundBasePlain
|
|
1272
|
+
},
|
|
1273
|
+
children: [
|
|
1274
|
+
/* @__PURE__ */ o(Lr, { children: /* @__PURE__ */ o(
|
|
1275
|
+
Bt,
|
|
1276
|
+
{
|
|
1277
|
+
id: "",
|
|
1278
|
+
checked: t.allItemsSelected,
|
|
1279
|
+
onChange: (n) => {
|
|
1280
|
+
t.allItemsSelected = n.target.checked;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
) }),
|
|
1284
|
+
/* @__PURE__ */ o(Xe, { width: 24 }),
|
|
1285
|
+
/* @__PURE__ */ o(Xe, { children: "Title" }),
|
|
1286
|
+
/* @__PURE__ */ o(Xe, {})
|
|
1287
|
+
]
|
|
1249
1288
|
}
|
|
1250
1289
|
);
|
|
1251
1290
|
}
|
|
1252
|
-
),
|
|
1291
|
+
), Gn = Z(
|
|
1253
1292
|
({
|
|
1254
|
-
|
|
1293
|
+
item: t,
|
|
1255
1294
|
closePopover: e
|
|
1256
1295
|
}) => {
|
|
1257
|
-
const n =
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1296
|
+
const n = Z(
|
|
1297
|
+
({
|
|
1298
|
+
onClick: i,
|
|
1299
|
+
...a
|
|
1300
|
+
}) => {
|
|
1301
|
+
const l = $(
|
|
1302
|
+
(f) => {
|
|
1303
|
+
e(), i == null || i(f);
|
|
1304
|
+
},
|
|
1305
|
+
[i]
|
|
1306
|
+
);
|
|
1307
|
+
return /* @__PURE__ */ o(Yr, { ...a, onClick: l });
|
|
1308
|
+
}
|
|
1309
|
+
);
|
|
1310
|
+
return /* @__PURE__ */ F(Br, { children: [
|
|
1311
|
+
/* @__PURE__ */ o(
|
|
1312
|
+
n,
|
|
1274
1313
|
{
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
{
|
|
1283
|
-
name: "Skip back 10 seconds",
|
|
1284
|
-
icon: /* @__PURE__ */ o(H, { type: un, size: "m" }),
|
|
1285
|
-
onClick: i,
|
|
1286
|
-
disabled: t.isEmpty
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
name: "Skip forward 30 seconds",
|
|
1290
|
-
icon: /* @__PURE__ */ o(H, { type: fn, size: "m" }),
|
|
1291
|
-
onClick: a,
|
|
1292
|
-
disabled: t.isEmpty
|
|
1293
|
-
},
|
|
1294
|
-
{
|
|
1295
|
-
isSeparator: !0
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
name: "Remove from play queue",
|
|
1299
|
-
icon: /* @__PURE__ */ o(H, { type: ct, size: "m" }),
|
|
1300
|
-
onClick: f,
|
|
1301
|
-
disabled: t.isEmpty
|
|
1302
|
-
}
|
|
1303
|
-
]
|
|
1304
|
-
},
|
|
1314
|
+
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1315
|
+
onClick: t.playFirst,
|
|
1316
|
+
children: "Play first"
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
/* @__PURE__ */ o(
|
|
1320
|
+
n,
|
|
1305
1321
|
{
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
(p) => ({
|
|
1310
|
-
name: p.toString(),
|
|
1311
|
-
onClick: () => l(p),
|
|
1312
|
-
icon: p === h ? "check" : "empty"
|
|
1313
|
-
})
|
|
1314
|
-
)
|
|
1322
|
+
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1323
|
+
onClick: t.playNext,
|
|
1324
|
+
children: "Play next"
|
|
1315
1325
|
}
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
i,
|
|
1320
|
-
a,
|
|
1321
|
-
f,
|
|
1322
|
-
l,
|
|
1323
|
-
h
|
|
1324
|
-
]
|
|
1325
|
-
);
|
|
1326
|
-
return /* @__PURE__ */ o(Fr, { initialPanelId: 0, panels: m });
|
|
1327
|
-
}
|
|
1328
|
-
), Hn = Z(
|
|
1329
|
-
({
|
|
1330
|
-
playQueueStore: t,
|
|
1331
|
-
button: e,
|
|
1332
|
-
isOpen: n,
|
|
1333
|
-
closePopover: i
|
|
1334
|
-
}) => /* @__PURE__ */ o(
|
|
1335
|
-
lt,
|
|
1336
|
-
{
|
|
1337
|
-
button: e,
|
|
1338
|
-
isOpen: n,
|
|
1339
|
-
closePopover: i,
|
|
1340
|
-
panelPaddingSize: "none",
|
|
1341
|
-
anchorPosition: "upRight",
|
|
1342
|
-
children: /* @__PURE__ */ o(
|
|
1343
|
-
qn,
|
|
1326
|
+
),
|
|
1327
|
+
/* @__PURE__ */ o(
|
|
1328
|
+
n,
|
|
1344
1329
|
{
|
|
1345
|
-
|
|
1346
|
-
|
|
1330
|
+
icon: /* @__PURE__ */ o(H, { type: ct }),
|
|
1331
|
+
onClick: t.addToPlayQueue,
|
|
1332
|
+
children: "Add to play queue"
|
|
1347
1333
|
}
|
|
1348
|
-
)
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
[R.Off]: tn,
|
|
1353
|
-
[R.All]: en,
|
|
1354
|
-
[R.One]: Qr
|
|
1355
|
-
}, Jn = Y(
|
|
1356
|
-
({
|
|
1357
|
-
playerStore: t,
|
|
1358
|
-
playQueueStore: e
|
|
1359
|
-
}) => {
|
|
1360
|
-
const n = ie(), i = $(async () => {
|
|
1361
|
-
if (e.hasPreviousItem) {
|
|
1362
|
-
const a = await n.getCurrentTime();
|
|
1363
|
-
a === void 0 || a < 5 ? await e.previous() : await n.setCurrentTime(0);
|
|
1364
|
-
} else
|
|
1365
|
-
await n.setCurrentTime(0);
|
|
1366
|
-
}, [e, n]);
|
|
1367
|
-
return /* @__PURE__ */ F(
|
|
1368
|
-
me,
|
|
1369
|
-
{
|
|
1370
|
-
responsive: !1,
|
|
1371
|
-
gutterSize: "s",
|
|
1372
|
-
justifyContent: "center",
|
|
1373
|
-
alignItems: "center",
|
|
1374
|
-
children: [
|
|
1375
|
-
/* @__PURE__ */ o(
|
|
1376
|
-
K,
|
|
1377
|
-
{
|
|
1378
|
-
title: `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
1379
|
-
"aria-label": `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
1380
|
-
iconType: e.shuffle ? rn : nn,
|
|
1381
|
-
size: "s",
|
|
1382
|
-
iconSize: "l",
|
|
1383
|
-
onClick: e.toggleShuffle,
|
|
1384
|
-
disabled: !0
|
|
1385
|
-
}
|
|
1386
|
-
),
|
|
1387
|
-
/* @__PURE__ */ o(
|
|
1388
|
-
K,
|
|
1389
|
-
{
|
|
1390
|
-
title: "Previous",
|
|
1391
|
-
"aria-label": "Previous",
|
|
1392
|
-
iconType: on,
|
|
1393
|
-
size: "s",
|
|
1394
|
-
iconSize: "l",
|
|
1395
|
-
onClick: i,
|
|
1396
|
-
disabled: e.isEmpty
|
|
1397
|
-
}
|
|
1398
|
-
),
|
|
1399
|
-
t.playing ? /* @__PURE__ */ o(
|
|
1400
|
-
K,
|
|
1401
|
-
{
|
|
1402
|
-
title: "Pause",
|
|
1403
|
-
"aria-label": "Pause",
|
|
1404
|
-
iconType: an,
|
|
1405
|
-
size: "s",
|
|
1406
|
-
iconSize: "l",
|
|
1407
|
-
onClick: () => n.pause(),
|
|
1408
|
-
disabled: !e.canPlay
|
|
1409
|
-
}
|
|
1410
|
-
) : /* @__PURE__ */ o(
|
|
1411
|
-
K,
|
|
1412
|
-
{
|
|
1413
|
-
title: "Play",
|
|
1414
|
-
"aria-label": "Play",
|
|
1415
|
-
iconType: sn,
|
|
1416
|
-
size: "s",
|
|
1417
|
-
iconSize: "l",
|
|
1418
|
-
onClick: () => n.play(),
|
|
1419
|
-
disabled: !e.canPlay
|
|
1420
|
-
}
|
|
1421
|
-
),
|
|
1422
|
-
/* @__PURE__ */ o(
|
|
1423
|
-
K,
|
|
1424
|
-
{
|
|
1425
|
-
title: "Next",
|
|
1426
|
-
"aria-label": "Next",
|
|
1427
|
-
iconType: ln,
|
|
1428
|
-
size: "s",
|
|
1429
|
-
iconSize: "l",
|
|
1430
|
-
onClick: e.next,
|
|
1431
|
-
disabled: !e.hasNextItem
|
|
1432
|
-
}
|
|
1433
|
-
),
|
|
1434
|
-
/* @__PURE__ */ o(
|
|
1435
|
-
K,
|
|
1436
|
-
{
|
|
1437
|
-
title: `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`,
|
|
1438
|
-
"aria-label": `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`,
|
|
1439
|
-
iconType: Gn[e.repeat],
|
|
1440
|
-
size: "s",
|
|
1441
|
-
iconSize: "l",
|
|
1442
|
-
onClick: e.toggleRepeat
|
|
1443
|
-
}
|
|
1444
|
-
)
|
|
1445
|
-
]
|
|
1446
|
-
}
|
|
1447
|
-
);
|
|
1448
|
-
}
|
|
1449
|
-
), Kn = Z(() => {
|
|
1450
|
-
const [t, e] = q(!1);
|
|
1451
|
-
return /* @__PURE__ */ o(
|
|
1452
|
-
Un,
|
|
1453
|
-
{
|
|
1454
|
-
button: /* @__PURE__ */ o(
|
|
1455
|
-
K,
|
|
1334
|
+
),
|
|
1335
|
+
/* @__PURE__ */ o(Pt, { margin: "none" }),
|
|
1336
|
+
/* @__PURE__ */ o(
|
|
1337
|
+
n,
|
|
1456
1338
|
{
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
iconSize: "l",
|
|
1462
|
-
onClick: () => e(!t)
|
|
1339
|
+
icon: /* @__PURE__ */ o(H, { type: en }),
|
|
1340
|
+
onClick: t.moveToTop,
|
|
1341
|
+
disabled: !t.canMoveToTop,
|
|
1342
|
+
children: "Move to the top"
|
|
1463
1343
|
}
|
|
1464
1344
|
),
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1345
|
+
/* @__PURE__ */ o(
|
|
1346
|
+
n,
|
|
1347
|
+
{
|
|
1348
|
+
icon: /* @__PURE__ */ o(H, { type: tn }),
|
|
1349
|
+
onClick: t.moveToBottom,
|
|
1350
|
+
disabled: !t.canMoveToBottom,
|
|
1351
|
+
children: "Move to the bottom"
|
|
1352
|
+
}
|
|
1353
|
+
),
|
|
1354
|
+
/* @__PURE__ */ o(Pt, { margin: "none" }),
|
|
1355
|
+
/* @__PURE__ */ o(
|
|
1356
|
+
n,
|
|
1357
|
+
{
|
|
1358
|
+
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1359
|
+
onClick: t.removeToTop,
|
|
1360
|
+
disabled: !t.canRemoveToTop,
|
|
1361
|
+
children: "Remove to the top"
|
|
1362
|
+
}
|
|
1363
|
+
),
|
|
1364
|
+
/* @__PURE__ */ o(
|
|
1365
|
+
n,
|
|
1366
|
+
{
|
|
1367
|
+
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1368
|
+
onClick: t.removeOthers,
|
|
1369
|
+
disabled: !t.canRemoveOthers,
|
|
1370
|
+
children: "Remove others"
|
|
1371
|
+
}
|
|
1372
|
+
)
|
|
1373
|
+
] });
|
|
1374
|
+
}
|
|
1375
|
+
), Jn = Z(
|
|
1376
|
+
({ item: t }) => {
|
|
1377
|
+
const [e, n] = q(!1), i = $(() => n(!e), [e]), a = $(() => n(!1), []);
|
|
1472
1378
|
return /* @__PURE__ */ o(
|
|
1473
|
-
|
|
1379
|
+
lt,
|
|
1474
1380
|
{
|
|
1475
|
-
playQueueStore: t,
|
|
1476
1381
|
button: /* @__PURE__ */ o(
|
|
1477
1382
|
K,
|
|
1478
1383
|
{
|
|
@@ -1480,324 +1385,52 @@ const Zt = 80, Wn = Y(
|
|
|
1480
1385
|
"aria-label": "More options",
|
|
1481
1386
|
iconType: qt,
|
|
1482
1387
|
size: "s",
|
|
1483
|
-
|
|
1484
|
-
onClick:
|
|
1388
|
+
color: "text",
|
|
1389
|
+
onClick: i
|
|
1485
1390
|
}
|
|
1486
1391
|
),
|
|
1487
1392
|
isOpen: e,
|
|
1488
|
-
closePopover:
|
|
1393
|
+
closePopover: a,
|
|
1394
|
+
panelPaddingSize: "none",
|
|
1395
|
+
anchorPosition: "leftCenter",
|
|
1396
|
+
children: /* @__PURE__ */ o(
|
|
1397
|
+
Gn,
|
|
1398
|
+
{
|
|
1399
|
+
item: t,
|
|
1400
|
+
closePopover: a
|
|
1401
|
+
}
|
|
1402
|
+
)
|
|
1489
1403
|
}
|
|
1490
1404
|
);
|
|
1491
1405
|
}
|
|
1492
|
-
),
|
|
1493
|
-
({
|
|
1494
|
-
|
|
1495
|
-
{
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
justifyContent: "flexEnd",
|
|
1499
|
-
alignItems: "center",
|
|
1500
|
-
children: [
|
|
1501
|
-
/* @__PURE__ */ o(Kn, {}),
|
|
1502
|
-
/* @__PURE__ */ o(Xn, { playQueueStore: t })
|
|
1503
|
-
]
|
|
1504
|
-
}
|
|
1505
|
-
)
|
|
1506
|
-
), wi = Y(
|
|
1507
|
-
({ playerStore: t, playQueueStore: e }) => /* @__PURE__ */ o(Mr, { paddingSize: "s", children: /* @__PURE__ */ F(me, { direction: "column", gutterSize: "none", children: [
|
|
1508
|
-
/* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(
|
|
1509
|
-
Wn,
|
|
1510
|
-
{
|
|
1511
|
-
playerStore: t,
|
|
1512
|
-
playQueueStore: e
|
|
1513
|
-
}
|
|
1514
|
-
) }),
|
|
1515
|
-
/* @__PURE__ */ o(G, { children: /* @__PURE__ */ F(me, { responsive: !1, children: [
|
|
1516
|
-
/* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" } }),
|
|
1517
|
-
/* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(
|
|
1518
|
-
Jn,
|
|
1406
|
+
), Kn = Y(
|
|
1407
|
+
({ item: t }) => {
|
|
1408
|
+
const e = ie();
|
|
1409
|
+
return /* @__PURE__ */ F(rt, { textOnly: !1, hasActions: !0, align: "right", children: [
|
|
1410
|
+
/* @__PURE__ */ o(
|
|
1411
|
+
ne,
|
|
1519
1412
|
{
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
{
|
|
1527
|
-
playQueueStore: e
|
|
1528
|
-
}
|
|
1529
|
-
) })
|
|
1530
|
-
] }) })
|
|
1531
|
-
] }) })
|
|
1532
|
-
), Qn = ({
|
|
1533
|
-
onCancel: t,
|
|
1534
|
-
onSave: e
|
|
1535
|
-
}) => {
|
|
1536
|
-
const [n, i] = q(""), [a, l] = q(""), [f, h] = q(!1);
|
|
1537
|
-
return /* @__PURE__ */ F(Vr, { onClose: t, initialFocus: "[name=url]", children: [
|
|
1538
|
-
/* @__PURE__ */ o(Nr, { children: /* @__PURE__ */ o(jr, { children: "Add video" }) }),
|
|
1539
|
-
/* @__PURE__ */ o(Dr, { children: /* @__PURE__ */ F($r, { component: "form", children: [
|
|
1540
|
-
/* @__PURE__ */ o(tt, { label: "URL", children: /* @__PURE__ */ o(
|
|
1541
|
-
It,
|
|
1542
|
-
{
|
|
1543
|
-
name: "url",
|
|
1544
|
-
value: n,
|
|
1545
|
-
onChange: (m) => i(m.target.value)
|
|
1546
|
-
}
|
|
1547
|
-
) }),
|
|
1548
|
-
/* @__PURE__ */ o(tt, { label: "Title", children: /* @__PURE__ */ o(
|
|
1549
|
-
It,
|
|
1550
|
-
{
|
|
1551
|
-
name: "title",
|
|
1552
|
-
value: a,
|
|
1553
|
-
onChange: (m) => l(m.target.value)
|
|
1554
|
-
}
|
|
1555
|
-
) })
|
|
1556
|
-
] }) }),
|
|
1557
|
-
/* @__PURE__ */ F(zr, { children: [
|
|
1558
|
-
/* @__PURE__ */ o(Lr, { onClick: t, children: "Cancel" }),
|
|
1559
|
-
/* @__PURE__ */ o(
|
|
1560
|
-
ne,
|
|
1561
|
-
{
|
|
1562
|
-
type: "submit",
|
|
1563
|
-
onClick: async () => {
|
|
1564
|
-
try {
|
|
1565
|
-
h(!0), await e({ url: n, title: a });
|
|
1566
|
-
} finally {
|
|
1567
|
-
h(!1);
|
|
1568
|
-
}
|
|
1569
|
-
},
|
|
1570
|
-
fill: !0,
|
|
1571
|
-
disabled: n.trim().length === 0,
|
|
1572
|
-
isLoading: f,
|
|
1573
|
-
children: "Save"
|
|
1574
|
-
}
|
|
1575
|
-
)
|
|
1576
|
-
] })
|
|
1577
|
-
] });
|
|
1578
|
-
};
|
|
1579
|
-
function ei(t) {
|
|
1580
|
-
return t !== null && typeof t == "object" && "title" in t && typeof t.title == "string";
|
|
1581
|
-
}
|
|
1582
|
-
const Qt = Z(
|
|
1583
|
-
({ playQueueStore: t }) => {
|
|
1584
|
-
const [e, n] = q(!1), i = $(
|
|
1585
|
-
async (a) => {
|
|
1586
|
-
const l = Ar(a.url);
|
|
1587
|
-
if (l !== void 0) {
|
|
1588
|
-
const f = l.extractVideoId(a.url);
|
|
1589
|
-
if (f !== void 0) {
|
|
1590
|
-
const m = await (await fetch(
|
|
1591
|
-
`https://noembed.com/embed?url=${encodeURIComponent(
|
|
1592
|
-
a.url
|
|
1593
|
-
)}`
|
|
1594
|
-
)).json();
|
|
1595
|
-
await t.addItems([
|
|
1596
|
-
t.createItem({
|
|
1597
|
-
url: a.url,
|
|
1598
|
-
type: l.type,
|
|
1599
|
-
videoId: f,
|
|
1600
|
-
title: a.title || (ei(m) ? m.title : f)
|
|
1601
|
-
})
|
|
1602
|
-
]);
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
n(!1);
|
|
1606
|
-
},
|
|
1607
|
-
[t]
|
|
1608
|
-
);
|
|
1609
|
-
return /* @__PURE__ */ F(Le, { children: [
|
|
1610
|
-
/* @__PURE__ */ o(
|
|
1611
|
-
ne,
|
|
1612
|
-
{
|
|
1613
|
-
onClick: () => n(!0),
|
|
1614
|
-
iconType: ut,
|
|
1615
|
-
color: "primary",
|
|
1616
|
-
children: "Add video"
|
|
1617
|
-
}
|
|
1618
|
-
),
|
|
1619
|
-
e && /* @__PURE__ */ o(
|
|
1620
|
-
Qn,
|
|
1621
|
-
{
|
|
1622
|
-
onCancel: () => n(!1),
|
|
1623
|
-
onSave: i
|
|
1624
|
-
}
|
|
1625
|
-
)
|
|
1626
|
-
] });
|
|
1627
|
-
}
|
|
1628
|
-
), ti = Y(
|
|
1629
|
-
({ playQueueStore: t }) => {
|
|
1630
|
-
const { euiTheme: e } = Yt();
|
|
1631
|
-
return /* @__PURE__ */ F(
|
|
1632
|
-
Br,
|
|
1633
|
-
{
|
|
1634
|
-
style: {
|
|
1635
|
-
position: "sticky",
|
|
1636
|
-
top: 112,
|
|
1637
|
-
zIndex: 998,
|
|
1638
|
-
background: e.colors.backgroundBasePlain
|
|
1639
|
-
},
|
|
1640
|
-
children: [
|
|
1641
|
-
/* @__PURE__ */ o(Yr, { children: /* @__PURE__ */ o(
|
|
1642
|
-
Bt,
|
|
1643
|
-
{
|
|
1644
|
-
id: "",
|
|
1645
|
-
checked: t.allItemsSelected,
|
|
1646
|
-
onChange: (n) => {
|
|
1647
|
-
t.allItemsSelected = n.target.checked;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
) }),
|
|
1651
|
-
/* @__PURE__ */ o(Xe, { width: 24 }),
|
|
1652
|
-
/* @__PURE__ */ o(Xe, { children: "Title" }),
|
|
1653
|
-
/* @__PURE__ */ o(Xe, {})
|
|
1654
|
-
]
|
|
1655
|
-
}
|
|
1656
|
-
);
|
|
1657
|
-
}
|
|
1658
|
-
), ri = Z(
|
|
1659
|
-
({
|
|
1660
|
-
item: t,
|
|
1661
|
-
closePopover: e
|
|
1662
|
-
}) => {
|
|
1663
|
-
const n = Z(
|
|
1664
|
-
({
|
|
1665
|
-
onClick: i,
|
|
1666
|
-
...a
|
|
1667
|
-
}) => {
|
|
1668
|
-
const l = $(
|
|
1669
|
-
(f) => {
|
|
1670
|
-
e(), i == null || i(f);
|
|
1671
|
-
},
|
|
1672
|
-
[i]
|
|
1673
|
-
);
|
|
1674
|
-
return /* @__PURE__ */ o(Wr, { ...a, onClick: l });
|
|
1675
|
-
}
|
|
1676
|
-
);
|
|
1677
|
-
return /* @__PURE__ */ F(Ur, { children: [
|
|
1678
|
-
/* @__PURE__ */ o(
|
|
1679
|
-
n,
|
|
1680
|
-
{
|
|
1681
|
-
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1682
|
-
onClick: t.playFirst,
|
|
1683
|
-
children: "Play first"
|
|
1684
|
-
}
|
|
1685
|
-
),
|
|
1686
|
-
/* @__PURE__ */ o(
|
|
1687
|
-
n,
|
|
1688
|
-
{
|
|
1689
|
-
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1690
|
-
onClick: t.playNext,
|
|
1691
|
-
children: "Play next"
|
|
1692
|
-
}
|
|
1693
|
-
),
|
|
1694
|
-
/* @__PURE__ */ o(
|
|
1695
|
-
n,
|
|
1696
|
-
{
|
|
1697
|
-
icon: /* @__PURE__ */ o(H, { type: ut }),
|
|
1698
|
-
onClick: t.addToPlayQueue,
|
|
1699
|
-
children: "Add to play queue"
|
|
1700
|
-
}
|
|
1701
|
-
),
|
|
1702
|
-
/* @__PURE__ */ o(Pt, { margin: "none" }),
|
|
1703
|
-
/* @__PURE__ */ o(
|
|
1704
|
-
n,
|
|
1705
|
-
{
|
|
1706
|
-
icon: /* @__PURE__ */ o(H, { type: dn }),
|
|
1707
|
-
onClick: t.moveToTop,
|
|
1708
|
-
disabled: !t.canMoveToTop,
|
|
1709
|
-
children: "Move to the top"
|
|
1710
|
-
}
|
|
1711
|
-
),
|
|
1712
|
-
/* @__PURE__ */ o(
|
|
1713
|
-
n,
|
|
1714
|
-
{
|
|
1715
|
-
icon: /* @__PURE__ */ o(H, { type: mn }),
|
|
1716
|
-
onClick: t.moveToBottom,
|
|
1717
|
-
disabled: !t.canMoveToBottom,
|
|
1718
|
-
children: "Move to the bottom"
|
|
1719
|
-
}
|
|
1720
|
-
),
|
|
1721
|
-
/* @__PURE__ */ o(Pt, { margin: "none" }),
|
|
1722
|
-
/* @__PURE__ */ o(
|
|
1723
|
-
n,
|
|
1724
|
-
{
|
|
1725
|
-
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1726
|
-
onClick: t.removeToTop,
|
|
1727
|
-
disabled: !t.canRemoveToTop,
|
|
1728
|
-
children: "Remove to the top"
|
|
1729
|
-
}
|
|
1730
|
-
),
|
|
1731
|
-
/* @__PURE__ */ o(
|
|
1732
|
-
n,
|
|
1733
|
-
{
|
|
1734
|
-
icon: /* @__PURE__ */ o(H, { type: "" }),
|
|
1735
|
-
onClick: t.removeOthers,
|
|
1736
|
-
disabled: !t.canRemoveOthers,
|
|
1737
|
-
children: "Remove others"
|
|
1738
|
-
}
|
|
1739
|
-
)
|
|
1740
|
-
] });
|
|
1741
|
-
}
|
|
1742
|
-
), ni = Z(
|
|
1743
|
-
({ item: t }) => {
|
|
1744
|
-
const [e, n] = q(!1), i = $(() => n(!e), [e]), a = $(() => n(!1), []);
|
|
1745
|
-
return /* @__PURE__ */ o(
|
|
1746
|
-
lt,
|
|
1747
|
-
{
|
|
1748
|
-
button: /* @__PURE__ */ o(
|
|
1749
|
-
K,
|
|
1750
|
-
{
|
|
1751
|
-
title: "More options",
|
|
1752
|
-
"aria-label": "More options",
|
|
1753
|
-
iconType: qt,
|
|
1754
|
-
size: "s",
|
|
1755
|
-
color: "text",
|
|
1756
|
-
onClick: i
|
|
1757
|
-
}
|
|
1758
|
-
),
|
|
1759
|
-
isOpen: e,
|
|
1760
|
-
closePopover: a,
|
|
1761
|
-
panelPaddingSize: "none",
|
|
1762
|
-
anchorPosition: "leftCenter",
|
|
1763
|
-
children: /* @__PURE__ */ o(
|
|
1764
|
-
ri,
|
|
1765
|
-
{
|
|
1766
|
-
item: t,
|
|
1767
|
-
closePopover: a
|
|
1768
|
-
}
|
|
1769
|
-
)
|
|
1770
|
-
}
|
|
1771
|
-
);
|
|
1772
|
-
}
|
|
1773
|
-
), ii = Y(
|
|
1774
|
-
({ item: t }) => {
|
|
1775
|
-
const e = ie();
|
|
1776
|
-
return /* @__PURE__ */ F(rt, { textOnly: !1, hasActions: !0, align: "right", children: [
|
|
1777
|
-
/* @__PURE__ */ o(
|
|
1778
|
-
ne,
|
|
1779
|
-
{
|
|
1780
|
-
iconType: hn,
|
|
1781
|
-
size: "s",
|
|
1782
|
-
onClick: async () => {
|
|
1783
|
-
t.isCurrent ? await e.setCurrentTime(0) : t.play();
|
|
1784
|
-
},
|
|
1785
|
-
children: "Play"
|
|
1413
|
+
iconType: Qr,
|
|
1414
|
+
size: "s",
|
|
1415
|
+
onClick: async () => {
|
|
1416
|
+
t.isCurrent ? await e.setCurrentTime(0) : t.play();
|
|
1417
|
+
},
|
|
1418
|
+
children: "Play"
|
|
1786
1419
|
}
|
|
1787
1420
|
),
|
|
1788
1421
|
/* @__PURE__ */ o(
|
|
1789
1422
|
ne,
|
|
1790
1423
|
{
|
|
1791
|
-
iconType:
|
|
1424
|
+
iconType: ut,
|
|
1792
1425
|
size: "s",
|
|
1793
1426
|
onClick: t.remove,
|
|
1794
1427
|
children: "Remove"
|
|
1795
1428
|
}
|
|
1796
1429
|
),
|
|
1797
|
-
/* @__PURE__ */ o(
|
|
1430
|
+
/* @__PURE__ */ o(Jn, { item: t })
|
|
1798
1431
|
] });
|
|
1799
1432
|
}
|
|
1800
|
-
),
|
|
1433
|
+
), Xn = {
|
|
1801
1434
|
Audio: "",
|
|
1802
1435
|
Dailymotion: "https://www.dailymotion.com/favicon.ico",
|
|
1803
1436
|
Niconico: "https://www.nicovideo.jp/favicon.ico",
|
|
@@ -1805,11 +1438,11 @@ const Qt = Z(
|
|
|
1805
1438
|
Twitch: "https://www.twitch.tv/favicon.ico",
|
|
1806
1439
|
Vimeo: "https://vimeo.com/favicon.ico",
|
|
1807
1440
|
YouTube: "https://www.youtube.com/favicon.ico"
|
|
1808
|
-
},
|
|
1441
|
+
}, Zn = Y(
|
|
1809
1442
|
({ item: t }) => {
|
|
1810
1443
|
const e = ie();
|
|
1811
|
-
return /* @__PURE__ */ F(
|
|
1812
|
-
/* @__PURE__ */ o(
|
|
1444
|
+
return /* @__PURE__ */ F(qr, { isSelected: t.isCurrent, children: [
|
|
1445
|
+
/* @__PURE__ */ o(Wr, { children: /* @__PURE__ */ o(
|
|
1813
1446
|
Bt,
|
|
1814
1447
|
{
|
|
1815
1448
|
id: t.id.toString(),
|
|
@@ -1820,14 +1453,14 @@ const Qt = Z(
|
|
|
1820
1453
|
/* @__PURE__ */ o(rt, { textOnly: !1, children: /* @__PURE__ */ o(
|
|
1821
1454
|
"img",
|
|
1822
1455
|
{
|
|
1823
|
-
src:
|
|
1456
|
+
src: Xn[t.type],
|
|
1824
1457
|
width: 16,
|
|
1825
1458
|
height: 16,
|
|
1826
1459
|
alt: t.type
|
|
1827
1460
|
}
|
|
1828
1461
|
) }),
|
|
1829
1462
|
/* @__PURE__ */ o(rt, { children: /* @__PURE__ */ o(
|
|
1830
|
-
|
|
1463
|
+
Ur,
|
|
1831
1464
|
{
|
|
1832
1465
|
href: t.url,
|
|
1833
1466
|
target: "_blank",
|
|
@@ -1836,36 +1469,37 @@ const Qt = Z(
|
|
|
1836
1469
|
children: t.title
|
|
1837
1470
|
}
|
|
1838
1471
|
) }),
|
|
1839
|
-
/* @__PURE__ */ o(
|
|
1472
|
+
/* @__PURE__ */ o(Kn, { item: t })
|
|
1840
1473
|
] }, t.id);
|
|
1841
1474
|
}
|
|
1842
|
-
),
|
|
1475
|
+
), Qn = Y(
|
|
1843
1476
|
({ playQueueStore: t }) => /* @__PURE__ */ o(
|
|
1844
|
-
|
|
1477
|
+
bn,
|
|
1845
1478
|
{
|
|
1846
1479
|
tag: "tbody",
|
|
1847
1480
|
list: t.items,
|
|
1848
1481
|
setList: (e) => t.setItems(e),
|
|
1849
|
-
children: t.items.map((e) => /* @__PURE__ */ o(
|
|
1482
|
+
children: t.items.map((e) => /* @__PURE__ */ o(Zn, { item: e }, e.id))
|
|
1850
1483
|
}
|
|
1851
1484
|
)
|
|
1852
|
-
),
|
|
1853
|
-
({ playQueueStore: t }) => /* @__PURE__ */ F(
|
|
1854
|
-
/* @__PURE__ */ o(
|
|
1855
|
-
/* @__PURE__ */ o(
|
|
1485
|
+
), ei = Y(
|
|
1486
|
+
({ playQueueStore: t }) => /* @__PURE__ */ F(Hr, { children: [
|
|
1487
|
+
/* @__PURE__ */ o(Hn, { playQueueStore: t }),
|
|
1488
|
+
/* @__PURE__ */ o(Qn, { playQueueStore: t })
|
|
1856
1489
|
] })
|
|
1857
|
-
)
|
|
1490
|
+
);
|
|
1491
|
+
Y(
|
|
1858
1492
|
({ playQueueStore: t }) => {
|
|
1859
1493
|
const [e, n] = q(!1);
|
|
1860
1494
|
return /* @__PURE__ */ F(Le, { children: [
|
|
1861
1495
|
e && /* @__PURE__ */ o(
|
|
1862
|
-
|
|
1496
|
+
Jr,
|
|
1863
1497
|
{
|
|
1864
1498
|
type: "push",
|
|
1865
1499
|
size: "s",
|
|
1866
1500
|
onClose: () => n(!1),
|
|
1867
1501
|
children: /* @__PURE__ */ o("div", { style: { blockSize: "100%" }, children: /* @__PURE__ */ o(
|
|
1868
|
-
|
|
1502
|
+
Gr,
|
|
1869
1503
|
{
|
|
1870
1504
|
language: "json",
|
|
1871
1505
|
overflowHeight: "100%",
|
|
@@ -1880,12 +1514,20 @@ const Qt = Z(
|
|
|
1880
1514
|
) })
|
|
1881
1515
|
}
|
|
1882
1516
|
),
|
|
1883
|
-
/* @__PURE__ */ o(
|
|
1517
|
+
/* @__PURE__ */ o(
|
|
1518
|
+
ne,
|
|
1519
|
+
{
|
|
1520
|
+
onClick: () => n((i) => !i),
|
|
1521
|
+
iconType: rn,
|
|
1522
|
+
children: "Developer tools"
|
|
1523
|
+
}
|
|
1524
|
+
)
|
|
1884
1525
|
] });
|
|
1885
1526
|
}
|
|
1886
|
-
)
|
|
1887
|
-
|
|
1888
|
-
|
|
1527
|
+
);
|
|
1528
|
+
const ti = Y(
|
|
1529
|
+
({ playQueueStore: t }) => {
|
|
1530
|
+
const { euiTheme: e } = Yt();
|
|
1889
1531
|
return /* @__PURE__ */ F(Le, { children: [
|
|
1890
1532
|
/* @__PURE__ */ F(
|
|
1891
1533
|
me,
|
|
@@ -1896,46 +1538,49 @@ const Qt = Z(
|
|
|
1896
1538
|
position: "sticky",
|
|
1897
1539
|
top: 48,
|
|
1898
1540
|
zIndex: 998,
|
|
1899
|
-
background:
|
|
1541
|
+
background: e.colors.backgroundBasePlain
|
|
1900
1542
|
},
|
|
1901
1543
|
children: [
|
|
1902
1544
|
/* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
|
|
1903
1545
|
ne,
|
|
1904
1546
|
{
|
|
1905
|
-
disabled:
|
|
1906
|
-
onClick:
|
|
1547
|
+
disabled: t.isEmpty || t.selectedItems.length === 0,
|
|
1548
|
+
onClick: t.playSelectedItemsNext,
|
|
1907
1549
|
children: "Play next"
|
|
1908
1550
|
}
|
|
1909
1551
|
) }),
|
|
1910
1552
|
/* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
|
|
1911
1553
|
ne,
|
|
1912
1554
|
{
|
|
1913
|
-
iconType:
|
|
1914
|
-
onClick:
|
|
1915
|
-
disabled:
|
|
1555
|
+
iconType: ct,
|
|
1556
|
+
onClick: t.addSelectedItems,
|
|
1557
|
+
disabled: t.isEmpty || t.selectedItems.length === 0,
|
|
1916
1558
|
children: "Add to play queue"
|
|
1917
1559
|
}
|
|
1918
1560
|
) }),
|
|
1919
1561
|
/* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
|
|
1920
1562
|
ne,
|
|
1921
1563
|
{
|
|
1922
|
-
iconType:
|
|
1923
|
-
onClick:
|
|
1924
|
-
disabled:
|
|
1564
|
+
iconType: ut,
|
|
1565
|
+
onClick: t.removeSelectedItems,
|
|
1566
|
+
disabled: t.isEmpty || t.selectedItems.length === 0,
|
|
1925
1567
|
children: "Remove"
|
|
1926
1568
|
}
|
|
1927
1569
|
) }),
|
|
1928
1570
|
/* @__PURE__ */ o(G, { grow: !1, children: /* @__PURE__ */ o(
|
|
1929
1571
|
ne,
|
|
1930
1572
|
{
|
|
1931
|
-
iconType:
|
|
1932
|
-
onClick:
|
|
1933
|
-
disabled:
|
|
1573
|
+
iconType: nn,
|
|
1574
|
+
onClick: t.clear,
|
|
1575
|
+
disabled: t.isEmpty,
|
|
1934
1576
|
children: "Clear"
|
|
1935
1577
|
}
|
|
1936
1578
|
) }),
|
|
1937
1579
|
/* @__PURE__ */ o(G, { grow: !0 }),
|
|
1938
|
-
/* @__PURE__ */
|
|
1580
|
+
/* @__PURE__ */ F(G, { grow: !1, children: [
|
|
1581
|
+
!1,
|
|
1582
|
+
/* @__PURE__ */ o(Dt, { playQueueStore: t })
|
|
1583
|
+
] })
|
|
1939
1584
|
]
|
|
1940
1585
|
}
|
|
1941
1586
|
),
|
|
@@ -1947,22 +1592,22 @@ const Qt = Z(
|
|
|
1947
1592
|
position: "sticky",
|
|
1948
1593
|
top: 88,
|
|
1949
1594
|
zIndex: 998,
|
|
1950
|
-
background:
|
|
1595
|
+
background: e.colors.backgroundBasePlain
|
|
1951
1596
|
}
|
|
1952
1597
|
}
|
|
1953
1598
|
),
|
|
1954
|
-
|
|
1955
|
-
|
|
1599
|
+
t.isEmpty ? /* @__PURE__ */ o(
|
|
1600
|
+
Kr,
|
|
1956
1601
|
{
|
|
1957
1602
|
title: /* @__PURE__ */ o("h2", { children: "We couldn't find any videos" }),
|
|
1958
1603
|
body: /* @__PURE__ */ o("p", { children: "Your video library doesn't contain any video content." }),
|
|
1959
|
-
actions: /* @__PURE__ */ o(
|
|
1604
|
+
actions: /* @__PURE__ */ o(Dt, { playQueueStore: t })
|
|
1960
1605
|
}
|
|
1961
|
-
) : /* @__PURE__ */ o(
|
|
1606
|
+
) : /* @__PURE__ */ o(ei, { playQueueStore: t })
|
|
1962
1607
|
] });
|
|
1963
1608
|
}
|
|
1964
1609
|
), Oi = Y(
|
|
1965
|
-
({
|
|
1610
|
+
({ playQueueStore: t }) => /* @__PURE__ */ F(Le, { children: [
|
|
1966
1611
|
/* @__PURE__ */ o(
|
|
1967
1612
|
nt.Header,
|
|
1968
1613
|
{
|
|
@@ -1970,87 +1615,72 @@ const Qt = Z(
|
|
|
1970
1615
|
rightSideItems: []
|
|
1971
1616
|
}
|
|
1972
1617
|
),
|
|
1973
|
-
/* @__PURE__ */ o(nt.Section, { children: /* @__PURE__ */ o(
|
|
1974
|
-
ui,
|
|
1975
|
-
{
|
|
1976
|
-
playerStore: t,
|
|
1977
|
-
playQueueStore: e
|
|
1978
|
-
}
|
|
1979
|
-
) })
|
|
1618
|
+
/* @__PURE__ */ o(nt.Section, { children: /* @__PURE__ */ o(ti, { playQueueStore: t }) })
|
|
1980
1619
|
] })
|
|
1981
|
-
),
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
await n.setCurrentTime(0);
|
|
1992
|
-
break;
|
|
1993
|
-
case R.Off:
|
|
1994
|
-
case R.All:
|
|
1995
|
-
if (e.isLastItem)
|
|
1996
|
-
switch (e.repeat) {
|
|
1997
|
-
case R.Off:
|
|
1998
|
-
t.onEnded();
|
|
1999
|
-
break;
|
|
2000
|
-
case R.All:
|
|
2001
|
-
e.hasMultipleItems ? await e.goToFirst() : await n.setCurrentTime(0);
|
|
2002
|
-
break;
|
|
2003
|
-
}
|
|
2004
|
-
else
|
|
2005
|
-
await e.next();
|
|
2006
|
-
break;
|
|
2007
|
-
}
|
|
2008
|
-
}, [e, t, n]), l = zt(
|
|
2009
|
-
() => ({
|
|
2010
|
-
onLoaded: i,
|
|
2011
|
-
onPlay: t.onPlay,
|
|
2012
|
-
onPause: t.onPause,
|
|
2013
|
-
onEnded: a,
|
|
2014
|
-
onTimeUpdate: t.onTimeUpdate
|
|
2015
|
-
}),
|
|
2016
|
-
[t, i, a]
|
|
2017
|
-
);
|
|
2018
|
-
return /* @__PURE__ */ o(
|
|
2019
|
-
"div",
|
|
2020
|
-
{
|
|
2021
|
-
css: {
|
|
2022
|
-
position: "fixed",
|
|
2023
|
-
right: 0,
|
|
2024
|
-
bottom: Zt,
|
|
2025
|
-
width: ot.width,
|
|
2026
|
-
height: ot.height,
|
|
2027
|
-
zIndex: 998,
|
|
2028
|
-
backgroundColor: "rgb(39, 39, 39)",
|
|
2029
|
-
display: "flex",
|
|
2030
|
-
flexDirection: "column"
|
|
2031
|
-
},
|
|
2032
|
-
children: /* @__PURE__ */ o("div", { css: { flexGrow: 1, backgroundColor: "black" }, children: e.currentItem && /* @__PURE__ */ o(
|
|
2033
|
-
kr,
|
|
2034
|
-
{
|
|
2035
|
-
src: e.currentItem.url,
|
|
2036
|
-
options: l
|
|
2037
|
-
}
|
|
2038
|
-
) })
|
|
2039
|
-
}
|
|
1620
|
+
), et = new En({
|
|
1621
|
+
coerceTypes: !0
|
|
1622
|
+
});
|
|
1623
|
+
function ri(t, e) {
|
|
1624
|
+
let n;
|
|
1625
|
+
if (n = et.getSchema(e), n === void 0 && (et.addSchema(t, e), n = et.getSchema(e)), n === void 0 || n.schema !== t)
|
|
1626
|
+
throw new Error(
|
|
1627
|
+
`Invalid schema. Expected: '${JSON.stringify(
|
|
1628
|
+
t
|
|
1629
|
+
)}', but got '${JSON.stringify(n == null ? void 0 : n.schema)}'.`
|
|
2040
1630
|
);
|
|
2041
|
-
|
|
2042
|
-
);
|
|
2043
|
-
class er {
|
|
2044
|
-
makeObservable(e, n) {
|
|
2045
|
-
return yn(e, n);
|
|
2046
|
-
}
|
|
1631
|
+
return n;
|
|
2047
1632
|
}
|
|
2048
|
-
const
|
|
1633
|
+
const ni = {
|
|
1634
|
+
type: "object",
|
|
1635
|
+
properties: {
|
|
1636
|
+
url: {
|
|
1637
|
+
type: "string"
|
|
1638
|
+
},
|
|
1639
|
+
type: {
|
|
1640
|
+
type: "string"
|
|
1641
|
+
},
|
|
1642
|
+
videoId: {
|
|
1643
|
+
type: "string"
|
|
1644
|
+
},
|
|
1645
|
+
title: {
|
|
1646
|
+
type: "string"
|
|
1647
|
+
}
|
|
1648
|
+
},
|
|
1649
|
+
required: ["url", "type", "videoId", "title"]
|
|
1650
|
+
};
|
|
1651
|
+
var R = /* @__PURE__ */ ((t) => (t.Off = "Off", t.All = "All", t.One = "One", t))(R || {});
|
|
1652
|
+
const ii = {
|
|
1653
|
+
type: "object",
|
|
1654
|
+
properties: {
|
|
1655
|
+
version: {
|
|
1656
|
+
type: "string",
|
|
1657
|
+
nullable: !0
|
|
1658
|
+
},
|
|
1659
|
+
repeat: {
|
|
1660
|
+
type: "string",
|
|
1661
|
+
enum: Object.values(R),
|
|
1662
|
+
nullable: !0
|
|
1663
|
+
},
|
|
1664
|
+
shuffle: {
|
|
1665
|
+
type: "boolean",
|
|
1666
|
+
nullable: !0
|
|
1667
|
+
},
|
|
1668
|
+
items: {
|
|
1669
|
+
type: "array",
|
|
1670
|
+
nullable: !0,
|
|
1671
|
+
items: ni
|
|
1672
|
+
},
|
|
1673
|
+
currentIndex: {
|
|
1674
|
+
type: "integer",
|
|
1675
|
+
nullable: !0
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
}, Ce = class Ce {
|
|
2049
1679
|
constructor(e, n, i) {
|
|
2050
1680
|
U(this, "id");
|
|
2051
1681
|
U(this, "isSelected", !1);
|
|
2052
1682
|
this.observableStateProvider = e, this.playQueueStore = n, this.dto = i, this.id = Ce.nextId++, e.makeObservable(this, {
|
|
2053
|
-
isSelected:
|
|
1683
|
+
isSelected: te,
|
|
2054
1684
|
isCurrent: _,
|
|
2055
1685
|
index: _,
|
|
2056
1686
|
isFirst: _,
|
|
@@ -2156,68 +1786,8 @@ const Ce = class Ce {
|
|
|
2156
1786
|
}
|
|
2157
1787
|
};
|
|
2158
1788
|
U(Ce, "nextId", 1);
|
|
2159
|
-
let
|
|
2160
|
-
|
|
2161
|
-
coerceTypes: !0
|
|
2162
|
-
});
|
|
2163
|
-
function fi(t, e) {
|
|
2164
|
-
let n;
|
|
2165
|
-
if (n = et.getSchema(e), n === void 0 && (et.addSchema(t, e), n = et.getSchema(e)), n === void 0 || n.schema !== t)
|
|
2166
|
-
throw new Error(
|
|
2167
|
-
`Invalid schema. Expected: '${JSON.stringify(
|
|
2168
|
-
t
|
|
2169
|
-
)}', but got '${JSON.stringify(n == null ? void 0 : n.schema)}'.`
|
|
2170
|
-
);
|
|
2171
|
-
return n;
|
|
2172
|
-
}
|
|
2173
|
-
const di = {
|
|
2174
|
-
type: "object",
|
|
2175
|
-
properties: {
|
|
2176
|
-
version: {
|
|
2177
|
-
type: "string",
|
|
2178
|
-
nullable: !0
|
|
2179
|
-
},
|
|
2180
|
-
repeat: {
|
|
2181
|
-
type: "string",
|
|
2182
|
-
enum: Object.values(R),
|
|
2183
|
-
nullable: !0
|
|
2184
|
-
},
|
|
2185
|
-
shuffle: {
|
|
2186
|
-
type: "boolean",
|
|
2187
|
-
nullable: !0
|
|
2188
|
-
},
|
|
2189
|
-
items: {
|
|
2190
|
-
type: "array",
|
|
2191
|
-
nullable: !0,
|
|
2192
|
-
items: {
|
|
2193
|
-
type: "object",
|
|
2194
|
-
properties: {
|
|
2195
|
-
url: {
|
|
2196
|
-
type: "string"
|
|
2197
|
-
},
|
|
2198
|
-
type: {
|
|
2199
|
-
type: "string"
|
|
2200
|
-
},
|
|
2201
|
-
videoId: {
|
|
2202
|
-
type: "string"
|
|
2203
|
-
},
|
|
2204
|
-
title: {
|
|
2205
|
-
type: "string"
|
|
2206
|
-
}
|
|
2207
|
-
},
|
|
2208
|
-
required: ["url", "type", "videoId", "title"]
|
|
2209
|
-
}
|
|
2210
|
-
},
|
|
2211
|
-
currentIndex: {
|
|
2212
|
-
type: "integer",
|
|
2213
|
-
nullable: !0
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
}, mi = fi(
|
|
2217
|
-
di,
|
|
2218
|
-
"PlayQueueStore"
|
|
2219
|
-
);
|
|
2220
|
-
class hi {
|
|
1789
|
+
let ot = Ce;
|
|
1790
|
+
class oi {
|
|
2221
1791
|
constructor(e) {
|
|
2222
1792
|
U(this, "interacted", !1);
|
|
2223
1793
|
U(this, "items", []);
|
|
@@ -2225,11 +1795,11 @@ class hi {
|
|
|
2225
1795
|
U(this, "repeat", R.Off);
|
|
2226
1796
|
U(this, "shuffle", !1);
|
|
2227
1797
|
this.observableStateProvider = e, e.makeObservable(this, {
|
|
2228
|
-
interacted:
|
|
2229
|
-
items:
|
|
2230
|
-
currentId:
|
|
2231
|
-
repeat:
|
|
2232
|
-
shuffle:
|
|
1798
|
+
interacted: te,
|
|
1799
|
+
items: te,
|
|
1800
|
+
currentId: te,
|
|
1801
|
+
repeat: te,
|
|
1802
|
+
shuffle: te,
|
|
2233
1803
|
localStorageState: _.struct,
|
|
2234
1804
|
isEmpty: _,
|
|
2235
1805
|
currentItem: _,
|
|
@@ -2268,7 +1838,7 @@ class hi {
|
|
|
2268
1838
|
});
|
|
2269
1839
|
}
|
|
2270
1840
|
createItem(e) {
|
|
2271
|
-
return
|
|
1841
|
+
return ot.fromDto(
|
|
2272
1842
|
this.observableStateProvider,
|
|
2273
1843
|
this,
|
|
2274
1844
|
e
|
|
@@ -2288,7 +1858,10 @@ class hi {
|
|
|
2288
1858
|
this.repeat = e.repeat ?? R.Off, this.shuffle = e.shuffle ?? !1, this.items = ((n = e.items) == null ? void 0 : n.map((i) => this.createItem(i))) ?? [], this.currentIndex = e.currentIndex;
|
|
2289
1859
|
}
|
|
2290
1860
|
validateLocalStorageState(e) {
|
|
2291
|
-
return
|
|
1861
|
+
return ri(
|
|
1862
|
+
ii,
|
|
1863
|
+
"PlayQueueDto"
|
|
1864
|
+
)(e);
|
|
2292
1865
|
}
|
|
2293
1866
|
get isEmpty() {
|
|
2294
1867
|
return this.items.length === 0;
|
|
@@ -2368,105 +1941,543 @@ class hi {
|
|
|
2368
1941
|
this.selectedItemsOrAllItems.map((e) => e.clone())
|
|
2369
1942
|
), this.unselectAll();
|
|
2370
1943
|
}
|
|
2371
|
-
async addItems(e) {
|
|
2372
|
-
if (this.isEmpty) {
|
|
2373
|
-
this.clearAndSetItems(e);
|
|
2374
|
-
return;
|
|
1944
|
+
async addItems(e) {
|
|
1945
|
+
if (this.isEmpty) {
|
|
1946
|
+
this.clearAndSetItems(e);
|
|
1947
|
+
return;
|
|
1948
|
+
}
|
|
1949
|
+
this.items.push(...e);
|
|
1950
|
+
}
|
|
1951
|
+
async addSelectedItems() {
|
|
1952
|
+
await this.addItems(
|
|
1953
|
+
this.selectedItemsOrAllItems.map((e) => e.clone())
|
|
1954
|
+
), this.unselectAll();
|
|
1955
|
+
}
|
|
1956
|
+
async playFirst(e) {
|
|
1957
|
+
if (this.isEmpty) {
|
|
1958
|
+
this.clearAndSetItems(e);
|
|
1959
|
+
return;
|
|
1960
|
+
}
|
|
1961
|
+
const { currentIndex: n } = this;
|
|
1962
|
+
n !== void 0 && (this.interact(), this.items.splice(n, 0, ...e), this.currentIndex = n);
|
|
1963
|
+
}
|
|
1964
|
+
moveItem(e, n) {
|
|
1965
|
+
const i = this.items.splice(this.items.indexOf(e), 1)[0];
|
|
1966
|
+
this.items.splice(n, 0, i);
|
|
1967
|
+
}
|
|
1968
|
+
async removeItems(e) {
|
|
1969
|
+
const { currentItem: n } = this;
|
|
1970
|
+
Rt(this.items, ...e.filter((l) => l !== n));
|
|
1971
|
+
const { currentIndex: i, isLastItem: a } = this;
|
|
1972
|
+
Rt(
|
|
1973
|
+
this.items,
|
|
1974
|
+
e.find((l) => l === n)
|
|
1975
|
+
), this.currentItem !== n && (this.interact(), a ? await this.goToFirst() : this.currentIndex = i);
|
|
1976
|
+
}
|
|
1977
|
+
async removeSelectedItems() {
|
|
1978
|
+
await this.removeItems(this.selectedItemsOrAllItems), this.unselectAll();
|
|
1979
|
+
}
|
|
1980
|
+
async removeOtherItems(e) {
|
|
1981
|
+
const n = e.id;
|
|
1982
|
+
return this.removeItems(
|
|
1983
|
+
this.items.filter((i) => i.id !== n)
|
|
1984
|
+
);
|
|
1985
|
+
}
|
|
1986
|
+
async removeItemsAbove(e) {
|
|
1987
|
+
const n = this.items.indexOf(e);
|
|
1988
|
+
return this.removeItems(
|
|
1989
|
+
this.items.filter((i, a) => a < n)
|
|
1990
|
+
);
|
|
1991
|
+
}
|
|
1992
|
+
toggleRepeat() {
|
|
1993
|
+
switch (this.repeat) {
|
|
1994
|
+
case R.Off:
|
|
1995
|
+
this.repeat = R.All;
|
|
1996
|
+
break;
|
|
1997
|
+
case R.All:
|
|
1998
|
+
this.repeat = R.One;
|
|
1999
|
+
break;
|
|
2000
|
+
case R.One:
|
|
2001
|
+
this.repeat = R.Off;
|
|
2002
|
+
break;
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
toggleShuffle() {
|
|
2006
|
+
this.shuffle = !this.shuffle;
|
|
2007
|
+
}
|
|
2008
|
+
async previous() {
|
|
2009
|
+
this.currentIndex !== void 0 && this.hasPreviousItem && (this.interact(), this.currentIndex--);
|
|
2010
|
+
}
|
|
2011
|
+
async next() {
|
|
2012
|
+
this.currentIndex !== void 0 && this.hasNextItem && (this.interact(), this.currentIndex++);
|
|
2013
|
+
}
|
|
2014
|
+
async goToFirst() {
|
|
2015
|
+
this.currentIndex !== void 0 && (this.currentIndex = 0);
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
const er = Lt(void 0), _i = ({
|
|
2019
|
+
children: t
|
|
2020
|
+
}) => {
|
|
2021
|
+
const [e] = q(
|
|
2022
|
+
() => new oi(new Gt())
|
|
2023
|
+
), n = ie();
|
|
2024
|
+
return _r(() => wr(
|
|
2025
|
+
() => e.currentItem,
|
|
2026
|
+
async (i, a) => {
|
|
2027
|
+
i === void 0 || a === void 0 || i.type === a.type && i.videoId === a.videoId && await n.setCurrentTime(0);
|
|
2028
|
+
}
|
|
2029
|
+
), [e, n]), /* @__PURE__ */ o(er.Provider, { value: e, children: t });
|
|
2030
|
+
}, ai = () => st(er), tr = 81, si = Y(
|
|
2031
|
+
({ playerStore: t, playQueueStore: e }) => {
|
|
2032
|
+
const n = ie(), i = $(
|
|
2033
|
+
(f) => {
|
|
2034
|
+
const h = Number(f.currentTarget.value) / 100;
|
|
2035
|
+
t.setPercent(h);
|
|
2036
|
+
},
|
|
2037
|
+
[t]
|
|
2038
|
+
), a = $(
|
|
2039
|
+
(f) => {
|
|
2040
|
+
f.button === 0 && t.setSeeking(!0);
|
|
2041
|
+
},
|
|
2042
|
+
[t]
|
|
2043
|
+
), l = $(
|
|
2044
|
+
async (f) => {
|
|
2045
|
+
if (f.button === 0) {
|
|
2046
|
+
const h = Number(f.currentTarget.value) / 100;
|
|
2047
|
+
t.setSeeking(!1);
|
|
2048
|
+
const m = await n.getDuration();
|
|
2049
|
+
m !== void 0 && await n.setCurrentTime(m * h);
|
|
2050
|
+
}
|
|
2051
|
+
},
|
|
2052
|
+
[t, n]
|
|
2053
|
+
);
|
|
2054
|
+
return /* @__PURE__ */ o(
|
|
2055
|
+
Ut,
|
|
2056
|
+
{
|
|
2057
|
+
min: 0,
|
|
2058
|
+
max: 100,
|
|
2059
|
+
step: 1e-7,
|
|
2060
|
+
value: t.percent * 100,
|
|
2061
|
+
onChange: i,
|
|
2062
|
+
onMouseDown: a,
|
|
2063
|
+
onMouseUp: l,
|
|
2064
|
+
fullWidth: !0,
|
|
2065
|
+
showRange: !0,
|
|
2066
|
+
css: { blockSize: 32 },
|
|
2067
|
+
disabled: e.isEmpty
|
|
2068
|
+
}
|
|
2069
|
+
);
|
|
2070
|
+
}
|
|
2071
|
+
), li = Z(
|
|
2072
|
+
({ button: t, isOpen: e, closePopover: n }) => {
|
|
2073
|
+
const [i, a] = q("0"), l = ie();
|
|
2074
|
+
Ar(() => {
|
|
2075
|
+
e && l.getVolume().then((h) => {
|
|
2076
|
+
h !== void 0 && a(Math.floor(h * 100).toString());
|
|
2077
|
+
});
|
|
2078
|
+
}, [e, l]);
|
|
2079
|
+
const f = $(
|
|
2080
|
+
async (h) => {
|
|
2081
|
+
a(h.currentTarget.value), await l.setVolume(Number(h.currentTarget.value) / 100);
|
|
2082
|
+
},
|
|
2083
|
+
[l]
|
|
2084
|
+
);
|
|
2085
|
+
return /* @__PURE__ */ o(
|
|
2086
|
+
lt,
|
|
2087
|
+
{
|
|
2088
|
+
button: t,
|
|
2089
|
+
isOpen: e,
|
|
2090
|
+
closePopover: n,
|
|
2091
|
+
anchorPosition: "upRight",
|
|
2092
|
+
children: /* @__PURE__ */ o(tt, { children: /* @__PURE__ */ F(
|
|
2093
|
+
me,
|
|
2094
|
+
{
|
|
2095
|
+
responsive: !1,
|
|
2096
|
+
gutterSize: "s",
|
|
2097
|
+
justifyContent: "center",
|
|
2098
|
+
alignItems: "center",
|
|
2099
|
+
children: [
|
|
2100
|
+
/* @__PURE__ */ o(
|
|
2101
|
+
K,
|
|
2102
|
+
{
|
|
2103
|
+
title: "Mute",
|
|
2104
|
+
"aria-label": "Mute",
|
|
2105
|
+
iconType: Ht,
|
|
2106
|
+
size: "s",
|
|
2107
|
+
iconSize: "l"
|
|
2108
|
+
}
|
|
2109
|
+
),
|
|
2110
|
+
/* @__PURE__ */ o(
|
|
2111
|
+
Ut,
|
|
2112
|
+
{
|
|
2113
|
+
min: 0,
|
|
2114
|
+
max: 100,
|
|
2115
|
+
step: 1,
|
|
2116
|
+
value: i,
|
|
2117
|
+
onChange: f,
|
|
2118
|
+
css: { blockSize: 32 }
|
|
2119
|
+
}
|
|
2120
|
+
)
|
|
2121
|
+
]
|
|
2122
|
+
}
|
|
2123
|
+
) })
|
|
2124
|
+
}
|
|
2125
|
+
);
|
|
2126
|
+
}
|
|
2127
|
+
), ci = Z(
|
|
2128
|
+
({
|
|
2129
|
+
playQueueStore: t,
|
|
2130
|
+
closePopover: e
|
|
2131
|
+
}) => {
|
|
2132
|
+
const n = ie(), i = $(async () => {
|
|
2133
|
+
const p = await n.getCurrentTime();
|
|
2134
|
+
p !== void 0 && await n.setCurrentTime(p - 10), e();
|
|
2135
|
+
}, [n, e]), a = $(async () => {
|
|
2136
|
+
const p = await n.getCurrentTime();
|
|
2137
|
+
p !== void 0 && await n.setCurrentTime(p + 30), e();
|
|
2138
|
+
}, [n, e]), l = $(
|
|
2139
|
+
async (p) => {
|
|
2140
|
+
await n.setPlaybackRate(p), e();
|
|
2141
|
+
},
|
|
2142
|
+
[n, e]
|
|
2143
|
+
), f = $(async () => {
|
|
2144
|
+
t.currentItem !== void 0 && await t.removeItems([
|
|
2145
|
+
t.currentItem
|
|
2146
|
+
]), e();
|
|
2147
|
+
}, [t, e]), [h] = q(), m = Vt(
|
|
2148
|
+
() => [
|
|
2149
|
+
{
|
|
2150
|
+
id: 0,
|
|
2151
|
+
items: [
|
|
2152
|
+
{
|
|
2153
|
+
name: "Speed",
|
|
2154
|
+
icon: /* @__PURE__ */ o(H, { type: on, size: "m" }),
|
|
2155
|
+
panel: 1
|
|
2156
|
+
},
|
|
2157
|
+
{
|
|
2158
|
+
name: "Skip back 10 seconds",
|
|
2159
|
+
icon: /* @__PURE__ */ o(H, { type: an, size: "m" }),
|
|
2160
|
+
onClick: i,
|
|
2161
|
+
disabled: t.isEmpty
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
name: "Skip forward 30 seconds",
|
|
2165
|
+
icon: /* @__PURE__ */ o(H, { type: sn, size: "m" }),
|
|
2166
|
+
onClick: a,
|
|
2167
|
+
disabled: t.isEmpty
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
isSeparator: !0
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
name: "Remove from play queue",
|
|
2174
|
+
icon: /* @__PURE__ */ o(H, { type: ut, size: "m" }),
|
|
2175
|
+
onClick: f,
|
|
2176
|
+
disabled: t.isEmpty
|
|
2177
|
+
}
|
|
2178
|
+
]
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
id: 1,
|
|
2182
|
+
title: "Speed",
|
|
2183
|
+
items: [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2].map(
|
|
2184
|
+
(p) => ({
|
|
2185
|
+
name: p.toString(),
|
|
2186
|
+
onClick: () => l(p),
|
|
2187
|
+
icon: p === h ? "check" : "empty"
|
|
2188
|
+
})
|
|
2189
|
+
)
|
|
2190
|
+
}
|
|
2191
|
+
],
|
|
2192
|
+
[
|
|
2193
|
+
t,
|
|
2194
|
+
i,
|
|
2195
|
+
a,
|
|
2196
|
+
f,
|
|
2197
|
+
l,
|
|
2198
|
+
h
|
|
2199
|
+
]
|
|
2200
|
+
);
|
|
2201
|
+
return /* @__PURE__ */ o(Xr, { initialPanelId: 0, panels: m });
|
|
2202
|
+
}
|
|
2203
|
+
), ui = Z(
|
|
2204
|
+
({
|
|
2205
|
+
playQueueStore: t,
|
|
2206
|
+
button: e,
|
|
2207
|
+
isOpen: n,
|
|
2208
|
+
closePopover: i
|
|
2209
|
+
}) => /* @__PURE__ */ o(
|
|
2210
|
+
lt,
|
|
2211
|
+
{
|
|
2212
|
+
button: e,
|
|
2213
|
+
isOpen: n,
|
|
2214
|
+
closePopover: i,
|
|
2215
|
+
panelPaddingSize: "none",
|
|
2216
|
+
anchorPosition: "upRight",
|
|
2217
|
+
children: /* @__PURE__ */ o(
|
|
2218
|
+
ci,
|
|
2219
|
+
{
|
|
2220
|
+
playQueueStore: t,
|
|
2221
|
+
closePopover: i
|
|
2222
|
+
}
|
|
2223
|
+
)
|
|
2224
|
+
}
|
|
2225
|
+
)
|
|
2226
|
+
), fi = {
|
|
2227
|
+
[R.Off]: un,
|
|
2228
|
+
[R.All]: cn,
|
|
2229
|
+
[R.One]: ln
|
|
2230
|
+
}, di = Y(
|
|
2231
|
+
({
|
|
2232
|
+
playerStore: t,
|
|
2233
|
+
playQueueStore: e
|
|
2234
|
+
}) => {
|
|
2235
|
+
const n = ie(), i = $(async () => {
|
|
2236
|
+
if (e.hasPreviousItem) {
|
|
2237
|
+
const a = await n.getCurrentTime();
|
|
2238
|
+
a === void 0 || a < 5 ? await e.previous() : await n.setCurrentTime(0);
|
|
2239
|
+
} else
|
|
2240
|
+
await n.setCurrentTime(0);
|
|
2241
|
+
}, [e, n]);
|
|
2242
|
+
return /* @__PURE__ */ F(
|
|
2243
|
+
me,
|
|
2244
|
+
{
|
|
2245
|
+
responsive: !1,
|
|
2246
|
+
gutterSize: "s",
|
|
2247
|
+
justifyContent: "center",
|
|
2248
|
+
alignItems: "center",
|
|
2249
|
+
children: [
|
|
2250
|
+
/* @__PURE__ */ o(
|
|
2251
|
+
K,
|
|
2252
|
+
{
|
|
2253
|
+
title: `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
2254
|
+
"aria-label": `Shuffle: ${e.shuffle ? "On" : "Off"}`,
|
|
2255
|
+
iconType: e.shuffle ? fn : dn,
|
|
2256
|
+
size: "s",
|
|
2257
|
+
iconSize: "l",
|
|
2258
|
+
onClick: e.toggleShuffle,
|
|
2259
|
+
disabled: !0
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
/* @__PURE__ */ o(
|
|
2263
|
+
K,
|
|
2264
|
+
{
|
|
2265
|
+
title: "Previous",
|
|
2266
|
+
"aria-label": "Previous",
|
|
2267
|
+
iconType: mn,
|
|
2268
|
+
size: "s",
|
|
2269
|
+
iconSize: "l",
|
|
2270
|
+
onClick: i,
|
|
2271
|
+
disabled: e.isEmpty
|
|
2272
|
+
}
|
|
2273
|
+
),
|
|
2274
|
+
t.playing ? /* @__PURE__ */ o(
|
|
2275
|
+
K,
|
|
2276
|
+
{
|
|
2277
|
+
title: "Pause",
|
|
2278
|
+
"aria-label": "Pause",
|
|
2279
|
+
iconType: hn,
|
|
2280
|
+
size: "s",
|
|
2281
|
+
iconSize: "l",
|
|
2282
|
+
onClick: () => n.pause(),
|
|
2283
|
+
disabled: !e.canPlay
|
|
2284
|
+
}
|
|
2285
|
+
) : /* @__PURE__ */ o(
|
|
2286
|
+
K,
|
|
2287
|
+
{
|
|
2288
|
+
title: "Play",
|
|
2289
|
+
"aria-label": "Play",
|
|
2290
|
+
iconType: vn,
|
|
2291
|
+
size: "s",
|
|
2292
|
+
iconSize: "l",
|
|
2293
|
+
onClick: () => n.play(),
|
|
2294
|
+
disabled: !e.canPlay
|
|
2295
|
+
}
|
|
2296
|
+
),
|
|
2297
|
+
/* @__PURE__ */ o(
|
|
2298
|
+
K,
|
|
2299
|
+
{
|
|
2300
|
+
title: "Next",
|
|
2301
|
+
"aria-label": "Next",
|
|
2302
|
+
iconType: pn,
|
|
2303
|
+
size: "s",
|
|
2304
|
+
iconSize: "l",
|
|
2305
|
+
onClick: e.next,
|
|
2306
|
+
disabled: !e.hasNextItem
|
|
2307
|
+
}
|
|
2308
|
+
),
|
|
2309
|
+
/* @__PURE__ */ o(
|
|
2310
|
+
K,
|
|
2311
|
+
{
|
|
2312
|
+
title: `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`,
|
|
2313
|
+
"aria-label": `Repeat: ${e.repeat === R.All ? "All" : e.repeat === R.One ? "One" : "Off"}`,
|
|
2314
|
+
iconType: fi[e.repeat],
|
|
2315
|
+
size: "s",
|
|
2316
|
+
iconSize: "l",
|
|
2317
|
+
onClick: e.toggleRepeat
|
|
2318
|
+
}
|
|
2319
|
+
)
|
|
2320
|
+
]
|
|
2321
|
+
}
|
|
2322
|
+
);
|
|
2323
|
+
}
|
|
2324
|
+
), mi = Z(() => {
|
|
2325
|
+
const [t, e] = q(!1);
|
|
2326
|
+
return /* @__PURE__ */ o(
|
|
2327
|
+
li,
|
|
2328
|
+
{
|
|
2329
|
+
button: /* @__PURE__ */ o(
|
|
2330
|
+
K,
|
|
2331
|
+
{
|
|
2332
|
+
title: "Volume",
|
|
2333
|
+
"aria-label": "Volume",
|
|
2334
|
+
iconType: Ht,
|
|
2335
|
+
size: "s",
|
|
2336
|
+
iconSize: "l",
|
|
2337
|
+
onClick: () => e(!t)
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
isOpen: t,
|
|
2341
|
+
closePopover: () => e(!1)
|
|
2375
2342
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2343
|
+
);
|
|
2344
|
+
}), hi = Z(
|
|
2345
|
+
({ playQueueStore: t }) => {
|
|
2346
|
+
const [e, n] = q(!1);
|
|
2347
|
+
return /* @__PURE__ */ o(
|
|
2348
|
+
ui,
|
|
2349
|
+
{
|
|
2350
|
+
playQueueStore: t,
|
|
2351
|
+
button: /* @__PURE__ */ o(
|
|
2352
|
+
K,
|
|
2353
|
+
{
|
|
2354
|
+
title: "More options",
|
|
2355
|
+
"aria-label": "More options",
|
|
2356
|
+
iconType: qt,
|
|
2357
|
+
size: "s",
|
|
2358
|
+
iconSize: "l",
|
|
2359
|
+
onClick: () => n(!e)
|
|
2360
|
+
}
|
|
2361
|
+
),
|
|
2362
|
+
isOpen: e,
|
|
2363
|
+
closePopover: () => n(!1)
|
|
2364
|
+
}
|
|
2365
|
+
);
|
|
2382
2366
|
}
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2367
|
+
), vi = Z(
|
|
2368
|
+
({ playQueueStore: t }) => /* @__PURE__ */ F(
|
|
2369
|
+
me,
|
|
2370
|
+
{
|
|
2371
|
+
responsive: !1,
|
|
2372
|
+
gutterSize: "s",
|
|
2373
|
+
justifyContent: "flexEnd",
|
|
2374
|
+
alignItems: "center",
|
|
2375
|
+
children: [
|
|
2376
|
+
/* @__PURE__ */ o(mi, {}),
|
|
2377
|
+
/* @__PURE__ */ o(hi, { playQueueStore: t })
|
|
2378
|
+
]
|
|
2387
2379
|
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2380
|
+
)
|
|
2381
|
+
), Ai = Y(
|
|
2382
|
+
({ playerStore: t, playQueueStore: e }) => /* @__PURE__ */ o(Zr, { paddingSize: "s", children: /* @__PURE__ */ F(me, { direction: "column", gutterSize: "none", children: [
|
|
2383
|
+
/* @__PURE__ */ o(G, { children: /* @__PURE__ */ o(
|
|
2384
|
+
si,
|
|
2385
|
+
{
|
|
2386
|
+
playerStore: t,
|
|
2387
|
+
playQueueStore: e
|
|
2388
|
+
}
|
|
2389
|
+
) }),
|
|
2390
|
+
/* @__PURE__ */ o(G, { children: /* @__PURE__ */ F(me, { responsive: !1, children: [
|
|
2391
|
+
/* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" } }),
|
|
2392
|
+
/* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(
|
|
2393
|
+
di,
|
|
2394
|
+
{
|
|
2395
|
+
playerStore: t,
|
|
2396
|
+
playQueueStore: e
|
|
2397
|
+
}
|
|
2398
|
+
) }),
|
|
2399
|
+
/* @__PURE__ */ o(G, { css: { width: "calc(100% / 3)" }, children: /* @__PURE__ */ o(
|
|
2400
|
+
vi,
|
|
2401
|
+
{
|
|
2402
|
+
playQueueStore: e
|
|
2403
|
+
}
|
|
2404
|
+
) })
|
|
2405
|
+
] }) })
|
|
2406
|
+
] }) })
|
|
2407
|
+
), at = {
|
|
2408
|
+
width: 16 * 25,
|
|
2409
|
+
height: 9 * 25
|
|
2410
|
+
}, ki = Y(
|
|
2411
|
+
({ playerStore: t, playQueueStore: e }) => {
|
|
2412
|
+
const n = ie(), i = $(async () => {
|
|
2413
|
+
e.interacted && await n.play();
|
|
2414
|
+
}, [e, n]), a = $(async () => {
|
|
2415
|
+
switch (e.repeat) {
|
|
2416
|
+
case R.One:
|
|
2417
|
+
await n.setCurrentTime(0);
|
|
2418
|
+
break;
|
|
2419
|
+
case R.Off:
|
|
2420
|
+
case R.All:
|
|
2421
|
+
if (e.isLastItem)
|
|
2422
|
+
switch (e.repeat) {
|
|
2423
|
+
case R.Off:
|
|
2424
|
+
t.onEnded();
|
|
2425
|
+
break;
|
|
2426
|
+
case R.All:
|
|
2427
|
+
e.hasMultipleItems ? await e.goToFirst() : await n.setCurrentTime(0);
|
|
2428
|
+
break;
|
|
2429
|
+
}
|
|
2430
|
+
else
|
|
2431
|
+
await e.next();
|
|
2432
|
+
break;
|
|
2433
|
+
}
|
|
2434
|
+
}, [e, t, n]), l = Vt(
|
|
2435
|
+
() => ({
|
|
2436
|
+
onLoaded: i,
|
|
2437
|
+
onPlay: t.onPlay,
|
|
2438
|
+
onPause: t.onPause,
|
|
2439
|
+
onEnded: a,
|
|
2440
|
+
onTimeUpdate: t.onTimeUpdate
|
|
2441
|
+
}),
|
|
2442
|
+
[t, i, a]
|
|
2411
2443
|
);
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2444
|
+
return /* @__PURE__ */ o(
|
|
2445
|
+
"div",
|
|
2446
|
+
{
|
|
2447
|
+
css: {
|
|
2448
|
+
position: "fixed",
|
|
2449
|
+
right: 0,
|
|
2450
|
+
bottom: tr,
|
|
2451
|
+
width: at.width,
|
|
2452
|
+
height: at.height,
|
|
2453
|
+
zIndex: 998,
|
|
2454
|
+
backgroundColor: "rgb(39, 39, 39)",
|
|
2455
|
+
display: "flex",
|
|
2456
|
+
flexDirection: "column"
|
|
2457
|
+
},
|
|
2458
|
+
children: /* @__PURE__ */ o("div", { css: { flexGrow: 1, backgroundColor: "black" }, children: e.currentItem && /* @__PURE__ */ o(
|
|
2459
|
+
gn,
|
|
2460
|
+
{
|
|
2461
|
+
src: e.currentItem.url,
|
|
2462
|
+
options: l
|
|
2463
|
+
}
|
|
2464
|
+
) })
|
|
2465
|
+
}
|
|
2417
2466
|
);
|
|
2418
2467
|
}
|
|
2419
|
-
|
|
2420
|
-
switch (this.repeat) {
|
|
2421
|
-
case R.Off:
|
|
2422
|
-
this.repeat = R.All;
|
|
2423
|
-
break;
|
|
2424
|
-
case R.All:
|
|
2425
|
-
this.repeat = R.One;
|
|
2426
|
-
break;
|
|
2427
|
-
case R.One:
|
|
2428
|
-
this.repeat = R.Off;
|
|
2429
|
-
break;
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
toggleShuffle() {
|
|
2433
|
-
this.shuffle = !this.shuffle;
|
|
2434
|
-
}
|
|
2435
|
-
async previous() {
|
|
2436
|
-
this.currentIndex !== void 0 && this.hasPreviousItem && (this.interact(), this.currentIndex--);
|
|
2437
|
-
}
|
|
2438
|
-
async next() {
|
|
2439
|
-
this.currentIndex !== void 0 && this.hasNextItem && (this.interact(), this.currentIndex++);
|
|
2440
|
-
}
|
|
2441
|
-
async goToFirst() {
|
|
2442
|
-
this.currentIndex !== void 0 && (this.currentIndex = 0);
|
|
2443
|
-
}
|
|
2444
|
-
}
|
|
2445
|
-
const tr = Lt(void 0), Ai = ({
|
|
2446
|
-
children: t
|
|
2447
|
-
}) => {
|
|
2448
|
-
const [e] = q(
|
|
2449
|
-
() => new hi(new er())
|
|
2450
|
-
), n = ie();
|
|
2451
|
-
return Or(() => gn(
|
|
2452
|
-
() => e.currentItem,
|
|
2453
|
-
async (i, a) => {
|
|
2454
|
-
i === void 0 || a === void 0 || i.type === a.type && i.videoId === a.videoId && await n.setCurrentTime(0);
|
|
2455
|
-
}
|
|
2456
|
-
), [e, n]), /* @__PURE__ */ o(tr.Provider, { value: e, children: t });
|
|
2457
|
-
}, vi = () => st(tr), ki = Y(
|
|
2468
|
+
), Mi = Y(
|
|
2458
2469
|
({ children: t }) => {
|
|
2459
|
-
const e =
|
|
2470
|
+
const e = ai();
|
|
2460
2471
|
return /* @__PURE__ */ F(
|
|
2461
2472
|
nt,
|
|
2462
2473
|
{
|
|
2463
2474
|
panelled: !0,
|
|
2464
2475
|
style: {
|
|
2465
|
-
minBlockSize: `max(460px, 100vh - ${
|
|
2476
|
+
minBlockSize: `max(460px, 100vh - ${tr}px)`
|
|
2466
2477
|
},
|
|
2467
2478
|
children: [
|
|
2468
2479
|
t,
|
|
2469
|
-
!e.isEmpty && /* @__PURE__ */ o(Wt, { style: { blockSize:
|
|
2480
|
+
!e.isEmpty && /* @__PURE__ */ o(Wt, { style: { blockSize: at.height } })
|
|
2470
2481
|
]
|
|
2471
2482
|
}
|
|
2472
2483
|
);
|
|
@@ -2478,9 +2489,9 @@ class pi {
|
|
|
2478
2489
|
U(this, "percent", 0);
|
|
2479
2490
|
U(this, "seeking", !1);
|
|
2480
2491
|
e.makeObservable(this, {
|
|
2481
|
-
playing:
|
|
2482
|
-
percent:
|
|
2483
|
-
seeking:
|
|
2492
|
+
playing: te,
|
|
2493
|
+
percent: te,
|
|
2494
|
+
seeking: te,
|
|
2484
2495
|
setPlaying: y,
|
|
2485
2496
|
setPercent: y,
|
|
2486
2497
|
setSeeking: y,
|
|
@@ -2512,32 +2523,27 @@ class pi {
|
|
|
2512
2523
|
e !== void 0 && (this.seeking || (this.percent = e));
|
|
2513
2524
|
}
|
|
2514
2525
|
}
|
|
2515
|
-
const rr = Lt(void 0),
|
|
2526
|
+
const rr = Lt(void 0), Fi = ({
|
|
2516
2527
|
children: t
|
|
2517
2528
|
}) => {
|
|
2518
2529
|
const [e] = q(
|
|
2519
|
-
() => new pi(new
|
|
2530
|
+
() => new pi(new Gt())
|
|
2520
2531
|
);
|
|
2521
2532
|
return /* @__PURE__ */ o(rr.Provider, { value: e, children: t });
|
|
2522
|
-
},
|
|
2523
|
-
class ji {
|
|
2524
|
-
makeObservable(e, n) {
|
|
2525
|
-
return e;
|
|
2526
|
-
}
|
|
2527
|
-
}
|
|
2533
|
+
}, ji = () => st(rr);
|
|
2528
2534
|
export {
|
|
2529
|
-
|
|
2535
|
+
Ai as BottomBar,
|
|
2530
2536
|
Oi as HydrangeanDiva,
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
+
Mi as MediaPlayerLayout,
|
|
2538
|
+
ki as MiniPlayer,
|
|
2539
|
+
Gt as MobXObservableStateProvider,
|
|
2540
|
+
wi as ObservableStateProvider,
|
|
2541
|
+
_i as PlayQueueStoreProvider,
|
|
2542
|
+
Fi as PlayerStoreProvider,
|
|
2537
2543
|
R as RepeatMode,
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2544
|
+
tr as bottomBarHeight,
|
|
2545
|
+
at as miniPlayerSize,
|
|
2546
|
+
ai as usePlayQueueStore,
|
|
2547
|
+
ji as usePlayerStore
|
|
2542
2548
|
};
|
|
2543
2549
|
//# sourceMappingURL=index.es.js.map
|