@hadoku/watchparty-ui 0.45.103 → 0.45.105
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/chunks/{AdminPanel-DaPw1Hwo.js → AdminPanel-C59vWHjn.js} +11 -11
- package/dist/chunks/{AdminPanel-DaPw1Hwo.js.map → AdminPanel-C59vWHjn.js.map} +1 -1
- package/dist/chunks/{MediaDrawer-8rkk1i6x.js → MediaDrawer-BSqgbHWw.js} +550 -524
- package/dist/chunks/MediaDrawer-BSqgbHWw.js.map +1 -0
- package/dist/chunks/{PlaylistPanel-BmZQgJsW.js → PlaylistPanel-Ceu23PeI.js} +13 -13
- package/dist/chunks/{PlaylistPanel-BmZQgJsW.js.map → PlaylistPanel-Ceu23PeI.js.map} +1 -1
- package/dist/chunks/{Room-DPKeRpuD.js → Room-BqP-6mZY.js} +464 -451
- package/dist/chunks/Room-BqP-6mZY.js.map +1 -0
- package/dist/chunks/{index-WsvWlr6q.js → index-Bowaa917.js} +1899 -1850
- package/dist/chunks/index-Bowaa917.js.map +1 -0
- package/dist/chunks/{submissionsApi-DjXmOZ2U.js → submissionsApi-DIQ4p6jf.js} +16 -16
- package/dist/chunks/{submissionsApi-DjXmOZ2U.js.map → submissionsApi-DIQ4p6jf.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/room-chrome.js +851 -812
- package/dist/room-chrome.js.map +1 -1
- package/dist/watchparty-ui.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/MediaDrawer-8rkk1i6x.js.map +0 -1
- package/dist/chunks/Room-DPKeRpuD.js.map +0 -1
- package/dist/chunks/index-WsvWlr6q.js.map +0 -1
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { jsx as l, jsxs as E, Fragment as he } from "react/jsx-runtime";
|
|
2
2
|
import Ze, { useState as $, useRef as P, useEffect as F, useCallback as H, useMemo as ye, Component as Ua, useContext as gr, createContext as pr, useLayoutEffect as dn, useSyncExternalStore as Wa, useId as br, useEffectEvent as ue } from "react";
|
|
3
|
-
import { k as za, M as Ga, m as Ka, f as qa, a as Va, C as Mt, g as wn, i as Ja, S as Qa, b as Ya, r as Ot, d as _, e as ee, u as x, c as yr, h as Xa, A as mt, j as Za, l as es, n as wr, w as ts, o as Ue, p as vr, q as kr, s as ns,
|
|
3
|
+
import { k as za, M as Ga, m as Ka, f as qa, a as Va, C as Mt, g as wn, i as Ja, S as Qa, b as Ya, r as Ot, d as _, e as ee, u as x, c as yr, h as Xa, A as mt, j as Za, l as es, n as wr, w as ts, o as Ue, p as vr, q as kr, s as ns, t as rs, D as vt, v as N, x as as, y as ss, z as is, B as Sr, E as xr, F as Er, G as os, L as fs, H as ls, I as vn, J as cs, K as ds, N as us, O as Mr, P as kn, Q as _r, R as Tr, T as hs, U as ms, V as $e, W as $n, X as Vt, Y as gs, Z as Ar, _ as ps, $ as bs, a0 as ys, a1 as Ir, a2 as ws, a3 as X, a4 as vs, a5 as Cr, a6 as Nr, a7 as ut, a8 as ks, a9 as Ss, aa as xs, ab as Es, ac as Ms, ad as Pn, ae as st, af as _s, ag as Dn, ah as Ts, ai as As, aj as Bn, ak as Is, al as Cs, am as Ns, an as Rs, ao as Ls, ap as On, aq as jn, ar as Fs, as as Rr, at as Hn, au as $s, av as $t, aw as Ps, ax as Ds, ay as Bs, az as Os, aA as js, aB as Hs, aC as Us, aD as Ws, aE as zs, aF as Gs, aG as Ks } from "./index-Bowaa917.js";
|
|
4
4
|
import { createPortal as gt } from "react-dom";
|
|
5
|
-
import { Icon as _t, THEMES as
|
|
6
|
-
import { HadokuThemePicker as
|
|
7
|
-
import { createRoot as
|
|
8
|
-
|
|
5
|
+
import { Icon as _t, THEMES as qs, useHadokuThemeOptional as Vs } from "@wolffm/themes";
|
|
6
|
+
import { HadokuThemePicker as Js, ConnectedSettings as Qs } from "@wolffm/task-ui-components";
|
|
7
|
+
import { createRoot as Ys } from "react-dom/client";
|
|
8
|
+
const Xs = "output/fmp4/youtube", Zs = /^(.*) \[([A-Za-z0-9_-]{11})\]$/;
|
|
9
|
+
function ei(t) {
|
|
10
|
+
const e = `${Xs}/`;
|
|
11
|
+
if (!t.startsWith(e))
|
|
12
|
+
return null;
|
|
13
|
+
const n = Zs.exec(t.slice(e.length));
|
|
14
|
+
return n ? n[1] : null;
|
|
15
|
+
}
|
|
16
|
+
function ti(t) {
|
|
9
17
|
return t.kind === "file";
|
|
10
18
|
}
|
|
11
19
|
class Lr extends Error {
|
|
@@ -33,42 +41,42 @@ function Bt(t) {
|
|
|
33
41
|
return "Image upload failed";
|
|
34
42
|
}
|
|
35
43
|
}
|
|
36
|
-
function
|
|
44
|
+
function ni(t) {
|
|
37
45
|
return t instanceof Mt ? Bt(t.reason) : t instanceof Lr ? t.message : "Image upload failed";
|
|
38
46
|
}
|
|
39
|
-
function
|
|
47
|
+
function ri(t) {
|
|
40
48
|
const e = t.type.toLowerCase().split(";")[0].trim();
|
|
41
49
|
return e && za(e) !== "image" ? Bt("unsupported-type") : t.size > Ga.image ? Bt("too-large") : t.size === 0 ? Bt("invalid") : null;
|
|
42
50
|
}
|
|
43
|
-
function
|
|
51
|
+
function ai(t) {
|
|
44
52
|
return qa(t);
|
|
45
53
|
}
|
|
46
|
-
function
|
|
54
|
+
function si(t) {
|
|
47
55
|
return Va(t);
|
|
48
56
|
}
|
|
49
|
-
async function
|
|
57
|
+
async function ii(t) {
|
|
50
58
|
const e = await Ka(t);
|
|
51
59
|
return { w: e?.width ?? 0, h: e?.height ?? 0 };
|
|
52
60
|
}
|
|
53
|
-
async function
|
|
61
|
+
async function oi(t, e = {}) {
|
|
54
62
|
const n = await wn().upload(t, { signal: e.signal });
|
|
55
63
|
if (!Ja(n.key))
|
|
56
64
|
throw new Lr("Image upload returned an unusable key");
|
|
57
65
|
return { key: n.key, deduplicated: n.deduplicated === !0 };
|
|
58
66
|
}
|
|
59
|
-
async function
|
|
67
|
+
async function fi(t, e = {}) {
|
|
60
68
|
const n = [];
|
|
61
69
|
for (const r of t) {
|
|
62
70
|
if (r.kind === "remote") {
|
|
63
71
|
n.push({ key: r.key, w: r.w, h: r.h, ...r.title ? { title: r.title } : {} });
|
|
64
72
|
continue;
|
|
65
73
|
}
|
|
66
|
-
const { key: s } = await
|
|
74
|
+
const { key: s } = await oi(r.file, e);
|
|
67
75
|
n.push({ key: s, w: r.w, h: r.h });
|
|
68
76
|
}
|
|
69
77
|
return n;
|
|
70
78
|
}
|
|
71
|
-
function
|
|
79
|
+
function li(t) {
|
|
72
80
|
return {
|
|
73
81
|
error: t instanceof Error ? t.message : String(t),
|
|
74
82
|
name: t instanceof Error ? t.name : typeof t,
|
|
@@ -76,14 +84,14 @@ function si(t) {
|
|
|
76
84
|
status: t instanceof Mt ? t.status : void 0
|
|
77
85
|
};
|
|
78
86
|
}
|
|
79
|
-
function
|
|
87
|
+
function ci(t) {
|
|
80
88
|
const e = P(t);
|
|
81
89
|
return F(() => {
|
|
82
90
|
e.current = t;
|
|
83
91
|
}), [e, `${t.cdnBase}|${t.uploadPath}`];
|
|
84
92
|
}
|
|
85
|
-
function
|
|
86
|
-
const { limit: s, debounceMs: i = Qa } = r, [a, o] =
|
|
93
|
+
function di(t, e, n, r = {}) {
|
|
94
|
+
const { limit: s, debounceMs: i = Qa } = r, [a, o] = ci(t), [f, c] = $([]), [d, u] = $(null), [g, b] = $(!1), [y, h] = $(null), [m, p] = $(0), M = P(null);
|
|
87
95
|
F(() => {
|
|
88
96
|
p(0), u(null);
|
|
89
97
|
}, [n, e]), F(() => {
|
|
@@ -130,7 +138,7 @@ function oi(t, e, n, r = {}) {
|
|
|
130
138
|
function We(t) {
|
|
131
139
|
return t.key === "Escape" || t.key === "GoBack" || t.key === "BrowserBack" || t.key === "XF86Back" || t.keyCode === 461 || t.keyCode === 10009;
|
|
132
140
|
}
|
|
133
|
-
const
|
|
141
|
+
const ui = /* @__PURE__ */ new Set([
|
|
134
142
|
"Enter",
|
|
135
143
|
" ",
|
|
136
144
|
"ArrowLeft",
|
|
@@ -140,15 +148,15 @@ const fi = /* @__PURE__ */ new Set([
|
|
|
140
148
|
"MediaPlayPause",
|
|
141
149
|
"Select"
|
|
142
150
|
]);
|
|
143
|
-
function
|
|
151
|
+
function hi(t) {
|
|
144
152
|
const { key: e, back: n, modifier: r, barVisible: s, focus: i } = t;
|
|
145
153
|
if (r || i === "text") return "ignore";
|
|
146
154
|
if (i === "elsewhere") return n ? "ignore" : "show";
|
|
147
155
|
if (n) return i === "bar" && s ? "leave-bar" : "ignore";
|
|
148
|
-
const a =
|
|
156
|
+
const a = ui.has(e);
|
|
149
157
|
return i === "bar" ? !s && a ? "wake" : "show" : a ? "enter-bar" : "show";
|
|
150
158
|
}
|
|
151
|
-
function
|
|
159
|
+
function mi(t, e, n = !1, r = { atStart: !1, atEnd: !1 }) {
|
|
152
160
|
const s = t === "ArrowLeft" ? -1 : t === "ArrowRight" ? 1 : null, i = t === "ArrowUp" ? -1 : t === "ArrowDown" ? 1 : null;
|
|
153
161
|
switch (e) {
|
|
154
162
|
case "range":
|
|
@@ -169,9 +177,9 @@ const dt = "data-remote-engaged";
|
|
|
169
177
|
function Fr(t) {
|
|
170
178
|
return t instanceof HTMLSelectElement ? "select" : t instanceof HTMLInputElement ? t.type === "range" ? "range" : "text" : t instanceof HTMLTextAreaElement ? "text" : "button";
|
|
171
179
|
}
|
|
172
|
-
const
|
|
180
|
+
const gi = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
|
|
173
181
|
function $r(t) {
|
|
174
|
-
return Array.from(t.querySelectorAll(
|
|
182
|
+
return Array.from(t.querySelectorAll(gi)).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0);
|
|
175
183
|
}
|
|
176
184
|
function Pr(t) {
|
|
177
185
|
const e = $r(t);
|
|
@@ -180,17 +188,17 @@ function Pr(t) {
|
|
|
180
188
|
function Dr(t) {
|
|
181
189
|
return t ? t instanceof HTMLTextAreaElement ? !0 : t instanceof HTMLInputElement ? !["range", "checkbox", "radio", "button", "submit"].includes(t.type) : t.isContentEditable === !0 : !1;
|
|
182
190
|
}
|
|
183
|
-
const un = 240, Je = 8,
|
|
184
|
-
function
|
|
191
|
+
const un = 240, Je = 8, pi = 28, Br = 240;
|
|
192
|
+
function bi(t, e, n) {
|
|
185
193
|
let r = e.left - un - Je;
|
|
186
194
|
r < Je && (r = e.right + Je), r = Math.min(r, n.width - un - Je), r = Math.max(Je, r);
|
|
187
|
-
const s = Br +
|
|
195
|
+
const s = Br + pi;
|
|
188
196
|
let i = t.top + t.height / 2 - s / 2;
|
|
189
197
|
return i = Math.min(i, n.height - s - Je), i = Math.max(Je, i), { left: r, top: i };
|
|
190
198
|
}
|
|
191
|
-
const Or = "/dataplatform/api/memes",
|
|
192
|
-
function
|
|
193
|
-
const [s, i] = $(""), a = P(null), o = P(null), f = wn(), { items: c, loading: d, error: u, hasMore: g, loadMore: b } =
|
|
199
|
+
const Or = "/dataplatform/api/memes", yi = 120;
|
|
200
|
+
function wi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
|
|
201
|
+
const [s, i] = $(""), a = P(null), o = P(null), f = wn(), { items: c, loading: d, error: u, hasMore: g, loadMore: b } = di(
|
|
194
202
|
f,
|
|
195
203
|
Or,
|
|
196
204
|
s.trim()
|
|
@@ -207,12 +215,12 @@ function gi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
|
|
|
207
215
|
if (!B) return;
|
|
208
216
|
const O = () => p({
|
|
209
217
|
item: v,
|
|
210
|
-
...
|
|
218
|
+
...bi(C.getBoundingClientRect(), B.getBoundingClientRect(), {
|
|
211
219
|
width: window.innerWidth,
|
|
212
220
|
height: window.innerHeight
|
|
213
221
|
})
|
|
214
222
|
});
|
|
215
|
-
R(), D ? O() : M.current = window.setTimeout(O,
|
|
223
|
+
R(), D ? O() : M.current = window.setTimeout(O, yi);
|
|
216
224
|
},
|
|
217
225
|
[R]
|
|
218
226
|
);
|
|
@@ -359,18 +367,18 @@ function gi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
|
|
|
359
367
|
);
|
|
360
368
|
}
|
|
361
369
|
function jr({ open: t, ...e }) {
|
|
362
|
-
return t ? /* @__PURE__ */ l(
|
|
370
|
+
return t ? /* @__PURE__ */ l(wi, { ...e }) : null;
|
|
363
371
|
}
|
|
364
|
-
function
|
|
372
|
+
function vi(t) {
|
|
365
373
|
return typeof t == "object" && t !== null && typeof t.mount == "function";
|
|
366
374
|
}
|
|
367
|
-
function
|
|
375
|
+
function ki(t) {
|
|
368
376
|
if (typeof t != "object" || t === null)
|
|
369
377
|
return !1;
|
|
370
378
|
const e = t;
|
|
371
379
|
return typeof e.unmount == "function" && typeof e.update == "function" && (e.mountSettings === void 0 || typeof e.mountSettings == "function");
|
|
372
380
|
}
|
|
373
|
-
function
|
|
381
|
+
function Si(t) {
|
|
374
382
|
if (!t.startsWith("/") || t.startsWith("//") || /[\\\s]/.test(t) || [...t].some((e) => e.charCodeAt(0) < 32 || e.charCodeAt(0) === 127))
|
|
375
383
|
return !1;
|
|
376
384
|
try {
|
|
@@ -379,21 +387,21 @@ function yi(t) {
|
|
|
379
387
|
return !1;
|
|
380
388
|
}
|
|
381
389
|
}
|
|
382
|
-
function
|
|
383
|
-
if (!
|
|
390
|
+
function xi(t, e) {
|
|
391
|
+
if (!Si(t))
|
|
384
392
|
return null;
|
|
385
393
|
const n = new URL(t, e);
|
|
386
394
|
return n.origin === e ? n.href : null;
|
|
387
395
|
}
|
|
388
|
-
function
|
|
389
|
-
const n =
|
|
396
|
+
function Ei(t, e) {
|
|
397
|
+
const n = xi(t.url, e);
|
|
390
398
|
return { id: t.id, name: t.name, load: n ? () => import(
|
|
391
399
|
/* @vite-ignore */
|
|
392
400
|
n
|
|
393
401
|
) : null };
|
|
394
402
|
}
|
|
395
403
|
const it = (t) => t instanceof Error ? t.message : String(t);
|
|
396
|
-
function
|
|
404
|
+
function Mi(t) {
|
|
397
405
|
let e = t.ctx, n = null, r = !1, s = !1;
|
|
398
406
|
const i = /* @__PURE__ */ new Set(), a = (g, b) => t.onSettingsError?.(g, b), o = (g) => {
|
|
399
407
|
if (i.delete(g))
|
|
@@ -437,7 +445,7 @@ function ki(t) {
|
|
|
437
445
|
}
|
|
438
446
|
if (r)
|
|
439
447
|
return;
|
|
440
|
-
if (!
|
|
448
|
+
if (!vi(g)) {
|
|
441
449
|
d("the game module does not export mount()");
|
|
442
450
|
return;
|
|
443
451
|
}
|
|
@@ -449,7 +457,7 @@ function ki(t) {
|
|
|
449
457
|
d(`the game failed to start: ${it(h)}`, h);
|
|
450
458
|
return;
|
|
451
459
|
}
|
|
452
|
-
if (!
|
|
460
|
+
if (!ki(y)) {
|
|
453
461
|
d("the game's mount() did not return { unmount, update }");
|
|
454
462
|
return;
|
|
455
463
|
}
|
|
@@ -518,7 +526,7 @@ function It() {
|
|
|
518
526
|
function Ut(t) {
|
|
519
527
|
return t.hasMedia && (t.chatCollapsed || t.isFullscreen);
|
|
520
528
|
}
|
|
521
|
-
function
|
|
529
|
+
function _i(t, e) {
|
|
522
530
|
return t && Ut(e);
|
|
523
531
|
}
|
|
524
532
|
function Sn(t) {
|
|
@@ -527,7 +535,7 @@ function Sn(t) {
|
|
|
527
535
|
function Wr(t) {
|
|
528
536
|
return t.hasMedia ? t.gameOverlay && !t.isFullscreen ? "room-corner" : "control-bar" : "none";
|
|
529
537
|
}
|
|
530
|
-
function
|
|
538
|
+
function Ti(t, e) {
|
|
531
539
|
if (e.clientId) {
|
|
532
540
|
const n = t[e.clientId];
|
|
533
541
|
if (n && (!e.author || !n.author || n.author === e.author)) return n;
|
|
@@ -537,7 +545,7 @@ function xi(t, e) {
|
|
|
537
545
|
}
|
|
538
546
|
}
|
|
539
547
|
function zr(t, e, n) {
|
|
540
|
-
const r =
|
|
548
|
+
const r = Ti(t, e);
|
|
541
549
|
return r ? {
|
|
542
550
|
name: r.name || n.name,
|
|
543
551
|
// A connection briefly without a character (a reconnect waiting for one to
|
|
@@ -548,16 +556,16 @@ function zr(t, e, n) {
|
|
|
548
556
|
here: !0
|
|
549
557
|
} : { name: n.name, sprite: n.sprite, pictureUrl: n.pictureUrl, here: !1 };
|
|
550
558
|
}
|
|
551
|
-
function
|
|
559
|
+
function Ai(t, e, n) {
|
|
552
560
|
return !e || !n.here ? t : e.split(yr).join(n.name);
|
|
553
561
|
}
|
|
554
562
|
function Wt(t, e) {
|
|
555
563
|
const n = x((r) => JSON.stringify(zr(r.roster, t, e)));
|
|
556
564
|
return ye(() => JSON.parse(n), [n]);
|
|
557
565
|
}
|
|
558
|
-
const
|
|
566
|
+
const Ii = pr(!0);
|
|
559
567
|
function Gr() {
|
|
560
|
-
const t = gr(
|
|
568
|
+
const t = gr(Ii);
|
|
561
569
|
F(() => {
|
|
562
570
|
t && Xa();
|
|
563
571
|
}, [t]);
|
|
@@ -571,7 +579,7 @@ const Tt = Ze.memo(
|
|
|
571
579
|
},
|
|
572
580
|
(t, e) => t.html === e.html && t.as === e.as && t.className === e.className && JSON.stringify(t.style) === JSON.stringify(e.style)
|
|
573
581
|
);
|
|
574
|
-
function
|
|
582
|
+
function Ci(t, e) {
|
|
575
583
|
F(() => {
|
|
576
584
|
const n = t.current;
|
|
577
585
|
if (!n || !e || typeof IntersectionObserver > "u") return;
|
|
@@ -598,14 +606,14 @@ function qr({ sprite: t, url: e, alt: n, worn: r }) {
|
|
|
598
606
|
r?.overlay && /* @__PURE__ */ l(Tt, { html: Za(r), style: { display: "contents" } })
|
|
599
607
|
] });
|
|
600
608
|
}
|
|
601
|
-
function
|
|
609
|
+
function Ni(t) {
|
|
602
610
|
return !(t.button !== 0 || t.ctrlKey || t.metaKey || t.shiftKey || t.altKey);
|
|
603
611
|
}
|
|
604
|
-
const
|
|
612
|
+
const Ri = pr(null);
|
|
605
613
|
function Vr() {
|
|
606
|
-
return gr(
|
|
614
|
+
return gr(Ri);
|
|
607
615
|
}
|
|
608
|
-
function
|
|
616
|
+
function Li({ src: t, title: e, onClose: n }) {
|
|
609
617
|
F(() => {
|
|
610
618
|
const i = (a) => {
|
|
611
619
|
We(a) && (a.stopPropagation(), n());
|
|
@@ -651,11 +659,11 @@ function Ii({ src: t, title: e, onClose: n }) {
|
|
|
651
659
|
s
|
|
652
660
|
) : null;
|
|
653
661
|
}
|
|
654
|
-
const Jt = 240,
|
|
655
|
-
function
|
|
662
|
+
const Jt = 240, Fi = 320;
|
|
663
|
+
function $i({ image: t }) {
|
|
656
664
|
const [e, n] = $(!1), r = Ot(t.key);
|
|
657
665
|
if (!r) return null;
|
|
658
|
-
const s = t.w > 0 && t.h > 0, i = s ? Math.min(1,
|
|
666
|
+
const s = t.w > 0 && t.h > 0, i = s ? Math.min(1, Fi / t.w, Jt / t.h) : 1;
|
|
659
667
|
return /* @__PURE__ */ E(he, { children: [
|
|
660
668
|
/* @__PURE__ */ l(
|
|
661
669
|
"a",
|
|
@@ -666,7 +674,7 @@ function Ni({ image: t }) {
|
|
|
666
674
|
className: "block max-w-full cursor-zoom-in",
|
|
667
675
|
"data-testid": "chat-image",
|
|
668
676
|
onClick: (a) => {
|
|
669
|
-
|
|
677
|
+
Ni(a) && (a.preventDefault(), n(!0));
|
|
670
678
|
},
|
|
671
679
|
children: /* @__PURE__ */ l(
|
|
672
680
|
"img",
|
|
@@ -684,7 +692,7 @@ function Ni({ image: t }) {
|
|
|
684
692
|
}
|
|
685
693
|
),
|
|
686
694
|
e && /* @__PURE__ */ l(
|
|
687
|
-
|
|
695
|
+
Li,
|
|
688
696
|
{
|
|
689
697
|
src: r,
|
|
690
698
|
title: t.title,
|
|
@@ -694,12 +702,12 @@ function Ni({ image: t }) {
|
|
|
694
702
|
] });
|
|
695
703
|
}
|
|
696
704
|
function Jr({ images: t }) {
|
|
697
|
-
return t?.length ? /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1 mt-1", "data-testid": "chat-images", children: t.map((e, n) => /* @__PURE__ */ l(
|
|
705
|
+
return t?.length ? /* @__PURE__ */ l("div", { className: "flex flex-wrap gap-1 mt-1", "data-testid": "chat-images", children: t.map((e, n) => /* @__PURE__ */ l($i, { image: e }, `${e.key}-${n}`)) }) : null;
|
|
698
706
|
}
|
|
699
|
-
function
|
|
707
|
+
function Pi(t, e) {
|
|
700
708
|
return t.author && e.author ? t.author === e.author : !!e.clientId && t.clientId === e.clientId;
|
|
701
709
|
}
|
|
702
|
-
const
|
|
710
|
+
const Di = [
|
|
703
711
|
{ id: "smileys", label: "Smileys & Emotion", data: "1f600:grinning face|1f603:grinning face with big eyes|1f604:grinning face with smiling eyes|1f601:beaming face with smiling eyes|1f606:grinning squinting face|1f605:grinning face with sweat|1f923:rolling on the floor laughing|1f602:face with tears of joy|1f642:slightly smiling face|1f643:upside-down face|1fae0:melting face|1f609:winking face|1f60a:smiling face with smiling eyes|1f607:smiling face with halo|1f970:smiling face with hearts|1f60d:smiling face with heart-eyes|1f929:star-struck|1f618:face blowing a kiss|1f617:kissing face|263a-fe0f:smiling face|1f61a:kissing face with closed eyes|1f619:kissing face with smiling eyes|1f972:smiling face with tear|1f60b:face savoring food|1f61b:face with tongue|1f61c:winking face with tongue|1f92a:zany face|1f61d:squinting face with tongue|1f911:money-mouth face|1f917:smiling face with open hands|1f92d:face with hand over mouth|1fae2:face with open eyes and hand over mouth|1fae3:face with peeking eye|1f92b:shushing face|1f914:thinking face|1fae1:saluting face|1f910:zipper-mouth face|1f928:face with raised eyebrow|1f610:neutral face|1f611:expressionless face|1f636:face without mouth|1fae5:dotted line face|1f636-200d-1f32b-fe0f:face in clouds|1f60f:smirking face|1f612:unamused face|1f644:face with rolling eyes|1f62c:grimacing face|1f62e-200d-1f4a8:face exhaling|1f925:lying face|1fae8:shaking face|1f60c:relieved face|1f614:pensive face|1f62a:sleepy face|1f924:drooling face|1f634:sleeping face|1f637:face with medical mask|1f912:face with thermometer|1f915:face with head-bandage|1f922:nauseated face|1f92e:face vomiting|1f927:sneezing face|1f975:hot face|1f976:cold face|1f974:woozy face|1f635:face with crossed-out eyes|1f635-200d-1f4ab:face with spiral eyes|1f92f:exploding head|1f920:cowboy hat face|1f973:partying face|1f978:disguised face|1f60e:smiling face with sunglasses|1f913:nerd face|1f9d0:face with monocle|1f615:confused face|1fae4:face with diagonal mouth|1f61f:worried face|1f641:slightly frowning face|2639-fe0f:frowning face|1f62e:face with open mouth|1f62f:hushed face|1f632:astonished face|1f633:flushed face|1f97a:pleading face|1f979:face holding back tears|1f626:frowning face with open mouth|1f627:anguished face|1f628:fearful face|1f630:anxious face with sweat|1f625:sad but relieved face|1f622:crying face|1f62d:loudly crying face|1f631:face screaming in fear|1f616:confounded face|1f623:persevering face|1f61e:disappointed face|1f613:downcast face with sweat|1f629:weary face|1f62b:tired face|1f971:yawning face|1f624:face with steam from nose|1f621:enraged face|1f620:angry face|1f92c:face with symbols on mouth|1f608:smiling face with horns|1f47f:angry face with horns|1f480:skull|2620-fe0f:skull and crossbones|1f4a9:pile of poo|1f921:clown face|1f479:ogre|1f47a:goblin|1f47b:ghost|1f47d:alien|1f47e:alien monster|1f916:robot|1f63a:grinning cat|1f638:grinning cat with smiling eyes|1f639:cat with tears of joy|1f63b:smiling cat with heart-eyes|1f63c:cat with wry smile|1f63d:kissing cat|1f640:weary cat|1f63f:crying cat|1f63e:pouting cat|1f648:see-no-evil monkey|1f649:hear-no-evil monkey|1f64a:speak-no-evil monkey|1f48c:love letter|1f498:heart with arrow|1f49d:heart with ribbon|1f496:sparkling heart|1f497:growing heart|1f493:beating heart|1f49e:revolving hearts|1f495:two hearts|1f49f:heart decoration|2763-fe0f:heart exclamation|1f494:broken heart|2764-fe0f-200d-1f525:heart on fire|2764-fe0f-200d-1fa79:mending heart|2764-fe0f:red heart|1fa77:pink heart|1f9e1:orange heart|1f49b:yellow heart|1f49a:green heart|1f499:blue heart|1fa75:light blue heart|1f49c:purple heart|1f90e:brown heart|1f5a4:black heart|1fa76:grey heart|1f90d:white heart|1f48b:kiss mark|1f4af:hundred points|1f4a2:anger symbol|1f4a5:collision|1f4ab:dizzy|1f4a6:sweat droplets|1f4a8:dashing away|1f573-fe0f:hole|1f4ac:speech balloon|1f441-fe0f-200d-1f5e8-fe0f:eye in speech bubble|1f5e8-fe0f:left speech bubble|1f5ef-fe0f:right anger bubble|1f4ad:thought balloon|1f4a4:zzz" },
|
|
704
712
|
{ id: "people", label: "People & Body", data: "1f44b:waving hand|1f91a:raised back of hand|1f590-fe0f:hand with fingers splayed|270b:raised hand|1f596:vulcan salute|1faf1:rightwards hand|1faf2:leftwards hand|1faf3:palm down hand|1faf4:palm up hand|1faf7:leftwards pushing hand|1faf8:rightwards pushing hand|1f44c:ok hand|1f90c:pinched fingers|1f90f:pinching hand|270c-fe0f:victory hand|1f91e:crossed fingers|1faf0:hand with index finger and thumb crossed|1f91f:love-you gesture|1f918:sign of the horns|1f919:call me hand|1f448:backhand index pointing left|1f449:backhand index pointing right|1f446:backhand index pointing up|1f595:middle finger|1f447:backhand index pointing down|261d-fe0f:index pointing up|1faf5:index pointing at the viewer|1f44d:thumbs up|1f44e:thumbs down|270a:raised fist|1f44a:oncoming fist|1f91b:left-facing fist|1f91c:right-facing fist|1f44f:clapping hands|1f64c:raising hands|1faf6:heart hands|1f450:open hands|1f932:palms up together|1f91d:handshake|1f64f:folded hands|270d-fe0f:writing hand|1f485:nail polish|1f933:selfie|1f4aa:flexed biceps|1f9be:mechanical arm|1f9bf:mechanical leg|1f9b5:leg|1f9b6:foot|1f442:ear|1f9bb:ear with hearing aid|1f443:nose|1f9e0:brain|1fac0:anatomical heart|1fac1:lungs|1f9b7:tooth|1f9b4:bone|1f440:eyes|1f441-fe0f:eye|1f445:tongue|1f444:mouth|1fae6:biting lip|1f476:baby|1f9d2:child|1f466:boy|1f467:girl|1f9d1:person|1f471:person blond hair|1f468:man|1f9d4:person beard|1f9d4-200d-2642-fe0f:man beard|1f9d4-200d-2640-fe0f:woman beard|1f468-200d-1f9b0:man red hair|1f468-200d-1f9b1:man curly hair|1f468-200d-1f9b3:man white hair|1f468-200d-1f9b2:man bald|1f469:woman|1f469-200d-1f9b0:woman red hair|1f9d1-200d-1f9b0:person red hair|1f469-200d-1f9b1:woman curly hair|1f9d1-200d-1f9b1:person curly hair|1f469-200d-1f9b3:woman white hair|1f9d1-200d-1f9b3:person white hair|1f469-200d-1f9b2:woman bald|1f9d1-200d-1f9b2:person bald|1f471-200d-2640-fe0f:woman blond hair|1f471-200d-2642-fe0f:man blond hair|1f9d3:older person|1f474:old man|1f475:old woman|1f64d:person frowning|1f64d-200d-2642-fe0f:man frowning|1f64d-200d-2640-fe0f:woman frowning|1f64e:person pouting|1f64e-200d-2642-fe0f:man pouting|1f64e-200d-2640-fe0f:woman pouting|1f645:person gesturing no|1f645-200d-2642-fe0f:man gesturing no|1f645-200d-2640-fe0f:woman gesturing no|1f646:person gesturing ok|1f646-200d-2642-fe0f:man gesturing ok|1f646-200d-2640-fe0f:woman gesturing ok|1f481:person tipping hand|1f481-200d-2642-fe0f:man tipping hand|1f481-200d-2640-fe0f:woman tipping hand|1f64b:person raising hand|1f64b-200d-2642-fe0f:man raising hand|1f64b-200d-2640-fe0f:woman raising hand|1f9cf:deaf person|1f9cf-200d-2642-fe0f:deaf man|1f9cf-200d-2640-fe0f:deaf woman|1f647:person bowing|1f647-200d-2642-fe0f:man bowing|1f647-200d-2640-fe0f:woman bowing|1f926:person facepalming|1f926-200d-2642-fe0f:man facepalming|1f926-200d-2640-fe0f:woman facepalming|1f937:person shrugging|1f937-200d-2642-fe0f:man shrugging|1f937-200d-2640-fe0f:woman shrugging|1f9d1-200d-2695-fe0f:health worker|1f468-200d-2695-fe0f:man health worker|1f469-200d-2695-fe0f:woman health worker|1f9d1-200d-1f393:student|1f468-200d-1f393:man student|1f469-200d-1f393:woman student|1f9d1-200d-1f3eb:teacher|1f468-200d-1f3eb:man teacher|1f469-200d-1f3eb:woman teacher|1f9d1-200d-2696-fe0f:judge|1f468-200d-2696-fe0f:man judge|1f469-200d-2696-fe0f:woman judge|1f9d1-200d-1f33e:farmer|1f468-200d-1f33e:man farmer|1f469-200d-1f33e:woman farmer|1f9d1-200d-1f373:cook|1f468-200d-1f373:man cook|1f469-200d-1f373:woman cook|1f9d1-200d-1f527:mechanic|1f468-200d-1f527:man mechanic|1f469-200d-1f527:woman mechanic|1f9d1-200d-1f3ed:factory worker|1f468-200d-1f3ed:man factory worker|1f469-200d-1f3ed:woman factory worker|1f9d1-200d-1f4bc:office worker|1f468-200d-1f4bc:man office worker|1f469-200d-1f4bc:woman office worker|1f9d1-200d-1f52c:scientist|1f468-200d-1f52c:man scientist|1f469-200d-1f52c:woman scientist|1f9d1-200d-1f4bb:technologist|1f468-200d-1f4bb:man technologist|1f469-200d-1f4bb:woman technologist|1f9d1-200d-1f3a4:singer|1f468-200d-1f3a4:man singer|1f469-200d-1f3a4:woman singer|1f9d1-200d-1f3a8:artist|1f468-200d-1f3a8:man artist|1f469-200d-1f3a8:woman artist|1f9d1-200d-2708-fe0f:pilot|1f468-200d-2708-fe0f:man pilot|1f469-200d-2708-fe0f:woman pilot|1f9d1-200d-1f680:astronaut|1f468-200d-1f680:man astronaut|1f469-200d-1f680:woman astronaut|1f9d1-200d-1f692:firefighter|1f468-200d-1f692:man firefighter|1f469-200d-1f692:woman firefighter|1f46e:police officer|1f46e-200d-2642-fe0f:man police officer|1f46e-200d-2640-fe0f:woman police officer|1f575-fe0f:detective|1f575-fe0f-200d-2642-fe0f:man detective|1f575-fe0f-200d-2640-fe0f:woman detective|1f482:guard|1f482-200d-2642-fe0f:man guard|1f482-200d-2640-fe0f:woman guard|1f977:ninja|1f477:construction worker|1f477-200d-2642-fe0f:man construction worker|1f477-200d-2640-fe0f:woman construction worker|1fac5:person with crown|1f934:prince|1f478:princess|1f473:person wearing turban|1f473-200d-2642-fe0f:man wearing turban|1f473-200d-2640-fe0f:woman wearing turban|1f472:person with skullcap|1f9d5:woman with headscarf|1f935:person in tuxedo|1f935-200d-2642-fe0f:man in tuxedo|1f935-200d-2640-fe0f:woman in tuxedo|1f470:person with veil|1f470-200d-2642-fe0f:man with veil|1f470-200d-2640-fe0f:woman with veil|1f930:pregnant woman|1fac3:pregnant man|1fac4:pregnant person|1f931:breast-feeding|1f469-200d-1f37c:woman feeding baby|1f468-200d-1f37c:man feeding baby|1f9d1-200d-1f37c:person feeding baby|1f47c:baby angel|1f385:santa claus|1f936:mrs. claus|1f9d1-200d-1f384:mx claus|1f9b8:superhero|1f9b8-200d-2642-fe0f:man superhero|1f9b8-200d-2640-fe0f:woman superhero|1f9b9:supervillain|1f9b9-200d-2642-fe0f:man supervillain|1f9b9-200d-2640-fe0f:woman supervillain|1f9d9:mage|1f9d9-200d-2642-fe0f:man mage|1f9d9-200d-2640-fe0f:woman mage|1f9da:fairy|1f9da-200d-2642-fe0f:man fairy|1f9da-200d-2640-fe0f:woman fairy|1f9db:vampire|1f9db-200d-2642-fe0f:man vampire|1f9db-200d-2640-fe0f:woman vampire|1f9dc:merperson|1f9dc-200d-2642-fe0f:merman|1f9dc-200d-2640-fe0f:mermaid|1f9dd:elf|1f9dd-200d-2642-fe0f:man elf|1f9dd-200d-2640-fe0f:woman elf|1f9de:genie|1f9de-200d-2642-fe0f:man genie|1f9de-200d-2640-fe0f:woman genie|1f9df:zombie|1f9df-200d-2642-fe0f:man zombie|1f9df-200d-2640-fe0f:woman zombie|1f9cc:troll|1f486:person getting massage|1f486-200d-2642-fe0f:man getting massage|1f486-200d-2640-fe0f:woman getting massage|1f487:person getting haircut|1f487-200d-2642-fe0f:man getting haircut|1f487-200d-2640-fe0f:woman getting haircut|1f6b6:person walking|1f6b6-200d-2642-fe0f:man walking|1f6b6-200d-2640-fe0f:woman walking|1f9cd:person standing|1f9cd-200d-2642-fe0f:man standing|1f9cd-200d-2640-fe0f:woman standing|1f9ce:person kneeling|1f9ce-200d-2642-fe0f:man kneeling|1f9ce-200d-2640-fe0f:woman kneeling|1f9d1-200d-1f9af:person with white cane|1f468-200d-1f9af:man with white cane|1f469-200d-1f9af:woman with white cane|1f9d1-200d-1f9bc:person in motorized wheelchair|1f468-200d-1f9bc:man in motorized wheelchair|1f469-200d-1f9bc:woman in motorized wheelchair|1f9d1-200d-1f9bd:person in manual wheelchair|1f468-200d-1f9bd:man in manual wheelchair|1f469-200d-1f9bd:woman in manual wheelchair|1f3c3:person running|1f3c3-200d-2642-fe0f:man running|1f3c3-200d-2640-fe0f:woman running|1f483:woman dancing|1f57a:man dancing|1f574-fe0f:person in suit levitating|1f46f:people with bunny ears|1f46f-200d-2642-fe0f:men with bunny ears|1f46f-200d-2640-fe0f:women with bunny ears|1f9d6:person in steamy room|1f9d6-200d-2642-fe0f:man in steamy room|1f9d6-200d-2640-fe0f:woman in steamy room|1f9d7:person climbing|1f9d7-200d-2642-fe0f:man climbing|1f9d7-200d-2640-fe0f:woman climbing|1f93a:person fencing|1f3c7:horse racing|26f7-fe0f:skier|1f3c2:snowboarder|1f3cc-fe0f:person golfing|1f3cc-fe0f-200d-2642-fe0f:man golfing|1f3cc-fe0f-200d-2640-fe0f:woman golfing|1f3c4:person surfing|1f3c4-200d-2642-fe0f:man surfing|1f3c4-200d-2640-fe0f:woman surfing|1f6a3:person rowing boat|1f6a3-200d-2642-fe0f:man rowing boat|1f6a3-200d-2640-fe0f:woman rowing boat|1f3ca:person swimming|1f3ca-200d-2642-fe0f:man swimming|1f3ca-200d-2640-fe0f:woman swimming|26f9-fe0f:person bouncing ball|26f9-fe0f-200d-2642-fe0f:man bouncing ball|26f9-fe0f-200d-2640-fe0f:woman bouncing ball|1f3cb-fe0f:person lifting weights|1f3cb-fe0f-200d-2642-fe0f:man lifting weights|1f3cb-fe0f-200d-2640-fe0f:woman lifting weights|1f6b4:person biking|1f6b4-200d-2642-fe0f:man biking|1f6b4-200d-2640-fe0f:woman biking|1f6b5:person mountain biking|1f6b5-200d-2642-fe0f:man mountain biking|1f6b5-200d-2640-fe0f:woman mountain biking|1f938:person cartwheeling|1f938-200d-2642-fe0f:man cartwheeling|1f938-200d-2640-fe0f:woman cartwheeling|1f93c:people wrestling|1f93c-200d-2642-fe0f:men wrestling|1f93c-200d-2640-fe0f:women wrestling|1f93d:person playing water polo|1f93d-200d-2642-fe0f:man playing water polo|1f93d-200d-2640-fe0f:woman playing water polo|1f93e:person playing handball|1f93e-200d-2642-fe0f:man playing handball|1f93e-200d-2640-fe0f:woman playing handball|1f939:person juggling|1f939-200d-2642-fe0f:man juggling|1f939-200d-2640-fe0f:woman juggling|1f9d8:person in lotus position|1f9d8-200d-2642-fe0f:man in lotus position|1f9d8-200d-2640-fe0f:woman in lotus position|1f6c0:person taking bath|1f6cc:person in bed|1f9d1-200d-1f91d-200d-1f9d1:people holding hands|1f46d:women holding hands|1f46b:woman and man holding hands|1f46c:men holding hands|1f48f:kiss|1f469-200d-2764-fe0f-200d-1f48b-200d-1f468:kiss woman, man|1f468-200d-2764-fe0f-200d-1f48b-200d-1f468:kiss man, man|1f469-200d-2764-fe0f-200d-1f48b-200d-1f469:kiss woman, woman|1f491:couple with heart|1f469-200d-2764-fe0f-200d-1f468:couple with heart woman, man|1f468-200d-2764-fe0f-200d-1f468:couple with heart man, man|1f469-200d-2764-fe0f-200d-1f469:couple with heart woman, woman|1f468-200d-1f469-200d-1f466:family man, woman, boy|1f468-200d-1f469-200d-1f467:family man, woman, girl|1f468-200d-1f469-200d-1f467-200d-1f466:family man, woman, girl, boy|1f468-200d-1f469-200d-1f466-200d-1f466:family man, woman, boy, boy|1f468-200d-1f469-200d-1f467-200d-1f467:family man, woman, girl, girl|1f468-200d-1f468-200d-1f466:family man, man, boy|1f468-200d-1f468-200d-1f467:family man, man, girl|1f468-200d-1f468-200d-1f467-200d-1f466:family man, man, girl, boy|1f468-200d-1f468-200d-1f466-200d-1f466:family man, man, boy, boy|1f468-200d-1f468-200d-1f467-200d-1f467:family man, man, girl, girl|1f469-200d-1f469-200d-1f466:family woman, woman, boy|1f469-200d-1f469-200d-1f467:family woman, woman, girl|1f469-200d-1f469-200d-1f467-200d-1f466:family woman, woman, girl, boy|1f469-200d-1f469-200d-1f466-200d-1f466:family woman, woman, boy, boy|1f469-200d-1f469-200d-1f467-200d-1f467:family woman, woman, girl, girl|1f468-200d-1f466:family man, boy|1f468-200d-1f466-200d-1f466:family man, boy, boy|1f468-200d-1f467:family man, girl|1f468-200d-1f467-200d-1f466:family man, girl, boy|1f468-200d-1f467-200d-1f467:family man, girl, girl|1f469-200d-1f466:family woman, boy|1f469-200d-1f466-200d-1f466:family woman, boy, boy|1f469-200d-1f467:family woman, girl|1f469-200d-1f467-200d-1f466:family woman, girl, boy|1f469-200d-1f467-200d-1f467:family woman, girl, girl|1f5e3-fe0f:speaking head|1f464:bust in silhouette|1f465:busts in silhouette|1fac2:people hugging|1f46a:family|1f463:footprints" },
|
|
705
713
|
{ id: "nature", label: "Animals & Nature", data: "1f435:monkey face|1f412:monkey|1f98d:gorilla|1f9a7:orangutan|1f436:dog face|1f415:dog|1f9ae:guide dog|1f415-200d-1f9ba:service dog|1f429:poodle|1f43a:wolf|1f98a:fox|1f99d:raccoon|1f431:cat face|1f408:cat|1f408-200d-2b1b:black cat|1f981:lion|1f42f:tiger face|1f405:tiger|1f406:leopard|1f434:horse face|1face:moose|1facf:donkey|1f40e:horse|1f984:unicorn|1f993:zebra|1f98c:deer|1f9ac:bison|1f42e:cow face|1f402:ox|1f403:water buffalo|1f404:cow|1f437:pig face|1f416:pig|1f417:boar|1f43d:pig nose|1f40f:ram|1f411:ewe|1f410:goat|1f42a:camel|1f42b:two-hump camel|1f999:llama|1f992:giraffe|1f418:elephant|1f9a3:mammoth|1f98f:rhinoceros|1f99b:hippopotamus|1f42d:mouse face|1f401:mouse|1f400:rat|1f439:hamster|1f430:rabbit face|1f407:rabbit|1f43f-fe0f:chipmunk|1f9ab:beaver|1f994:hedgehog|1f987:bat|1f43b:bear|1f43b-200d-2744-fe0f:polar bear|1f428:koala|1f43c:panda|1f9a5:sloth|1f9a6:otter|1f9a8:skunk|1f998:kangaroo|1f9a1:badger|1f43e:paw prints|1f983:turkey|1f414:chicken|1f413:rooster|1f423:hatching chick|1f424:baby chick|1f425:front-facing baby chick|1f426:bird|1f427:penguin|1f54a-fe0f:dove|1f985:eagle|1f986:duck|1f9a2:swan|1f989:owl|1f9a4:dodo|1fab6:feather|1f9a9:flamingo|1f99a:peacock|1f99c:parrot|1fabd:wing|1f426-200d-2b1b:black bird|1fabf:goose|1f438:frog|1f40a:crocodile|1f422:turtle|1f98e:lizard|1f40d:snake|1f432:dragon face|1f409:dragon|1f995:sauropod|1f996:t-rex|1f433:spouting whale|1f40b:whale|1f42c:dolphin|1f9ad:seal|1f41f:fish|1f420:tropical fish|1f421:blowfish|1f988:shark|1f419:octopus|1f41a:spiral shell|1fab8:coral|1fabc:jellyfish|1f980:crab|1f99e:lobster|1f990:shrimp|1f991:squid|1f9aa:oyster|1f40c:snail|1f98b:butterfly|1f41b:bug|1f41c:ant|1f41d:honeybee|1fab2:beetle|1f41e:lady beetle|1f997:cricket|1fab3:cockroach|1f577-fe0f:spider|1f578-fe0f:spider web|1f982:scorpion|1f99f:mosquito|1fab0:fly|1fab1:worm|1f9a0:microbe|1f490:bouquet|1f338:cherry blossom|1f4ae:white flower|1fab7:lotus|1f3f5-fe0f:rosette|1f339:rose|1f940:wilted flower|1f33a:hibiscus|1f33b:sunflower|1f33c:blossom|1f337:tulip|1fabb:hyacinth|1f331:seedling|1fab4:potted plant|1f332:evergreen tree|1f333:deciduous tree|1f334:palm tree|1f335:cactus|1f33e:sheaf of rice|1f33f:herb|2618-fe0f:shamrock|1f340:four leaf clover|1f341:maple leaf|1f342:fallen leaf|1f343:leaf fluttering in wind|1fab9:empty nest|1faba:nest with eggs|1f344:mushroom" },
|
|
@@ -710,13 +718,13 @@ const Li = [
|
|
|
710
718
|
{ id: "symbols", label: "Symbols", data: "1f3e7:atm sign|1f6ae:litter in bin sign|1f6b0:potable water|267f:wheelchair symbol|1f6b9:men’s room|1f6ba:women’s room|1f6bb:restroom|1f6bc:baby symbol|1f6be:water closet|1f6c2:passport control|1f6c3:customs|1f6c4:baggage claim|1f6c5:left luggage|26a0-fe0f:warning|1f6b8:children crossing|26d4:no entry|1f6ab:prohibited|1f6b3:no bicycles|1f6ad:no smoking|1f6af:no littering|1f6b1:non-potable water|1f6b7:no pedestrians|1f4f5:no mobile phones|1f51e:no one under eighteen|2622-fe0f:radioactive|2623-fe0f:biohazard|2b06-fe0f:up arrow|2197-fe0f:up-right arrow|27a1-fe0f:right arrow|2198-fe0f:down-right arrow|2b07-fe0f:down arrow|2199-fe0f:down-left arrow|2b05-fe0f:left arrow|2196-fe0f:up-left arrow|2195-fe0f:up-down arrow|2194-fe0f:left-right arrow|21a9-fe0f:right arrow curving left|21aa-fe0f:left arrow curving right|2934-fe0f:right arrow curving up|2935-fe0f:right arrow curving down|1f503:clockwise vertical arrows|1f504:counterclockwise arrows button|1f519:back arrow|1f51a:end arrow|1f51b:on! arrow|1f51c:soon arrow|1f51d:top arrow|1f6d0:place of worship|269b-fe0f:atom symbol|1f549-fe0f:om|2721-fe0f:star of david|2638-fe0f:wheel of dharma|262f-fe0f:yin yang|271d-fe0f:latin cross|2626-fe0f:orthodox cross|262a-fe0f:star and crescent|262e-fe0f:peace symbol|1f54e:menorah|1f52f:dotted six-pointed star|1faaf:khanda|2648:aries|2649:taurus|264a:gemini|264b:cancer|264c:leo|264d:virgo|264e:libra|264f:scorpio|2650:sagittarius|2651:capricorn|2652:aquarius|2653:pisces|26ce:ophiuchus|1f500:shuffle tracks button|1f501:repeat button|1f502:repeat single button|25b6-fe0f:play button|23e9:fast-forward button|23ed-fe0f:next track button|23ef-fe0f:play or pause button|25c0-fe0f:reverse button|23ea:fast reverse button|23ee-fe0f:last track button|1f53c:upwards button|23eb:fast up button|1f53d:downwards button|23ec:fast down button|23f8-fe0f:pause button|23f9-fe0f:stop button|23fa-fe0f:record button|23cf-fe0f:eject button|1f3a6:cinema|1f505:dim button|1f506:bright button|1f4f6:antenna bars|1f6dc:wireless|1f4f3:vibration mode|1f4f4:mobile phone off|2640-fe0f:female sign|2642-fe0f:male sign|26a7-fe0f:transgender symbol|2716-fe0f:multiply|2795:plus|2796:minus|2797:divide|1f7f0:heavy equals sign|267e-fe0f:infinity|203c-fe0f:double exclamation mark|2049-fe0f:exclamation question mark|2753:red question mark|2754:white question mark|2755:white exclamation mark|2757:red exclamation mark|3030-fe0f:wavy dash|1f4b1:currency exchange|1f4b2:heavy dollar sign|2695-fe0f:medical symbol|267b-fe0f:recycling symbol|269c-fe0f:fleur-de-lis|1f531:trident emblem|1f4db:name badge|1f530:japanese symbol for beginner|2b55:hollow red circle|2705:check mark button|2611-fe0f:check box with check|2714-fe0f:check mark|274c:cross mark|274e:cross mark button|27b0:curly loop|27bf:double curly loop|303d-fe0f:part alternation mark|2733-fe0f:eight-spoked asterisk|2734-fe0f:eight-pointed star|2747-fe0f:sparkle|00a9-fe0f:copyright|00ae-fe0f:registered|2122-fe0f:trade mark|0023-fe0f-20e3:keycap #|002a-fe0f-20e3:keycap *|0030-fe0f-20e3:keycap 0|0031-fe0f-20e3:keycap 1|0032-fe0f-20e3:keycap 2|0033-fe0f-20e3:keycap 3|0034-fe0f-20e3:keycap 4|0035-fe0f-20e3:keycap 5|0036-fe0f-20e3:keycap 6|0037-fe0f-20e3:keycap 7|0038-fe0f-20e3:keycap 8|0039-fe0f-20e3:keycap 9|1f51f:keycap 10|1f520:input latin uppercase|1f521:input latin lowercase|1f522:input numbers|1f523:input symbols|1f524:input latin letters|1f170-fe0f:a button (blood type)|1f18e:ab button (blood type)|1f171-fe0f:b button (blood type)|1f191:cl button|1f192:cool button|1f193:free button|2139-fe0f:information|1f194:id button|24c2-fe0f:circled m|1f195:new button|1f196:ng button|1f17e-fe0f:o button (blood type)|1f197:ok button|1f17f-fe0f:p button|1f198:sos button|1f199:up! button|1f19a:vs button|1f201:japanese “here” button|1f202-fe0f:japanese “service charge” button|1f237-fe0f:japanese “monthly amount” button|1f236:japanese “not free of charge” button|1f22f:japanese “reserved” button|1f250:japanese “bargain” button|1f239:japanese “discount” button|1f21a:japanese “free of charge” button|1f232:japanese “prohibited” button|1f251:japanese “acceptable” button|1f238:japanese “application” button|1f234:japanese “passing grade” button|1f233:japanese “vacancy” button|3297-fe0f:japanese “congratulations” button|3299-fe0f:japanese “secret” button|1f23a:japanese “open for business” button|1f235:japanese “no vacancy” button|1f534:red circle|1f7e0:orange circle|1f7e1:yellow circle|1f7e2:green circle|1f535:blue circle|1f7e3:purple circle|1f7e4:brown circle|26ab:black circle|26aa:white circle|1f7e5:red square|1f7e7:orange square|1f7e8:yellow square|1f7e9:green square|1f7e6:blue square|1f7ea:purple square|1f7eb:brown square|2b1b:black large square|2b1c:white large square|25fc-fe0f:black medium square|25fb-fe0f:white medium square|25fe:black medium-small square|25fd:white medium-small square|25aa-fe0f:black small square|25ab-fe0f:white small square|1f536:large orange diamond|1f537:large blue diamond|1f538:small orange diamond|1f539:small blue diamond|1f53a:red triangle pointed up|1f53b:red triangle pointed down|1f4a0:diamond with a dot|1f518:radio button|1f533:white square button|1f532:black square button" },
|
|
711
719
|
{ id: "flags", label: "Flags", data: "1f3c1:chequered flag|1f6a9:triangular flag|1f38c:crossed flags|1f3f4:black flag|1f3f3-fe0f:white flag|1f3f3-fe0f-200d-1f308:rainbow flag|1f3f3-fe0f-200d-26a7-fe0f:transgender flag|1f3f4-200d-2620-fe0f:pirate flag|1f1e6-1f1e8:flag ascension island|1f1e6-1f1e9:flag andorra|1f1e6-1f1ea:flag united arab emirates|1f1e6-1f1eb:flag afghanistan|1f1e6-1f1ec:flag antigua & barbuda|1f1e6-1f1ee:flag anguilla|1f1e6-1f1f1:flag albania|1f1e6-1f1f2:flag armenia|1f1e6-1f1f4:flag angola|1f1e6-1f1f6:flag antarctica|1f1e6-1f1f7:flag argentina|1f1e6-1f1f8:flag american samoa|1f1e6-1f1f9:flag austria|1f1e6-1f1fa:flag australia|1f1e6-1f1fc:flag aruba|1f1e6-1f1fd:flag åland islands|1f1e6-1f1ff:flag azerbaijan|1f1e7-1f1e6:flag bosnia & herzegovina|1f1e7-1f1e7:flag barbados|1f1e7-1f1e9:flag bangladesh|1f1e7-1f1ea:flag belgium|1f1e7-1f1eb:flag burkina faso|1f1e7-1f1ec:flag bulgaria|1f1e7-1f1ed:flag bahrain|1f1e7-1f1ee:flag burundi|1f1e7-1f1ef:flag benin|1f1e7-1f1f1:flag st. barthélemy|1f1e7-1f1f2:flag bermuda|1f1e7-1f1f3:flag brunei|1f1e7-1f1f4:flag bolivia|1f1e7-1f1f6:flag caribbean netherlands|1f1e7-1f1f7:flag brazil|1f1e7-1f1f8:flag bahamas|1f1e7-1f1f9:flag bhutan|1f1e7-1f1fb:flag bouvet island|1f1e7-1f1fc:flag botswana|1f1e7-1f1fe:flag belarus|1f1e7-1f1ff:flag belize|1f1e8-1f1e6:flag canada|1f1e8-1f1e8:flag cocos (keeling) islands|1f1e8-1f1e9:flag congo - kinshasa|1f1e8-1f1eb:flag central african republic|1f1e8-1f1ec:flag congo - brazzaville|1f1e8-1f1ed:flag switzerland|1f1e8-1f1ee:flag côte d’ivoire|1f1e8-1f1f0:flag cook islands|1f1e8-1f1f1:flag chile|1f1e8-1f1f2:flag cameroon|1f1e8-1f1f3:flag china|1f1e8-1f1f4:flag colombia|1f1e8-1f1f5:flag clipperton island|1f1e8-1f1f7:flag costa rica|1f1e8-1f1fa:flag cuba|1f1e8-1f1fb:flag cape verde|1f1e8-1f1fc:flag curaçao|1f1e8-1f1fd:flag christmas island|1f1e8-1f1fe:flag cyprus|1f1e8-1f1ff:flag czechia|1f1e9-1f1ea:flag germany|1f1e9-1f1ec:flag diego garcia|1f1e9-1f1ef:flag djibouti|1f1e9-1f1f0:flag denmark|1f1e9-1f1f2:flag dominica|1f1e9-1f1f4:flag dominican republic|1f1e9-1f1ff:flag algeria|1f1ea-1f1e6:flag ceuta & melilla|1f1ea-1f1e8:flag ecuador|1f1ea-1f1ea:flag estonia|1f1ea-1f1ec:flag egypt|1f1ea-1f1ed:flag western sahara|1f1ea-1f1f7:flag eritrea|1f1ea-1f1f8:flag spain|1f1ea-1f1f9:flag ethiopia|1f1ea-1f1fa:flag european union|1f1eb-1f1ee:flag finland|1f1eb-1f1ef:flag fiji|1f1eb-1f1f0:flag falkland islands|1f1eb-1f1f2:flag micronesia|1f1eb-1f1f4:flag faroe islands|1f1eb-1f1f7:flag france|1f1ec-1f1e6:flag gabon|1f1ec-1f1e7:flag united kingdom|1f1ec-1f1e9:flag grenada|1f1ec-1f1ea:flag georgia|1f1ec-1f1eb:flag french guiana|1f1ec-1f1ec:flag guernsey|1f1ec-1f1ed:flag ghana|1f1ec-1f1ee:flag gibraltar|1f1ec-1f1f1:flag greenland|1f1ec-1f1f2:flag gambia|1f1ec-1f1f3:flag guinea|1f1ec-1f1f5:flag guadeloupe|1f1ec-1f1f6:flag equatorial guinea|1f1ec-1f1f7:flag greece|1f1ec-1f1f8:flag south georgia & south sandwich islands|1f1ec-1f1f9:flag guatemala|1f1ec-1f1fa:flag guam|1f1ec-1f1fc:flag guinea-bissau|1f1ec-1f1fe:flag guyana|1f1ed-1f1f0:flag hong kong sar china|1f1ed-1f1f2:flag heard island & mcdonald islands|1f1ed-1f1f3:flag honduras|1f1ed-1f1f7:flag croatia|1f1ed-1f1f9:flag haiti|1f1ed-1f1fa:flag hungary|1f1ee-1f1e8:flag canary islands|1f1ee-1f1e9:flag indonesia|1f1ee-1f1ea:flag ireland|1f1ee-1f1f1:flag israel|1f1ee-1f1f2:flag isle of man|1f1ee-1f1f3:flag india|1f1ee-1f1f4:flag british indian ocean territory|1f1ee-1f1f6:flag iraq|1f1ee-1f1f7:flag iran|1f1ee-1f1f8:flag iceland|1f1ee-1f1f9:flag italy|1f1ef-1f1ea:flag jersey|1f1ef-1f1f2:flag jamaica|1f1ef-1f1f4:flag jordan|1f1ef-1f1f5:flag japan|1f1f0-1f1ea:flag kenya|1f1f0-1f1ec:flag kyrgyzstan|1f1f0-1f1ed:flag cambodia|1f1f0-1f1ee:flag kiribati|1f1f0-1f1f2:flag comoros|1f1f0-1f1f3:flag st. kitts & nevis|1f1f0-1f1f5:flag north korea|1f1f0-1f1f7:flag south korea|1f1f0-1f1fc:flag kuwait|1f1f0-1f1fe:flag cayman islands|1f1f0-1f1ff:flag kazakhstan|1f1f1-1f1e6:flag laos|1f1f1-1f1e7:flag lebanon|1f1f1-1f1e8:flag st. lucia|1f1f1-1f1ee:flag liechtenstein|1f1f1-1f1f0:flag sri lanka|1f1f1-1f1f7:flag liberia|1f1f1-1f1f8:flag lesotho|1f1f1-1f1f9:flag lithuania|1f1f1-1f1fa:flag luxembourg|1f1f1-1f1fb:flag latvia|1f1f1-1f1fe:flag libya|1f1f2-1f1e6:flag morocco|1f1f2-1f1e8:flag monaco|1f1f2-1f1e9:flag moldova|1f1f2-1f1ea:flag montenegro|1f1f2-1f1eb:flag st. martin|1f1f2-1f1ec:flag madagascar|1f1f2-1f1ed:flag marshall islands|1f1f2-1f1f0:flag north macedonia|1f1f2-1f1f1:flag mali|1f1f2-1f1f2:flag myanmar (burma)|1f1f2-1f1f3:flag mongolia|1f1f2-1f1f4:flag macao sar china|1f1f2-1f1f5:flag northern mariana islands|1f1f2-1f1f6:flag martinique|1f1f2-1f1f7:flag mauritania|1f1f2-1f1f8:flag montserrat|1f1f2-1f1f9:flag malta|1f1f2-1f1fa:flag mauritius|1f1f2-1f1fb:flag maldives|1f1f2-1f1fc:flag malawi|1f1f2-1f1fd:flag mexico|1f1f2-1f1fe:flag malaysia|1f1f2-1f1ff:flag mozambique|1f1f3-1f1e6:flag namibia|1f1f3-1f1e8:flag new caledonia|1f1f3-1f1ea:flag niger|1f1f3-1f1eb:flag norfolk island|1f1f3-1f1ec:flag nigeria|1f1f3-1f1ee:flag nicaragua|1f1f3-1f1f1:flag netherlands|1f1f3-1f1f4:flag norway|1f1f3-1f1f5:flag nepal|1f1f3-1f1f7:flag nauru|1f1f3-1f1fa:flag niue|1f1f3-1f1ff:flag new zealand|1f1f4-1f1f2:flag oman|1f1f5-1f1e6:flag panama|1f1f5-1f1ea:flag peru|1f1f5-1f1eb:flag french polynesia|1f1f5-1f1ec:flag papua new guinea|1f1f5-1f1ed:flag philippines|1f1f5-1f1f0:flag pakistan|1f1f5-1f1f1:flag poland|1f1f5-1f1f2:flag st. pierre & miquelon|1f1f5-1f1f3:flag pitcairn islands|1f1f5-1f1f7:flag puerto rico|1f1f5-1f1f8:flag palestinian territories|1f1f5-1f1f9:flag portugal|1f1f5-1f1fc:flag palau|1f1f5-1f1fe:flag paraguay|1f1f6-1f1e6:flag qatar|1f1f7-1f1ea:flag réunion|1f1f7-1f1f4:flag romania|1f1f7-1f1f8:flag serbia|1f1f7-1f1fa:flag russia|1f1f7-1f1fc:flag rwanda|1f1f8-1f1e6:flag saudi arabia|1f1f8-1f1e7:flag solomon islands|1f1f8-1f1e8:flag seychelles|1f1f8-1f1e9:flag sudan|1f1f8-1f1ea:flag sweden|1f1f8-1f1ec:flag singapore|1f1f8-1f1ed:flag st. helena, ascension & tristan da cunha|1f1f8-1f1ee:flag slovenia|1f1f8-1f1ef:flag svalbard & jan mayen|1f1f8-1f1f0:flag slovakia|1f1f8-1f1f1:flag sierra leone|1f1f8-1f1f2:flag san marino|1f1f8-1f1f3:flag senegal|1f1f8-1f1f4:flag somalia|1f1f8-1f1f7:flag suriname|1f1f8-1f1f8:flag south sudan|1f1f8-1f1f9:flag são tomé & príncipe|1f1f8-1f1fb:flag el salvador|1f1f8-1f1fd:flag sint maarten|1f1f8-1f1fe:flag syria|1f1f8-1f1ff:flag eswatini|1f1f9-1f1e6:flag tristan da cunha|1f1f9-1f1e8:flag turks & caicos islands|1f1f9-1f1e9:flag chad|1f1f9-1f1eb:flag french southern and antarctic lands|1f1f9-1f1ec:flag togo|1f1f9-1f1ed:flag thailand|1f1f9-1f1ef:flag tajikistan|1f1f9-1f1f0:flag tokelau|1f1f9-1f1f1:flag timor-leste|1f1f9-1f1f2:flag turkmenistan|1f1f9-1f1f3:flag tunisia|1f1f9-1f1f4:flag tonga|1f1f9-1f1f7:flag türkiye|1f1f9-1f1f9:flag trinidad & tobago|1f1f9-1f1fb:flag tuvalu|1f1f9-1f1fc:flag taiwan|1f1f9-1f1ff:flag tanzania|1f1fa-1f1e6:flag ukraine|1f1fa-1f1ec:flag uganda|1f1fa-1f1f2:flag u.s. outlying islands|1f1fa-1f1f3:flag united nations|1f1fa-1f1f8:flag united states|1f1fa-1f1fe:flag uruguay|1f1fa-1f1ff:flag uzbekistan|1f1fb-1f1e6:flag vatican city|1f1fb-1f1e8:flag st. vincent & grenadines|1f1fb-1f1ea:flag venezuela|1f1fb-1f1ec:flag british virgin islands|1f1fb-1f1ee:flag u.s. virgin islands|1f1fb-1f1f3:flag vietnam|1f1fb-1f1fa:flag vanuatu|1f1fc-1f1eb:flag wallis & futuna|1f1fc-1f1f8:flag samoa|1f1fd-1f1f0:flag kosovo|1f1fe-1f1ea:flag yemen|1f1fe-1f1f9:flag mayotte|1f1ff-1f1e6:flag south africa|1f1ff-1f1f2:flag zambia|1f1ff-1f1fc:flag zimbabwe|1f3f4-e0067-e0062-e0065-e006e-e0067-e007f:flag england|1f3f4-e0067-e0062-e0073-e0063-e0074-e007f:flag scotland|1f3f4-e0067-e0062-e0077-e006c-e0073-e007f:flag wales" }
|
|
712
720
|
];
|
|
713
|
-
function
|
|
721
|
+
function Bi(t) {
|
|
714
722
|
const e = t.indexOf(":"), n = t.slice(0, e);
|
|
715
723
|
return { char: String.fromCodePoint(...n.split("-").map((r) => parseInt(r, 16))), name: t.slice(e + 1) };
|
|
716
724
|
}
|
|
717
725
|
let Un = null;
|
|
718
726
|
function xn() {
|
|
719
|
-
return Un ??=
|
|
727
|
+
return Un ??= Di.map((t) => ({ id: t.id, label: t.label, emoji: t.data.split("|").map(Bi) })), Un;
|
|
720
728
|
}
|
|
721
729
|
let Qe = null;
|
|
722
730
|
function jt(t) {
|
|
@@ -730,7 +738,7 @@ function jt(t) {
|
|
|
730
738
|
}
|
|
731
739
|
return Qe.get(t) ?? Qe.get(t.replace(/\ufe0f/g, ""));
|
|
732
740
|
}
|
|
733
|
-
function
|
|
741
|
+
function Oi(t, e = 120) {
|
|
734
742
|
const n = t.toLowerCase().trim().split(/\s+/).filter(Boolean);
|
|
735
743
|
if (!n.length) return [];
|
|
736
744
|
const s = xn().flatMap((o) => o.emoji).filter((o) => {
|
|
@@ -743,7 +751,7 @@ function $i(t, e = 120) {
|
|
|
743
751
|
};
|
|
744
752
|
return s.sort((o, f) => a(o) - a(f)), s.slice(0, e);
|
|
745
753
|
}
|
|
746
|
-
const
|
|
754
|
+
const ji = [
|
|
747
755
|
[128077],
|
|
748
756
|
[10084, 65039],
|
|
749
757
|
[128514],
|
|
@@ -761,20 +769,20 @@ function En() {
|
|
|
761
769
|
return [];
|
|
762
770
|
}
|
|
763
771
|
}
|
|
764
|
-
function
|
|
772
|
+
function Hi(t) {
|
|
765
773
|
const e = [t, ...En().filter((n) => n !== t)].slice(0, Qr);
|
|
766
774
|
ts(wr.RECENT_EMOJI, JSON.stringify(e));
|
|
767
775
|
}
|
|
768
|
-
function
|
|
776
|
+
function Ui(t = 3) {
|
|
769
777
|
const e = [];
|
|
770
|
-
for (const n of [...En(), ...
|
|
778
|
+
for (const n of [...En(), ...ji])
|
|
771
779
|
if (e.includes(n) || e.push(n), e.length === t) break;
|
|
772
780
|
return e;
|
|
773
781
|
}
|
|
774
782
|
function Yr(t, e) {
|
|
775
783
|
return t.by.some((n) => n === e.author || !!e.clientId && n === e.clientId);
|
|
776
784
|
}
|
|
777
|
-
function
|
|
785
|
+
function Wi(t, e, n) {
|
|
778
786
|
const r = /* @__PURE__ */ new Map();
|
|
779
787
|
for (const o of Object.values(e))
|
|
780
788
|
o.author && r.set(o.author, o.name), r.set(o.clientId, o.name);
|
|
@@ -790,16 +798,16 @@ function Oi(t, e, n) {
|
|
|
790
798
|
}
|
|
791
799
|
return i && s.unshift("You"), a && s.push(a === 1 ? "1 other" : `${a} others`), s;
|
|
792
800
|
}
|
|
793
|
-
function
|
|
801
|
+
function zi(t, e) {
|
|
794
802
|
return `${t.length <= 1 ? t[0] ?? "Someone" : `${t.slice(0, -1).join(", ")} and ${t[t.length - 1]}`} reacted with ${e ? `:${e.replace(/\s+/g, "_")}:` : "this"}`;
|
|
795
803
|
}
|
|
796
804
|
const Ie = 8;
|
|
797
|
-
function
|
|
805
|
+
function Gi(t) {
|
|
798
806
|
return document.addEventListener("fullscreenchange", t), () => document.removeEventListener("fullscreenchange", t);
|
|
799
807
|
}
|
|
800
808
|
function Xr() {
|
|
801
809
|
const t = Vr();
|
|
802
|
-
return Wa(
|
|
810
|
+
return Wa(Gi, () => document.fullscreenElement, () => null) ?? t ?? document.body;
|
|
803
811
|
}
|
|
804
812
|
function Zr({
|
|
805
813
|
anchor: t,
|
|
@@ -864,7 +872,7 @@ function Zr({
|
|
|
864
872
|
u
|
|
865
873
|
);
|
|
866
874
|
}
|
|
867
|
-
function
|
|
875
|
+
function Ki({ anchor: t, width: e, children: n }) {
|
|
868
876
|
const r = Xr(), [s, i] = $(null);
|
|
869
877
|
return dn(() => {
|
|
870
878
|
if (!t) return;
|
|
@@ -880,12 +888,12 @@ function Ui({ anchor: t, width: e, children: n }) {
|
|
|
880
888
|
r
|
|
881
889
|
) : null;
|
|
882
890
|
}
|
|
883
|
-
const
|
|
884
|
-
function
|
|
891
|
+
const qi = 340;
|
|
892
|
+
function Vi({ anchor: t, onPick: e, onClose: n }) {
|
|
885
893
|
const [r, s] = $(""), [i, a] = $(null), o = P(null), f = P(null), c = ye(() => xn(), []), d = ye(
|
|
886
894
|
() => En().map((m) => jt(m) ?? { char: m, name: "" }).slice(0, 16),
|
|
887
895
|
[]
|
|
888
|
-
), u = ye(() =>
|
|
896
|
+
), u = ye(() => Oi(r), [r]), g = r.trim().length > 0;
|
|
889
897
|
F(() => {
|
|
890
898
|
o.current?.focus({ preventScroll: !0 });
|
|
891
899
|
}, []);
|
|
@@ -908,7 +916,7 @@ function zi({ anchor: t, onPick: e, onClose: n }) {
|
|
|
908
916
|
},
|
|
909
917
|
p
|
|
910
918
|
);
|
|
911
|
-
return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width:
|
|
919
|
+
return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width: qi, className: "emoji-picker", ariaLabel: "Emoji picker", testId: "emoji-picker", children: [
|
|
912
920
|
/* @__PURE__ */ l("div", { className: "emoji-picker-search", children: /* @__PURE__ */ l(
|
|
913
921
|
"input",
|
|
914
922
|
{
|
|
@@ -949,43 +957,43 @@ function zi({ anchor: t, onPick: e, onClose: n }) {
|
|
|
949
957
|
] }) : null })
|
|
950
958
|
] });
|
|
951
959
|
}
|
|
952
|
-
function
|
|
960
|
+
function ic({ className: t = "w-5 h-5" }) {
|
|
953
961
|
return /* @__PURE__ */ l("svg", { className: t, fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ l("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" }) });
|
|
954
962
|
}
|
|
955
|
-
function
|
|
963
|
+
function Ji({ className: t = "w-5 h-5" }) {
|
|
956
964
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M8 5v14l11-7z" }) });
|
|
957
965
|
}
|
|
958
|
-
function
|
|
966
|
+
function Qi({ className: t = "w-5 h-5" }) {
|
|
959
967
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M6 19h4V5H6v14zm8-14v14h4V5h-4z" }) });
|
|
960
968
|
}
|
|
961
|
-
function
|
|
969
|
+
function Yi({ className: t = "w-5 h-5" }) {
|
|
962
970
|
return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
|
|
963
971
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
|
|
964
972
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" })
|
|
965
973
|
] });
|
|
966
974
|
}
|
|
967
|
-
function
|
|
975
|
+
function Xi({ className: t = "w-5 h-5" }) {
|
|
968
976
|
return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
|
|
969
977
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
|
|
970
978
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.536 8.464a5 5 0 010 7.072" })
|
|
971
979
|
] });
|
|
972
980
|
}
|
|
973
|
-
function
|
|
981
|
+
function Zi({ className: t = "w-5 h-5" }) {
|
|
974
982
|
return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
|
|
975
983
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z" }),
|
|
976
984
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.536 8.464a5 5 0 010 7.072M18.364 5.636a9 9 0 010 12.728" })
|
|
977
985
|
] });
|
|
978
986
|
}
|
|
979
|
-
function
|
|
987
|
+
function eo({ className: t = "w-5 h-5" }) {
|
|
980
988
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4" }) });
|
|
981
989
|
}
|
|
982
|
-
function
|
|
983
|
-
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "
|
|
990
|
+
function to({ className: t = "w-5 h-5" }) {
|
|
991
|
+
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 4l5 5m0-4v4H5m15-5l-5 5m0-4v4h4M4 20l5-5m0 4v-4H5m15 5l-5-5m0 4v-4h4" }) });
|
|
984
992
|
}
|
|
985
993
|
function ea({ className: t = "w-5 h-5" }) {
|
|
986
994
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) });
|
|
987
995
|
}
|
|
988
|
-
function
|
|
996
|
+
function no({ className: t = "w-5 h-5" }) {
|
|
989
997
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) });
|
|
990
998
|
}
|
|
991
999
|
function ta({ className: t = "w-4 h-4" }) {
|
|
@@ -994,7 +1002,7 @@ function ta({ className: t = "w-4 h-4" }) {
|
|
|
994
1002
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12l-5 4v-8l5 4z" })
|
|
995
1003
|
] });
|
|
996
1004
|
}
|
|
997
|
-
function
|
|
1005
|
+
function ro({ className: t = "w-4 h-4" }) {
|
|
998
1006
|
return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
|
|
999
1007
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 4v16" }),
|
|
1000
1008
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12l5 4v-8l-5 4z" })
|
|
@@ -1003,13 +1011,13 @@ function Zi({ className: t = "w-4 h-4" }) {
|
|
|
1003
1011
|
function na({ className: t = "w-5 h-5" }) {
|
|
1004
1012
|
return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l12 12M18 6L6 18" }) });
|
|
1005
1013
|
}
|
|
1006
|
-
function
|
|
1014
|
+
function ao({ className: t = "w-5 h-5" }) {
|
|
1007
1015
|
return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: [
|
|
1008
1016
|
/* @__PURE__ */ l("path", { d: "M12 5l8 11H4z" }),
|
|
1009
1017
|
/* @__PURE__ */ l("rect", { x: "4", y: "17", width: "16", height: "3", rx: "0.5" })
|
|
1010
1018
|
] });
|
|
1011
1019
|
}
|
|
1012
|
-
function
|
|
1020
|
+
function so({ className: t = "w-5 h-5" }) {
|
|
1013
1021
|
return /* @__PURE__ */ l("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 4h16a1 1 0 011 1v14a1 1 0 01-1 1H4a1 1 0 01-1-1V5a1 1 0 011-1z" }) });
|
|
1014
1022
|
}
|
|
1015
1023
|
function ra({ className: t = "w-4 h-4" }) {
|
|
@@ -1020,7 +1028,7 @@ function ra({ className: t = "w-4 h-4" }) {
|
|
|
1020
1028
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", d: "M19 2v6M16 5h6" })
|
|
1021
1029
|
] });
|
|
1022
1030
|
}
|
|
1023
|
-
function
|
|
1031
|
+
function io({ className: t = "w-4 h-4" }) {
|
|
1024
1032
|
return /* @__PURE__ */ E("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
|
|
1025
1033
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 7L4 12l6 5" }),
|
|
1026
1034
|
/* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 12h9a7 7 0 017 7" })
|
|
@@ -1029,12 +1037,12 @@ function no({ className: t = "w-4 h-4" }) {
|
|
|
1029
1037
|
function Qt(t) {
|
|
1030
1038
|
return new Date(t).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
1031
1039
|
}
|
|
1032
|
-
const
|
|
1033
|
-
const n = x((p) => p.me.clientId), r = x((p) => p.me.clientId ? p.roster[p.me.clientId]?.author : void 0), s =
|
|
1040
|
+
const oo = Ze.memo(function({ message: e }) {
|
|
1041
|
+
const n = x((p) => p.me.clientId), r = x((p) => p.me.clientId ? p.roster[p.me.clientId]?.author : void 0), s = Pi(e, { clientId: n, author: r }), i = Wt(
|
|
1034
1042
|
{ clientId: e.clientId, author: e.author },
|
|
1035
1043
|
{ name: e.name, sprite: e.sprite }
|
|
1036
1044
|
), a = Ue(i.sprite, i.pictureUrl), o = e.isSystem ? void 0 : i.cosmetics, f = P(null);
|
|
1037
|
-
|
|
1045
|
+
Ci(f, !!o);
|
|
1038
1046
|
const [c] = $(
|
|
1039
1047
|
() => e.live && e.text ? vr(e.text, o) : null
|
|
1040
1048
|
), [d, u] = $(!1), [g, b] = $(null), y = x((p) => p.setReplyingTo);
|
|
@@ -1048,12 +1056,14 @@ const ro = Ze.memo(function({ message: e }) {
|
|
|
1048
1056
|
] }) });
|
|
1049
1057
|
if (e.isSystem)
|
|
1050
1058
|
return /* @__PURE__ */ E("div", { className: "px-2 py-0.5 text-[11px] text-text-muted italic text-center leading-tight", children: [
|
|
1051
|
-
|
|
1059
|
+
Ai(e.text, e.template, i),
|
|
1052
1060
|
/* @__PURE__ */ l("span", { className: "ml-1 text-[10px] opacity-50", children: Qt(e.ts) })
|
|
1053
1061
|
] });
|
|
1054
1062
|
const h = { clientId: n, author: r }, m = (p) => {
|
|
1055
|
-
const M = e.reactions?.find((
|
|
1056
|
-
R &&
|
|
1063
|
+
const M = e.reactions?.find((w) => w.emoji === p), R = !(M && Yr(M, h));
|
|
1064
|
+
R && Hi(p);
|
|
1065
|
+
const T = r ?? n;
|
|
1066
|
+
T && ns(e.id, p, R, T), rs(e.id, p, R);
|
|
1057
1067
|
};
|
|
1058
1068
|
return /* @__PURE__ */ E(
|
|
1059
1069
|
"div",
|
|
@@ -1070,7 +1080,7 @@ const ro = Ze.memo(function({ message: e }) {
|
|
|
1070
1080
|
},
|
|
1071
1081
|
"data-active": d || g ? "true" : void 0,
|
|
1072
1082
|
children: [
|
|
1073
|
-
e.replyTo && /* @__PURE__ */ l(
|
|
1083
|
+
e.replyTo && /* @__PURE__ */ l(fo, { replyTo: e.replyTo }),
|
|
1074
1084
|
/* @__PURE__ */ E("div", { className: "flex items-start gap-2", children: [
|
|
1075
1085
|
/* @__PURE__ */ l(qr, { sprite: i.sprite, url: i.pictureUrl, alt: i.name, worn: o }),
|
|
1076
1086
|
/* @__PURE__ */ E("div", { className: "flex-1 min-w-0 -mt-0.5", children: [
|
|
@@ -1078,11 +1088,11 @@ const ro = Ze.memo(function({ message: e }) {
|
|
|
1078
1088
|
/* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted opacity-60 ml-1.5", children: Qt(e.ts) }),
|
|
1079
1089
|
e.text && (c ? /* @__PURE__ */ l(Tt, { as: "p", html: c, className: "text-[13px] text-text break-words leading-snug m-0" }) : /* @__PURE__ */ l("p", { className: "text-[13px] text-text break-words leading-snug m-0", children: e.text })),
|
|
1080
1090
|
/* @__PURE__ */ l(Jr, { images: e.images }),
|
|
1081
|
-
e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(
|
|
1091
|
+
e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(lo, { reactions: e.reactions, me: h, onToggle: m, onAdd: b })
|
|
1082
1092
|
] })
|
|
1083
1093
|
] }),
|
|
1084
1094
|
(d || g) && /* @__PURE__ */ E("div", { className: "chat-msg-actions", role: "toolbar", "aria-label": "Message actions", "data-testid": "chat-msg-actions", children: [
|
|
1085
|
-
|
|
1095
|
+
Ui().map((p) => /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn chat-action-emoji", onClick: () => m(p), "aria-label": `React with ${jt(p)?.name ?? p}`, title: jt(p)?.name, children: p }, p)),
|
|
1086
1096
|
/* @__PURE__ */ l(
|
|
1087
1097
|
"button",
|
|
1088
1098
|
{
|
|
@@ -1095,16 +1105,16 @@ const ro = Ze.memo(function({ message: e }) {
|
|
|
1095
1105
|
children: /* @__PURE__ */ l(ra, {})
|
|
1096
1106
|
}
|
|
1097
1107
|
),
|
|
1098
|
-
|
|
1108
|
+
/* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn", onClick: () => y(e.id), "aria-label": "Reply", title: "Reply", children: /* @__PURE__ */ l(io, {}) })
|
|
1099
1109
|
] }),
|
|
1100
|
-
g && /* @__PURE__ */ l(
|
|
1110
|
+
g && /* @__PURE__ */ l(Vi, { anchor: g, onPick: m, onClose: () => {
|
|
1101
1111
|
b(null), u(!1);
|
|
1102
1112
|
} })
|
|
1103
1113
|
]
|
|
1104
1114
|
}
|
|
1105
1115
|
);
|
|
1106
1116
|
});
|
|
1107
|
-
function
|
|
1117
|
+
function fo({ replyTo: t }) {
|
|
1108
1118
|
const e = x((a) => a.chat.find((o) => o.id === t)), n = x((a) => a.jumpToMessage), r = Wt(
|
|
1109
1119
|
{ clientId: e?.clientId ?? "", author: e?.author },
|
|
1110
1120
|
{ name: e?.name ?? "", sprite: e?.sprite ?? null }
|
|
@@ -1141,7 +1151,7 @@ function ao({ replyTo: t }) {
|
|
|
1141
1151
|
}
|
|
1142
1152
|
);
|
|
1143
1153
|
}
|
|
1144
|
-
function
|
|
1154
|
+
function lo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
|
|
1145
1155
|
const s = x((i) => i.roster);
|
|
1146
1156
|
return /* @__PURE__ */ E("div", { className: "chat-reactions", "data-testid": "chat-reactions", children: [
|
|
1147
1157
|
t.map((i) => {
|
|
@@ -1154,7 +1164,7 @@ function so({ reactions: t, me: e, onToggle: n, onAdd: r }) {
|
|
|
1154
1164
|
"data-mine": a ? "true" : void 0,
|
|
1155
1165
|
"aria-pressed": a,
|
|
1156
1166
|
onClick: () => n(i.emoji),
|
|
1157
|
-
title:
|
|
1167
|
+
title: zi(Wi(i, s, e), jt(i.emoji)?.name),
|
|
1158
1168
|
"data-emoji": i.emoji,
|
|
1159
1169
|
children: [
|
|
1160
1170
|
/* @__PURE__ */ l("span", { className: "chat-reaction-emoji", children: i.emoji }),
|
|
@@ -1167,7 +1177,7 @@ function so({ reactions: t, me: e, onToggle: n, onAdd: r }) {
|
|
|
1167
1177
|
/* @__PURE__ */ l("button", { type: "button", className: "chat-reaction chat-reaction-add", onClick: (i) => r(i.currentTarget), "aria-label": "Add reaction", title: "Add reaction", children: /* @__PURE__ */ l(ra, {}) })
|
|
1168
1178
|
] });
|
|
1169
1179
|
}
|
|
1170
|
-
function
|
|
1180
|
+
function co() {
|
|
1171
1181
|
Gr();
|
|
1172
1182
|
const t = x((i) => i.chat), e = P(null), n = P(!1), r = H(() => {
|
|
1173
1183
|
const i = e.current;
|
|
@@ -1203,7 +1213,7 @@ function io() {
|
|
|
1203
1213
|
/* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted whitespace-nowrap", children: new Date(i.ts).toLocaleDateString([], { weekday: "short", month: "short", day: "numeric" }) }),
|
|
1204
1214
|
/* @__PURE__ */ l("div", { className: "flex-1 h-px bg-border" })
|
|
1205
1215
|
] }),
|
|
1206
|
-
/* @__PURE__ */ l(
|
|
1216
|
+
/* @__PURE__ */ l(oo, { message: i })
|
|
1207
1217
|
] }, i.id);
|
|
1208
1218
|
}) })
|
|
1209
1219
|
}
|
|
@@ -1230,12 +1240,12 @@ const Mn = [
|
|
|
1230
1240
|
scope: "local"
|
|
1231
1241
|
}
|
|
1232
1242
|
], ht = "/";
|
|
1233
|
-
function
|
|
1243
|
+
function uo(t) {
|
|
1234
1244
|
if (!t.startsWith(ht)) return null;
|
|
1235
1245
|
const e = t.slice(ht.length);
|
|
1236
1246
|
return /\s/.test(e) ? null : e.toLowerCase();
|
|
1237
1247
|
}
|
|
1238
|
-
function
|
|
1248
|
+
function ho(t, e = Mn) {
|
|
1239
1249
|
const n = t.toLowerCase();
|
|
1240
1250
|
if (!n) return [...e].sort((s, i) => s.name.localeCompare(i.name));
|
|
1241
1251
|
const r = [];
|
|
@@ -1245,23 +1255,23 @@ function fo(t, e = Mn) {
|
|
|
1245
1255
|
}
|
|
1246
1256
|
return r.sort((s, i) => s.rank - i.rank || s.cmd.name.localeCompare(i.cmd.name)).map((s) => s.cmd);
|
|
1247
1257
|
}
|
|
1248
|
-
function
|
|
1258
|
+
function mo(t) {
|
|
1249
1259
|
return `${ht}${t.name} `;
|
|
1250
1260
|
}
|
|
1251
1261
|
function Yt(t, e) {
|
|
1252
1262
|
return e <= 0 ? 0 : (t % e + e) % e;
|
|
1253
1263
|
}
|
|
1254
|
-
function
|
|
1264
|
+
function go(t, e = Mn) {
|
|
1255
1265
|
const n = t.trim();
|
|
1256
1266
|
if (!n) return null;
|
|
1257
1267
|
if (!n.startsWith(ht)) return { kind: "chat", text: n };
|
|
1258
1268
|
const r = n.slice(ht.length), s = r.search(/\s/), i = (s === -1 ? r : r.slice(0, s)).toLowerCase(), a = s === -1 ? "" : r.slice(s).trim(), o = e.find((f) => f.name.toLowerCase() === i);
|
|
1259
1269
|
return o ? { kind: "command", command: o, args: a } : { kind: "chat", text: n };
|
|
1260
1270
|
}
|
|
1261
|
-
function
|
|
1271
|
+
function po(t, e) {
|
|
1262
1272
|
return t.requiresMedia && !e.hasMedia ? `${ht}${t.name} needs an episode loaded.` : null;
|
|
1263
1273
|
}
|
|
1264
|
-
function
|
|
1274
|
+
function bo({
|
|
1265
1275
|
commands: t,
|
|
1266
1276
|
activeIndex: e,
|
|
1267
1277
|
hasMedia: n,
|
|
@@ -1337,17 +1347,17 @@ function sa() {
|
|
|
1337
1347
|
i.current.clear();
|
|
1338
1348
|
}, []);
|
|
1339
1349
|
const a = H((h) => {
|
|
1340
|
-
|
|
1350
|
+
ti(h) && (URL.revokeObjectURL(h.previewUrl), i.current.delete(h.previewUrl));
|
|
1341
1351
|
}, []), o = H(async (h) => {
|
|
1342
1352
|
if (!h.length) return;
|
|
1343
1353
|
const m = [];
|
|
1344
1354
|
for (const p of h) {
|
|
1345
|
-
const M =
|
|
1355
|
+
const M = ri(p);
|
|
1346
1356
|
if (M) {
|
|
1347
1357
|
s("error", M);
|
|
1348
1358
|
continue;
|
|
1349
1359
|
}
|
|
1350
|
-
const { w: R, h: T } = await
|
|
1360
|
+
const { w: R, h: T } = await ii(p), w = URL.createObjectURL(p);
|
|
1351
1361
|
i.current.add(w), m.push({
|
|
1352
1362
|
kind: "file",
|
|
1353
1363
|
id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
@@ -1394,10 +1404,10 @@ function sa() {
|
|
|
1394
1404
|
return [];
|
|
1395
1405
|
});
|
|
1396
1406
|
}, [a]), u = H((h) => {
|
|
1397
|
-
const m =
|
|
1407
|
+
const m = ai(h.clipboardData);
|
|
1398
1408
|
m.length && (h.preventDefault(), o(m));
|
|
1399
1409
|
}, [o]), g = H((h) => {
|
|
1400
|
-
const m =
|
|
1410
|
+
const m = si(h.dataTransfer);
|
|
1401
1411
|
m.length && (h.preventDefault(), o(m));
|
|
1402
1412
|
}, [o]), b = H((h) => {
|
|
1403
1413
|
h.dataTransfer?.types?.includes("Files") && h.preventDefault();
|
|
@@ -1405,9 +1415,9 @@ function sa() {
|
|
|
1405
1415
|
if (!t.length) return [];
|
|
1406
1416
|
r(!0);
|
|
1407
1417
|
try {
|
|
1408
|
-
return await
|
|
1418
|
+
return await fi(t);
|
|
1409
1419
|
} catch (h) {
|
|
1410
|
-
return N("chat", "Image upload failed",
|
|
1420
|
+
return N("chat", "Image upload failed", li(h)), s("error", ni(h)), null;
|
|
1411
1421
|
} finally {
|
|
1412
1422
|
r(!1);
|
|
1413
1423
|
}
|
|
@@ -1425,8 +1435,8 @@ function sa() {
|
|
|
1425
1435
|
onDragOver: b
|
|
1426
1436
|
};
|
|
1427
1437
|
}
|
|
1428
|
-
const
|
|
1429
|
-
class
|
|
1438
|
+
const yo = 2500, wo = 5e3;
|
|
1439
|
+
class vo {
|
|
1430
1440
|
constructor(e, n = Date.now) {
|
|
1431
1441
|
this.send = e, this.now = n;
|
|
1432
1442
|
}
|
|
@@ -1441,20 +1451,20 @@ class po {
|
|
|
1441
1451
|
return;
|
|
1442
1452
|
}
|
|
1443
1453
|
const n = this.now();
|
|
1444
|
-
(!this.typing || n - this.lastSent >=
|
|
1454
|
+
(!this.typing || n - this.lastSent >= yo) && (this.typing = !0, this.lastSent = n, this.send(!0)), this.idle && clearTimeout(this.idle), this.idle = setTimeout(() => this.stop(), wo);
|
|
1445
1455
|
}
|
|
1446
1456
|
stop() {
|
|
1447
1457
|
this.idle && (clearTimeout(this.idle), this.idle = null), this.typing && (this.typing = !1, this.send(!1));
|
|
1448
1458
|
}
|
|
1449
1459
|
}
|
|
1450
1460
|
function ia() {
|
|
1451
|
-
const [t] = $(() => new
|
|
1461
|
+
const [t] = $(() => new vo(as));
|
|
1452
1462
|
return F(() => () => t.stop(), [t]), t;
|
|
1453
1463
|
}
|
|
1454
|
-
function
|
|
1464
|
+
function ko(t) {
|
|
1455
1465
|
return t.length === 0 ? null : t.length === 1 ? `${t[0]} is typing…` : t.length === 2 ? `${t[0]} and ${t[1]} are typing…` : t.length === 3 ? `${t[0]}, ${t[1]} and ${t[2]} are typing…` : "Several people are typing…";
|
|
1456
1466
|
}
|
|
1457
|
-
function
|
|
1467
|
+
function So({ replyTo: t, onCancel: e }) {
|
|
1458
1468
|
const n = x((i) => i.chat.find((a) => a.id === t)), r = Wt(
|
|
1459
1469
|
{ clientId: n?.clientId ?? "", author: n?.author },
|
|
1460
1470
|
{ name: n?.name ?? "a message", sprite: n?.sprite ?? null }
|
|
@@ -1467,7 +1477,7 @@ function yo({ replyTo: t, onCancel: e }) {
|
|
|
1467
1477
|
/* @__PURE__ */ l("button", { type: "button", className: "chat-reply-cancel", onClick: e, "aria-label": "Cancel reply", title: "Cancel reply", children: /* @__PURE__ */ l(na, { className: "w-3.5 h-3.5" }) })
|
|
1468
1478
|
] });
|
|
1469
1479
|
}
|
|
1470
|
-
function
|
|
1480
|
+
function xo() {
|
|
1471
1481
|
const t = x((a) => a.typing), e = x((a) => a.roster), n = x((a) => a.me.clientId), r = x((a) => a.setTyping);
|
|
1472
1482
|
F(() => {
|
|
1473
1483
|
const a = Object.keys(t);
|
|
@@ -1478,7 +1488,7 @@ function wo() {
|
|
|
1478
1488
|
}, Math.max(0, o - Date.now()) + 50);
|
|
1479
1489
|
return () => clearTimeout(f);
|
|
1480
1490
|
}, [t, r]);
|
|
1481
|
-
const s = Object.keys(t).filter((a) => a !== n && e[a]).map((a) => e[a].name || "Someone").sort((a, o) => a.localeCompare(o)), i =
|
|
1491
|
+
const s = Object.keys(t).filter((a) => a !== n && e[a]).map((a) => e[a].name || "Someone").sort((a, o) => a.localeCompare(o)), i = ko(s);
|
|
1482
1492
|
return /* @__PURE__ */ l("div", { className: "chat-typing", "aria-live": "polite", "data-testid": "chat-typing", children: i && /* @__PURE__ */ E(he, { children: [
|
|
1483
1493
|
/* @__PURE__ */ E("span", { className: "chat-typing-dots", "aria-hidden": "true", children: [
|
|
1484
1494
|
/* @__PURE__ */ l("i", {}),
|
|
@@ -1488,20 +1498,20 @@ function wo() {
|
|
|
1488
1498
|
/* @__PURE__ */ l("span", { className: "truncate", children: i })
|
|
1489
1499
|
] }) });
|
|
1490
1500
|
}
|
|
1491
|
-
const Wn = Er,
|
|
1492
|
-
function
|
|
1501
|
+
const Wn = Er, Eo = xr;
|
|
1502
|
+
function Mo({ commands: t = Mn }) {
|
|
1493
1503
|
const [e, n] = $(""), [r, s] = $(!1), [i, a] = $({ q: null, i: 0 }), [o, f] = $(!1), c = P(null), d = br(), [u, g] = $(!1), [b, y] = $(!1), h = sa(), m = ia(), p = x((I) => I.replyingTo), M = x((I) => I.setReplyingTo);
|
|
1494
1504
|
F(() => {
|
|
1495
1505
|
p && !document.hidden && c.current?.focus({ preventScroll: !0 });
|
|
1496
1506
|
}, [p]);
|
|
1497
|
-
const R = x((I) => I.snapshot.mediaId), T = x((I) => I.pushToast), w = x((I) => I.setTierlistOpen), S = !!R, L =
|
|
1498
|
-
() => L === null ? [] :
|
|
1507
|
+
const R = x((I) => I.snapshot.mediaId), T = x((I) => I.pushToast), w = x((I) => I.setTierlistOpen), S = !!R, L = uo(e), k = ye(
|
|
1508
|
+
() => L === null ? [] : ho(L, t),
|
|
1499
1509
|
[L, t]
|
|
1500
1510
|
), v = L !== null && !o && k.length > 0, C = i.q === L ? Yt(i.i, k.length) : 0, D = H(
|
|
1501
1511
|
(I) => a({ q: L, i: I }),
|
|
1502
1512
|
[L]
|
|
1503
1513
|
), B = H((I, K) => {
|
|
1504
|
-
const Q =
|
|
1514
|
+
const Q = po(I, { hasMedia: S });
|
|
1505
1515
|
if (Q) {
|
|
1506
1516
|
T("info", Q);
|
|
1507
1517
|
return;
|
|
@@ -1511,19 +1521,19 @@ function ko({ commands: t = Mn }) {
|
|
|
1511
1521
|
T("info", t.map((ke) => ke.usage).join(" "));
|
|
1512
1522
|
break;
|
|
1513
1523
|
case "recap":
|
|
1514
|
-
|
|
1524
|
+
is();
|
|
1515
1525
|
break;
|
|
1516
1526
|
case "tierlist":
|
|
1517
|
-
|
|
1527
|
+
ss(), w(!0);
|
|
1518
1528
|
break;
|
|
1519
1529
|
default:
|
|
1520
1530
|
T("info", `${I.usage} is not implemented yet.`);
|
|
1521
1531
|
}
|
|
1522
1532
|
}, [S, T, t, w]), O = H((I) => {
|
|
1523
|
-
n(
|
|
1533
|
+
n(mo(I)), f(!1), c.current?.focus();
|
|
1524
1534
|
}, []), U = H(async (I) => {
|
|
1525
1535
|
if (I.preventDefault(), r || h.uploading) return;
|
|
1526
|
-
const K =
|
|
1536
|
+
const K = go(e, t);
|
|
1527
1537
|
if (!K && !h.pending.length) return;
|
|
1528
1538
|
if (K?.kind === "command" && h.pending.length) {
|
|
1529
1539
|
T("info", "Send images on their own, not with a command.");
|
|
@@ -1534,7 +1544,7 @@ function ko({ commands: t = Mn }) {
|
|
|
1534
1544
|
return;
|
|
1535
1545
|
}
|
|
1536
1546
|
const Q = await h.uploadPending();
|
|
1537
|
-
Q !== null && (Sr(K?.text ?? "", Q, p), n(""), m.stop(), M(null), h.clear(), s(!0), setTimeout(() => s(!1),
|
|
1547
|
+
Q !== null && (Sr(K?.text ?? "", Q, p), n(""), m.stop(), M(null), h.clear(), s(!0), setTimeout(() => s(!1), Eo), !document.hidden && document.hasFocus() && c.current?.focus());
|
|
1538
1548
|
}, [e, r, B, h, T, t, p, M, m]), V = H((I) => {
|
|
1539
1549
|
if (I.key === "Escape" && v) {
|
|
1540
1550
|
I.preventDefault(), f(!0);
|
|
@@ -1578,11 +1588,11 @@ function ko({ commands: t = Mn }) {
|
|
|
1578
1588
|
onDragOver: h.onDragOver,
|
|
1579
1589
|
className: "p-2 border-t border-border",
|
|
1580
1590
|
children: [
|
|
1581
|
-
p && /* @__PURE__ */ l(
|
|
1591
|
+
p && /* @__PURE__ */ l(So, { replyTo: p, onCancel: () => M(null) }),
|
|
1582
1592
|
/* @__PURE__ */ l(aa, { pending: h.pending, uploading: h.uploading, onRemove: h.remove }),
|
|
1583
1593
|
/* @__PURE__ */ E("div", { className: "relative", children: [
|
|
1584
1594
|
v && /* @__PURE__ */ l(
|
|
1585
|
-
|
|
1595
|
+
bo,
|
|
1586
1596
|
{
|
|
1587
1597
|
commands: k,
|
|
1588
1598
|
activeIndex: C,
|
|
@@ -1642,16 +1652,16 @@ function ko({ commands: t = Mn }) {
|
|
|
1642
1652
|
)
|
|
1643
1653
|
] })
|
|
1644
1654
|
] }),
|
|
1645
|
-
/* @__PURE__ */ l(
|
|
1655
|
+
/* @__PURE__ */ l(xo, {})
|
|
1646
1656
|
]
|
|
1647
1657
|
}
|
|
1648
1658
|
);
|
|
1649
1659
|
}
|
|
1650
|
-
function
|
|
1660
|
+
function _o() {
|
|
1651
1661
|
const t = x((n) => n.roster), e = Object.values(t);
|
|
1652
|
-
return e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: e.map((n) => /* @__PURE__ */ l(
|
|
1662
|
+
return e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: e.map((n) => /* @__PURE__ */ l(To, { u: n }, n.clientId)) }) : /* @__PURE__ */ l("div", { className: "text-xs text-text-muted", children: "No users online" });
|
|
1653
1663
|
}
|
|
1654
|
-
function
|
|
1664
|
+
function To({ u: t }) {
|
|
1655
1665
|
const e = Ue(t.sprite, t.avatarUrl);
|
|
1656
1666
|
return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
|
|
1657
1667
|
/* @__PURE__ */ l(
|
|
@@ -1668,7 +1678,7 @@ function xo({ u: t }) {
|
|
|
1668
1678
|
t.isLeader && /* @__PURE__ */ l("span", { className: "ml-auto px-1.5 py-0.5 rounded text-[9px] font-medium bg-success/20 text-success", children: "Leader" })
|
|
1669
1679
|
] });
|
|
1670
1680
|
}
|
|
1671
|
-
function
|
|
1681
|
+
function Ao() {
|
|
1672
1682
|
const t = x((i) => Object.keys(i.roster).length), [e, n] = $(!1), r = P(null), s = P(null);
|
|
1673
1683
|
return F(() => {
|
|
1674
1684
|
if (!e) return;
|
|
@@ -1704,20 +1714,20 @@ function Eo() {
|
|
|
1704
1714
|
t,
|
|
1705
1715
|
" online"
|
|
1706
1716
|
] }),
|
|
1707
|
-
/* @__PURE__ */ l(
|
|
1717
|
+
/* @__PURE__ */ l(_o, {})
|
|
1708
1718
|
] })
|
|
1709
1719
|
] });
|
|
1710
1720
|
}
|
|
1711
|
-
function
|
|
1721
|
+
function Io({ leaderId: t, clientId: e, keyType: n }) {
|
|
1712
1722
|
return t !== null ? t === e : n === "leader";
|
|
1713
1723
|
}
|
|
1714
|
-
const
|
|
1715
|
-
function
|
|
1716
|
-
return t &&
|
|
1724
|
+
const Co = /-[0-9a-fA-F]{16}$/;
|
|
1725
|
+
function No(t) {
|
|
1726
|
+
return t && Co.test(t) ? "leader" : null;
|
|
1717
1727
|
}
|
|
1718
|
-
const
|
|
1719
|
-
function
|
|
1720
|
-
const e = t ?
|
|
1728
|
+
const Ro = /\/room\/([^/]+)\/?$/;
|
|
1729
|
+
function Lo(t) {
|
|
1730
|
+
const e = t ? Ro.exec(t) : null;
|
|
1721
1731
|
if (!e) return null;
|
|
1722
1732
|
try {
|
|
1723
1733
|
return decodeURIComponent(e[1]);
|
|
@@ -1725,39 +1735,39 @@ function Io(t) {
|
|
|
1725
1735
|
return e[1];
|
|
1726
1736
|
}
|
|
1727
1737
|
}
|
|
1728
|
-
function
|
|
1729
|
-
return t && e?.roomKey === t ? e.type :
|
|
1738
|
+
function Fo(t, e) {
|
|
1739
|
+
return t && e?.roomKey === t ? e.type : No(t);
|
|
1730
1740
|
}
|
|
1731
1741
|
function et() {
|
|
1732
1742
|
return x((t) => !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId);
|
|
1733
1743
|
}
|
|
1734
1744
|
function zt() {
|
|
1735
|
-
const t = x((n) => n.activeGameId), e =
|
|
1745
|
+
const t = x((n) => n.activeGameId), e = os();
|
|
1736
1746
|
return t ? e.find((n) => n.id === t) ?? null : null;
|
|
1737
1747
|
}
|
|
1738
1748
|
function _n() {
|
|
1739
|
-
return x((t) =>
|
|
1749
|
+
return x((t) => Io({
|
|
1740
1750
|
leaderId: t.snapshot.leaderId,
|
|
1741
1751
|
clientId: t.me.clientId,
|
|
1742
|
-
keyType:
|
|
1752
|
+
keyType: Fo(Lo(globalThis.location?.pathname), t.roomKeyType)
|
|
1743
1753
|
}));
|
|
1744
1754
|
}
|
|
1745
1755
|
function oa() {
|
|
1746
1756
|
return x((t) => t.readiness);
|
|
1747
1757
|
}
|
|
1748
|
-
function
|
|
1758
|
+
function $o() {
|
|
1749
1759
|
return x((t) => t.snapshot);
|
|
1750
1760
|
}
|
|
1751
|
-
const
|
|
1761
|
+
const Po = 3e4;
|
|
1752
1762
|
function fa() {
|
|
1753
1763
|
const t = oa(), [e, n] = $(!1), [r, s] = $({ mediaId: t.mediaId, ready: t.ready });
|
|
1754
1764
|
return (r.mediaId !== t.mediaId || r.ready !== t.ready) && (s({ mediaId: t.mediaId, ready: t.ready }), n(!1)), F(() => {
|
|
1755
1765
|
if (t.ready) return;
|
|
1756
|
-
const i = setTimeout(() => n(!0),
|
|
1766
|
+
const i = setTimeout(() => n(!0), Po);
|
|
1757
1767
|
return () => clearTimeout(i);
|
|
1758
1768
|
}, [t.mediaId, t.ready]), e;
|
|
1759
1769
|
}
|
|
1760
|
-
function
|
|
1770
|
+
function Do({ draw: t }) {
|
|
1761
1771
|
const e = P(null);
|
|
1762
1772
|
return F(() => {
|
|
1763
1773
|
const n = e.current;
|
|
@@ -1765,8 +1775,8 @@ function Lo({ draw: t }) {
|
|
|
1765
1775
|
return t(n) ?? void 0;
|
|
1766
1776
|
}, [t]), /* @__PURE__ */ l("div", { ref: e, "data-testid": "game-settings" });
|
|
1767
1777
|
}
|
|
1768
|
-
const
|
|
1769
|
-
function
|
|
1778
|
+
const Bo = vn(() => import("./AdminPanel-C59vWHjn.js")), Oo = vn(() => import("./PlaylistPanel-Ceu23PeI.js"));
|
|
1779
|
+
function jo() {
|
|
1770
1780
|
const t = x((g) => g.chatCollapsed), e = It(), n = x((g) => g.sidebarTab), r = x((g) => g.setSidebarTab), s = x((g) => g.healthSnapshot?.clients.length ?? 0), i = x((g) => !!g.playlist), a = et(), o = _n(), f = x((g) => g.gameSettings), c = x((g) => g.snapshot.mediaId), d = zt() !== null;
|
|
1771
1781
|
if (Ut({ hasMedia: !!c, chatCollapsed: t, isFullscreen: e }))
|
|
1772
1782
|
return null;
|
|
@@ -1774,14 +1784,14 @@ function Po() {
|
|
|
1774
1784
|
return /* @__PURE__ */ E("aside", { className: "wp-chat-panel w-80 self-stretch border-l border-border flex flex-col bg-bg relative z-[35]", children: [
|
|
1775
1785
|
/* @__PURE__ */ E("div", { className: "chat-toolbar relative flex items-center gap-1 px-2 py-1.5 border-b border-border", children: [
|
|
1776
1786
|
/* @__PURE__ */ l(
|
|
1777
|
-
|
|
1787
|
+
fs,
|
|
1778
1788
|
{
|
|
1779
1789
|
to: "/",
|
|
1780
1790
|
className: "p-1.5 rounded text-text-secondary hover:text-white hover:bg-bg-alt transition-colors cursor-pointer",
|
|
1781
1791
|
title: "Home",
|
|
1782
1792
|
"aria-label": "Home",
|
|
1783
1793
|
onClick: () => {
|
|
1784
|
-
_("navigation", "Home button clicked (chat toolbar)"),
|
|
1794
|
+
_("navigation", "Home button clicked (chat toolbar)"), ls();
|
|
1785
1795
|
},
|
|
1786
1796
|
children: /* @__PURE__ */ l("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" }) })
|
|
1787
1797
|
}
|
|
@@ -1796,9 +1806,9 @@ function Po() {
|
|
|
1796
1806
|
children: /* @__PURE__ */ l("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 4v16M17 4v16M3 8h4m10 0h4M3 12h18M3 16h4m10 0h4M4 4h16a1 1 0 011 1v14a1 1 0 01-1 1H4a1 1 0 01-1-1V5a1 1 0 011-1z" }) })
|
|
1797
1807
|
}
|
|
1798
1808
|
),
|
|
1799
|
-
/* @__PURE__ */ l(
|
|
1800
|
-
/* @__PURE__ */ l(
|
|
1801
|
-
/* @__PURE__ */ l(
|
|
1809
|
+
/* @__PURE__ */ l(Js, {}),
|
|
1810
|
+
/* @__PURE__ */ l(Qs, { children: f ? /* @__PURE__ */ l(Do, { draw: f }) : null }),
|
|
1811
|
+
/* @__PURE__ */ l(Ao, {})
|
|
1802
1812
|
] }),
|
|
1803
1813
|
(a || i) && /* @__PURE__ */ E("div", { role: "tablist", "aria-label": "Sidebar", className: "flex border-b border-border shrink-0", children: [
|
|
1804
1814
|
/* @__PURE__ */ l(
|
|
@@ -1835,23 +1845,23 @@ function Po() {
|
|
|
1835
1845
|
}
|
|
1836
1846
|
)
|
|
1837
1847
|
] }),
|
|
1838
|
-
u === "health" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(
|
|
1839
|
-
/* @__PURE__ */ l(
|
|
1840
|
-
/* @__PURE__ */ l(
|
|
1848
|
+
u === "health" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Bo, {}) }) : u === "playlist" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Oo, {}) }) : /* @__PURE__ */ E(he, { children: [
|
|
1849
|
+
/* @__PURE__ */ l(co, {}),
|
|
1850
|
+
/* @__PURE__ */ l(Mo, {})
|
|
1841
1851
|
] })
|
|
1842
1852
|
] });
|
|
1843
1853
|
}
|
|
1844
|
-
const zn = (t) => typeof t == "string" &&
|
|
1845
|
-
function
|
|
1854
|
+
const zn = (t) => typeof t == "string" && qs.includes(t);
|
|
1855
|
+
function Ho(t, e, n) {
|
|
1846
1856
|
return zn(e) ? e : zn(n) ? n : "dark";
|
|
1847
1857
|
}
|
|
1848
1858
|
function Gn({ activity: t, roomKey: e, layer: n }) {
|
|
1849
|
-
const r = P(null), s = P(null), [i, a] = $(null), [o, f] = $(!1), c = x((T) => T.snapshot.leaderId), d = x((T) => T.me.clientId), u = !!c && c === d, g = x((T) => T.name), b =
|
|
1859
|
+
const r = P(null), s = P(null), [i, a] = $(null), [o, f] = $(!1), c = x((T) => T.snapshot.leaderId), d = x((T) => T.me.clientId), u = !!c && c === d, g = x((T) => T.name), b = Vs()?.theme, y = Ho(void 0, b, cs().theme), h = ye(() => ({
|
|
1850
1860
|
roomKey: e,
|
|
1851
1861
|
identity: {
|
|
1852
1862
|
// The registry userId — what RoomChrome's `userId` prop is.
|
|
1853
|
-
userId:
|
|
1854
|
-
userType:
|
|
1863
|
+
userId: us(),
|
|
1864
|
+
userType: ds(),
|
|
1855
1865
|
name: g || null
|
|
1856
1866
|
},
|
|
1857
1867
|
theme: y,
|
|
@@ -1868,7 +1878,7 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
|
|
|
1868
1878
|
const T = r.current, w = t.load;
|
|
1869
1879
|
if (!T || !w || o) return;
|
|
1870
1880
|
_("game", "bundle mount", { gameId: t.id });
|
|
1871
|
-
const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k =
|
|
1881
|
+
const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k = Mi({
|
|
1872
1882
|
load: w,
|
|
1873
1883
|
el: T,
|
|
1874
1884
|
ctx: m(),
|
|
@@ -1906,8 +1916,8 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
|
|
|
1906
1916
|
}
|
|
1907
1917
|
);
|
|
1908
1918
|
}
|
|
1909
|
-
const
|
|
1910
|
-
function
|
|
1919
|
+
const oc = "drawer-btn", Uo = "drawer-icon-btn";
|
|
1920
|
+
function Wo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children: i }) {
|
|
1911
1921
|
const a = P(null);
|
|
1912
1922
|
return F(() => {
|
|
1913
1923
|
if (!t) return;
|
|
@@ -1930,7 +1940,7 @@ function Oo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
|
|
|
1930
1940
|
onClick: (o) => o.stopPropagation(),
|
|
1931
1941
|
children: [
|
|
1932
1942
|
/* @__PURE__ */ E("div", { className: "px-3 py-2 border-b border-border flex items-center gap-2 text-sm min-w-0", children: [
|
|
1933
|
-
/* @__PURE__ */ l("button", { ref: a, onClick: e, className:
|
|
1943
|
+
/* @__PURE__ */ l("button", { ref: a, onClick: e, className: Uo, "aria-label": n ? "Back" : "Close", title: n ? "Back" : "Close", children: n ? /* @__PURE__ */ l(ea, { className: "w-4 h-4" }) : /* @__PURE__ */ l(ta, { className: "w-4 h-4" }) }),
|
|
1934
1944
|
r
|
|
1935
1945
|
] }),
|
|
1936
1946
|
i,
|
|
@@ -1939,10 +1949,10 @@ function Oo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
|
|
|
1939
1949
|
}
|
|
1940
1950
|
) }) : null;
|
|
1941
1951
|
}
|
|
1942
|
-
function
|
|
1943
|
-
return /* @__PURE__ */ l(
|
|
1952
|
+
function zo({ open: t, onClose: e }) {
|
|
1953
|
+
return /* @__PURE__ */ l(Wo, { open: t, onClose: e, children: /* @__PURE__ */ l("div", { className: "px-4 py-3 text-xs text-text-muted", children: "Loading…" }) });
|
|
1944
1954
|
}
|
|
1945
|
-
const la = 9e3, Kn = 1500,
|
|
1955
|
+
const la = 9e3, Kn = 1500, Go = {
|
|
1946
1956
|
classic: "[text-shadow:_-1px_-1px_0_#000,_1px_-1px_0_#000,_-1px_1px_0_#000,_1px_1px_0_#000,_0_-1px_0_#000,_0_1px_0_#000,_-1px_0_0_#000,_1px_0_0_#000]",
|
|
1947
1957
|
cinema: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)]",
|
|
1948
1958
|
minimal: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)] drop-shadow-[0_0_8px_rgba(0,0,0,0.7)]",
|
|
@@ -1951,11 +1961,11 @@ const la = 9e3, Kn = 1500, Ho = {
|
|
|
1951
1961
|
textShadow: "none",
|
|
1952
1962
|
filter: "drop-shadow(0 0 1px black) drop-shadow(0 0 1px black)"
|
|
1953
1963
|
};
|
|
1954
|
-
function
|
|
1964
|
+
function Ko({ message: t, age: e, ccStyle: n }) {
|
|
1955
1965
|
const r = la - Kn;
|
|
1956
1966
|
let s = 1;
|
|
1957
1967
|
e > r && (s = Math.max(0, 1 - (e - r) / Kn));
|
|
1958
|
-
const i =
|
|
1968
|
+
const i = Go[n], a = Wt(
|
|
1959
1969
|
{ clientId: t.clientId, author: t.author },
|
|
1960
1970
|
{ name: t.name, sprite: t.sprite }
|
|
1961
1971
|
), o = Ue(a.sprite, a.pictureUrl), f = a.cosmetics, [c] = $(
|
|
@@ -1977,7 +1987,7 @@ function Uo({ message: t, age: e, ccStyle: n }) {
|
|
|
1977
1987
|
}
|
|
1978
1988
|
);
|
|
1979
1989
|
}
|
|
1980
|
-
function
|
|
1990
|
+
function qo({ shown: t, className: e }) {
|
|
1981
1991
|
Gr();
|
|
1982
1992
|
const n = x((f) => f.chat), r = x((f) => f.mediaPrefs.subtitleStyle), [s, i] = $(() => Date.now()), a = n.length > 0;
|
|
1983
1993
|
F(() => {
|
|
@@ -1996,7 +2006,7 @@ function Wo({ shown: t, className: e }) {
|
|
|
1996
2006
|
className: `wp-floating-chat pointer-events-none flex flex-col ${e}`,
|
|
1997
2007
|
"data-testid": "floating-chat",
|
|
1998
2008
|
children: o.map((f) => /* @__PURE__ */ l(
|
|
1999
|
-
|
|
2009
|
+
Ko,
|
|
2000
2010
|
{
|
|
2001
2011
|
message: f,
|
|
2002
2012
|
age: s - f.ts,
|
|
@@ -2007,18 +2017,18 @@ function Wo({ shown: t, className: e }) {
|
|
|
2007
2017
|
}
|
|
2008
2018
|
);
|
|
2009
2019
|
}
|
|
2010
|
-
const
|
|
2020
|
+
const Vo = 2;
|
|
2011
2021
|
function ca(t) {
|
|
2012
2022
|
return t.duration_ms > 0 && t.duration_ms - t.playhead_ms <= kn;
|
|
2013
2023
|
}
|
|
2014
2024
|
function da(t) {
|
|
2015
2025
|
const e = t.video_ready_state ?? -1;
|
|
2016
|
-
return e < 0 ? !0 : !(e <=
|
|
2026
|
+
return e < 0 ? !0 : !(e <= Vo && t.buffered_ahead_ms > kn);
|
|
2017
2027
|
}
|
|
2018
|
-
function
|
|
2028
|
+
function fc(t) {
|
|
2019
2029
|
return t.playhead_ms === 0 && !t.is_buffering && t.buffered_ahead_ms === 0 ? "idle" : t.is_buffering ? "buffering" : ca(t) ? "healthy" : !da(t) || t.buffered_ahead_ms <= _r ? "critical" : t.buffered_ahead_ms <= kn ? "warning" : "healthy";
|
|
2020
2030
|
}
|
|
2021
|
-
const
|
|
2031
|
+
const lc = {
|
|
2022
2032
|
idle: "Idle",
|
|
2023
2033
|
buffering: "Buffering",
|
|
2024
2034
|
critical: "Critical",
|
|
@@ -2075,7 +2085,7 @@ Tr("__WP_SOUNDS__", {
|
|
|
2075
2085
|
off: ba
|
|
2076
2086
|
});
|
|
2077
2087
|
const Jn = { on: 0, off: 0 };
|
|
2078
|
-
function
|
|
2088
|
+
function Jo(t, e, n, r) {
|
|
2079
2089
|
if (!n || !r) return Jn;
|
|
2080
2090
|
const s = new Set(t), i = new Set(e);
|
|
2081
2091
|
let a = 0;
|
|
@@ -2084,15 +2094,15 @@ function Go(t, e, n, r) {
|
|
|
2084
2094
|
for (const f of s) i.has(f) || o++;
|
|
2085
2095
|
return a === 0 && o === 0 ? Jn : { on: a, off: o };
|
|
2086
2096
|
}
|
|
2087
|
-
const
|
|
2088
|
-
function
|
|
2097
|
+
const Qo = 1200, ve = 52, Ht = 4, mn = (ve - Ht) / 2, Qn = 2 * Math.PI * mn, je = ve - Ht * 2 - 4;
|
|
2098
|
+
function Yo(t) {
|
|
2089
2099
|
return ca(t) ? !0 : da(t) ? t.buffered_ahead_ms >= $e : !1;
|
|
2090
2100
|
}
|
|
2091
|
-
function
|
|
2101
|
+
function Xo(t) {
|
|
2092
2102
|
return `hsl(${Math.round(t * 120)}, 90%, 55%)`;
|
|
2093
2103
|
}
|
|
2094
|
-
function
|
|
2095
|
-
const s = Math.min(1, t.buffered_ahead_ms / $e), i = Qn * (1 - s), a =
|
|
2104
|
+
function Zo({ client: t, look: e, fading: n, onFadeEnd: r }) {
|
|
2105
|
+
const s = Math.min(1, t.buffered_ahead_ms / $e), i = Qn * (1 - s), a = Xo(s), o = Ue(e.sprite, e.pictureUrl);
|
|
2096
2106
|
return /* @__PURE__ */ E(
|
|
2097
2107
|
"div",
|
|
2098
2108
|
{
|
|
@@ -2100,7 +2110,7 @@ function Jo({ client: t, look: e, fading: n, onFadeEnd: r }) {
|
|
|
2100
2110
|
"data-client-id": t.client_id,
|
|
2101
2111
|
className: "flex flex-col items-center gap-1",
|
|
2102
2112
|
style: n ? {
|
|
2103
|
-
animation: `bufferFadeOut ${
|
|
2113
|
+
animation: `bufferFadeOut ${Qo}ms ease forwards`
|
|
2104
2114
|
} : void 0,
|
|
2105
2115
|
onAnimationEnd: n ? r : void 0,
|
|
2106
2116
|
children: [
|
|
@@ -2179,7 +2189,7 @@ function Jo({ client: t, look: e, fading: n, onFadeEnd: r }) {
|
|
|
2179
2189
|
}
|
|
2180
2190
|
);
|
|
2181
2191
|
}
|
|
2182
|
-
function
|
|
2192
|
+
function ef({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf: i, onToggle: a }) {
|
|
2183
2193
|
const o = Ue(e, n), f = s ? "success" : "neutral", c = s ? /* @__PURE__ */ l(_t, { name: "tick" }) : /* @__PURE__ */ l(_t, { name: "hourglass" });
|
|
2184
2194
|
return /* @__PURE__ */ E(
|
|
2185
2195
|
"button",
|
|
@@ -2251,18 +2261,18 @@ function Qo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf
|
|
|
2251
2261
|
}
|
|
2252
2262
|
);
|
|
2253
2263
|
}
|
|
2254
|
-
const
|
|
2264
|
+
const tf = { status: null, entries: [], completed: /* @__PURE__ */ new Set(), below: /* @__PURE__ */ new Set() };
|
|
2255
2265
|
function Yn(t, e) {
|
|
2256
2266
|
if (!e || e.clients.length === 0) return { ...t, status: e, entries: [] };
|
|
2257
2267
|
const n = new Set(t.completed), r = new Set(t.below), s = [];
|
|
2258
2268
|
for (const i of e.clients) {
|
|
2259
2269
|
const a = i.client_id;
|
|
2260
|
-
|
|
2270
|
+
Yo(i) ? r.has(a) && !n.has(a) ? (n.add(a), s.push({ client: i, completed: !0 })) : n.has(a) && s.push({ client: i, completed: !0 }) : (n.delete(a), r.add(a), s.push({ client: i, completed: !1 }));
|
|
2261
2271
|
}
|
|
2262
2272
|
return { status: e, entries: s, completed: n, below: r };
|
|
2263
2273
|
}
|
|
2264
|
-
function
|
|
2265
|
-
const t = x((w) => w.bufferStatus), e = x((w) => w.readyCheck), n = x((w) => w.roster), r = x((w) => w.me.clientId), s = x((w) => w.snapshot.playing), i = et(), [a, o] = $(() => Yn(
|
|
2274
|
+
function nf() {
|
|
2275
|
+
const t = x((w) => w.bufferStatus), e = x((w) => w.readyCheck), n = x((w) => w.roster), r = x((w) => w.me.clientId), s = x((w) => w.snapshot.playing), i = et(), [a, o] = $(() => Yn(tf, t));
|
|
2266
2276
|
a.status !== t && o(Yn(a, t));
|
|
2267
2277
|
const f = a.entries, c = (w) => {
|
|
2268
2278
|
o((S) => {
|
|
@@ -2277,7 +2287,7 @@ function Xo() {
|
|
|
2277
2287
|
}, [b]);
|
|
2278
2288
|
const m = P(e.ready), p = P(e.active);
|
|
2279
2289
|
F(() => {
|
|
2280
|
-
const { on: w, off: S } =
|
|
2290
|
+
const { on: w, off: S } = Jo(
|
|
2281
2291
|
m.current,
|
|
2282
2292
|
e.ready,
|
|
2283
2293
|
p.current,
|
|
@@ -2316,7 +2326,7 @@ function Xo() {
|
|
|
2316
2326
|
}
|
|
2317
2327
|
),
|
|
2318
2328
|
/* @__PURE__ */ l("div", { className: "flex flex-col gap-3", children: u.map((w) => /* @__PURE__ */ l(
|
|
2319
|
-
|
|
2329
|
+
ef,
|
|
2320
2330
|
{
|
|
2321
2331
|
clientId: w.clientId,
|
|
2322
2332
|
sprite: w.sprite,
|
|
@@ -2324,13 +2334,13 @@ function Xo() {
|
|
|
2324
2334
|
name: w.name || "Anon",
|
|
2325
2335
|
isReady: d.has(w.clientId),
|
|
2326
2336
|
isSelf: w.clientId === r,
|
|
2327
|
-
onToggle: () =>
|
|
2337
|
+
onToggle: () => hs(!g)
|
|
2328
2338
|
},
|
|
2329
2339
|
w.clientId
|
|
2330
2340
|
)) })
|
|
2331
2341
|
] }),
|
|
2332
2342
|
R && f.map(({ client: w, completed: S }) => /* @__PURE__ */ l(
|
|
2333
|
-
|
|
2343
|
+
Zo,
|
|
2334
2344
|
{
|
|
2335
2345
|
client: w,
|
|
2336
2346
|
look: zr(n, { clientId: w.client_id }, { name: w.name, sprite: w.sprite_id ?? null }),
|
|
@@ -2344,7 +2354,7 @@ function Xo() {
|
|
|
2344
2354
|
{
|
|
2345
2355
|
type: "button",
|
|
2346
2356
|
"data-testid": "start-ready-check",
|
|
2347
|
-
onClick: () =>
|
|
2357
|
+
onClick: () => ms(),
|
|
2348
2358
|
className: "px-2.5 py-1 rounded bg-black/55 text-xs font-semibold tracking-wide hover:bg-black/75 transition-colors",
|
|
2349
2359
|
style: { color: "#fff", pointerEvents: "auto" },
|
|
2350
2360
|
title: "Ask everyone if they're ready",
|
|
@@ -2414,7 +2424,7 @@ function Xn({
|
|
|
2414
2424
|
}
|
|
2415
2425
|
);
|
|
2416
2426
|
}
|
|
2417
|
-
function
|
|
2427
|
+
function rf({ sprite: t, url: e }) {
|
|
2418
2428
|
const n = Ue(t, e);
|
|
2419
2429
|
return /* @__PURE__ */ l(
|
|
2420
2430
|
mt,
|
|
@@ -2427,7 +2437,7 @@ function Zo({ sprite: t, url: e }) {
|
|
|
2427
2437
|
}
|
|
2428
2438
|
);
|
|
2429
2439
|
}
|
|
2430
|
-
function
|
|
2440
|
+
function af({
|
|
2431
2441
|
anchor: t,
|
|
2432
2442
|
itemId: e,
|
|
2433
2443
|
snap: n
|
|
@@ -2454,7 +2464,7 @@ function ef({
|
|
|
2454
2464
|
children: [
|
|
2455
2465
|
/* @__PURE__ */ l("div", { className: "text-[11px] font-semibold text-text leading-snug pb-1.5 mb-1.5 border-b border-border", children: o }),
|
|
2456
2466
|
Object.entries(a.votes).map(([f, c]) => /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
|
|
2457
|
-
/* @__PURE__ */ l(
|
|
2467
|
+
/* @__PURE__ */ l(rf, { sprite: n.sprites[f], url: n.pictures?.[f] }),
|
|
2458
2468
|
/* @__PURE__ */ l("span", { className: "flex-1 text-[11px] text-text-secondary truncate", children: n.names[f] ?? "viewer" }),
|
|
2459
2469
|
/* @__PURE__ */ l(
|
|
2460
2470
|
"span",
|
|
@@ -2471,7 +2481,7 @@ function ef({
|
|
|
2471
2481
|
document.body
|
|
2472
2482
|
);
|
|
2473
2483
|
}
|
|
2474
|
-
function
|
|
2484
|
+
function sf() {
|
|
2475
2485
|
const t = x((k) => k.tierlistOpen), e = x((k) => k.setTierlistOpen), n = x((k) => k.tierlist), r = x((k) => k.tierlistDraft), s = x((k) => k.tierlistSaving), i = x((k) => k.moveTierlistItem), [a, o] = $(null), [f, c] = $(null), [d, u] = $(null), [g, b] = $(null), [y, h] = $("mine");
|
|
2476
2486
|
F(() => {
|
|
2477
2487
|
$n(!0);
|
|
@@ -2515,7 +2525,7 @@ function tf() {
|
|
|
2515
2525
|
a && (i(a, k === Ye ? null : k), o(null));
|
|
2516
2526
|
}
|
|
2517
2527
|
}), T = H(async () => {
|
|
2518
|
-
await
|
|
2528
|
+
await gs(x.getState().tierlistDraft) && b(Date.now());
|
|
2519
2529
|
}, []);
|
|
2520
2530
|
if (F(() => {
|
|
2521
2531
|
if (g === null) return;
|
|
@@ -2670,14 +2680,14 @@ function tf() {
|
|
|
2670
2680
|
]
|
|
2671
2681
|
}
|
|
2672
2682
|
),
|
|
2673
|
-
d && n && /* @__PURE__ */ l(
|
|
2683
|
+
d && n && /* @__PURE__ */ l(af, { anchor: d.anchor, itemId: d.itemId, snap: n })
|
|
2674
2684
|
]
|
|
2675
2685
|
}
|
|
2676
2686
|
),
|
|
2677
2687
|
document.body
|
|
2678
2688
|
);
|
|
2679
2689
|
}
|
|
2680
|
-
function
|
|
2690
|
+
function of({ children: t }) {
|
|
2681
2691
|
const [e, n] = $(null);
|
|
2682
2692
|
return F(() => {
|
|
2683
2693
|
const r = () => n(document.fullscreenElement);
|
|
@@ -2692,11 +2702,11 @@ function va({ site: t = "control bar", className: e = "ctr-btn" }) {
|
|
|
2692
2702
|
className: e,
|
|
2693
2703
|
title: "Select Media",
|
|
2694
2704
|
"aria-label": "Select Media",
|
|
2695
|
-
children: /* @__PURE__ */ l(
|
|
2705
|
+
children: /* @__PURE__ */ l(so, {})
|
|
2696
2706
|
}
|
|
2697
2707
|
);
|
|
2698
2708
|
}
|
|
2699
|
-
function
|
|
2709
|
+
function ff() {
|
|
2700
2710
|
const t = x((a) => a.chatCollapsed), e = x((a) => a.toggleChatCollapsed), n = x((a) => !!a.snapshot.mediaId), r = It(), s = Ut({ hasMedia: n, chatCollapsed: t, isFullscreen: r });
|
|
2701
2711
|
return { panelHidden: s, toggle: () => {
|
|
2702
2712
|
if (_("chat", s ? "Show chat" : "Hide chat", { isFullscreen: r, chatCollapsed: t }), !s) {
|
|
@@ -2709,7 +2719,7 @@ function rf() {
|
|
|
2709
2719
|
} };
|
|
2710
2720
|
}
|
|
2711
2721
|
function ka({ className: t }) {
|
|
2712
|
-
const { panelHidden: e, toggle: n } =
|
|
2722
|
+
const { panelHidden: e, toggle: n } = ff(), r = e ? "Show chat" : "Hide chat";
|
|
2713
2723
|
return /* @__PURE__ */ l(
|
|
2714
2724
|
"button",
|
|
2715
2725
|
{
|
|
@@ -2719,11 +2729,11 @@ function ka({ className: t }) {
|
|
|
2719
2729
|
title: r,
|
|
2720
2730
|
"aria-label": r,
|
|
2721
2731
|
"aria-expanded": !e,
|
|
2722
|
-
children: e ? /* @__PURE__ */ l(
|
|
2732
|
+
children: e ? /* @__PURE__ */ l(ro, { className: "w-5 h-5" }) : /* @__PURE__ */ l(ta, { className: "w-5 h-5" })
|
|
2723
2733
|
}
|
|
2724
2734
|
);
|
|
2725
2735
|
}
|
|
2726
|
-
function
|
|
2736
|
+
function lf() {
|
|
2727
2737
|
const t = x((d) => d.chatCollapsed), e = x((d) => !!d.snapshot.mediaId), n = It(), r = zt(), s = et(), i = _n(), a = Sn({
|
|
2728
2738
|
isLeader: i,
|
|
2729
2739
|
hasMedia: e,
|
|
@@ -2739,14 +2749,14 @@ function af() {
|
|
|
2739
2749
|
f && /* @__PURE__ */ l(ka, { className: "corner-btn" })
|
|
2740
2750
|
] });
|
|
2741
2751
|
}
|
|
2742
|
-
const pn = "hadoku:avatar", bn = "hadoku:name",
|
|
2743
|
-
function
|
|
2744
|
-
return typeof globalThis.BroadcastChannel > "u" ? null : new globalThis.BroadcastChannel(
|
|
2752
|
+
const pn = "hadoku:avatar", bn = "hadoku:name", cf = "hadoku:identity", Dt = /* @__PURE__ */ Symbol.for("hadoku:identity-relay"), Zn = /* @__PURE__ */ Symbol.for("hadoku:identity-relayed");
|
|
2753
|
+
function df() {
|
|
2754
|
+
return typeof globalThis.BroadcastChannel > "u" ? null : new globalThis.BroadcastChannel(cf);
|
|
2745
2755
|
}
|
|
2746
2756
|
function er(t) {
|
|
2747
2757
|
return t === bn || t === pn;
|
|
2748
2758
|
}
|
|
2749
|
-
function
|
|
2759
|
+
function uf(t, e) {
|
|
2750
2760
|
const n = (r) => {
|
|
2751
2761
|
if (r[Zn]) return;
|
|
2752
2762
|
const s = r.detail;
|
|
@@ -2761,7 +2771,7 @@ function ff(t, e) {
|
|
|
2761
2771
|
t.removeEventListener(bn, n), t.removeEventListener(pn, n), e.close();
|
|
2762
2772
|
};
|
|
2763
2773
|
}
|
|
2764
|
-
function
|
|
2774
|
+
function hf(t = typeof window > "u" ? void 0 : window, e = df) {
|
|
2765
2775
|
if (!t) return () => {
|
|
2766
2776
|
};
|
|
2767
2777
|
const n = t;
|
|
@@ -2770,7 +2780,7 @@ function lf(t = typeof window > "u" ? void 0 : window, e = of) {
|
|
|
2770
2780
|
const a = e();
|
|
2771
2781
|
if (!a) return () => {
|
|
2772
2782
|
};
|
|
2773
|
-
r = { count: 0, stop:
|
|
2783
|
+
r = { count: 0, stop: uf(t, a) }, n[Dt] = r;
|
|
2774
2784
|
}
|
|
2775
2785
|
r.count++;
|
|
2776
2786
|
const s = r;
|
|
@@ -2779,13 +2789,13 @@ function lf(t = typeof window > "u" ? void 0 : window, e = of) {
|
|
|
2779
2789
|
i || (i = !0, !(--s.count > 0) && (s.stop(), n[Dt] === s && delete n[Dt]));
|
|
2780
2790
|
};
|
|
2781
2791
|
}
|
|
2782
|
-
function
|
|
2792
|
+
function mf() {
|
|
2783
2793
|
F(() => {
|
|
2784
|
-
const t =
|
|
2785
|
-
const i =
|
|
2794
|
+
const t = hf(), e = ps((r, s) => {
|
|
2795
|
+
const i = ys(s);
|
|
2786
2796
|
_("avatar", "Avatar changed in the settings popout", { sprite: i, source: s.avatar?.source }), Ir(i);
|
|
2787
|
-
}), n =
|
|
2788
|
-
_("avatar", "Renamed in the settings popout", { name: r }),
|
|
2797
|
+
}), n = bs((r) => {
|
|
2798
|
+
_("avatar", "Renamed in the settings popout", { name: r }), ws(r);
|
|
2789
2799
|
});
|
|
2790
2800
|
return () => {
|
|
2791
2801
|
e(), n(), t();
|
|
@@ -2806,19 +2816,19 @@ function ot() {
|
|
|
2806
2816
|
}
|
|
2807
2817
|
}
|
|
2808
2818
|
let Zt = !1;
|
|
2809
|
-
function
|
|
2819
|
+
function gf() {
|
|
2810
2820
|
return Zt ? () => {
|
|
2811
2821
|
} : (Zt = !0, document.addEventListener("click", ot, { capture: !0, passive: !0 }), document.addEventListener("touchend", ot, { capture: !0, passive: !0 }), document.addEventListener("keydown", ot, { capture: !0, passive: !0 }), () => {
|
|
2812
2822
|
document.removeEventListener("click", ot, { capture: !0 }), document.removeEventListener("touchend", ot, { capture: !0 }), document.removeEventListener("keydown", ot, { capture: !0 }), Zt = !1;
|
|
2813
2823
|
});
|
|
2814
2824
|
}
|
|
2815
|
-
const en = "data-wp-input",
|
|
2816
|
-
function
|
|
2817
|
-
return Dr(e) ? !1 :
|
|
2825
|
+
const en = "data-wp-input", pf = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
|
|
2826
|
+
function bf(t, e) {
|
|
2827
|
+
return Dr(e) ? !1 : pf.has(t.key) || We(t) && t.key !== "Escape";
|
|
2818
2828
|
}
|
|
2819
|
-
function
|
|
2829
|
+
function yf() {
|
|
2820
2830
|
const t = document.documentElement, e = (r) => {
|
|
2821
|
-
|
|
2831
|
+
bf(r, document.activeElement) && t.setAttribute(en, "remote");
|
|
2822
2832
|
}, n = (r) => {
|
|
2823
2833
|
r.detail > 0 && t.setAttribute(en, "pointer");
|
|
2824
2834
|
};
|
|
@@ -2826,26 +2836,26 @@ function mf() {
|
|
|
2826
2836
|
window.removeEventListener("keydown", e, !0), window.removeEventListener("click", n, !0), t.removeAttribute(en);
|
|
2827
2837
|
};
|
|
2828
2838
|
}
|
|
2829
|
-
const
|
|
2830
|
-
function
|
|
2839
|
+
const wf = 400;
|
|
2840
|
+
function vf(t) {
|
|
2831
2841
|
return t === "leader" || t === "viewer" ? t : null;
|
|
2832
2842
|
}
|
|
2833
|
-
async function
|
|
2834
|
-
const e =
|
|
2843
|
+
async function kf(t) {
|
|
2844
|
+
const e = vs(), n = await fetch(`${e}/api/rooms/validate/${encodeURIComponent(t)}`);
|
|
2835
2845
|
if (n.status === 404) return null;
|
|
2836
2846
|
if (!n.ok) throw new Error(`validate returned ${n.status}`);
|
|
2837
2847
|
const r = await n.json();
|
|
2838
|
-
return
|
|
2848
|
+
return vf(r?.type);
|
|
2839
2849
|
}
|
|
2840
|
-
async function
|
|
2850
|
+
async function Sf(t) {
|
|
2841
2851
|
for (let e = 0; e < 2; e++)
|
|
2842
2852
|
try {
|
|
2843
|
-
const n = await
|
|
2853
|
+
const n = await kf(t);
|
|
2844
2854
|
x.getState().setRoomKeyType({ roomKey: t, type: n }), _("room", "Room key type probed", { roomKey: t, type: n });
|
|
2845
2855
|
return;
|
|
2846
2856
|
} catch (n) {
|
|
2847
2857
|
if (e === 0) {
|
|
2848
|
-
await new Promise((r) => setTimeout(r,
|
|
2858
|
+
await new Promise((r) => setTimeout(r, wf));
|
|
2849
2859
|
continue;
|
|
2850
2860
|
}
|
|
2851
2861
|
N("room", "Room key type probe failed, falling back to socket truth", X(n));
|
|
@@ -2855,14 +2865,14 @@ function Pe(t, e) {
|
|
|
2855
2865
|
const r = x.getState().allocateClientSeq(), s = { kind: t, client_seq: r, ...e || {} };
|
|
2856
2866
|
return Cr().emit(Nr.CONTROL, s), r;
|
|
2857
2867
|
}
|
|
2858
|
-
function
|
|
2868
|
+
function cc(t) {
|
|
2859
2869
|
return Pe("load", { media_id: t });
|
|
2860
2870
|
}
|
|
2861
|
-
function
|
|
2871
|
+
function xf() {
|
|
2862
2872
|
return Pe("home");
|
|
2863
2873
|
}
|
|
2864
|
-
function
|
|
2865
|
-
const t =
|
|
2874
|
+
function Ef() {
|
|
2875
|
+
const t = $o(), e = oa(), n = et(), r = fa(), s = n && r && !e.ready, i = !e.ready && !s;
|
|
2866
2876
|
return /* @__PURE__ */ l(
|
|
2867
2877
|
"button",
|
|
2868
2878
|
{
|
|
@@ -2883,13 +2893,13 @@ function vf() {
|
|
|
2883
2893
|
className: "ctr-btn",
|
|
2884
2894
|
title: s ? "Some viewers still loading — play anyway" : i ? "Waiting for sync..." : n ? t.playing ? "Pause" : "Play" : "Only the leader can control playback",
|
|
2885
2895
|
"data-active": !i && n && t.playing ? "1" : "0",
|
|
2886
|
-
children: t.playing ? /* @__PURE__ */ l(
|
|
2896
|
+
children: t.playing ? /* @__PURE__ */ l(Qi, {}) : /* @__PURE__ */ l(Ji, {})
|
|
2887
2897
|
}
|
|
2888
2898
|
);
|
|
2889
2899
|
}
|
|
2890
|
-
function
|
|
2900
|
+
function Mf() {
|
|
2891
2901
|
function t() {
|
|
2892
|
-
_("controls", "Unload episode clicked"),
|
|
2902
|
+
_("controls", "Unload episode clicked"), xf();
|
|
2893
2903
|
}
|
|
2894
2904
|
return /* @__PURE__ */ l(
|
|
2895
2905
|
"button",
|
|
@@ -2899,21 +2909,21 @@ function kf() {
|
|
|
2899
2909
|
title: "Unload episode (return to lobby)",
|
|
2900
2910
|
"data-remote-destructive": "",
|
|
2901
2911
|
"aria-label": "Unload episode",
|
|
2902
|
-
children: /* @__PURE__ */ l(
|
|
2912
|
+
children: /* @__PURE__ */ l(ao, {})
|
|
2903
2913
|
}
|
|
2904
2914
|
);
|
|
2905
2915
|
}
|
|
2906
|
-
function
|
|
2916
|
+
function _f(t) {
|
|
2907
2917
|
return !t.isLeader || t.durationMs === 0 ? !0 : !t.ready && !t.canOverride;
|
|
2908
2918
|
}
|
|
2909
|
-
function
|
|
2919
|
+
function Tf(t) {
|
|
2910
2920
|
return t.localValue !== null ? t.localValue : t.displayPlayheadMs ?? t.snapshotPlayheadMs;
|
|
2911
2921
|
}
|
|
2912
|
-
function
|
|
2922
|
+
function Af(t, e) {
|
|
2913
2923
|
return e <= 0 ? 0 : t / e;
|
|
2914
2924
|
}
|
|
2915
2925
|
const nr = 1e4, rr = 6e4;
|
|
2916
|
-
function
|
|
2926
|
+
function If(t, e, n) {
|
|
2917
2927
|
if (n <= 0) return null;
|
|
2918
2928
|
let r;
|
|
2919
2929
|
switch (t) {
|
|
@@ -2940,17 +2950,17 @@ function Mf(t, e, n) {
|
|
|
2940
2950
|
}
|
|
2941
2951
|
return Math.round(Math.min(n, Math.max(0, r)));
|
|
2942
2952
|
}
|
|
2943
|
-
const
|
|
2953
|
+
const Cf = 600;
|
|
2944
2954
|
function tn(t) {
|
|
2945
2955
|
const e = Math.floor(t / 1e3), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = e % 60;
|
|
2946
2956
|
return n > 0 ? `${n}:${r.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}` : `${r}:${s.toString().padStart(2, "0")}`;
|
|
2947
2957
|
}
|
|
2948
|
-
function
|
|
2958
|
+
function Nf({ durationMs: t, displayPlayheadMs: e }) {
|
|
2949
2959
|
const n = x((D) => D.snapshot), r = x((D) => D.readiness), s = et(), i = fa(), a = s && i && !r.ready, o = P(null), [f, c] = $(null), [d, u] = $(0), [g, b] = $(!1), [y, h] = $(null), m = P(0), [p, M] = $(n.mediaId);
|
|
2950
2960
|
p !== n.mediaId && (M(n.mediaId), h(null), b(!1));
|
|
2951
2961
|
const R = e ?? n.playheadMs;
|
|
2952
2962
|
!g && y !== null && Math.abs(R - y) < _r && h(null);
|
|
2953
|
-
const T = t || 0, w =
|
|
2963
|
+
const T = t || 0, w = Tf({ localValue: y, displayPlayheadMs: e, snapshotPlayheadMs: n.playheadMs }), S = P(0);
|
|
2954
2964
|
F(() => {
|
|
2955
2965
|
if (g || y === null) return;
|
|
2956
2966
|
const D = 1e4 - (Date.now() - S.current), B = setTimeout(() => {
|
|
@@ -2973,10 +2983,10 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
|
|
|
2973
2983
|
}, []);
|
|
2974
2984
|
const C = H((D) => {
|
|
2975
2985
|
if (D.defaultPrevented) return;
|
|
2976
|
-
const B =
|
|
2986
|
+
const B = If(D.key, w, T);
|
|
2977
2987
|
B !== null && (D.preventDefault(), h(B), S.current = Date.now(), v.current && clearTimeout(v.current), v.current = setTimeout(() => {
|
|
2978
2988
|
v.current = null, _("seek", "Keyboard seek", { to_ms: B }), Pe("seek", { to_ms: B }), m.current = B;
|
|
2979
|
-
},
|
|
2989
|
+
}, Cf));
|
|
2980
2990
|
}, [w, T]);
|
|
2981
2991
|
return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
2982
2992
|
/* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-secondary w-[45px] text-right shrink-0", children: tn(w) }),
|
|
@@ -2988,8 +2998,8 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
|
|
|
2988
2998
|
min: 0,
|
|
2989
2999
|
max: T,
|
|
2990
3000
|
value: w,
|
|
2991
|
-
disabled:
|
|
2992
|
-
style: { "--progress": `${
|
|
3001
|
+
disabled: _f({ isLeader: s, ready: r.ready, canOverride: a, durationMs: T }),
|
|
3002
|
+
style: { "--progress": `${Af(w, T) * 100}%` },
|
|
2993
3003
|
onChange: (D) => {
|
|
2994
3004
|
const B = Number(D.target.value);
|
|
2995
3005
|
h(B), S.current = Date.now();
|
|
@@ -3022,7 +3032,7 @@ function Tf({ durationMs: t, displayPlayheadMs: e }) {
|
|
|
3022
3032
|
/* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-muted w-[45px] text-left shrink-0", children: tn(T) })
|
|
3023
3033
|
] });
|
|
3024
3034
|
}
|
|
3025
|
-
function
|
|
3035
|
+
function Rf({ videoRef: t }) {
|
|
3026
3036
|
const e = x((d) => d.mediaPrefs.volume), n = x((d) => d.mediaPrefs.muted), r = x((d) => d.setVolume), s = x((d) => d.setMuted);
|
|
3027
3037
|
F(() => {
|
|
3028
3038
|
const d = t.current;
|
|
@@ -3033,7 +3043,7 @@ function Af({ videoRef: t }) {
|
|
|
3033
3043
|
r(u), u > 0 && n && s(!1);
|
|
3034
3044
|
}, a = () => {
|
|
3035
3045
|
s(!n);
|
|
3036
|
-
}, o = () => n || e === 0 ? /* @__PURE__ */ l(
|
|
3046
|
+
}, o = () => n || e === 0 ? /* @__PURE__ */ l(Yi, {}) : e < 0.5 ? /* @__PURE__ */ l(Xi, {}) : /* @__PURE__ */ l(Zi, {}), f = n ? 0 : e, c = Math.round(f * 100);
|
|
3037
3047
|
return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
3038
3048
|
/* @__PURE__ */ l(
|
|
3039
3049
|
"button",
|
|
@@ -3156,7 +3166,7 @@ function Tn({
|
|
|
3156
3166
|
)
|
|
3157
3167
|
] });
|
|
3158
3168
|
}
|
|
3159
|
-
function
|
|
3169
|
+
function Lf({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
|
|
3160
3170
|
if (t.length === 0) return null;
|
|
3161
3171
|
const s = t.length === 1;
|
|
3162
3172
|
return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
@@ -3176,7 +3186,7 @@ function If({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
|
|
|
3176
3186
|
)
|
|
3177
3187
|
] });
|
|
3178
3188
|
}
|
|
3179
|
-
function
|
|
3189
|
+
function Ff({
|
|
3180
3190
|
tracks: t,
|
|
3181
3191
|
selectedIndex: e,
|
|
3182
3192
|
onSelect: n,
|
|
@@ -3211,7 +3221,7 @@ function Cf({
|
|
|
3211
3221
|
)
|
|
3212
3222
|
] });
|
|
3213
3223
|
}
|
|
3214
|
-
const ft = 3,
|
|
3224
|
+
const ft = 3, $f = 1e3, Pf = 15e3;
|
|
3215
3225
|
function Ae(t) {
|
|
3216
3226
|
const e = t?.readyState;
|
|
3217
3227
|
return e === "open" || e === "ended";
|
|
@@ -3223,10 +3233,10 @@ const Z = {
|
|
|
3223
3233
|
FALLBACK: 1
|
|
3224
3234
|
}, nn = 0.5, rn = 3e3;
|
|
3225
3235
|
function xt(t, e = {}) {
|
|
3226
|
-
const { baseMs: n =
|
|
3236
|
+
const { baseMs: n = $f, capMs: r = Pf, jitter: s = 0.25 } = e, i = Math.min(n * Math.pow(2, t - 1), r), a = s > 0 ? Math.round(i * Math.random() * s) : 0;
|
|
3227
3237
|
return i + a;
|
|
3228
3238
|
}
|
|
3229
|
-
const ar = 15,
|
|
3239
|
+
const ar = 15, Df = 35e3, Bf = 2e3, an = 10;
|
|
3230
3240
|
function Fe(t, e) {
|
|
3231
3241
|
if (t.length === 0) return 0;
|
|
3232
3242
|
if (e >= t[t.length - 1].end_ms) return t.length - 1;
|
|
@@ -3260,15 +3270,15 @@ function sn(t, e, n, r = Z.RANGE) {
|
|
|
3260
3270
|
function we(t) {
|
|
3261
3271
|
return t ? Array.from({ length: t.length }, (e, n) => `${t.start(n).toFixed(2)}-${t.end(n).toFixed(2)}`) : [];
|
|
3262
3272
|
}
|
|
3263
|
-
function
|
|
3273
|
+
function Of(t) {
|
|
3264
3274
|
if (t.length === 0) return 0;
|
|
3265
3275
|
const e = t.reduce((r, s) => r + s.bytes, 0), n = t.reduce((r, s) => r + s.durationMs, 0);
|
|
3266
3276
|
return n === 0 ? 0 : e / n * 1e3;
|
|
3267
3277
|
}
|
|
3268
|
-
const
|
|
3278
|
+
const jf = 8e5, Hf = 4;
|
|
3269
3279
|
function kt(t) {
|
|
3270
3280
|
if (t === 0) return 6e4;
|
|
3271
|
-
const e =
|
|
3281
|
+
const e = jf / t * 1e3 * Hf;
|
|
3272
3282
|
return Math.max(3e4, Math.min(12e4, Math.round(e)));
|
|
3273
3283
|
}
|
|
3274
3284
|
function sr(t, e) {
|
|
@@ -3276,7 +3286,7 @@ function sr(t, e) {
|
|
|
3276
3286
|
if (t[n]?.keyframe) return n;
|
|
3277
3287
|
return -1;
|
|
3278
3288
|
}
|
|
3279
|
-
function
|
|
3289
|
+
function Uf(t, e, n, r) {
|
|
3280
3290
|
const s = t * 1e3 - 100, i = e * 1e3 + 100;
|
|
3281
3291
|
for (const a of r) {
|
|
3282
3292
|
const o = n[a];
|
|
@@ -3285,7 +3295,7 @@ function Bf(t, e, n, r) {
|
|
|
3285
3295
|
}
|
|
3286
3296
|
return !1;
|
|
3287
3297
|
}
|
|
3288
|
-
function
|
|
3298
|
+
function Wf(t) {
|
|
3289
3299
|
const e = [], n = t.replace(/\r\n/g, `
|
|
3290
3300
|
`).split(`
|
|
3291
3301
|
`);
|
|
@@ -3340,7 +3350,7 @@ function ir(t) {
|
|
|
3340
3350
|
let n = 0, r, s;
|
|
3341
3351
|
return e.length === 3 ? (n = parseInt(e[0], 10), r = parseInt(e[1], 10), s = parseFloat(e[2])) : (r = parseInt(e[0], 10), s = parseFloat(e[1])), isNaN(n) || isNaN(r) || isNaN(s) ? null : n * 3600 + r * 60 + s;
|
|
3342
3352
|
}
|
|
3343
|
-
function
|
|
3353
|
+
function zf(t) {
|
|
3344
3354
|
return t.replace(/<\/?[^>]+(>|$)/g, "").replace(/\{[^}]+\}/g, "").replace(/\\N/g, " ").replace(/\s*\n\s*/g, " ").replace(/\s{2,}/g, " ").trim();
|
|
3345
3355
|
}
|
|
3346
3356
|
const xa = {
|
|
@@ -3353,7 +3363,7 @@ const xa = {
|
|
|
3353
3363
|
// Accessibility-focused: bold white text on solid black box
|
|
3354
3364
|
contrast: "text-white font-bold bg-black px-3 py-1"
|
|
3355
3365
|
};
|
|
3356
|
-
function
|
|
3366
|
+
function Gf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
|
|
3357
3367
|
const [s, i] = $([]), [a, o] = $([]), f = P(null), [c, d] = $(40), [u, g] = $(18), [b, y] = $(t);
|
|
3358
3368
|
b !== t && (y(t), t || i([])), F(() => {
|
|
3359
3369
|
if (!t) return;
|
|
@@ -3367,7 +3377,7 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
|
|
|
3367
3377
|
if (!k.ok) throw new Error(`Failed to fetch subtitles (status ${k.status})`);
|
|
3368
3378
|
const v = await k.text();
|
|
3369
3379
|
if (w) return;
|
|
3370
|
-
const C =
|
|
3380
|
+
const C = Wf(v);
|
|
3371
3381
|
i(C);
|
|
3372
3382
|
return;
|
|
3373
3383
|
} catch (k) {
|
|
@@ -3438,7 +3448,7 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
|
|
|
3438
3448
|
"div",
|
|
3439
3449
|
{
|
|
3440
3450
|
className: `${L} font-medium max-w-[95%] inline-block antialiased ${xa[n]}`,
|
|
3441
|
-
children:
|
|
3451
|
+
children: zf(k.text)
|
|
3442
3452
|
}
|
|
3443
3453
|
)
|
|
3444
3454
|
},
|
|
@@ -3475,13 +3485,13 @@ function Hf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
|
|
|
3475
3485
|
T(M.bl, M.bc, M.br, { bottom: `${c}px` }, f)
|
|
3476
3486
|
] });
|
|
3477
3487
|
}
|
|
3478
|
-
const
|
|
3488
|
+
const Kf = [
|
|
3479
3489
|
{ value: "classic", label: "Classic" },
|
|
3480
3490
|
{ value: "cinema", label: "Cinema" },
|
|
3481
3491
|
{ value: "minimal", label: "Minimal" },
|
|
3482
3492
|
{ value: "contrast", label: "High Contrast" }
|
|
3483
3493
|
];
|
|
3484
|
-
function
|
|
3494
|
+
function qf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
|
|
3485
3495
|
return n ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
|
|
3486
3496
|
/* @__PURE__ */ l("span", { className: "text-[10px] opacity-60 uppercase tracking-wide", children: "Style" }),
|
|
3487
3497
|
/* @__PURE__ */ l(
|
|
@@ -3489,7 +3499,7 @@ function Wf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
|
|
|
3489
3499
|
{
|
|
3490
3500
|
ariaLabel: "Subtitle style selection",
|
|
3491
3501
|
title: "Select subtitle style",
|
|
3492
|
-
options:
|
|
3502
|
+
options: Kf.map((s) => ({
|
|
3493
3503
|
...s,
|
|
3494
3504
|
render: /* @__PURE__ */ l("span", { className: "subtitle-style-preview", "data-style": s.value, children: /* @__PURE__ */ l("span", { className: `font-medium text-[15px] leading-tight inline-block antialiased ${xa[s.value]}`, children: s.label }) })
|
|
3495
3505
|
})),
|
|
@@ -3501,7 +3511,7 @@ function Wf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
|
|
|
3501
3511
|
)
|
|
3502
3512
|
] }) : null;
|
|
3503
3513
|
}
|
|
3504
|
-
function
|
|
3514
|
+
function Vf({ videoRef: t }) {
|
|
3505
3515
|
const [e, n] = $(!1);
|
|
3506
3516
|
F(() => {
|
|
3507
3517
|
const s = () => {
|
|
@@ -3531,11 +3541,11 @@ function zf({ videoRef: t }) {
|
|
|
3531
3541
|
},
|
|
3532
3542
|
className: "ctr-btn",
|
|
3533
3543
|
title: e ? "Exit Fullscreen" : "Enter Fullscreen",
|
|
3534
|
-
children: e ? /* @__PURE__ */ l(
|
|
3544
|
+
children: e ? /* @__PURE__ */ l(to, {}) : /* @__PURE__ */ l(eo, {})
|
|
3535
3545
|
}
|
|
3536
3546
|
);
|
|
3537
3547
|
}
|
|
3538
|
-
function
|
|
3548
|
+
function Jf({
|
|
3539
3549
|
videoRef: t,
|
|
3540
3550
|
mediaId: e,
|
|
3541
3551
|
durationMs: n,
|
|
@@ -3606,18 +3616,18 @@ function Gf({
|
|
|
3606
3616
|
return /* @__PURE__ */ E("div", { className: `ctr-bar-wrapper ${rt ? "show" : ""}`, children: [
|
|
3607
3617
|
/* @__PURE__ */ E("div", { ref: v, className: Lt, children: [
|
|
3608
3618
|
p && /* @__PURE__ */ E("div", { className: "cluster", children: [
|
|
3609
|
-
/* @__PURE__ */ l(
|
|
3619
|
+
/* @__PURE__ */ l(Ef, {}),
|
|
3610
3620
|
S && /* @__PURE__ */ l(va, {}),
|
|
3611
|
-
/* @__PURE__ */ l(
|
|
3621
|
+
/* @__PURE__ */ l(Mf, {})
|
|
3612
3622
|
] }),
|
|
3613
|
-
/* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(
|
|
3623
|
+
/* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(Nf, { durationMs: n, displayPlayheadMs: y }) }),
|
|
3614
3624
|
/* @__PURE__ */ E("div", { className: "cluster", children: [
|
|
3615
|
-
/* @__PURE__ */ l(
|
|
3625
|
+
/* @__PURE__ */ l(Rf, { videoRef: t }),
|
|
3616
3626
|
s.length > 1 && /* @__PURE__ */ E(he, { children: [
|
|
3617
3627
|
/* @__PURE__ */ l("div", { className: "w-px h-5 bg-white/20" }),
|
|
3618
3628
|
" ",
|
|
3619
3629
|
/* @__PURE__ */ l(
|
|
3620
|
-
|
|
3630
|
+
Lf,
|
|
3621
3631
|
{
|
|
3622
3632
|
tracks: s,
|
|
3623
3633
|
selectedIndex: i,
|
|
@@ -3629,7 +3639,7 @@ function Gf({
|
|
|
3629
3639
|
] }),
|
|
3630
3640
|
o.length > 0 && /* @__PURE__ */ E("div", { className: "cluster", children: [
|
|
3631
3641
|
/* @__PURE__ */ l(
|
|
3632
|
-
|
|
3642
|
+
Ff,
|
|
3633
3643
|
{
|
|
3634
3644
|
tracks: o,
|
|
3635
3645
|
selectedIndex: f,
|
|
@@ -3640,7 +3650,7 @@ function Gf({
|
|
|
3640
3650
|
}
|
|
3641
3651
|
),
|
|
3642
3652
|
/* @__PURE__ */ l(
|
|
3643
|
-
|
|
3653
|
+
qf,
|
|
3644
3654
|
{
|
|
3645
3655
|
style: g,
|
|
3646
3656
|
onStyleChange: b,
|
|
@@ -3658,7 +3668,7 @@ function Gf({
|
|
|
3658
3668
|
onDragOver: I.onDragOver,
|
|
3659
3669
|
children: [
|
|
3660
3670
|
/* @__PURE__ */ l(aa, { pending: I.pending, uploading: I.uploading, onRemove: I.remove }),
|
|
3661
|
-
K && /* @__PURE__ */ l(
|
|
3671
|
+
K && /* @__PURE__ */ l(Ki, { anchor: tt, width: 340, children: /* @__PURE__ */ l(
|
|
3662
3672
|
jr,
|
|
3663
3673
|
{
|
|
3664
3674
|
open: !0,
|
|
@@ -3707,7 +3717,7 @@ function Gf({
|
|
|
3707
3717
|
),
|
|
3708
3718
|
/* @__PURE__ */ E("div", { className: "cluster cluster-tight", children: [
|
|
3709
3719
|
L && /* @__PURE__ */ l(ka, { className: "ctr-btn" }),
|
|
3710
|
-
/* @__PURE__ */ l(
|
|
3720
|
+
/* @__PURE__ */ l(Vf, { videoRef: t })
|
|
3711
3721
|
] })
|
|
3712
3722
|
] }),
|
|
3713
3723
|
Kt && /* @__PURE__ */ E("div", { className: "ctr-scroll-group", children: [
|
|
@@ -3728,40 +3738,42 @@ function Gf({
|
|
|
3728
3738
|
onClick: () => Rt("right"),
|
|
3729
3739
|
tabIndex: -1,
|
|
3730
3740
|
"aria-label": "Scroll right",
|
|
3731
|
-
children: /* @__PURE__ */ l(
|
|
3741
|
+
children: /* @__PURE__ */ l(no, {})
|
|
3732
3742
|
}
|
|
3733
3743
|
)
|
|
3734
3744
|
] })
|
|
3735
3745
|
] });
|
|
3736
3746
|
}
|
|
3737
|
-
const
|
|
3738
|
-
function
|
|
3739
|
-
return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >=
|
|
3747
|
+
const Qf = 1e3;
|
|
3748
|
+
function Yf(t) {
|
|
3749
|
+
return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >= Qf;
|
|
3740
3750
|
}
|
|
3741
|
-
function
|
|
3751
|
+
function Xf(t, e) {
|
|
3742
3752
|
return e.isLeader ? t === "play" && e.roomPlaying ? { kind: "resync" } : t === "pause" && !e.roomPlaying ? { kind: "none" } : { kind: "control", control: t } : t === "pause" ? { kind: "local-pause" } : e.roomPlaying ? { kind: "resync" } : { kind: "none" };
|
|
3743
3753
|
}
|
|
3744
|
-
const
|
|
3745
|
-
function
|
|
3754
|
+
const Zf = 1e3;
|
|
3755
|
+
function el(t) {
|
|
3746
3756
|
if (!t.roomPlaying || t.seekInFlight) return { kind: "none" };
|
|
3747
3757
|
const e = t.durationMs > 0 ? Math.min(t.roomMs, t.durationMs) : t.roomMs;
|
|
3748
3758
|
return Math.abs(e - t.elementMs) > t.driftToleranceMs ? { kind: "seek", targetMs: Math.round(e) } : t.elementPaused ? { kind: "resume" } : { kind: "none" };
|
|
3749
3759
|
}
|
|
3750
|
-
function
|
|
3760
|
+
function tl(t, e, n) {
|
|
3751
3761
|
return t.playheadMs + (t.playing ? Math.max(0, n - e) : 0);
|
|
3752
3762
|
}
|
|
3753
3763
|
function Ea(t) {
|
|
3754
|
-
const e = t
|
|
3755
|
-
|
|
3764
|
+
const e = ei(t);
|
|
3765
|
+
if (e !== null) return e;
|
|
3766
|
+
const n = t.split("/").filter(Boolean);
|
|
3767
|
+
return n.length >= 2 ? n.slice(-2).join(" ") : n[n.length - 1] || t;
|
|
3756
3768
|
}
|
|
3757
|
-
function
|
|
3769
|
+
function nl(t) {
|
|
3758
3770
|
const e = t.split("/").filter(Boolean), n = [`${e.join("/")}/poster.jpg`];
|
|
3759
3771
|
return e.length >= 2 && n.push(`${e.slice(0, -1).join("/")}/poster.jpg`), n;
|
|
3760
3772
|
}
|
|
3761
|
-
function
|
|
3773
|
+
function rl({ mediaId: t, visible: e }) {
|
|
3762
3774
|
return t ? /* @__PURE__ */ l("div", { className: `media-title ${e ? "show" : ""}`, children: Ea(t) }) : null;
|
|
3763
3775
|
}
|
|
3764
|
-
const
|
|
3776
|
+
const al = 300, sl = 50, il = 100, ol = 100, fl = 100, ll = 100;
|
|
3765
3777
|
function on(t, e) {
|
|
3766
3778
|
if (t.length === 0) return 0;
|
|
3767
3779
|
const n = Math.min(Math.floor(e / 100 * t.length), t.length - 1);
|
|
@@ -3779,10 +3791,10 @@ function Be(t) {
|
|
|
3779
3791
|
max: Math.round(e[e.length - 1])
|
|
3780
3792
|
};
|
|
3781
3793
|
}
|
|
3782
|
-
function Oe(t, e =
|
|
3794
|
+
function Oe(t, e = al) {
|
|
3783
3795
|
t.length > e && t.splice(0, t.length - e);
|
|
3784
3796
|
}
|
|
3785
|
-
class
|
|
3797
|
+
class cl {
|
|
3786
3798
|
// Fetch
|
|
3787
3799
|
_fetches = [];
|
|
3788
3800
|
_fetchTimeoutCount = 0;
|
|
@@ -3840,11 +3852,11 @@ class il {
|
|
|
3840
3852
|
}
|
|
3841
3853
|
/** Called when waitForAppend times out. */
|
|
3842
3854
|
recordAppendTimeout(e, n, r) {
|
|
3843
|
-
this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts,
|
|
3855
|
+
this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts, sl);
|
|
3844
3856
|
}
|
|
3845
3857
|
/** Called when a seek completes (COMPLETED path in _execute). */
|
|
3846
3858
|
recordSeekCompleted(e, n, r) {
|
|
3847
|
-
this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks,
|
|
3859
|
+
this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks, il);
|
|
3848
3860
|
}
|
|
3849
3861
|
/** Called when waitForSeeked resolves via timeout rather than the 'seeked' event. */
|
|
3850
3862
|
recordWaitForSeekedTimeout() {
|
|
@@ -3866,11 +3878,11 @@ class il {
|
|
|
3866
3878
|
this._stallStart && (this._stalls.push({
|
|
3867
3879
|
...this._stallStart,
|
|
3868
3880
|
durationMs: Math.round(performance.now() - this._stallStart.ts)
|
|
3869
|
-
}), Oe(this._stalls,
|
|
3881
|
+
}), Oe(this._stalls, ol), this._stallStart = null);
|
|
3870
3882
|
}
|
|
3871
3883
|
/** Called from _doEvict with the reason tag passed by the caller. */
|
|
3872
3884
|
recordEvict(e, n, r) {
|
|
3873
|
-
this._evictCounts[e] = (this._evictCounts[e] ?? 0) + 1, this._evicts.push({ reason: e, start: n, end: r, ts: performance.now() }), Oe(this._evicts,
|
|
3885
|
+
this._evictCounts[e] = (this._evictCounts[e] ?? 0) + 1, this._evicts.push({ reason: e, start: n, end: r, ts: performance.now() }), Oe(this._evicts, fl);
|
|
3874
3886
|
}
|
|
3875
3887
|
/** Called from FragmentManager.reconcileLoadedStates() when the browser's
|
|
3876
3888
|
* own silent quota eviction is detected (fragments 'loaded' but gone from
|
|
@@ -3912,7 +3924,7 @@ class il {
|
|
|
3912
3924
|
},
|
|
3913
3925
|
audio: {
|
|
3914
3926
|
driftMs: Be(this._audioDrifts),
|
|
3915
|
-
highDriftCount: this._audioDrifts.filter((c) => c >
|
|
3927
|
+
highDriftCount: this._audioDrifts.filter((c) => c > ll).length,
|
|
3916
3928
|
samples: this._audioDrifts.slice(-20).map((c) => Math.round(c))
|
|
3917
3929
|
},
|
|
3918
3930
|
stalls: {
|
|
@@ -3961,9 +3973,9 @@ class il {
|
|
|
3961
3973
|
this._fetches = [], this._fetchTimeoutCount = 0, this._fetchErrorCount = 0, this._appends = [], this._appendStarts.clear(), this._appendTimeouts = [], this._seeks = [], this._waitForSeekedTimeouts = 0, this._audioDrifts = [], this._stalls = [], this._stallStart = null, this._evictCounts = {}, this._evicts = [], this._browserEvictions = [];
|
|
3962
3974
|
}
|
|
3963
3975
|
}
|
|
3964
|
-
const de = new
|
|
3976
|
+
const de = new cl();
|
|
3965
3977
|
Tr("__WP_PERF__", de);
|
|
3966
|
-
class
|
|
3978
|
+
class dl {
|
|
3967
3979
|
cache = /* @__PURE__ */ new Map();
|
|
3968
3980
|
getOrCreate(e) {
|
|
3969
3981
|
let n = this.cache.get(e);
|
|
@@ -4002,8 +4014,8 @@ class ol {
|
|
|
4002
4014
|
this.cache.clear();
|
|
4003
4015
|
}
|
|
4004
4016
|
}
|
|
4005
|
-
const Me = new
|
|
4006
|
-
class
|
|
4017
|
+
const Me = new dl(), or = 60, ul = 5e3;
|
|
4018
|
+
class hl {
|
|
4007
4019
|
constructor(e) {
|
|
4008
4020
|
this.deps = e;
|
|
4009
4021
|
}
|
|
@@ -4083,7 +4095,7 @@ class ll {
|
|
|
4083
4095
|
if (this.evictStartedAt === 0)
|
|
4084
4096
|
return this.evictStartedAt = Date.now(), !0;
|
|
4085
4097
|
const e = Date.now() - this.evictStartedAt;
|
|
4086
|
-
return e <
|
|
4098
|
+
return e < ul ? !0 : (N("buffer", `EVICT-STUCK isEvicting held ${e}ms — clearing; a remove() updateend was lost, eviction was disabled`), de.recordEvict("stuck-recovered", 0, 0), this._isEvicting = !1, this.evictStartedAt = 0, !1);
|
|
4087
4099
|
}
|
|
4088
4100
|
/** Called on dispose, on SourceBuffer error, and on media change
|
|
4089
4101
|
* (FragmentManager.setIndex) — see the note at that call site. */
|
|
@@ -4249,13 +4261,13 @@ class He {
|
|
|
4249
4261
|
* hold began. Lets processAppendQueue bound a hold that would otherwise
|
|
4250
4262
|
* never end — see APPEND_HOLD_MAX_MS. */
|
|
4251
4263
|
appendHold = null;
|
|
4252
|
-
eviction = new
|
|
4264
|
+
eviction = new hl({
|
|
4253
4265
|
getFragments: () => this.fragments,
|
|
4254
4266
|
getSourceBuffer: () => this.sourceBuffer,
|
|
4255
4267
|
getMediaSource: () => this.mediaSource,
|
|
4256
4268
|
isDisposed: () => this.disposed,
|
|
4257
4269
|
fragmentStates: this.fragmentStates,
|
|
4258
|
-
getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs >
|
|
4270
|
+
getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs > Df ? null : this.pendingSeekTargetMs
|
|
4259
4271
|
});
|
|
4260
4272
|
lastGapWarnMs = 0;
|
|
4261
4273
|
stableGapSignature = null;
|
|
@@ -4281,7 +4293,7 @@ class He {
|
|
|
4281
4293
|
// timing, and APPEND-HOLD reason counts. Read by emitInitDigest() which warns
|
|
4282
4294
|
// once at gate-pass time so the load shape is visible in session logs without
|
|
4283
4295
|
// wp:reportLogs=true.
|
|
4284
|
-
static INIT_TRACK_FRAGS =
|
|
4296
|
+
static INIT_TRACK_FRAGS = ks;
|
|
4285
4297
|
loadStartTs = 0;
|
|
4286
4298
|
initFetchStart = 0;
|
|
4287
4299
|
initFetchEnd = 0;
|
|
@@ -4359,8 +4371,8 @@ class He {
|
|
|
4359
4371
|
* `fragment-route.realmedia.test.ts`; this is the client-side backstop.
|
|
4360
4372
|
*/
|
|
4361
4373
|
async tryFragmentRoute(e, n, r) {
|
|
4362
|
-
if (this.fragmentRouteDisabled || !this.delivery || !
|
|
4363
|
-
const s =
|
|
4374
|
+
if (this.fragmentRouteDisabled || !this.delivery || !Ss()) return null;
|
|
4375
|
+
const s = xs(this.delivery, e);
|
|
4364
4376
|
if (!s)
|
|
4365
4377
|
return this.disableFragmentRoute(e, "could not build a URL for this config"), null;
|
|
4366
4378
|
try {
|
|
@@ -4489,14 +4501,14 @@ class He {
|
|
|
4489
4501
|
}
|
|
4490
4502
|
this.initAppendDone = performance.now(), this.initState = "loaded", this.initRetryCount = 0, _("buffer", `INIT-LOADED sbRanges=[${we(this.sourceBuffer?.buffered).join(", ")}]`), this.processAppendQueue();
|
|
4491
4503
|
} catch (o) {
|
|
4492
|
-
ee("buffer", "Init segment fetch/append failed", { error: o.message }), a() || (this.initState = "pending", this.initRetryCount += 1, this.initRetryCount >=
|
|
4504
|
+
ee("buffer", "Init segment fetch/append failed", { error: o.message }), a() || (this.initState = "pending", this.initRetryCount += 1, this.initRetryCount >= Es ? (this.initFailed = !0, N("buffer", "INIT-GIVE-UP — init segment failed repeatedly; rejecting waiters for fast recovery", {
|
|
4493
4505
|
attempts: this.initRetryCount,
|
|
4494
4506
|
error: o.message
|
|
4495
4507
|
}), this.rejectAllWaiters(new Error("init segment failed after repeated retries"))) : this.disposed || setTimeout(() => {
|
|
4496
4508
|
!this.disposed && this.initState === "pending" && this.fetchInit().catch((f) => {
|
|
4497
4509
|
ee("buffer", "INIT-RETRY failed", X(f));
|
|
4498
4510
|
});
|
|
4499
|
-
},
|
|
4511
|
+
}, Ms));
|
|
4500
4512
|
}
|
|
4501
4513
|
}
|
|
4502
4514
|
/** Runs inside updateend after an append completes. Decides whether MSE
|
|
@@ -4584,7 +4596,7 @@ class He {
|
|
|
4584
4596
|
]), r = [], s = this.currentPlayheadMs / 1e3;
|
|
4585
4597
|
for (let o = 1; o < e.buffered.length; o++) {
|
|
4586
4598
|
const f = e.buffered.end(o - 1), c = e.buffered.start(o);
|
|
4587
|
-
c <= s ||
|
|
4599
|
+
c <= s || Uf(f, c, this.fragments, n) || r.push(`${f.toFixed(2)}-${c.toFixed(2)}`);
|
|
4588
4600
|
}
|
|
4589
4601
|
if (r.length === 0) {
|
|
4590
4602
|
this.stableGapSignature = null, this.stableGapSince = 0;
|
|
@@ -5023,7 +5035,7 @@ class He {
|
|
|
5023
5035
|
if (this.appendHold?.index !== e)
|
|
5024
5036
|
return this.appendHold = { index: e, since: r }, !1;
|
|
5025
5037
|
const s = r - this.appendHold.since;
|
|
5026
|
-
if (s <
|
|
5038
|
+
if (s < _s) return !1;
|
|
5027
5039
|
N("buffer", `APPEND-HOLD-BREAK #${e} held ${s}ms behind ${n.length} pending fetch(es) — declaring them dead so the queue can drain`, {
|
|
5028
5040
|
headIndex: e,
|
|
5029
5041
|
heldMs: s,
|
|
@@ -5087,7 +5099,7 @@ class He {
|
|
|
5087
5099
|
if (this.disposed || !this.sourceBuffer || (this.currentPlayheadMs = e, this.currentJobs.size >= st)) return;
|
|
5088
5100
|
const n = Fe(this.fragments, e), r = Math.min(this.fragments.length - 1, Fe(this.fragments, e + ut)), s = Date.now();
|
|
5089
5101
|
for (let a = n; a <= r; a++)
|
|
5090
|
-
this.fragmentStates.get(a) === "error" && s - (this.errorTimestamps.get(a) ?? 0) >=
|
|
5102
|
+
this.fragmentStates.get(a) === "error" && s - (this.errorTimestamps.get(a) ?? 0) >= Ts && ((this.fetchErrorCycles.get(a) ?? 0) >= Dn ? _("buffer", `PREFETCH-DEAD #${a} cycles=${this.fetchErrorCycles.get(a)} not resetting`) : (this.fragmentStates.set(a, "pending"), this.errorTimestamps.delete(a)));
|
|
5091
5103
|
let i = 0;
|
|
5092
5104
|
for (let a = n; a <= r && i < st - this.currentJobs.size; a++) {
|
|
5093
5105
|
const o = this.fragmentStates.get(a);
|
|
@@ -5118,7 +5130,7 @@ class He {
|
|
|
5118
5130
|
/** Public eviction entry point used by MediaPlayer / prefetch. Delegates
|
|
5119
5131
|
* to the strategy which owns the isEvicting state + range choice logic. */
|
|
5120
5132
|
evictBefore(e) {
|
|
5121
|
-
this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <=
|
|
5133
|
+
this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <= Bf && (this.pendingSeekTargetMs = null), this.eviction.evictBefore(e);
|
|
5122
5134
|
}
|
|
5123
5135
|
// Public entry point for socket reconnect scenarios. Clears stale in-flight
|
|
5124
5136
|
// fetches and their pendingFetchIndices entries so the queue is unblocked on
|
|
@@ -5266,7 +5278,7 @@ class He {
|
|
|
5266
5278
|
return { ranges: e, gaps: e.length > 1, fragmentStates: n };
|
|
5267
5279
|
}
|
|
5268
5280
|
getAverageDownloadRate() {
|
|
5269
|
-
return
|
|
5281
|
+
return Of(this.downloadSamples);
|
|
5270
5282
|
}
|
|
5271
5283
|
/** Nominal media end time (ms) = last fragment's end. 0 if no index loaded.
|
|
5272
5284
|
* Reported in health so the leader's status card can tell "near end-of-stream,
|
|
@@ -5340,7 +5352,7 @@ class He {
|
|
|
5340
5352
|
if (this.eosRetryTimer) return;
|
|
5341
5353
|
this.eosRetryTimer = setTimeout(() => {
|
|
5342
5354
|
this.eosRetryTimer = null, this.tryEndOfStream();
|
|
5343
|
-
},
|
|
5355
|
+
}, As);
|
|
5344
5356
|
return;
|
|
5345
5357
|
}
|
|
5346
5358
|
try {
|
|
@@ -5384,14 +5396,14 @@ class He {
|
|
|
5384
5396
|
this.disposed = !0, this.mediaSource && ct.get(this.mediaSource)?.delete(this), this.eosRetryTimer && (clearTimeout(this.eosRetryTimer), this.eosRetryTimer = null), this.pendingEndOfStream = !1, this.endOfStreamEligible = !1, this.abortAllJobs("dispose"), this.rejectAllWaiters(new Error("FragmentManager disposed")), this.appendQueue = [], this.isAppending = !1, this.eviction.reset(), this.appendingIndex = null, this.fragmentStates.clear(), this.errorTimestamps.clear(), this.discardCounts.clear(), this.fetchErrorCycles.clear(), this.downloadSamples = [], this.preAppendRanges = [], this.sourceBuffer = null, this.mediaSource = null, this.initState = "pending", this.initRange = null;
|
|
5385
5397
|
}
|
|
5386
5398
|
}
|
|
5387
|
-
function
|
|
5399
|
+
function ml(t, e) {
|
|
5388
5400
|
return !!t && t !== "eng" && e;
|
|
5389
5401
|
}
|
|
5390
|
-
function
|
|
5391
|
-
return t.override !== null ? t.override : t.globalEnabled ||
|
|
5402
|
+
function gl(t) {
|
|
5403
|
+
return t.override !== null ? t.override : t.globalEnabled || ml(t.selectedAudioLang, t.hasEngSub);
|
|
5392
5404
|
}
|
|
5393
5405
|
const Ma = "wp_reload_history", In = "wp_phantom_reload", _a = 5 * 6e4, fr = 3;
|
|
5394
|
-
function
|
|
5406
|
+
function pl() {
|
|
5395
5407
|
try {
|
|
5396
5408
|
const t = sessionStorage.getItem(Ma);
|
|
5397
5409
|
return (t ? JSON.parse(t) : []).filter((n) => Date.now() - n < _a);
|
|
@@ -5400,7 +5412,7 @@ function ul() {
|
|
|
5400
5412
|
}
|
|
5401
5413
|
}
|
|
5402
5414
|
function yn(t, e) {
|
|
5403
|
-
const n =
|
|
5415
|
+
const n = pl();
|
|
5404
5416
|
if (n.length >= fr) {
|
|
5405
5417
|
Bn(
|
|
5406
5418
|
"error",
|
|
@@ -5436,13 +5448,13 @@ function lr() {
|
|
|
5436
5448
|
return null;
|
|
5437
5449
|
}
|
|
5438
5450
|
}
|
|
5439
|
-
function
|
|
5451
|
+
function bl() {
|
|
5440
5452
|
try {
|
|
5441
5453
|
sessionStorage.removeItem(In);
|
|
5442
5454
|
} catch {
|
|
5443
5455
|
}
|
|
5444
5456
|
}
|
|
5445
|
-
function
|
|
5457
|
+
function yl() {
|
|
5446
5458
|
const t = navigator;
|
|
5447
5459
|
try {
|
|
5448
5460
|
return typeof t.getAutoplayPolicy == "function" ? t.getAutoplayPolicy("mediaelement") : void 0;
|
|
@@ -5450,11 +5462,11 @@ function ml() {
|
|
|
5450
5462
|
return;
|
|
5451
5463
|
}
|
|
5452
5464
|
}
|
|
5453
|
-
function
|
|
5465
|
+
function wl(t, e) {
|
|
5454
5466
|
return t === "disallowed" ? "deferred" : e ? "user-muted" : t === "allowed-muted" ? "muted-bridge" : "audible";
|
|
5455
5467
|
}
|
|
5456
5468
|
function Ta(t, e) {
|
|
5457
|
-
const n =
|
|
5469
|
+
const n = yl(), r = wl(n, e.userWantsMuted);
|
|
5458
5470
|
_(e.label, "autoplay plan", { policy: n ?? "unknown", plan: r, userWantsMuted: e.userWantsMuted });
|
|
5459
5471
|
const s = () => {
|
|
5460
5472
|
t.muted = !0, t.play().then(() => {
|
|
@@ -5494,7 +5506,7 @@ function Aa(t, e = 3e3) {
|
|
|
5494
5506
|
t.addEventListener("seeked", s, { once: !0 });
|
|
5495
5507
|
});
|
|
5496
5508
|
}
|
|
5497
|
-
class
|
|
5509
|
+
class vl {
|
|
5498
5510
|
// ── State ──
|
|
5499
5511
|
_seekInFlight = !1;
|
|
5500
5512
|
/** Route taken by the in-flight seek (buffered/loading/nearby-pending/far) —
|
|
@@ -5686,10 +5698,10 @@ class pl {
|
|
|
5686
5698
|
}
|
|
5687
5699
|
}
|
|
5688
5700
|
let Et = null;
|
|
5689
|
-
function
|
|
5690
|
-
Et === null && (_("health", "Starting health reporting"), cr(), Et = window.setInterval(cr,
|
|
5701
|
+
function kl() {
|
|
5702
|
+
Et === null && (_("health", "Starting health reporting"), cr(), Et = window.setInterval(cr, Is));
|
|
5691
5703
|
}
|
|
5692
|
-
function
|
|
5704
|
+
function Sl() {
|
|
5693
5705
|
Et !== null && (_("health", "Stopping health reporting"), window.clearInterval(Et), Et = null);
|
|
5694
5706
|
}
|
|
5695
5707
|
function cr() {
|
|
@@ -5723,13 +5735,13 @@ function cr() {
|
|
|
5723
5735
|
fragments_error: i.fragmentStates.error || 0,
|
|
5724
5736
|
video_ready_state: r?.readyState ?? -1,
|
|
5725
5737
|
duration_ms: n.getMediaEndMs(),
|
|
5726
|
-
delivery_arm:
|
|
5727
|
-
...
|
|
5728
|
-
pong_age_ms:
|
|
5738
|
+
delivery_arm: Ns(),
|
|
5739
|
+
...xl(r),
|
|
5740
|
+
pong_age_ms: Cs(),
|
|
5729
5741
|
reported_at: Date.now()
|
|
5730
5742
|
});
|
|
5731
5743
|
}
|
|
5732
|
-
function
|
|
5744
|
+
function xl(t) {
|
|
5733
5745
|
const e = typeof navigator > "u" ? void 0 : navigator, n = e?.connection;
|
|
5734
5746
|
return {
|
|
5735
5747
|
page_visible: typeof document.visibilityState == "string" ? document.visibilityState === "visible" : void 0,
|
|
@@ -5741,8 +5753,8 @@ function wl(t) {
|
|
|
5741
5753
|
net_downlink_mbps: typeof n?.downlink == "number" && n.downlink >= 0 ? n.downlink : void 0
|
|
5742
5754
|
};
|
|
5743
5755
|
}
|
|
5744
|
-
const
|
|
5745
|
-
function
|
|
5756
|
+
const El = 3e3;
|
|
5757
|
+
function Ml() {
|
|
5746
5758
|
const [t, e] = $(!1), n = P(null), r = P(!1), s = () => {
|
|
5747
5759
|
n.current && (clearTimeout(n.current), n.current = null);
|
|
5748
5760
|
}, i = H((f = 3e3) => {
|
|
@@ -5752,7 +5764,7 @@ function kl() {
|
|
|
5752
5764
|
}, []), a = H(() => {
|
|
5753
5765
|
r.current || (s(), e(!1));
|
|
5754
5766
|
}, []), o = H((f) => {
|
|
5755
|
-
r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(
|
|
5767
|
+
r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(El));
|
|
5756
5768
|
}, [i]);
|
|
5757
5769
|
return F(() => {
|
|
5758
5770
|
const f = () => {
|
|
@@ -5763,7 +5775,7 @@ function kl() {
|
|
|
5763
5775
|
};
|
|
5764
5776
|
}, [i]), { controlsVisible: t, showControls: i, hideControls: a, setControlsHeld: o };
|
|
5765
5777
|
}
|
|
5766
|
-
const Ia = [], Ca = [],
|
|
5778
|
+
const Ia = [], Ca = [], _l = {
|
|
5767
5779
|
fragments: Ia,
|
|
5768
5780
|
durationMs: null,
|
|
5769
5781
|
mseCodec: null,
|
|
@@ -5771,8 +5783,8 @@ const Ia = [], Ca = [], Sl = {
|
|
|
5771
5783
|
audioTracks: Ca,
|
|
5772
5784
|
contentToken: null
|
|
5773
5785
|
};
|
|
5774
|
-
function
|
|
5775
|
-
if (!t || t.url !== e) return
|
|
5786
|
+
function Tl(t, e) {
|
|
5787
|
+
if (!t || t.url !== e) return _l;
|
|
5776
5788
|
const n = t.data;
|
|
5777
5789
|
return {
|
|
5778
5790
|
fragments: n.fragments || Ia,
|
|
@@ -5801,7 +5813,7 @@ function dr(t) {
|
|
|
5801
5813
|
return null;
|
|
5802
5814
|
}
|
|
5803
5815
|
}
|
|
5804
|
-
function
|
|
5816
|
+
function Al(t) {
|
|
5805
5817
|
const [e, n] = $(null);
|
|
5806
5818
|
return F(() => {
|
|
5807
5819
|
const r = new AbortController();
|
|
@@ -5854,7 +5866,7 @@ function El(t) {
|
|
|
5854
5866
|
return s(), () => {
|
|
5855
5867
|
r.abort();
|
|
5856
5868
|
};
|
|
5857
|
-
}, [t]), ye(() =>
|
|
5869
|
+
}, [t]), ye(() => Tl(e, t), [e, t]);
|
|
5858
5870
|
}
|
|
5859
5871
|
const fn = {
|
|
5860
5872
|
audioTracks: [],
|
|
@@ -5862,10 +5874,10 @@ const fn = {
|
|
|
5862
5874
|
selectedAudioIndex: 0,
|
|
5863
5875
|
selectedSubtitleIndex: 0
|
|
5864
5876
|
};
|
|
5865
|
-
function
|
|
5866
|
-
const [e, n] = $(fn), r =
|
|
5877
|
+
function Il(t) {
|
|
5878
|
+
const [e, n] = $(fn), r = Rs(), s = x((d) => d.mediaPrefs.preferredAudioLang), [i, a] = $(t);
|
|
5867
5879
|
i !== t && (a(t), t && n(fn));
|
|
5868
|
-
const o = ue(() => ({ origin:
|
|
5880
|
+
const o = ue(() => ({ origin: Ls(r), preferredAudioLang: s }));
|
|
5869
5881
|
F(() => {
|
|
5870
5882
|
if (!t) return;
|
|
5871
5883
|
const d = new AbortController(), { origin: u, preferredAudioLang: g } = o();
|
|
@@ -5898,12 +5910,12 @@ function Ml(t) {
|
|
|
5898
5910
|
setSelectedSubtitleIndex: c
|
|
5899
5911
|
};
|
|
5900
5912
|
}
|
|
5901
|
-
const
|
|
5902
|
-
function
|
|
5903
|
-
return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs >
|
|
5913
|
+
const Cl = 100;
|
|
5914
|
+
function Nl(t) {
|
|
5915
|
+
return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs > Cl ? "advancing" : "stalled";
|
|
5904
5916
|
}
|
|
5905
|
-
const ln = 4e4,
|
|
5906
|
-
function
|
|
5917
|
+
const ln = 4e4, Rl = 3e3;
|
|
5918
|
+
function Ll(t, e, n, r, s, i) {
|
|
5907
5919
|
const a = ue((p) => {
|
|
5908
5920
|
const M = {};
|
|
5909
5921
|
return (i?.current ?? []).forEach((T, w) => {
|
|
@@ -5928,13 +5940,13 @@ function Il(t, e, n, r, s, i) {
|
|
|
5928
5940
|
function R() {
|
|
5929
5941
|
M();
|
|
5930
5942
|
const v = t.current;
|
|
5931
|
-
v && (h.current = v.currentTime, y.current = setTimeout(T,
|
|
5943
|
+
v && (h.current = v.currentTime, y.current = setTimeout(T, Rl));
|
|
5932
5944
|
}
|
|
5933
5945
|
function T() {
|
|
5934
5946
|
y.current = null;
|
|
5935
5947
|
const v = t.current;
|
|
5936
5948
|
if (!v) return;
|
|
5937
|
-
const C = x.getState(), D = n.current, B =
|
|
5949
|
+
const C = x.getState(), D = n.current, B = Nl({
|
|
5938
5950
|
roomPlaying: C.snapshot.playing,
|
|
5939
5951
|
videoPaused: v.paused,
|
|
5940
5952
|
seekInFlight: !!D?.seekInFlight,
|
|
@@ -6094,8 +6106,8 @@ function Il(t, e, n, r, s, i) {
|
|
|
6094
6106
|
};
|
|
6095
6107
|
}, [r, t, e, n]);
|
|
6096
6108
|
}
|
|
6097
|
-
const
|
|
6098
|
-
function
|
|
6109
|
+
const Fl = 1.5;
|
|
6110
|
+
function $l(t, e, n, r, s, i) {
|
|
6099
6111
|
const a = P(null), o = P(null), f = H(() => {
|
|
6100
6112
|
a.current && (clearInterval(a.current), a.current = null), o.current?.(), o.current = null;
|
|
6101
6113
|
}, []);
|
|
@@ -6124,7 +6136,7 @@ function Nl(t, e, n, r, s, i) {
|
|
|
6124
6136
|
};
|
|
6125
6137
|
a.current = setInterval(b, jn);
|
|
6126
6138
|
const y = () => {
|
|
6127
|
-
performance.now() - g >= jn *
|
|
6139
|
+
performance.now() - g >= jn * Fl && b();
|
|
6128
6140
|
};
|
|
6129
6141
|
if (c && (c.addEventListener("timeupdate", y), o.current = () => c.removeEventListener("timeupdate", y)), c && !n.current?.seekInFlight) {
|
|
6130
6142
|
g = performance.now();
|
|
@@ -6134,13 +6146,13 @@ function Nl(t, e, n, r, s, i) {
|
|
|
6134
6146
|
return f;
|
|
6135
6147
|
}, [r, s, t, e, n, i, f]), { stopPrefetch: f };
|
|
6136
6148
|
}
|
|
6137
|
-
function
|
|
6149
|
+
function Pl(t, e, n, r, s, i) {
|
|
6138
6150
|
const a = x((u) => u.snapshot), o = x((u) => u.loadGeneration), f = P(o), c = ue((u) => s(u)), d = ue((u) => i(u));
|
|
6139
6151
|
F(() => {
|
|
6140
6152
|
const u = t.current;
|
|
6141
6153
|
if (!u || !r) return;
|
|
6142
6154
|
const g = a.playheadMs, b = n.current, y = o !== f.current;
|
|
6143
|
-
f.current = o, !(!y && Math.abs(g - b) <=
|
|
6155
|
+
f.current = o, !(!y && Math.abs(g - b) <= Fs) && (_("buffer", "Seek triggered", {
|
|
6144
6156
|
targetMs: g,
|
|
6145
6157
|
lastApplied: b,
|
|
6146
6158
|
delta: Math.round(g - b),
|
|
@@ -6166,7 +6178,7 @@ function ur(t, e) {
|
|
|
6166
6178
|
}, { once: !0 });
|
|
6167
6179
|
});
|
|
6168
6180
|
}
|
|
6169
|
-
function
|
|
6181
|
+
function Dl(t) {
|
|
6170
6182
|
const e = x((a) => a.playlist), n = x((a) => a.activePlaylistIndex), r = x((a) => a.snapshot.mediaId), s = e?.id, i = ue(() => e);
|
|
6171
6183
|
F(() => {
|
|
6172
6184
|
const a = i();
|
|
@@ -6265,11 +6277,11 @@ function Ll(t) {
|
|
|
6265
6277
|
}, [s, n, r, t]);
|
|
6266
6278
|
}
|
|
6267
6279
|
const Le = "bg-play";
|
|
6268
|
-
function
|
|
6280
|
+
function Bl() {
|
|
6269
6281
|
const t = x.getState();
|
|
6270
6282
|
return !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId;
|
|
6271
6283
|
}
|
|
6272
|
-
function
|
|
6284
|
+
function Ol(t) {
|
|
6273
6285
|
return typeof Image > "u" ? Promise.resolve(null) : t.reduce(
|
|
6274
6286
|
(e, n) => e.then((r) => r ?? new Promise((s) => {
|
|
6275
6287
|
const i = new Image();
|
|
@@ -6278,18 +6290,18 @@ function $l(t) {
|
|
|
6278
6290
|
Promise.resolve(null)
|
|
6279
6291
|
);
|
|
6280
6292
|
}
|
|
6281
|
-
function
|
|
6293
|
+
function jl(t, e, n, r, s, i) {
|
|
6282
6294
|
const a = P(!1), o = P(0), f = ue((d) => i(d)), c = ue((d) => {
|
|
6283
6295
|
const u = t.current, g = e.current;
|
|
6284
6296
|
if (!u || !s) return;
|
|
6285
|
-
const b = x.getState(), y = u.currentTime * 1e3, h =
|
|
6297
|
+
const b = x.getState(), y = u.currentTime * 1e3, h = tl(b.snapshot, b.snapshotReceivedAt, Date.now()), m = el({
|
|
6286
6298
|
roomPlaying: b.snapshot.playing,
|
|
6287
6299
|
seekInFlight: !!g?.seekInFlight,
|
|
6288
6300
|
elementPaused: u.paused,
|
|
6289
6301
|
elementMs: y,
|
|
6290
6302
|
roomMs: h,
|
|
6291
6303
|
durationMs: r,
|
|
6292
|
-
driftToleranceMs:
|
|
6304
|
+
driftToleranceMs: Zf
|
|
6293
6305
|
}), p = Math.round(h - y);
|
|
6294
6306
|
if (m.kind === "none") {
|
|
6295
6307
|
_(Le, "resync not needed", { reason: d, driftMs: p });
|
|
@@ -6302,7 +6314,7 @@ function Pl(t, e, n, r, s, i) {
|
|
|
6302
6314
|
if (!d || !s) return;
|
|
6303
6315
|
const u = () => {
|
|
6304
6316
|
const b = x.getState();
|
|
6305
|
-
|
|
6317
|
+
Yf({
|
|
6306
6318
|
hidden: document.visibilityState === "hidden",
|
|
6307
6319
|
roomPlaying: b.snapshot.playing,
|
|
6308
6320
|
seekInFlight: !!e.current?.seekInFlight,
|
|
@@ -6328,9 +6340,9 @@ function Pl(t, e, n, r, s, i) {
|
|
|
6328
6340
|
artwork: T ? [{ src: T }] : []
|
|
6329
6341
|
}));
|
|
6330
6342
|
};
|
|
6331
|
-
y(null),
|
|
6343
|
+
y(null), Ol(nl(n).map($s)).then(y);
|
|
6332
6344
|
const h = (T) => () => {
|
|
6333
|
-
const w = x.getState(), S =
|
|
6345
|
+
const w = x.getState(), S = Xf(T, { isLeader: Bl(), roomPlaying: w.snapshot.playing });
|
|
6334
6346
|
switch (_(Le, "media session press", { action: T, result: S.kind }), T === "pause" && (o.current = Date.now()), S.kind) {
|
|
6335
6347
|
case "control":
|
|
6336
6348
|
Pe(S.control), S.control === "pause" && d.pause();
|
|
@@ -6404,11 +6416,11 @@ function Pl(t, e, n, r, s, i) {
|
|
|
6404
6416
|
}, [t]);
|
|
6405
6417
|
}
|
|
6406
6418
|
const St = 5e3, hr = ".ctr-bar-wrapper";
|
|
6407
|
-
function
|
|
6419
|
+
function Hl(t, e, n, r) {
|
|
6408
6420
|
const s = ue((a) => {
|
|
6409
6421
|
const o = t.current;
|
|
6410
6422
|
if (!o) return;
|
|
6411
|
-
const f = o.querySelector(hr), c = document.activeElement, d = Dr(c) ? "text" : f && c && f.contains(c) ? "bar" : !c || c === document.body || c === o ? "idle" : "elsewhere", u =
|
|
6423
|
+
const f = o.querySelector(hr), c = document.activeElement, d = Dr(c) ? "text" : f && c && f.contains(c) ? "bar" : !c || c === document.body || c === o ? "idle" : "elsewhere", u = hi({
|
|
6412
6424
|
key: a.key,
|
|
6413
6425
|
back: We(a),
|
|
6414
6426
|
modifier: a.ctrlKey || a.metaKey || a.altKey,
|
|
@@ -6459,19 +6471,19 @@ function Dl(t, e, n, r) {
|
|
|
6459
6471
|
}, [t]);
|
|
6460
6472
|
}
|
|
6461
6473
|
function mr(t, e, n) {
|
|
6462
|
-
const r = n instanceof HTMLInputElement && n.type !== "range" ? n : null, s = r ? { atStart: (r.selectionEnd ?? 0) === 0, atEnd: (r.selectionStart ?? 0) === r.value.length } : void 0, i =
|
|
6474
|
+
const r = n instanceof HTMLInputElement && n.type !== "range" ? n : null, s = r ? { atStart: (r.selectionEnd ?? 0) === 0, atEnd: (r.selectionStart ?? 0) === r.value.length } : void 0, i = mi(t.key, Fr(n), n.hasAttribute(dt), s);
|
|
6463
6475
|
if (i === null) return;
|
|
6464
6476
|
t.preventDefault();
|
|
6465
6477
|
const a = $r(e), o = a.indexOf(n);
|
|
6466
6478
|
a[Math.min(a.length - 1, Math.max(0, o + i))]?.focus({ preventScroll: !1 });
|
|
6467
6479
|
}
|
|
6468
|
-
const
|
|
6480
|
+
const Ul = 3e5, Wl = 1, zl = 1;
|
|
6469
6481
|
function cn(t) {
|
|
6470
6482
|
ee("buffer", "initializePlayback threw", X(t));
|
|
6471
6483
|
}
|
|
6472
|
-
function
|
|
6473
|
-
const r = P(null), s = P(null), [i, a] = $(!1), [o, f] = $(!1), { controlsVisible: c, showControls: d, hideControls: u, setControlsHeld: g } =
|
|
6474
|
-
|
|
6484
|
+
function Gl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
6485
|
+
const r = P(null), s = P(null), [i, a] = $(!1), [o, f] = $(!1), { controlsVisible: c, showControls: d, hideControls: u, setControlsHeld: g } = Ml();
|
|
6486
|
+
Hl(s, c, d, u), F(() => {
|
|
6475
6487
|
const A = () => f(!!document.fullscreenElement);
|
|
6476
6488
|
return document.addEventListener("fullscreenchange", A), () => document.removeEventListener("fullscreenchange", A);
|
|
6477
6489
|
}, []);
|
|
@@ -6482,11 +6494,11 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6482
6494
|
initSegment: m,
|
|
6483
6495
|
audioTracks: p,
|
|
6484
6496
|
contentToken: M
|
|
6485
|
-
} =
|
|
6497
|
+
} = Al(e), R = H((A) => {
|
|
6486
6498
|
if (!M) return null;
|
|
6487
6499
|
const j = t.replace(new RegExp(`/${$t.replace(/\./g, "\\.")}$`), "");
|
|
6488
6500
|
return j === t ? null : { baseUrl: j, token: M, trackId: A };
|
|
6489
|
-
}, [M, t]), w = h !== null && p.length > 0, S = x((A) => A.readiness), L =
|
|
6501
|
+
}, [M, t]), w = h !== null && p.length > 0, S = x((A) => A.readiness), L = Ps(), k = et();
|
|
6490
6502
|
F(() => {
|
|
6491
6503
|
const A = s.current;
|
|
6492
6504
|
if (!A) return;
|
|
@@ -6502,7 +6514,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6502
6514
|
setSelectedAudioIndex: pt,
|
|
6503
6515
|
selectedSubtitleIndex: bt,
|
|
6504
6516
|
setSelectedSubtitleIndex: Gt
|
|
6505
|
-
} =
|
|
6517
|
+
} = Il(n), rt = x((A) => A.mediaPrefs), Ge = x((A) => A.mutedForAutoplay), Rt = x((A) => A.setMutedForAutoplay), Lt = x((A) => A.setSubtitlesEnabled), Kt = x((A) => A.setSubtitleStyle), W = x((A) => A.setPreferredAudioLang), se = rt.subtitlesEnabled, Ee = rt.subtitleStyle, at = xe[_e]?.lang, Na = pe.some((A) => A.lang === "eng"), [Ra, Cn] = $(null), yt = gl({
|
|
6506
6518
|
override: Ra,
|
|
6507
6519
|
globalEnabled: se,
|
|
6508
6520
|
selectedAudioLang: at,
|
|
@@ -6532,7 +6544,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6532
6544
|
const wt = H((A) => {
|
|
6533
6545
|
nt({ isBuffering: A });
|
|
6534
6546
|
}, [nt]), Ln = H((A) => {
|
|
6535
|
-
if (V.current >=
|
|
6547
|
+
if (V.current >= zl) {
|
|
6536
6548
|
yn("phantom-recreate-exhausted", { reason: A, recreates: V.current, mediaId: n });
|
|
6537
6549
|
return;
|
|
6538
6550
|
}
|
|
@@ -6556,7 +6568,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6556
6568
|
})
|
|
6557
6569
|
);
|
|
6558
6570
|
if (await A.ensureBuffered(G, "initial"), A.isDisposed) return;
|
|
6559
|
-
const re =
|
|
6571
|
+
const re = Ds;
|
|
6560
6572
|
await Promise.allSettled(ne);
|
|
6561
6573
|
const J = ce.map(
|
|
6562
6574
|
(z) => z.waitForBuffered(G + $e, re)
|
|
@@ -6566,7 +6578,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6566
6578
|
aheadMs: Math.round(A.getBufferedAheadMs(G)),
|
|
6567
6579
|
targetMs: $e
|
|
6568
6580
|
}), A.isDisposed) return;
|
|
6569
|
-
if (A.getBufferedAheadMs(G) >
|
|
6581
|
+
if (A.getBufferedAheadMs(G) > Ul && A.getLoadedCount() === 0) {
|
|
6570
6582
|
A.dumpBufferDiagnostics(G, "phantom-detected"), N("buffer", "PHANTOM-BUFFER detected at gate — recreating MediaSource", {
|
|
6571
6583
|
gateAheadMs: Math.round(A.getBufferedAheadMs(G)),
|
|
6572
6584
|
loaded: A.getLoadedCount(),
|
|
@@ -6582,7 +6594,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6582
6594
|
totalMs: Ke
|
|
6583
6595
|
});
|
|
6584
6596
|
const Ce = Te ? "gate-pass" : "gate-timeout";
|
|
6585
|
-
A.emitInitDigest("video", Ce), ce.forEach((z, ie) => z.emitInitDigest(`audio:${ie}`, Ce)), v.current || (v.current = !0,
|
|
6597
|
+
A.emitInitDigest("video", Ce), ce.forEach((z, ie) => z.emitInitDigest(`audio:${ie}`, Ce)), v.current || (v.current = !0, Bs(n));
|
|
6586
6598
|
let Y = G;
|
|
6587
6599
|
if (j && Y > 0) {
|
|
6588
6600
|
const z = j.buffered;
|
|
@@ -6592,7 +6604,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6592
6604
|
}
|
|
6593
6605
|
j.currentTime = Y / 1e3, await Aa(j, 3e3);
|
|
6594
6606
|
}
|
|
6595
|
-
tt.current = Y, a(!0), C.current = !0, U.current = 0, lr() && N("buffer", "RECOVERY-SUCCESS — playback initialized after an auto-reload", { mediaId: n }),
|
|
6607
|
+
tt.current = Y, a(!0), C.current = !0, U.current = 0, lr() && N("buffer", "RECOVERY-SUCCESS — playback initialized after an auto-reload", { mediaId: n }), bl(), _("buffer", "initializePlayback complete", {
|
|
6596
6608
|
mediaId: n,
|
|
6597
6609
|
startMs: G,
|
|
6598
6610
|
seekMs: Y,
|
|
@@ -6657,7 +6669,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6657
6669
|
return;
|
|
6658
6670
|
}
|
|
6659
6671
|
const re = ne.includes("SourceBuffer is full"), J = ne.includes("init segment failed");
|
|
6660
|
-
U.current += 1, re || J || U.current >
|
|
6672
|
+
U.current += 1, re || J || U.current > Wl ? (ee("buffer", "Initialize playback failed — recreating MediaSource", {
|
|
6661
6673
|
error: ne,
|
|
6662
6674
|
mediaId: n,
|
|
6663
6675
|
attempt: U.current,
|
|
@@ -6705,12 +6717,12 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6705
6717
|
O.current = Te;
|
|
6706
6718
|
const Ke = ++ze.current;
|
|
6707
6719
|
window.__FRAGMENT_MANAGER__ = Te, window.__AUDIO_FRAGMENT_MANAGERS__ = I.current;
|
|
6708
|
-
const Ce = new
|
|
6720
|
+
const Ce = new vl({
|
|
6709
6721
|
videoRef: r,
|
|
6710
6722
|
fragmentManagerRef: O,
|
|
6711
6723
|
audioFragmentManagersRef: I
|
|
6712
6724
|
});
|
|
6713
|
-
Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce,
|
|
6725
|
+
Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce, kl();
|
|
6714
6726
|
const Y = r.current, qe = () => {
|
|
6715
6727
|
const z = Y?.error;
|
|
6716
6728
|
z && (ee("video", `Media error code=${z.code}: ${z.message}`, {
|
|
@@ -6776,7 +6788,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6776
6788
|
}
|
|
6777
6789
|
};
|
|
6778
6790
|
return Y && (J.addEventListener("sourceopen", Ne, { once: !0 }), re = URL.createObjectURL(J), Y.src = re, Y.addEventListener("error", qe)), () => {
|
|
6779
|
-
Y?.pause(), Y && Y.removeEventListener("error", qe), J.removeEventListener("sourceopen", Ne),
|
|
6791
|
+
Y?.pause(), Y && Y.removeEventListener("error", qe), J.removeEventListener("sourceopen", Ne), Sl(), Ce.dispose(), Se.current = null, Te.dispose(), O.current = null, window.__FRAGMENT_MANAGER__ = null, window.__AUDIO_FRAGMENT_MANAGERS__ = null;
|
|
6780
6792
|
for (const z of I.current) z.dispose();
|
|
6781
6793
|
if (I.current = [], J.readyState === "open") {
|
|
6782
6794
|
for (const z of [D.current, ...K.current])
|
|
@@ -6893,9 +6905,9 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6893
6905
|
ke.current = !1;
|
|
6894
6906
|
}
|
|
6895
6907
|
})().catch((ne) => ee("audio", "MSE audio swap failed", X(ne)));
|
|
6896
|
-
}, [w, i, _e, p, n, t, wt, R]),
|
|
6897
|
-
const { stopPrefetch: Fn } =
|
|
6898
|
-
|
|
6908
|
+
}, [w, i, _e, p, n, t, wt, R]), Pl(Se, r, tt, i, Ft, Nn), Ll(r, O, Se, i, Nn, I), jl(r, Se, n, y ?? 0, i, Ft);
|
|
6909
|
+
const { stopPrefetch: Fn } = $l(r, O, Se, i, nt, I);
|
|
6910
|
+
Dl(O), F(() => {
|
|
6899
6911
|
Ct.current = Fn;
|
|
6900
6912
|
}, [Fn]);
|
|
6901
6913
|
const Oa = H(() => {
|
|
@@ -6926,7 +6938,7 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6926
6938
|
}
|
|
6927
6939
|
),
|
|
6928
6940
|
/* @__PURE__ */ l(
|
|
6929
|
-
|
|
6941
|
+
Gf,
|
|
6930
6942
|
{
|
|
6931
6943
|
subtitleUrl: Ha,
|
|
6932
6944
|
videoRef: r,
|
|
@@ -6934,9 +6946,9 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6934
6946
|
enabled: yt
|
|
6935
6947
|
}
|
|
6936
6948
|
),
|
|
6937
|
-
/* @__PURE__ */ l(
|
|
6949
|
+
/* @__PURE__ */ l(rl, { mediaId: n, visible: c }),
|
|
6938
6950
|
/* @__PURE__ */ l(
|
|
6939
|
-
|
|
6951
|
+
Jf,
|
|
6940
6952
|
{
|
|
6941
6953
|
videoRef: r,
|
|
6942
6954
|
mediaId: n,
|
|
@@ -6984,14 +6996,14 @@ function Hl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
|
|
|
6984
6996
|
}
|
|
6985
6997
|
);
|
|
6986
6998
|
}
|
|
6987
|
-
function
|
|
6999
|
+
function Kl() {
|
|
6988
7000
|
const t = x((n) => n.snapshot.mediaId), e = ye(() => t ? { mediaId: t, ...Rr(t) } : null, [t]);
|
|
6989
|
-
return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(
|
|
7001
|
+
return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Gl, { mediaUrl: e.mediaUrl, indexUrl: e.indexUrl, mediaId: e.mediaId }) }) : /* @__PURE__ */ l(Hs, {});
|
|
6990
7002
|
}
|
|
6991
|
-
const
|
|
6992
|
-
const e =
|
|
7003
|
+
const ql = (t) => {
|
|
7004
|
+
const e = Ys(t);
|
|
6993
7005
|
return e.render(
|
|
6994
|
-
/* @__PURE__ */ l(
|
|
7006
|
+
/* @__PURE__ */ l(Os.Provider, { value: js(), children: /* @__PURE__ */ l(Kl, {}) })
|
|
6995
7007
|
), {
|
|
6996
7008
|
update() {
|
|
6997
7009
|
},
|
|
@@ -7002,21 +7014,21 @@ const Wl = (t) => {
|
|
|
7002
7014
|
queueMicrotask(() => e.unmount());
|
|
7003
7015
|
}
|
|
7004
7016
|
};
|
|
7005
|
-
},
|
|
7017
|
+
}, Vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7006
7018
|
__proto__: null,
|
|
7007
|
-
mount:
|
|
7008
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7019
|
+
mount: ql
|
|
7020
|
+
}, Symbol.toStringTag, { value: "Module" })), Jl = {
|
|
7009
7021
|
id: "player",
|
|
7010
7022
|
name: "Media player",
|
|
7011
|
-
load: () => Promise.resolve(
|
|
7012
|
-
},
|
|
7013
|
-
function
|
|
7023
|
+
load: () => Promise.resolve(Vl)
|
|
7024
|
+
}, Ql = vn(() => import("./MediaDrawer-BSqgbHWw.js"));
|
|
7025
|
+
function Yl() {
|
|
7014
7026
|
const t = x((d) => d.snapshot), e = x((d) => d.ensureAutoIdentity), n = zt(), r = ye(
|
|
7015
|
-
() => n ?
|
|
7027
|
+
() => n ? Ei(n, window.location.origin) : null,
|
|
7016
7028
|
[n]
|
|
7017
|
-
), s =
|
|
7018
|
-
|
|
7019
|
-
f &&
|
|
7029
|
+
), s = Us(), i = P(!1), [a, o] = $(!1), f = s.roomKey || null;
|
|
7030
|
+
mf(), F(() => gf(), []), F(() => yf(), []), F(() => {
|
|
7031
|
+
f && Sf(f);
|
|
7020
7032
|
}, [f]), F(() => {
|
|
7021
7033
|
const d = () => o(!0);
|
|
7022
7034
|
return window.addEventListener(hn, d), () => window.removeEventListener(hn, d);
|
|
@@ -7028,9 +7040,9 @@ function ql() {
|
|
|
7028
7040
|
try {
|
|
7029
7041
|
await Promise.race([
|
|
7030
7042
|
Promise.all([
|
|
7031
|
-
Us(),
|
|
7032
7043
|
Ws(),
|
|
7033
|
-
zs()
|
|
7044
|
+
zs(),
|
|
7045
|
+
Gs().then(Ir)
|
|
7034
7046
|
]),
|
|
7035
7047
|
new Promise((y) => setTimeout(y, u))
|
|
7036
7048
|
]);
|
|
@@ -7041,7 +7053,7 @@ function ql() {
|
|
|
7041
7053
|
const g = x.getState();
|
|
7042
7054
|
_("room", "Joining room", { roomKey: f, name: g.name, sprite: g.sprite }), e();
|
|
7043
7055
|
const b = x.getState();
|
|
7044
|
-
|
|
7056
|
+
Ks({
|
|
7045
7057
|
room_key: f,
|
|
7046
7058
|
name: b.name || void 0,
|
|
7047
7059
|
sprite: b.sprite || void 0
|
|
@@ -7055,52 +7067,53 @@ function ql() {
|
|
|
7055
7067
|
}
|
|
7056
7068
|
return f ? /* @__PURE__ */ E("div", { className: "relative flex-1 flex overflow-hidden min-h-0", children: [
|
|
7057
7069
|
/* @__PURE__ */ E("div", { className: "flex-1 relative bg-black overflow-hidden min-w-0", children: [
|
|
7058
|
-
/* @__PURE__ */ l(Gn, { activity:
|
|
7070
|
+
/* @__PURE__ */ l(Gn, { activity: Jl, roomKey: t.roomId ?? "", layer: "base" }),
|
|
7059
7071
|
r && t.roomId && /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Gn, { activity: r, roomKey: t.roomId, layer: "overlay" }, r.id) }),
|
|
7060
|
-
/* @__PURE__ */ E(
|
|
7061
|
-
/* @__PURE__ */ l(
|
|
7062
|
-
/* @__PURE__ */ l(
|
|
7063
|
-
/* @__PURE__ */ l(
|
|
7064
|
-
/* @__PURE__ */ l(
|
|
7072
|
+
/* @__PURE__ */ E(of, { children: [
|
|
7073
|
+
/* @__PURE__ */ l(Xl, {}),
|
|
7074
|
+
/* @__PURE__ */ l(nf, {}),
|
|
7075
|
+
/* @__PURE__ */ l(lf, {}),
|
|
7076
|
+
/* @__PURE__ */ l(sf, {})
|
|
7065
7077
|
] })
|
|
7066
7078
|
] }),
|
|
7067
|
-
/* @__PURE__ */ l(
|
|
7068
|
-
/* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l(
|
|
7079
|
+
/* @__PURE__ */ l(jo, {}),
|
|
7080
|
+
/* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l(zo, { open: a, onClose: c }), children: /* @__PURE__ */ l(Ql, { open: a, onClose: c }) })
|
|
7069
7081
|
] }) : (N("room", "No room key provided"), /* @__PURE__ */ l("div", { className: "flex-1 flex items-center justify-center p-6", children: /* @__PURE__ */ E("div", { className: "text-text-secondary", children: [
|
|
7070
7082
|
"No room key provided. Go to the ",
|
|
7071
7083
|
/* @__PURE__ */ l("a", { href: "/", className: "underline", children: "home page" }),
|
|
7072
7084
|
" to select a room."
|
|
7073
7085
|
] }) }));
|
|
7074
7086
|
}
|
|
7075
|
-
function
|
|
7087
|
+
function Xl() {
|
|
7076
7088
|
const t = x((s) => s.floatingChatEnabled), e = x((s) => s.chatCollapsed), n = x((s) => !!s.snapshot.mediaId), r = It();
|
|
7077
7089
|
return /* @__PURE__ */ l(
|
|
7078
|
-
|
|
7090
|
+
qo,
|
|
7079
7091
|
{
|
|
7080
|
-
shown:
|
|
7092
|
+
shown: _i(t, { hasMedia: n, chatCollapsed: e, isFullscreen: r }),
|
|
7081
7093
|
className: "absolute right-4 bottom-[35%] w-80 z-20"
|
|
7082
7094
|
}
|
|
7083
7095
|
);
|
|
7084
7096
|
}
|
|
7085
|
-
const
|
|
7097
|
+
const dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7086
7098
|
__proto__: null,
|
|
7087
|
-
default:
|
|
7099
|
+
default: Yl
|
|
7088
7100
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7089
7101
|
export {
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7102
|
+
lc as B,
|
|
7103
|
+
no as C,
|
|
7104
|
+
Wo as D,
|
|
7105
|
+
ao as E,
|
|
7106
|
+
Ji as P,
|
|
7107
|
+
dc as R,
|
|
7108
|
+
ic as S,
|
|
7109
|
+
Uo as a,
|
|
7110
|
+
oc as b,
|
|
7111
|
+
xf as c,
|
|
7112
|
+
fc as d,
|
|
7100
7113
|
et as e,
|
|
7101
7114
|
We as i,
|
|
7102
7115
|
zr as p,
|
|
7103
|
-
|
|
7116
|
+
cc as s,
|
|
7104
7117
|
_n as u
|
|
7105
7118
|
};
|
|
7106
|
-
//# sourceMappingURL=Room-
|
|
7119
|
+
//# sourceMappingURL=Room-BqP-6mZY.js.map
|