@moq/watch 0.1.1 → 0.2.1
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/{broadcast-BFfLDq15.js → broadcast-CZc0dhfv.js} +177 -144
- package/{broadcast-BFfLDq15.js.map → broadcast-CZc0dhfv.js.map} +1 -1
- package/broadcast.d.ts +2 -2
- package/element.d.ts +13 -13
- package/element.d.ts.map +1 -1
- package/element.js +66 -60
- package/element.js.map +1 -1
- package/index.js +2 -2
- package/package.json +3 -3
- package/ui/components/BufferControl.d.ts +1 -1
- package/ui/components/BufferControl.d.ts.map +1 -1
- package/ui/components/QualitySelector.d.ts.map +1 -1
- package/ui/context.d.ts +1 -0
- package/ui/context.d.ts.map +1 -1
- package/ui/index.js +554 -586
- package/ui/index.js.map +1 -1
- package/video/source.d.ts +1 -0
- package/video/source.d.ts.map +1 -1
package/ui/index.js
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import { Button as lt, Icon as
|
|
2
|
-
import { Signals as
|
|
3
|
-
const
|
|
4
|
-
equals:
|
|
1
|
+
import { Button as lt, Icon as j, Stats as Bt } from "@moq/ui-core";
|
|
2
|
+
import { Signals as Ft } from "@moq/hang";
|
|
3
|
+
const Nt = !1, Ut = (t, e) => t === e, Kt = /* @__PURE__ */ Symbol("solid-track"), nt = {
|
|
4
|
+
equals: Ut
|
|
5
5
|
};
|
|
6
|
-
let
|
|
7
|
-
const F = 1,
|
|
6
|
+
let Pt = Lt;
|
|
7
|
+
const F = 1, rt = 2, Mt = {
|
|
8
8
|
owned: null,
|
|
9
9
|
cleanups: null,
|
|
10
10
|
context: null,
|
|
11
11
|
owner: null
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
let
|
|
15
|
-
function
|
|
16
|
-
const
|
|
13
|
+
var _ = null;
|
|
14
|
+
let ht = null, Dt = null, v = null, S = null, W = null, ct = 0;
|
|
15
|
+
function et(t, e) {
|
|
16
|
+
const n = v, a = _, r = t.length === 0, o = e === void 0 ? a : e, s = r ? Mt : {
|
|
17
17
|
owned: null,
|
|
18
18
|
cleanups: null,
|
|
19
19
|
context: o ? o.context : null,
|
|
20
20
|
owner: o
|
|
21
|
-
}, i =
|
|
22
|
-
|
|
21
|
+
}, i = r ? t : () => t(() => L(() => H(s)));
|
|
22
|
+
_ = s, v = null;
|
|
23
23
|
try {
|
|
24
|
-
return
|
|
24
|
+
return J(i, !0);
|
|
25
25
|
} finally {
|
|
26
|
-
|
|
26
|
+
v = n, _ = a;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
e = e ? Object.assign({},
|
|
31
|
-
const
|
|
29
|
+
function M(t, e) {
|
|
30
|
+
e = e ? Object.assign({}, nt, e) : nt;
|
|
31
|
+
const n = {
|
|
32
32
|
value: t,
|
|
33
33
|
observers: null,
|
|
34
34
|
observerSlots: null,
|
|
35
35
|
comparator: e.equals || void 0
|
|
36
|
-
}, a = (
|
|
37
|
-
return [
|
|
38
|
-
}
|
|
39
|
-
function T(t, e,
|
|
40
|
-
const a =
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
const a =
|
|
46
|
-
a.user = !0,
|
|
47
|
-
}
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
const a =
|
|
51
|
-
return a.observers = null, a.observerSlots = null, a.comparator =
|
|
52
|
-
}
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
-
const e =
|
|
56
|
-
|
|
36
|
+
}, a = (r) => (typeof r == "function" && (r = r(n.value)), Tt(n, r));
|
|
37
|
+
return [Wt.bind(n), a];
|
|
38
|
+
}
|
|
39
|
+
function T(t, e, n) {
|
|
40
|
+
const a = yt(t, e, !1, F);
|
|
41
|
+
G(a);
|
|
42
|
+
}
|
|
43
|
+
function qt(t, e, n) {
|
|
44
|
+
Pt = Zt;
|
|
45
|
+
const a = yt(t, e, !1, F);
|
|
46
|
+
a.user = !0, W ? W.push(a) : G(a);
|
|
47
|
+
}
|
|
48
|
+
function B(t, e, n) {
|
|
49
|
+
n = n ? Object.assign({}, nt, n) : nt;
|
|
50
|
+
const a = yt(t, e, !0, 0);
|
|
51
|
+
return a.observers = null, a.observerSlots = null, a.comparator = n.equals || void 0, G(a), Wt.bind(a);
|
|
52
|
+
}
|
|
53
|
+
function L(t) {
|
|
54
|
+
if (v === null) return t();
|
|
55
|
+
const e = v;
|
|
56
|
+
v = null;
|
|
57
57
|
try {
|
|
58
58
|
return t();
|
|
59
59
|
} finally {
|
|
60
|
-
|
|
60
|
+
v = e;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
63
|
+
function Rt(t) {
|
|
64
|
+
qt(() => L(t));
|
|
65
65
|
}
|
|
66
66
|
function ut(t) {
|
|
67
|
-
return
|
|
67
|
+
return _ === null || (_.cleanups === null ? _.cleanups = [t] : _.cleanups.push(t)), t;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return
|
|
69
|
+
function Ht() {
|
|
70
|
+
return _;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
const
|
|
72
|
+
function Gt(t, e) {
|
|
73
|
+
const n = /* @__PURE__ */ Symbol("context");
|
|
74
74
|
return {
|
|
75
|
-
id:
|
|
76
|
-
Provider:
|
|
75
|
+
id: n,
|
|
76
|
+
Provider: te(n),
|
|
77
77
|
defaultValue: t
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function jt(t) {
|
|
81
81
|
let e;
|
|
82
|
-
return
|
|
82
|
+
return _ && _.context && (e = _.context[t.id]) !== void 0 ? e : t.defaultValue;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const e =
|
|
86
|
-
return
|
|
87
|
-
const a =
|
|
84
|
+
function Jt(t) {
|
|
85
|
+
const e = B(t), n = B(() => vt(e()));
|
|
86
|
+
return n.toArray = () => {
|
|
87
|
+
const a = n();
|
|
88
88
|
return Array.isArray(a) ? a : a != null ? [a] : [];
|
|
89
|
-
},
|
|
89
|
+
}, n;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Wt() {
|
|
92
92
|
if (this.sources && this.state)
|
|
93
|
-
if (this.state === F)
|
|
93
|
+
if (this.state === F) G(this);
|
|
94
94
|
else {
|
|
95
|
-
const t =
|
|
96
|
-
|
|
95
|
+
const t = S;
|
|
96
|
+
S = null, J(() => ot(this), !1), S = t;
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
98
|
+
if (v) {
|
|
99
99
|
const t = this.observers ? this.observers.length : 0;
|
|
100
|
-
|
|
100
|
+
v.sources ? (v.sources.push(this), v.sourceSlots.push(t)) : (v.sources = [this], v.sourceSlots = [t]), this.observers ? (this.observers.push(v), this.observerSlots.push(v.sources.length - 1)) : (this.observers = [v], this.observerSlots = [v.sources.length - 1]);
|
|
101
101
|
}
|
|
102
102
|
return this.value;
|
|
103
103
|
}
|
|
104
|
-
function Tt(t, e,
|
|
104
|
+
function Tt(t, e, n) {
|
|
105
105
|
let a = t.value;
|
|
106
|
-
return (!t.comparator || !t.comparator(a, e)) && (t.value = e, t.observers && t.observers.length &&
|
|
107
|
-
for (let
|
|
108
|
-
const o = t.observers[
|
|
109
|
-
s &&
|
|
106
|
+
return (!t.comparator || !t.comparator(a, e)) && (t.value = e, t.observers && t.observers.length && J(() => {
|
|
107
|
+
for (let r = 0; r < t.observers.length; r += 1) {
|
|
108
|
+
const o = t.observers[r], s = ht && ht.running;
|
|
109
|
+
s && ht.disposed.has(o), (s ? !o.tState : !o.state) && (o.pure ? S.push(o) : W.push(o), o.observers && Vt(o)), s || (o.state = F);
|
|
110
110
|
}
|
|
111
|
-
if (
|
|
112
|
-
throw
|
|
111
|
+
if (S.length > 1e6)
|
|
112
|
+
throw S = [], new Error();
|
|
113
113
|
}, !1)), e;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function G(t) {
|
|
116
116
|
if (!t.fn) return;
|
|
117
|
-
|
|
117
|
+
H(t);
|
|
118
118
|
const e = ct;
|
|
119
|
-
|
|
119
|
+
Qt(t, t.value, e);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Qt(t, e, n) {
|
|
122
122
|
let a;
|
|
123
|
-
const
|
|
124
|
-
|
|
123
|
+
const r = _, o = v;
|
|
124
|
+
v = _ = t;
|
|
125
125
|
try {
|
|
126
126
|
a = t.fn(e);
|
|
127
127
|
} catch (s) {
|
|
128
|
-
return t.pure && (t.state = F, t.owned && t.owned.forEach(
|
|
128
|
+
return t.pure && (t.state = F, t.owned && t.owned.forEach(H), t.owned = null), t.updatedAt = n + 1, It(s);
|
|
129
129
|
} finally {
|
|
130
|
-
|
|
130
|
+
v = o, _ = r;
|
|
131
131
|
}
|
|
132
|
-
(!t.updatedAt || t.updatedAt <=
|
|
132
|
+
(!t.updatedAt || t.updatedAt <= n) && (t.updatedAt != null && "observers" in t ? Tt(t, a) : t.value = a, t.updatedAt = n);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function yt(t, e, n, a = F, r) {
|
|
135
135
|
const o = {
|
|
136
136
|
fn: t,
|
|
137
137
|
state: a,
|
|
@@ -141,86 +141,86 @@ function bt(t, e, r, a = F, n) {
|
|
|
141
141
|
sourceSlots: null,
|
|
142
142
|
cleanups: null,
|
|
143
143
|
value: e,
|
|
144
|
-
owner:
|
|
145
|
-
context:
|
|
146
|
-
pure:
|
|
144
|
+
owner: _,
|
|
145
|
+
context: _ ? _.context : null,
|
|
146
|
+
pure: n
|
|
147
147
|
};
|
|
148
|
-
return
|
|
148
|
+
return _ === null || _ !== Mt && (_.owned ? _.owned.push(o) : _.owned = [o]), o;
|
|
149
149
|
}
|
|
150
150
|
function at(t) {
|
|
151
151
|
if (t.state === 0) return;
|
|
152
|
-
if (t.state ===
|
|
153
|
-
if (t.suspense &&
|
|
152
|
+
if (t.state === rt) return ot(t);
|
|
153
|
+
if (t.suspense && L(t.suspense.inFallback)) return t.suspense.effects.push(t);
|
|
154
154
|
const e = [t];
|
|
155
155
|
for (; (t = t.owner) && (!t.updatedAt || t.updatedAt < ct); )
|
|
156
156
|
t.state && e.push(t);
|
|
157
|
-
for (let
|
|
158
|
-
if (t = e[
|
|
159
|
-
|
|
160
|
-
else if (t.state ===
|
|
161
|
-
const a =
|
|
162
|
-
|
|
157
|
+
for (let n = e.length - 1; n >= 0; n--)
|
|
158
|
+
if (t = e[n], t.state === F)
|
|
159
|
+
G(t);
|
|
160
|
+
else if (t.state === rt) {
|
|
161
|
+
const a = S;
|
|
162
|
+
S = null, J(() => ot(t, e[0]), !1), S = a;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
if (
|
|
167
|
-
let
|
|
168
|
-
e || (
|
|
165
|
+
function J(t, e) {
|
|
166
|
+
if (S) return t();
|
|
167
|
+
let n = !1;
|
|
168
|
+
e || (S = []), W ? n = !0 : W = [], ct++;
|
|
169
169
|
try {
|
|
170
170
|
const a = t();
|
|
171
|
-
return
|
|
171
|
+
return Xt(n), a;
|
|
172
172
|
} catch (a) {
|
|
173
|
-
|
|
173
|
+
n || (W = null), S = null, It(a);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
if (
|
|
178
|
-
const e =
|
|
179
|
-
|
|
176
|
+
function Xt(t) {
|
|
177
|
+
if (S && (Lt(S), S = null), t) return;
|
|
178
|
+
const e = W;
|
|
179
|
+
W = null, e.length && J(() => Pt(e), !1);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Lt(t) {
|
|
182
182
|
for (let e = 0; e < t.length; e++) at(t[e]);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
let e,
|
|
184
|
+
function Zt(t) {
|
|
185
|
+
let e, n = 0;
|
|
186
186
|
for (e = 0; e < t.length; e++) {
|
|
187
187
|
const a = t[e];
|
|
188
|
-
a.user ? t[
|
|
188
|
+
a.user ? t[n++] = a : at(a);
|
|
189
189
|
}
|
|
190
|
-
for (e = 0; e <
|
|
190
|
+
for (e = 0; e < n; e++) at(t[e]);
|
|
191
191
|
}
|
|
192
192
|
function ot(t, e) {
|
|
193
193
|
t.state = 0;
|
|
194
|
-
for (let
|
|
195
|
-
const a = t.sources[
|
|
194
|
+
for (let n = 0; n < t.sources.length; n += 1) {
|
|
195
|
+
const a = t.sources[n];
|
|
196
196
|
if (a.sources) {
|
|
197
|
-
const
|
|
198
|
-
|
|
197
|
+
const r = a.state;
|
|
198
|
+
r === F ? a !== e && (!a.updatedAt || a.updatedAt < ct) && at(a) : r === rt && ot(a, e);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Vt(t) {
|
|
203
203
|
for (let e = 0; e < t.observers.length; e += 1) {
|
|
204
|
-
const
|
|
205
|
-
|
|
204
|
+
const n = t.observers[e];
|
|
205
|
+
n.state || (n.state = rt, n.pure ? S.push(n) : W.push(n), n.observers && Vt(n));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function H(t) {
|
|
209
209
|
let e;
|
|
210
210
|
if (t.sources)
|
|
211
211
|
for (; t.sources.length; ) {
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
214
|
-
const o =
|
|
215
|
-
a <
|
|
212
|
+
const n = t.sources.pop(), a = t.sourceSlots.pop(), r = n.observers;
|
|
213
|
+
if (r && r.length) {
|
|
214
|
+
const o = r.pop(), s = n.observerSlots.pop();
|
|
215
|
+
a < r.length && (o.sourceSlots[s] = a, r[a] = o, n.observerSlots[a] = s);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
if (t.tOwned) {
|
|
219
|
-
for (e = t.tOwned.length - 1; e >= 0; e--)
|
|
219
|
+
for (e = t.tOwned.length - 1; e >= 0; e--) H(t.tOwned[e]);
|
|
220
220
|
delete t.tOwned;
|
|
221
221
|
}
|
|
222
222
|
if (t.owned) {
|
|
223
|
-
for (e = t.owned.length - 1; e >= 0; e--)
|
|
223
|
+
for (e = t.owned.length - 1; e >= 0; e--) H(t.owned[e]);
|
|
224
224
|
t.owned = null;
|
|
225
225
|
}
|
|
226
226
|
if (t.cleanups) {
|
|
@@ -229,194 +229,182 @@ function X(t) {
|
|
|
229
229
|
}
|
|
230
230
|
t.state = 0;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Yt(t) {
|
|
233
233
|
return t instanceof Error ? t : new Error(typeof t == "string" ? t : "Unknown error", {
|
|
234
234
|
cause: t
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
throw
|
|
237
|
+
function It(t, e = _) {
|
|
238
|
+
throw Yt(t);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
if (typeof t == "function" && !t.length) return
|
|
240
|
+
function vt(t) {
|
|
241
|
+
if (typeof t == "function" && !t.length) return vt(t());
|
|
242
242
|
if (Array.isArray(t)) {
|
|
243
243
|
const e = [];
|
|
244
|
-
for (let
|
|
245
|
-
const a =
|
|
244
|
+
for (let n = 0; n < t.length; n++) {
|
|
245
|
+
const a = vt(t[n]);
|
|
246
246
|
Array.isArray(a) ? e.push.apply(e, a) : e.push(a);
|
|
247
247
|
}
|
|
248
248
|
return e;
|
|
249
249
|
}
|
|
250
250
|
return t;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function te(t, e) {
|
|
253
253
|
return function(a) {
|
|
254
|
-
let
|
|
255
|
-
return T(() =>
|
|
256
|
-
...
|
|
254
|
+
let r;
|
|
255
|
+
return T(() => r = L(() => (_.context = {
|
|
256
|
+
..._.context,
|
|
257
257
|
[t]: a.value
|
|
258
|
-
},
|
|
258
|
+
}, Jt(() => a.children))), void 0), r;
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
const
|
|
262
|
-
function
|
|
261
|
+
const ee = /* @__PURE__ */ Symbol("fallback");
|
|
262
|
+
function kt(t) {
|
|
263
263
|
for (let e = 0; e < t.length; e++) t[e]();
|
|
264
264
|
}
|
|
265
|
-
function ne(t, e,
|
|
266
|
-
let a = [],
|
|
267
|
-
return ut(() =>
|
|
268
|
-
let c = t() || [],
|
|
269
|
-
return c[Kt],
|
|
270
|
-
let $,
|
|
271
|
-
if (
|
|
272
|
-
s !== 0 && (
|
|
265
|
+
function ne(t, e, n = {}) {
|
|
266
|
+
let a = [], r = [], o = [], s = 0, i = e.length > 1 ? [] : null;
|
|
267
|
+
return ut(() => kt(o)), () => {
|
|
268
|
+
let c = t() || [], u = c.length, f, l;
|
|
269
|
+
return c[Kt], L(() => {
|
|
270
|
+
let w, $, m, E, g, d, p, x, C;
|
|
271
|
+
if (u === 0)
|
|
272
|
+
s !== 0 && (kt(o), o = [], a = [], r = [], s = 0, i && (i = [])), n.fallback && (a = [ee], r[0] = et((P) => (o[0] = P, n.fallback())), s = 1);
|
|
273
273
|
else if (s === 0) {
|
|
274
|
-
for (
|
|
275
|
-
a[l] = c[l],
|
|
276
|
-
s =
|
|
274
|
+
for (r = new Array(u), l = 0; l < u; l++)
|
|
275
|
+
a[l] = c[l], r[l] = et(k);
|
|
276
|
+
s = u;
|
|
277
277
|
} else {
|
|
278
|
-
for (
|
|
279
|
-
for (
|
|
280
|
-
|
|
281
|
-
for (
|
|
282
|
-
|
|
283
|
-
for (
|
|
284
|
-
|
|
285
|
-
for (l =
|
|
286
|
-
l in
|
|
287
|
-
|
|
278
|
+
for (m = new Array(u), E = new Array(u), i && (g = new Array(u)), d = 0, p = Math.min(s, u); d < p && a[d] === c[d]; d++) ;
|
|
279
|
+
for (p = s - 1, x = u - 1; p >= d && x >= d && a[p] === c[x]; p--, x--)
|
|
280
|
+
m[x] = r[p], E[x] = o[p], i && (g[x] = i[p]);
|
|
281
|
+
for (w = /* @__PURE__ */ new Map(), $ = new Array(x + 1), l = x; l >= d; l--)
|
|
282
|
+
C = c[l], f = w.get(C), $[l] = f === void 0 ? -1 : f, w.set(C, l);
|
|
283
|
+
for (f = d; f <= p; f++)
|
|
284
|
+
C = a[f], l = w.get(C), l !== void 0 && l !== -1 ? (m[l] = r[f], E[l] = o[f], i && (g[l] = i[f]), l = $[l], w.set(C, l)) : o[f]();
|
|
285
|
+
for (l = d; l < u; l++)
|
|
286
|
+
l in m ? (r[l] = m[l], o[l] = E[l], i && (i[l] = g[l], i[l](l))) : r[l] = et(k);
|
|
287
|
+
r = r.slice(0, s = u), a = c.slice(0);
|
|
288
288
|
}
|
|
289
|
-
return
|
|
289
|
+
return r;
|
|
290
290
|
});
|
|
291
|
-
function
|
|
292
|
-
if (o[l] =
|
|
293
|
-
const [
|
|
294
|
-
return i[l] =
|
|
291
|
+
function k(w) {
|
|
292
|
+
if (o[l] = w, i) {
|
|
293
|
+
const [$, m] = M(l);
|
|
294
|
+
return i[l] = m, e(c[l], $);
|
|
295
295
|
}
|
|
296
296
|
return e(c[l]);
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
return
|
|
300
|
+
function h(t, e) {
|
|
301
|
+
return L(() => t(e || {}));
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
function
|
|
303
|
+
const re = (t) => `Stale read from <${t}>.`;
|
|
304
|
+
function ae(t) {
|
|
305
305
|
const e = "fallback" in t && {
|
|
306
306
|
fallback: () => t.fallback
|
|
307
307
|
};
|
|
308
|
-
return
|
|
308
|
+
return B(ne(() => t.each, t.children, e || void 0));
|
|
309
309
|
}
|
|
310
|
-
function
|
|
311
|
-
const e = t.keyed,
|
|
312
|
-
equals: (
|
|
310
|
+
function Q(t) {
|
|
311
|
+
const e = t.keyed, n = B(() => t.when, void 0, void 0), a = e ? n : B(n, void 0, {
|
|
312
|
+
equals: (r, o) => !r == !o
|
|
313
313
|
});
|
|
314
|
-
return
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
314
|
+
return B(() => {
|
|
315
|
+
const r = a();
|
|
316
|
+
if (r) {
|
|
317
317
|
const o = t.children;
|
|
318
|
-
return typeof o == "function" && o.length > 0 ?
|
|
319
|
-
if (!
|
|
320
|
-
return
|
|
318
|
+
return typeof o == "function" && o.length > 0 ? L(() => o(e ? r : () => {
|
|
319
|
+
if (!L(a)) throw re("Show");
|
|
320
|
+
return n();
|
|
321
321
|
})) : o;
|
|
322
322
|
}
|
|
323
323
|
return t.fallback;
|
|
324
324
|
}, void 0, void 0);
|
|
325
325
|
}
|
|
326
|
-
const
|
|
327
|
-
function
|
|
328
|
-
let a =
|
|
329
|
-
for (; s <
|
|
330
|
-
if (e[s] ===
|
|
326
|
+
const Ct = (t) => B(() => t());
|
|
327
|
+
function oe(t, e, n) {
|
|
328
|
+
let a = n.length, r = e.length, o = a, s = 0, i = 0, c = e[r - 1].nextSibling, u = null;
|
|
329
|
+
for (; s < r || i < o; ) {
|
|
330
|
+
if (e[s] === n[i]) {
|
|
331
331
|
s++, i++;
|
|
332
332
|
continue;
|
|
333
333
|
}
|
|
334
|
-
for (; e[
|
|
335
|
-
|
|
336
|
-
if (
|
|
337
|
-
const
|
|
338
|
-
for (; i < o; ) t.insertBefore(
|
|
334
|
+
for (; e[r - 1] === n[o - 1]; )
|
|
335
|
+
r--, o--;
|
|
336
|
+
if (r === s) {
|
|
337
|
+
const f = o < a ? i ? n[i - 1].nextSibling : n[o - i] : c;
|
|
338
|
+
for (; i < o; ) t.insertBefore(n[i++], f);
|
|
339
339
|
} else if (o === i)
|
|
340
|
-
for (; s <
|
|
341
|
-
(!
|
|
342
|
-
else if (e[s] ===
|
|
343
|
-
const
|
|
344
|
-
t.insertBefore(
|
|
340
|
+
for (; s < r; )
|
|
341
|
+
(!u || !u.has(e[s])) && e[s].remove(), s++;
|
|
342
|
+
else if (e[s] === n[o - 1] && n[i] === e[r - 1]) {
|
|
343
|
+
const f = e[--r].nextSibling;
|
|
344
|
+
t.insertBefore(n[i++], e[s++].nextSibling), t.insertBefore(n[--o], f), e[r] = n[o];
|
|
345
345
|
} else {
|
|
346
|
-
if (!
|
|
347
|
-
|
|
346
|
+
if (!u) {
|
|
347
|
+
u = /* @__PURE__ */ new Map();
|
|
348
348
|
let l = i;
|
|
349
|
-
for (; l < o; )
|
|
349
|
+
for (; l < o; ) u.set(n[l], l++);
|
|
350
350
|
}
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
353
|
-
if (i <
|
|
354
|
-
let l = s,
|
|
355
|
-
for (; ++l <
|
|
356
|
-
|
|
357
|
-
if (
|
|
358
|
-
const
|
|
359
|
-
for (; i <
|
|
360
|
-
} else t.replaceChild(
|
|
351
|
+
const f = u.get(e[s]);
|
|
352
|
+
if (f != null)
|
|
353
|
+
if (i < f && f < o) {
|
|
354
|
+
let l = s, k = 1, w;
|
|
355
|
+
for (; ++l < r && l < o && !((w = u.get(e[l])) == null || w !== f + k); )
|
|
356
|
+
k++;
|
|
357
|
+
if (k > f - i) {
|
|
358
|
+
const $ = e[s];
|
|
359
|
+
for (; i < f; ) t.insertBefore(n[i++], $);
|
|
360
|
+
} else t.replaceChild(n[i++], e[s++]);
|
|
361
361
|
} else s++;
|
|
362
362
|
else e[s++].remove();
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
const
|
|
367
|
-
function
|
|
368
|
-
let
|
|
366
|
+
const St = "_$DX_DELEGATE";
|
|
367
|
+
function V(t, e, n, a) {
|
|
368
|
+
let r;
|
|
369
369
|
const o = () => {
|
|
370
370
|
const i = document.createElement("template");
|
|
371
371
|
return i.innerHTML = t, i.content.firstChild;
|
|
372
|
-
}, s = () => (
|
|
372
|
+
}, s = () => (r || (r = o())).cloneNode(!0);
|
|
373
373
|
return s.cloneNode = s, s;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
const
|
|
377
|
-
for (let a = 0,
|
|
375
|
+
function ie(t, e = window.document) {
|
|
376
|
+
const n = e[St] || (e[St] = /* @__PURE__ */ new Set());
|
|
377
|
+
for (let a = 0, r = t.length; a < r; a++) {
|
|
378
378
|
const o = t[a];
|
|
379
|
-
|
|
379
|
+
n.has(o) || (n.add(o), e.addEventListener(o, le));
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
382
|
+
function gt(t, e, n) {
|
|
383
|
+
n == null ? t.removeAttribute(e) : t.setAttribute(e, n);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function wt(t, e) {
|
|
386
386
|
e == null ? t.removeAttribute("class") : t.className = e;
|
|
387
387
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
390
|
-
const a = t.style;
|
|
391
|
-
if (typeof e == "string") return a.cssText = e;
|
|
392
|
-
typeof r == "string" && (a.cssText = r = void 0), r || (r = {}), e || (e = {});
|
|
393
|
-
let n, o;
|
|
394
|
-
for (o in r)
|
|
395
|
-
e[o] == null && a.removeProperty(o), delete r[o];
|
|
396
|
-
for (o in e)
|
|
397
|
-
n = e[o], n !== r[o] && (a.setProperty(o, n), r[o] = n);
|
|
398
|
-
return r;
|
|
399
|
-
}
|
|
400
|
-
function le(t, e, r) {
|
|
401
|
-
r != null ? t.style.setProperty(e, r) : t.style.removeProperty(e);
|
|
388
|
+
function se(t, e, n) {
|
|
389
|
+
n != null ? t.style.setProperty(e, n) : t.style.removeProperty(e);
|
|
402
390
|
}
|
|
403
|
-
function
|
|
404
|
-
return
|
|
391
|
+
function pt(t, e, n) {
|
|
392
|
+
return L(() => t(e, n));
|
|
405
393
|
}
|
|
406
|
-
function
|
|
407
|
-
if (
|
|
408
|
-
T((
|
|
394
|
+
function y(t, e, n, a) {
|
|
395
|
+
if (n !== void 0 && !a && (a = []), typeof e != "function") return it(t, e, a, n);
|
|
396
|
+
T((r) => it(t, e(), r, n), a);
|
|
409
397
|
}
|
|
410
|
-
function
|
|
398
|
+
function le(t) {
|
|
411
399
|
let e = t.target;
|
|
412
|
-
const
|
|
400
|
+
const n = `$$${t.type}`, a = t.target, r = t.currentTarget, o = (c) => Object.defineProperty(t, "target", {
|
|
413
401
|
configurable: !0,
|
|
414
402
|
value: c
|
|
415
403
|
}), s = () => {
|
|
416
|
-
const c = e[
|
|
404
|
+
const c = e[n];
|
|
417
405
|
if (c && !e.disabled) {
|
|
418
|
-
const
|
|
419
|
-
if (
|
|
406
|
+
const u = e[`${n}Data`];
|
|
407
|
+
if (u !== void 0 ? c.call(e, u, t) : c.call(e, t), t.cancelBubble) return;
|
|
420
408
|
}
|
|
421
409
|
return e.host && typeof e.host != "string" && !e.host._$host && e.contains(t.target) && o(e.host), !0;
|
|
422
410
|
}, i = () => {
|
|
@@ -430,132 +418,132 @@ function ue(t) {
|
|
|
430
418
|
}), t.composedPath) {
|
|
431
419
|
const c = t.composedPath();
|
|
432
420
|
o(c[0]);
|
|
433
|
-
for (let
|
|
421
|
+
for (let u = 0; u < c.length - 2 && (e = c[u], !!s()); u++) {
|
|
434
422
|
if (e._$host) {
|
|
435
423
|
e = e._$host, i();
|
|
436
424
|
break;
|
|
437
425
|
}
|
|
438
|
-
if (e.parentNode ===
|
|
426
|
+
if (e.parentNode === r)
|
|
439
427
|
break;
|
|
440
428
|
}
|
|
441
429
|
} else i();
|
|
442
430
|
o(a);
|
|
443
431
|
}
|
|
444
|
-
function it(t, e,
|
|
445
|
-
for (; typeof
|
|
446
|
-
if (e ===
|
|
432
|
+
function it(t, e, n, a, r) {
|
|
433
|
+
for (; typeof n == "function"; ) n = n();
|
|
434
|
+
if (e === n) return n;
|
|
447
435
|
const o = typeof e, s = a !== void 0;
|
|
448
|
-
if (t = s &&
|
|
449
|
-
if (o === "number" && (e = e.toString(), e ===
|
|
450
|
-
return
|
|
436
|
+
if (t = s && n[0] && n[0].parentNode || t, o === "string" || o === "number") {
|
|
437
|
+
if (o === "number" && (e = e.toString(), e === n))
|
|
438
|
+
return n;
|
|
451
439
|
if (s) {
|
|
452
|
-
let i =
|
|
453
|
-
i && i.nodeType === 3 ? i.data !== e && (i.data = e) : i = document.createTextNode(e),
|
|
440
|
+
let i = n[0];
|
|
441
|
+
i && i.nodeType === 3 ? i.data !== e && (i.data = e) : i = document.createTextNode(e), n = D(t, n, a, i);
|
|
454
442
|
} else
|
|
455
|
-
|
|
443
|
+
n !== "" && typeof n == "string" ? n = t.firstChild.data = e : n = t.textContent = e;
|
|
456
444
|
} else if (e == null || o === "boolean")
|
|
457
|
-
|
|
445
|
+
n = D(t, n, a);
|
|
458
446
|
else {
|
|
459
447
|
if (o === "function")
|
|
460
448
|
return T(() => {
|
|
461
449
|
let i = e();
|
|
462
450
|
for (; typeof i == "function"; ) i = i();
|
|
463
|
-
|
|
464
|
-
}), () =>
|
|
451
|
+
n = it(t, i, n, a);
|
|
452
|
+
}), () => n;
|
|
465
453
|
if (Array.isArray(e)) {
|
|
466
|
-
const i = [], c =
|
|
467
|
-
if (
|
|
468
|
-
return T(() =>
|
|
454
|
+
const i = [], c = n && Array.isArray(n);
|
|
455
|
+
if (mt(i, e, n, r))
|
|
456
|
+
return T(() => n = it(t, i, n, a, !0)), () => n;
|
|
469
457
|
if (i.length === 0) {
|
|
470
|
-
if (
|
|
471
|
-
} else c ?
|
|
472
|
-
|
|
458
|
+
if (n = D(t, n, a), s) return n;
|
|
459
|
+
} else c ? n.length === 0 ? At(t, i, a) : oe(t, n, i) : (n && D(t), At(t, i));
|
|
460
|
+
n = i;
|
|
473
461
|
} else if (e.nodeType) {
|
|
474
|
-
if (Array.isArray(
|
|
475
|
-
if (s) return
|
|
476
|
-
|
|
477
|
-
} else
|
|
478
|
-
|
|
462
|
+
if (Array.isArray(n)) {
|
|
463
|
+
if (s) return n = D(t, n, a, e);
|
|
464
|
+
D(t, n, null, e);
|
|
465
|
+
} else n == null || n === "" || !t.firstChild ? t.appendChild(e) : t.replaceChild(e, t.firstChild);
|
|
466
|
+
n = e;
|
|
479
467
|
}
|
|
480
468
|
}
|
|
481
|
-
return
|
|
469
|
+
return n;
|
|
482
470
|
}
|
|
483
|
-
function
|
|
484
|
-
let
|
|
471
|
+
function mt(t, e, n, a) {
|
|
472
|
+
let r = !1;
|
|
485
473
|
for (let o = 0, s = e.length; o < s; o++) {
|
|
486
|
-
let i = e[o], c =
|
|
487
|
-
if (!(i == null || i === !0 || i === !1)) if ((
|
|
474
|
+
let i = e[o], c = n && n[t.length], u;
|
|
475
|
+
if (!(i == null || i === !0 || i === !1)) if ((u = typeof i) == "object" && i.nodeType)
|
|
488
476
|
t.push(i);
|
|
489
477
|
else if (Array.isArray(i))
|
|
490
|
-
|
|
491
|
-
else if (
|
|
478
|
+
r = mt(t, i, c) || r;
|
|
479
|
+
else if (u === "function")
|
|
492
480
|
if (a) {
|
|
493
481
|
for (; typeof i == "function"; ) i = i();
|
|
494
|
-
|
|
482
|
+
r = mt(t, Array.isArray(i) ? i : [i], Array.isArray(c) ? c : [c]) || r;
|
|
495
483
|
} else
|
|
496
|
-
t.push(i),
|
|
484
|
+
t.push(i), r = !0;
|
|
497
485
|
else {
|
|
498
|
-
const
|
|
499
|
-
c && c.nodeType === 3 && c.data ===
|
|
486
|
+
const f = String(i);
|
|
487
|
+
c && c.nodeType === 3 && c.data === f ? t.push(c) : t.push(document.createTextNode(f));
|
|
500
488
|
}
|
|
501
489
|
}
|
|
502
|
-
return
|
|
490
|
+
return r;
|
|
503
491
|
}
|
|
504
|
-
function
|
|
505
|
-
for (let a = 0,
|
|
492
|
+
function At(t, e, n = null) {
|
|
493
|
+
for (let a = 0, r = e.length; a < r; a++) t.insertBefore(e[a], n);
|
|
506
494
|
}
|
|
507
|
-
function
|
|
508
|
-
if (
|
|
509
|
-
const
|
|
495
|
+
function D(t, e, n, a) {
|
|
496
|
+
if (n === void 0) return t.textContent = "";
|
|
497
|
+
const r = a || document.createTextNode("");
|
|
510
498
|
if (e.length) {
|
|
511
499
|
let o = !1;
|
|
512
500
|
for (let s = e.length - 1; s >= 0; s--) {
|
|
513
501
|
const i = e[s];
|
|
514
|
-
if (
|
|
502
|
+
if (r !== i) {
|
|
515
503
|
const c = i.parentNode === t;
|
|
516
|
-
!o && !s ? c ? t.replaceChild(
|
|
504
|
+
!o && !s ? c ? t.replaceChild(r, i) : t.insertBefore(r, n) : c && i.remove();
|
|
517
505
|
} else o = !0;
|
|
518
506
|
}
|
|
519
|
-
} else t.insertBefore(
|
|
520
|
-
return [
|
|
507
|
+
} else t.insertBefore(r, n);
|
|
508
|
+
return [r];
|
|
521
509
|
}
|
|
522
|
-
function
|
|
523
|
-
return Object.keys(t).reduce((
|
|
524
|
-
const
|
|
525
|
-
return
|
|
510
|
+
function ce(t) {
|
|
511
|
+
return Object.keys(t).reduce((n, a) => {
|
|
512
|
+
const r = t[a];
|
|
513
|
+
return n[a] = Object.assign({}, r), Ot(r.value) && !ge(r.value) && !Array.isArray(r.value) && (n[a].value = Object.assign({}, r.value)), Array.isArray(r.value) && (n[a].value = r.value.slice(0)), n;
|
|
526
514
|
}, {});
|
|
527
515
|
}
|
|
528
|
-
function
|
|
529
|
-
return t ? Object.keys(t).reduce((
|
|
530
|
-
const
|
|
531
|
-
return
|
|
532
|
-
value:
|
|
533
|
-
},
|
|
516
|
+
function ue(t) {
|
|
517
|
+
return t ? Object.keys(t).reduce((n, a) => {
|
|
518
|
+
const r = t[a];
|
|
519
|
+
return n[a] = Ot(r) && "value" in r ? r : {
|
|
520
|
+
value: r
|
|
521
|
+
}, n[a].attribute || (n[a].attribute = he(a)), n[a].parse = "parse" in n[a] ? n[a].parse : typeof n[a].value != "string", n;
|
|
534
522
|
}, {}) : {};
|
|
535
523
|
}
|
|
536
|
-
function
|
|
537
|
-
return Object.keys(t).reduce((
|
|
524
|
+
function fe(t) {
|
|
525
|
+
return Object.keys(t).reduce((n, a) => (n[a] = t[a].value, n), {});
|
|
538
526
|
}
|
|
539
|
-
function
|
|
540
|
-
const
|
|
541
|
-
return Object.keys(e).forEach((
|
|
542
|
-
const o = r
|
|
543
|
-
s != null && (o.value = o.parse ?
|
|
527
|
+
function de(t, e) {
|
|
528
|
+
const n = ce(e);
|
|
529
|
+
return Object.keys(e).forEach((r) => {
|
|
530
|
+
const o = n[r], s = t.getAttribute(o.attribute), i = t[r];
|
|
531
|
+
s != null && (o.value = o.parse ? zt(s) : s), i != null && (o.value = Array.isArray(i) ? i.slice(0) : i), o.reflect && $t(t, o.attribute, o.value, !!o.parse), Object.defineProperty(t, r, {
|
|
544
532
|
get() {
|
|
545
533
|
return o.value;
|
|
546
534
|
},
|
|
547
535
|
set(c) {
|
|
548
|
-
const
|
|
549
|
-
o.value = c, o.reflect &&
|
|
550
|
-
for (let
|
|
551
|
-
this.__propertyChangedCallbacks[
|
|
536
|
+
const u = o.value;
|
|
537
|
+
o.value = c, o.reflect && $t(this, o.attribute, o.value, !!o.parse);
|
|
538
|
+
for (let f = 0, l = this.__propertyChangedCallbacks.length; f < l; f++)
|
|
539
|
+
this.__propertyChangedCallbacks[f](r, c, u);
|
|
552
540
|
},
|
|
553
541
|
enumerable: !0,
|
|
554
542
|
configurable: !0
|
|
555
543
|
});
|
|
556
|
-
}),
|
|
544
|
+
}), n;
|
|
557
545
|
}
|
|
558
|
-
function
|
|
546
|
+
function zt(t) {
|
|
559
547
|
if (t)
|
|
560
548
|
try {
|
|
561
549
|
return JSON.parse(t);
|
|
@@ -563,339 +551,313 @@ function Lt(t) {
|
|
|
563
551
|
return t;
|
|
564
552
|
}
|
|
565
553
|
}
|
|
566
|
-
function
|
|
567
|
-
if (
|
|
568
|
-
let
|
|
569
|
-
t.__updating[e] = !0,
|
|
554
|
+
function $t(t, e, n, a) {
|
|
555
|
+
if (n == null || n === !1) return t.removeAttribute(e);
|
|
556
|
+
let r = a ? JSON.stringify(n) : n;
|
|
557
|
+
t.__updating[e] = !0, r === "true" && (r = ""), t.setAttribute(e, r), Promise.resolve().then(() => delete t.__updating[e]);
|
|
570
558
|
}
|
|
571
|
-
function
|
|
572
|
-
return t.replace(/\.?([A-Z]+)/g, (e,
|
|
559
|
+
function he(t) {
|
|
560
|
+
return t.replace(/\.?([A-Z]+)/g, (e, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, "");
|
|
573
561
|
}
|
|
574
|
-
function
|
|
562
|
+
function Ot(t) {
|
|
575
563
|
return t != null && (typeof t == "object" || typeof t == "function");
|
|
576
564
|
}
|
|
577
|
-
function
|
|
565
|
+
function ge(t) {
|
|
578
566
|
return Object.prototype.toString.call(t) === "[object Function]";
|
|
579
567
|
}
|
|
580
|
-
function
|
|
568
|
+
function pe(t) {
|
|
581
569
|
return typeof t == "function" && t.toString().indexOf("class") === 0;
|
|
582
570
|
}
|
|
583
|
-
let
|
|
584
|
-
function
|
|
585
|
-
const
|
|
571
|
+
let _t;
|
|
572
|
+
function _e(t, e) {
|
|
573
|
+
const n = Object.keys(e);
|
|
586
574
|
return class extends t {
|
|
587
575
|
static get observedAttributes() {
|
|
588
|
-
return
|
|
576
|
+
return n.map((r) => e[r].attribute);
|
|
589
577
|
}
|
|
590
578
|
constructor() {
|
|
591
579
|
super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
|
|
592
|
-
for (let
|
|
593
|
-
this[
|
|
580
|
+
for (let r of n)
|
|
581
|
+
this[r] = void 0;
|
|
594
582
|
}
|
|
595
583
|
connectedCallback() {
|
|
596
584
|
if (this.__initialized) return;
|
|
597
|
-
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props =
|
|
598
|
-
const
|
|
585
|
+
this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = de(this, e);
|
|
586
|
+
const r = fe(this.props), o = this.Component, s = _t;
|
|
599
587
|
try {
|
|
600
|
-
|
|
588
|
+
_t = this, this.__initialized = !0, pe(o) ? new o(r, {
|
|
601
589
|
element: this
|
|
602
|
-
}) : o(
|
|
590
|
+
}) : o(r, {
|
|
603
591
|
element: this
|
|
604
592
|
});
|
|
605
593
|
} finally {
|
|
606
|
-
|
|
594
|
+
_t = s;
|
|
607
595
|
}
|
|
608
596
|
}
|
|
609
597
|
async disconnectedCallback() {
|
|
610
598
|
if (await Promise.resolve(), this.isConnected) return;
|
|
611
599
|
this.__propertyChangedCallbacks.length = 0;
|
|
612
|
-
let
|
|
613
|
-
for (;
|
|
600
|
+
let r = null;
|
|
601
|
+
for (; r = this.__releaseCallbacks.pop(); ) r(this);
|
|
614
602
|
delete this.__initialized, this.__released = !0;
|
|
615
603
|
}
|
|
616
|
-
attributeChangedCallback(
|
|
617
|
-
if (this.__initialized && !this.__updating[
|
|
618
|
-
if (s == null && !this[
|
|
619
|
-
this[
|
|
604
|
+
attributeChangedCallback(r, o, s) {
|
|
605
|
+
if (this.__initialized && !this.__updating[r] && (r = this.lookupProp(r), r in e)) {
|
|
606
|
+
if (s == null && !this[r]) return;
|
|
607
|
+
this[r] = e[r].parse ? zt(s) : s;
|
|
620
608
|
}
|
|
621
609
|
}
|
|
622
|
-
lookupProp(
|
|
610
|
+
lookupProp(r) {
|
|
623
611
|
if (e)
|
|
624
|
-
return
|
|
612
|
+
return n.find((o) => r === o || r === e[o].attribute);
|
|
625
613
|
}
|
|
626
614
|
get renderRoot() {
|
|
627
615
|
return this.shadowRoot || this.attachShadow({
|
|
628
616
|
mode: "open"
|
|
629
617
|
});
|
|
630
618
|
}
|
|
631
|
-
addReleaseCallback(
|
|
632
|
-
this.__releaseCallbacks.push(
|
|
619
|
+
addReleaseCallback(r) {
|
|
620
|
+
this.__releaseCallbacks.push(r);
|
|
633
621
|
}
|
|
634
|
-
addPropertyChangedCallback(
|
|
635
|
-
this.__propertyChangedCallbacks.push(
|
|
622
|
+
addPropertyChangedCallback(r) {
|
|
623
|
+
this.__propertyChangedCallbacks.push(r);
|
|
636
624
|
}
|
|
637
625
|
};
|
|
638
626
|
}
|
|
639
|
-
function
|
|
627
|
+
function be(t, e = {}, n = {}) {
|
|
640
628
|
const {
|
|
641
629
|
BaseElement: a = HTMLElement,
|
|
642
|
-
extension:
|
|
630
|
+
extension: r,
|
|
643
631
|
customElements: o = window.customElements
|
|
644
|
-
} =
|
|
632
|
+
} = n;
|
|
645
633
|
return (s) => {
|
|
646
634
|
let i = o.get(t);
|
|
647
|
-
return i ? (i.prototype.Component = s, i) : (i =
|
|
635
|
+
return i ? (i.prototype.Component = s, i) : (i = _e(a, ue(e)), i.prototype.Component = s, i.prototype.registeredTag = t, o.define(t, i, r), i);
|
|
648
636
|
};
|
|
649
637
|
}
|
|
650
|
-
function
|
|
651
|
-
const e = Object.keys(t),
|
|
638
|
+
function ve(t) {
|
|
639
|
+
const e = Object.keys(t), n = {};
|
|
652
640
|
for (let a = 0; a < e.length; a++) {
|
|
653
|
-
const [
|
|
654
|
-
Object.defineProperty(
|
|
655
|
-
get:
|
|
641
|
+
const [r, o] = M(t[e[a]]);
|
|
642
|
+
Object.defineProperty(n, e[a], {
|
|
643
|
+
get: r,
|
|
656
644
|
set(s) {
|
|
657
645
|
o(() => s);
|
|
658
646
|
}
|
|
659
647
|
});
|
|
660
648
|
}
|
|
661
|
-
return
|
|
649
|
+
return n;
|
|
662
650
|
}
|
|
663
|
-
function
|
|
651
|
+
function we(t) {
|
|
664
652
|
if (t.assignedSlot && t.assignedSlot._$owner) return t.assignedSlot._$owner;
|
|
665
653
|
let e = t.parentNode;
|
|
666
654
|
for (; e && !e._$owner && !(e.assignedSlot && e.assignedSlot._$owner); )
|
|
667
655
|
e = e.parentNode;
|
|
668
656
|
return e && e.assignedSlot ? e.assignedSlot._$owner : t._$owner;
|
|
669
657
|
}
|
|
670
|
-
function
|
|
671
|
-
return (e,
|
|
672
|
-
const { element: a } =
|
|
673
|
-
return
|
|
674
|
-
const o =
|
|
658
|
+
function me(t) {
|
|
659
|
+
return (e, n) => {
|
|
660
|
+
const { element: a } = n;
|
|
661
|
+
return et((r) => {
|
|
662
|
+
const o = ve(e);
|
|
675
663
|
a.addPropertyChangedCallback((i, c) => o[i] = c), a.addReleaseCallback(() => {
|
|
676
|
-
a.renderRoot.textContent = "",
|
|
664
|
+
a.renderRoot.textContent = "", r();
|
|
677
665
|
});
|
|
678
|
-
const s = t(o,
|
|
679
|
-
return
|
|
680
|
-
},
|
|
666
|
+
const s = t(o, n);
|
|
667
|
+
return y(a.renderRoot, s);
|
|
668
|
+
}, we(a));
|
|
681
669
|
};
|
|
682
670
|
}
|
|
683
|
-
function
|
|
684
|
-
return arguments.length === 2 && (
|
|
671
|
+
function ye(t, e, n) {
|
|
672
|
+
return arguments.length === 2 && (n = e, e = {}), be(t, e)(me(n));
|
|
685
673
|
}
|
|
686
|
-
function
|
|
687
|
-
const [e,
|
|
674
|
+
function U(t) {
|
|
675
|
+
const [e, n] = M(t.peek(), { equals: !1 }), a = t.subscribe((r) => n(() => r));
|
|
688
676
|
return ut(() => a()), e;
|
|
689
677
|
}
|
|
690
|
-
const st =
|
|
691
|
-
function
|
|
692
|
-
const [e,
|
|
693
|
-
t.moqWatch.paused
|
|
694
|
-
},
|
|
678
|
+
const st = Gt();
|
|
679
|
+
function xe(t) {
|
|
680
|
+
const [e, n] = M("no-url"), [a, r] = M(!1), o = U(t.moqWatch.backend.audio.muted), [s, i] = M(0), c = U(t.moqWatch.backend.video.stalled), u = U(t.moqWatch.backend.jitter), [f, l] = M([]), k = U(t.moqWatch.backend.video.source.track), [w, $] = M(!1), [m, E] = M(!!document.fullscreenElement), g = () => {
|
|
681
|
+
t.moqWatch.paused = !t.moqWatch.paused;
|
|
682
|
+
}, d = () => {
|
|
695
683
|
document.fullscreenElement ? document.exitFullscreen() : t.moqWatch.requestFullscreen();
|
|
696
|
-
},
|
|
697
|
-
t.moqWatch.audio.volume.set(
|
|
698
|
-
},
|
|
699
|
-
t.moqWatch.audio.muted.update((
|
|
700
|
-
},
|
|
701
|
-
t.moqWatch.jitter
|
|
702
|
-
},
|
|
703
|
-
t.moqWatch.video.source.target.update((
|
|
704
|
-
...
|
|
705
|
-
name:
|
|
684
|
+
}, p = (b) => {
|
|
685
|
+
t.moqWatch.backend.audio.volume.set(b / 100);
|
|
686
|
+
}, x = () => {
|
|
687
|
+
t.moqWatch.backend.audio.muted.update((b) => !b);
|
|
688
|
+
}, C = (b) => {
|
|
689
|
+
t.moqWatch.jitter = b;
|
|
690
|
+
}, P = (b) => {
|
|
691
|
+
t.moqWatch.backend.video.source.target.update((q) => ({
|
|
692
|
+
...q,
|
|
693
|
+
name: b
|
|
706
694
|
}));
|
|
707
|
-
},
|
|
695
|
+
}, I = U(t.moqWatch.backend.video.timestamp), ft = U(t.moqWatch.backend.video.buffered), X = U(t.moqWatch.backend.audio.buffered), dt = {
|
|
708
696
|
moqWatch: t.moqWatch,
|
|
709
697
|
watchStatus: e,
|
|
710
|
-
togglePlayback:
|
|
698
|
+
togglePlayback: g,
|
|
711
699
|
isPlaying: a,
|
|
712
|
-
setVolume:
|
|
700
|
+
setVolume: p,
|
|
713
701
|
isMuted: o,
|
|
714
702
|
currentVolume: s,
|
|
715
|
-
toggleMuted:
|
|
703
|
+
toggleMuted: x,
|
|
716
704
|
buffering: c,
|
|
717
|
-
jitter:
|
|
718
|
-
setJitter:
|
|
719
|
-
availableRenditions:
|
|
720
|
-
activeRendition:
|
|
721
|
-
setActiveRendition:
|
|
722
|
-
isStatsPanelVisible:
|
|
723
|
-
setIsStatsPanelVisible:
|
|
724
|
-
isFullscreen:
|
|
725
|
-
toggleFullscreen:
|
|
726
|
-
timestamp:
|
|
727
|
-
videoBuffered:
|
|
728
|
-
audioBuffered:
|
|
729
|
-
},
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
}),
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
}),
|
|
737
|
-
const
|
|
738
|
-
i(
|
|
739
|
-
}),
|
|
740
|
-
const
|
|
741
|
-
name:
|
|
742
|
-
width:
|
|
743
|
-
height:
|
|
705
|
+
jitter: u,
|
|
706
|
+
setJitter: C,
|
|
707
|
+
availableRenditions: f,
|
|
708
|
+
activeRendition: k,
|
|
709
|
+
setActiveRendition: P,
|
|
710
|
+
isStatsPanelVisible: w,
|
|
711
|
+
setIsStatsPanelVisible: $,
|
|
712
|
+
isFullscreen: m,
|
|
713
|
+
toggleFullscreen: d,
|
|
714
|
+
timestamp: I,
|
|
715
|
+
videoBuffered: ft,
|
|
716
|
+
audioBuffered: X
|
|
717
|
+
}, R = t.moqWatch, z = new Ft.Effect();
|
|
718
|
+
z.run((b) => {
|
|
719
|
+
const q = b.get(R.connection.url), A = b.get(R.connection.status), O = b.get(R.broadcast.status);
|
|
720
|
+
q ? A === "disconnected" ? n("disconnected") : A === "connecting" ? n("connecting") : O === "offline" ? n("offline") : O === "loading" ? n("loading") : O === "live" ? n("live") : A === "connected" && n("connected") : n("no-url");
|
|
721
|
+
}), z.run((b) => {
|
|
722
|
+
const q = b.get(R.backend.paused);
|
|
723
|
+
r(!q);
|
|
724
|
+
}), z.run((b) => {
|
|
725
|
+
const q = b.get(R.backend.audio.volume);
|
|
726
|
+
i(q * 100);
|
|
727
|
+
}), z.run((b) => {
|
|
728
|
+
const A = b.get(R.backend.video.source.catalog)?.renditions ?? {}, O = Object.entries(A).map(([Y, K]) => ({
|
|
729
|
+
name: Y,
|
|
730
|
+
width: K.codedWidth,
|
|
731
|
+
height: K.codedHeight,
|
|
732
|
+
bitrate: K.bitrate
|
|
744
733
|
}));
|
|
745
|
-
l(
|
|
734
|
+
l(O);
|
|
746
735
|
});
|
|
747
|
-
const
|
|
736
|
+
const Z = () => {
|
|
748
737
|
E(!!document.fullscreenElement);
|
|
749
738
|
};
|
|
750
|
-
return
|
|
751
|
-
value:
|
|
739
|
+
return z.event(document, "fullscreenchange", Z), ut(() => z.close()), h(st.Provider, {
|
|
740
|
+
value: dt,
|
|
752
741
|
get children() {
|
|
753
742
|
return t.children;
|
|
754
743
|
}
|
|
755
744
|
});
|
|
756
745
|
}
|
|
757
|
-
function
|
|
758
|
-
const t =
|
|
746
|
+
function N() {
|
|
747
|
+
const t = jt(st);
|
|
759
748
|
if (!t)
|
|
760
749
|
throw new Error("useWatchUIContext must be used within a WatchUIContextProvider");
|
|
761
750
|
return t;
|
|
762
751
|
}
|
|
763
|
-
var
|
|
764
|
-
function
|
|
765
|
-
const t =
|
|
766
|
-
return
|
|
752
|
+
var ke = /* @__PURE__ */ V('<div class="watch-ui__buffering flex--center"><div class=watch-ui__buffering-spinner>');
|
|
753
|
+
function Ce() {
|
|
754
|
+
const t = N();
|
|
755
|
+
return h(Q, {
|
|
767
756
|
get when() {
|
|
768
757
|
return t.buffering();
|
|
769
758
|
},
|
|
770
759
|
get children() {
|
|
771
|
-
return
|
|
760
|
+
return ke();
|
|
772
761
|
}
|
|
773
762
|
});
|
|
774
763
|
}
|
|
775
|
-
var
|
|
776
|
-
const
|
|
777
|
-
function
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
764
|
+
var Se = /* @__PURE__ */ V('<div class=watch-ui__buffer><div role=slider tabindex=0 aria-label="Buffer jitter"><div class=watch-ui__buffer-playhead></div><div class="watch-ui__buffer-track watch-ui__buffer-track--video"><span class=watch-ui__buffer-track-label>Video</span><canvas class=watch-ui__buffer-canvas></canvas></div><div class="watch-ui__buffer-track watch-ui__buffer-track--audio"><span class=watch-ui__buffer-track-label>Audio</span><canvas class=watch-ui__buffer-canvas></canvas></div><div class=watch-ui__buffer-target-area><div class=watch-ui__buffer-target-line><span class=watch-ui__buffer-target-label>');
|
|
765
|
+
const bt = 0, tt = 100;
|
|
766
|
+
function Et(t, e, n, a, r) {
|
|
767
|
+
const o = t.getContext("2d");
|
|
768
|
+
if (!o) return;
|
|
769
|
+
const s = window.devicePixelRatio || 1, i = t.getBoundingClientRect(), c = i.width, u = i.height, f = Math.round(c * s), l = Math.round(u * s);
|
|
770
|
+
if ((t.width !== f || t.height !== l) && (t.width = f, t.height = l), o.setTransform(s, 0, 0, s, 0, 0), o.clearRect(0, 0, c, u), n === void 0) return;
|
|
771
|
+
const k = 2, w = u - k * 2, $ = 2;
|
|
772
|
+
for (let m = 0; m < e.length; m++) {
|
|
773
|
+
const E = e[m], g = E.start - n, d = E.end - n, p = Math.max(0, g), x = Math.min(d, a);
|
|
774
|
+
if (x <= p) continue;
|
|
775
|
+
const C = p / a * c, P = Math.max(2, (x - p) / a * c);
|
|
776
|
+
if (o.globalAlpha = 0.85, o.fillStyle = r ? "#f87171" : m > 0 ? "#facc15" : "#4ade80", typeof o.roundRect == "function" ? (o.beginPath(), o.roundRect(C, k, P, w, $), o.fill()) : o.fillRect(C, k, P, w), d > a) {
|
|
777
|
+
const I = ((d - a) / 1e3).toFixed(1);
|
|
778
|
+
o.globalAlpha = 0.7, o.fillStyle = "black", o.font = "500 9px system-ui, sans-serif", o.textAlign = "right", o.textBaseline = "middle", o.fillText(`+${I}s`, C + P - 4, u / 2);
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
function Ae(t) {
|
|
783
|
+
const e = N(), n = () => t.max ?? 5e3, [a, r] = M(!1), o = B(() => e.jitter() / n() * 100);
|
|
784
|
+
let s, i, c;
|
|
785
|
+
const u = 48, f = (g) => {
|
|
786
|
+
if (!s) return;
|
|
787
|
+
const d = s.getBoundingClientRect(), p = d.width - u, C = Math.max(0, Math.min(g - d.left - u, p)) / p * n(), P = Math.round(C / tt) * tt, I = Math.max(bt, Math.min(n(), P));
|
|
788
|
+
e.setJitter(I);
|
|
789
|
+
}, l = (g) => {
|
|
790
|
+
r(!0), f(g.clientX), document.addEventListener("mousemove", k), document.addEventListener("mouseup", w);
|
|
791
|
+
}, k = (g) => {
|
|
792
|
+
a() && f(g.clientX);
|
|
793
|
+
}, w = () => {
|
|
794
|
+
r(!1), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", w);
|
|
795
|
+
}, $ = (g) => {
|
|
796
|
+
let d = 0;
|
|
797
|
+
if (g.key === "ArrowRight" || g.key === "ArrowUp")
|
|
798
|
+
d = tt;
|
|
799
|
+
else if (g.key === "ArrowLeft" || g.key === "ArrowDown")
|
|
800
|
+
d = -tt;
|
|
801
|
+
else
|
|
802
|
+
return;
|
|
803
|
+
g.preventDefault();
|
|
804
|
+
const p = Math.max(bt, Math.min(n(), e.jitter() + d));
|
|
805
|
+
e.setJitter(p);
|
|
806
|
+
};
|
|
807
|
+
let m;
|
|
808
|
+
const E = () => {
|
|
809
|
+
const g = n(), d = e.timestamp(), p = e.buffering();
|
|
810
|
+
i && Et(i, e.videoBuffered(), d, g, p), c && Et(c, e.audioBuffered(), d, g, p), m = requestAnimationFrame(E);
|
|
797
811
|
};
|
|
798
|
-
return
|
|
799
|
-
|
|
812
|
+
return Rt(() => {
|
|
813
|
+
m = requestAnimationFrame(E);
|
|
814
|
+
}), ut(() => {
|
|
815
|
+
m !== void 0 && cancelAnimationFrame(m), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", w);
|
|
800
816
|
}), (() => {
|
|
801
|
-
var
|
|
802
|
-
|
|
803
|
-
var
|
|
804
|
-
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
var
|
|
808
|
-
return typeof
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
},
|
|
812
|
-
children: (y, O) => {
|
|
813
|
-
const I = () => {
|
|
814
|
-
const x = e.timestamp();
|
|
815
|
-
return x === void 0 ? null : o(y, x, s(O(), e.buffering()));
|
|
816
|
-
};
|
|
817
|
-
return u(L, {
|
|
818
|
-
get when() {
|
|
819
|
-
return I();
|
|
820
|
-
},
|
|
821
|
-
children: (x) => (() => {
|
|
822
|
-
var C = St();
|
|
823
|
-
return p(C, u(L, {
|
|
824
|
-
get when() {
|
|
825
|
-
return x().isOverflow;
|
|
826
|
-
},
|
|
827
|
-
get children() {
|
|
828
|
-
var k = Ct(), G = k.firstChild;
|
|
829
|
-
return p(k, () => x().overflowSec, G), k;
|
|
830
|
-
}
|
|
831
|
-
})), T((k) => yt(C, x().style, k)), C;
|
|
832
|
-
})()
|
|
833
|
-
});
|
|
834
|
-
}
|
|
835
|
-
}), null), p(b, u(gt, {
|
|
836
|
-
get each() {
|
|
837
|
-
return e.audioBuffered();
|
|
838
|
-
},
|
|
839
|
-
children: (y, O) => {
|
|
840
|
-
const I = () => {
|
|
841
|
-
const x = e.timestamp();
|
|
842
|
-
return x === void 0 ? null : o(y, x, s(O(), e.buffering()));
|
|
843
|
-
};
|
|
844
|
-
return u(L, {
|
|
845
|
-
get when() {
|
|
846
|
-
return I();
|
|
847
|
-
},
|
|
848
|
-
children: (x) => (() => {
|
|
849
|
-
var C = St();
|
|
850
|
-
return p(C, u(L, {
|
|
851
|
-
get when() {
|
|
852
|
-
return x().isOverflow;
|
|
853
|
-
},
|
|
854
|
-
get children() {
|
|
855
|
-
var k = Ct(), G = k.firstChild;
|
|
856
|
-
return p(k, () => x().overflowSec, G), k;
|
|
857
|
-
}
|
|
858
|
-
})), T((k) => yt(C, x().style, k)), C;
|
|
859
|
-
})()
|
|
860
|
-
});
|
|
861
|
-
}
|
|
862
|
-
}), null), p(q, () => `${Math.round(e.jitter())}ms`), T((y) => {
|
|
863
|
-
var O = `watch-ui__buffer-visualization ${a() ? "watch-ui__buffer-visualization--dragging" : ""}`, I = e.jitter(), x = r(), C = `${i()}%`;
|
|
864
|
-
return O !== y.e && pt(h, y.e = O), I !== y.t && et(h, "aria-valuenow", y.t = I), x !== y.a && et(h, "aria-valuemax", y.a = x), C !== y.o && le(m, "left", y.o = C), y;
|
|
817
|
+
var g = Se(), d = g.firstChild, p = d.firstChild, x = p.nextSibling, C = x.firstChild, P = C.nextSibling, I = x.nextSibling, ft = I.firstChild, X = ft.nextSibling, dt = I.nextSibling, R = dt.firstChild, z = R.firstChild;
|
|
818
|
+
d.$$keydown = $, d.$$mousedown = l;
|
|
819
|
+
var Z = s;
|
|
820
|
+
typeof Z == "function" ? pt(Z, d) : s = d, gt(d, "aria-valuemin", bt);
|
|
821
|
+
var b = i;
|
|
822
|
+
typeof b == "function" ? pt(b, P) : i = P;
|
|
823
|
+
var q = c;
|
|
824
|
+
return typeof q == "function" ? pt(q, X) : c = X, y(z, () => `${Math.round(e.jitter())}ms`), T((A) => {
|
|
825
|
+
var O = `watch-ui__buffer-visualization ${a() ? "watch-ui__buffer-visualization--dragging" : ""}`, Y = e.jitter(), K = n(), xt = `${o()}%`;
|
|
826
|
+
return O !== A.e && wt(d, A.e = O), Y !== A.t && gt(d, "aria-valuenow", A.t = Y), K !== A.a && gt(d, "aria-valuemax", A.a = K), xt !== A.o && se(R, "left", A.o = xt), A;
|
|
865
827
|
}, {
|
|
866
828
|
e: void 0,
|
|
867
829
|
t: void 0,
|
|
868
830
|
a: void 0,
|
|
869
831
|
o: void 0
|
|
870
|
-
}),
|
|
832
|
+
}), g;
|
|
871
833
|
})();
|
|
872
834
|
}
|
|
873
|
-
|
|
874
|
-
function
|
|
875
|
-
const t =
|
|
876
|
-
return
|
|
835
|
+
ie(["mousedown", "keydown"]);
|
|
836
|
+
function $e() {
|
|
837
|
+
const t = N();
|
|
838
|
+
return h(lt, {
|
|
877
839
|
title: "Fullscreen",
|
|
878
840
|
onClick: () => {
|
|
879
841
|
t.toggleFullscreen();
|
|
880
842
|
},
|
|
881
843
|
get children() {
|
|
882
|
-
return
|
|
844
|
+
return h(Q, {
|
|
883
845
|
get when() {
|
|
884
846
|
return t.isFullscreen();
|
|
885
847
|
},
|
|
886
848
|
get fallback() {
|
|
887
|
-
return
|
|
849
|
+
return h(j.FullscreenEnter, {});
|
|
888
850
|
},
|
|
889
851
|
get children() {
|
|
890
|
-
return
|
|
852
|
+
return h(j.FullscreenExit, {});
|
|
891
853
|
}
|
|
892
854
|
});
|
|
893
855
|
}
|
|
894
856
|
});
|
|
895
857
|
}
|
|
896
|
-
function
|
|
897
|
-
const t =
|
|
898
|
-
return
|
|
858
|
+
function Ee() {
|
|
859
|
+
const t = N();
|
|
860
|
+
return h(lt, {
|
|
899
861
|
get title() {
|
|
900
862
|
return t.isPlaying() ? "Pause" : "Play";
|
|
901
863
|
},
|
|
@@ -904,45 +866,51 @@ function Me() {
|
|
|
904
866
|
t.togglePlayback();
|
|
905
867
|
},
|
|
906
868
|
get children() {
|
|
907
|
-
return
|
|
869
|
+
return h(Q, {
|
|
908
870
|
get when() {
|
|
909
871
|
return t.isPlaying();
|
|
910
872
|
},
|
|
911
873
|
get fallback() {
|
|
912
|
-
return
|
|
874
|
+
return h(j.Play, {});
|
|
913
875
|
},
|
|
914
876
|
get children() {
|
|
915
|
-
return
|
|
877
|
+
return h(j.Pause, {});
|
|
916
878
|
}
|
|
917
879
|
});
|
|
918
880
|
}
|
|
919
881
|
});
|
|
920
882
|
}
|
|
921
|
-
var
|
|
922
|
-
function
|
|
923
|
-
|
|
924
|
-
|
|
883
|
+
var Pe = /* @__PURE__ */ V("<div class=watch-ui__quality-selector><label for=quality-select class=watch-ui__quality-label>Quality: </label><select id=quality-select class=watch-ui__quality-select><option value>Auto"), Me = /* @__PURE__ */ V("<option>");
|
|
884
|
+
function qe(t) {
|
|
885
|
+
return t >= 1e6 ? `${(t / 1e6).toFixed(1)} Mbps` : t >= 1e3 ? `${(t / 1e3).toFixed(0)} kbps` : `${t} bps`;
|
|
886
|
+
}
|
|
887
|
+
function Re() {
|
|
888
|
+
const t = N(), e = (n) => {
|
|
889
|
+
const a = n.currentTarget.value || void 0;
|
|
925
890
|
t.setActiveRendition(a);
|
|
926
891
|
};
|
|
927
892
|
return (() => {
|
|
928
|
-
var
|
|
929
|
-
return
|
|
893
|
+
var n = Pe(), a = n.firstChild, r = a.nextSibling;
|
|
894
|
+
return r.firstChild, r.addEventListener("change", e), y(r, h(ae, {
|
|
930
895
|
get each() {
|
|
931
896
|
return t.availableRenditions() ?? [];
|
|
932
897
|
},
|
|
933
898
|
children: (o) => (() => {
|
|
934
|
-
var s =
|
|
935
|
-
return
|
|
936
|
-
var i =
|
|
899
|
+
var s = Me();
|
|
900
|
+
return y(s, () => o.name, null), y(s, (() => {
|
|
901
|
+
var i = Ct(() => !!(o.width && o.height));
|
|
937
902
|
return () => i() ? ` (${o.width}x${o.height})` : "";
|
|
903
|
+
})(), null), y(s, (() => {
|
|
904
|
+
var i = Ct(() => !!o.bitrate);
|
|
905
|
+
return () => i() ? ` ${qe(o.bitrate)}` : "";
|
|
938
906
|
})(), null), T(() => s.value = o.name), s;
|
|
939
907
|
})()
|
|
940
|
-
}), null), T(() =>
|
|
908
|
+
}), null), T(() => r.value = t.activeRendition() ?? ""), n;
|
|
941
909
|
})();
|
|
942
910
|
}
|
|
943
|
-
function
|
|
944
|
-
const t =
|
|
945
|
-
return
|
|
911
|
+
function je() {
|
|
912
|
+
const t = N();
|
|
913
|
+
return h(lt, {
|
|
946
914
|
get title() {
|
|
947
915
|
return t.isStatsPanelVisible() ? "Hide stats" : "Show stats";
|
|
948
916
|
},
|
|
@@ -950,35 +918,35 @@ function We() {
|
|
|
950
918
|
t.setIsStatsPanelVisible(!t.isStatsPanelVisible());
|
|
951
919
|
},
|
|
952
920
|
get children() {
|
|
953
|
-
return
|
|
921
|
+
return h(j.Stats, {});
|
|
954
922
|
}
|
|
955
923
|
});
|
|
956
924
|
}
|
|
957
|
-
var
|
|
958
|
-
const
|
|
925
|
+
var We = /* @__PURE__ */ V('<div class="watch-ui__volume-slider flex--center"><input type=range min=0 max=100><span class=watch-ui__volume-label>');
|
|
926
|
+
const Te = (t, e) => e || t === 0 ? h(j.Mute, {}) : t > 0 && t <= 33 ? h(j.VolumeLow, {}) : t > 33 && t <= 66 ? h(j.VolumeMedium, {}) : h(j.VolumeHigh, {});
|
|
959
927
|
function Le() {
|
|
960
|
-
const [t, e] =
|
|
961
|
-
const o =
|
|
962
|
-
|
|
928
|
+
const [t, e] = M(0), n = N(), a = (r) => {
|
|
929
|
+
const o = r.currentTarget, s = parseFloat(o.value);
|
|
930
|
+
n.setVolume(s);
|
|
963
931
|
};
|
|
964
|
-
return
|
|
965
|
-
const
|
|
966
|
-
e(Math.round(
|
|
932
|
+
return qt(() => {
|
|
933
|
+
const r = n.currentVolume() || 0;
|
|
934
|
+
e(Math.round(r));
|
|
967
935
|
}), (() => {
|
|
968
|
-
var
|
|
969
|
-
return
|
|
936
|
+
var r = We(), o = r.firstChild, s = o.nextSibling;
|
|
937
|
+
return y(r, h(lt, {
|
|
970
938
|
get title() {
|
|
971
|
-
return
|
|
939
|
+
return n.isMuted() ? "Unmute" : "Mute";
|
|
972
940
|
},
|
|
973
|
-
onClick: () =>
|
|
941
|
+
onClick: () => n.toggleMuted(),
|
|
974
942
|
get children() {
|
|
975
|
-
return
|
|
943
|
+
return Te(n.currentVolume(), n.isMuted());
|
|
976
944
|
}
|
|
977
|
-
}), o), o.addEventListener("change", a),
|
|
945
|
+
}), o), o.addEventListener("change", a), y(s, t), T(() => o.value = n.currentVolume()), r;
|
|
978
946
|
})();
|
|
979
947
|
}
|
|
980
|
-
var
|
|
981
|
-
const
|
|
948
|
+
var Ve = /* @__PURE__ */ V('<div class="watch-ui__status-indicator flex--center"><span></span><span>');
|
|
949
|
+
const Ie = {
|
|
982
950
|
"no-url": {
|
|
983
951
|
variant: "error",
|
|
984
952
|
text: "No URL"
|
|
@@ -1007,79 +975,79 @@ const Re = {
|
|
|
1007
975
|
variant: "connected",
|
|
1008
976
|
text: "Connected"
|
|
1009
977
|
}
|
|
1010
|
-
},
|
|
978
|
+
}, ze = {
|
|
1011
979
|
variant: "error",
|
|
1012
980
|
text: "Unknown"
|
|
1013
981
|
};
|
|
1014
|
-
function
|
|
1015
|
-
const t =
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
982
|
+
function Oe() {
|
|
983
|
+
const t = N(), e = () => {
|
|
984
|
+
const n = t.watchStatus();
|
|
985
|
+
return Ie[n] || ze;
|
|
1018
986
|
};
|
|
1019
987
|
return (() => {
|
|
1020
|
-
var
|
|
1021
|
-
return
|
|
988
|
+
var n = Ve(), a = n.firstChild, r = a.nextSibling;
|
|
989
|
+
return y(r, () => e().text), T((o) => {
|
|
1022
990
|
var s = `watch-ui__status-indicator-dot watch-ui__status-indicator-dot--${e().variant}`, i = `watch-ui__status-indicator-text watch-ui__status-indicator-text--${e().variant}`;
|
|
1023
|
-
return s !== o.e &&
|
|
991
|
+
return s !== o.e && wt(a, o.e = s), i !== o.t && wt(r, o.t = i), o;
|
|
1024
992
|
}, {
|
|
1025
993
|
e: void 0,
|
|
1026
994
|
t: void 0
|
|
1027
|
-
}),
|
|
995
|
+
}), n;
|
|
1028
996
|
})();
|
|
1029
997
|
}
|
|
1030
|
-
var
|
|
1031
|
-
function
|
|
998
|
+
var Be = /* @__PURE__ */ V('<div class=watch-ui__controls><div class="watch-ui__playback-controls flex--align-center"></div><div class=watch-ui__latency-controls>');
|
|
999
|
+
function Fe() {
|
|
1032
1000
|
return (() => {
|
|
1033
|
-
var t =
|
|
1034
|
-
return
|
|
1001
|
+
var t = Be(), e = t.firstChild, n = e.nextSibling;
|
|
1002
|
+
return y(e, h(Ee, {}), null), y(e, h(Le, {}), null), y(e, h(Oe, {}), null), y(e, h(je, {}), null), y(e, h($e, {}), null), y(n, h(Ae, {}), null), y(n, h(Re, {}), null), t;
|
|
1035
1003
|
})();
|
|
1036
1004
|
}
|
|
1037
|
-
const Fe = ':host{--color-white: #ffffff;--color-white-alpha-05: rgba(255, 255, 255, .05);--color-white-alpha-10: rgba(255, 255, 255, .1);--color-white-alpha-15: rgba(255, 255, 255, .15);--color-white-alpha-20: rgba(255, 255, 255, .2);--color-white-alpha-25: rgba(255, 255, 255, .25);--color-white-alpha-30: rgba(255, 255, 255, .3);--color-white-alpha-70: rgba(255, 255, 255, .7);--color-white-alpha-90: rgba(255, 255, 255, .9);--color-gray-100: #9ca3af;--color-gray-950: #1a1a1a;--color-blue-400: #00dfff;--color-blue-500: #52a1ff;--color-blue-900: #1b3243;--color-purple-400: #a855f7;--color-purple-500: #c27bff;--color-purple-900: #31144a;--color-green-400: #65ee2e;--color-green-900: #3d4928;--color-yellow-400: #facc15;--color-orange-300: rgb(253, 186, 116);--color-orange-400: #ff9900;--color-orange-450: #fb923c;--color-orange-500: #f97316;--color-orange-900: #4d301b;--color-amber-600: #d97706;--color-amber-600-alpha-20: rgba(217, 119, 6, .2);--color-amber-600-alpha-30: rgba(217, 119, 6, .3);--color-orange-400-alpha-20: rgba(255, 153, 0, .2);--color-orange-500-alpha-30: rgba(249, 115, 22, .3);--color-orange-500-alpha-40: rgba(249, 115, 22, .4);--color-orange-500-alpha-50: rgba(249, 115, 22, .5);--color-orange-500-alpha-60: rgba(249, 115, 22, .6);--color-orange-500-alpha-80: rgba(249, 115, 22, .8);--color-red-300: rgb(252, 165, 165);--color-red-400-alpha-25: rgba(248, 113, 113, .25);--color-red-500-alpha-25: rgba(239, 68, 68, .25);--color-red-500-alpha-45: rgba(239, 68, 68, .45);--color-red-500-alpha-60: rgba(239, 68, 68, .6);--color-red-600-alpha-25: rgba(220, 38, 38, .25);--color-red-900-alpha-35: rgba(127, 29, 29, .35);--color-red: #e60000;--color-black-alpha-8: rgba(0, 0, 0, .08);--color-black-alpha-10: rgba(0, 0, 0, .1);--color-black-alpha-60: rgba(0, 0, 0, .6);--color-black-alpha-70: rgba(0, 0, 0, .7);--color-black-alpha-85: rgba(0, 0, 0, .85);--color-black: #000000;--spacing-1: .0625rem;--spacing-2: .125rem;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-32: 2rem;--spacing-48: 3rem;--border-radius-sm: .5rem;--border-radius-md: .75rem;--border-radius-lg: 1rem}:is(.flex--center){display:flex;justify-content:center;align-items:center}:is(.flex--align-center){align-items:center}:is(.flex--space-between){justify-content:space-between}.button{color:var(--color-white);cursor:pointer;background-color:var(--color-white-alpha-10);border:var(--spacing-1) solid var(--color-white-alpha-20);border-radius:50%;width:2.25rem;height:2.25rem;transform-origin:center;transition:transform .1s cubic-bezier(.4,0,.2,1)}.button:hover:not(:disabled){transform:scale(1.02);color:var(--color-white);background-color:var(--color-white-alpha-20);box-shadow:0 var(--spacing-2) var(--spacing-8) var(--color-black-alpha-10)}.button:active:not(:disabled){transform:scale(.98);box-shadow:0 var(--spacing-1) var(--spacing-4) var(--color-black-alpha-8)}.button:disabled{opacity:.5;cursor:default;color:var(--color-gray-100)}.stats{display:flex;align-items:center;justify-content:center;position:absolute;inset:0;pointer-events:none;z-index:2;width:100%;height:inherit;container-type:inline-size}.stats .stats__panel{position:absolute;display:flex;align-items:flex-start;justify-content:center;flex-direction:row;flex-wrap:wrap;gap:var(--spacing-12);max-width:240px;width:100%;background-color:var(--color-black-alpha-85);border:1px solid var(--color-white-alpha-25);border-radius:8px;padding:var(--spacing-12);pointer-events:auto;top:8px}@container (width > 480px) and (width <= 768px){.stats .stats__panel{max-width:360px;padding:var(--spacing-24)}}@container (width > 768px){.stats .stats__panel{max-width:600px;padding:var(--spacing-24)}}.stats .stats__panel .stats__item{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row;height:auto;column-gap:var(--spacing-8);flex-basis:calc(50% - var(--spacing-12));flex-grow:1;flex-shrink:1}@container (width > 480px){.stats .stats__panel .stats__item{flex-basis:calc(25% - var(--spacing-12))}}.stats .stats__panel .stats__item .stats__icon-wrapper{display:none;padding:var(--spacing-8);border-radius:8px;width:fit-content;height:fit-content;flex-shrink:0}@container (width > 480px){.stats .stats__panel .stats__item .stats__icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-direction:row}}.stats .stats__panel .stats__item .stats__icon-wrapper svg{width:100%;height:100%}.stats .stats__panel .stats__item.stats__item--network .stats__icon-wrapper{background-color:var(--color-blue-900)}.stats .stats__panel .stats__item.stats__item--network,.stats .stats__panel .stats__item.stats__item--network .stats__item-data{color:var(--color-blue-400)}.stats .stats__panel .stats__item.stats__item--video .stats__icon-wrapper{background-color:var(--color-purple-900)}.stats .stats__panel .stats__item.stats__item--video,.stats .stats__panel .stats__item.stats__item--video .stats__item-data{color:var(--color-purple-400)}.stats .stats__panel .stats__item.stats__item--audio .stats__icon-wrapper{background-color:var(--color-green-900)}.stats .stats__panel .stats__item.stats__item--audio,.stats .stats__panel .stats__item.stats__item--audio .stats__item-data{color:var(--color-green-400)}.stats .stats__panel .stats__item.stats__item--buffer .stats__icon-wrapper{background-color:var(--color-orange-900)}.stats .stats__panel .stats__item.stats__item--buffer,.stats .stats__panel .stats__item.stats__item--buffer .stats__item-data{color:var(--color-orange-400)}.stats .stats__panel .stats__item .stats__item-detail{display:flex;align-items:flex-start;justify-content:space-evenly;flex-direction:column;gap:var(--spacing-4)}.stats .stats__panel .stats__item .stats__item-detail .stats__item-title{font-size:12px;font-weight:500;text-transform:capitalize;color:var(--color-gray-100);font-family:Segoe UI,Roboto,sans-serif;letter-spacing:1px;line-height:12px}.stats .stats__panel .stats__item .stats__item-detail .stats__item-data{font-size:16px;font-weight:700;font-family:Segoe UI,Roboto,sans-serif;white-space:pre-wrap;line-height:1.5}.watch-ui__video-container{display:block;position:relative;width:100%;height:auto;border-radius:var(--spacing-4);margin:0 auto;pointer-events:none}.watch-ui__controls{display:flex;flex-direction:column;gap:var(--spacing-24)}.button.button--playback{width:3rem;height:3rem;background:linear-gradient(to bottom right,var(--color-orange-400),var(--color-orange-500),var(--color-amber-600));box-shadow:0 0 var(--spacing-16) var(--color-orange-500-alpha-60);transition:box-shadow .15s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.button.button--playback:hover:not(:disabled){box-shadow:0 0 var(--spacing-24) var(--color-orange-500-alpha-80);transform:scale(1.02)}.button.button--playback:active:not(:disabled){transform:scale(.98)}.button.button--playback:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom right,var(--color-white-alpha-30),transparent);opacity:0;transition:opacity .15s cubic-bezier(.4,0,.2,1);pointer-events:none}.button.button--playback:hover:before{opacity:1}.button.button--playback:after{content:"";position:absolute;inset:0;background-color:var(--color-white-alpha-20);border-radius:50%;filter:blur(var(--spacing-24));pointer-events:none}.watch-ui__playback-controls{display:flex;place-content:center space-around;gap:var(--spacing-8);padding:var(--spacing-8) 0}.watch-ui__latency-controls{display:flex;flex-direction:column;gap:var(--spacing-16)}.watch-ui__volume-slider{gap:var(--spacing-4)}.watch-ui__volume-label{width:var(--spacing-16);text-align:right}.watch-ui__quality-selector{display:flex;align-items:center;gap:var(--spacing-8);background:transparent;border-radius:var(--spacing-8)}.watch-ui__quality-label{font-size:1.25rem;font-weight:500;color:var(--color-white);white-space:nowrap}.watch-ui__quality-select{flex:0 1 auto;font-size:1rem;padding:var(--spacing-8);border-radius:var(--spacing-4);background:var(--color-white-alpha-10);color:var(--color-white);border:var(--spacing-1) solid var(--color-white-alpha-20);cursor:pointer;transition:background .2s ease}.watch-ui__quality-select:hover{background:var(--color-white-alpha-15)}.watch-ui__quality-select:focus{outline:var(--spacing-2) solid var(--color-white-alpha-30);outline-offset:var(--spacing-2)}.watch-ui__quality-select option{background:var(--color-gray-950);color:var(--color-white)}.watch-ui__buffer{width:100%}.watch-ui__buffer-visualization{position:relative;width:100%;height:3.75rem;background:var(--color-white-alpha-10);border-radius:var(--spacing-4);cursor:pointer;user-select:none;padding-left:var(--spacing-48);box-sizing:border-box}.watch-ui__buffer-playhead{position:absolute;left:var(--spacing-48);top:0;bottom:0;width:var(--spacing-2);background:var(--color-white);z-index:3}.watch-ui__buffer-track{display:flex;align-items:center;position:absolute;left:var(--spacing-48);right:0;height:var(--spacing-24)}.watch-ui__buffer-track--video{top:var(--spacing-4)}.watch-ui__buffer-track--audio{top:var(--spacing-32)}.watch-ui__buffer-track-label{position:absolute;left:-2.875rem;width:2.5rem;font-size:.625rem;color:var(--color-white-alpha-70);text-align:right;padding-right:var(--spacing-4);pointer-events:none;box-sizing:border-box}.watch-ui__buffer-range{position:absolute;display:flex;align-items:center;justify-content:flex-end;top:var(--spacing-2);height:calc(100% - var(--spacing-4));border-radius:var(--spacing-2);min-width:var(--spacing-2);opacity:.85;overflow:hidden}.watch-ui__buffer-overflow-label{font-size:.5625rem;font-weight:500;color:var(--color-black-alpha-70);padding-right:var(--spacing-4)}.watch-ui__buffer-target-area{position:absolute;top:0;bottom:0;left:var(--spacing-48);right:0;pointer-events:none}.watch-ui__buffer-target-line{position:absolute;top:0;bottom:0;width:.1875rem;background:var(--color-orange-400, var(--color-orange-450));z-index:2;cursor:ew-resize;border-radius:var(--spacing-1);pointer-events:auto}.watch-ui__buffer-target-label{position:absolute;bottom:100%;left:50%;transform:translate(-50%);font-size:.6875rem;font-weight:500;color:var(--color-orange-400, var(--color-orange-450));white-space:nowrap;margin-bottom:var(--spacing-2);opacity:0;transition:opacity .15s ease;pointer-events:none}.watch-ui__buffer-visualization:hover .watch-ui__buffer-target-label,.watch-ui__buffer-visualization--dragging .watch-ui__buffer-target-label{opacity:1}.watch-ui__buffering{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;background-color:var(--color-black-alpha-40);backdrop-filter:blur(var(--spacing-2));pointer-events:auto}.watch-ui__buffering-spinner{width:2.5rem;height:2.5rem;border:var(--spacing-4) solid var(--color-white-alpha-20);border-top:var(--spacing-4) solid var(--color-white);border-radius:50%;animation:buffer-spin 1s linear infinite}@keyframes buffer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.watch-ui__status-indicator{gap:var(--spacing-12);backdrop-filter:blur(var(--spacing-16))}.watch-ui__status-indicator-dot{position:relative;width:.75rem;height:.75rem;border-radius:50%;flex-shrink:0;z-index:1}.watch-ui__status-indicator-dot:after{content:"";position:absolute;inset:0;border-radius:50%;background:currentcolor;transform:scale(1);opacity:.5;animation:status-pulse 1.5s ease-out infinite;z-index:-1}.watch-ui__status-indicator-dot:after{display:none}.watch-ui__status-indicator-dot--live:after,.watch-ui__status-indicator-dot--connected:after,.watch-ui__status-indicator-dot--loading:after,.watch-ui__status-indicator-dot--connecting:after{display:block}.watch-ui__status-indicator-dot--error{background:var(--color-gray-100);color:var(--color-gray-100)}.watch-ui__status-indicator-text--error{color:var(--color-gray-100)}.watch-ui__status-indicator-dot--connecting{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--connecting{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--loading{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--loading{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--live{background:var(--color-green-400);color:var(--color-green-400)}.watch-ui__status-indicator-text--live{color:var(--color-green-400)}.watch-ui__status-indicator-dot--connected{background:var(--color-blue-500);color:var(--color-blue-500)}.watch-ui__status-indicator-text--connected{color:var(--color-blue-500)}.watch-ui__status-indicator-text{font-size:1rem;letter-spacing:.1rem}@keyframes status-pulse{0%{transform:scale(1);opacity:.5}70%{opacity:.25}to{transform:scale(2.5);opacity:0}}';
|
|
1038
|
-
var
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1005
|
+
const Ne = ':host{--color-white: #ffffff;--color-white-alpha-05: rgba(255, 255, 255, .05);--color-white-alpha-10: rgba(255, 255, 255, .1);--color-white-alpha-15: rgba(255, 255, 255, .15);--color-white-alpha-20: rgba(255, 255, 255, .2);--color-white-alpha-25: rgba(255, 255, 255, .25);--color-white-alpha-30: rgba(255, 255, 255, .3);--color-white-alpha-70: rgba(255, 255, 255, .7);--color-white-alpha-90: rgba(255, 255, 255, .9);--color-gray-100: #9ca3af;--color-gray-950: #1a1a1a;--color-blue-400: #00dfff;--color-blue-500: #52a1ff;--color-blue-900: #1b3243;--color-purple-400: #a855f7;--color-purple-500: #c27bff;--color-purple-900: #31144a;--color-green-400: #65ee2e;--color-green-900: #3d4928;--color-yellow-400: #facc15;--color-orange-300: rgb(253, 186, 116);--color-orange-400: #ff9900;--color-orange-450: #fb923c;--color-orange-500: #f97316;--color-orange-900: #4d301b;--color-amber-600: #d97706;--color-amber-600-alpha-20: rgba(217, 119, 6, .2);--color-amber-600-alpha-30: rgba(217, 119, 6, .3);--color-orange-400-alpha-20: rgba(255, 153, 0, .2);--color-orange-500-alpha-30: rgba(249, 115, 22, .3);--color-orange-500-alpha-40: rgba(249, 115, 22, .4);--color-orange-500-alpha-50: rgba(249, 115, 22, .5);--color-orange-500-alpha-60: rgba(249, 115, 22, .6);--color-orange-500-alpha-80: rgba(249, 115, 22, .8);--color-red-300: rgb(252, 165, 165);--color-red-400-alpha-25: rgba(248, 113, 113, .25);--color-red-500-alpha-25: rgba(239, 68, 68, .25);--color-red-500-alpha-45: rgba(239, 68, 68, .45);--color-red-500-alpha-60: rgba(239, 68, 68, .6);--color-red-600-alpha-25: rgba(220, 38, 38, .25);--color-red-900-alpha-35: rgba(127, 29, 29, .35);--color-red: #e60000;--color-black-alpha-8: rgba(0, 0, 0, .08);--color-black-alpha-10: rgba(0, 0, 0, .1);--color-black-alpha-60: rgba(0, 0, 0, .6);--color-black-alpha-70: rgba(0, 0, 0, .7);--color-black-alpha-85: rgba(0, 0, 0, .85);--color-black: #000000;--spacing-1: .0625rem;--spacing-2: .125rem;--spacing-4: .25rem;--spacing-8: .5rem;--spacing-12: .75rem;--spacing-16: 1rem;--spacing-24: 1.5rem;--spacing-32: 2rem;--spacing-48: 3rem;--border-radius-sm: .5rem;--border-radius-md: .75rem;--border-radius-lg: 1rem}:is(.flex--center){display:flex;justify-content:center;align-items:center}:is(.flex--align-center){align-items:center}:is(.flex--space-between){justify-content:space-between}.button{color:var(--color-white);cursor:pointer;background-color:var(--color-white-alpha-10);border:var(--spacing-1) solid var(--color-white-alpha-20);border-radius:50%;width:2.25rem;height:2.25rem;transform-origin:center;transition:transform .1s cubic-bezier(.4,0,.2,1)}.button:hover:not(:disabled){transform:scale(1.02);color:var(--color-white);background-color:var(--color-white-alpha-20);box-shadow:0 var(--spacing-2) var(--spacing-8) var(--color-black-alpha-10)}.button:active:not(:disabled){transform:scale(.98);box-shadow:0 var(--spacing-1) var(--spacing-4) var(--color-black-alpha-8)}.button:disabled{opacity:.5;cursor:default;color:var(--color-gray-100)}.stats{display:flex;align-items:center;justify-content:center;position:absolute;inset:0;pointer-events:none;z-index:2;width:100%;height:inherit;container-type:inline-size}.stats .stats__panel{position:absolute;display:flex;align-items:flex-start;justify-content:center;flex-direction:row;flex-wrap:wrap;gap:var(--spacing-12);max-width:240px;width:100%;background-color:var(--color-black-alpha-85);border:1px solid var(--color-white-alpha-25);border-radius:8px;padding:var(--spacing-12);pointer-events:auto;top:8px}@container (width > 480px) and (width <= 768px){.stats .stats__panel{max-width:360px;padding:var(--spacing-24)}}@container (width > 768px){.stats .stats__panel{max-width:600px;padding:var(--spacing-24)}}.stats .stats__panel .stats__item{display:flex;align-items:flex-start;justify-content:flex-start;flex-direction:row;height:auto;column-gap:var(--spacing-8);flex-basis:calc(50% - var(--spacing-12));flex-grow:1;flex-shrink:1}@container (width > 480px){.stats .stats__panel .stats__item{flex-basis:calc(25% - var(--spacing-12))}}.stats .stats__panel .stats__item .stats__icon-wrapper{display:none;padding:var(--spacing-8);border-radius:8px;width:fit-content;height:fit-content;flex-shrink:0}@container (width > 480px){.stats .stats__panel .stats__item .stats__icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-direction:row}}.stats .stats__panel .stats__item .stats__icon-wrapper svg{width:100%;height:100%}.stats .stats__panel .stats__item.stats__item--network .stats__icon-wrapper{background-color:var(--color-blue-900)}.stats .stats__panel .stats__item.stats__item--network,.stats .stats__panel .stats__item.stats__item--network .stats__item-data{color:var(--color-blue-400)}.stats .stats__panel .stats__item.stats__item--video .stats__icon-wrapper{background-color:var(--color-purple-900)}.stats .stats__panel .stats__item.stats__item--video,.stats .stats__panel .stats__item.stats__item--video .stats__item-data{color:var(--color-purple-400)}.stats .stats__panel .stats__item.stats__item--audio .stats__icon-wrapper{background-color:var(--color-green-900)}.stats .stats__panel .stats__item.stats__item--audio,.stats .stats__panel .stats__item.stats__item--audio .stats__item-data{color:var(--color-green-400)}.stats .stats__panel .stats__item.stats__item--buffer .stats__icon-wrapper{background-color:var(--color-orange-900)}.stats .stats__panel .stats__item.stats__item--buffer,.stats .stats__panel .stats__item.stats__item--buffer .stats__item-data{color:var(--color-orange-400)}.stats .stats__panel .stats__item .stats__item-detail{display:flex;align-items:flex-start;justify-content:space-evenly;flex-direction:column;gap:var(--spacing-4)}.stats .stats__panel .stats__item .stats__item-detail .stats__item-title{font-size:12px;font-weight:500;text-transform:capitalize;color:var(--color-gray-100);font-family:Segoe UI,Roboto,sans-serif;letter-spacing:1px;line-height:12px}.stats .stats__panel .stats__item .stats__item-detail .stats__item-data{font-size:16px;font-weight:700;font-family:Segoe UI,Roboto,sans-serif;white-space:pre-wrap;line-height:1.5}.watch-ui__video-container{display:block;position:relative;width:100%;height:auto;border-radius:var(--spacing-4);margin:0 auto;pointer-events:none}.watch-ui__controls{display:flex;flex-direction:column;gap:var(--spacing-24)}.button.button--playback{width:3rem;height:3rem;background:linear-gradient(to bottom right,var(--color-orange-400),var(--color-orange-500),var(--color-amber-600));box-shadow:0 0 var(--spacing-16) var(--color-orange-500-alpha-60);transition:box-shadow .15s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.button.button--playback:hover:not(:disabled){box-shadow:0 0 var(--spacing-24) var(--color-orange-500-alpha-80);transform:scale(1.02)}.button.button--playback:active:not(:disabled){transform:scale(.98)}.button.button--playback:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom right,var(--color-white-alpha-30),transparent);opacity:0;transition:opacity .15s cubic-bezier(.4,0,.2,1);pointer-events:none}.button.button--playback:hover:before{opacity:1}.button.button--playback:after{content:"";position:absolute;inset:0;background-color:var(--color-white-alpha-20);border-radius:50%;filter:blur(var(--spacing-24));pointer-events:none}.watch-ui__playback-controls{display:flex;place-content:center space-around;gap:var(--spacing-8);padding:var(--spacing-8) 0}.watch-ui__latency-controls{display:flex;flex-direction:column;gap:var(--spacing-16)}.watch-ui__volume-slider{gap:var(--spacing-4)}.watch-ui__volume-label{width:var(--spacing-16);text-align:right}.watch-ui__quality-selector{display:flex;align-items:center;gap:var(--spacing-8);background:transparent;border-radius:var(--spacing-8)}.watch-ui__quality-label{font-size:1.25rem;font-weight:500;color:var(--color-white);white-space:nowrap}.watch-ui__quality-select{flex:0 1 auto;font-size:1rem;padding:var(--spacing-8);border-radius:var(--spacing-4);background:var(--color-white-alpha-10);color:var(--color-white);border:var(--spacing-1) solid var(--color-white-alpha-20);cursor:pointer;transition:background .2s ease}.watch-ui__quality-select:hover{background:var(--color-white-alpha-15)}.watch-ui__quality-select:focus{outline:var(--spacing-2) solid var(--color-white-alpha-30);outline-offset:var(--spacing-2)}.watch-ui__quality-select option{background:var(--color-gray-950);color:var(--color-white)}.watch-ui__buffer{width:100%}.watch-ui__buffer-visualization{position:relative;width:100%;height:3.75rem;background:var(--color-white-alpha-10);border-radius:var(--spacing-4);cursor:pointer;user-select:none;padding-left:var(--spacing-48);box-sizing:border-box}.watch-ui__buffer-playhead{position:absolute;left:var(--spacing-48);top:0;bottom:0;width:var(--spacing-2);background:var(--color-white);z-index:3}.watch-ui__buffer-track{display:flex;align-items:center;position:absolute;left:var(--spacing-48);right:0;height:var(--spacing-24)}.watch-ui__buffer-track--video{top:var(--spacing-4)}.watch-ui__buffer-track--audio{top:var(--spacing-32)}.watch-ui__buffer-track-label{position:absolute;left:-2.875rem;width:2.5rem;font-size:.625rem;color:var(--color-white-alpha-70);text-align:right;padding-right:var(--spacing-4);pointer-events:none;box-sizing:border-box}.watch-ui__buffer-canvas{position:absolute;top:0;left:0;width:100%;height:100%}.watch-ui__buffer-target-area{position:absolute;top:0;bottom:0;left:var(--spacing-48);right:0;pointer-events:none}.watch-ui__buffer-target-line{position:absolute;top:0;bottom:0;width:.1875rem;background:var(--color-orange-400, var(--color-orange-450));z-index:2;cursor:ew-resize;border-radius:var(--spacing-1);pointer-events:auto}.watch-ui__buffer-target-label{position:absolute;bottom:100%;left:50%;transform:translate(-50%);font-size:.6875rem;font-weight:500;color:var(--color-orange-400, var(--color-orange-450));white-space:nowrap;margin-bottom:var(--spacing-2);opacity:0;transition:opacity .15s ease;pointer-events:none}.watch-ui__buffer-visualization:hover .watch-ui__buffer-target-label,.watch-ui__buffer-visualization--dragging .watch-ui__buffer-target-label{opacity:1}.watch-ui__buffering{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;background-color:var(--color-black-alpha-40);backdrop-filter:blur(var(--spacing-2));pointer-events:auto}.watch-ui__buffering-spinner{width:2.5rem;height:2.5rem;border:var(--spacing-4) solid var(--color-white-alpha-20);border-top:var(--spacing-4) solid var(--color-white);border-radius:50%;animation:buffer-spin 1s linear infinite}@keyframes buffer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.watch-ui__status-indicator{gap:var(--spacing-12);backdrop-filter:blur(var(--spacing-16))}.watch-ui__status-indicator-dot{position:relative;width:.75rem;height:.75rem;border-radius:50%;flex-shrink:0;z-index:1}.watch-ui__status-indicator-dot:after{content:"";position:absolute;inset:0;border-radius:50%;background:currentcolor;transform:scale(1);opacity:.5;animation:status-pulse 1.5s ease-out infinite;z-index:-1}.watch-ui__status-indicator-dot:after{display:none}.watch-ui__status-indicator-dot--live:after,.watch-ui__status-indicator-dot--connected:after,.watch-ui__status-indicator-dot--loading:after,.watch-ui__status-indicator-dot--connecting:after{display:block}.watch-ui__status-indicator-dot--error{background:var(--color-gray-100);color:var(--color-gray-100)}.watch-ui__status-indicator-text--error{color:var(--color-gray-100)}.watch-ui__status-indicator-dot--connecting{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--connecting{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--loading{background:var(--color-yellow-400);color:var(--color-yellow-400)}.watch-ui__status-indicator-text--loading{color:var(--color-yellow-400)}.watch-ui__status-indicator-dot--live{background:var(--color-green-400);color:var(--color-green-400)}.watch-ui__status-indicator-text--live{color:var(--color-green-400)}.watch-ui__status-indicator-dot--connected{background:var(--color-blue-500);color:var(--color-blue-500)}.watch-ui__status-indicator-text--connected{color:var(--color-blue-500)}.watch-ui__status-indicator-text{font-size:1rem;letter-spacing:.1rem}@keyframes status-pulse{0%{transform:scale(1);opacity:.5}70%{opacity:.25}to{transform:scale(2.5);opacity:0}}';
|
|
1006
|
+
var Ue = /* @__PURE__ */ V("<style>"), Ke = /* @__PURE__ */ V("<div class=watch-ui__video-container><slot>");
|
|
1007
|
+
function De(t) {
|
|
1008
|
+
return h(xe, {
|
|
1041
1009
|
get moqWatch() {
|
|
1042
1010
|
return t.watch;
|
|
1043
1011
|
},
|
|
1044
1012
|
get children() {
|
|
1045
1013
|
return [(() => {
|
|
1046
|
-
var e =
|
|
1047
|
-
return
|
|
1014
|
+
var e = Ue();
|
|
1015
|
+
return y(e, Ne), e;
|
|
1048
1016
|
})(), (() => {
|
|
1049
|
-
var e =
|
|
1050
|
-
return
|
|
1051
|
-
const a =
|
|
1052
|
-
return a ?
|
|
1017
|
+
var e = Ke(), n = e.firstChild;
|
|
1018
|
+
return n._$owner = Ht(), y(e, () => {
|
|
1019
|
+
const a = jt(st);
|
|
1020
|
+
return a ? h(Q, {
|
|
1053
1021
|
get when() {
|
|
1054
1022
|
return a.isStatsPanelVisible();
|
|
1055
1023
|
},
|
|
1056
1024
|
get children() {
|
|
1057
|
-
return
|
|
1025
|
+
return h(Bt, {
|
|
1058
1026
|
context: st,
|
|
1059
|
-
getElement: (
|
|
1027
|
+
getElement: (r) => r?.moqWatch.backend
|
|
1060
1028
|
});
|
|
1061
1029
|
}
|
|
1062
1030
|
}) : null;
|
|
1063
|
-
}, null),
|
|
1064
|
-
})(),
|
|
1031
|
+
}, null), y(e, h(Ce, {}), null), e;
|
|
1032
|
+
})(), h(Fe, {})];
|
|
1065
1033
|
}
|
|
1066
1034
|
});
|
|
1067
1035
|
}
|
|
1068
|
-
|
|
1036
|
+
ye("moq-watch-ui", (t, {
|
|
1069
1037
|
element: e
|
|
1070
1038
|
}) => {
|
|
1071
|
-
const [
|
|
1072
|
-
return
|
|
1039
|
+
const [n, a] = M();
|
|
1040
|
+
return Rt(async () => {
|
|
1073
1041
|
await customElements.whenDefined("moq-watch");
|
|
1074
|
-
const
|
|
1075
|
-
a(
|
|
1076
|
-
}),
|
|
1042
|
+
const r = e.querySelector("moq-watch");
|
|
1043
|
+
a(r || void 0);
|
|
1044
|
+
}), h(Q, {
|
|
1077
1045
|
get when() {
|
|
1078
|
-
return
|
|
1046
|
+
return n();
|
|
1079
1047
|
},
|
|
1080
1048
|
keyed: !0,
|
|
1081
|
-
children: (
|
|
1082
|
-
watch:
|
|
1049
|
+
children: (r) => h(De, {
|
|
1050
|
+
watch: r
|
|
1083
1051
|
})
|
|
1084
1052
|
});
|
|
1085
1053
|
});
|