@hadoku/watchparty-ui 0.45.104 → 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.
@@ -1,19 +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, D as vt, t as N, v as rs, x as as, y as ss, z as Sr, B as xr, E as Er, F as is, L as os, G as fs, H as vn, I as ls, J as cs, K as ds, N as Mr, O as kn, P as _r, Q as Tr, R as us, T as hs, U as $e, V as $n, W as Vt, X as ms, Y as Ar, Z as gs, _ as ps, $ as bs, a0 as Ir, a1 as ys, a2 as X, a3 as ws, a4 as Cr, a5 as Nr, a6 as ut, a7 as vs, a8 as ks, a9 as Ss, aa as xs, ab as Es, ac as Pn, ad as st, ae as Ms, af as Dn, ag as _s, ah as Ts, ai as Bn, aj as As, ak as Is, al as Cs, am as Ns, an as Rs, ao as On, ap as jn, aq as Ls, ar as Rr, as as Hn, at as Fs, au as $t, av as $s, 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 } from "./index-DlwQHczp.js";
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 Ks, useHadokuThemeOptional as qs } from "@wolffm/themes";
6
- import { HadokuThemePicker as Vs, ConnectedSettings as Js } from "@wolffm/task-ui-components";
7
- import { createRoot as Qs } from "react-dom/client";
8
- const Ys = "output/fmp4/youtube", Xs = /^(.*) \[([A-Za-z0-9_-]{11})\]$/;
9
- function Zs(t) {
10
- const e = `${Ys}/`;
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
11
  if (!t.startsWith(e))
12
12
  return null;
13
- const n = Xs.exec(t.slice(e.length));
13
+ const n = Zs.exec(t.slice(e.length));
14
14
  return n ? n[1] : null;
15
15
  }
16
- function ei(t) {
16
+ function ti(t) {
17
17
  return t.kind === "file";
18
18
  }
19
19
  class Lr extends Error {
@@ -41,42 +41,42 @@ function Bt(t) {
41
41
  return "Image upload failed";
42
42
  }
43
43
  }
44
- function ti(t) {
44
+ function ni(t) {
45
45
  return t instanceof Mt ? Bt(t.reason) : t instanceof Lr ? t.message : "Image upload failed";
46
46
  }
47
- function ni(t) {
47
+ function ri(t) {
48
48
  const e = t.type.toLowerCase().split(";")[0].trim();
49
49
  return e && za(e) !== "image" ? Bt("unsupported-type") : t.size > Ga.image ? Bt("too-large") : t.size === 0 ? Bt("invalid") : null;
50
50
  }
51
- function ri(t) {
51
+ function ai(t) {
52
52
  return qa(t);
53
53
  }
54
- function ai(t) {
54
+ function si(t) {
55
55
  return Va(t);
56
56
  }
57
- async function si(t) {
57
+ async function ii(t) {
58
58
  const e = await Ka(t);
59
59
  return { w: e?.width ?? 0, h: e?.height ?? 0 };
60
60
  }
61
- async function ii(t, e = {}) {
61
+ async function oi(t, e = {}) {
62
62
  const n = await wn().upload(t, { signal: e.signal });
63
63
  if (!Ja(n.key))
64
64
  throw new Lr("Image upload returned an unusable key");
65
65
  return { key: n.key, deduplicated: n.deduplicated === !0 };
66
66
  }
67
- async function oi(t, e = {}) {
67
+ async function fi(t, e = {}) {
68
68
  const n = [];
69
69
  for (const r of t) {
70
70
  if (r.kind === "remote") {
71
71
  n.push({ key: r.key, w: r.w, h: r.h, ...r.title ? { title: r.title } : {} });
72
72
  continue;
73
73
  }
74
- const { key: s } = await ii(r.file, e);
74
+ const { key: s } = await oi(r.file, e);
75
75
  n.push({ key: s, w: r.w, h: r.h });
76
76
  }
77
77
  return n;
78
78
  }
79
- function fi(t) {
79
+ function li(t) {
80
80
  return {
81
81
  error: t instanceof Error ? t.message : String(t),
82
82
  name: t instanceof Error ? t.name : typeof t,
@@ -84,14 +84,14 @@ function fi(t) {
84
84
  status: t instanceof Mt ? t.status : void 0
85
85
  };
86
86
  }
87
- function li(t) {
87
+ function ci(t) {
88
88
  const e = P(t);
89
89
  return F(() => {
90
90
  e.current = t;
91
91
  }), [e, `${t.cdnBase}|${t.uploadPath}`];
92
92
  }
93
- function ci(t, e, n, r = {}) {
94
- const { limit: s, debounceMs: i = Qa } = r, [a, o] = li(t), [f, c] = $([]), [d, u] = $(null), [g, b] = $(!1), [y, h] = $(null), [m, p] = $(0), M = P(null);
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);
95
95
  F(() => {
96
96
  p(0), u(null);
97
97
  }, [n, e]), F(() => {
@@ -138,7 +138,7 @@ function ci(t, e, n, r = {}) {
138
138
  function We(t) {
139
139
  return t.key === "Escape" || t.key === "GoBack" || t.key === "BrowserBack" || t.key === "XF86Back" || t.keyCode === 461 || t.keyCode === 10009;
140
140
  }
141
- const di = /* @__PURE__ */ new Set([
141
+ const ui = /* @__PURE__ */ new Set([
142
142
  "Enter",
143
143
  " ",
144
144
  "ArrowLeft",
@@ -148,15 +148,15 @@ const di = /* @__PURE__ */ new Set([
148
148
  "MediaPlayPause",
149
149
  "Select"
150
150
  ]);
151
- function ui(t) {
151
+ function hi(t) {
152
152
  const { key: e, back: n, modifier: r, barVisible: s, focus: i } = t;
153
153
  if (r || i === "text") return "ignore";
154
154
  if (i === "elsewhere") return n ? "ignore" : "show";
155
155
  if (n) return i === "bar" && s ? "leave-bar" : "ignore";
156
- const a = di.has(e);
156
+ const a = ui.has(e);
157
157
  return i === "bar" ? !s && a ? "wake" : "show" : a ? "enter-bar" : "show";
158
158
  }
159
- function hi(t, e, n = !1, r = { atStart: !1, atEnd: !1 }) {
159
+ function mi(t, e, n = !1, r = { atStart: !1, atEnd: !1 }) {
160
160
  const s = t === "ArrowLeft" ? -1 : t === "ArrowRight" ? 1 : null, i = t === "ArrowUp" ? -1 : t === "ArrowDown" ? 1 : null;
161
161
  switch (e) {
162
162
  case "range":
@@ -177,9 +177,9 @@ const dt = "data-remote-engaged";
177
177
  function Fr(t) {
178
178
  return t instanceof HTMLSelectElement ? "select" : t instanceof HTMLInputElement ? t.type === "range" ? "range" : "text" : t instanceof HTMLTextAreaElement ? "text" : "button";
179
179
  }
180
- const mi = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
180
+ const gi = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
181
181
  function $r(t) {
182
- return Array.from(t.querySelectorAll(mi)).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0);
182
+ return Array.from(t.querySelectorAll(gi)).filter((e) => e.tabIndex >= 0 && e.getClientRects().length > 0);
183
183
  }
184
184
  function Pr(t) {
185
185
  const e = $r(t);
@@ -188,17 +188,17 @@ function Pr(t) {
188
188
  function Dr(t) {
189
189
  return t ? t instanceof HTMLTextAreaElement ? !0 : t instanceof HTMLInputElement ? !["range", "checkbox", "radio", "button", "submit"].includes(t.type) : t.isContentEditable === !0 : !1;
190
190
  }
191
- const un = 240, Je = 8, gi = 28, Br = 240;
192
- function pi(t, e, n) {
191
+ const un = 240, Je = 8, pi = 28, Br = 240;
192
+ function bi(t, e, n) {
193
193
  let r = e.left - un - Je;
194
194
  r < Je && (r = e.right + Je), r = Math.min(r, n.width - un - Je), r = Math.max(Je, r);
195
- const s = Br + gi;
195
+ const s = Br + pi;
196
196
  let i = t.top + t.height / 2 - s / 2;
197
197
  return i = Math.min(i, n.height - s - Je), i = Math.max(Je, i), { left: r, top: i };
198
198
  }
199
- const Or = "/dataplatform/api/memes", bi = 120;
200
- function yi({ 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 } = ci(
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(
202
202
  f,
203
203
  Or,
204
204
  s.trim()
@@ -215,12 +215,12 @@ function yi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
215
215
  if (!B) return;
216
216
  const O = () => p({
217
217
  item: v,
218
- ...pi(C.getBoundingClientRect(), B.getBoundingClientRect(), {
218
+ ...bi(C.getBoundingClientRect(), B.getBoundingClientRect(), {
219
219
  width: window.innerWidth,
220
220
  height: window.innerHeight
221
221
  })
222
222
  });
223
- R(), D ? O() : M.current = window.setTimeout(O, bi);
223
+ R(), D ? O() : M.current = window.setTimeout(O, yi);
224
224
  },
225
225
  [R]
226
226
  );
@@ -367,18 +367,18 @@ function yi({ onClose: t, onPick: e, onUnavailable: n, toggle: r }) {
367
367
  );
368
368
  }
369
369
  function jr({ open: t, ...e }) {
370
- return t ? /* @__PURE__ */ l(yi, { ...e }) : null;
370
+ return t ? /* @__PURE__ */ l(wi, { ...e }) : null;
371
371
  }
372
- function wi(t) {
372
+ function vi(t) {
373
373
  return typeof t == "object" && t !== null && typeof t.mount == "function";
374
374
  }
375
- function vi(t) {
375
+ function ki(t) {
376
376
  if (typeof t != "object" || t === null)
377
377
  return !1;
378
378
  const e = t;
379
379
  return typeof e.unmount == "function" && typeof e.update == "function" && (e.mountSettings === void 0 || typeof e.mountSettings == "function");
380
380
  }
381
- function ki(t) {
381
+ function Si(t) {
382
382
  if (!t.startsWith("/") || t.startsWith("//") || /[\\\s]/.test(t) || [...t].some((e) => e.charCodeAt(0) < 32 || e.charCodeAt(0) === 127))
383
383
  return !1;
384
384
  try {
@@ -387,21 +387,21 @@ function ki(t) {
387
387
  return !1;
388
388
  }
389
389
  }
390
- function Si(t, e) {
391
- if (!ki(t))
390
+ function xi(t, e) {
391
+ if (!Si(t))
392
392
  return null;
393
393
  const n = new URL(t, e);
394
394
  return n.origin === e ? n.href : null;
395
395
  }
396
- function xi(t, e) {
397
- const n = Si(t.url, e);
396
+ function Ei(t, e) {
397
+ const n = xi(t.url, e);
398
398
  return { id: t.id, name: t.name, load: n ? () => import(
399
399
  /* @vite-ignore */
400
400
  n
401
401
  ) : null };
402
402
  }
403
403
  const it = (t) => t instanceof Error ? t.message : String(t);
404
- function Ei(t) {
404
+ function Mi(t) {
405
405
  let e = t.ctx, n = null, r = !1, s = !1;
406
406
  const i = /* @__PURE__ */ new Set(), a = (g, b) => t.onSettingsError?.(g, b), o = (g) => {
407
407
  if (i.delete(g))
@@ -445,7 +445,7 @@ function Ei(t) {
445
445
  }
446
446
  if (r)
447
447
  return;
448
- if (!wi(g)) {
448
+ if (!vi(g)) {
449
449
  d("the game module does not export mount()");
450
450
  return;
451
451
  }
@@ -457,7 +457,7 @@ function Ei(t) {
457
457
  d(`the game failed to start: ${it(h)}`, h);
458
458
  return;
459
459
  }
460
- if (!vi(y)) {
460
+ if (!ki(y)) {
461
461
  d("the game's mount() did not return { unmount, update }");
462
462
  return;
463
463
  }
@@ -526,7 +526,7 @@ function It() {
526
526
  function Ut(t) {
527
527
  return t.hasMedia && (t.chatCollapsed || t.isFullscreen);
528
528
  }
529
- function Mi(t, e) {
529
+ function _i(t, e) {
530
530
  return t && Ut(e);
531
531
  }
532
532
  function Sn(t) {
@@ -535,7 +535,7 @@ function Sn(t) {
535
535
  function Wr(t) {
536
536
  return t.hasMedia ? t.gameOverlay && !t.isFullscreen ? "room-corner" : "control-bar" : "none";
537
537
  }
538
- function _i(t, e) {
538
+ function Ti(t, e) {
539
539
  if (e.clientId) {
540
540
  const n = t[e.clientId];
541
541
  if (n && (!e.author || !n.author || n.author === e.author)) return n;
@@ -545,7 +545,7 @@ function _i(t, e) {
545
545
  }
546
546
  }
547
547
  function zr(t, e, n) {
548
- const r = _i(t, e);
548
+ const r = Ti(t, e);
549
549
  return r ? {
550
550
  name: r.name || n.name,
551
551
  // A connection briefly without a character (a reconnect waiting for one to
@@ -556,16 +556,16 @@ function zr(t, e, n) {
556
556
  here: !0
557
557
  } : { name: n.name, sprite: n.sprite, pictureUrl: n.pictureUrl, here: !1 };
558
558
  }
559
- function Ti(t, e, n) {
559
+ function Ai(t, e, n) {
560
560
  return !e || !n.here ? t : e.split(yr).join(n.name);
561
561
  }
562
562
  function Wt(t, e) {
563
563
  const n = x((r) => JSON.stringify(zr(r.roster, t, e)));
564
564
  return ye(() => JSON.parse(n), [n]);
565
565
  }
566
- const Ai = pr(!0);
566
+ const Ii = pr(!0);
567
567
  function Gr() {
568
- const t = gr(Ai);
568
+ const t = gr(Ii);
569
569
  F(() => {
570
570
  t && Xa();
571
571
  }, [t]);
@@ -579,7 +579,7 @@ const Tt = Ze.memo(
579
579
  },
580
580
  (t, e) => t.html === e.html && t.as === e.as && t.className === e.className && JSON.stringify(t.style) === JSON.stringify(e.style)
581
581
  );
582
- function Ii(t, e) {
582
+ function Ci(t, e) {
583
583
  F(() => {
584
584
  const n = t.current;
585
585
  if (!n || !e || typeof IntersectionObserver > "u") return;
@@ -606,14 +606,14 @@ function qr({ sprite: t, url: e, alt: n, worn: r }) {
606
606
  r?.overlay && /* @__PURE__ */ l(Tt, { html: Za(r), style: { display: "contents" } })
607
607
  ] });
608
608
  }
609
- function Ci(t) {
609
+ function Ni(t) {
610
610
  return !(t.button !== 0 || t.ctrlKey || t.metaKey || t.shiftKey || t.altKey);
611
611
  }
612
- const Ni = pr(null);
612
+ const Ri = pr(null);
613
613
  function Vr() {
614
- return gr(Ni);
614
+ return gr(Ri);
615
615
  }
616
- function Ri({ src: t, title: e, onClose: n }) {
616
+ function Li({ src: t, title: e, onClose: n }) {
617
617
  F(() => {
618
618
  const i = (a) => {
619
619
  We(a) && (a.stopPropagation(), n());
@@ -659,11 +659,11 @@ function Ri({ src: t, title: e, onClose: n }) {
659
659
  s
660
660
  ) : null;
661
661
  }
662
- const Jt = 240, Li = 320;
663
- function Fi({ image: t }) {
662
+ const Jt = 240, Fi = 320;
663
+ function $i({ image: t }) {
664
664
  const [e, n] = $(!1), r = Ot(t.key);
665
665
  if (!r) return null;
666
- const s = t.w > 0 && t.h > 0, i = s ? Math.min(1, Li / t.w, Jt / t.h) : 1;
666
+ const s = t.w > 0 && t.h > 0, i = s ? Math.min(1, Fi / t.w, Jt / t.h) : 1;
667
667
  return /* @__PURE__ */ E(he, { children: [
668
668
  /* @__PURE__ */ l(
669
669
  "a",
@@ -674,7 +674,7 @@ function Fi({ image: t }) {
674
674
  className: "block max-w-full cursor-zoom-in",
675
675
  "data-testid": "chat-image",
676
676
  onClick: (a) => {
677
- Ci(a) && (a.preventDefault(), n(!0));
677
+ Ni(a) && (a.preventDefault(), n(!0));
678
678
  },
679
679
  children: /* @__PURE__ */ l(
680
680
  "img",
@@ -692,7 +692,7 @@ function Fi({ image: t }) {
692
692
  }
693
693
  ),
694
694
  e && /* @__PURE__ */ l(
695
- Ri,
695
+ Li,
696
696
  {
697
697
  src: r,
698
698
  title: t.title,
@@ -702,12 +702,12 @@ function Fi({ image: t }) {
702
702
  ] });
703
703
  }
704
704
  function Jr({ images: t }) {
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(Fi, { image: e }, `${e.key}-${n}`)) }) : null;
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;
706
706
  }
707
- function $i(t, e) {
707
+ function Pi(t, e) {
708
708
  return t.author && e.author ? t.author === e.author : !!e.clientId && t.clientId === e.clientId;
709
709
  }
710
- const Pi = [
710
+ const Di = [
711
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" },
712
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" },
713
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" },
@@ -718,13 +718,13 @@ const Pi = [
718
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" },
719
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" }
720
720
  ];
721
- function Di(t) {
721
+ function Bi(t) {
722
722
  const e = t.indexOf(":"), n = t.slice(0, e);
723
723
  return { char: String.fromCodePoint(...n.split("-").map((r) => parseInt(r, 16))), name: t.slice(e + 1) };
724
724
  }
725
725
  let Un = null;
726
726
  function xn() {
727
- return Un ??= Pi.map((t) => ({ id: t.id, label: t.label, emoji: t.data.split("|").map(Di) })), Un;
727
+ return Un ??= Di.map((t) => ({ id: t.id, label: t.label, emoji: t.data.split("|").map(Bi) })), Un;
728
728
  }
729
729
  let Qe = null;
730
730
  function jt(t) {
@@ -738,7 +738,7 @@ function jt(t) {
738
738
  }
739
739
  return Qe.get(t) ?? Qe.get(t.replace(/\ufe0f/g, ""));
740
740
  }
741
- function Bi(t, e = 120) {
741
+ function Oi(t, e = 120) {
742
742
  const n = t.toLowerCase().trim().split(/\s+/).filter(Boolean);
743
743
  if (!n.length) return [];
744
744
  const s = xn().flatMap((o) => o.emoji).filter((o) => {
@@ -751,7 +751,7 @@ function Bi(t, e = 120) {
751
751
  };
752
752
  return s.sort((o, f) => a(o) - a(f)), s.slice(0, e);
753
753
  }
754
- const Oi = [
754
+ const ji = [
755
755
  [128077],
756
756
  [10084, 65039],
757
757
  [128514],
@@ -769,20 +769,20 @@ function En() {
769
769
  return [];
770
770
  }
771
771
  }
772
- function ji(t) {
772
+ function Hi(t) {
773
773
  const e = [t, ...En().filter((n) => n !== t)].slice(0, Qr);
774
774
  ts(wr.RECENT_EMOJI, JSON.stringify(e));
775
775
  }
776
- function Hi(t = 3) {
776
+ function Ui(t = 3) {
777
777
  const e = [];
778
- for (const n of [...En(), ...Oi])
778
+ for (const n of [...En(), ...ji])
779
779
  if (e.includes(n) || e.push(n), e.length === t) break;
780
780
  return e;
781
781
  }
782
782
  function Yr(t, e) {
783
783
  return t.by.some((n) => n === e.author || !!e.clientId && n === e.clientId);
784
784
  }
785
- function Ui(t, e, n) {
785
+ function Wi(t, e, n) {
786
786
  const r = /* @__PURE__ */ new Map();
787
787
  for (const o of Object.values(e))
788
788
  o.author && r.set(o.author, o.name), r.set(o.clientId, o.name);
@@ -798,16 +798,16 @@ function Ui(t, e, n) {
798
798
  }
799
799
  return i && s.unshift("You"), a && s.push(a === 1 ? "1 other" : `${a} others`), s;
800
800
  }
801
- function Wi(t, e) {
801
+ function zi(t, e) {
802
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"}`;
803
803
  }
804
804
  const Ie = 8;
805
- function zi(t) {
805
+ function Gi(t) {
806
806
  return document.addEventListener("fullscreenchange", t), () => document.removeEventListener("fullscreenchange", t);
807
807
  }
808
808
  function Xr() {
809
809
  const t = Vr();
810
- return Wa(zi, () => document.fullscreenElement, () => null) ?? t ?? document.body;
810
+ return Wa(Gi, () => document.fullscreenElement, () => null) ?? t ?? document.body;
811
811
  }
812
812
  function Zr({
813
813
  anchor: t,
@@ -872,7 +872,7 @@ function Zr({
872
872
  u
873
873
  );
874
874
  }
875
- function Gi({ anchor: t, width: e, children: n }) {
875
+ function Ki({ anchor: t, width: e, children: n }) {
876
876
  const r = Xr(), [s, i] = $(null);
877
877
  return dn(() => {
878
878
  if (!t) return;
@@ -888,12 +888,12 @@ function Gi({ anchor: t, width: e, children: n }) {
888
888
  r
889
889
  ) : null;
890
890
  }
891
- const Ki = 340;
892
- function qi({ anchor: t, onPick: e, onClose: n }) {
891
+ const qi = 340;
892
+ function Vi({ anchor: t, onPick: e, onClose: n }) {
893
893
  const [r, s] = $(""), [i, a] = $(null), o = P(null), f = P(null), c = ye(() => xn(), []), d = ye(
894
894
  () => En().map((m) => jt(m) ?? { char: m, name: "" }).slice(0, 16),
895
895
  []
896
- ), u = ye(() => Bi(r), [r]), g = r.trim().length > 0;
896
+ ), u = ye(() => Oi(r), [r]), g = r.trim().length > 0;
897
897
  F(() => {
898
898
  o.current?.focus({ preventScroll: !0 });
899
899
  }, []);
@@ -916,7 +916,7 @@ function qi({ anchor: t, onPick: e, onClose: n }) {
916
916
  },
917
917
  p
918
918
  );
919
- return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width: Ki, className: "emoji-picker", ariaLabel: "Emoji picker", testId: "emoji-picker", children: [
919
+ return /* @__PURE__ */ E(Zr, { anchor: t, onClose: n, width: qi, className: "emoji-picker", ariaLabel: "Emoji picker", testId: "emoji-picker", children: [
920
920
  /* @__PURE__ */ l("div", { className: "emoji-picker-search", children: /* @__PURE__ */ l(
921
921
  "input",
922
922
  {
@@ -957,43 +957,43 @@ function qi({ anchor: t, onPick: e, onClose: n }) {
957
957
  ] }) : null })
958
958
  ] });
959
959
  }
960
- function sc({ className: t = "w-5 h-5" }) {
960
+ function ic({ className: t = "w-5 h-5" }) {
961
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" }) });
962
962
  }
963
- function Vi({ className: t = "w-5 h-5" }) {
963
+ function Ji({ className: t = "w-5 h-5" }) {
964
964
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M8 5v14l11-7z" }) });
965
965
  }
966
- function Ji({ className: t = "w-5 h-5" }) {
966
+ function Qi({ className: t = "w-5 h-5" }) {
967
967
  return /* @__PURE__ */ l("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "M6 19h4V5H6v14zm8-14v14h4V5h-4z" }) });
968
968
  }
969
- function Qi({ className: t = "w-5 h-5" }) {
969
+ function Yi({ className: t = "w-5 h-5" }) {
970
970
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
971
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" }),
972
972
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2" })
973
973
  ] });
974
974
  }
975
- function Yi({ className: t = "w-5 h-5" }) {
975
+ function Xi({ className: t = "w-5 h-5" }) {
976
976
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
977
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" }),
978
978
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.536 8.464a5 5 0 010 7.072" })
979
979
  ] });
980
980
  }
981
- function Xi({ className: t = "w-5 h-5" }) {
981
+ function Zi({ className: t = "w-5 h-5" }) {
982
982
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
983
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" }),
984
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" })
985
985
  ] });
986
986
  }
987
- function Zi({ className: t = "w-5 h-5" }) {
987
+ function eo({ className: t = "w-5 h-5" }) {
988
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" }) });
989
989
  }
990
- function eo({ 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: "M9 9V4H4m0 0l5 5M9 15v5H4m0 0l5-5M15 9V4h5m0 0l-5 5M15 15v5h5m0 0l-5-5" }) });
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" }) });
992
992
  }
993
993
  function ea({ className: t = "w-5 h-5" }) {
994
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" }) });
995
995
  }
996
- function to({ className: t = "w-5 h-5" }) {
996
+ function no({ className: t = "w-5 h-5" }) {
997
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" }) });
998
998
  }
999
999
  function ta({ className: t = "w-4 h-4" }) {
@@ -1002,7 +1002,7 @@ function ta({ className: t = "w-4 h-4" }) {
1002
1002
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12l-5 4v-8l5 4z" })
1003
1003
  ] });
1004
1004
  }
1005
- function no({ className: t = "w-4 h-4" }) {
1005
+ function ro({ className: t = "w-4 h-4" }) {
1006
1006
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, children: [
1007
1007
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M20 4v16" }),
1008
1008
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 12l5 4v-8l-5 4z" })
@@ -1011,13 +1011,13 @@ function no({ className: t = "w-4 h-4" }) {
1011
1011
  function na({ className: t = "w-5 h-5" }) {
1012
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" }) });
1013
1013
  }
1014
- function ro({ className: t = "w-5 h-5" }) {
1014
+ function ao({ className: t = "w-5 h-5" }) {
1015
1015
  return /* @__PURE__ */ E("svg", { className: t, viewBox: "0 0 24 24", fill: "currentColor", children: [
1016
1016
  /* @__PURE__ */ l("path", { d: "M12 5l8 11H4z" }),
1017
1017
  /* @__PURE__ */ l("rect", { x: "4", y: "17", width: "16", height: "3", rx: "0.5" })
1018
1018
  ] });
1019
1019
  }
1020
- function ao({ className: t = "w-5 h-5" }) {
1020
+ function so({ className: t = "w-5 h-5" }) {
1021
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" }) });
1022
1022
  }
1023
1023
  function ra({ className: t = "w-4 h-4" }) {
@@ -1028,7 +1028,7 @@ function ra({ className: t = "w-4 h-4" }) {
1028
1028
  /* @__PURE__ */ l("path", { strokeLinecap: "round", d: "M19 2v6M16 5h6" })
1029
1029
  ] });
1030
1030
  }
1031
- function so({ className: t = "w-4 h-4" }) {
1031
+ function io({ className: t = "w-4 h-4" }) {
1032
1032
  return /* @__PURE__ */ E("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: [
1033
1033
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M10 7L4 12l6 5" }),
1034
1034
  /* @__PURE__ */ l("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 12h9a7 7 0 017 7" })
@@ -1037,12 +1037,12 @@ function so({ className: t = "w-4 h-4" }) {
1037
1037
  function Qt(t) {
1038
1038
  return new Date(t).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
1039
1039
  }
1040
- const io = 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 = $i(e, { clientId: n, author: r }), i = Wt(
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(
1042
1042
  { clientId: e.clientId, author: e.author },
1043
1043
  { name: e.name, sprite: e.sprite }
1044
1044
  ), a = Ue(i.sprite, i.pictureUrl), o = e.isSystem ? void 0 : i.cosmetics, f = P(null);
1045
- Ii(f, !!o);
1045
+ Ci(f, !!o);
1046
1046
  const [c] = $(
1047
1047
  () => e.live && e.text ? vr(e.text, o) : null
1048
1048
  ), [d, u] = $(!1), [g, b] = $(null), y = x((p) => p.setReplyingTo);
@@ -1056,12 +1056,14 @@ const io = Ze.memo(function({ message: e }) {
1056
1056
  ] }) });
1057
1057
  if (e.isSystem)
1058
1058
  return /* @__PURE__ */ E("div", { className: "px-2 py-0.5 text-[11px] text-text-muted italic text-center leading-tight", children: [
1059
- Ti(e.text, e.template, i),
1059
+ Ai(e.text, e.template, i),
1060
1060
  /* @__PURE__ */ l("span", { className: "ml-1 text-[10px] opacity-50", children: Qt(e.ts) })
1061
1061
  ] });
1062
1062
  const h = { clientId: n, author: r }, m = (p) => {
1063
- const M = e.reactions?.find((T) => T.emoji === p), R = !(M && Yr(M, h));
1064
- R && ji(p), ns(e.id, p, 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);
1065
1067
  };
1066
1068
  return /* @__PURE__ */ E(
1067
1069
  "div",
@@ -1078,7 +1080,7 @@ const io = Ze.memo(function({ message: e }) {
1078
1080
  },
1079
1081
  "data-active": d || g ? "true" : void 0,
1080
1082
  children: [
1081
- e.replyTo && /* @__PURE__ */ l(oo, { replyTo: e.replyTo }),
1083
+ e.replyTo && /* @__PURE__ */ l(fo, { replyTo: e.replyTo }),
1082
1084
  /* @__PURE__ */ E("div", { className: "flex items-start gap-2", children: [
1083
1085
  /* @__PURE__ */ l(qr, { sprite: i.sprite, url: i.pictureUrl, alt: i.name, worn: o }),
1084
1086
  /* @__PURE__ */ E("div", { className: "flex-1 min-w-0 -mt-0.5", children: [
@@ -1086,11 +1088,11 @@ const io = Ze.memo(function({ message: e }) {
1086
1088
  /* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted opacity-60 ml-1.5", children: Qt(e.ts) }),
1087
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 })),
1088
1090
  /* @__PURE__ */ l(Jr, { images: e.images }),
1089
- e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(fo, { reactions: e.reactions, me: h, onToggle: m, onAdd: b })
1091
+ e.reactions && e.reactions.length > 0 && /* @__PURE__ */ l(lo, { reactions: e.reactions, me: h, onToggle: m, onAdd: b })
1090
1092
  ] })
1091
1093
  ] }),
1092
1094
  (d || g) && /* @__PURE__ */ E("div", { className: "chat-msg-actions", role: "toolbar", "aria-label": "Message actions", "data-testid": "chat-msg-actions", children: [
1093
- Hi().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)),
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)),
1094
1096
  /* @__PURE__ */ l(
1095
1097
  "button",
1096
1098
  {
@@ -1103,16 +1105,16 @@ const io = Ze.memo(function({ message: e }) {
1103
1105
  children: /* @__PURE__ */ l(ra, {})
1104
1106
  }
1105
1107
  ),
1106
- !s && /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn", onClick: () => y(e.id), "aria-label": "Reply", title: "Reply", children: /* @__PURE__ */ l(so, {}) })
1108
+ /* @__PURE__ */ l("button", { type: "button", className: "chat-action-btn", onClick: () => y(e.id), "aria-label": "Reply", title: "Reply", children: /* @__PURE__ */ l(io, {}) })
1107
1109
  ] }),
1108
- g && /* @__PURE__ */ l(qi, { anchor: g, onPick: m, onClose: () => {
1110
+ g && /* @__PURE__ */ l(Vi, { anchor: g, onPick: m, onClose: () => {
1109
1111
  b(null), u(!1);
1110
1112
  } })
1111
1113
  ]
1112
1114
  }
1113
1115
  );
1114
1116
  });
1115
- function oo({ replyTo: t }) {
1117
+ function fo({ replyTo: t }) {
1116
1118
  const e = x((a) => a.chat.find((o) => o.id === t)), n = x((a) => a.jumpToMessage), r = Wt(
1117
1119
  { clientId: e?.clientId ?? "", author: e?.author },
1118
1120
  { name: e?.name ?? "", sprite: e?.sprite ?? null }
@@ -1149,7 +1151,7 @@ function oo({ replyTo: t }) {
1149
1151
  }
1150
1152
  );
1151
1153
  }
1152
- function fo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1154
+ function lo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1153
1155
  const s = x((i) => i.roster);
1154
1156
  return /* @__PURE__ */ E("div", { className: "chat-reactions", "data-testid": "chat-reactions", children: [
1155
1157
  t.map((i) => {
@@ -1162,7 +1164,7 @@ function fo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1162
1164
  "data-mine": a ? "true" : void 0,
1163
1165
  "aria-pressed": a,
1164
1166
  onClick: () => n(i.emoji),
1165
- title: Wi(Ui(i, s, e), jt(i.emoji)?.name),
1167
+ title: zi(Wi(i, s, e), jt(i.emoji)?.name),
1166
1168
  "data-emoji": i.emoji,
1167
1169
  children: [
1168
1170
  /* @__PURE__ */ l("span", { className: "chat-reaction-emoji", children: i.emoji }),
@@ -1175,7 +1177,7 @@ function fo({ reactions: t, me: e, onToggle: n, onAdd: r }) {
1175
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, {}) })
1176
1178
  ] });
1177
1179
  }
1178
- function lo() {
1180
+ function co() {
1179
1181
  Gr();
1180
1182
  const t = x((i) => i.chat), e = P(null), n = P(!1), r = H(() => {
1181
1183
  const i = e.current;
@@ -1211,7 +1213,7 @@ function lo() {
1211
1213
  /* @__PURE__ */ l("span", { className: "text-[10px] text-text-muted whitespace-nowrap", children: new Date(i.ts).toLocaleDateString([], { weekday: "short", month: "short", day: "numeric" }) }),
1212
1214
  /* @__PURE__ */ l("div", { className: "flex-1 h-px bg-border" })
1213
1215
  ] }),
1214
- /* @__PURE__ */ l(io, { message: i })
1216
+ /* @__PURE__ */ l(oo, { message: i })
1215
1217
  ] }, i.id);
1216
1218
  }) })
1217
1219
  }
@@ -1238,12 +1240,12 @@ const Mn = [
1238
1240
  scope: "local"
1239
1241
  }
1240
1242
  ], ht = "/";
1241
- function co(t) {
1243
+ function uo(t) {
1242
1244
  if (!t.startsWith(ht)) return null;
1243
1245
  const e = t.slice(ht.length);
1244
1246
  return /\s/.test(e) ? null : e.toLowerCase();
1245
1247
  }
1246
- function uo(t, e = Mn) {
1248
+ function ho(t, e = Mn) {
1247
1249
  const n = t.toLowerCase();
1248
1250
  if (!n) return [...e].sort((s, i) => s.name.localeCompare(i.name));
1249
1251
  const r = [];
@@ -1253,23 +1255,23 @@ function uo(t, e = Mn) {
1253
1255
  }
1254
1256
  return r.sort((s, i) => s.rank - i.rank || s.cmd.name.localeCompare(i.cmd.name)).map((s) => s.cmd);
1255
1257
  }
1256
- function ho(t) {
1258
+ function mo(t) {
1257
1259
  return `${ht}${t.name} `;
1258
1260
  }
1259
1261
  function Yt(t, e) {
1260
1262
  return e <= 0 ? 0 : (t % e + e) % e;
1261
1263
  }
1262
- function mo(t, e = Mn) {
1264
+ function go(t, e = Mn) {
1263
1265
  const n = t.trim();
1264
1266
  if (!n) return null;
1265
1267
  if (!n.startsWith(ht)) return { kind: "chat", text: n };
1266
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);
1267
1269
  return o ? { kind: "command", command: o, args: a } : { kind: "chat", text: n };
1268
1270
  }
1269
- function go(t, e) {
1271
+ function po(t, e) {
1270
1272
  return t.requiresMedia && !e.hasMedia ? `${ht}${t.name} needs an episode loaded.` : null;
1271
1273
  }
1272
- function po({
1274
+ function bo({
1273
1275
  commands: t,
1274
1276
  activeIndex: e,
1275
1277
  hasMedia: n,
@@ -1345,17 +1347,17 @@ function sa() {
1345
1347
  i.current.clear();
1346
1348
  }, []);
1347
1349
  const a = H((h) => {
1348
- ei(h) && (URL.revokeObjectURL(h.previewUrl), i.current.delete(h.previewUrl));
1350
+ ti(h) && (URL.revokeObjectURL(h.previewUrl), i.current.delete(h.previewUrl));
1349
1351
  }, []), o = H(async (h) => {
1350
1352
  if (!h.length) return;
1351
1353
  const m = [];
1352
1354
  for (const p of h) {
1353
- const M = ni(p);
1355
+ const M = ri(p);
1354
1356
  if (M) {
1355
1357
  s("error", M);
1356
1358
  continue;
1357
1359
  }
1358
- const { w: R, h: T } = await si(p), w = URL.createObjectURL(p);
1360
+ const { w: R, h: T } = await ii(p), w = URL.createObjectURL(p);
1359
1361
  i.current.add(w), m.push({
1360
1362
  kind: "file",
1361
1363
  id: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
@@ -1402,10 +1404,10 @@ function sa() {
1402
1404
  return [];
1403
1405
  });
1404
1406
  }, [a]), u = H((h) => {
1405
- const m = ri(h.clipboardData);
1407
+ const m = ai(h.clipboardData);
1406
1408
  m.length && (h.preventDefault(), o(m));
1407
1409
  }, [o]), g = H((h) => {
1408
- const m = ai(h.dataTransfer);
1410
+ const m = si(h.dataTransfer);
1409
1411
  m.length && (h.preventDefault(), o(m));
1410
1412
  }, [o]), b = H((h) => {
1411
1413
  h.dataTransfer?.types?.includes("Files") && h.preventDefault();
@@ -1413,9 +1415,9 @@ function sa() {
1413
1415
  if (!t.length) return [];
1414
1416
  r(!0);
1415
1417
  try {
1416
- return await oi(t);
1418
+ return await fi(t);
1417
1419
  } catch (h) {
1418
- return N("chat", "Image upload failed", fi(h)), s("error", ti(h)), null;
1420
+ return N("chat", "Image upload failed", li(h)), s("error", ni(h)), null;
1419
1421
  } finally {
1420
1422
  r(!1);
1421
1423
  }
@@ -1433,8 +1435,8 @@ function sa() {
1433
1435
  onDragOver: b
1434
1436
  };
1435
1437
  }
1436
- const bo = 2500, yo = 5e3;
1437
- class wo {
1438
+ const yo = 2500, wo = 5e3;
1439
+ class vo {
1438
1440
  constructor(e, n = Date.now) {
1439
1441
  this.send = e, this.now = n;
1440
1442
  }
@@ -1449,20 +1451,20 @@ class wo {
1449
1451
  return;
1450
1452
  }
1451
1453
  const n = this.now();
1452
- (!this.typing || n - this.lastSent >= bo) && (this.typing = !0, this.lastSent = n, this.send(!0)), this.idle && clearTimeout(this.idle), this.idle = setTimeout(() => this.stop(), yo);
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);
1453
1455
  }
1454
1456
  stop() {
1455
1457
  this.idle && (clearTimeout(this.idle), this.idle = null), this.typing && (this.typing = !1, this.send(!1));
1456
1458
  }
1457
1459
  }
1458
1460
  function ia() {
1459
- const [t] = $(() => new wo(rs));
1461
+ const [t] = $(() => new vo(as));
1460
1462
  return F(() => () => t.stop(), [t]), t;
1461
1463
  }
1462
- function vo(t) {
1464
+ function ko(t) {
1463
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…";
1464
1466
  }
1465
- function ko({ replyTo: t, onCancel: e }) {
1467
+ function So({ replyTo: t, onCancel: e }) {
1466
1468
  const n = x((i) => i.chat.find((a) => a.id === t)), r = Wt(
1467
1469
  { clientId: n?.clientId ?? "", author: n?.author },
1468
1470
  { name: n?.name ?? "a message", sprite: n?.sprite ?? null }
@@ -1475,7 +1477,7 @@ function ko({ replyTo: t, onCancel: e }) {
1475
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" }) })
1476
1478
  ] });
1477
1479
  }
1478
- function So() {
1480
+ function xo() {
1479
1481
  const t = x((a) => a.typing), e = x((a) => a.roster), n = x((a) => a.me.clientId), r = x((a) => a.setTyping);
1480
1482
  F(() => {
1481
1483
  const a = Object.keys(t);
@@ -1486,7 +1488,7 @@ function So() {
1486
1488
  }, Math.max(0, o - Date.now()) + 50);
1487
1489
  return () => clearTimeout(f);
1488
1490
  }, [t, r]);
1489
- const s = Object.keys(t).filter((a) => a !== n && e[a]).map((a) => e[a].name || "Someone").sort((a, o) => a.localeCompare(o)), i = vo(s);
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);
1490
1492
  return /* @__PURE__ */ l("div", { className: "chat-typing", "aria-live": "polite", "data-testid": "chat-typing", children: i && /* @__PURE__ */ E(he, { children: [
1491
1493
  /* @__PURE__ */ E("span", { className: "chat-typing-dots", "aria-hidden": "true", children: [
1492
1494
  /* @__PURE__ */ l("i", {}),
@@ -1496,20 +1498,20 @@ function So() {
1496
1498
  /* @__PURE__ */ l("span", { className: "truncate", children: i })
1497
1499
  ] }) });
1498
1500
  }
1499
- const Wn = Er, xo = xr;
1500
- function Eo({ commands: t = Mn }) {
1501
+ const Wn = Er, Eo = xr;
1502
+ function Mo({ commands: t = Mn }) {
1501
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);
1502
1504
  F(() => {
1503
1505
  p && !document.hidden && c.current?.focus({ preventScroll: !0 });
1504
1506
  }, [p]);
1505
- const R = x((I) => I.snapshot.mediaId), T = x((I) => I.pushToast), w = x((I) => I.setTierlistOpen), S = !!R, L = co(e), k = ye(
1506
- () => L === null ? [] : uo(L, t),
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),
1507
1509
  [L, t]
1508
1510
  ), v = L !== null && !o && k.length > 0, C = i.q === L ? Yt(i.i, k.length) : 0, D = H(
1509
1511
  (I) => a({ q: L, i: I }),
1510
1512
  [L]
1511
1513
  ), B = H((I, K) => {
1512
- const Q = go(I, { hasMedia: S });
1514
+ const Q = po(I, { hasMedia: S });
1513
1515
  if (Q) {
1514
1516
  T("info", Q);
1515
1517
  return;
@@ -1519,19 +1521,19 @@ function Eo({ commands: t = Mn }) {
1519
1521
  T("info", t.map((ke) => ke.usage).join(" "));
1520
1522
  break;
1521
1523
  case "recap":
1522
- ss();
1524
+ is();
1523
1525
  break;
1524
1526
  case "tierlist":
1525
- as(), w(!0);
1527
+ ss(), w(!0);
1526
1528
  break;
1527
1529
  default:
1528
1530
  T("info", `${I.usage} is not implemented yet.`);
1529
1531
  }
1530
1532
  }, [S, T, t, w]), O = H((I) => {
1531
- n(ho(I)), f(!1), c.current?.focus();
1533
+ n(mo(I)), f(!1), c.current?.focus();
1532
1534
  }, []), U = H(async (I) => {
1533
1535
  if (I.preventDefault(), r || h.uploading) return;
1534
- const K = mo(e, t);
1536
+ const K = go(e, t);
1535
1537
  if (!K && !h.pending.length) return;
1536
1538
  if (K?.kind === "command" && h.pending.length) {
1537
1539
  T("info", "Send images on their own, not with a command.");
@@ -1542,7 +1544,7 @@ function Eo({ commands: t = Mn }) {
1542
1544
  return;
1543
1545
  }
1544
1546
  const Q = await h.uploadPending();
1545
- Q !== null && (Sr(K?.text ?? "", Q, p), n(""), m.stop(), M(null), h.clear(), s(!0), setTimeout(() => s(!1), xo), !document.hidden && document.hasFocus() && c.current?.focus());
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());
1546
1548
  }, [e, r, B, h, T, t, p, M, m]), V = H((I) => {
1547
1549
  if (I.key === "Escape" && v) {
1548
1550
  I.preventDefault(), f(!0);
@@ -1586,11 +1588,11 @@ function Eo({ commands: t = Mn }) {
1586
1588
  onDragOver: h.onDragOver,
1587
1589
  className: "p-2 border-t border-border",
1588
1590
  children: [
1589
- p && /* @__PURE__ */ l(ko, { replyTo: p, onCancel: () => M(null) }),
1591
+ p && /* @__PURE__ */ l(So, { replyTo: p, onCancel: () => M(null) }),
1590
1592
  /* @__PURE__ */ l(aa, { pending: h.pending, uploading: h.uploading, onRemove: h.remove }),
1591
1593
  /* @__PURE__ */ E("div", { className: "relative", children: [
1592
1594
  v && /* @__PURE__ */ l(
1593
- po,
1595
+ bo,
1594
1596
  {
1595
1597
  commands: k,
1596
1598
  activeIndex: C,
@@ -1650,16 +1652,16 @@ function Eo({ commands: t = Mn }) {
1650
1652
  )
1651
1653
  ] })
1652
1654
  ] }),
1653
- /* @__PURE__ */ l(So, {})
1655
+ /* @__PURE__ */ l(xo, {})
1654
1656
  ]
1655
1657
  }
1656
1658
  );
1657
1659
  }
1658
- function Mo() {
1660
+ function _o() {
1659
1661
  const t = x((n) => n.roster), e = Object.values(t);
1660
- return e.length ? /* @__PURE__ */ l("div", { className: "flex flex-col gap-1", children: e.map((n) => /* @__PURE__ */ l(_o, { u: n }, n.clientId)) }) : /* @__PURE__ */ l("div", { className: "text-xs text-text-muted", children: "No users online" });
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" });
1661
1663
  }
1662
- function _o({ u: t }) {
1664
+ function To({ u: t }) {
1663
1665
  const e = Ue(t.sprite, t.avatarUrl);
1664
1666
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
1665
1667
  /* @__PURE__ */ l(
@@ -1676,7 +1678,7 @@ function _o({ u: t }) {
1676
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" })
1677
1679
  ] });
1678
1680
  }
1679
- function To() {
1681
+ function Ao() {
1680
1682
  const t = x((i) => Object.keys(i.roster).length), [e, n] = $(!1), r = P(null), s = P(null);
1681
1683
  return F(() => {
1682
1684
  if (!e) return;
@@ -1712,20 +1714,20 @@ function To() {
1712
1714
  t,
1713
1715
  " online"
1714
1716
  ] }),
1715
- /* @__PURE__ */ l(Mo, {})
1717
+ /* @__PURE__ */ l(_o, {})
1716
1718
  ] })
1717
1719
  ] });
1718
1720
  }
1719
- function Ao({ leaderId: t, clientId: e, keyType: n }) {
1721
+ function Io({ leaderId: t, clientId: e, keyType: n }) {
1720
1722
  return t !== null ? t === e : n === "leader";
1721
1723
  }
1722
- const Io = /-[0-9a-fA-F]{16}$/;
1723
- function Co(t) {
1724
- return t && Io.test(t) ? "leader" : null;
1724
+ const Co = /-[0-9a-fA-F]{16}$/;
1725
+ function No(t) {
1726
+ return t && Co.test(t) ? "leader" : null;
1725
1727
  }
1726
- const No = /\/room\/([^/]+)\/?$/;
1727
- function Ro(t) {
1728
- const e = t ? No.exec(t) : null;
1728
+ const Ro = /\/room\/([^/]+)\/?$/;
1729
+ function Lo(t) {
1730
+ const e = t ? Ro.exec(t) : null;
1729
1731
  if (!e) return null;
1730
1732
  try {
1731
1733
  return decodeURIComponent(e[1]);
@@ -1733,39 +1735,39 @@ function Ro(t) {
1733
1735
  return e[1];
1734
1736
  }
1735
1737
  }
1736
- function Lo(t, e) {
1737
- return t && e?.roomKey === t ? e.type : Co(t);
1738
+ function Fo(t, e) {
1739
+ return t && e?.roomKey === t ? e.type : No(t);
1738
1740
  }
1739
1741
  function et() {
1740
1742
  return x((t) => !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId);
1741
1743
  }
1742
1744
  function zt() {
1743
- const t = x((n) => n.activeGameId), e = is();
1745
+ const t = x((n) => n.activeGameId), e = os();
1744
1746
  return t ? e.find((n) => n.id === t) ?? null : null;
1745
1747
  }
1746
1748
  function _n() {
1747
- return x((t) => Ao({
1749
+ return x((t) => Io({
1748
1750
  leaderId: t.snapshot.leaderId,
1749
1751
  clientId: t.me.clientId,
1750
- keyType: Lo(Ro(globalThis.location?.pathname), t.roomKeyType)
1752
+ keyType: Fo(Lo(globalThis.location?.pathname), t.roomKeyType)
1751
1753
  }));
1752
1754
  }
1753
1755
  function oa() {
1754
1756
  return x((t) => t.readiness);
1755
1757
  }
1756
- function Fo() {
1758
+ function $o() {
1757
1759
  return x((t) => t.snapshot);
1758
1760
  }
1759
- const $o = 3e4;
1761
+ const Po = 3e4;
1760
1762
  function fa() {
1761
1763
  const t = oa(), [e, n] = $(!1), [r, s] = $({ mediaId: t.mediaId, ready: t.ready });
1762
1764
  return (r.mediaId !== t.mediaId || r.ready !== t.ready) && (s({ mediaId: t.mediaId, ready: t.ready }), n(!1)), F(() => {
1763
1765
  if (t.ready) return;
1764
- const i = setTimeout(() => n(!0), $o);
1766
+ const i = setTimeout(() => n(!0), Po);
1765
1767
  return () => clearTimeout(i);
1766
1768
  }, [t.mediaId, t.ready]), e;
1767
1769
  }
1768
- function Po({ draw: t }) {
1770
+ function Do({ draw: t }) {
1769
1771
  const e = P(null);
1770
1772
  return F(() => {
1771
1773
  const n = e.current;
@@ -1773,8 +1775,8 @@ function Po({ draw: t }) {
1773
1775
  return t(n) ?? void 0;
1774
1776
  }, [t]), /* @__PURE__ */ l("div", { ref: e, "data-testid": "game-settings" });
1775
1777
  }
1776
- const Do = vn(() => import("./AdminPanel-DcGc-1vo.js")), Bo = vn(() => import("./PlaylistPanel-CTgSeMHH.js"));
1777
- function Oo() {
1778
+ const Bo = vn(() => import("./AdminPanel-C59vWHjn.js")), Oo = vn(() => import("./PlaylistPanel-Ceu23PeI.js"));
1779
+ function jo() {
1778
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;
1779
1781
  if (Ut({ hasMedia: !!c, chatCollapsed: t, isFullscreen: e }))
1780
1782
  return null;
@@ -1782,14 +1784,14 @@ function Oo() {
1782
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: [
1783
1785
  /* @__PURE__ */ E("div", { className: "chat-toolbar relative flex items-center gap-1 px-2 py-1.5 border-b border-border", children: [
1784
1786
  /* @__PURE__ */ l(
1785
- os,
1787
+ fs,
1786
1788
  {
1787
1789
  to: "/",
1788
1790
  className: "p-1.5 rounded text-text-secondary hover:text-white hover:bg-bg-alt transition-colors cursor-pointer",
1789
1791
  title: "Home",
1790
1792
  "aria-label": "Home",
1791
1793
  onClick: () => {
1792
- _("navigation", "Home button clicked (chat toolbar)"), fs();
1794
+ _("navigation", "Home button clicked (chat toolbar)"), ls();
1793
1795
  },
1794
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" }) })
1795
1797
  }
@@ -1804,9 +1806,9 @@ function Oo() {
1804
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" }) })
1805
1807
  }
1806
1808
  ),
1807
- /* @__PURE__ */ l(Vs, {}),
1808
- /* @__PURE__ */ l(Js, { children: f ? /* @__PURE__ */ l(Po, { draw: f }) : null }),
1809
- /* @__PURE__ */ l(To, {})
1809
+ /* @__PURE__ */ l(Js, {}),
1810
+ /* @__PURE__ */ l(Qs, { children: f ? /* @__PURE__ */ l(Do, { draw: f }) : null }),
1811
+ /* @__PURE__ */ l(Ao, {})
1810
1812
  ] }),
1811
1813
  (a || i) && /* @__PURE__ */ E("div", { role: "tablist", "aria-label": "Sidebar", className: "flex border-b border-border shrink-0", children: [
1812
1814
  /* @__PURE__ */ l(
@@ -1843,23 +1845,23 @@ function Oo() {
1843
1845
  }
1844
1846
  )
1845
1847
  ] }),
1846
- u === "health" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Do, {}) }) : u === "playlist" ? /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l("div", { className: "p-4 text-xs text-text-muted", children: "Loading..." }), children: /* @__PURE__ */ l(Bo, {}) }) : /* @__PURE__ */ E(he, { children: [
1847
- /* @__PURE__ */ l(lo, {}),
1848
- /* @__PURE__ */ l(Eo, {})
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, {})
1849
1851
  ] })
1850
1852
  ] });
1851
1853
  }
1852
- const zn = (t) => typeof t == "string" && Ks.includes(t);
1853
- function jo(t, e, n) {
1854
+ const zn = (t) => typeof t == "string" && qs.includes(t);
1855
+ function Ho(t, e, n) {
1854
1856
  return zn(e) ? e : zn(n) ? n : "dark";
1855
1857
  }
1856
1858
  function Gn({ activity: t, roomKey: e, layer: n }) {
1857
- 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 = qs()?.theme, y = jo(void 0, b, ls().theme), h = ye(() => ({
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(() => ({
1858
1860
  roomKey: e,
1859
1861
  identity: {
1860
1862
  // The registry userId — what RoomChrome's `userId` prop is.
1861
- userId: ds(),
1862
- userType: cs(),
1863
+ userId: us(),
1864
+ userType: ds(),
1863
1865
  name: g || null
1864
1866
  },
1865
1867
  theme: y,
@@ -1876,7 +1878,7 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
1876
1878
  const T = r.current, w = t.load;
1877
1879
  if (!T || !w || o) return;
1878
1880
  _("game", "bundle mount", { gameId: t.id });
1879
- const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k = Ei({
1881
+ const { setGameSettings: S } = x.getState(), L = (v) => k.mountSettings(v), k = Mi({
1880
1882
  load: w,
1881
1883
  el: T,
1882
1884
  ctx: m(),
@@ -1914,8 +1916,8 @@ function Gn({ activity: t, roomKey: e, layer: n }) {
1914
1916
  }
1915
1917
  );
1916
1918
  }
1917
- const ic = "drawer-btn", Ho = "drawer-icon-btn";
1918
- function Uo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children: i }) {
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 }) {
1919
1921
  const a = P(null);
1920
1922
  return F(() => {
1921
1923
  if (!t) return;
@@ -1938,7 +1940,7 @@ function Uo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
1938
1940
  onClick: (o) => o.stopPropagation(),
1939
1941
  children: [
1940
1942
  /* @__PURE__ */ E("div", { className: "px-3 py-2 border-b border-border flex items-center gap-2 text-sm min-w-0", children: [
1941
- /* @__PURE__ */ l("button", { ref: a, onClick: e, className: Ho, "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" }) }),
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" }) }),
1942
1944
  r
1943
1945
  ] }),
1944
1946
  i,
@@ -1947,10 +1949,10 @@ function Uo({ open: t, onClose: e, back: n = !1, header: r, footer: s, children:
1947
1949
  }
1948
1950
  ) }) : null;
1949
1951
  }
1950
- function Wo({ open: t, onClose: e }) {
1951
- return /* @__PURE__ */ l(Uo, { open: t, onClose: e, children: /* @__PURE__ */ l("div", { className: "px-4 py-3 text-xs text-text-muted", children: "Loading…" }) });
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…" }) });
1952
1954
  }
1953
- const la = 9e3, Kn = 1500, zo = {
1955
+ const la = 9e3, Kn = 1500, Go = {
1954
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]",
1955
1957
  cinema: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)]",
1956
1958
  minimal: "drop-shadow-[0_2px_4px_rgba(0,0,0,0.9)] drop-shadow-[0_0_8px_rgba(0,0,0,0.7)]",
@@ -1959,11 +1961,11 @@ const la = 9e3, Kn = 1500, zo = {
1959
1961
  textShadow: "none",
1960
1962
  filter: "drop-shadow(0 0 1px black) drop-shadow(0 0 1px black)"
1961
1963
  };
1962
- function Go({ message: t, age: e, ccStyle: n }) {
1964
+ function Ko({ message: t, age: e, ccStyle: n }) {
1963
1965
  const r = la - Kn;
1964
1966
  let s = 1;
1965
1967
  e > r && (s = Math.max(0, 1 - (e - r) / Kn));
1966
- const i = zo[n], a = Wt(
1968
+ const i = Go[n], a = Wt(
1967
1969
  { clientId: t.clientId, author: t.author },
1968
1970
  { name: t.name, sprite: t.sprite }
1969
1971
  ), o = Ue(a.sprite, a.pictureUrl), f = a.cosmetics, [c] = $(
@@ -1985,7 +1987,7 @@ function Go({ message: t, age: e, ccStyle: n }) {
1985
1987
  }
1986
1988
  );
1987
1989
  }
1988
- function Ko({ shown: t, className: e }) {
1990
+ function qo({ shown: t, className: e }) {
1989
1991
  Gr();
1990
1992
  const n = x((f) => f.chat), r = x((f) => f.mediaPrefs.subtitleStyle), [s, i] = $(() => Date.now()), a = n.length > 0;
1991
1993
  F(() => {
@@ -2004,7 +2006,7 @@ function Ko({ shown: t, className: e }) {
2004
2006
  className: `wp-floating-chat pointer-events-none flex flex-col ${e}`,
2005
2007
  "data-testid": "floating-chat",
2006
2008
  children: o.map((f) => /* @__PURE__ */ l(
2007
- Go,
2009
+ Ko,
2008
2010
  {
2009
2011
  message: f,
2010
2012
  age: s - f.ts,
@@ -2015,18 +2017,18 @@ function Ko({ shown: t, className: e }) {
2015
2017
  }
2016
2018
  );
2017
2019
  }
2018
- const qo = 2;
2020
+ const Vo = 2;
2019
2021
  function ca(t) {
2020
2022
  return t.duration_ms > 0 && t.duration_ms - t.playhead_ms <= kn;
2021
2023
  }
2022
2024
  function da(t) {
2023
2025
  const e = t.video_ready_state ?? -1;
2024
- return e < 0 ? !0 : !(e <= qo && t.buffered_ahead_ms > kn);
2026
+ return e < 0 ? !0 : !(e <= Vo && t.buffered_ahead_ms > kn);
2025
2027
  }
2026
- function oc(t) {
2028
+ function fc(t) {
2027
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";
2028
2030
  }
2029
- const fc = {
2031
+ const lc = {
2030
2032
  idle: "Idle",
2031
2033
  buffering: "Buffering",
2032
2034
  critical: "Critical",
@@ -2083,7 +2085,7 @@ Tr("__WP_SOUNDS__", {
2083
2085
  off: ba
2084
2086
  });
2085
2087
  const Jn = { on: 0, off: 0 };
2086
- function Vo(t, e, n, r) {
2088
+ function Jo(t, e, n, r) {
2087
2089
  if (!n || !r) return Jn;
2088
2090
  const s = new Set(t), i = new Set(e);
2089
2091
  let a = 0;
@@ -2092,15 +2094,15 @@ function Vo(t, e, n, r) {
2092
2094
  for (const f of s) i.has(f) || o++;
2093
2095
  return a === 0 && o === 0 ? Jn : { on: a, off: o };
2094
2096
  }
2095
- const Jo = 1200, ve = 52, Ht = 4, mn = (ve - Ht) / 2, Qn = 2 * Math.PI * mn, je = ve - Ht * 2 - 4;
2096
- function Qo(t) {
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) {
2097
2099
  return ca(t) ? !0 : da(t) ? t.buffered_ahead_ms >= $e : !1;
2098
2100
  }
2099
- function Yo(t) {
2101
+ function Xo(t) {
2100
2102
  return `hsl(${Math.round(t * 120)}, 90%, 55%)`;
2101
2103
  }
2102
- function Xo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2103
- const s = Math.min(1, t.buffered_ahead_ms / $e), i = Qn * (1 - s), a = Yo(s), o = Ue(e.sprite, e.pictureUrl);
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);
2104
2106
  return /* @__PURE__ */ E(
2105
2107
  "div",
2106
2108
  {
@@ -2108,7 +2110,7 @@ function Xo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2108
2110
  "data-client-id": t.client_id,
2109
2111
  className: "flex flex-col items-center gap-1",
2110
2112
  style: n ? {
2111
- animation: `bufferFadeOut ${Jo}ms ease forwards`
2113
+ animation: `bufferFadeOut ${Qo}ms ease forwards`
2112
2114
  } : void 0,
2113
2115
  onAnimationEnd: n ? r : void 0,
2114
2116
  children: [
@@ -2187,7 +2189,7 @@ function Xo({ client: t, look: e, fading: n, onFadeEnd: r }) {
2187
2189
  }
2188
2190
  );
2189
2191
  }
2190
- function Zo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf: i, onToggle: a }) {
2192
+ function ef({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf: i, onToggle: a }) {
2191
2193
  const o = Ue(e, n), f = s ? "success" : "neutral", c = s ? /* @__PURE__ */ l(_t, { name: "tick" }) : /* @__PURE__ */ l(_t, { name: "hourglass" });
2192
2194
  return /* @__PURE__ */ E(
2193
2195
  "button",
@@ -2259,18 +2261,18 @@ function Zo({ clientId: t, sprite: e, pictureUrl: n, name: r, isReady: s, isSelf
2259
2261
  }
2260
2262
  );
2261
2263
  }
2262
- const ef = { status: null, entries: [], completed: /* @__PURE__ */ new Set(), below: /* @__PURE__ */ new Set() };
2264
+ const tf = { status: null, entries: [], completed: /* @__PURE__ */ new Set(), below: /* @__PURE__ */ new Set() };
2263
2265
  function Yn(t, e) {
2264
2266
  if (!e || e.clients.length === 0) return { ...t, status: e, entries: [] };
2265
2267
  const n = new Set(t.completed), r = new Set(t.below), s = [];
2266
2268
  for (const i of e.clients) {
2267
2269
  const a = i.client_id;
2268
- Qo(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 }));
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 }));
2269
2271
  }
2270
2272
  return { status: e, entries: s, completed: n, below: r };
2271
2273
  }
2272
- function tf() {
2273
- 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(ef, t));
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));
2274
2276
  a.status !== t && o(Yn(a, t));
2275
2277
  const f = a.entries, c = (w) => {
2276
2278
  o((S) => {
@@ -2285,7 +2287,7 @@ function tf() {
2285
2287
  }, [b]);
2286
2288
  const m = P(e.ready), p = P(e.active);
2287
2289
  F(() => {
2288
- const { on: w, off: S } = Vo(
2290
+ const { on: w, off: S } = Jo(
2289
2291
  m.current,
2290
2292
  e.ready,
2291
2293
  p.current,
@@ -2324,7 +2326,7 @@ function tf() {
2324
2326
  }
2325
2327
  ),
2326
2328
  /* @__PURE__ */ l("div", { className: "flex flex-col gap-3", children: u.map((w) => /* @__PURE__ */ l(
2327
- Zo,
2329
+ ef,
2328
2330
  {
2329
2331
  clientId: w.clientId,
2330
2332
  sprite: w.sprite,
@@ -2332,13 +2334,13 @@ function tf() {
2332
2334
  name: w.name || "Anon",
2333
2335
  isReady: d.has(w.clientId),
2334
2336
  isSelf: w.clientId === r,
2335
- onToggle: () => us(!g)
2337
+ onToggle: () => hs(!g)
2336
2338
  },
2337
2339
  w.clientId
2338
2340
  )) })
2339
2341
  ] }),
2340
2342
  R && f.map(({ client: w, completed: S }) => /* @__PURE__ */ l(
2341
- Xo,
2343
+ Zo,
2342
2344
  {
2343
2345
  client: w,
2344
2346
  look: zr(n, { clientId: w.client_id }, { name: w.name, sprite: w.sprite_id ?? null }),
@@ -2352,7 +2354,7 @@ function tf() {
2352
2354
  {
2353
2355
  type: "button",
2354
2356
  "data-testid": "start-ready-check",
2355
- onClick: () => hs(),
2357
+ onClick: () => ms(),
2356
2358
  className: "px-2.5 py-1 rounded bg-black/55 text-xs font-semibold tracking-wide hover:bg-black/75 transition-colors",
2357
2359
  style: { color: "#fff", pointerEvents: "auto" },
2358
2360
  title: "Ask everyone if they're ready",
@@ -2422,7 +2424,7 @@ function Xn({
2422
2424
  }
2423
2425
  );
2424
2426
  }
2425
- function nf({ sprite: t, url: e }) {
2427
+ function rf({ sprite: t, url: e }) {
2426
2428
  const n = Ue(t, e);
2427
2429
  return /* @__PURE__ */ l(
2428
2430
  mt,
@@ -2435,7 +2437,7 @@ function nf({ sprite: t, url: e }) {
2435
2437
  }
2436
2438
  );
2437
2439
  }
2438
- function rf({
2440
+ function af({
2439
2441
  anchor: t,
2440
2442
  itemId: e,
2441
2443
  snap: n
@@ -2462,7 +2464,7 @@ function rf({
2462
2464
  children: [
2463
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 }),
2464
2466
  Object.entries(a.votes).map(([f, c]) => /* @__PURE__ */ E("div", { className: "flex items-center gap-2 py-0.5", children: [
2465
- /* @__PURE__ */ l(nf, { sprite: n.sprites[f], url: n.pictures?.[f] }),
2467
+ /* @__PURE__ */ l(rf, { sprite: n.sprites[f], url: n.pictures?.[f] }),
2466
2468
  /* @__PURE__ */ l("span", { className: "flex-1 text-[11px] text-text-secondary truncate", children: n.names[f] ?? "viewer" }),
2467
2469
  /* @__PURE__ */ l(
2468
2470
  "span",
@@ -2479,7 +2481,7 @@ function rf({
2479
2481
  document.body
2480
2482
  );
2481
2483
  }
2482
- function af() {
2484
+ function sf() {
2483
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");
2484
2486
  F(() => {
2485
2487
  $n(!0);
@@ -2523,7 +2525,7 @@ function af() {
2523
2525
  a && (i(a, k === Ye ? null : k), o(null));
2524
2526
  }
2525
2527
  }), T = H(async () => {
2526
- await ms(x.getState().tierlistDraft) && b(Date.now());
2528
+ await gs(x.getState().tierlistDraft) && b(Date.now());
2527
2529
  }, []);
2528
2530
  if (F(() => {
2529
2531
  if (g === null) return;
@@ -2678,14 +2680,14 @@ function af() {
2678
2680
  ]
2679
2681
  }
2680
2682
  ),
2681
- d && n && /* @__PURE__ */ l(rf, { anchor: d.anchor, itemId: d.itemId, snap: n })
2683
+ d && n && /* @__PURE__ */ l(af, { anchor: d.anchor, itemId: d.itemId, snap: n })
2682
2684
  ]
2683
2685
  }
2684
2686
  ),
2685
2687
  document.body
2686
2688
  );
2687
2689
  }
2688
- function sf({ children: t }) {
2690
+ function of({ children: t }) {
2689
2691
  const [e, n] = $(null);
2690
2692
  return F(() => {
2691
2693
  const r = () => n(document.fullscreenElement);
@@ -2700,11 +2702,11 @@ function va({ site: t = "control bar", className: e = "ctr-btn" }) {
2700
2702
  className: e,
2701
2703
  title: "Select Media",
2702
2704
  "aria-label": "Select Media",
2703
- children: /* @__PURE__ */ l(ao, {})
2705
+ children: /* @__PURE__ */ l(so, {})
2704
2706
  }
2705
2707
  );
2706
2708
  }
2707
- function of() {
2709
+ function ff() {
2708
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 });
2709
2711
  return { panelHidden: s, toggle: () => {
2710
2712
  if (_("chat", s ? "Show chat" : "Hide chat", { isFullscreen: r, chatCollapsed: t }), !s) {
@@ -2717,7 +2719,7 @@ function of() {
2717
2719
  } };
2718
2720
  }
2719
2721
  function ka({ className: t }) {
2720
- const { panelHidden: e, toggle: n } = of(), r = e ? "Show chat" : "Hide chat";
2722
+ const { panelHidden: e, toggle: n } = ff(), r = e ? "Show chat" : "Hide chat";
2721
2723
  return /* @__PURE__ */ l(
2722
2724
  "button",
2723
2725
  {
@@ -2727,11 +2729,11 @@ function ka({ className: t }) {
2727
2729
  title: r,
2728
2730
  "aria-label": r,
2729
2731
  "aria-expanded": !e,
2730
- children: e ? /* @__PURE__ */ l(no, { className: "w-5 h-5" }) : /* @__PURE__ */ l(ta, { className: "w-5 h-5" })
2732
+ children: e ? /* @__PURE__ */ l(ro, { className: "w-5 h-5" }) : /* @__PURE__ */ l(ta, { className: "w-5 h-5" })
2731
2733
  }
2732
2734
  );
2733
2735
  }
2734
- function ff() {
2736
+ function lf() {
2735
2737
  const t = x((d) => d.chatCollapsed), e = x((d) => !!d.snapshot.mediaId), n = It(), r = zt(), s = et(), i = _n(), a = Sn({
2736
2738
  isLeader: i,
2737
2739
  hasMedia: e,
@@ -2747,14 +2749,14 @@ function ff() {
2747
2749
  f && /* @__PURE__ */ l(ka, { className: "corner-btn" })
2748
2750
  ] });
2749
2751
  }
2750
- const pn = "hadoku:avatar", bn = "hadoku:name", lf = "hadoku:identity", Dt = /* @__PURE__ */ Symbol.for("hadoku:identity-relay"), Zn = /* @__PURE__ */ Symbol.for("hadoku:identity-relayed");
2751
- function cf() {
2752
- return typeof globalThis.BroadcastChannel > "u" ? null : new globalThis.BroadcastChannel(lf);
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);
2753
2755
  }
2754
2756
  function er(t) {
2755
2757
  return t === bn || t === pn;
2756
2758
  }
2757
- function df(t, e) {
2759
+ function uf(t, e) {
2758
2760
  const n = (r) => {
2759
2761
  if (r[Zn]) return;
2760
2762
  const s = r.detail;
@@ -2769,7 +2771,7 @@ function df(t, e) {
2769
2771
  t.removeEventListener(bn, n), t.removeEventListener(pn, n), e.close();
2770
2772
  };
2771
2773
  }
2772
- function uf(t = typeof window > "u" ? void 0 : window, e = cf) {
2774
+ function hf(t = typeof window > "u" ? void 0 : window, e = df) {
2773
2775
  if (!t) return () => {
2774
2776
  };
2775
2777
  const n = t;
@@ -2778,7 +2780,7 @@ function uf(t = typeof window > "u" ? void 0 : window, e = cf) {
2778
2780
  const a = e();
2779
2781
  if (!a) return () => {
2780
2782
  };
2781
- r = { count: 0, stop: df(t, a) }, n[Dt] = r;
2783
+ r = { count: 0, stop: uf(t, a) }, n[Dt] = r;
2782
2784
  }
2783
2785
  r.count++;
2784
2786
  const s = r;
@@ -2787,13 +2789,13 @@ function uf(t = typeof window > "u" ? void 0 : window, e = cf) {
2787
2789
  i || (i = !0, !(--s.count > 0) && (s.stop(), n[Dt] === s && delete n[Dt]));
2788
2790
  };
2789
2791
  }
2790
- function hf() {
2792
+ function mf() {
2791
2793
  F(() => {
2792
- const t = uf(), e = gs((r, s) => {
2793
- const i = bs(s);
2794
+ const t = hf(), e = ps((r, s) => {
2795
+ const i = ys(s);
2794
2796
  _("avatar", "Avatar changed in the settings popout", { sprite: i, source: s.avatar?.source }), Ir(i);
2795
- }), n = ps((r) => {
2796
- _("avatar", "Renamed in the settings popout", { name: r }), ys(r);
2797
+ }), n = bs((r) => {
2798
+ _("avatar", "Renamed in the settings popout", { name: r }), ws(r);
2797
2799
  });
2798
2800
  return () => {
2799
2801
  e(), n(), t();
@@ -2814,19 +2816,19 @@ function ot() {
2814
2816
  }
2815
2817
  }
2816
2818
  let Zt = !1;
2817
- function mf() {
2819
+ function gf() {
2818
2820
  return Zt ? () => {
2819
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 }), () => {
2820
2822
  document.removeEventListener("click", ot, { capture: !0 }), document.removeEventListener("touchend", ot, { capture: !0 }), document.removeEventListener("keydown", ot, { capture: !0 }), Zt = !1;
2821
2823
  });
2822
2824
  }
2823
- const en = "data-wp-input", gf = /* @__PURE__ */ new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
2824
- function pf(t, e) {
2825
- return Dr(e) ? !1 : gf.has(t.key) || We(t) && t.key !== "Escape";
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";
2826
2828
  }
2827
- function bf() {
2829
+ function yf() {
2828
2830
  const t = document.documentElement, e = (r) => {
2829
- pf(r, document.activeElement) && t.setAttribute(en, "remote");
2831
+ bf(r, document.activeElement) && t.setAttribute(en, "remote");
2830
2832
  }, n = (r) => {
2831
2833
  r.detail > 0 && t.setAttribute(en, "pointer");
2832
2834
  };
@@ -2834,26 +2836,26 @@ function bf() {
2834
2836
  window.removeEventListener("keydown", e, !0), window.removeEventListener("click", n, !0), t.removeAttribute(en);
2835
2837
  };
2836
2838
  }
2837
- const yf = 400;
2838
- function wf(t) {
2839
+ const wf = 400;
2840
+ function vf(t) {
2839
2841
  return t === "leader" || t === "viewer" ? t : null;
2840
2842
  }
2841
- async function vf(t) {
2842
- const e = ws(), n = await fetch(`${e}/api/rooms/validate/${encodeURIComponent(t)}`);
2843
+ async function kf(t) {
2844
+ const e = vs(), n = await fetch(`${e}/api/rooms/validate/${encodeURIComponent(t)}`);
2843
2845
  if (n.status === 404) return null;
2844
2846
  if (!n.ok) throw new Error(`validate returned ${n.status}`);
2845
2847
  const r = await n.json();
2846
- return wf(r?.type);
2848
+ return vf(r?.type);
2847
2849
  }
2848
- async function kf(t) {
2850
+ async function Sf(t) {
2849
2851
  for (let e = 0; e < 2; e++)
2850
2852
  try {
2851
- const n = await vf(t);
2853
+ const n = await kf(t);
2852
2854
  x.getState().setRoomKeyType({ roomKey: t, type: n }), _("room", "Room key type probed", { roomKey: t, type: n });
2853
2855
  return;
2854
2856
  } catch (n) {
2855
2857
  if (e === 0) {
2856
- await new Promise((r) => setTimeout(r, yf));
2858
+ await new Promise((r) => setTimeout(r, wf));
2857
2859
  continue;
2858
2860
  }
2859
2861
  N("room", "Room key type probe failed, falling back to socket truth", X(n));
@@ -2863,14 +2865,14 @@ function Pe(t, e) {
2863
2865
  const r = x.getState().allocateClientSeq(), s = { kind: t, client_seq: r, ...e || {} };
2864
2866
  return Cr().emit(Nr.CONTROL, s), r;
2865
2867
  }
2866
- function lc(t) {
2868
+ function cc(t) {
2867
2869
  return Pe("load", { media_id: t });
2868
2870
  }
2869
- function Sf() {
2871
+ function xf() {
2870
2872
  return Pe("home");
2871
2873
  }
2872
- function xf() {
2873
- const t = Fo(), e = oa(), n = et(), r = fa(), s = n && r && !e.ready, i = !e.ready && !s;
2874
+ function Ef() {
2875
+ const t = $o(), e = oa(), n = et(), r = fa(), s = n && r && !e.ready, i = !e.ready && !s;
2874
2876
  return /* @__PURE__ */ l(
2875
2877
  "button",
2876
2878
  {
@@ -2891,13 +2893,13 @@ function xf() {
2891
2893
  className: "ctr-btn",
2892
2894
  title: s ? "Some viewers still loading — play anyway" : i ? "Waiting for sync..." : n ? t.playing ? "Pause" : "Play" : "Only the leader can control playback",
2893
2895
  "data-active": !i && n && t.playing ? "1" : "0",
2894
- children: t.playing ? /* @__PURE__ */ l(Ji, {}) : /* @__PURE__ */ l(Vi, {})
2896
+ children: t.playing ? /* @__PURE__ */ l(Qi, {}) : /* @__PURE__ */ l(Ji, {})
2895
2897
  }
2896
2898
  );
2897
2899
  }
2898
- function Ef() {
2900
+ function Mf() {
2899
2901
  function t() {
2900
- _("controls", "Unload episode clicked"), Sf();
2902
+ _("controls", "Unload episode clicked"), xf();
2901
2903
  }
2902
2904
  return /* @__PURE__ */ l(
2903
2905
  "button",
@@ -2907,21 +2909,21 @@ function Ef() {
2907
2909
  title: "Unload episode (return to lobby)",
2908
2910
  "data-remote-destructive": "",
2909
2911
  "aria-label": "Unload episode",
2910
- children: /* @__PURE__ */ l(ro, {})
2912
+ children: /* @__PURE__ */ l(ao, {})
2911
2913
  }
2912
2914
  );
2913
2915
  }
2914
- function Mf(t) {
2916
+ function _f(t) {
2915
2917
  return !t.isLeader || t.durationMs === 0 ? !0 : !t.ready && !t.canOverride;
2916
2918
  }
2917
- function _f(t) {
2919
+ function Tf(t) {
2918
2920
  return t.localValue !== null ? t.localValue : t.displayPlayheadMs ?? t.snapshotPlayheadMs;
2919
2921
  }
2920
- function Tf(t, e) {
2922
+ function Af(t, e) {
2921
2923
  return e <= 0 ? 0 : t / e;
2922
2924
  }
2923
2925
  const nr = 1e4, rr = 6e4;
2924
- function Af(t, e, n) {
2926
+ function If(t, e, n) {
2925
2927
  if (n <= 0) return null;
2926
2928
  let r;
2927
2929
  switch (t) {
@@ -2948,17 +2950,17 @@ function Af(t, e, n) {
2948
2950
  }
2949
2951
  return Math.round(Math.min(n, Math.max(0, r)));
2950
2952
  }
2951
- const If = 600;
2953
+ const Cf = 600;
2952
2954
  function tn(t) {
2953
2955
  const e = Math.floor(t / 1e3), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = e % 60;
2954
2956
  return n > 0 ? `${n}:${r.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}` : `${r}:${s.toString().padStart(2, "0")}`;
2955
2957
  }
2956
- function Cf({ durationMs: t, displayPlayheadMs: e }) {
2958
+ function Nf({ durationMs: t, displayPlayheadMs: e }) {
2957
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);
2958
2960
  p !== n.mediaId && (M(n.mediaId), h(null), b(!1));
2959
2961
  const R = e ?? n.playheadMs;
2960
2962
  !g && y !== null && Math.abs(R - y) < _r && h(null);
2961
- const T = t || 0, w = _f({ localValue: y, displayPlayheadMs: e, snapshotPlayheadMs: n.playheadMs }), S = P(0);
2963
+ const T = t || 0, w = Tf({ localValue: y, displayPlayheadMs: e, snapshotPlayheadMs: n.playheadMs }), S = P(0);
2962
2964
  F(() => {
2963
2965
  if (g || y === null) return;
2964
2966
  const D = 1e4 - (Date.now() - S.current), B = setTimeout(() => {
@@ -2981,10 +2983,10 @@ function Cf({ durationMs: t, displayPlayheadMs: e }) {
2981
2983
  }, []);
2982
2984
  const C = H((D) => {
2983
2985
  if (D.defaultPrevented) return;
2984
- const B = Af(D.key, w, T);
2986
+ const B = If(D.key, w, T);
2985
2987
  B !== null && (D.preventDefault(), h(B), S.current = Date.now(), v.current && clearTimeout(v.current), v.current = setTimeout(() => {
2986
2988
  v.current = null, _("seek", "Keyboard seek", { to_ms: B }), Pe("seek", { to_ms: B }), m.current = B;
2987
- }, If));
2989
+ }, Cf));
2988
2990
  }, [w, T]);
2989
2991
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2 flex-1", children: [
2990
2992
  /* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-secondary w-[45px] text-right shrink-0", children: tn(w) }),
@@ -2996,8 +2998,8 @@ function Cf({ durationMs: t, displayPlayheadMs: e }) {
2996
2998
  min: 0,
2997
2999
  max: T,
2998
3000
  value: w,
2999
- disabled: Mf({ isLeader: s, ready: r.ready, canOverride: a, durationMs: T }),
3000
- style: { "--progress": `${Tf(w, T) * 100}%` },
3001
+ disabled: _f({ isLeader: s, ready: r.ready, canOverride: a, durationMs: T }),
3002
+ style: { "--progress": `${Af(w, T) * 100}%` },
3001
3003
  onChange: (D) => {
3002
3004
  const B = Number(D.target.value);
3003
3005
  h(B), S.current = Date.now();
@@ -3030,7 +3032,7 @@ function Cf({ durationMs: t, displayPlayheadMs: e }) {
3030
3032
  /* @__PURE__ */ l("span", { className: "text-[11px] font-mono text-text-muted w-[45px] text-left shrink-0", children: tn(T) })
3031
3033
  ] });
3032
3034
  }
3033
- function Nf({ videoRef: t }) {
3035
+ function Rf({ videoRef: t }) {
3034
3036
  const e = x((d) => d.mediaPrefs.volume), n = x((d) => d.mediaPrefs.muted), r = x((d) => d.setVolume), s = x((d) => d.setMuted);
3035
3037
  F(() => {
3036
3038
  const d = t.current;
@@ -3041,7 +3043,7 @@ function Nf({ videoRef: t }) {
3041
3043
  r(u), u > 0 && n && s(!1);
3042
3044
  }, a = () => {
3043
3045
  s(!n);
3044
- }, o = () => n || e === 0 ? /* @__PURE__ */ l(Qi, {}) : e < 0.5 ? /* @__PURE__ */ l(Yi, {}) : /* @__PURE__ */ l(Xi, {}), f = n ? 0 : e, c = Math.round(f * 100);
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);
3045
3047
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
3046
3048
  /* @__PURE__ */ l(
3047
3049
  "button",
@@ -3164,7 +3166,7 @@ function Tn({
3164
3166
  )
3165
3167
  ] });
3166
3168
  }
3167
- function Rf({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3169
+ function Lf({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3168
3170
  if (t.length === 0) return null;
3169
3171
  const s = t.length === 1;
3170
3172
  return /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
@@ -3184,7 +3186,7 @@ function Rf({ tracks: t, selectedIndex: e, onSelect: n, onMenuOpen: r }) {
3184
3186
  )
3185
3187
  ] });
3186
3188
  }
3187
- function Lf({
3189
+ function Ff({
3188
3190
  tracks: t,
3189
3191
  selectedIndex: e,
3190
3192
  onSelect: n,
@@ -3219,7 +3221,7 @@ function Lf({
3219
3221
  )
3220
3222
  ] });
3221
3223
  }
3222
- const ft = 3, Ff = 1e3, $f = 15e3;
3224
+ const ft = 3, $f = 1e3, Pf = 15e3;
3223
3225
  function Ae(t) {
3224
3226
  const e = t?.readyState;
3225
3227
  return e === "open" || e === "ended";
@@ -3231,10 +3233,10 @@ const Z = {
3231
3233
  FALLBACK: 1
3232
3234
  }, nn = 0.5, rn = 3e3;
3233
3235
  function xt(t, e = {}) {
3234
- const { baseMs: n = Ff, capMs: r = $f, 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;
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;
3235
3237
  return i + a;
3236
3238
  }
3237
- const ar = 15, Pf = 35e3, Df = 2e3, an = 10;
3239
+ const ar = 15, Df = 35e3, Bf = 2e3, an = 10;
3238
3240
  function Fe(t, e) {
3239
3241
  if (t.length === 0) return 0;
3240
3242
  if (e >= t[t.length - 1].end_ms) return t.length - 1;
@@ -3268,15 +3270,15 @@ function sn(t, e, n, r = Z.RANGE) {
3268
3270
  function we(t) {
3269
3271
  return t ? Array.from({ length: t.length }, (e, n) => `${t.start(n).toFixed(2)}-${t.end(n).toFixed(2)}`) : [];
3270
3272
  }
3271
- function Bf(t) {
3273
+ function Of(t) {
3272
3274
  if (t.length === 0) return 0;
3273
3275
  const e = t.reduce((r, s) => r + s.bytes, 0), n = t.reduce((r, s) => r + s.durationMs, 0);
3274
3276
  return n === 0 ? 0 : e / n * 1e3;
3275
3277
  }
3276
- const Of = 8e5, jf = 4;
3278
+ const jf = 8e5, Hf = 4;
3277
3279
  function kt(t) {
3278
3280
  if (t === 0) return 6e4;
3279
- const e = Of / t * 1e3 * jf;
3281
+ const e = jf / t * 1e3 * Hf;
3280
3282
  return Math.max(3e4, Math.min(12e4, Math.round(e)));
3281
3283
  }
3282
3284
  function sr(t, e) {
@@ -3284,7 +3286,7 @@ function sr(t, e) {
3284
3286
  if (t[n]?.keyframe) return n;
3285
3287
  return -1;
3286
3288
  }
3287
- function Hf(t, e, n, r) {
3289
+ function Uf(t, e, n, r) {
3288
3290
  const s = t * 1e3 - 100, i = e * 1e3 + 100;
3289
3291
  for (const a of r) {
3290
3292
  const o = n[a];
@@ -3293,7 +3295,7 @@ function Hf(t, e, n, r) {
3293
3295
  }
3294
3296
  return !1;
3295
3297
  }
3296
- function Uf(t) {
3298
+ function Wf(t) {
3297
3299
  const e = [], n = t.replace(/\r\n/g, `
3298
3300
  `).split(`
3299
3301
  `);
@@ -3348,7 +3350,7 @@ function ir(t) {
3348
3350
  let n = 0, r, s;
3349
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;
3350
3352
  }
3351
- function Wf(t) {
3353
+ function zf(t) {
3352
3354
  return t.replace(/<\/?[^>]+(>|$)/g, "").replace(/\{[^}]+\}/g, "").replace(/\\N/g, " ").replace(/\s*\n\s*/g, " ").replace(/\s{2,}/g, " ").trim();
3353
3355
  }
3354
3356
  const xa = {
@@ -3361,7 +3363,7 @@ const xa = {
3361
3363
  // Accessibility-focused: bold white text on solid black box
3362
3364
  contrast: "text-white font-bold bg-black px-3 py-1"
3363
3365
  };
3364
- function zf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3366
+ function Gf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3365
3367
  const [s, i] = $([]), [a, o] = $([]), f = P(null), [c, d] = $(40), [u, g] = $(18), [b, y] = $(t);
3366
3368
  b !== t && (y(t), t || i([])), F(() => {
3367
3369
  if (!t) return;
@@ -3375,7 +3377,7 @@ function zf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3375
3377
  if (!k.ok) throw new Error(`Failed to fetch subtitles (status ${k.status})`);
3376
3378
  const v = await k.text();
3377
3379
  if (w) return;
3378
- const C = Uf(v);
3380
+ const C = Wf(v);
3379
3381
  i(C);
3380
3382
  return;
3381
3383
  } catch (k) {
@@ -3446,7 +3448,7 @@ function zf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3446
3448
  "div",
3447
3449
  {
3448
3450
  className: `${L} font-medium max-w-[95%] inline-block antialiased ${xa[n]}`,
3449
- children: Wf(k.text)
3451
+ children: zf(k.text)
3450
3452
  }
3451
3453
  )
3452
3454
  },
@@ -3483,13 +3485,13 @@ function zf({ subtitleUrl: t, videoRef: e, style: n, enabled: r }) {
3483
3485
  T(M.bl, M.bc, M.br, { bottom: `${c}px` }, f)
3484
3486
  ] });
3485
3487
  }
3486
- const Gf = [
3488
+ const Kf = [
3487
3489
  { value: "classic", label: "Classic" },
3488
3490
  { value: "cinema", label: "Cinema" },
3489
3491
  { value: "minimal", label: "Minimal" },
3490
3492
  { value: "contrast", label: "High Contrast" }
3491
3493
  ];
3492
- function Kf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3494
+ function qf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3493
3495
  return n ? /* @__PURE__ */ E("div", { className: "flex items-center gap-2", children: [
3494
3496
  /* @__PURE__ */ l("span", { className: "text-[10px] opacity-60 uppercase tracking-wide", children: "Style" }),
3495
3497
  /* @__PURE__ */ l(
@@ -3497,7 +3499,7 @@ function Kf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3497
3499
  {
3498
3500
  ariaLabel: "Subtitle style selection",
3499
3501
  title: "Select subtitle style",
3500
- options: Gf.map((s) => ({
3502
+ options: Kf.map((s) => ({
3501
3503
  ...s,
3502
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 }) })
3503
3505
  })),
@@ -3509,7 +3511,7 @@ function Kf({ style: t, onStyleChange: e, enabled: n, onMenuOpen: r }) {
3509
3511
  )
3510
3512
  ] }) : null;
3511
3513
  }
3512
- function qf({ videoRef: t }) {
3514
+ function Vf({ videoRef: t }) {
3513
3515
  const [e, n] = $(!1);
3514
3516
  F(() => {
3515
3517
  const s = () => {
@@ -3539,11 +3541,11 @@ function qf({ videoRef: t }) {
3539
3541
  },
3540
3542
  className: "ctr-btn",
3541
3543
  title: e ? "Exit Fullscreen" : "Enter Fullscreen",
3542
- children: e ? /* @__PURE__ */ l(eo, {}) : /* @__PURE__ */ l(Zi, {})
3544
+ children: e ? /* @__PURE__ */ l(to, {}) : /* @__PURE__ */ l(eo, {})
3543
3545
  }
3544
3546
  );
3545
3547
  }
3546
- function Vf({
3548
+ function Jf({
3547
3549
  videoRef: t,
3548
3550
  mediaId: e,
3549
3551
  durationMs: n,
@@ -3614,18 +3616,18 @@ function Vf({
3614
3616
  return /* @__PURE__ */ E("div", { className: `ctr-bar-wrapper ${rt ? "show" : ""}`, children: [
3615
3617
  /* @__PURE__ */ E("div", { ref: v, className: Lt, children: [
3616
3618
  p && /* @__PURE__ */ E("div", { className: "cluster", children: [
3617
- /* @__PURE__ */ l(xf, {}),
3619
+ /* @__PURE__ */ l(Ef, {}),
3618
3620
  S && /* @__PURE__ */ l(va, {}),
3619
- /* @__PURE__ */ l(Ef, {})
3621
+ /* @__PURE__ */ l(Mf, {})
3620
3622
  ] }),
3621
- /* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(Cf, { durationMs: n, displayPlayheadMs: y }) }),
3623
+ /* @__PURE__ */ l("div", { className: "cluster-seek", children: /* @__PURE__ */ l(Nf, { durationMs: n, displayPlayheadMs: y }) }),
3622
3624
  /* @__PURE__ */ E("div", { className: "cluster", children: [
3623
- /* @__PURE__ */ l(Nf, { videoRef: t }),
3625
+ /* @__PURE__ */ l(Rf, { videoRef: t }),
3624
3626
  s.length > 1 && /* @__PURE__ */ E(he, { children: [
3625
3627
  /* @__PURE__ */ l("div", { className: "w-px h-5 bg-white/20" }),
3626
3628
  " ",
3627
3629
  /* @__PURE__ */ l(
3628
- Rf,
3630
+ Lf,
3629
3631
  {
3630
3632
  tracks: s,
3631
3633
  selectedIndex: i,
@@ -3637,7 +3639,7 @@ function Vf({
3637
3639
  ] }),
3638
3640
  o.length > 0 && /* @__PURE__ */ E("div", { className: "cluster", children: [
3639
3641
  /* @__PURE__ */ l(
3640
- Lf,
3642
+ Ff,
3641
3643
  {
3642
3644
  tracks: o,
3643
3645
  selectedIndex: f,
@@ -3648,7 +3650,7 @@ function Vf({
3648
3650
  }
3649
3651
  ),
3650
3652
  /* @__PURE__ */ l(
3651
- Kf,
3653
+ qf,
3652
3654
  {
3653
3655
  style: g,
3654
3656
  onStyleChange: b,
@@ -3666,7 +3668,7 @@ function Vf({
3666
3668
  onDragOver: I.onDragOver,
3667
3669
  children: [
3668
3670
  /* @__PURE__ */ l(aa, { pending: I.pending, uploading: I.uploading, onRemove: I.remove }),
3669
- K && /* @__PURE__ */ l(Gi, { anchor: tt, width: 340, children: /* @__PURE__ */ l(
3671
+ K && /* @__PURE__ */ l(Ki, { anchor: tt, width: 340, children: /* @__PURE__ */ l(
3670
3672
  jr,
3671
3673
  {
3672
3674
  open: !0,
@@ -3715,7 +3717,7 @@ function Vf({
3715
3717
  ),
3716
3718
  /* @__PURE__ */ E("div", { className: "cluster cluster-tight", children: [
3717
3719
  L && /* @__PURE__ */ l(ka, { className: "ctr-btn" }),
3718
- /* @__PURE__ */ l(qf, { videoRef: t })
3720
+ /* @__PURE__ */ l(Vf, { videoRef: t })
3719
3721
  ] })
3720
3722
  ] }),
3721
3723
  Kt && /* @__PURE__ */ E("div", { className: "ctr-scroll-group", children: [
@@ -3736,42 +3738,42 @@ function Vf({
3736
3738
  onClick: () => Rt("right"),
3737
3739
  tabIndex: -1,
3738
3740
  "aria-label": "Scroll right",
3739
- children: /* @__PURE__ */ l(to, {})
3741
+ children: /* @__PURE__ */ l(no, {})
3740
3742
  }
3741
3743
  )
3742
3744
  ] })
3743
3745
  ] });
3744
3746
  }
3745
- const Jf = 1e3;
3746
- function Qf(t) {
3747
- return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >= Jf;
3747
+ const Qf = 1e3;
3748
+ function Yf(t) {
3749
+ return t.hidden && t.roomPlaying && !t.seekInFlight && !t.ended && !t.localPause && t.sinceUserPauseMs >= Qf;
3748
3750
  }
3749
- function Yf(t, e) {
3751
+ function Xf(t, e) {
3750
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" };
3751
3753
  }
3752
- const Xf = 1e3;
3753
- function Zf(t) {
3754
+ const Zf = 1e3;
3755
+ function el(t) {
3754
3756
  if (!t.roomPlaying || t.seekInFlight) return { kind: "none" };
3755
3757
  const e = t.durationMs > 0 ? Math.min(t.roomMs, t.durationMs) : t.roomMs;
3756
3758
  return Math.abs(e - t.elementMs) > t.driftToleranceMs ? { kind: "seek", targetMs: Math.round(e) } : t.elementPaused ? { kind: "resume" } : { kind: "none" };
3757
3759
  }
3758
- function el(t, e, n) {
3760
+ function tl(t, e, n) {
3759
3761
  return t.playheadMs + (t.playing ? Math.max(0, n - e) : 0);
3760
3762
  }
3761
3763
  function Ea(t) {
3762
- const e = Zs(t);
3764
+ const e = ei(t);
3763
3765
  if (e !== null) return e;
3764
3766
  const n = t.split("/").filter(Boolean);
3765
3767
  return n.length >= 2 ? n.slice(-2).join(" ") : n[n.length - 1] || t;
3766
3768
  }
3767
- function tl(t) {
3769
+ function nl(t) {
3768
3770
  const e = t.split("/").filter(Boolean), n = [`${e.join("/")}/poster.jpg`];
3769
3771
  return e.length >= 2 && n.push(`${e.slice(0, -1).join("/")}/poster.jpg`), n;
3770
3772
  }
3771
- function nl({ mediaId: t, visible: e }) {
3773
+ function rl({ mediaId: t, visible: e }) {
3772
3774
  return t ? /* @__PURE__ */ l("div", { className: `media-title ${e ? "show" : ""}`, children: Ea(t) }) : null;
3773
3775
  }
3774
- const rl = 300, al = 50, sl = 100, il = 100, ol = 100, fl = 100;
3776
+ const al = 300, sl = 50, il = 100, ol = 100, fl = 100, ll = 100;
3775
3777
  function on(t, e) {
3776
3778
  if (t.length === 0) return 0;
3777
3779
  const n = Math.min(Math.floor(e / 100 * t.length), t.length - 1);
@@ -3789,10 +3791,10 @@ function Be(t) {
3789
3791
  max: Math.round(e[e.length - 1])
3790
3792
  };
3791
3793
  }
3792
- function Oe(t, e = rl) {
3794
+ function Oe(t, e = al) {
3793
3795
  t.length > e && t.splice(0, t.length - e);
3794
3796
  }
3795
- class ll {
3797
+ class cl {
3796
3798
  // Fetch
3797
3799
  _fetches = [];
3798
3800
  _fetchTimeoutCount = 0;
@@ -3850,11 +3852,11 @@ class ll {
3850
3852
  }
3851
3853
  /** Called when waitForAppend times out. */
3852
3854
  recordAppendTimeout(e, n, r) {
3853
- this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts, al);
3855
+ this._appendTimeouts.push({ index: e, timeoutMs: n, queueDepth: r, ts: performance.now() }), Oe(this._appendTimeouts, sl);
3854
3856
  }
3855
3857
  /** Called when a seek completes (COMPLETED path in _execute). */
3856
3858
  recordSeekCompleted(e, n, r) {
3857
- this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks, sl);
3859
+ this._seeks.push({ caller: e, targetMs: n, durationMs: r, ts: performance.now() }), Oe(this._seeks, il);
3858
3860
  }
3859
3861
  /** Called when waitForSeeked resolves via timeout rather than the 'seeked' event. */
3860
3862
  recordWaitForSeekedTimeout() {
@@ -3876,11 +3878,11 @@ class ll {
3876
3878
  this._stallStart && (this._stalls.push({
3877
3879
  ...this._stallStart,
3878
3880
  durationMs: Math.round(performance.now() - this._stallStart.ts)
3879
- }), Oe(this._stalls, il), this._stallStart = null);
3881
+ }), Oe(this._stalls, ol), this._stallStart = null);
3880
3882
  }
3881
3883
  /** Called from _doEvict with the reason tag passed by the caller. */
3882
3884
  recordEvict(e, n, r) {
3883
- this._evictCounts[e] = (this._evictCounts[e] ?? 0) + 1, this._evicts.push({ reason: e, start: n, end: r, ts: performance.now() }), Oe(this._evicts, ol);
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);
3884
3886
  }
3885
3887
  /** Called from FragmentManager.reconcileLoadedStates() when the browser's
3886
3888
  * own silent quota eviction is detected (fragments 'loaded' but gone from
@@ -3922,7 +3924,7 @@ class ll {
3922
3924
  },
3923
3925
  audio: {
3924
3926
  driftMs: Be(this._audioDrifts),
3925
- highDriftCount: this._audioDrifts.filter((c) => c > fl).length,
3927
+ highDriftCount: this._audioDrifts.filter((c) => c > ll).length,
3926
3928
  samples: this._audioDrifts.slice(-20).map((c) => Math.round(c))
3927
3929
  },
3928
3930
  stalls: {
@@ -3971,9 +3973,9 @@ class ll {
3971
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 = [];
3972
3974
  }
3973
3975
  }
3974
- const de = new ll();
3976
+ const de = new cl();
3975
3977
  Tr("__WP_PERF__", de);
3976
- class cl {
3978
+ class dl {
3977
3979
  cache = /* @__PURE__ */ new Map();
3978
3980
  getOrCreate(e) {
3979
3981
  let n = this.cache.get(e);
@@ -4012,8 +4014,8 @@ class cl {
4012
4014
  this.cache.clear();
4013
4015
  }
4014
4016
  }
4015
- const Me = new cl(), or = 60, dl = 5e3;
4016
- class ul {
4017
+ const Me = new dl(), or = 60, ul = 5e3;
4018
+ class hl {
4017
4019
  constructor(e) {
4018
4020
  this.deps = e;
4019
4021
  }
@@ -4093,7 +4095,7 @@ class ul {
4093
4095
  if (this.evictStartedAt === 0)
4094
4096
  return this.evictStartedAt = Date.now(), !0;
4095
4097
  const e = Date.now() - this.evictStartedAt;
4096
- return e < dl ? !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);
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);
4097
4099
  }
4098
4100
  /** Called on dispose, on SourceBuffer error, and on media change
4099
4101
  * (FragmentManager.setIndex) — see the note at that call site. */
@@ -4259,13 +4261,13 @@ class He {
4259
4261
  * hold began. Lets processAppendQueue bound a hold that would otherwise
4260
4262
  * never end — see APPEND_HOLD_MAX_MS. */
4261
4263
  appendHold = null;
4262
- eviction = new ul({
4264
+ eviction = new hl({
4263
4265
  getFragments: () => this.fragments,
4264
4266
  getSourceBuffer: () => this.sourceBuffer,
4265
4267
  getMediaSource: () => this.mediaSource,
4266
4268
  isDisposed: () => this.disposed,
4267
4269
  fragmentStates: this.fragmentStates,
4268
- getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs > Pf ? null : this.pendingSeekTargetMs
4270
+ getPendingSeekTargetMs: () => this.pendingSeekTargetMs !== null && Date.now() - this.pendingSeekSetAtMs > Df ? null : this.pendingSeekTargetMs
4269
4271
  });
4270
4272
  lastGapWarnMs = 0;
4271
4273
  stableGapSignature = null;
@@ -4291,7 +4293,7 @@ class He {
4291
4293
  // timing, and APPEND-HOLD reason counts. Read by emitInitDigest() which warns
4292
4294
  // once at gate-pass time so the load shape is visible in session logs without
4293
4295
  // wp:reportLogs=true.
4294
- static INIT_TRACK_FRAGS = vs;
4296
+ static INIT_TRACK_FRAGS = ks;
4295
4297
  loadStartTs = 0;
4296
4298
  initFetchStart = 0;
4297
4299
  initFetchEnd = 0;
@@ -4369,8 +4371,8 @@ class He {
4369
4371
  * `fragment-route.realmedia.test.ts`; this is the client-side backstop.
4370
4372
  */
4371
4373
  async tryFragmentRoute(e, n, r) {
4372
- if (this.fragmentRouteDisabled || !this.delivery || !ks()) return null;
4373
- const s = Ss(this.delivery, e);
4374
+ if (this.fragmentRouteDisabled || !this.delivery || !Ss()) return null;
4375
+ const s = xs(this.delivery, e);
4374
4376
  if (!s)
4375
4377
  return this.disableFragmentRoute(e, "could not build a URL for this config"), null;
4376
4378
  try {
@@ -4499,14 +4501,14 @@ class He {
4499
4501
  }
4500
4502
  this.initAppendDone = performance.now(), this.initState = "loaded", this.initRetryCount = 0, _("buffer", `INIT-LOADED sbRanges=[${we(this.sourceBuffer?.buffered).join(", ")}]`), this.processAppendQueue();
4501
4503
  } catch (o) {
4502
- ee("buffer", "Init segment fetch/append failed", { error: o.message }), a() || (this.initState = "pending", this.initRetryCount += 1, this.initRetryCount >= xs ? (this.initFailed = !0, N("buffer", "INIT-GIVE-UP — init segment failed repeatedly; rejecting waiters for fast recovery", {
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", {
4503
4505
  attempts: this.initRetryCount,
4504
4506
  error: o.message
4505
4507
  }), this.rejectAllWaiters(new Error("init segment failed after repeated retries"))) : this.disposed || setTimeout(() => {
4506
4508
  !this.disposed && this.initState === "pending" && this.fetchInit().catch((f) => {
4507
4509
  ee("buffer", "INIT-RETRY failed", X(f));
4508
4510
  });
4509
- }, Es));
4511
+ }, Ms));
4510
4512
  }
4511
4513
  }
4512
4514
  /** Runs inside updateend after an append completes. Decides whether MSE
@@ -4594,7 +4596,7 @@ class He {
4594
4596
  ]), r = [], s = this.currentPlayheadMs / 1e3;
4595
4597
  for (let o = 1; o < e.buffered.length; o++) {
4596
4598
  const f = e.buffered.end(o - 1), c = e.buffered.start(o);
4597
- c <= s || Hf(f, c, this.fragments, n) || r.push(`${f.toFixed(2)}-${c.toFixed(2)}`);
4599
+ c <= s || Uf(f, c, this.fragments, n) || r.push(`${f.toFixed(2)}-${c.toFixed(2)}`);
4598
4600
  }
4599
4601
  if (r.length === 0) {
4600
4602
  this.stableGapSignature = null, this.stableGapSince = 0;
@@ -5033,7 +5035,7 @@ class He {
5033
5035
  if (this.appendHold?.index !== e)
5034
5036
  return this.appendHold = { index: e, since: r }, !1;
5035
5037
  const s = r - this.appendHold.since;
5036
- if (s < Ms) return !1;
5038
+ if (s < _s) return !1;
5037
5039
  N("buffer", `APPEND-HOLD-BREAK #${e} held ${s}ms behind ${n.length} pending fetch(es) — declaring them dead so the queue can drain`, {
5038
5040
  headIndex: e,
5039
5041
  heldMs: s,
@@ -5097,7 +5099,7 @@ class He {
5097
5099
  if (this.disposed || !this.sourceBuffer || (this.currentPlayheadMs = e, this.currentJobs.size >= st)) return;
5098
5100
  const n = Fe(this.fragments, e), r = Math.min(this.fragments.length - 1, Fe(this.fragments, e + ut)), s = Date.now();
5099
5101
  for (let a = n; a <= r; a++)
5100
- this.fragmentStates.get(a) === "error" && s - (this.errorTimestamps.get(a) ?? 0) >= _s && ((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)));
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)));
5101
5103
  let i = 0;
5102
5104
  for (let a = n; a <= r && i < st - this.currentJobs.size; a++) {
5103
5105
  const o = this.fragmentStates.get(a);
@@ -5128,7 +5130,7 @@ class He {
5128
5130
  /** Public eviction entry point used by MediaPlayer / prefetch. Delegates
5129
5131
  * to the strategy which owns the isEvicting state + range choice logic. */
5130
5132
  evictBefore(e) {
5131
- this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <= Df && (this.pendingSeekTargetMs = null), this.eviction.evictBefore(e);
5133
+ this.pendingSeekTargetMs !== null && Math.abs(e - this.pendingSeekTargetMs) <= Bf && (this.pendingSeekTargetMs = null), this.eviction.evictBefore(e);
5132
5134
  }
5133
5135
  // Public entry point for socket reconnect scenarios. Clears stale in-flight
5134
5136
  // fetches and their pendingFetchIndices entries so the queue is unblocked on
@@ -5276,7 +5278,7 @@ class He {
5276
5278
  return { ranges: e, gaps: e.length > 1, fragmentStates: n };
5277
5279
  }
5278
5280
  getAverageDownloadRate() {
5279
- return Bf(this.downloadSamples);
5281
+ return Of(this.downloadSamples);
5280
5282
  }
5281
5283
  /** Nominal media end time (ms) = last fragment's end. 0 if no index loaded.
5282
5284
  * Reported in health so the leader's status card can tell "near end-of-stream,
@@ -5350,7 +5352,7 @@ class He {
5350
5352
  if (this.eosRetryTimer) return;
5351
5353
  this.eosRetryTimer = setTimeout(() => {
5352
5354
  this.eosRetryTimer = null, this.tryEndOfStream();
5353
- }, Ts);
5355
+ }, As);
5354
5356
  return;
5355
5357
  }
5356
5358
  try {
@@ -5394,14 +5396,14 @@ class He {
5394
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;
5395
5397
  }
5396
5398
  }
5397
- function hl(t, e) {
5399
+ function ml(t, e) {
5398
5400
  return !!t && t !== "eng" && e;
5399
5401
  }
5400
- function ml(t) {
5401
- return t.override !== null ? t.override : t.globalEnabled || hl(t.selectedAudioLang, t.hasEngSub);
5402
+ function gl(t) {
5403
+ return t.override !== null ? t.override : t.globalEnabled || ml(t.selectedAudioLang, t.hasEngSub);
5402
5404
  }
5403
5405
  const Ma = "wp_reload_history", In = "wp_phantom_reload", _a = 5 * 6e4, fr = 3;
5404
- function gl() {
5406
+ function pl() {
5405
5407
  try {
5406
5408
  const t = sessionStorage.getItem(Ma);
5407
5409
  return (t ? JSON.parse(t) : []).filter((n) => Date.now() - n < _a);
@@ -5410,7 +5412,7 @@ function gl() {
5410
5412
  }
5411
5413
  }
5412
5414
  function yn(t, e) {
5413
- const n = gl();
5415
+ const n = pl();
5414
5416
  if (n.length >= fr) {
5415
5417
  Bn(
5416
5418
  "error",
@@ -5446,13 +5448,13 @@ function lr() {
5446
5448
  return null;
5447
5449
  }
5448
5450
  }
5449
- function pl() {
5451
+ function bl() {
5450
5452
  try {
5451
5453
  sessionStorage.removeItem(In);
5452
5454
  } catch {
5453
5455
  }
5454
5456
  }
5455
- function bl() {
5457
+ function yl() {
5456
5458
  const t = navigator;
5457
5459
  try {
5458
5460
  return typeof t.getAutoplayPolicy == "function" ? t.getAutoplayPolicy("mediaelement") : void 0;
@@ -5460,11 +5462,11 @@ function bl() {
5460
5462
  return;
5461
5463
  }
5462
5464
  }
5463
- function yl(t, e) {
5465
+ function wl(t, e) {
5464
5466
  return t === "disallowed" ? "deferred" : e ? "user-muted" : t === "allowed-muted" ? "muted-bridge" : "audible";
5465
5467
  }
5466
5468
  function Ta(t, e) {
5467
- const n = bl(), r = yl(n, e.userWantsMuted);
5469
+ const n = yl(), r = wl(n, e.userWantsMuted);
5468
5470
  _(e.label, "autoplay plan", { policy: n ?? "unknown", plan: r, userWantsMuted: e.userWantsMuted });
5469
5471
  const s = () => {
5470
5472
  t.muted = !0, t.play().then(() => {
@@ -5504,7 +5506,7 @@ function Aa(t, e = 3e3) {
5504
5506
  t.addEventListener("seeked", s, { once: !0 });
5505
5507
  });
5506
5508
  }
5507
- class wl {
5509
+ class vl {
5508
5510
  // ── State ──
5509
5511
  _seekInFlight = !1;
5510
5512
  /** Route taken by the in-flight seek (buffered/loading/nearby-pending/far) —
@@ -5696,10 +5698,10 @@ class wl {
5696
5698
  }
5697
5699
  }
5698
5700
  let Et = null;
5699
- function vl() {
5700
- Et === null && (_("health", "Starting health reporting"), cr(), Et = window.setInterval(cr, As));
5701
- }
5702
5701
  function kl() {
5702
+ Et === null && (_("health", "Starting health reporting"), cr(), Et = window.setInterval(cr, Is));
5703
+ }
5704
+ function Sl() {
5703
5705
  Et !== null && (_("health", "Stopping health reporting"), window.clearInterval(Et), Et = null);
5704
5706
  }
5705
5707
  function cr() {
@@ -5733,13 +5735,13 @@ function cr() {
5733
5735
  fragments_error: i.fragmentStates.error || 0,
5734
5736
  video_ready_state: r?.readyState ?? -1,
5735
5737
  duration_ms: n.getMediaEndMs(),
5736
- delivery_arm: Cs(),
5737
- ...Sl(r),
5738
- pong_age_ms: Is(),
5738
+ delivery_arm: Ns(),
5739
+ ...xl(r),
5740
+ pong_age_ms: Cs(),
5739
5741
  reported_at: Date.now()
5740
5742
  });
5741
5743
  }
5742
- function Sl(t) {
5744
+ function xl(t) {
5743
5745
  const e = typeof navigator > "u" ? void 0 : navigator, n = e?.connection;
5744
5746
  return {
5745
5747
  page_visible: typeof document.visibilityState == "string" ? document.visibilityState === "visible" : void 0,
@@ -5751,8 +5753,8 @@ function Sl(t) {
5751
5753
  net_downlink_mbps: typeof n?.downlink == "number" && n.downlink >= 0 ? n.downlink : void 0
5752
5754
  };
5753
5755
  }
5754
- const xl = 3e3;
5755
- function El() {
5756
+ const El = 3e3;
5757
+ function Ml() {
5756
5758
  const [t, e] = $(!1), n = P(null), r = P(!1), s = () => {
5757
5759
  n.current && (clearTimeout(n.current), n.current = null);
5758
5760
  }, i = H((f = 3e3) => {
@@ -5762,7 +5764,7 @@ function El() {
5762
5764
  }, []), a = H(() => {
5763
5765
  r.current || (s(), e(!1));
5764
5766
  }, []), o = H((f) => {
5765
- r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(xl));
5767
+ r.current !== f && (r.current = f, f ? (s(), e(!0)) : i(El));
5766
5768
  }, [i]);
5767
5769
  return F(() => {
5768
5770
  const f = () => {
@@ -5773,7 +5775,7 @@ function El() {
5773
5775
  };
5774
5776
  }, [i]), { controlsVisible: t, showControls: i, hideControls: a, setControlsHeld: o };
5775
5777
  }
5776
- const Ia = [], Ca = [], Ml = {
5778
+ const Ia = [], Ca = [], _l = {
5777
5779
  fragments: Ia,
5778
5780
  durationMs: null,
5779
5781
  mseCodec: null,
@@ -5781,8 +5783,8 @@ const Ia = [], Ca = [], Ml = {
5781
5783
  audioTracks: Ca,
5782
5784
  contentToken: null
5783
5785
  };
5784
- function _l(t, e) {
5785
- if (!t || t.url !== e) return Ml;
5786
+ function Tl(t, e) {
5787
+ if (!t || t.url !== e) return _l;
5786
5788
  const n = t.data;
5787
5789
  return {
5788
5790
  fragments: n.fragments || Ia,
@@ -5811,7 +5813,7 @@ function dr(t) {
5811
5813
  return null;
5812
5814
  }
5813
5815
  }
5814
- function Tl(t) {
5816
+ function Al(t) {
5815
5817
  const [e, n] = $(null);
5816
5818
  return F(() => {
5817
5819
  const r = new AbortController();
@@ -5864,7 +5866,7 @@ function Tl(t) {
5864
5866
  return s(), () => {
5865
5867
  r.abort();
5866
5868
  };
5867
- }, [t]), ye(() => _l(e, t), [e, t]);
5869
+ }, [t]), ye(() => Tl(e, t), [e, t]);
5868
5870
  }
5869
5871
  const fn = {
5870
5872
  audioTracks: [],
@@ -5872,10 +5874,10 @@ const fn = {
5872
5874
  selectedAudioIndex: 0,
5873
5875
  selectedSubtitleIndex: 0
5874
5876
  };
5875
- function Al(t) {
5876
- const [e, n] = $(fn), r = Ns(), s = x((d) => d.mediaPrefs.preferredAudioLang), [i, a] = $(t);
5877
+ function Il(t) {
5878
+ const [e, n] = $(fn), r = Rs(), s = x((d) => d.mediaPrefs.preferredAudioLang), [i, a] = $(t);
5877
5879
  i !== t && (a(t), t && n(fn));
5878
- const o = ue(() => ({ origin: Rs(r), preferredAudioLang: s }));
5880
+ const o = ue(() => ({ origin: Ls(r), preferredAudioLang: s }));
5879
5881
  F(() => {
5880
5882
  if (!t) return;
5881
5883
  const d = new AbortController(), { origin: u, preferredAudioLang: g } = o();
@@ -5908,12 +5910,12 @@ function Al(t) {
5908
5910
  setSelectedSubtitleIndex: c
5909
5911
  };
5910
5912
  }
5911
- const Il = 100;
5912
- function Cl(t) {
5913
- return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs > Il ? "advancing" : "stalled";
5913
+ const Cl = 100;
5914
+ function Nl(t) {
5915
+ return !t.roomPlaying || t.videoPaused ? "not-playing" : t.seekInFlight ? "seeking" : t.advancedMs > Cl ? "advancing" : "stalled";
5914
5916
  }
5915
- const ln = 4e4, Nl = 3e3;
5916
- function Rl(t, e, n, r, s, i) {
5917
+ const ln = 4e4, Rl = 3e3;
5918
+ function Ll(t, e, n, r, s, i) {
5917
5919
  const a = ue((p) => {
5918
5920
  const M = {};
5919
5921
  return (i?.current ?? []).forEach((T, w) => {
@@ -5938,13 +5940,13 @@ function Rl(t, e, n, r, s, i) {
5938
5940
  function R() {
5939
5941
  M();
5940
5942
  const v = t.current;
5941
- v && (h.current = v.currentTime, y.current = setTimeout(T, Nl));
5943
+ v && (h.current = v.currentTime, y.current = setTimeout(T, Rl));
5942
5944
  }
5943
5945
  function T() {
5944
5946
  y.current = null;
5945
5947
  const v = t.current;
5946
5948
  if (!v) return;
5947
- const C = x.getState(), D = n.current, B = Cl({
5949
+ const C = x.getState(), D = n.current, B = Nl({
5948
5950
  roomPlaying: C.snapshot.playing,
5949
5951
  videoPaused: v.paused,
5950
5952
  seekInFlight: !!D?.seekInFlight,
@@ -6104,8 +6106,8 @@ function Rl(t, e, n, r, s, i) {
6104
6106
  };
6105
6107
  }, [r, t, e, n]);
6106
6108
  }
6107
- const Ll = 1.5;
6108
- function Fl(t, e, n, r, s, i) {
6109
+ const Fl = 1.5;
6110
+ function $l(t, e, n, r, s, i) {
6109
6111
  const a = P(null), o = P(null), f = H(() => {
6110
6112
  a.current && (clearInterval(a.current), a.current = null), o.current?.(), o.current = null;
6111
6113
  }, []);
@@ -6134,7 +6136,7 @@ function Fl(t, e, n, r, s, i) {
6134
6136
  };
6135
6137
  a.current = setInterval(b, jn);
6136
6138
  const y = () => {
6137
- performance.now() - g >= jn * Ll && b();
6139
+ performance.now() - g >= jn * Fl && b();
6138
6140
  };
6139
6141
  if (c && (c.addEventListener("timeupdate", y), o.current = () => c.removeEventListener("timeupdate", y)), c && !n.current?.seekInFlight) {
6140
6142
  g = performance.now();
@@ -6144,13 +6146,13 @@ function Fl(t, e, n, r, s, i) {
6144
6146
  return f;
6145
6147
  }, [r, s, t, e, n, i, f]), { stopPrefetch: f };
6146
6148
  }
6147
- function $l(t, e, n, r, s, i) {
6149
+ function Pl(t, e, n, r, s, i) {
6148
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));
6149
6151
  F(() => {
6150
6152
  const u = t.current;
6151
6153
  if (!u || !r) return;
6152
6154
  const g = a.playheadMs, b = n.current, y = o !== f.current;
6153
- f.current = o, !(!y && Math.abs(g - b) <= Ls) && (_("buffer", "Seek triggered", {
6155
+ f.current = o, !(!y && Math.abs(g - b) <= Fs) && (_("buffer", "Seek triggered", {
6154
6156
  targetMs: g,
6155
6157
  lastApplied: b,
6156
6158
  delta: Math.round(g - b),
@@ -6176,7 +6178,7 @@ function ur(t, e) {
6176
6178
  }, { once: !0 });
6177
6179
  });
6178
6180
  }
6179
- function Pl(t) {
6181
+ function Dl(t) {
6180
6182
  const e = x((a) => a.playlist), n = x((a) => a.activePlaylistIndex), r = x((a) => a.snapshot.mediaId), s = e?.id, i = ue(() => e);
6181
6183
  F(() => {
6182
6184
  const a = i();
@@ -6275,11 +6277,11 @@ function Pl(t) {
6275
6277
  }, [s, n, r, t]);
6276
6278
  }
6277
6279
  const Le = "bg-play";
6278
- function Dl() {
6280
+ function Bl() {
6279
6281
  const t = x.getState();
6280
6282
  return !!t.snapshot.leaderId && t.snapshot.leaderId === t.me.clientId;
6281
6283
  }
6282
- function Bl(t) {
6284
+ function Ol(t) {
6283
6285
  return typeof Image > "u" ? Promise.resolve(null) : t.reduce(
6284
6286
  (e, n) => e.then((r) => r ?? new Promise((s) => {
6285
6287
  const i = new Image();
@@ -6288,18 +6290,18 @@ function Bl(t) {
6288
6290
  Promise.resolve(null)
6289
6291
  );
6290
6292
  }
6291
- function Ol(t, e, n, r, s, i) {
6293
+ function jl(t, e, n, r, s, i) {
6292
6294
  const a = P(!1), o = P(0), f = ue((d) => i(d)), c = ue((d) => {
6293
6295
  const u = t.current, g = e.current;
6294
6296
  if (!u || !s) return;
6295
- const b = x.getState(), y = u.currentTime * 1e3, h = el(b.snapshot, b.snapshotReceivedAt, Date.now()), m = Zf({
6297
+ const b = x.getState(), y = u.currentTime * 1e3, h = tl(b.snapshot, b.snapshotReceivedAt, Date.now()), m = el({
6296
6298
  roomPlaying: b.snapshot.playing,
6297
6299
  seekInFlight: !!g?.seekInFlight,
6298
6300
  elementPaused: u.paused,
6299
6301
  elementMs: y,
6300
6302
  roomMs: h,
6301
6303
  durationMs: r,
6302
- driftToleranceMs: Xf
6304
+ driftToleranceMs: Zf
6303
6305
  }), p = Math.round(h - y);
6304
6306
  if (m.kind === "none") {
6305
6307
  _(Le, "resync not needed", { reason: d, driftMs: p });
@@ -6312,7 +6314,7 @@ function Ol(t, e, n, r, s, i) {
6312
6314
  if (!d || !s) return;
6313
6315
  const u = () => {
6314
6316
  const b = x.getState();
6315
- Qf({
6317
+ Yf({
6316
6318
  hidden: document.visibilityState === "hidden",
6317
6319
  roomPlaying: b.snapshot.playing,
6318
6320
  seekInFlight: !!e.current?.seekInFlight,
@@ -6338,9 +6340,9 @@ function Ol(t, e, n, r, s, i) {
6338
6340
  artwork: T ? [{ src: T }] : []
6339
6341
  }));
6340
6342
  };
6341
- y(null), Bl(tl(n).map(Fs)).then(y);
6343
+ y(null), Ol(nl(n).map($s)).then(y);
6342
6344
  const h = (T) => () => {
6343
- const w = x.getState(), S = Yf(T, { isLeader: Dl(), roomPlaying: w.snapshot.playing });
6345
+ const w = x.getState(), S = Xf(T, { isLeader: Bl(), roomPlaying: w.snapshot.playing });
6344
6346
  switch (_(Le, "media session press", { action: T, result: S.kind }), T === "pause" && (o.current = Date.now()), S.kind) {
6345
6347
  case "control":
6346
6348
  Pe(S.control), S.control === "pause" && d.pause();
@@ -6414,11 +6416,11 @@ function Ol(t, e, n, r, s, i) {
6414
6416
  }, [t]);
6415
6417
  }
6416
6418
  const St = 5e3, hr = ".ctr-bar-wrapper";
6417
- function jl(t, e, n, r) {
6419
+ function Hl(t, e, n, r) {
6418
6420
  const s = ue((a) => {
6419
6421
  const o = t.current;
6420
6422
  if (!o) return;
6421
- 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 = ui({
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({
6422
6424
  key: a.key,
6423
6425
  back: We(a),
6424
6426
  modifier: a.ctrlKey || a.metaKey || a.altKey,
@@ -6469,19 +6471,19 @@ function jl(t, e, n, r) {
6469
6471
  }, [t]);
6470
6472
  }
6471
6473
  function mr(t, e, n) {
6472
- 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 = hi(t.key, Fr(n), n.hasAttribute(dt), s);
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);
6473
6475
  if (i === null) return;
6474
6476
  t.preventDefault();
6475
6477
  const a = $r(e), o = a.indexOf(n);
6476
6478
  a[Math.min(a.length - 1, Math.max(0, o + i))]?.focus({ preventScroll: !1 });
6477
6479
  }
6478
- const Hl = 3e5, Ul = 1, Wl = 1;
6480
+ const Ul = 3e5, Wl = 1, zl = 1;
6479
6481
  function cn(t) {
6480
6482
  ee("buffer", "initializePlayback threw", X(t));
6481
6483
  }
6482
- function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6483
- const r = P(null), s = P(null), [i, a] = $(!1), [o, f] = $(!1), { controlsVisible: c, showControls: d, hideControls: u, setControlsHeld: g } = El();
6484
- jl(s, c, d, u), F(() => {
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(() => {
6485
6487
  const A = () => f(!!document.fullscreenElement);
6486
6488
  return document.addEventListener("fullscreenchange", A), () => document.removeEventListener("fullscreenchange", A);
6487
6489
  }, []);
@@ -6492,11 +6494,11 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6492
6494
  initSegment: m,
6493
6495
  audioTracks: p,
6494
6496
  contentToken: M
6495
- } = Tl(e), R = H((A) => {
6497
+ } = Al(e), R = H((A) => {
6496
6498
  if (!M) return null;
6497
6499
  const j = t.replace(new RegExp(`/${$t.replace(/\./g, "\\.")}$`), "");
6498
6500
  return j === t ? null : { baseUrl: j, token: M, trackId: A };
6499
- }, [M, t]), w = h !== null && p.length > 0, S = x((A) => A.readiness), L = $s(), k = et();
6501
+ }, [M, t]), w = h !== null && p.length > 0, S = x((A) => A.readiness), L = Ps(), k = et();
6500
6502
  F(() => {
6501
6503
  const A = s.current;
6502
6504
  if (!A) return;
@@ -6512,7 +6514,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6512
6514
  setSelectedAudioIndex: pt,
6513
6515
  selectedSubtitleIndex: bt,
6514
6516
  setSelectedSubtitleIndex: Gt
6515
- } = Al(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 = ml({
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({
6516
6518
  override: Ra,
6517
6519
  globalEnabled: se,
6518
6520
  selectedAudioLang: at,
@@ -6542,7 +6544,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6542
6544
  const wt = H((A) => {
6543
6545
  nt({ isBuffering: A });
6544
6546
  }, [nt]), Ln = H((A) => {
6545
- if (V.current >= Wl) {
6547
+ if (V.current >= zl) {
6546
6548
  yn("phantom-recreate-exhausted", { reason: A, recreates: V.current, mediaId: n });
6547
6549
  return;
6548
6550
  }
@@ -6566,7 +6568,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6566
6568
  })
6567
6569
  );
6568
6570
  if (await A.ensureBuffered(G, "initial"), A.isDisposed) return;
6569
- const re = Ps;
6571
+ const re = Ds;
6570
6572
  await Promise.allSettled(ne);
6571
6573
  const J = ce.map(
6572
6574
  (z) => z.waitForBuffered(G + $e, re)
@@ -6576,7 +6578,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6576
6578
  aheadMs: Math.round(A.getBufferedAheadMs(G)),
6577
6579
  targetMs: $e
6578
6580
  }), A.isDisposed) return;
6579
- if (A.getBufferedAheadMs(G) > Hl && A.getLoadedCount() === 0) {
6581
+ if (A.getBufferedAheadMs(G) > Ul && A.getLoadedCount() === 0) {
6580
6582
  A.dumpBufferDiagnostics(G, "phantom-detected"), N("buffer", "PHANTOM-BUFFER detected at gate — recreating MediaSource", {
6581
6583
  gateAheadMs: Math.round(A.getBufferedAheadMs(G)),
6582
6584
  loaded: A.getLoadedCount(),
@@ -6592,7 +6594,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6592
6594
  totalMs: Ke
6593
6595
  });
6594
6596
  const Ce = Te ? "gate-pass" : "gate-timeout";
6595
- A.emitInitDigest("video", Ce), ce.forEach((z, ie) => z.emitInitDigest(`audio:${ie}`, Ce)), v.current || (v.current = !0, Ds(n));
6597
+ A.emitInitDigest("video", Ce), ce.forEach((z, ie) => z.emitInitDigest(`audio:${ie}`, Ce)), v.current || (v.current = !0, Bs(n));
6596
6598
  let Y = G;
6597
6599
  if (j && Y > 0) {
6598
6600
  const z = j.buffered;
@@ -6602,7 +6604,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6602
6604
  }
6603
6605
  j.currentTime = Y / 1e3, await Aa(j, 3e3);
6604
6606
  }
6605
- tt.current = Y, a(!0), C.current = !0, U.current = 0, lr() && N("buffer", "RECOVERY-SUCCESS — playback initialized after an auto-reload", { mediaId: n }), pl(), _("buffer", "initializePlayback complete", {
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", {
6606
6608
  mediaId: n,
6607
6609
  startMs: G,
6608
6610
  seekMs: Y,
@@ -6667,7 +6669,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6667
6669
  return;
6668
6670
  }
6669
6671
  const re = ne.includes("SourceBuffer is full"), J = ne.includes("init segment failed");
6670
- U.current += 1, re || J || U.current > Ul ? (ee("buffer", "Initialize playback failed — recreating MediaSource", {
6672
+ U.current += 1, re || J || U.current > Wl ? (ee("buffer", "Initialize playback failed — recreating MediaSource", {
6671
6673
  error: ne,
6672
6674
  mediaId: n,
6673
6675
  attempt: U.current,
@@ -6715,12 +6717,12 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6715
6717
  O.current = Te;
6716
6718
  const Ke = ++ze.current;
6717
6719
  window.__FRAGMENT_MANAGER__ = Te, window.__AUDIO_FRAGMENT_MANAGERS__ = I.current;
6718
- const Ce = new wl({
6720
+ const Ce = new vl({
6719
6721
  videoRef: r,
6720
6722
  fragmentManagerRef: O,
6721
6723
  audioFragmentManagersRef: I
6722
6724
  });
6723
- Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce, vl();
6725
+ Se.current = Ce, window.__SEEK_COORDINATOR__ = Ce, kl();
6724
6726
  const Y = r.current, qe = () => {
6725
6727
  const z = Y?.error;
6726
6728
  z && (ee("video", `Media error code=${z.code}: ${z.message}`, {
@@ -6786,7 +6788,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6786
6788
  }
6787
6789
  };
6788
6790
  return Y && (J.addEventListener("sourceopen", Ne, { once: !0 }), re = URL.createObjectURL(J), Y.src = re, Y.addEventListener("error", qe)), () => {
6789
- Y?.pause(), Y && Y.removeEventListener("error", qe), J.removeEventListener("sourceopen", Ne), kl(), Ce.dispose(), Se.current = null, Te.dispose(), O.current = null, window.__FRAGMENT_MANAGER__ = null, window.__AUDIO_FRAGMENT_MANAGERS__ = null;
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;
6790
6792
  for (const z of I.current) z.dispose();
6791
6793
  if (I.current = [], J.readyState === "open") {
6792
6794
  for (const z of [D.current, ...K.current])
@@ -6903,9 +6905,9 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6903
6905
  ke.current = !1;
6904
6906
  }
6905
6907
  })().catch((ne) => ee("audio", "MSE audio swap failed", X(ne)));
6906
- }, [w, i, _e, p, n, t, wt, R]), $l(Se, r, tt, i, Ft, Nn), Rl(r, O, Se, i, Nn, I), Ol(r, Se, n, y ?? 0, i, Ft);
6907
- const { stopPrefetch: Fn } = Fl(r, O, Se, i, nt, I);
6908
- Pl(O), F(() => {
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(() => {
6909
6911
  Ct.current = Fn;
6910
6912
  }, [Fn]);
6911
6913
  const Oa = H(() => {
@@ -6936,7 +6938,7 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6936
6938
  }
6937
6939
  ),
6938
6940
  /* @__PURE__ */ l(
6939
- zf,
6941
+ Gf,
6940
6942
  {
6941
6943
  subtitleUrl: Ha,
6942
6944
  videoRef: r,
@@ -6944,9 +6946,9 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6944
6946
  enabled: yt
6945
6947
  }
6946
6948
  ),
6947
- /* @__PURE__ */ l(nl, { mediaId: n, visible: c }),
6949
+ /* @__PURE__ */ l(rl, { mediaId: n, visible: c }),
6948
6950
  /* @__PURE__ */ l(
6949
- Vf,
6951
+ Jf,
6950
6952
  {
6951
6953
  videoRef: r,
6952
6954
  mediaId: n,
@@ -6994,14 +6996,14 @@ function zl({ mediaUrl: t, indexUrl: e, mediaId: n }) {
6994
6996
  }
6995
6997
  );
6996
6998
  }
6997
- function Gl() {
6999
+ function Kl() {
6998
7000
  const t = x((n) => n.snapshot.mediaId), e = ye(() => t ? { mediaId: t, ...Rr(t) } : null, [t]);
6999
- return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(zl, { mediaUrl: e.mediaUrl, indexUrl: e.indexUrl, mediaId: e.mediaId }) }) : /* @__PURE__ */ l(js, {});
7001
+ return e ? /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Gl, { mediaUrl: e.mediaUrl, indexUrl: e.indexUrl, mediaId: e.mediaId }) }) : /* @__PURE__ */ l(Hs, {});
7000
7002
  }
7001
- const Kl = (t) => {
7002
- const e = Qs(t);
7003
+ const ql = (t) => {
7004
+ const e = Ys(t);
7003
7005
  return e.render(
7004
- /* @__PURE__ */ l(Bs.Provider, { value: Os(), children: /* @__PURE__ */ l(Gl, {}) })
7006
+ /* @__PURE__ */ l(Os.Provider, { value: js(), children: /* @__PURE__ */ l(Kl, {}) })
7005
7007
  ), {
7006
7008
  update() {
7007
7009
  },
@@ -7012,21 +7014,21 @@ const Kl = (t) => {
7012
7014
  queueMicrotask(() => e.unmount());
7013
7015
  }
7014
7016
  };
7015
- }, ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7017
+ }, Vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7016
7018
  __proto__: null,
7017
- mount: Kl
7018
- }, Symbol.toStringTag, { value: "Module" })), Vl = {
7019
+ mount: ql
7020
+ }, Symbol.toStringTag, { value: "Module" })), Jl = {
7019
7021
  id: "player",
7020
7022
  name: "Media player",
7021
- load: () => Promise.resolve(ql)
7022
- }, Jl = vn(() => import("./MediaDrawer-BUvcV9QZ.js"));
7023
- function Ql() {
7023
+ load: () => Promise.resolve(Vl)
7024
+ }, Ql = vn(() => import("./MediaDrawer-BSqgbHWw.js"));
7025
+ function Yl() {
7024
7026
  const t = x((d) => d.snapshot), e = x((d) => d.ensureAutoIdentity), n = zt(), r = ye(
7025
- () => n ? xi(n, window.location.origin) : null,
7027
+ () => n ? Ei(n, window.location.origin) : null,
7026
7028
  [n]
7027
- ), s = Hs(), i = P(!1), [a, o] = $(!1), f = s.roomKey || null;
7028
- hf(), F(() => mf(), []), F(() => bf(), []), F(() => {
7029
- f && kf(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);
7030
7032
  }, [f]), F(() => {
7031
7033
  const d = () => o(!0);
7032
7034
  return window.addEventListener(hn, d), () => window.removeEventListener(hn, d);
@@ -7038,9 +7040,9 @@ function Ql() {
7038
7040
  try {
7039
7041
  await Promise.race([
7040
7042
  Promise.all([
7041
- Us(),
7042
7043
  Ws(),
7043
- zs().then(Ir)
7044
+ zs(),
7045
+ Gs().then(Ir)
7044
7046
  ]),
7045
7047
  new Promise((y) => setTimeout(y, u))
7046
7048
  ]);
@@ -7051,7 +7053,7 @@ function Ql() {
7051
7053
  const g = x.getState();
7052
7054
  _("room", "Joining room", { roomKey: f, name: g.name, sprite: g.sprite }), e();
7053
7055
  const b = x.getState();
7054
- Gs({
7056
+ Ks({
7055
7057
  room_key: f,
7056
7058
  name: b.name || void 0,
7057
7059
  sprite: b.sprite || void 0
@@ -7065,53 +7067,53 @@ function Ql() {
7065
7067
  }
7066
7068
  return f ? /* @__PURE__ */ E("div", { className: "relative flex-1 flex overflow-hidden min-h-0", children: [
7067
7069
  /* @__PURE__ */ E("div", { className: "flex-1 relative bg-black overflow-hidden min-w-0", children: [
7068
- /* @__PURE__ */ l(Gn, { activity: Vl, roomKey: t.roomId ?? "", layer: "base" }),
7070
+ /* @__PURE__ */ l(Gn, { activity: Jl, roomKey: t.roomId ?? "", layer: "base" }),
7069
7071
  r && t.roomId && /* @__PURE__ */ l(Ur, { children: /* @__PURE__ */ l(Gn, { activity: r, roomKey: t.roomId, layer: "overlay" }, r.id) }),
7070
- /* @__PURE__ */ E(sf, { children: [
7071
- /* @__PURE__ */ l(Yl, {}),
7072
- /* @__PURE__ */ l(tf, {}),
7073
- /* @__PURE__ */ l(ff, {}),
7074
- /* @__PURE__ */ l(af, {})
7072
+ /* @__PURE__ */ E(of, { children: [
7073
+ /* @__PURE__ */ l(Xl, {}),
7074
+ /* @__PURE__ */ l(nf, {}),
7075
+ /* @__PURE__ */ l(lf, {}),
7076
+ /* @__PURE__ */ l(sf, {})
7075
7077
  ] })
7076
7078
  ] }),
7077
- /* @__PURE__ */ l(Oo, {}),
7078
- /* @__PURE__ */ l(Ze.Suspense, { fallback: /* @__PURE__ */ l(Wo, { open: a, onClose: c }), children: /* @__PURE__ */ l(Jl, { open: a, onClose: c }) })
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 }) })
7079
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: [
7080
7082
  "No room key provided. Go to the ",
7081
7083
  /* @__PURE__ */ l("a", { href: "/", className: "underline", children: "home page" }),
7082
7084
  " to select a room."
7083
7085
  ] }) }));
7084
7086
  }
7085
- function Yl() {
7087
+ function Xl() {
7086
7088
  const t = x((s) => s.floatingChatEnabled), e = x((s) => s.chatCollapsed), n = x((s) => !!s.snapshot.mediaId), r = It();
7087
7089
  return /* @__PURE__ */ l(
7088
- Ko,
7090
+ qo,
7089
7091
  {
7090
- shown: Mi(t, { hasMedia: n, chatCollapsed: e, isFullscreen: r }),
7092
+ shown: _i(t, { hasMedia: n, chatCollapsed: e, isFullscreen: r }),
7091
7093
  className: "absolute right-4 bottom-[35%] w-80 z-20"
7092
7094
  }
7093
7095
  );
7094
7096
  }
7095
- const cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7097
+ const dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7096
7098
  __proto__: null,
7097
- default: Ql
7099
+ default: Yl
7098
7100
  }, Symbol.toStringTag, { value: "Module" }));
7099
7101
  export {
7100
- fc as B,
7101
- to as C,
7102
- Uo as D,
7103
- ro as E,
7104
- Vi as P,
7105
- cc as R,
7106
- sc as S,
7107
- Ho as a,
7108
- ic as b,
7109
- Sf as c,
7110
- oc as d,
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,
7111
7113
  et as e,
7112
7114
  We as i,
7113
7115
  zr as p,
7114
- lc as s,
7116
+ cc as s,
7115
7117
  _n as u
7116
7118
  };
7117
- //# sourceMappingURL=Room-HSQO8Lrm.js.map
7119
+ //# sourceMappingURL=Room-BqP-6mZY.js.map