@vocalstack/player 0.1.0-alpha.16 → 0.1.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var da = Object.defineProperty;
2
2
  var Ma = (t, e, n) => e in t ? da(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var de = (t, e, n) => Ma(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { jsx as i, jsxs as g, Fragment as Ue } from "react/jsx-runtime";
3
+ var he = (t, e, n) => Ma(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { jsx as i, jsxs as g, Fragment as _e } from "react/jsx-runtime";
5
5
  import { useState as I, useRef as v, useEffect as _, useLayoutEffect as Qt, createContext as ti, useMemo as Ie, useContext as ha, useCallback as Xe, Fragment as ga, forwardRef as fa, useImperativeHandle as Na } from "react";
6
6
  import { createPortal as pa } from "react-dom";
7
7
  import { VocalStackError as ni, VocalStack as si } from "@vocalstack/js-sdk";
@@ -9,7 +9,7 @@ const ri = "https://vocalstack.com", ma = "data:image/svg+xml;base64,PHN2ZyB4bWx
9
9
  function La({ size: t = 16, sw: e = 1.5, children: n, style: s, ...r }) {
10
10
  return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "none", stroke: "currentColor", strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", style: { flex: "none", ...s }, ...r, children: n });
11
11
  }
12
- const X = {
12
+ const J = {
13
13
  plus: "M12 4.5v15m7.5-7.5h-15",
14
14
  check: "M4.5 12.75l6 6 9-13.5",
15
15
  downloaded: "M12 21a9 9 0 100-18 9 9 0 000 18zM12 6.75v10.5m0 0l3.75-3.75M12 17.25l-3.75-3.75",
@@ -52,7 +52,7 @@ const X = {
52
52
  headphones: ["M3.75 16.5v-4.5a8.25 8.25 0 0 1 16.5 0v4.5", "M3.75 14.25h1.5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-1.5a1.5 1.5 0 0 1-1.5-1.5v-3a1.5 1.5 0 0 1 1.5-1.5Z", "M18.75 14.25h1.5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-1.5a1.5 1.5 0 0 1-1.5-1.5v-3a1.5 1.5 0 0 1 1.5-1.5Z"],
53
53
  video: "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"
54
54
  };
55
- function le({ d: t, ...e }) {
55
+ function oe({ d: t, ...e }) {
56
56
  return /* @__PURE__ */ i(La, { ...e, children: (Array.isArray(t) ? t : [t]).map((n) => /* @__PURE__ */ i("path", { d: n }, n)) });
57
57
  }
58
58
  function ka({ size: t = 15 }) {
@@ -86,7 +86,7 @@ function va({ size: t = 12 }) {
86
86
  /* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
87
87
  ] });
88
88
  }
89
- function jn({ dark: t, height: e = 20, link: n = !0 }) {
89
+ function In({ dark: t, height: e = 20, link: n = !0 }) {
90
90
  const s = /* @__PURE__ */ i("img", { src: t ? ma : ya, alt: "VocalStack", decoding: "sync", style: { height: e, width: "auto", display: "block" } });
91
91
  return n ? /* @__PURE__ */ i("a", { href: ri, style: { display: "block" }, children: s }) : s;
92
92
  }
@@ -99,7 +99,7 @@ function Er({ children: t, panel: e, inset: n, className: s = "", style: r }) {
99
99
  function pt({ checked: t, onChange: e, label: n, disabled: s }) {
100
100
  return /* @__PURE__ */ i("button", { type: "button", role: "switch", "aria-checked": t, "aria-label": n, className: "vs-toggle", disabled: s, onClick: () => e(!t), children: /* @__PURE__ */ i("span", { className: "vs-toggle__knob" }) });
101
101
  }
102
- function os({ value: t, onChange: e, options: n, size: s, bordered: r = !0, fill: a }) {
102
+ function cs({ value: t, onChange: e, options: n, size: s, bordered: r = !0, fill: a }) {
103
103
  const o = v(null), [l, c] = I(null), d = Math.max(0, n.findIndex((u) => u.value === t));
104
104
  return Qt(() => {
105
105
  const u = o.current;
@@ -125,12 +125,12 @@ function os({ value: t, onChange: e, options: n, size: s, bordered: r = !0, fill
125
125
  function ja({ children: t, onClick: e, label: n, size: s, variant: r, bordered: a = !0, active: o, title: l }) {
126
126
  return /* @__PURE__ */ i("button", { type: "button", className: `vs-icon-btn${s === "sm" ? " vs-icon-btn--sm" : ""}${r === "primary" ? " vs-icon-btn--primary" : ""}${o ? " vs-icon-btn--primary" : ""}${a ? "" : " vs-icon-btn--borderless"}`, onClick: e, "aria-label": n, title: l ?? n, children: t });
127
127
  }
128
- function Ln({ flag: t, code: e, label: n, onClick: s, variant: r, block: a, bordered: o = !0, size: l, style: c }) {
128
+ function vn({ flag: t, code: e, label: n, onClick: s, variant: r, block: a, bordered: o = !0, size: l, style: c }) {
129
129
  const d = a && !!e;
130
130
  return /* @__PURE__ */ g("button", { type: "button", className: `vs-lang-chip${r ? ` vs-lang-chip--${r}` : ""}${a ? " vs-lang-chip--block" : ""}${a && !d ? " vs-lang-chip--bare" : ""}${o ? "" : " vs-lang-chip--borderless"}${l === "sm" ? " vs-lang-chip--sm" : ""}`, onClick: s, "aria-label": n ? e ? `${n} (${e})` : n : e, style: c, children: [
131
131
  t ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__flag", children: t }) : null,
132
132
  d ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__name", children: n ?? e }) : a ? null : /* @__PURE__ */ i("span", { className: "vs-lang-chip__code", children: e }),
133
- /* @__PURE__ */ i(le, { d: X.chevronDown, size: 13, className: "vs-lang-chip__chevron", style: { color: r === "primary" ? "currentColor" : "var(--vs-text-muted)" } })
133
+ /* @__PURE__ */ i(oe, { d: J.chevronDown, size: 13, className: "vs-lang-chip__chevron", style: { color: r === "primary" ? "currentColor" : "var(--vs-text-muted)" } })
134
134
  ] });
135
135
  }
136
136
  function za({ value: t, label: e = "Copy", onCopied: n }) {
@@ -153,7 +153,7 @@ function za({ value: t, label: e = "Copy", onCopied: n }) {
153
153
  },
154
154
  children: [
155
155
  /* @__PURE__ */ i("span", { className: "vs-sr", "aria-live": "polite", children: s ? `Copied${e.replace(/^Copy\b/, "")}` : "" }),
156
- s ? /* @__PURE__ */ i(le, { d: X.check, size: 13, sw: 2.2 }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" }) })
156
+ s ? /* @__PURE__ */ i(oe, { d: J.check, size: 13, sw: 2.2 }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" }) })
157
157
  ]
158
158
  }
159
159
  );
@@ -175,7 +175,7 @@ function Ia(t, e) {
175
175
  };
176
176
  }, [t, e]);
177
177
  }
178
- function ls({ children: t, ms: e = 220 }) {
178
+ function us({ children: t, ms: e = 220 }) {
179
179
  const n = v(null), s = v(null), [r, a] = I(null);
180
180
  return Qt(() => {
181
181
  const o = s.current, l = n.current;
@@ -215,7 +215,7 @@ function $t({ open: t, onClose: e, title: n, titleNode: s, note: r, doneLabel: a
215
215
  ] }) }) : null;
216
216
  }
217
217
  ti(0);
218
- function cs({ children: t, style: e, className: n }) {
218
+ function ds({ children: t, style: e, className: n }) {
219
219
  return /* @__PURE__ */ i("div", { className: n ? `eyebrow ${n}` : "eyebrow", style: e, children: t });
220
220
  }
221
221
  let yn = null;
@@ -225,7 +225,7 @@ function Bc(t) {
225
225
  function ai(t) {
226
226
  yn == null || yn(t);
227
227
  }
228
- function zn() {
228
+ function On() {
229
229
  try {
230
230
  return document.createElement("audio").canPlayType("audio/x-caf; codecs=opus") === "probably" ? "caf" : "ogg";
231
231
  } catch {
@@ -252,14 +252,14 @@ async function Ca(t) {
252
252
  }
253
253
  }
254
254
  function ba(t, e, n = {}) {
255
- const s = new URLSearchParams({ kind: "delivery", format: zn() });
255
+ const s = new URLSearchParams({ kind: "delivery", format: On() });
256
256
  return n.accessToken && s.set("access_token", n.accessToken), n.listenerToken && s.set("listenerToken", n.listenerToken), n.shareCode && s.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
257
257
  }
258
258
  function Yr(t, e, n = {}, s = "background") {
259
- const r = new URLSearchParams({ kind: s, format: zn() });
259
+ const r = new URLSearchParams({ kind: s, format: On() });
260
260
  return n.accessToken && r.set("access_token", n.accessToken), n.listenerToken && r.set("listenerToken", n.listenerToken), n.shareCode && r.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${r}`;
261
261
  }
262
- function Kn(t, e, n, s = {}) {
262
+ function Xn(t, e, n, s = {}) {
263
263
  const r = new URLSearchParams({ kind: n });
264
264
  return n === "delivery" && r.set("format", "mp3"), s.accessToken && r.set("access_token", s.accessToken), s.listenerToken && r.set("listenerToken", s.listenerToken), s.shareCode && r.set("shareCode", s.shareCode), `${t}/v1/recordings/${e}/audio?${r}`;
265
265
  }
@@ -288,17 +288,17 @@ function Ea(t, e, n) {
288
288
  }
289
289
  class Ya {
290
290
  constructor(e = {}) {
291
- de(this, "entries", /* @__PURE__ */ new Map());
292
- de(this, "wanted", []);
293
- de(this, "used", []);
294
- de(this, "fetcher");
295
- de(this, "concurrency");
296
- de(this, "keep");
297
- de(this, "retryMs");
298
- de(this, "now");
299
- de(this, "toUrl");
300
- de(this, "revoke");
301
- de(this, "onReady", () => {
291
+ he(this, "entries", /* @__PURE__ */ new Map());
292
+ he(this, "wanted", []);
293
+ he(this, "used", []);
294
+ he(this, "fetcher");
295
+ he(this, "concurrency");
296
+ he(this, "keep");
297
+ he(this, "retryMs");
298
+ he(this, "now");
299
+ he(this, "toUrl");
300
+ he(this, "revoke");
301
+ he(this, "onReady", () => {
302
302
  });
303
303
  this.fetcher = e.fetcher ?? (typeof fetch == "function" ? (n, s) => fetch(n, { signal: s }) : null), this.concurrency = Math.max(1, e.concurrency ?? 2), this.keep = Math.max(2, e.keep ?? 24), this.retryMs = e.retryMs ?? 4e3, this.now = e.now ?? (() => Date.now()), this.toUrl = e.toUrl ?? ((n) => URL.createObjectURL(n)), this.revoke = e.revoke ?? ((n) => {
304
304
  try {
@@ -392,50 +392,50 @@ class ui extends Error {
392
392
  }
393
393
  const nt = class nt {
394
394
  constructor() {
395
- de(this, "el", null);
396
- de(this, "clips", /* @__PURE__ */ new Map());
397
- de(this, "order", []);
398
- de(this, "current", null);
399
- de(this, "currentPart", 0);
400
- de(this, "partBase", 0);
401
- de(this, "within", null);
402
- de(this, "playing", !1);
403
- de(this, "muted", !1);
404
- de(this, "rate", 1);
405
- de(this, "volume", 1);
406
- de(this, "finite", !1);
407
- de(this, "onSentence", () => {
395
+ he(this, "el", null);
396
+ he(this, "clips", /* @__PURE__ */ new Map());
397
+ he(this, "order", []);
398
+ he(this, "current", null);
399
+ he(this, "currentPart", 0);
400
+ he(this, "partBase", 0);
401
+ he(this, "within", null);
402
+ he(this, "playing", !1);
403
+ he(this, "muted", !1);
404
+ he(this, "rate", 1);
405
+ he(this, "volume", 1);
406
+ he(this, "finite", !1);
407
+ he(this, "onSentence", () => {
408
408
  });
409
- de(this, "onWaiting", () => {
409
+ he(this, "onWaiting", () => {
410
410
  });
411
- de(this, "onStarting", () => {
411
+ he(this, "onStarting", () => {
412
412
  });
413
- de(this, "speakable", () => !0);
414
- de(this, "coming", () => !1);
415
- de(this, "gapBefore", () => 0);
416
- de(this, "flow", !1);
417
- de(this, "silentSpan", () => null);
418
- de(this, "lastDone", null);
419
- de(this, "rested", !1);
420
- de(this, "rest", null);
421
- de(this, "sequence", []);
422
- de(this, "seqAt", /* @__PURE__ */ new Map());
423
- de(this, "spoken", /* @__PURE__ */ new Set());
424
- de(this, "lastRead", null);
425
- de(this, "started", !1);
426
- de(this, "awaiting", null);
427
- de(this, "waitTimer", null);
428
- de(this, "onError", () => {
413
+ he(this, "speakable", () => !0);
414
+ he(this, "coming", () => !1);
415
+ he(this, "gapBefore", () => 0);
416
+ he(this, "flow", !1);
417
+ he(this, "silentSpan", () => null);
418
+ he(this, "lastDone", null);
419
+ he(this, "rested", !1);
420
+ he(this, "rest", null);
421
+ he(this, "sequence", []);
422
+ he(this, "seqAt", /* @__PURE__ */ new Map());
423
+ he(this, "spoken", /* @__PURE__ */ new Set());
424
+ he(this, "lastRead", null);
425
+ he(this, "started", !1);
426
+ he(this, "awaiting", null);
427
+ he(this, "waitTimer", null);
428
+ he(this, "onError", () => {
429
429
  });
430
- de(this, "floor", 0);
431
- de(this, "loading", null);
432
- de(this, "readAhead", 0);
433
- de(this, "readAheadS", 0);
434
- de(this, "prefetch", new Ya());
435
- de(this, "warmed", /* @__PURE__ */ new Set());
436
- de(this, "startingSince", /* @__PURE__ */ new Map());
437
- de(this, "retries", /* @__PURE__ */ new Map());
438
- de(this, "retryTimer", null);
430
+ he(this, "floor", 0);
431
+ he(this, "loading", null);
432
+ he(this, "readAhead", 0);
433
+ he(this, "readAheadS", 0);
434
+ he(this, "prefetch", new Ya());
435
+ he(this, "warmed", /* @__PURE__ */ new Set());
436
+ he(this, "startingSince", /* @__PURE__ */ new Map());
437
+ he(this, "retries", /* @__PURE__ */ new Map());
438
+ he(this, "retryTimer", null);
439
439
  }
440
440
  setSequence(e) {
441
441
  e.length === this.sequence.length && e.every((n, s) => this.sequence[s] === n) || (this.sequence = e, this.seqAt = new Map(e.map((n, s) => [n, s])), this.order.sort((n, s) => this.rank(n) - this.rank(s)));
@@ -868,8 +868,8 @@ const nt = class nt {
868
868
  this.onWaiting(null), this.onStarting(null), this.playing = !1, this.current = null, this.currentPart = 0, this.partBase = 0, this.loading = null, this.floor = 0, this.lastRead = null, this.started = !1, this.stopWaiting(), this.spoken.clear(), this.retryTimer && (clearTimeout(this.retryTimer), this.retryTimer = null), this.retries.clear(), this.prefetch.clear(), e && (e.pause(), e.removeAttribute("src"), e.load()), this.el = null;
869
869
  }
870
870
  };
871
- de(nt, "WAIT_MS", 15e3), de(nt, "START_WAIT_MS", 4e3), de(nt, "COMING_MS", 12e4), de(nt, "SKEW_LINES", 3), de(nt, "RETRIES", 4), de(nt, "RETRY_MS", 1200), de(nt, "STARTING_MS", 3e5);
872
- let us = nt;
871
+ he(nt, "WAIT_MS", 15e3), he(nt, "START_WAIT_MS", 4e3), he(nt, "COMING_MS", 12e4), he(nt, "SKEW_LINES", 3), he(nt, "RETRIES", 4), he(nt, "RETRY_MS", 1200), he(nt, "STARTING_MS", 3e5);
872
+ let Ms = nt;
873
873
  function di(t, e) {
874
874
  return e == null ? t.find((n) => !n.voiceKey) ?? null : t.find((n) => n.voiceKey === e) ?? t.find((n) => !n.voiceKey && n.voice === e) ?? null;
875
875
  }
@@ -886,7 +886,7 @@ function _a(t, e, n, s = {}, r) {
886
886
  return {
887
887
  sentenceId: d,
888
888
  lang: t.lang,
889
- src: `${n}/v1/recordings/${e}/voice/${d}?lang=${encodeURIComponent(t.lang)}${c}&format=${zn()}${w > 0 ? `&part=${w}` : ""}${u ? `&v=${encodeURIComponent(u)}` : ""}${l}`,
889
+ src: `${n}/v1/recordings/${e}/voice/${d}?lang=${encodeURIComponent(t.lang)}${c}&format=${On()}${w > 0 ? `&part=${w}` : ""}${u ? `&v=${encodeURIComponent(u)}` : ""}${l}`,
890
890
  durationS: h === 1 ? ((k = t.clipDur) == null ? void 0 : k[String(d)]) ?? 0 : 0,
891
891
  voice: t.voice ?? null,
892
892
  cloned: !1,
@@ -914,8 +914,8 @@ function Ua(t, e, n) {
914
914
  if (a += s[l], o < a) return l;
915
915
  return t.length - 1;
916
916
  }
917
- const ds = "vs.recentLangs", Ms = /* @__PURE__ */ new Set();
918
- function hs(t, e) {
917
+ const hs = "vs.recentLangs", gs = /* @__PURE__ */ new Set();
918
+ function fs(t, e) {
919
919
  try {
920
920
  const n = localStorage.getItem(t);
921
921
  return n === null ? e : JSON.parse(n);
@@ -928,25 +928,25 @@ function hi(t, e) {
928
928
  e == null ? localStorage.removeItem(t) : localStorage.setItem(t, JSON.stringify(e));
929
929
  } catch {
930
930
  }
931
- for (const n of Ms) n();
931
+ for (const n of gs) n();
932
932
  }
933
933
  function js(t, e) {
934
- const [n, s] = I(() => hs(t, e));
934
+ const [n, s] = I(() => fs(t, e));
935
935
  return _(() => {
936
- const r = () => s(hs(t, e));
937
- return Ms.add(r), window.addEventListener("storage", r), () => {
938
- Ms.delete(r), window.removeEventListener("storage", r);
936
+ const r = () => s(fs(t, e));
937
+ return gs.add(r), window.addEventListener("storage", r), () => {
938
+ gs.delete(r), window.removeEventListener("storage", r);
939
939
  };
940
940
  }, [t]), [n, (r) => {
941
941
  s(r), hi(t, r);
942
942
  }];
943
943
  }
944
944
  function _r(t) {
945
- const e = hs(ds, []);
946
- hi(ds, Array.isArray(e) ? e.filter((n) => n !== t) : []);
945
+ const e = fs(hs, []);
946
+ hi(hs, Array.isArray(e) ? e.filter((n) => n !== t) : []);
947
947
  }
948
948
  function gi() {
949
- const [t, e] = js(ds, []), n = Array.isArray(t) ? t : [];
949
+ const [t, e] = js(hs, []), n = Array.isArray(t) ? t : [];
950
950
  return [n, (s) => {
951
951
  s && e([s, ...n.filter((r) => r !== s)].slice(0, 3));
952
952
  }];
@@ -973,8 +973,8 @@ function zs({ open: t, onClose: e, value: n, onSelect: s, languages: r, searchPl
973
973
  const f = Ie(() => {
974
974
  const S = M.trim().toLowerCase();
975
975
  return [...S ? r.filter((z) => z.label.toLowerCase().includes(S) || z.native.toLowerCase().includes(S) || z.code.toLowerCase().includes(S)) : r].sort((z, E) => {
976
- const ie = l.indexOf(z.code), V = l.indexOf(E.code);
977
- return ie !== -1 || V !== -1 ? (ie === -1 ? 999 : ie) - (V === -1 ? 999 : V) : z.label.localeCompare(E.label);
976
+ const re = l.indexOf(z.code), V = l.indexOf(E.code);
977
+ return re !== -1 || V !== -1 ? (re === -1 ? 999 : re) - (V === -1 ? 999 : V) : z.label.localeCompare(E.label);
978
978
  });
979
979
  }, [r, M, l]), O = Ie(
980
980
  () => M ? [] : c.map((S) => f.find(($) => $.code === S)).filter((S) => !!S).sort((S, $) => S.label.localeCompare($.label)),
@@ -1004,30 +1004,30 @@ function zs({ open: t, onClose: e, value: n, onSelect: s, languages: r, searchPl
1004
1004
  z.stopPropagation(), _r(S.code);
1005
1005
  }, onKeyDown: (z) => {
1006
1006
  (z.key === "Enter" || z.key === " ") && (z.preventDefault(), z.stopPropagation(), _r(S.code));
1007
- }, children: /* @__PURE__ */ i(le, { d: X.close, size: 16 }) }) }),
1008
- /* @__PURE__ */ i("span", { className: `vs-picker__slot${L ? " vs-picker__slot--wide" : ""}`, title: S.voice ? "Voice available" : L ? "No voice speaks this language yet" : void 0, children: L ? k === S.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : S.voice && /* @__PURE__ */ i(le, { d: X.headphones, size: 16 }) }),
1009
- /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === S.code && (h === S.code ? /* @__PURE__ */ i(at, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(le, { d: X.check, size: 16, sw: 2.2 })) })
1007
+ }, children: /* @__PURE__ */ i(oe, { d: J.close, size: 16 }) }) }),
1008
+ /* @__PURE__ */ i("span", { className: `vs-picker__slot${L ? " vs-picker__slot--wide" : ""}`, title: S.voice ? "Voice available" : L ? "No voice speaks this language yet" : void 0, children: L ? k === S.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : S.voice && /* @__PURE__ */ i(oe, { d: J.headphones, size: 16 }) }),
1009
+ /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === S.code && (h === S.code ? /* @__PURE__ */ i(at, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: J.check, size: 16, sw: 2.2 })) })
1010
1010
  ]
1011
1011
  },
1012
1012
  S.code
1013
1013
  );
1014
- }, ee = /* @__PURE__ */ g("div", { className: "vs-picker__search", children: [
1015
- /* @__PURE__ */ i(le, { d: X.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
1014
+ }, te = /* @__PURE__ */ g("div", { className: "vs-picker__search", children: [
1015
+ /* @__PURE__ */ i(oe, { d: J.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
1016
1016
  /* @__PURE__ */ i("input", { value: M, onChange: (S) => p(S.target.value), placeholder: a, "aria-label": a })
1017
1017
  ] }), j = /* @__PURE__ */ g("div", { className: "vs-picker__list", children: [
1018
1018
  o && !M && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__row", "data-vs-original": "", "aria-selected": n === null, onClick: () => {
1019
1019
  s(null), u || e();
1020
1020
  }, children: [
1021
- /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(le, { d: X.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
1021
+ /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d: J.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
1022
1022
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0 }, children: [
1023
1023
  /* @__PURE__ */ i("div", { className: "vs-picker__label", children: o }),
1024
1024
  /* @__PURE__ */ i("div", { className: "vs-picker__native", children: "As spoken · no translation" })
1025
1025
  ] }),
1026
1026
  /* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
1027
1027
  /* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
1028
- /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(le, { d: X.check, size: 16, sw: 2.2 }) })
1028
+ /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: J.check, size: 16, sw: 2.2 }) })
1029
1029
  ] }),
1030
- O.length > 0 && /* @__PURE__ */ g(Ue, { children: [
1030
+ O.length > 0 && /* @__PURE__ */ g(_e, { children: [
1031
1031
  /* @__PURE__ */ i("div", { className: "vs-picker__head", children: "RECENT" }),
1032
1032
  O.map((S) => A(S, !0)),
1033
1033
  /* @__PURE__ */ i("div", { className: "vs-picker__rule" })
@@ -1044,7 +1044,7 @@ function zs({ open: t, onClose: e, value: n, onSelect: s, languages: r, searchPl
1044
1044
  "”"
1045
1045
  ] })
1046
1046
  ] });
1047
- return { search: ee, list: j };
1047
+ return { search: te, list: j };
1048
1048
  }
1049
1049
  function $a({ open: t, onClose: e, title: n, note: s, sticky: r, ...a }) {
1050
1050
  const { search: o, list: l } = zs({ ...a, open: t, onClose: e });
@@ -1055,7 +1055,7 @@ function Ur(t, e) {
1055
1055
  t.muted = e.muted, Math.abs(t.currentTime - e.t) > Ba && (t.currentTime = Math.max(0, e.t)), e.playing ? t.paused && Promise.resolve(t.play()).catch(() => {
1056
1056
  }) : t.paused || t.pause();
1057
1057
  }
1058
- const kn = "Remove background sound", Ha = "Takes out everything that isn't speech: music, ambience and noise.";
1058
+ const jn = "Remove background sound", Ha = "Takes out everything that isn't speech: music, ambience and noise.";
1059
1059
  function Va(t) {
1060
1060
  const e = Math.max(0, Math.floor(t)), n = Math.floor(e / 3600), s = Math.floor(e % 3600 / 60), r = String(e % 60).padStart(2, "0");
1061
1061
  return n ? `${n}:${String(s).padStart(2, "0")}:${r}` : `${s}:${r}`;
@@ -1113,7 +1113,7 @@ async function to(t) {
1113
1113
  const n = await e.json().catch(() => null);
1114
1114
  return { ready: !1, retryS: qa(e.status, n), ...Ja(n) };
1115
1115
  }
1116
- function Jn(t) {
1116
+ function es(t) {
1117
1117
  t && (t.pause(), t.removeAttribute("src"), t.load());
1118
1118
  }
1119
1119
  function Ni(t, e) {
@@ -1148,7 +1148,7 @@ function Ni(t, e) {
1148
1148
  });
1149
1149
  };
1150
1150
  return N(), () => {
1151
- M = !0, p && clearTimeout(p), Jn(c.current), c.current = null, Jn(d.current[0]), Jn(d.current[1]), d.current = [null, null], u.current = [NaN, NaN];
1151
+ M = !0, p && clearTimeout(p), es(c.current), c.current = null, es(d.current[0]), es(d.current[1]), d.current = [null, null], u.current = [NaN, NaN];
1152
1152
  };
1153
1153
  }, [t]), _(() => {
1154
1154
  const M = () => {
@@ -1357,7 +1357,7 @@ function ho(t, e) {
1357
1357
  function Jt(t, e) {
1358
1358
  return (e ?? []).map((n, s) => ({ text: String(n.text ?? ""), prob: n.prob ?? null, start: n.start ?? 0, end: n.end ?? 0, alts: n.alts, ...n.script === !0 ? { script: !0 } : {}, ...n.script === !0 && typeof n.recognized == "string" ? { recognized: n.recognized } : {}, seq: t, idx: s }));
1359
1359
  }
1360
- function Xn(t, e) {
1360
+ function ts(t, e) {
1361
1361
  const n = e ?? Pt();
1362
1362
  delete n.numbers, n.state = t.state, t.speakerLabels && (n.labels = t.speakerLabels), n.lastSeq = Math.max(n.lastSeq, t.lastSeq), n.spans = t.spans.map((s) => ({ wallStart: s.wallStart, wallEnd: s.wallEnd ?? null, mediaStart: s.mediaStart, mediaEnd: s.mediaEnd ?? null }));
1363
1363
  for (const s of t.segments) {
@@ -1639,7 +1639,7 @@ function ko(t) {
1639
1639
  const s = [...e].sort((a, o) => a[1] - o[1] || a[0] - o[0]).map(([a]) => a), r = [...new Set([...Object.keys(t.speakers), ...Object.keys(t.speakerIds)].map(Number))].filter((a) => a >= 0 && !e.has(a)).sort((a, o) => a - o);
1640
1640
  return t.numbers = new Map([...s, ...r].map((a, o) => [a, o + 1])), t.numbers;
1641
1641
  }
1642
- function vn(t, e) {
1642
+ function zn(t, e) {
1643
1643
  if (e < 0) return 0;
1644
1644
  const n = ko(t);
1645
1645
  return n.get(e) ?? n.size + 1 + e;
@@ -1653,12 +1653,12 @@ function pi(t, e) {
1653
1653
  return Qr(t.speakers[e]) ?? Qr((n = t.speakerIds[e]) == null ? void 0 : n.name);
1654
1654
  }
1655
1655
  function Os(t, e) {
1656
- return e < 0 ? "" : pi(t, e) ?? `Speaker ${vn(t, e)}`;
1656
+ return e < 0 ? "" : pi(t, e) ?? `Speaker ${zn(t, e)}`;
1657
1657
  }
1658
1658
  function mi(t, e) {
1659
1659
  if (e < 0) return "?";
1660
1660
  const n = pi(t, e);
1661
- return n ? (n.split(" ").filter(Boolean).slice(0, 2).map((r) => r[0]).join("") || `S${vn(t, e)}`).toUpperCase() : `S${vn(t, e)}`;
1661
+ return n ? (n.split(" ").filter(Boolean).slice(0, 2).map((r) => r[0]).join("") || `S${zn(t, e)}`).toUpperCase() : `S${zn(t, e)}`;
1662
1662
  }
1663
1663
  function jo(t) {
1664
1664
  if (t) {
@@ -1670,7 +1670,7 @@ function jo(t) {
1670
1670
  }
1671
1671
  function Cs(t, e) {
1672
1672
  const n = t.speakerIds[e], s = jo(n == null ? void 0 : n.color);
1673
- return { fg: s == null ? void 0 : s.fg, soft: s == null ? void 0 : s.soft, lane: Lo(vn(t, e) - 1), hasVoice: !!n };
1673
+ return { fg: s == null ? void 0 : s.fg, soft: s == null ? void 0 : s.soft, lane: Lo(zn(t, e) - 1), hasVoice: !!n };
1674
1674
  }
1675
1675
  function zo(t, e, n, s = !1) {
1676
1676
  const r = n ? n.speakerLabels ?? "auto" : null, a = (s ? r : null) ?? t.labels ?? r ?? "on";
@@ -1712,7 +1712,7 @@ const Io = /* @__PURE__ */ new Set([
1712
1712
  engine_lost: "The transcription engine stopped. Please try again.",
1713
1713
  capacity_exceeded: "Every transcription engine is busy right now. Please try again in a moment.",
1714
1714
  timeout: "That took too long. Please try again."
1715
- }, gs = yi.internal, es = "Can't reach VocalStack. Check your connection.", $r = {
1715
+ }, Ns = yi.internal, ns = "Can't reach VocalStack. Check your connection.", $r = {
1716
1716
  NotAllowedError: "The browser blocked this. Allow it for this site, then try again.",
1717
1717
  NotSupportedError: "This browser cannot play this.",
1718
1718
  AbortError: "It was cancelled."
@@ -1720,9 +1720,9 @@ const Io = /* @__PURE__ */ new Set([
1720
1720
  function kt(t) {
1721
1721
  const e = t, n = typeof (e == null ? void 0 : e.code) == "string" ? e.code : void 0, s = typeof (e == null ? void 0 : e.status) == "number" ? e.status : void 0, r = e == null ? void 0 : e.details;
1722
1722
  if (n || s && s >= 400)
1723
- return n && Io.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: s, details: r } : n === "unavailable" && s === void 0 ? { message: es, code: n, details: r } : s === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : es, code: n, status: s, details: r } : { message: n && yi[n] || gs, code: n, status: s, details: r };
1723
+ return n && Io.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: s, details: r } : n === "unavailable" && s === void 0 ? { message: ns, code: n, details: r } : s === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : ns, code: n, status: s, details: r } : { message: n && yi[n] || Ns, code: n, status: s, details: r };
1724
1724
  const a = (e == null ? void 0 : e.name) ?? "";
1725
- return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && ai(t instanceof Error ? t : new Error(String(t))), { message: es }) : $r[a] ? { message: $r[a] } : t instanceof Error && a === "Error" && !(t instanceof ni) ? { message: t.message } : { message: gs };
1725
+ return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && ai(t instanceof Error ? t : new Error(String(t))), { message: ns }) : $r[a] ? { message: $r[a] } : t instanceof Error && a === "Error" && !(t instanceof ni) ? { message: t.message } : { message: Ns };
1726
1726
  }
1727
1727
  const Ti = "https://api.vocalstack.com", bs = ti(null);
1728
1728
  function At() {
@@ -1831,12 +1831,12 @@ async function Br(t, e, n = {}) {
1831
1831
  const a = s.toString();
1832
1832
  return fetch(`${t.origin}${e}${a ? `${e.includes("?") ? "&" : "?"}${a}` : ""}`, { method: n.method ?? "GET", headers: r, body: n.body === void 0 ? void 0 : JSON.stringify(n.body) });
1833
1833
  }
1834
- const ts = /* @__PURE__ */ new Map();
1834
+ const ss = /* @__PURE__ */ new Map();
1835
1835
  function Li() {
1836
- const t = At(), [e, n] = I(ts.get(t.origin) ?? null);
1836
+ const t = At(), [e, n] = I(ss.get(t.origin) ?? null);
1837
1837
  return _(() => {
1838
- ts.has(t.origin) || t.client.languages.list().then((s) => {
1839
- ts.set(t.origin, s), n(s);
1838
+ ss.has(t.origin) || t.client.languages.list().then((s) => {
1839
+ ss.set(t.origin, s), n(s);
1840
1840
  }).catch(() => {
1841
1841
  });
1842
1842
  }, [t]), e;
@@ -1864,7 +1864,7 @@ function Ro(t, e) {
1864
1864
  o.current = Pt(), a(Pt()), N(!1);
1865
1865
  const z = n.client;
1866
1866
  let E = o.current.state;
1867
- const ie = () => {
1867
+ const re = () => {
1868
1868
  var C, ue;
1869
1869
  const V = o.current.state;
1870
1870
  V !== E && (E = V, (ue = (C = k.current).onState) == null || ue.call(C, V));
@@ -1872,29 +1872,29 @@ function Ro(t, e) {
1872
1872
  return (async () => {
1873
1873
  var V, C, ue, P;
1874
1874
  for (; $; ) {
1875
- let q = null;
1875
+ let Z = null;
1876
1876
  try {
1877
1877
  const ne = c.current;
1878
- if (q = await z.recordings.subscribe(t, { lang: ne ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !$) {
1879
- q.close();
1878
+ if (Z = await z.recordings.subscribe(t, { lang: ne ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !$) {
1879
+ Z.close();
1880
1880
  return;
1881
1881
  }
1882
- L = 0, l.current = q, c.current !== ne && q.setLanguage(c.current), u(!0), M(null), o.current = Xn(q.snapshot, o.current), w(), ie();
1883
- for await (const oe of q) {
1882
+ L = 0, l.current = Z, c.current !== ne && Z.setLanguage(c.current), u(!0), M(null), o.current = ts(Z.snapshot, o.current), w(), re();
1883
+ for await (const ae of Z) {
1884
1884
  if (!$) break;
1885
- if (oe.type === "snapshot")
1886
- o.current = Xn(oe.snapshot, oe.reason === "gap" ? o.current : Pt()), w(), ie();
1887
- else if (oe.type === "frame") {
1888
- fo(o.current, oe.frame);
1889
- const we = oe.frame;
1885
+ if (ae.type === "snapshot")
1886
+ o.current = ts(ae.snapshot, ae.reason === "gap" ? o.current : Pt()), w(), re();
1887
+ else if (ae.type === "frame") {
1888
+ fo(o.current, ae.frame);
1889
+ const we = ae.frame;
1890
1890
  we.type === "recording.state" && (E = o.current.state, (C = (V = k.current).onState) == null || C.call(V, we.state, we.reason)), (P = (ue = k.current).onFrame) == null || P.call(ue, we), w();
1891
- } else oe.type === "closed" && u(!1);
1891
+ } else ae.type === "closed" && u(!1);
1892
1892
  }
1893
1893
  } catch (ne) {
1894
1894
  if (!$) return;
1895
- const oe = kt(ne);
1896
- if (oe.code === "not_found" || oe.status === 404) {
1897
- N(!0), M(oe);
1895
+ const ae = kt(ne);
1896
+ if (ae.code === "not_found" || ae.status === 404) {
1897
+ N(!0), M(ae);
1898
1898
  return;
1899
1899
  }
1900
1900
  try {
@@ -1910,16 +1910,16 @@ function Ro(t, e) {
1910
1910
  return;
1911
1911
  }
1912
1912
  }
1913
- if (oe.code === "forbidden" || oe.code === "invalid_token" || oe.code === "password_required" || oe.status === 401 || oe.status === 403) {
1914
- M(oe);
1913
+ if (ae.code === "forbidden" || ae.code === "invalid_token" || ae.code === "password_required" || ae.status === 401 || ae.status === 403) {
1914
+ M(ae);
1915
1915
  return;
1916
1916
  }
1917
- M(oe);
1917
+ M(ae);
1918
1918
  } finally {
1919
- l.current === q && (l.current = null), u(!1);
1919
+ l.current === Z && (l.current = null), u(!1);
1920
1920
  }
1921
- const ce = o.current.state;
1922
- if (!$ || ce === "ended" || ce === "finalized" || ce === "processing") return;
1921
+ const le = o.current.state;
1922
+ if (!$ || le === "ended" || le === "finalized" || le === "processing") return;
1923
1923
  L += 1, await Yo(Math.min(15e3, 1e3 * 2 ** Math.min(L, 4)));
1924
1924
  }
1925
1925
  })(), () => {
@@ -1927,13 +1927,13 @@ function Ro(t, e) {
1927
1927
  $ = !1, (V = l.current) == null || V.close(), l.current = null, u(!1);
1928
1928
  };
1929
1929
  }, [t, n, e.voice]);
1930
- const [m, f] = I(!1), [O, D] = I(null), b = v(0), [W, A] = I(null), ee = Xe(($) => {
1931
- var ie;
1932
- if (c.current = $, (ie = l.current) == null || ie.setLanguage($), !t) return;
1930
+ const [m, f] = I(!1), [O, D] = I(null), b = v(0), [W, A] = I(null), te = Xe(($) => {
1931
+ var re;
1932
+ if (c.current = $, (re = l.current) == null || re.setLanguage($), !t) return;
1933
1933
  const L = s.current.client, z = ++b.current;
1934
1934
  f(!0), D(null);
1935
1935
  const E = (V) => L.recordings.transcript(t, { lang: $ ?? void 0, ...s.current.readAs, asListener: !s.current.owner }).then((C) => {
1936
- z === b.current && (o.current = Xn(C, o.current), A($), w(), C.translationPending && V > 0 && window.setTimeout(() => {
1936
+ z === b.current && (o.current = ts(C, o.current), A($), w(), C.translationPending && V > 0 && window.setTimeout(() => {
1937
1937
  z === b.current && E(V - 1).catch(() => {
1938
1938
  });
1939
1939
  }, _o));
@@ -1946,13 +1946,13 @@ function Ro(t, e) {
1946
1946
  }, [w, t]), j = Xe(($, L) => {
1947
1947
  const z = o.current;
1948
1948
  let E = !1;
1949
- for (const [ie, V] of Object.entries(L)) {
1950
- const C = z.sentences.get(Number(ie));
1949
+ for (const [re, V] of Object.entries(L)) {
1950
+ const C = z.sentences.get(Number(re));
1951
1951
  C && (C.translations = { ...C.translations, [$]: V }, E = !0);
1952
1952
  }
1953
1953
  E && w();
1954
1954
  }, [w]), S = Xe(() => M(null), []);
1955
- return { model: r, connected: d, error: h, notFound: p, clearError: S, setLanguage: ee, mergeTranslations: j, translating: m, translateFailed: O, shownLang: W };
1955
+ return { model: r, connected: d, error: h, notFound: p, clearError: S, setLanguage: te, mergeTranslations: j, translating: m, translateFailed: O, shownLang: W };
1956
1956
  }
1957
1957
  const Hr = {
1958
1958
  English: { vcFor: "Voice for", vcMute: "Mute", vcUnmute: "Unmute", vcMuted: "MUTED", vcShared: "Also used by", vcUsedBy: "Used by", vcUnknownSpk: "Unknown", vcUse: "Use this voice", vcGetting: "Downloading…", vcSample: "Here’s how it sounds.", vcPreview: "PREVIEW", vcMale: "Male", vcFemale: "Female", vcSynth: "SYNTHETIC", origAudio: "ORIGINAL AUDIO", vcCloned: "VOICES", vcBadge: "CLONED", vcNone: "TEXT ONLY", vcNoVoice: "No voice for ", vcSheet: "VOICE", vcNeutral: "SYNTHETIC VOICE", vcWarm: "SYNTHETIC VOICE", searchPlaceholder: "Search this broadcast", noise: "Audio unclear", newLines: "new", live: "LIVE", ended: "ENDED", waiting: "WAITING", corrected: "CORRECTED", hostLine: "Hosted by Marcus Reed · 4 speakers", langLabel: "LANGUAGE", langCount: "100+ languages", read: "Read", listen: "Listen", watch: "Watch", waitTitle: "The broadcast hasn’t started yet", waitBody: "The transcript appears here as soon as the host starts speaking.", english: "ENGLISH", playing: "Playing the live audio", ready: "Tap to start audio", readyNote: "Set your volume first", voiceMeta: "ORIGINAL AUDIO", voice: "Voice", sheetTitle: "APP LANGUAGE", done: "Done", search: "Search 100+ languages", sheetNote: "Follow along in your language.", moreLangs: "more", confTitle: "Some words weren't heard clearly", confBody: "The transcript marks words the model is unsure about with a dashed underline. The words keep their colour, so only the underline tells you where to look.", confMid: "Slightly unsure — probably right", confHigh: "Low confidence — may be wrong", settings: "BROADCAST", setOrig: "Show original language", setTheme: "Appearance", light: "Light", dark: "Dark", setConf: "Show uncertain words", setConfHint1: "Colours words the model is unsure about — ", setConfMid: "amber", setConfSep: " or ", setConfLow: "red", setConfHint2: "", behindLive: "TRANSLATION LATENCY", behindNote: "How far the translation trails the speaker right now.", shareLabel: "LIVE TRANSLATION LINK", copy: "Copy", copied: "Copied" },
@@ -1968,9 +1968,9 @@ function vi(t) {
1968
1968
  async function ji(t) {
1969
1969
  var r, a, o, l, c;
1970
1970
  const e = await t.json().catch(() => null), n = ((r = e == null ? void 0 : e.error) == null ? void 0 : r.code) ?? (e == null ? void 0 : e.code), s = ((a = e == null ? void 0 : e.error) == null ? void 0 : a.message) ?? (e == null ? void 0 : e.message);
1971
- return new ni(typeof n == "string" ? n : "internal", typeof s == "string" ? s : gs, { status: t.status, details: ((l = (o = e == null ? void 0 : e.error) == null ? void 0 : o.data) == null ? void 0 : l.details) ?? ((c = e == null ? void 0 : e.data) == null ? void 0 : c.details) });
1971
+ return new ni(typeof n == "string" ? n : "internal", typeof s == "string" ? s : Ns, { status: t.status, details: ((l = (o = e == null ? void 0 : e.error) == null ? void 0 : o.data) == null ? void 0 : l.details) ?? ((c = e == null ? void 0 : e.data) == null ? void 0 : c.details) });
1972
1972
  }
1973
- function ns(t) {
1973
+ function rs(t) {
1974
1974
  switch (t) {
1975
1975
  case "transcribing":
1976
1976
  return "transcribing";
@@ -2002,7 +2002,7 @@ function $o(t, e) {
2002
2002
  }
2003
2003
  return n;
2004
2004
  }
2005
- const fs = [
2005
+ const ps = [
2006
2006
  { key: "pdf", name: "PDF", ext: "PDF", note: "Formatted transcript in paragraphs, with timestamps and speaker labels.", icon: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" },
2007
2007
  { key: "xlsx", name: "Excel", ext: "XLSX", note: "One row per segment: start, end, speaker, text, confidence.", icon: "M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 0 1-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0 1 12 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m0 0h-7.5m-9 0h7.5m0 0c.621 0 1.125.504 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5" },
2008
2008
  { key: "srt", name: "Subtitles", ext: "SRT / VTT", note: "Timed caption cues, ready for a video editor or a player.", icon: "M2.25 15.75V8.25A2.25 2.25 0 0 1 4.5 6h15a2.25 2.25 0 0 1 2.25 2.25v7.5A2.25 2.25 0 0 1 19.5 18h-15a2.25 2.25 0 0 1-2.25-2.25Zm4.5-4.5h4.5m-4.5 3h1.5m3 0h6m-3-3h3" },
@@ -2036,7 +2036,7 @@ async function Vo(t, e) {
2036
2036
  }
2037
2037
  xs(xa(t.origin, n, s, c.voiceKey, a));
2038
2038
  }
2039
- const Ns = (t) => {
2039
+ const ms = (t) => {
2040
2040
  var e;
2041
2041
  return ((e = t == null ? void 0 : t.match(/(?:youtu\.be\/|[?&]v=|\/shorts\/|\/embed\/|\/live\/)([\w-]{11})/)) == null ? void 0 : e[1]) ?? null;
2042
2042
  }, Wo = (t) => `https://www.youtube-nocookie.com/embed/${t}?autoplay=1&mute=1&controls=0&rel=0&modestbranding=1&playsinline=1&iv_load_policy=3`, Vr = 0.3, Fo = 1.5;
@@ -2060,7 +2060,7 @@ function Zo(t, e, n) {
2060
2060
  return o += s * r[c] / a, { text: l, start: d, end: o };
2061
2061
  });
2062
2062
  }
2063
- function ss(t) {
2063
+ function is(t) {
2064
2064
  const e = getComputedStyle(t), n = t.clientHeight * 0.45;
2065
2065
  return {
2066
2066
  top: Math.min(parseFloat(e.paddingTop) || 0, n),
@@ -2077,21 +2077,21 @@ function qo(t, e, n = 0) {
2077
2077
  if (!r || !a) return;
2078
2078
  const o = () => {
2079
2079
  let A = r.parentElement;
2080
- for (let ee = 0; ee < 4 && A; ee++) {
2080
+ for (let te = 0; te < 4 && A; te++) {
2081
2081
  const j = A.querySelector("[data-transport]");
2082
2082
  if (j) return j;
2083
2083
  A = A.parentElement;
2084
2084
  }
2085
2085
  return null;
2086
2086
  }, l = () => {
2087
- const A = o(), ee = A ? A.offsetHeight : 0, j = r.clientHeight - ee - 36, S = r.scrollHeight - r.clientHeight, $ = j > 0 ? Math.max(30, Math.round(j * (r.clientHeight - ee) / r.scrollHeight)) : 0;
2087
+ const A = o(), te = A ? A.offsetHeight : 0, j = r.clientHeight - te - 36, S = r.scrollHeight - r.clientHeight, $ = j > 0 ? Math.max(30, Math.round(j * (r.clientHeight - te) / r.scrollHeight)) : 0;
2088
2088
  return { vis: j, max: S, size: $ };
2089
2089
  };
2090
2090
  let c = -1, d = null, u = !1, h = 0, M = 0;
2091
2091
  const p = () => {
2092
2092
  const A = o();
2093
2093
  if (!A) return;
2094
- const ee = parseFloat(r.dataset.glassExtra || "0") || 0, j = A.offsetHeight + 14 + ee;
2094
+ const te = parseFloat(r.dataset.glassExtra || "0") || 0, j = A.offsetHeight + 14 + te;
2095
2095
  if (j === c) return;
2096
2096
  c = j;
2097
2097
  const S = r.scrollHeight - r.scrollTop - r.clientHeight < 40;
@@ -2104,8 +2104,8 @@ function qo(t, e, n = 0) {
2104
2104
  let w = null, k = null;
2105
2105
  const m = (A) => {
2106
2106
  p();
2107
- const ee = o();
2108
- ee && ee !== k && w && (k = ee, w.observe(ee));
2107
+ const te = o();
2108
+ te && te !== k && w && (k = te, w.observe(te));
2109
2109
  const j = l();
2110
2110
  if (j.vis < 60 || j.max < 6) {
2111
2111
  a.style.opacity = "0", a.style.pointerEvents = "none";
@@ -2115,12 +2115,12 @@ function qo(t, e, n = 0) {
2115
2115
  }, f = parseFloat(getComputedStyle(r).paddingRight) || 0;
2116
2116
  a.style.right = (f >= 12 ? -(f - 6) : 2) + "px";
2117
2117
  const O = () => m(!0), D = (A) => {
2118
- const ee = l();
2119
- ee.vis - ee.size <= 0 || (A.preventDefault(), A.stopPropagation(), a.setPointerCapture(A.pointerId), u = !0, h = A.clientY, M = r.scrollTop, a.style.cursor = "grabbing", N());
2118
+ const te = l();
2119
+ te.vis - te.size <= 0 || (A.preventDefault(), A.stopPropagation(), a.setPointerCapture(A.pointerId), u = !0, h = A.clientY, M = r.scrollTop, a.style.cursor = "grabbing", N());
2120
2120
  }, b = (A) => {
2121
2121
  if (!u) return;
2122
- const ee = l();
2123
- r.scrollTop = M + (A.clientY - h) / (ee.vis - ee.size) * ee.max, N();
2122
+ const te = l();
2123
+ r.scrollTop = M + (A.clientY - h) / (te.vis - te.size) * te.max, N();
2124
2124
  }, W = () => {
2125
2125
  u && (u = !1, a.style.cursor = "grab", N());
2126
2126
  };
@@ -2142,25 +2142,25 @@ function Jo({ error: t, onClose: e }) {
2142
2142
  }, [t]), !t) return null;
2143
2143
  const s = t.code === "insufficient_credit" || t.code === "quota_exceeded" || t.status === 402;
2144
2144
  return /* @__PURE__ */ g("div", { className: "toast", role: "alert", children: [
2145
- /* @__PURE__ */ i(le, { d: X.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
2145
+ /* @__PURE__ */ i(oe, { d: J.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
2146
2146
  /* @__PURE__ */ g("span", { style: { flex: 1 }, children: [
2147
2147
  t.message,
2148
- s && /* @__PURE__ */ g(Ue, { children: [
2148
+ s && /* @__PURE__ */ g(_e, { children: [
2149
2149
  " ",
2150
2150
  /* @__PURE__ */ i("a", { href: "https://app.vocalstack.com/billing", target: "_blank", rel: "noopener", className: "dev-link", style: { fontSize: "inherit", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add credit" })
2151
2151
  ] })
2152
2152
  ] }),
2153
- /* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(le, { d: X.close, size: 14 }) })
2153
+ /* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(oe, { d: J.close, size: 14 }) })
2154
2154
  ] });
2155
2155
  }
2156
2156
  function Ii({ color: t }) {
2157
- return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(le, { d: X.voiceClone, size: 13, sw: 1.7, stroke: t }) });
2157
+ return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(oe, { d: J.voiceClone, size: 13, sw: 1.7, stroke: t }) });
2158
2158
  }
2159
2159
  function Hc({ chip: t, note: e, scrub: n, mute: s, voice: r, prev: a, play: o, next: l }) {
2160
2160
  return /* @__PURE__ */ g("div", { className: "vs-tt", children: [
2161
2161
  /* @__PURE__ */ g("div", { className: "vs-tt__r1", children: [
2162
2162
  /* @__PURE__ */ i("div", { className: "vs-tt__chip", children: t }),
2163
- e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(Ue, { children: [
2163
+ e ? /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: e }) : /* @__PURE__ */ g(_e, { children: [
2164
2164
  /* @__PURE__ */ i("div", { className: "vs-tt__scrub", children: n }),
2165
2165
  /* @__PURE__ */ i("div", { className: "vs-tt__spk", children: s }),
2166
2166
  /* @__PURE__ */ i("div", { className: "vs-tt__voice", children: r })
@@ -2183,8 +2183,8 @@ function Xo({ index: t, total: e, atLabel: n, durLabel: s, stepLabel: r, onSeek:
2183
2183
  N(A), o(A);
2184
2184
  return;
2185
2185
  }
2186
- const ee = Math.round(A * (w - 1));
2187
- ee !== t && a(ee);
2186
+ const te = Math.round(A * (w - 1));
2187
+ te !== t && a(te);
2188
2188
  }, D = () => {
2189
2189
  M.current && (M.current = !1, N(null), c == null || c());
2190
2190
  };
@@ -2229,11 +2229,11 @@ function tl({ f: t, desk: e, onOpen: n }) {
2229
2229
  const s = (r, a, o) => /* @__PURE__ */ g("span", { role: "button", title: "Open this line in Fix", className: "badge badge--fix", style: { marginLeft: o ? "auto" : 0 }, onClick: (l) => {
2230
2230
  l.stopPropagation(), n == null || n();
2231
2231
  }, children: [
2232
- /* @__PURE__ */ i(le, { d: X.pencilFix, size: e ? 10 : 9, sw: 2 }),
2232
+ /* @__PURE__ */ i(oe, { d: J.pencilFix, size: e ? 10 : 9, sw: 2 }),
2233
2233
  r,
2234
2234
  a > 0 && /* @__PURE__ */ i("span", { className: "badge__n", children: a })
2235
2235
  ] }, r);
2236
- return /* @__PURE__ */ g(Ue, { children: [
2236
+ return /* @__PURE__ */ g(_e, { children: [
2237
2237
  t.script > 0 && s(e ? "SCRIPT FIX" : "SCRIPT", t.script, !0),
2238
2238
  t.manual && s(e ? "MANUAL FIX" : "MANUAL", t.manualCount, t.script === 0)
2239
2239
  ] });
@@ -2243,7 +2243,7 @@ function nl({ onOpen: t, alone: e }) {
2243
2243
  return /* @__PURE__ */ g("span", { role: "button", title: "Fix this line", className: `badge badge--pen${n ? " is-over" : ""}`, style: { marginLeft: e ? "auto" : 0 }, onMouseEnter: () => s(!0), onMouseLeave: () => s(!1), onClick: (r) => {
2244
2244
  r.stopPropagation(), t();
2245
2245
  }, children: [
2246
- /* @__PURE__ */ i(le, { d: X.pencilFix, size: 11, sw: 2 }),
2246
+ /* @__PURE__ */ i(oe, { d: J.pencilFix, size: 11, sw: 2 }),
2247
2247
  n && "FIX"
2248
2248
  ] });
2249
2249
  }
@@ -2365,7 +2365,7 @@ function ol({ roster: t, selected: e, onSelect: n, noClone: s, building: r, shor
2365
2365
  /* @__PURE__ */ i("span", { style: { fontSize: 12.5, fontWeight: 500, color: h ? "var(--ink-96)" : "var(--ink-62)", whiteSpace: "nowrap" }, children: u.name }),
2366
2366
  u.hasVoice && !M && /* @__PURE__ */ i(Ii, { color: u.fg ?? (h ? "var(--ink-62)" : "var(--ink-45)") }),
2367
2367
  M && /* @__PURE__ */ i("span", { title: M, "aria-label": M, style: { flex: "none", width: 15, height: 15, marginRight: -2, borderRadius: "50%", background: "#c27c00", color: "#fff", font: "900 10.5px/1 system-ui, sans-serif", display: "flex", alignItems: "center", justifyContent: "center" }, children: "!" }),
2368
- w && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: h ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(le, { d: X.micOff, size: 13, sw: 1.7 }) }),
2368
+ w && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: h ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: J.micOff, size: 13, sw: 1.7 }) }),
2369
2369
  (N || p) && /* @__PURE__ */ i("span", { title: p ? "Cloning this voice…" : "No voice clone yet", "aria-label": p ? "Cloning this voice" : "No voice clone yet", style: { flex: "none", width: 10, height: 10, marginRight: -2, display: "flex", alignItems: "center", justifyContent: "center" }, children: p ? /* @__PURE__ */ i(at, { size: 10, color: "var(--brand)", track: "var(--fill-10)", sw: 1.6 }) : /* @__PURE__ */ i("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--brand)" } }) })
2370
2370
  ]
2371
2371
  },
@@ -2385,24 +2385,24 @@ function ll({ cast: t, voices: e, currentId: n, armedId: s = null, sampleId: r =
2385
2385
  }, D = !!s && s !== n;
2386
2386
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
2387
2387
  M && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
2388
- /* @__PURE__ */ i(le, { d: X.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
2388
+ /* @__PURE__ */ i(oe, { d: J.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
2389
2389
  /* @__PURE__ */ i("span", { style: { flex: 1, minWidth: 0, fontSize: 12.5, fontWeight: 300, lineHeight: 1.45, color: "var(--ink-80)", textWrap: "pretty" }, children: M }),
2390
2390
  /* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(za, { value: M, label: "Copy this error" }) })
2391
2391
  ] }),
2392
2392
  t,
2393
- p && /* @__PURE__ */ g(Ue, { children: [
2393
+ p && /* @__PURE__ */ g(_e, { children: [
2394
2394
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, padding: "14px 2px 6px", userSelect: "none" }, children: /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: N.vcSheet }) }),
2395
2395
  /* @__PURE__ */ g("div", { role: p.action ? "button" : "status", tabIndex: p.action ? 0 : void 0, title: p.tip, onClick: p.action, onKeyDown: p.action ? (b) => {
2396
2396
  (b.key === "Enter" || b.key === " ") && (b.preventDefault(), p.action());
2397
2397
  } : void 0, style: { display: "flex", alignItems: "center", gap: 11, padding: "11px 8px", margin: "0 -6px", borderRadius: 10, cursor: p.action ? "pointer" : "default" }, children: [
2398
- /* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: p.busy ? 0 : p.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: p.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(le, { d: p.action ? X.plus : X.mic, size: 15, sw: p.action ? 2 : 1.6, style: { color: p.action ? "var(--brand)" : "var(--ink-45)" } }) }),
2398
+ /* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: p.busy ? 0 : p.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: p.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: p.action ? J.plus : J.mic, size: 15, sw: p.action ? 2 : 1.6, style: { color: p.action ? "var(--brand)" : "var(--ink-45)" } }) }),
2399
2399
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
2400
2400
  /* @__PURE__ */ i("div", { style: { fontSize: 14.5, fontWeight: p.action ? 500 : 400, color: p.action ? "var(--brand)" : "var(--ink-62)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: p.title }),
2401
2401
  /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: p.sub })
2402
2402
  ] })
2403
2403
  ] })
2404
2404
  ] }),
2405
- w.map(({ v: b, headOn: W, head: A, headCount: ee, rule: j }, S) => {
2405
+ w.map(({ v: b, headOn: W, head: A, headCount: te, rule: j }, S) => {
2406
2406
  const $ = rl(b), L = a === b.id, z = O(A), E = (d == null ? void 0 : d(b)) ?? null;
2407
2407
  return /* @__PURE__ */ g(ga, { children: [
2408
2408
  W && A === N.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: S === 0 && !p ? "0" : "1px solid var(--hair)", userSelect: "none" }, children: /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: A }) }),
@@ -2410,16 +2410,16 @@ function ll({ cast: t, voices: e, currentId: n, armedId: s = null, sampleId: r =
2410
2410
  "button",
2411
2411
  {
2412
2412
  type: "button",
2413
- onClick: (ie) => {
2414
- ie.stopPropagation(), m((V) => ({ ...V, [A]: O(A) }));
2413
+ onClick: (re) => {
2414
+ re.stopPropagation(), m((V) => ({ ...V, [A]: O(A) }));
2415
2415
  },
2416
2416
  title: `${z ? "Hide " : "Show "}${A.toLowerCase()} voices`,
2417
2417
  "aria-expanded": z,
2418
2418
  style: { width: "100%", textAlign: "left", font: "inherit", display: "flex", alignItems: "center", gap: 7, padding: z ? "14px 2px 6px" : "14px 2px 14px", border: 0, borderTop: S === 0 && !p ? "0" : "1px solid var(--hair)", background: "transparent", cursor: "pointer", userSelect: "none" },
2419
2419
  children: [
2420
- /* @__PURE__ */ i(le, { d: X.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${z ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2420
+ /* @__PURE__ */ i(oe, { d: J.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${z ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2421
2421
  /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: A }),
2422
- /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: ee })
2422
+ /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: te })
2423
2423
  ]
2424
2424
  }
2425
2425
  ),
@@ -2436,23 +2436,23 @@ function ll({ cast: t, voices: e, currentId: n, armedId: s = null, sampleId: r =
2436
2436
  /* @__PURE__ */ i("span", { title: L ? "Downloading this voice" : void 0, style: { flex: "none", width: 32, height: 32, borderRadius: "50%", background: L ? "transparent" : b.cloned ? "var(--brand-soft)" : "var(--fill-06)", display: "flex", alignItems: "center", justifyContent: "center" }, children: L ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : r === b.id ? /* @__PURE__ */ g("span", { className: "vcplay", children: [
2437
2437
  /* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(cl, { height: 13, width: 2.5 }) }),
2438
2438
  /* @__PURE__ */ i("span", { className: "vcplay__stop", children: /* @__PURE__ */ i(ka, { size: 11 }) })
2439
- ] }) : /* @__PURE__ */ i(le, { d: b.cloned ? X.voiceClone : b.gender === "female" ? X.venus : b.gender === "male" ? X.mars : X.mic, size: 15, sw: 1.6, style: { color: b.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
2439
+ ] }) : /* @__PURE__ */ i(oe, { d: b.cloned ? J.voiceClone : b.gender === "female" ? J.venus : b.gender === "male" ? J.mars : J.mic, size: 15, sw: 1.6, style: { color: b.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
2440
2440
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
2441
2441
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 14.5, fontWeight: b.id === n ? 600 : 400, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: b.name }) }),
2442
2442
  $ && /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: $ }),
2443
2443
  E && (b.id === n ? /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 5, marginTop: 3, minWidth: 0 }, children: [
2444
- /* @__PURE__ */ i(le, { d: X.notice, size: 12, sw: 1.7, style: { flex: "none", color: "var(--conf-mid)" } }),
2444
+ /* @__PURE__ */ i(oe, { d: J.notice, size: 12, sw: 1.7, style: { flex: "none", color: "var(--conf-mid)" } }),
2445
2445
  /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 11, fontWeight: 300, color: "var(--conf-mid)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${N.vcShared} ${E}` })
2446
2446
  ] }) : /* @__PURE__ */ i("div", { style: { marginTop: 2, minWidth: 0, fontSize: 12, fontWeight: 300, color: "var(--ink-50)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${N.vcUsedBy} ${E}` }))
2447
2447
  ] }),
2448
2448
  /* @__PURE__ */ g("div", { style: { flex: "none", width: b.live ? b.id === n ? 18 : 0 : 42, overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 6 }, children: [
2449
2449
  /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18 } }),
2450
- /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: b.id === n && /* @__PURE__ */ i(le, { d: X.check, size: 17, sw: 2.2, style: { flex: "none", color: "var(--brand)" } }) })
2450
+ /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: b.id === n && /* @__PURE__ */ i(oe, { d: J.check, size: 17, sw: 2.2, style: { flex: "none", color: "var(--brand)" } }) })
2451
2451
  ] }),
2452
- (b.live || b.cloned && b.library === !1 && !b.auto && !!l) && /* @__PURE__ */ g("span", { className: "gvadd", role: "button", title: b.live ? `Save ${b.name}’s voice from this session` : `Add ${b.name} to My voices`, onClick: l ? (ie) => {
2453
- ie.stopPropagation(), l(b);
2452
+ (b.live || b.cloned && b.library === !1 && !b.auto && !!l) && /* @__PURE__ */ g("span", { className: "gvadd", role: "button", title: b.live ? `Save ${b.name}’s voice from this session` : `Add ${b.name} to My voices`, onClick: l ? (re) => {
2453
+ re.stopPropagation(), l(b);
2454
2454
  } : void 0, children: [
2455
- /* @__PURE__ */ i(le, { d: X.plus, size: 14, sw: 2 }),
2455
+ /* @__PURE__ */ i(oe, { d: J.plus, size: 14, sw: 2 }),
2456
2456
  "Add"
2457
2457
  ] })
2458
2458
  ]
@@ -2472,10 +2472,10 @@ function cl({ height: t, width: e = 2 }) {
2472
2472
  ] });
2473
2473
  }
2474
2474
  const ul = /* @__PURE__ */ g("span", { style: { display: "inline-flex", alignItems: "center", gap: 3 }, children: [
2475
- /* @__PURE__ */ i(le, { d: X.langAuto, size: 19, sw: 1.7, style: { color: "var(--ink-62)", display: "block" } }),
2476
- /* @__PURE__ */ i(le, { d: X.globe, size: 18, sw: 1.6, style: { color: "var(--ink-62)", display: "block" } })
2475
+ /* @__PURE__ */ i(oe, { d: J.langAuto, size: 19, sw: 1.7, style: { color: "var(--ink-62)", display: "block" } }),
2476
+ /* @__PURE__ */ i(oe, { d: J.globe, size: 18, sw: 1.6, style: { color: "var(--ink-62)", display: "block" } })
2477
2477
  ] });
2478
- function ps(t, e) {
2478
+ function ys(t, e) {
2479
2479
  const n = e ? t == null ? void 0 : t.languages.find((s) => s.code === e) : null;
2480
2480
  return { flag: e ? (n == null ? void 0 : n.flag) ?? "🌐" : ul, code: e ? e.toUpperCase() : "", label: (n == null ? void 0 : n.native) ?? "As spoken", name: (n == null ? void 0 : n.name) ?? "Original" };
2481
2481
  }
@@ -2504,15 +2504,15 @@ function hl({ recordingId: t, lang: e, ended: n, cred: s, pickedVoice: r, senten
2504
2504
  [l, e, t]
2505
2505
  ), u = Ie(() => di(d, r), [d, r]), h = u ? u.voiceKey || null : r, [M, p] = I(null), [N, w] = I(null), k = v(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${h ?? ""}`, f = Xe(async (V, C) => {
2506
2506
  if (!t || !e || !n) return;
2507
- const ue = C != null && C.size ? null : Fr(V), P = C != null && C.size ? C : ue, q = P && P.size ? Object.fromEntries([...P].map(([we, ke]) => [String(we), ke])) : null, ce = `${t}|${e}|${q ? JSON.stringify(q) : V ?? ""}`;
2508
- if (k.current.has(ce)) return;
2509
- k.current.add(ce), p(ce), w(null);
2507
+ const ue = C != null && C.size ? null : Fr(V), P = C != null && C.size ? C : ue, Z = P && P.size ? Object.fromEntries([...P].map(([we, ke]) => [String(we), ke])) : null, le = `${t}|${e}|${Z ? JSON.stringify(Z) : V ?? ""}`;
2508
+ if (k.current.has(le)) return;
2509
+ k.current.add(le), p(le), w(null);
2510
2510
  const ne = { langs: [e] };
2511
- q ? ne.voiceBySpeaker = q : V && (ne.voice = V);
2512
- const oe = await Br(o, `/v1/recordings/${t}/voice`, { method: "POST", body: ne }).catch(() => null);
2513
- if (p((we) => we === ce ? null : we), !(oe != null && oe.ok)) {
2514
- k.current.delete(ce);
2515
- const we = oe ? await oe.json().catch(() => null) : null;
2511
+ Z ? ne.voiceBySpeaker = Z : V && (ne.voice = V);
2512
+ const ae = await Br(o, `/v1/recordings/${t}/voice`, { method: "POST", body: ne }).catch(() => null);
2513
+ if (p((we) => we === le ? null : we), !(ae != null && ae.ok)) {
2514
+ k.current.delete(le);
2515
+ const we = ae ? await ae.json().catch(() => null) : null;
2516
2516
  w((we == null ? void 0 : we.message) || "This voice could not be prepared.");
2517
2517
  return;
2518
2518
  }
@@ -2521,14 +2521,14 @@ function hl({ recordingId: t, lang: e, ended: n, cred: s, pickedVoice: r, senten
2521
2521
  const V = `${t ?? ""}|${e ?? ""}|`;
2522
2522
  for (const C of [...k.current]) C.startsWith(V) && k.current.delete(C);
2523
2523
  w(null);
2524
- }, [t, e]), D = !!u && (u.state === "queued" || u.state === "running") || M === m, b = (u == null ? void 0 : u.state) === "failed" ? u.error || "the render failed" : N, W = (a == null ? void 0 : a.join(",")) ?? "", [A, ee] = I(null), j = Ie(() => new Set((u == null ? void 0 : u.clips) ?? []), [u]), S = Ie(() => n && W ? W.split(",").map(Number).filter((V) => !j.has(V)) : [], [n, W, j]), $ = v(null);
2524
+ }, [t, e]), D = !!u && (u.state === "queued" || u.state === "running") || M === m, b = (u == null ? void 0 : u.state) === "failed" ? u.error || "the render failed" : N, W = (a == null ? void 0 : a.join(",")) ?? "", [A, te] = I(null), j = Ie(() => new Set((u == null ? void 0 : u.clips) ?? []), [u]), S = Ie(() => n && W ? W.split(",").map(Number).filter((V) => !j.has(V)) : [], [n, W, j]), $ = v(null);
2525
2525
  _(() => {
2526
2526
  if (!n || !t || !e || !S.length) return;
2527
2527
  const V = A ?? S[0], C = S.find((ne) => ne >= V) ?? S[0], ue = `${t}|${e}|${h ?? ""}`, P = $.current;
2528
2528
  if (P && P.key === ue && Math.abs(P.near - C) < 12 && Date.now() - P.at < 6e4) return;
2529
2529
  $.current = { key: ue, near: C, at: Date.now() };
2530
- const q = Fr(h), ce = { langs: [e], near: C };
2531
- q && q.size ? ce.voiceBySpeaker = Object.fromEntries([...q].map(([ne, oe]) => [String(ne), oe])) : h && (ce.voice = h), Br(o, `/v1/recordings/${t}/voice`, { method: "POST", body: ce }).then((ne) => {
2530
+ const Z = Fr(h), le = { langs: [e], near: C };
2531
+ Z && Z.size ? le.voiceBySpeaker = Object.fromEntries([...Z].map(([ne, ae]) => [String(ne), ae])) : h && (le.voice = h), Br(o, `/v1/recordings/${t}/voice`, { method: "POST", body: le }).then((ne) => {
2532
2532
  ne.ok || ($.current = null);
2533
2533
  }).catch(() => {
2534
2534
  $.current = null;
@@ -2547,10 +2547,10 @@ function hl({ recordingId: t, lang: e, ended: n, cred: s, pickedVoice: r, senten
2547
2547
  if (!t) return [];
2548
2548
  const V = W ? W.split(",").map(Number).filter((ue) => !n || j.has(ue)) : void 0, C = u ?? (V != null && V.length && e ? { lang: e, voiceKey: r ?? "", clips: [], voice: null } : null);
2549
2549
  return _a(C, t, o.origin, s, V);
2550
- }, [u, t, o, s, W, e, r, n, j]), ie = Ie(() => new Set(S), [S]);
2551
- return { listed: l, rows: d, track: u, renderVoiceId: h, rendering: D, failed: b, clips: E, requestRender: f, forget: O, reload: c, setNear: ee, missing: S.length, coming: ie };
2550
+ }, [u, t, o, s, W, e, r, n, j]), re = Ie(() => new Set(S), [S]);
2551
+ return { listed: l, rows: d, track: u, renderVoiceId: h, rendering: D, failed: b, clips: E, requestRender: f, forget: O, reload: c, setNear: te, missing: S.length, coming: re };
2552
2552
  }
2553
- const gl = { share: X.share, delay: X.tabGauge, video: X.video, source: X.tabSources, script: X.tabScript, fix: X.tabFix, ending: X.tabEnding, summary: X.tabSummary, export: X.tabExport, settings: X.tabSettings, sources: X.tabSources, recs: X.mic };
2553
+ const gl = { share: J.share, delay: J.tabGauge, video: J.video, source: J.tabSources, script: J.tabScript, fix: J.tabFix, ending: J.tabEnding, summary: J.tabSummary, export: J.tabExport, settings: J.tabSettings, sources: J.tabSources, recs: J.mic };
2554
2554
  function Oi({ tabs: t, current: e, onPick: n, gap: s, fold: r = !0, side: a = !r }) {
2555
2555
  const o = r && t.length <= 3, l = t.some((k) => k.key === e), [c, d] = I(null), u = v(null), [h, M] = I(0);
2556
2556
  _(() => {
@@ -2583,10 +2583,10 @@ function Oi({ tabs: t, current: e, onPick: n, gap: s, fold: r = !0, side: a = !r
2583
2583
  N(), n(r && m ? "none" : k.key);
2584
2584
  };
2585
2585
  return r ? /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, title: k.label, className: `tabbar__tab${m ? " is-on" : ""}`, style: { flex: O }, onClick: b, children: [
2586
- D && /* @__PURE__ */ i(le, { d: D, size: 15, sw: k.sw ?? 2, style: { flex: "none" } }),
2586
+ D && /* @__PURE__ */ i(oe, { d: D, size: 15, sw: k.sw ?? 2, style: { flex: "none" } }),
2587
2587
  f && /* @__PURE__ */ i("span", { className: "tabbar__label", children: k.label })
2588
2588
  ] }, k.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: O }, onMouseEnter: (W) => p(W, k), onMouseMove: (W) => p(W, k), onClick: b, children: /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, "aria-label": k.label, className: `tabbar__tab${m ? " is-on" : ""}${(c == null ? void 0 : c.k) === k.key ? " is-tip" : ""}`, children: [
2589
- D && /* @__PURE__ */ i(le, { d: D, size: 15, sw: k.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: m && !o ? "scale(1.12)" : "none" } }),
2589
+ D && /* @__PURE__ */ i(oe, { d: D, size: 15, sw: k.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: m && !o ? "scale(1.12)" : "none" } }),
2590
2590
  /* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: f ? "1fr" : "0fr", marginLeft: f && D ? 6 : 0 }, children: /* @__PURE__ */ i("span", { className: "tabbar__label", "data-tab-l": "", style: { opacity: f ? 1 : 0, transform: f ? "none" : "translateX(-6px)" }, children: k.label }) })
2591
2591
  ] }) }, k.key);
2592
2592
  }),
@@ -2615,24 +2615,24 @@ function pl({ audio: t, video: e, formats: n, onExport: s }) {
2615
2615
  }).finally(() => {
2616
2616
  d.current && l(null);
2617
2617
  }));
2618
- }, p = (N, w, k, m) => /* @__PURE__ */ g(Ue, { children: [
2619
- /* @__PURE__ */ i(cs, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: m }),
2618
+ }, p = (N, w, k, m) => /* @__PURE__ */ g(_e, { children: [
2619
+ /* @__PURE__ */ i(ds, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: m }),
2620
2620
  /* @__PURE__ */ g("button", { type: "button", className: "dlrow", disabled: o != null, "aria-busy": o === N || void 0, onClick: () => M(N, w), style: o && o !== N ? { opacity: 0.45 } : void 0, children: [
2621
- o === N ? /* @__PURE__ */ i(at, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(le, { d: k, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2621
+ o === N ? /* @__PURE__ */ i(at, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: k, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2622
2622
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 1, textAlign: "left" }, children: [
2623
2623
  /* @__PURE__ */ i("span", { style: { fontSize: 13, fontWeight: 500, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: w.name }),
2624
2624
  /* @__PURE__ */ i("span", { style: { font: "500 9.5px var(--vs-font-mono)", color: "var(--ink-40)", letterSpacing: ".04em" }, children: w.meta })
2625
2625
  ] }),
2626
- /* @__PURE__ */ i(le, { d: r === N ? X.check : fl, size: 17, sw: 1.6, style: { flex: "none", color: r === N ? "var(--brand)" : "var(--ink-62)" } })
2626
+ /* @__PURE__ */ i(oe, { d: r === N ? J.check : fl, size: 17, sw: 1.6, style: { flex: "none", color: r === N ? "var(--brand)" : "var(--ink-62)" } })
2627
2627
  ] })
2628
2628
  ] });
2629
2629
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
2630
2630
  t && p("audio", t, Nl, "DOWNLOAD AUDIO"),
2631
- e && p("video", e, X.video, "DOWNLOAD VIDEO"),
2632
- n !== !1 && /* @__PURE__ */ g(Ue, { children: [
2633
- /* @__PURE__ */ i(cs, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
2634
- /* @__PURE__ */ i("div", { className: "fmtgrid", children: fs.map((N) => /* @__PURE__ */ g("button", { type: "button", className: "fmtgrid__cell", title: o === N.key ? `Building the ${N.name}…` : N.note, disabled: o != null, "aria-busy": o === N.key || void 0, onClick: () => h(N.key), style: o && o !== N.key ? { opacity: 0.45 } : void 0, children: [
2635
- o === N.key ? /* @__PURE__ */ i(at, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(le, { d: r === N.key ? X.check : N.icon, size: 16, sw: 1.6, style: { color: r === N.key ? "var(--brand)" : "var(--ink-62)" } }),
2631
+ e && p("video", e, J.video, "DOWNLOAD VIDEO"),
2632
+ n !== !1 && /* @__PURE__ */ g(_e, { children: [
2633
+ /* @__PURE__ */ i(ds, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
2634
+ /* @__PURE__ */ i("div", { className: "fmtgrid", children: ps.map((N) => /* @__PURE__ */ g("button", { type: "button", className: "fmtgrid__cell", title: o === N.key ? `Building the ${N.name}…` : N.note, disabled: o != null, "aria-busy": o === N.key || void 0, onClick: () => h(N.key), style: o && o !== N.key ? { opacity: 0.45 } : void 0, children: [
2635
+ o === N.key ? /* @__PURE__ */ i(at, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: r === N.key ? J.check : N.icon, size: 16, sw: 1.6, style: { color: r === N.key ? "var(--brand)" : "var(--ink-62)" } }),
2636
2636
  /* @__PURE__ */ i("span", { children: N.name })
2637
2637
  ] }, N.key)) })
2638
2638
  ] })
@@ -2689,13 +2689,13 @@ ${a}`).catch(() => {
2689
2689
  ] });
2690
2690
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
2691
2691
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, minHeight: 24 }, children: [
2692
- /* @__PURE__ */ i(cs, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "SUMMARY" }),
2692
+ /* @__PURE__ */ i(ds, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "SUMMARY" }),
2693
2693
  t.state === "ready" && /* @__PURE__ */ g("button", { type: "button", className: "sumcopy", title: "Copy title and summary", style: { color: e ? "var(--brand)" : "var(--ink-70)" }, onClick: o, children: [
2694
- /* @__PURE__ */ i(le, { d: e ? X.check : kl, size: 13, sw: 1.6 }),
2694
+ /* @__PURE__ */ i(oe, { d: e ? J.check : kl, size: 13, sw: 1.6 }),
2695
2695
  e ? "Copied" : "Copy"
2696
2696
  ] })
2697
2697
  ] }),
2698
- t.state === "ready" ? /* @__PURE__ */ g(Ue, { children: [
2698
+ t.state === "ready" ? /* @__PURE__ */ g(_e, { children: [
2699
2699
  /* @__PURE__ */ i("div", { style: { fontSize: 15, fontWeight: 600, lineHeight: 1.3, letterSpacing: "-.15px", color: "var(--ink-96)", textWrap: "pretty" }, children: r }),
2700
2700
  /* @__PURE__ */ i("div", { style: { fontSize: 13, fontWeight: 300, lineHeight: 1.55, color: "var(--ink-80)", textWrap: "pretty", whiteSpace: "pre-line" }, children: a })
2701
2701
  ] }) : t.state === "unavailable" ? l("No summary for this recording.") : t.state === "not_requested" ? t.request ? l("This recording was made without a summary.", { label: "Summarize", onClick: t.request }) : l("Recordings under a minute and files of a batch are not summarised.") : /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 10, fontSize: 13, fontWeight: 300, color: "var(--ink-45)" }, children: [
@@ -2706,7 +2706,7 @@ ${a}`).catch(() => {
2706
2706
  }
2707
2707
  function wl({ ytId: t, title: e, timeLabel: n, radius: s, style: r, large: a, children: o, picture: l }) {
2708
2708
  return /* @__PURE__ */ g("div", { className: "livevid", style: { ...s != null ? { borderRadius: s } : null, ...r }, children: [
2709
- /* @__PURE__ */ i(le, { d: "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", size: a ? 34 : 30, sw: 1.2 }),
2709
+ /* @__PURE__ */ i(oe, { d: "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", size: a ? 34 : 30, sw: 1.2 }),
2710
2710
  l ?? /* @__PURE__ */ i("iframe", { src: Wo(t), title: e, referrerPolicy: "strict-origin-when-cross-origin", allow: "autoplay; encrypted-media; picture-in-picture" }),
2711
2711
  n && /* @__PURE__ */ i("span", { className: "livevid__t", style: a ? { bottom: 10, right: 10 } : void 0, children: n }),
2712
2712
  o
@@ -2774,14 +2774,14 @@ function vl(t, e) {
2774
2774
  return { id: t, tabbed: a && h.length > 1, cur: M, seq: u, pinnable: o, tabKeys: h, stripTabs: e.tabs.filter((f) => h.includes(f.key)), panel: m, pin: N, unpin: w };
2775
2775
  }
2776
2776
  function jl({ col: t, order: e, render: n, grip: s, onPick: r, wrapClass: a }) {
2777
- return zl(t), /* @__PURE__ */ g(Ue, { children: [
2777
+ return zl(t), /* @__PURE__ */ g(_e, { children: [
2778
2778
  e.map((o) => {
2779
2779
  const l = t.panel(o);
2780
2780
  if (!l.show) return null;
2781
2781
  const c = n(o);
2782
2782
  return c ? /* @__PURE__ */ g("div", { "data-panel-key": o, "data-pinned": l.pinned ? "true" : "false", className: `pinwrap sidepanel ${(a == null ? void 0 : a(o, l.pinned)) ?? ""}`, style: { order: l.order, "--grip-h": `${(s == null ? void 0 : s[o]) ?? 30}px` }, children: [
2783
2783
  c,
2784
- l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(le, { d: X.pin, size: 12, sw: 2 }) })
2784
+ l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(oe, { d: J.pin, size: 12, sw: 2 }) })
2785
2785
  ] }, o) : null;
2786
2786
  }),
2787
2787
  t.tabbed && t.cur && /* @__PURE__ */ i("div", { className: "deskstrip", style: { order: 999 }, children: /* @__PURE__ */ i(Oi, { tabs: t.stripTabs, current: t.cur, onPick: (o) => {
@@ -2799,7 +2799,7 @@ function zl(t) {
2799
2799
  const a = (m) => {
2800
2800
  s !== m && (s && s.removeAttribute("data-grip-hot"), s = m, m && m.setAttribute("data-grip-hot", ""));
2801
2801
  }, o = (m) => m.col.querySelector("[data-desk-tabs]"), l = (m) => {
2802
- var ee;
2802
+ var te;
2803
2803
  const f = m.el.getBoundingClientRect(), O = m.el.cloneNode(!0);
2804
2804
  O.querySelectorAll("*").forEach((j) => {
2805
2805
  j.style.animation = "none", j.style.transition = "none";
@@ -2820,19 +2820,19 @@ function zl(t) {
2820
2820
  }
2821
2821
  O.style.background = W || getComputedStyle(document.body).backgroundColor, document.body.appendChild(O), m.orig = [...m.col.querySelectorAll("[data-panel-key]")].map((j) => [j, j.style.order]), m.snap = {}, m.orig.forEach(([j]) => {
2822
2822
  m.snap[j.getAttribute("data-panel-key")] = j.getBoundingClientRect();
2823
- }), m.tabsSnap = ((ee = o(m)) == null ? void 0 : ee.getBoundingClientRect()) ?? null;
2823
+ }), m.tabsSnap = ((te = o(m)) == null ? void 0 : te.getBoundingClientRect()) ?? null;
2824
2824
  const A = m.col.querySelector("[data-panel-grid]");
2825
2825
  m.grid = !!A && getComputedStyle(A).display === "grid", m.el.classList.add("is-dragging"), document.documentElement.style.cursor = "move", document.body.style.userSelect = "none", document.body.style.webkitUserSelect = "none", Object.assign(m, { on: !0, clone: O }), a(null);
2826
2826
  }, c = () => {
2827
2827
  const m = r;
2828
2828
  if (!m || !m.on || m.px == null || m.py == null) return;
2829
2829
  m.raf = 0, m.clone.style.transform = `translate3d(${m.px - m.x0}px,${m.py - m.y0}px,0)`;
2830
- const f = e.current, O = m.key, D = o(m), b = f.seq.includes(O), W = b || f.tabKeys.length > 1, A = D && m.tabsSnap, ee = !A || m.py < A.top + A.height / 2 ? W ? "pin" : null : "tabs";
2830
+ const f = e.current, O = m.key, D = o(m), b = f.seq.includes(O), W = b || f.tabKeys.length > 1, A = D && m.tabsSnap, te = !A || m.py < A.top + A.height / 2 ? W ? "pin" : null : "tabs";
2831
2831
  let j = null;
2832
- if (ee === "pin") {
2832
+ if (te === "pin") {
2833
2833
  const $ = f.seq.filter((z) => z !== O).map((z) => m.snap[z]).filter(Boolean), L = m.grid ? $.filter((z) => z.bottom < m.py || z.top <= m.py && z.left + z.width / 2 < m.px).length : $.filter((z) => z.top + z.height / 2 < m.py).length;
2834
- b && f.seq.indexOf(O) === L || (j = { zone: ee, idx: L });
2835
- } else ee === "tabs" && b && (j = { zone: ee });
2834
+ b && f.seq.indexOf(O) === L || (j = { zone: te, idx: L });
2835
+ } else te === "tabs" && b && (j = { zone: te });
2836
2836
  const S = j ? j.zone + (j.idx ?? "") : "";
2837
2837
  if (S !== m.sig) {
2838
2838
  if (m.sig = S, m.target = j, m.orig.forEach(([$, L]) => {
@@ -2903,16 +2903,16 @@ function Il({ id: t, className: e, gap: n, hidden: s, plain: r, children: a }) {
2903
2903
  const w = M.currentTarget, k = getComputedStyle(N), m = N.clientWidth - parseFloat(k.paddingLeft) - parseFloat(k.paddingRight) - (parseFloat(k.columnGap) || 0), f = 320, O = 320, D = Math.max(f, m - O), b = M.clientX, W = p.getBoundingClientRect().width;
2904
2904
  let A = W;
2905
2905
  w.classList.add("is-on");
2906
- const ee = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
2906
+ const te = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
2907
2907
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2908
2908
  const j = ($) => {
2909
2909
  A = Math.round(Math.min(D, Math.max(f, W + (b - $.clientX)))), p.style.flexBasis = `${A}px`, document.documentElement.style.setProperty("--colw", `${A}px`);
2910
2910
  }, S = () => {
2911
- window.removeEventListener("pointermove", j), window.removeEventListener("pointerup", S), window.removeEventListener("pointercancel", S), document.body.style.cursor = ee.cur, document.body.style.userSelect = ee.sel, w.classList.remove("is-on"), l(A);
2911
+ window.removeEventListener("pointermove", j), window.removeEventListener("pointerup", S), window.removeEventListener("pointercancel", S), document.body.style.cursor = te.cur, document.body.style.userSelect = te.sel, w.classList.remove("is-on"), l(A);
2912
2912
  };
2913
2913
  window.addEventListener("pointermove", j), window.addEventListener("pointerup", S), window.addEventListener("pointercancel", S);
2914
2914
  }, h = s ? { display: "none" } : void 0;
2915
- return /* @__PURE__ */ g(Ue, { children: [
2915
+ return /* @__PURE__ */ g(_e, { children: [
2916
2916
  /* @__PURE__ */ i("div", { "aria-hidden": "true", className: "colgrip", style: { marginRight: -n, ...h }, children: /* @__PURE__ */ i("div", { className: "colgrip__bar", style: { left: -(n / 2 + 6) }, title: "Drag to resize · double-click to reset", onPointerDown: u, onDoubleClick: () => l(null) }) }),
2917
2917
  /* @__PURE__ */ i("div", { ref: c, "data-tab-col": t, className: `${e} sidecol`, style: { flex: `0 0 ${o}px`, ...h }, children: r ? a : /* @__PURE__ */ i("div", { ref: d, "data-panel-grid": "", className: "panelgrid", children: a }) })
2918
2918
  ] });
@@ -2965,7 +2965,7 @@ function Dl(t) {
2965
2965
  const O = p.current;
2966
2966
  if (N(), s(f.id), a(null), l(null), d(null), !t) return;
2967
2967
  let D = f.previewUrl ? `${e.origin}${f.previewUrl}` : `${e.origin}/v1/voices/preview?voice=${encodeURIComponent(f.id)}&lang=${encodeURIComponent(t)}`;
2968
- zn() === "caf" && (D += `${D.includes("?") ? "&" : "?"}format=caf`);
2968
+ On() === "caf" && (D += `${D.includes("?") ? "&" : "?"}format=caf`);
2969
2969
  const b = Date.now();
2970
2970
  e.shareCode && D.includes("recording=") && (D += `&shareCode=${encodeURIComponent(e.shareCode)}`);
2971
2971
  const W = async () => {
@@ -2996,9 +2996,9 @@ function Dl(t) {
2996
2996
  d(($ == null ? void 0 : $.code) === "language_unavailable" ? { message: "No voice can speak this language yet.", status: A.status } : { message: `This voice could not be previewed (${A.status}).`, status: A.status });
2997
2997
  return;
2998
2998
  }
2999
- const ee = await A.blob();
2999
+ const te = await A.blob();
3000
3000
  if (p.current !== O) return;
3001
- l(null), h.current = URL.createObjectURL(ee);
3001
+ l(null), h.current = URL.createObjectURL(te);
3002
3002
  const j = new Audio(h.current);
3003
3003
  j.playsInline = !0;
3004
3004
  const S = () => {
@@ -3012,13 +3012,13 @@ function Dl(t) {
3012
3012
  }, [t, N, e]);
3013
3013
  return { armId: n, sampleId: r, dlId: o, error: c, clearError: () => d(null), arm: m, stop: w, reset: k };
3014
3014
  }
3015
- const ms = 0.05, Ci = (t, e) => {
3015
+ const Ts = 0.05, Ci = (t, e) => {
3016
3016
  let n = 0;
3017
3017
  for (let s = 0; s < t.length; s++) t[s].start <= e + 1e-6 && (n = s);
3018
3018
  return n;
3019
3019
  };
3020
3020
  function Sl(t, e, n, s) {
3021
- const r = Math.max(0, e), a = s > 0 && r >= s - ms, o = t.length && t[0].start <= r + 1e-6 ? Ci(t, r) : -1;
3021
+ const r = Math.max(0, e), a = s > 0 && r >= s - Ts, o = t.length && t[0].start <= r + 1e-6 ? Ci(t, r) : -1;
3022
3022
  return o < 0 ? { t: r, playing: n && !a, sentenceId: null, offset: 0, ended: a } : { t: r, playing: n && !a, sentenceId: t[o].sentenceId ?? null, offset: Math.max(0, r - t[o].start), ended: a };
3023
3023
  }
3024
3024
  function Tn(t, e, n) {
@@ -3029,10 +3029,10 @@ function Tn(t, e, n) {
3029
3029
  let a = t.t;
3030
3030
  if (r >= 0) {
3031
3031
  const c = e[r].start, d = Math.max(0, Math.min(((l = e[r + 1]) == null ? void 0 : l.start) ?? s, s) - c);
3032
- a = c + Math.min(t.offset, Math.max(0, d - ms));
3032
+ a = c + Math.min(t.offset, Math.max(0, d - Ts));
3033
3033
  }
3034
3034
  a = Math.max(0, Math.min(s, a));
3035
- const o = s > 0 && a >= s - ms && r < 0;
3035
+ const o = s > 0 && a >= s - Ts && r < 0;
3036
3036
  return { t: a, playing: t.playing && !o, index: r >= 0 ? r : Ci(e, a) };
3037
3037
  }
3038
3038
  function bi(t, e, n) {
@@ -3050,7 +3050,7 @@ function qr(t, e, n) {
3050
3050
  for (let a = 0; a < n.length && n[a].start <= s; a++) r = a;
3051
3051
  return r;
3052
3052
  }
3053
- function rs(t, e) {
3053
+ function as(t, e) {
3054
3054
  var l;
3055
3055
  const n = t.clipPos;
3056
3056
  if (t.wordSync || t.timed || !n || !(n.dur > 0)) return t.t;
@@ -3072,114 +3072,114 @@ function Al({ ytId: t, title: e, t: n, playing: s, seekN: r, onToggle: a, onAd:
3072
3072
  const H = setTimeout(() => w(!0), 300);
3073
3073
  return () => clearTimeout(H);
3074
3074
  }, [M]);
3075
- const k = s && !N, m = v(!1), [f, O] = I(!1), D = (H, Ne = []) => {
3076
- var Z, ze;
3075
+ const k = s && !N, m = v(!1), [f, O] = I(!1), D = (H, me = []) => {
3076
+ var q, ve;
3077
3077
  if (!(m.current && (H === "pauseVideo" || H === "seekTo" || H === "setPlaybackRate")))
3078
3078
  try {
3079
- (ze = (Z = p.current) == null ? void 0 : Z.contentWindow) == null || ze.postMessage(JSON.stringify({ event: "command", func: H, args: Ne }), "*");
3079
+ (ve = (q = p.current) == null ? void 0 : q.contentWindow) == null || ve.postMessage(JSON.stringify({ event: "command", func: H, args: me }), "*");
3080
3080
  } catch {
3081
3081
  }
3082
- }, b = v(null), W = v(!1), A = v(!1), ee = v(!1), j = v(a);
3082
+ }, b = v(null), W = v(!1), A = v(!1), te = v(!1), j = v(a);
3083
3083
  j.current = a;
3084
3084
  const S = v(u);
3085
3085
  S.current = u;
3086
3086
  const $ = v(o);
3087
3087
  $.current = o;
3088
3088
  const L = v(!1), z = () => {
3089
- var Ne, Z;
3090
- const H = A.current || ee.current;
3089
+ var me, q;
3090
+ const H = A.current || te.current;
3091
3091
  if (H !== m.current)
3092
- if (m.current = H, O(H), (Ne = $.current) == null || Ne.call($, H), H) {
3092
+ if (m.current = H, O(H), (me = $.current) == null || me.call($, H), H) {
3093
3093
  if (D("playVideo"), S.current) return;
3094
3094
  Le.current && j.current && (L.current = !0, j.current());
3095
- } else L.current && !S.current && (L.current = !1, Le.current || (Z = j.current) == null || Z.call(j));
3095
+ } else L.current && !S.current && (L.current = !1, Le.current || (q = j.current) == null || q.call(j));
3096
3096
  }, E = v(n);
3097
3097
  E.current = n;
3098
- const ie = v(h);
3099
- ie.current = h;
3100
- const V = v(null), C = v(null), [ue, P] = I(!0), [q, ce] = I(!1), ne = () => {
3098
+ const re = v(h);
3099
+ re.current = h;
3100
+ const V = v(null), C = v(null), [ue, P] = I(!0), [Z, le] = I(!1), ne = () => {
3101
3101
  D("unloadModule", ["captions"]), D("unloadModule", ["cc"]);
3102
- }, oe = v([]), we = () => {
3103
- ne(), oe.current.forEach(clearTimeout), oe.current = [400, 1200, 2500, 5e3].map((H) => window.setTimeout(ne, H));
3102
+ }, ae = v([]), we = () => {
3103
+ ne(), ae.current.forEach(clearTimeout), ae.current = [400, 1200, 2500, 5e3].map((H) => window.setTimeout(ne, H));
3104
3104
  };
3105
- _(() => () => oe.current.forEach(clearTimeout), []);
3105
+ _(() => () => ae.current.forEach(clearTimeout), []);
3106
3106
  const ke = () => {
3107
- var H, Ne;
3107
+ var H, me;
3108
3108
  try {
3109
- (Ne = (H = p.current) == null ? void 0 : H.contentWindow) == null || Ne.postMessage(JSON.stringify({ event: "listening", id: "reader" }), "*");
3109
+ (me = (H = p.current) == null ? void 0 : H.contentWindow) == null || me.postMessage(JSON.stringify({ event: "listening", id: "reader" }), "*");
3110
3110
  } catch {
3111
3111
  }
3112
- (!S.current || S.current.muted) && D("mute"), ce(!0);
3112
+ (!S.current || S.current.muted) && D("mute"), le(!0);
3113
3113
  };
3114
3114
  _(() => (u == null || u.bind(D), () => u == null ? void 0 : u.bind(null)), [!!u]), _(() => {
3115
- !u && q && D("mute");
3115
+ !u && Z && D("mute");
3116
3116
  }, [!!u]);
3117
- const Pe = v(null), me = v(l);
3118
- me.current = l;
3117
+ const Qe = v(null), ye = v(l);
3118
+ ye.current = l;
3119
3119
  const Le = v(k);
3120
3120
  Le.current = k;
3121
- const Ee = v(!1), $e = v(c);
3122
- $e.current = c;
3123
- const Ce = v(d);
3124
- Ce.current = d;
3125
- const G = v(!1), [B, te] = I(!1), y = (H) => {
3126
- const Ne = Pe.current;
3127
- return !!Ne && (H < Ne.start - 1 || H > Ne.end + 5);
3121
+ const Se = v(!1), Be = v(c);
3122
+ Be.current = c;
3123
+ const Oe = v(d);
3124
+ Oe.current = d;
3125
+ const G = v(!1), [B, X] = I(!1), y = (H) => {
3126
+ const me = Qe.current;
3127
+ return !!me && (H < me.start - 1 || H > me.end + 5);
3128
3128
  }, R = () => {
3129
3129
  y(E.current) || D("seekTo", [E.current, !0]);
3130
- }, Me = () => V.current;
3130
+ }, fe = () => V.current;
3131
3131
  return _(() => {
3132
- const H = (Ne) => {
3133
- var Be, Oe, Fe, ge, K, pe, re, ae, Te, ve, Ae, Y, U, F, J, he;
3134
- if (Ne.source !== ((Be = p.current) == null ? void 0 : Be.contentWindow) || typeof Ne.data != "string") return;
3135
- let Z = null;
3132
+ const H = (me) => {
3133
+ var He, Ae, Ue, ge, Re, K, ie, de, ce, Ne, je, Y, U, F, ee, Me;
3134
+ if (me.source !== ((He = p.current) == null ? void 0 : He.contentWindow) || typeof me.data != "string") return;
3135
+ let q = null;
3136
3136
  try {
3137
- Z = JSON.parse(Ne.data);
3137
+ q = JSON.parse(me.data);
3138
3138
  } catch {
3139
3139
  return;
3140
3140
  }
3141
- (Fe = (Oe = Z == null ? void 0 : Z.info) == null ? void 0 : Oe.videoData) != null && Fe.isLive && (W.current = !0);
3142
- const ze = (ge = Z == null ? void 0 : Z.info) == null ? void 0 : ge.duration;
3143
- typeof ze == "number" && ze > 0 && !W.current && (b.current == null ? b.current = ze : (A.current = Math.abs(ze - b.current) > 1.5, z())), (Z == null ? void 0 : Z.event) === "onReady" && ((!S.current || S.current.muted) && D("mute"), we(), (K = S.current) == null || K.onInfo({ ready: !0 })), typeof ((pe = Z == null ? void 0 : Z.info) == null ? void 0 : pe.playerState) == "number" && (Z.info.playerState !== C.current && (Z.info.playerState === 1 || Z.info.playerState === 2) && we(), C.current = Z.info.playerState, P(Z.info.playerState !== 1 && Z.info.playerState !== 3), (re = S.current) == null || re.onInfo({ state: Z.info.playerState }));
3144
- const be = (ae = Z == null ? void 0 : Z.info) == null ? void 0 : ae.progressState;
3145
- if (be && typeof be.seekableStart == "number" && typeof be.seekableEnd == "number" && be.seekableEnd > be.seekableStart) {
3146
- const xe = Pe.current == null;
3147
- if (Pe.current = { start: be.seekableStart, end: be.seekableEnd }, xe && !Le.current && (D("pauseVideo"), y(E.current) || D("seekTo", [E.current, !0])), !G.current && me.current != null) {
3141
+ (Ue = (Ae = q == null ? void 0 : q.info) == null ? void 0 : Ae.videoData) != null && Ue.isLive && (W.current = !0);
3142
+ const ve = (ge = q == null ? void 0 : q.info) == null ? void 0 : ge.duration;
3143
+ typeof ve == "number" && ve > 0 && !W.current && (b.current == null ? b.current = ve : (A.current = Math.abs(ve - b.current) > 1.5, z())), (q == null ? void 0 : q.event) === "onReady" && ((!S.current || S.current.muted) && D("mute"), we(), (Re = S.current) == null || Re.onInfo({ ready: !0 })), typeof ((K = q == null ? void 0 : q.info) == null ? void 0 : K.playerState) == "number" && (q.info.playerState !== C.current && (q.info.playerState === 1 || q.info.playerState === 2) && we(), C.current = q.info.playerState, P(q.info.playerState !== 1 && q.info.playerState !== 3), (ie = S.current) == null || ie.onInfo({ state: q.info.playerState }));
3144
+ const Ce = (de = q == null ? void 0 : q.info) == null ? void 0 : de.progressState;
3145
+ if (Ce && typeof Ce.seekableStart == "number" && typeof Ce.seekableEnd == "number" && Ce.seekableEnd > Ce.seekableStart) {
3146
+ const be = Qe.current == null;
3147
+ if (Qe.current = { start: Ce.seekableStart, end: Ce.seekableEnd }, be && !Le.current && (D("pauseVideo"), y(E.current) || D("seekTo", [E.current, !0])), !G.current && ye.current != null) {
3148
3148
  G.current = !0;
3149
- const ye = me.current < be.seekableStart - 1;
3150
- (Te = Ce.current) == null || Te.call(Ce, ye), ye && ((ve = $e.current) == null || ve.call($e));
3149
+ const Te = ye.current < Ce.seekableStart - 1;
3150
+ (ce = Oe.current) == null || ce.call(Oe, Te), Te && ((Ne = Be.current) == null || Ne.call(Be));
3151
3151
  }
3152
3152
  }
3153
- typeof ((Ae = Z == null ? void 0 : Z.info) == null ? void 0 : Ae.currentTime) == "number" && (V.current = Z.info.currentTime, (Y = S.current) == null || Y.onInfo({ t: Z.info.currentTime }), !m.current && C.current === 1 && ((U = ie.current) == null || U.call(ie, Z.info.currentTime))), ((F = Z == null ? void 0 : Z.info) == null ? void 0 : F.muted) === !1 && !S.current && D("mute"), typeof ((J = Z == null ? void 0 : Z.info) == null ? void 0 : J.muted) == "boolean" && ((he = S.current) == null || he.onInfo({ muted: Z.info.muted }));
3153
+ typeof ((je = q == null ? void 0 : q.info) == null ? void 0 : je.currentTime) == "number" && (V.current = q.info.currentTime, (Y = S.current) == null || Y.onInfo({ t: q.info.currentTime }), !m.current && C.current === 1 && ((U = re.current) == null || U.call(re, q.info.currentTime))), ((F = q == null ? void 0 : q.info) == null ? void 0 : F.muted) === !1 && !S.current && D("mute"), typeof ((ee = q == null ? void 0 : q.info) == null ? void 0 : ee.muted) == "boolean" && ((Me = S.current) == null || Me.onInfo({ muted: q.info.muted }));
3154
3154
  };
3155
3155
  return window.addEventListener("message", H), () => window.removeEventListener("message", H);
3156
3156
  }, []), _(() => {
3157
3157
  if (u) return;
3158
3158
  const H = y(n);
3159
- H !== B && (te(H), H ? D("pauseVideo") : q && (D("seekTo", [n, !0]), k && D("playVideo")));
3159
+ H !== B && (X(H), H ? D("pauseVideo") : Z && (D("seekTo", [n, !0]), k && D("playVideo")));
3160
3160
  }), _(() => {
3161
- if (!q || B || u) return;
3162
- if (!k && Pe.current == null && !Ee.current) {
3163
- Ee.current = !0, D("seekTo", [E.current, !0]), D("playVideo");
3161
+ if (!Z || B || u) return;
3162
+ if (!k && Qe.current == null && !Se.current) {
3163
+ Se.current = !0, D("seekTo", [E.current, !0]), D("playVideo");
3164
3164
  return;
3165
3165
  }
3166
- const H = Me();
3166
+ const H = fe();
3167
3167
  k && (H == null || Math.abs(H - E.current) > 1.5) && R(), D(k ? "playVideo" : "pauseVideo");
3168
- }, [k, q, B]), _(() => {
3169
- if (!q || r === 0 || B || u) return;
3170
- const H = Me();
3168
+ }, [k, Z, B]), _(() => {
3169
+ if (!Z || r === 0 || B || u) return;
3170
+ const H = fe();
3171
3171
  (H == null || Math.abs(H - E.current) > 0.5) && R(), k || D("pauseVideo");
3172
- }, [r, q]), _(() => {
3173
- if (!q) return;
3174
- let H = null, Ne = 0;
3175
- const Z = setInterval(() => {
3176
- const ze = V.current;
3177
- Ne = C.current === 1 && ze != null && H != null && Math.abs(ze - H) < 0.05 ? Ne + 1 : 0, H = ze;
3178
- const be = Ne >= 3;
3179
- be !== ee.current && (ee.current = be, z());
3172
+ }, [r, Z]), _(() => {
3173
+ if (!Z) return;
3174
+ let H = null, me = 0;
3175
+ const q = setInterval(() => {
3176
+ const ve = V.current;
3177
+ me = C.current === 1 && ve != null && H != null && Math.abs(ve - H) < 0.05 ? me + 1 : 0, H = ve;
3178
+ const Ce = me >= 3;
3179
+ Ce !== te.current && (te.current = Ce, z());
3180
3180
  }, 1e3);
3181
- return () => clearInterval(Z);
3182
- }, [q]), /* @__PURE__ */ g("div", { className: `txyt${f ? " txyt--ad" : ""}`, children: [
3181
+ return () => clearInterval(q);
3182
+ }, [Z]), /* @__PURE__ */ g("div", { className: `txyt${f ? " txyt--ad" : ""}`, children: [
3183
3183
  /* @__PURE__ */ i("iframe", { ref: p, onLoad: ke, referrerPolicy: "strict-origin-when-cross-origin", src: `https://www.youtube-nocookie.com/embed/${t}?enablejsapi=1&mute=1&controls=0&rel=0&modestbranding=1&playsinline=1&iv_load_policy=3`, title: e, allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" }),
3184
3184
  !f && /* @__PURE__ */ i("div", { "aria-hidden": "true", className: "txyt__tap", onClick: a, style: { cursor: a ? "pointer" : "default" } }),
3185
3185
  /* @__PURE__ */ i("div", { className: `txyt__paused${ue && !f && !B ? " txyt__paused--on" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(vs, { size: 44 }) }) }),
@@ -3190,13 +3190,13 @@ function Al({ ytId: t, title: e, t: n, playing: s, seekN: r, onToggle: a, onAd:
3190
3190
  ] })
3191
3191
  ] });
3192
3192
  }
3193
- const El = /* @__PURE__ */ g(Ue, { children: [
3193
+ const El = /* @__PURE__ */ g(_e, { children: [
3194
3194
  /* @__PURE__ */ i("rect", { x: "6.5", y: "5", width: "3.75", height: "14", rx: "1.2" }),
3195
3195
  /* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
3196
3196
  ] }), Yl = /* @__PURE__ */ i("path", { d: "M7.5 5.6a1 1 0 0 1 1.52-.85l9.1 5.55a1 1 0 0 1 0 1.7l-9.1 5.55a1 1 0 0 1-1.52-.85V5.6Z" });
3197
3197
  function _l({ player: t, size: e }) {
3198
3198
  const n = t.muted ? "Unmute" : "Mute";
3199
- return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(le, { d: t.muted ? X.volumeOff : X.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3199
+ return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(oe, { d: t.muted ? J.volumeOff : J.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3200
3200
  }
3201
3201
  function Ul() {
3202
3202
  const [t, e] = I(""), n = v(null), s = Xe((r) => {
@@ -3226,7 +3226,7 @@ function $l(t, e) {
3226
3226
  }, []);
3227
3227
  }
3228
3228
  function Bl(t, e, n, s) {
3229
- var Ce;
3229
+ var Oe;
3230
3230
  const r = v(null), a = v(!1), o = v(!1), [l, c] = I(null), [d, u] = I(!0), h = v(!0), M = v(!1), [p, N] = I(0), w = v(0);
3231
3231
  w.current = p;
3232
3232
  const k = v({ t: 0, at: 0 }), m = v(n);
@@ -3236,9 +3236,9 @@ function Bl(t, e, n, s) {
3236
3236
  const [O, D] = I(!1), b = v(!1), W = (G) => {
3237
3237
  b.current = G, D(G);
3238
3238
  }, A = (G, B) => {
3239
- var te;
3240
- return (te = r.current) == null ? void 0 : te.call(r, G, B);
3241
- }, ee = l === 1 || l === 3, j = v(null), S = v(null), $ = Ie(() => ({
3239
+ var X;
3240
+ return (X = r.current) == null ? void 0 : X.call(r, G, B);
3241
+ }, te = l === 1 || l === 3, j = v(null), S = v(null), $ = Ie(() => ({
3242
3242
  muted: !0,
3243
3243
  bind: (G) => {
3244
3244
  r.current = G, G || (a.current = !1);
@@ -3254,7 +3254,7 @@ function Bl(t, e, n, s) {
3254
3254
  if (l !== 1) return;
3255
3255
  let G = 0;
3256
3256
  const B = () => {
3257
- const te = k.current, y = te.t + Math.min(1.2, (performance.now() - te.at) / 1e3);
3257
+ const X = k.current, y = X.t + Math.min(1.2, (performance.now() - X.at) / 1e3);
3258
3258
  if (f.current != null && y >= f.current) {
3259
3259
  W(!0), A("pauseVideo"), N(y);
3260
3260
  return;
@@ -3267,34 +3267,34 @@ function Bl(t, e, n, s) {
3267
3267
  }, [O, s, p]), _(() => {
3268
3268
  s == null && b.current && (W(!1), A("playVideo"));
3269
3269
  }, [s]);
3270
- const L = t.length ? ((Ce = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : Ce.end) ?? t[t.length - 1].start + 4 : 0, z = e || L || 1, E = Ie(() => {
3270
+ const L = t.length ? ((Oe = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : Oe.end) ?? t[t.length - 1].start + 4 : 0, z = e || L || 1, E = Ie(() => {
3271
3271
  if (!t.length) return 0;
3272
3272
  let G = 0;
3273
3273
  for (let B = 0; B < t.length; B++) t[B].start <= p + 0.05 && (G = B);
3274
3274
  return G;
3275
- }, [t, p]), [ie, V] = I(0), C = (G) => {
3275
+ }, [t, p]), [re, V] = I(0), C = (G) => {
3276
3276
  const B = Math.max(0, f.current != null ? Math.min(G, Math.max(0, f.current - 0.5)) : G);
3277
- A("seekTo", [B + m.current, !0]), k.current = { t: B, at: performance.now() }, N(B), V((te) => te + 1);
3278
- }, ue = v(!1), P = v(void 0), q = (G) => {
3277
+ A("seekTo", [B + m.current, !0]), k.current = { t: B, at: performance.now() }, N(B), V((X) => X + 1);
3278
+ }, ue = v(!1), P = v(void 0), Z = (G) => {
3279
3279
  window.clearTimeout(P.current), P.current = window.setTimeout(() => {
3280
- !ue.current || G <= 0 || j.current === 1 || j.current === 3 || (A("playVideo"), q(G - 1));
3280
+ !ue.current || G <= 0 || j.current === 1 || j.current === 3 || (A("playVideo"), Z(G - 1));
3281
3281
  }, 1200);
3282
3282
  };
3283
3283
  _(() => () => window.clearTimeout(P.current), []);
3284
- const ce = () => {
3284
+ const le = () => {
3285
3285
  if (ue.current = !0, !a.current) {
3286
3286
  o.current = !0;
3287
3287
  return;
3288
3288
  }
3289
- A("playVideo"), q(3);
3289
+ A("playVideo"), Z(3);
3290
3290
  }, ne = () => {
3291
3291
  ue.current = !1, window.clearTimeout(P.current), o.current = !1, W(!1), A("pauseVideo");
3292
- }, oe = () => {
3292
+ }, ae = () => {
3293
3293
  if (!a.current) {
3294
3294
  o.current = !0;
3295
3295
  return;
3296
3296
  }
3297
- if (ee) {
3297
+ if (te) {
3298
3298
  ne();
3299
3299
  return;
3300
3300
  }
@@ -3302,61 +3302,61 @@ function Bl(t, e, n, s) {
3302
3302
  W(!1);
3303
3303
  return;
3304
3304
  }
3305
- p >= z - 0.25 && C(0), ce();
3305
+ p >= z - 0.25 && C(0), le();
3306
3306
  }, we = (G) => {
3307
3307
  const B = t[Math.max(0, Math.min(t.length - 1, G))];
3308
3308
  B && C(B.start);
3309
- }, ke = v(!1), Pe = () => {
3309
+ }, ke = v(!1), Qe = () => {
3310
3310
  const G = h.current || M.current;
3311
3311
  $.muted = G, A(G ? "mute" : "unMute");
3312
- }, me = (G) => {
3313
- h.current = G, u(G), Pe();
3312
+ }, ye = (G) => {
3313
+ h.current = G, u(G), Qe();
3314
3314
  }, Le = (G) => {
3315
- M.current !== !G && (M.current = !G, Pe());
3315
+ M.current !== !G && (M.current = !G, Qe());
3316
3316
  };
3317
3317
  return { player: {
3318
3318
  autoplay: async () => {
3319
- const G = (te) => new Promise((y) => setTimeout(y, te)), B = async (te, y) => {
3320
- for (let R = 0; R < y / 250 && !te(); R++) await G(250);
3321
- return te();
3319
+ const G = (X) => new Promise((y) => setTimeout(y, X)), B = async (X, y) => {
3320
+ for (let R = 0; R < y / 250 && !X(); R++) await G(250);
3321
+ return X();
3322
3322
  };
3323
3323
  if (!await B(() => a.current, 1e4)) return null;
3324
- me(!0);
3325
- for (let te = 0; te < 5 && j.current !== 1; te++)
3324
+ ye(!0);
3325
+ for (let X = 0; X < 5 && j.current !== 1; X++)
3326
3326
  A("playVideo"), await B(() => j.current === 1, 1500);
3327
- return j.current !== 1 ? null : M.current ? (me(!0), !1) : (me(!1), await G(1200), j.current === 1 && S.current === !1 ? !0 : (me(!0), A("playVideo"), !1));
3327
+ return j.current !== 1 ? null : M.current ? (ye(!0), !1) : (ye(!1), await G(1200), j.current === 1 && S.current === !1 ? !0 : (ye(!0), A("playVideo"), !1));
3328
3328
  },
3329
- playing: ee,
3329
+ playing: te,
3330
3330
  ended: l === 0,
3331
3331
  t: p,
3332
3332
  idx: E,
3333
3333
  dur: z,
3334
3334
  muted: d,
3335
- seekN: ie,
3336
- toggle: oe,
3335
+ seekN: re,
3336
+ toggle: ae,
3337
3337
  seekRow: we,
3338
3338
  toggleMute: () => {
3339
3339
  const G = !h.current;
3340
- me(G), !G && !M.current && j.current === 1 && setTimeout(() => {
3341
- j.current === 2 && !h.current && (me(!0), A("playVideo"));
3340
+ ye(G), !G && !M.current && j.current === 1 && setTimeout(() => {
3341
+ j.current === 2 && !h.current && (ye(!0), A("playVideo"));
3342
3342
  }, 900);
3343
3343
  },
3344
3344
  seekFrac: (G) => C(Math.max(0, Math.min(1, G)) * z),
3345
3345
  seekWord: (G) => C(G.start),
3346
3346
  playRow: (G) => {
3347
- we(G), ee || ce();
3347
+ we(G), te || le();
3348
3348
  },
3349
3349
  stop: () => {
3350
3350
  ne(), C(0);
3351
3351
  },
3352
- engaged: ee || p > 0,
3352
+ engaged: te || p > 0,
3353
3353
  prev: () => we(E - 1),
3354
3354
  next: () => we(E + 1),
3355
3355
  hold: () => {
3356
- ee && (A("pauseVideo"), ke.current = !0);
3356
+ te && (A("pauseVideo"), ke.current = !0);
3357
3357
  },
3358
3358
  release: () => {
3359
- ke.current && (ke.current = !1, ce());
3359
+ ke.current && (ke.current = !1, le());
3360
3360
  },
3361
3361
  error: null,
3362
3362
  clearError: () => {
@@ -3369,7 +3369,7 @@ function Bl(t, e, n, s) {
3369
3369
  }, lead: $, setVideoSound: Le };
3370
3370
  }
3371
3371
  function Hl(t, e, n, s, r = 0, a = null) {
3372
- var te;
3372
+ var X;
3373
3373
  const o = v(null), [l, c] = I(!1), [d, u] = I(0), [h, M] = I(!1), p = v(h);
3374
3374
  p.current = h;
3375
3375
  const N = v(!1), [w, k] = I(null), [m, f] = I(!1), O = v(r);
@@ -3382,35 +3382,35 @@ function Hl(t, e, n, s, r = 0, a = null) {
3382
3382
  c(!1), o.current = null;
3383
3383
  return;
3384
3384
  }
3385
- const R = ci(t), Me = O.current;
3385
+ const R = ci(t), fe = O.current;
3386
3386
  return R.preload = "metadata", R.muted = p.current || N.current, R.onplay = () => c(!0), R.onpause = () => c(!1), R.onended = () => c(!1), R.onloadedmetadata = () => {
3387
- f(!0), R.currentTime = ((y == null ? void 0 : y.t) ?? 0) + Me, y != null && y.playing && R.play().catch((H) => {
3387
+ f(!0), R.currentTime = ((y == null ? void 0 : y.t) ?? 0) + fe, y != null && y.playing && R.play().catch((H) => {
3388
3388
  y.asked && (H == null ? void 0 : H.name) === "NotAllowedError" || k(kt(H));
3389
3389
  });
3390
3390
  }, R.onerror = () => {
3391
3391
  c(!1);
3392
- const H = R.error, Ne = Sa(H, !1);
3393
- Ca(t).then((Z) => {
3394
- Cl(Z == null ? void 0 : Z.message) || oi(H), o.current === R && (k({ message: (Z == null ? void 0 : Z.message) ?? Ne }), Z != null && Z.permanent || (o.current = null));
3392
+ const H = R.error, me = Sa(H, !1);
3393
+ Ca(t).then((q) => {
3394
+ Cl(q == null ? void 0 : q.message) || oi(H), o.current === R && (k({ message: (q == null ? void 0 : q.message) ?? me }), q != null && q.permanent || (o.current = null));
3395
3395
  });
3396
3396
  }, o.current = R, () => {
3397
- D.current = { t: Math.max(0, R.currentTime - Me), playing: !R.paused && !R.ended }, R.pause(), R.onplay = R.onpause = R.onended = R.onloadedmetadata = R.onerror = null, o.current = null;
3397
+ D.current = { t: Math.max(0, R.currentTime - fe), playing: !R.paused && !R.ended }, R.pause(), R.onplay = R.onpause = R.onended = R.onloadedmetadata = R.onerror = null, o.current = null;
3398
3398
  };
3399
3399
  }, [t, b]), _(() => () => {
3400
3400
  D.current = null;
3401
3401
  }, []);
3402
- const A = n.length ? ((te = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : te.end) ?? n[n.length - 1].start + 4 : 0, ee = r > 0 || s != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > s + 1, j = !ee && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || s || A || 1, S = v(j);
3402
+ const A = n.length ? ((X = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : X.end) ?? n[n.length - 1].start + 4 : 0, te = r > 0 || s != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > s + 1, j = !te && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || s || A || 1, S = v(j);
3403
3403
  S.current = j;
3404
- const $ = v(ee);
3405
- $.current = ee;
3404
+ const $ = v(te);
3405
+ $.current = te;
3406
3406
  const L = v(a);
3407
3407
  L.current = a;
3408
- const [z, E] = I(!1), ie = v(!1), V = (y) => {
3409
- ie.current = y, E(y);
3408
+ const [z, E] = I(!1), re = v(!1), V = (y) => {
3409
+ re.current = y, E(y);
3410
3410
  };
3411
3411
  _(() => {
3412
3412
  var y;
3413
- a == null && ie.current && (V(!1), (y = o.current) == null || y.play().catch(() => {
3413
+ a == null && re.current && (V(!1), (y = o.current) == null || y.play().catch(() => {
3414
3414
  }));
3415
3415
  }, [a]), _(() => {
3416
3416
  var y;
@@ -3420,15 +3420,15 @@ function Hl(t, e, n, s, r = 0, a = null) {
3420
3420
  if (!l) return;
3421
3421
  let y = 0;
3422
3422
  const R = () => {
3423
- const Me = o.current;
3424
- if (Me) {
3425
- const H = Me.currentTime - O.current;
3423
+ const fe = o.current;
3424
+ if (fe) {
3425
+ const H = fe.currentTime - O.current;
3426
3426
  if ($.current && H >= S.current) {
3427
- Me.pause(), u(S.current);
3427
+ fe.pause(), u(S.current);
3428
3428
  return;
3429
3429
  }
3430
3430
  if (L.current != null && H >= L.current) {
3431
- V(!0), Me.pause(), u(H);
3431
+ V(!0), fe.pause(), u(H);
3432
3432
  return;
3433
3433
  }
3434
3434
  u(H);
@@ -3442,10 +3442,10 @@ function Hl(t, e, n, s, r = 0, a = null) {
3442
3442
  let y = 0;
3443
3443
  for (let R = 0; R < n.length; R++) n[R].start <= d + 0.05 && (y = R);
3444
3444
  return y;
3445
- }, [n, d]), [ue, P] = I(0), q = (y) => {
3446
- const R = L.current != null ? Math.min(y, Math.max(0, L.current - 0.5)) : y, Me = o.current;
3447
- u(R), Me && (Me.currentTime = R + O.current), P((H) => H + 1);
3448
- }, ce = (y) => {
3445
+ }, [n, d]), [ue, P] = I(0), Z = (y) => {
3446
+ const R = L.current != null ? Math.min(y, Math.max(0, L.current - 0.5)) : y, fe = o.current;
3447
+ u(R), fe && (fe.currentTime = R + O.current), P((H) => H + 1);
3448
+ }, le = (y) => {
3449
3449
  (y == null ? void 0 : y.name) !== "AbortError" && k(kt(y));
3450
3450
  }, ne = () => {
3451
3451
  var R;
@@ -3455,55 +3455,55 @@ function Hl(t, e, n, s, r = 0, a = null) {
3455
3455
  D.current = (R = D.current) != null && R.asked ? null : { t: d, playing: !0, asked: !0 };
3456
3456
  return;
3457
3457
  }
3458
- t && W((Me) => Me + 1), k({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3458
+ t && W((fe) => fe + 1), k({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3459
3459
  return;
3460
3460
  }
3461
3461
  if (l) {
3462
3462
  y.pause();
3463
3463
  return;
3464
3464
  }
3465
- if (ie.current) {
3465
+ if (re.current) {
3466
3466
  V(!1);
3467
3467
  return;
3468
3468
  }
3469
- y.currentTime < O.current && (y.currentTime = O.current), d >= j - 0.25 && q(0), y.play().catch(ce);
3470
- }, oe = (y) => {
3469
+ y.currentTime < O.current && (y.currentTime = O.current), d >= j - 0.25 && Z(0), y.play().catch(le);
3470
+ }, ae = (y) => {
3471
3471
  const R = n[Math.max(0, Math.min(n.length - 1, y))];
3472
- R && q(R.start);
3473
- }, we = (y) => q(Math.max(0, Math.min(1, y)) * j), ke = (y) => {
3472
+ R && Z(R.start);
3473
+ }, we = (y) => Z(Math.max(0, Math.min(1, y)) * j), ke = (y) => {
3474
3474
  const R = Tn(y, n, j);
3475
- q(R.t);
3476
- const Me = o.current;
3477
- if (Me) {
3475
+ Z(R.t);
3476
+ const fe = o.current;
3477
+ if (fe) {
3478
3478
  if (!R.playing) {
3479
- Me.pause();
3479
+ fe.pause();
3480
3480
  return;
3481
3481
  }
3482
- V(!1), Me.play().catch(ce);
3482
+ V(!1), fe.play().catch(le);
3483
3483
  }
3484
- }, Pe = (y) => q(y.start), me = (y) => {
3485
- oe(y);
3484
+ }, Qe = (y) => Z(y.start), ye = (y) => {
3485
+ ae(y);
3486
3486
  const R = o.current;
3487
- R && R.paused && R.play().catch(ce);
3488
- }, Le = v(!1), Ee = v(0), $e = () => {
3487
+ R && R.paused && R.play().catch(le);
3488
+ }, Le = v(!1), Se = v(0), Be = () => {
3489
3489
  var y;
3490
3490
  l && ((y = o.current) == null || y.pause(), Le.current = !0);
3491
- }, Ce = () => {
3491
+ }, Oe = () => {
3492
3492
  var y;
3493
- Le.current && (Le.current = !1, (y = o.current) == null || y.play().catch(ce));
3493
+ Le.current && (Le.current = !1, (y = o.current) == null || y.play().catch(le));
3494
3494
  };
3495
3495
  return {
3496
3496
  autoplay: async () => {
3497
3497
  const y = o.current;
3498
3498
  if (!y) return null;
3499
3499
  y.currentTime < O.current && (y.currentTime = O.current);
3500
- const R = (Me) => {
3501
- p.current = Me, y.muted = Me || N.current, M(Me);
3500
+ const R = (fe) => {
3501
+ p.current = fe, y.muted = fe || N.current, M(fe);
3502
3502
  };
3503
3503
  try {
3504
3504
  return R(!1), await y.play(), !0;
3505
- } catch (Me) {
3506
- if ((Me == null ? void 0 : Me.name) !== "NotAllowedError")
3505
+ } catch (fe) {
3506
+ if ((fe == null ? void 0 : fe.name) !== "NotAllowedError")
3507
3507
  return R(!0), null;
3508
3508
  }
3509
3509
  try {
@@ -3522,11 +3522,11 @@ function Hl(t, e, n, s, r = 0, a = null) {
3522
3522
  p.current = y, o.current && (o.current.muted = y || N.current), M(y);
3523
3523
  },
3524
3524
  toggle: ne,
3525
- seekRow: oe,
3525
+ seekRow: ae,
3526
3526
  seekFrac: we,
3527
3527
  resumeAt: ke,
3528
- seekWord: Pe,
3529
- playRow: me,
3528
+ seekWord: Qe,
3529
+ playRow: ye,
3530
3530
  seekN: ue,
3531
3531
  stop: () => {
3532
3532
  const y = o.current;
@@ -3534,15 +3534,15 @@ function Hl(t, e, n, s, r = 0, a = null) {
3534
3534
  },
3535
3535
  videoAt: (y) => {
3536
3536
  const R = o.current;
3537
- if (!R || R.paused || R.ended || Le.current || Date.now() - Ee.current < 3e3) return;
3538
- const Me = y + O.current;
3539
- Math.abs(R.currentTime - Me) <= 0.2 || (Ee.current = Date.now(), R.currentTime = Me);
3537
+ if (!R || R.paused || R.ended || Le.current || Date.now() - Se.current < 3e3) return;
3538
+ const fe = y + O.current;
3539
+ Math.abs(R.currentTime - fe) <= 0.2 || (Se.current = Date.now(), R.currentTime = fe);
3540
3540
  },
3541
3541
  engaged: l || d > 0,
3542
- prev: () => oe(C - 1),
3543
- next: () => oe(C + 1),
3544
- hold: $e,
3545
- release: Ce,
3542
+ prev: () => ae(C - 1),
3543
+ next: () => ae(C + 1),
3544
+ hold: Be,
3545
+ release: Oe,
3546
3546
  error: w,
3547
3547
  clearError: () => k(null),
3548
3548
  has: e,
@@ -3565,62 +3565,62 @@ function Vl(t, e, n, s, r, a, o = !1, l) {
3565
3565
  c.current = l ?? c.current;
3566
3566
  const d = v(null), [u, h] = I(!1), [M, p] = I(0), [N, w] = I(0), [k, m] = I(!1), f = v(k);
3567
3567
  f.current = k;
3568
- const [O, D] = I(null), [b, W] = I(null), [A, ee] = I(null), [j, S] = I(null), $ = v(j);
3568
+ const [O, D] = I(null), [b, W] = I(null), [A, te] = I(null), [j, S] = I(null), $ = v(j);
3569
3569
  $.current = j;
3570
- const [L, z] = I(null), [E, ie] = I(null), [V, C] = I(null), [ue, P] = I(!1), q = v(e);
3571
- q.current = e;
3572
- const ce = v(o), ne = v([]);
3573
- ce.current = o, d.current && (d.current.flow = o);
3574
- const oe = v(null), we = v(r);
3570
+ const [L, z] = I(null), [E, re] = I(null), [V, C] = I(null), [ue, P] = I(!1), Z = v(e);
3571
+ Z.current = e;
3572
+ const le = v(o), ne = v([]);
3573
+ le.current = o, d.current && (d.current.flow = o);
3574
+ const ae = v(null), we = v(r);
3575
3575
  we.current = r;
3576
3576
  const ke = v(a);
3577
3577
  ke.current = a;
3578
- const Pe = Xe((Y) => {
3579
- Y.finite = !0, Y.coming = (U) => c.current.has(U), Y.readAhead = 6, Y.readAheadS = 45, Y.onWaiting = (U) => W(U), Y.onStarting = (U) => ee(U), Y.onSentence = (U) => {
3578
+ const Qe = Xe((Y) => {
3579
+ Y.finite = !0, Y.coming = (U) => c.current.has(U), Y.readAhead = 6, Y.readAheadS = 45, Y.onWaiting = (U) => W(U), Y.onStarting = (U) => te(U), Y.onSentence = (U) => {
3580
3580
  if (h(Y.playing), U == null) return;
3581
- const F = q.current.findIndex((J) => J.sentenceId === U);
3581
+ const F = Z.current.findIndex((ee) => ee.sentenceId === U);
3582
3582
  F >= 0 && p(F);
3583
3583
  }, Y.onError = (U) => {
3584
3584
  h(Y.playing), D(U instanceof ui ? { message: "The voice could not be started. Press Play to try again.", code: "voice_not_started" } : { message: "A line of this reading could not be played." });
3585
3585
  }, Y.gapBefore = (U, F) => {
3586
- if (!ce.current) return 0;
3587
- const J = q.current, he = J.find((De) => De.sentenceId === U), xe = J.find((De) => De.sentenceId === F);
3588
- if (!xe) return 0;
3589
- const ye = $.current;
3590
- if (U == null) return ye && ye.sid === F ? Math.max(0, xe.start - ye.t) : 0;
3591
- const je = oe.current;
3592
- return je && Date.now() - je.at < 2e3 ? Math.max(0, xe.start - (je.t + (Date.now() - je.at) / 1e3 * Y.rate)) : !he || xe.start <= he.start ? 0 : Math.max(0, xe.start - St(he, he.start, he.start + 4));
3593
- }, Y.flow = ce.current, Y.silentSpan = (U) => {
3594
- var Qe;
3595
- const F = q.current, J = F.findIndex((st) => st.sentenceId === U), he = F[J];
3596
- if (!he) return null;
3597
- const xe = ((Qe = F[J + 1]) == null ? void 0 : Qe.start) ?? St(he, he.start, he.start + 4), ye = Math.max(0, xe - he.start), je = oe.current, De = je && Date.now() - je.at < 2e3 ? je.t + (Date.now() - je.at) / 1e3 * (Y.rate || 1) : he.start, Ze = Math.max(0, Math.min(ye, De - he.start));
3598
- return { fromS: Ze, ms: (ye - Ze) * 1e3 / (Y.rate || 1) };
3586
+ if (!le.current) return 0;
3587
+ const ee = Z.current, Me = ee.find((xe) => xe.sentenceId === U), be = ee.find((xe) => xe.sentenceId === F);
3588
+ if (!be) return 0;
3589
+ const Te = $.current;
3590
+ if (U == null) return Te && Te.sid === F ? Math.max(0, be.start - Te.t) : 0;
3591
+ const ze = ae.current;
3592
+ return ze && Date.now() - ze.at < 2e3 ? Math.max(0, be.start - (ze.t + (Date.now() - ze.at) / 1e3 * Y.rate)) : !Me || be.start <= Me.start ? 0 : Math.max(0, be.start - St(Me, Me.start, Me.start + 4));
3593
+ }, Y.flow = le.current, Y.silentSpan = (U) => {
3594
+ var $e;
3595
+ const F = Z.current, ee = F.findIndex((st) => st.sentenceId === U), Me = F[ee];
3596
+ if (!Me) return null;
3597
+ const be = (($e = F[ee + 1]) == null ? void 0 : $e.start) ?? St(Me, Me.start, Me.start + 4), Te = Math.max(0, be - Me.start), ze = ae.current, xe = ze && Date.now() - ze.at < 2e3 ? ze.t + (Date.now() - ze.at) / 1e3 * (Y.rate || 1) : Me.start, Ze = Math.max(0, Math.min(Te, xe - Me.start));
3598
+ return { fromS: Ze, ms: (Te - Ze) * 1e3 / (Y.rate || 1) };
3599
3599
  }, Y.speakable = (U) => {
3600
3600
  const F = we.current;
3601
3601
  if (!F || !F.size) return !0;
3602
- const J = q.current.find((he) => he.sentenceId === U);
3603
- return !J || !F.has(J.speaker);
3602
+ const ee = Z.current.find((Me) => Me.sentenceId === U);
3603
+ return !ee || !F.has(ee.speaker);
3604
3604
  };
3605
- }, []), me = v(null), Le = v(null), Ee = v(null), [$e, Ce] = I(!1), G = v(() => {
3605
+ }, []), ye = v(null), Le = v(null), Se = v(null), [Be, Oe] = I(!1), G = v(() => {
3606
3606
  }), B = (Y) => {
3607
- if (Ee.current = Y, Ce(!!(Y != null && Y.playing)), !Y) return;
3608
- const U = Tn(Y, q.current, be).index;
3609
- p(U), Oe.current = U;
3610
- }, te = () => {
3611
- Ee.current && B(null);
3607
+ if (Se.current = Y, Oe(!!(Y != null && Y.playing)), !Y) return;
3608
+ const U = Tn(Y, Z.current, Ce).index;
3609
+ p(U), Ae.current = U;
3610
+ }, X = () => {
3611
+ Se.current && B(null);
3612
3612
  };
3613
3613
  _(() => {
3614
3614
  var F;
3615
- if (me.current !== s) {
3616
- const J = me.current != null ? Le.current : null;
3617
- me.current = s, (F = d.current) == null || F.stop(), d.current = new us(), Pe(d.current), d.current.setSequence(ne.current), h(!1), p(0), D(null), ee(null), S(null), B(J && (J.playing || J.t > 0) ? J : null);
3615
+ if (ye.current !== s) {
3616
+ const ee = ye.current != null ? Le.current : null;
3617
+ ye.current = s, (F = d.current) == null || F.stop(), d.current = new Ms(), Qe(d.current), d.current.setSequence(ne.current), h(!1), p(0), D(null), te(null), S(null), B(ee && (ee.playing || ee.t > 0) ? ee : null);
3618
3618
  }
3619
3619
  const Y = d.current;
3620
3620
  Y.setMuted(f.current);
3621
- for (const J of t) Y.add(J);
3622
- const U = Ee.current;
3623
- U && (ce.current || t.some((J) => J.sentenceId >= (U.sentenceId ?? 0))) && (B(null), G.current(U));
3621
+ for (const ee of t) Y.add(ee);
3622
+ const U = Se.current;
3623
+ U && (le.current || t.some((ee) => ee.sentenceId >= (U.sentenceId ?? 0))) && (B(null), G.current(U));
3624
3624
  }, [s, t]);
3625
3625
  const y = Ie(() => o ? e.map((Y) => Y.sentenceId).filter((Y) => Y != null) : [], [e, o]);
3626
3626
  ne.current = y, _(() => {
@@ -3628,69 +3628,69 @@ function Vl(t, e, n, s, r, a, o = !1, l) {
3628
3628
  (Y = d.current) == null || Y.setSequence(y);
3629
3629
  }, [y, s]), _(() => () => {
3630
3630
  var Y;
3631
- (Y = d.current) == null || Y.stop(), d.current = null, me.current = null;
3631
+ (Y = d.current) == null || Y.stop(), d.current = null, ye.current = null;
3632
3632
  }, []);
3633
3633
  const R = L != null || E != null;
3634
3634
  _(() => {
3635
3635
  if (!u && !R) {
3636
- z(null), ie(null);
3636
+ z(null), re(null);
3637
3637
  return;
3638
3638
  }
3639
3639
  const Y = () => {
3640
- var ye, je;
3641
- const F = ((ye = d.current) == null ? void 0 : ye.resting()) ?? null;
3642
- P(!!(F != null && F.silent)), F != null && F.silent && $.current && ($.current = null, S(null)), ie((De) => F == null ? null : De != null && Math.abs(De - F.s) < 0.05 ? De : F.s);
3643
- const J = $.current;
3644
- F == null ? C(null) : J && J.sid === F.sentenceId && (C(J.t), $.current = null, S(null));
3645
- const he = ((je = d.current) == null ? void 0 : je.position()) ?? null, xe = he && ke.current ? ke.current[String(he.sentenceId)] ?? null : null;
3646
- J && he && he.sentenceId === J.sid && he.t > 0.1 && S(null), z((De) => he ? De && Math.abs(De.t - he.t) < 0.05 && De.dur === he.dur && De.words === xe ? De : { t: he.t, dur: he.dur, words: xe } : De == null ? De : null);
3640
+ var Te, ze;
3641
+ const F = ((Te = d.current) == null ? void 0 : Te.resting()) ?? null;
3642
+ P(!!(F != null && F.silent)), F != null && F.silent && $.current && ($.current = null, S(null)), re((xe) => F == null ? null : xe != null && Math.abs(xe - F.s) < 0.05 ? xe : F.s);
3643
+ const ee = $.current;
3644
+ F == null ? C(null) : ee && ee.sid === F.sentenceId && (C(ee.t), $.current = null, S(null));
3645
+ const Me = ((ze = d.current) == null ? void 0 : ze.position()) ?? null, be = Me && ke.current ? ke.current[String(Me.sentenceId)] ?? null : null;
3646
+ ee && Me && Me.sentenceId === ee.sid && Me.t > 0.1 && S(null), z((xe) => Me ? xe && Math.abs(xe.t - Me.t) < 0.05 && xe.dur === Me.dur && xe.words === be ? xe : { t: Me.t, dur: Me.dur, words: be } : xe == null ? xe : null);
3647
3647
  };
3648
3648
  Y();
3649
3649
  const U = setInterval(Y, 100);
3650
3650
  return () => clearInterval(U);
3651
3651
  }, [u, R]);
3652
- const Me = Ie(() => new Set(t.map((Y) => Y.sentenceId)), [t]), H = (Y) => {
3652
+ const fe = Ie(() => new Set(t.map((Y) => Y.sentenceId)), [t]), H = (Y) => {
3653
3653
  var F;
3654
3654
  const U = (F = e[Y]) == null ? void 0 : F.sentenceId;
3655
- return U != null && Me.has(U);
3656
- }, Ne = (Y, U) => {
3655
+ return U != null && fe.has(U);
3656
+ }, me = (Y, U) => {
3657
3657
  for (let F = Y; F >= 0 && F < e.length; F += U) if (H(F)) return F;
3658
3658
  return null;
3659
- }, Z = Math.max(0, Math.min(M, Math.max(0, e.length - 1))), ze = e.length ? e[e.length - 1].start + 4 : 0, be = n || ze || 1, Be = v(!1), Oe = v(M);
3660
- Oe.current = M;
3661
- const Fe = (Y) => {
3662
- var U, F, J;
3663
- (F = d.current) == null || F.play(((U = e[Y]) == null ? void 0 : U.sentenceId) ?? null), h(!!((J = d.current) != null && J.playing));
3659
+ }, q = Math.max(0, Math.min(M, Math.max(0, e.length - 1))), ve = e.length ? e[e.length - 1].start + 4 : 0, Ce = n || ve || 1, He = v(!1), Ae = v(M);
3660
+ Ae.current = M;
3661
+ const Ue = (Y) => {
3662
+ var U, F, ee;
3663
+ (F = d.current) == null || F.play(((U = e[Y]) == null ? void 0 : U.sentenceId) ?? null), h(!!((ee = d.current) != null && ee.playing));
3664
3664
  }, ge = (Y) => {
3665
- var F, J, he;
3665
+ var F, ee, Me;
3666
3666
  const U = Math.max(0, Math.min(Math.max(0, e.length - 1), Y));
3667
- p(U), Oe.current = U, w((xe) => xe + 1), (J = d.current) == null || J.seek(((F = e[U]) == null ? void 0 : F.sentenceId) ?? null), h(!!((he = d.current) != null && he.playing));
3668
- }, K = (Y) => {
3667
+ p(U), Ae.current = U, w((be) => be + 1), (ee = d.current) == null || ee.seek(((F = e[U]) == null ? void 0 : F.sentenceId) ?? null), h(!!((Me = d.current) != null && Me.playing));
3668
+ }, Re = (Y) => {
3669
3669
  var U;
3670
- te(), S(null), (U = d.current) == null || U.startWithin(-1, 0), ge(Y);
3671
- }, pe = (Y) => {
3672
- var he;
3673
- const U = e[Y], F = (U == null ? void 0 : U.start) ?? 0, J = ((he = e[Y + 1]) == null ? void 0 : he.start) ?? St(U, F, be);
3674
- return { from: F, span: Math.max(0, J - F) };
3675
- }, re = pe(Z), ae = Math.max(0, Math.min(re.span, St(e[Z], re.from, re.from + 4) - re.from)), Te = j ? j.t : o ? E != null && ue ? re.from + Math.min(re.span, E) : E != null ? V != null ? Math.min(re.from, V + E) : re.from + Math.min(re.span, ae + E) : L && L.dur > 0 ? re.from + Math.min(ae, L.t / L.dur * ae) : re.from : L && L.dur > 0 ? re.from + Math.min(re.span, L.t / L.dur * re.span) : re.from;
3670
+ X(), S(null), (U = d.current) == null || U.startWithin(-1, 0), ge(Y);
3671
+ }, K = (Y) => {
3672
+ var Me;
3673
+ const U = e[Y], F = (U == null ? void 0 : U.start) ?? 0, ee = ((Me = e[Y + 1]) == null ? void 0 : Me.start) ?? St(U, F, Ce);
3674
+ return { from: F, span: Math.max(0, ee - F) };
3675
+ }, ie = K(q), de = Math.max(0, Math.min(ie.span, St(e[q], ie.from, ie.from + 4) - ie.from)), ce = j ? j.t : o ? E != null && ue ? ie.from + Math.min(ie.span, E) : E != null ? V != null ? Math.min(ie.from, V + E) : ie.from + Math.min(ie.span, de + E) : L && L.dur > 0 ? ie.from + Math.min(de, L.t / L.dur * de) : ie.from : L && L.dur > 0 ? ie.from + Math.min(ie.span, L.t / L.dur * ie.span) : ie.from;
3676
3676
  _(() => {
3677
- Le.current = Ee.current ?? Sl(e, Te, u, be);
3677
+ Le.current = Se.current ?? Sl(e, ce, u, Ce);
3678
3678
  });
3679
- const ve = {
3680
- playing: u || $e,
3681
- t: Te,
3682
- idx: Z,
3683
- dur: be,
3679
+ const Ne = {
3680
+ playing: u || Be,
3681
+ t: ce,
3682
+ idx: q,
3683
+ dur: Ce,
3684
3684
  muted: k,
3685
3685
  wordSync: !1,
3686
3686
  timed: o,
3687
3687
  clipPos: j ? null : L,
3688
3688
  videoAt: (Y) => {
3689
- oe.current = { t: Y, at: Date.now() };
3689
+ ae.current = { t: Y, at: Date.now() };
3690
3690
  },
3691
3691
  engaged: u || L != null,
3692
3692
  has: t.length > 0,
3693
- preparing: b != null || $e,
3693
+ preparing: b != null || Be,
3694
3694
  silent: u && ue,
3695
3695
  starting: A,
3696
3696
  error: O,
@@ -3701,87 +3701,87 @@ function Vl(t, e, n, s, r, a, o = !1, l) {
3701
3701
  f.current = Y, (U = d.current) == null || U.setMuted(Y), m(Y);
3702
3702
  },
3703
3703
  toggle: () => {
3704
- var U, F, J;
3705
- if ($e) {
3706
- te();
3704
+ var U, F, ee;
3705
+ if (Be) {
3706
+ X();
3707
3707
  return;
3708
3708
  }
3709
- if (te(), u) {
3709
+ if (X(), u) {
3710
3710
  (U = d.current) == null || U.pause(), h(!1);
3711
3711
  return;
3712
3712
  }
3713
3713
  D(null);
3714
- const Y = Oe.current;
3715
- if (!$.current && ((J = d.current) != null && J.resume(((F = e[Y]) == null ? void 0 : F.sentenceId) ?? null))) {
3714
+ const Y = Ae.current;
3715
+ if (!$.current && ((ee = d.current) != null && ee.resume(((F = e[Y]) == null ? void 0 : F.sentenceId) ?? null))) {
3716
3716
  h(!0);
3717
3717
  return;
3718
3718
  }
3719
- Fe(Y);
3719
+ Ue(Y);
3720
3720
  },
3721
3721
  pause: () => {
3722
3722
  var Y;
3723
- te(), (Y = d.current) == null || Y.pause(), h(!1);
3723
+ X(), (Y = d.current) == null || Y.pause(), h(!1);
3724
3724
  },
3725
3725
  stop: () => {
3726
3726
  var Y, U, F;
3727
- te(), (Y = d.current) == null || Y.pause(), h(!1), p(0), z(null), (F = d.current) == null || F.seek(((U = e[0]) == null ? void 0 : U.sentenceId) ?? null);
3727
+ X(), (Y = d.current) == null || Y.pause(), h(!1), p(0), z(null), (F = d.current) == null || F.seek(((U = e[0]) == null ? void 0 : U.sentenceId) ?? null);
3728
3728
  },
3729
- seekRow: K,
3729
+ seekRow: Re,
3730
3730
  resumeAt: (Y) => {
3731
3731
  B(Y), t.some((U) => U.sentenceId >= (Y.sentenceId ?? 0)) && (B(null), G.current(Y));
3732
3732
  },
3733
3733
  seekFrac: (Y) => {
3734
3734
  var st, ot, dt;
3735
- te();
3736
- const U = Math.max(0, Math.min(1, Y)) * be;
3735
+ X();
3736
+ const U = Math.max(0, Math.min(1, Y)) * Ce;
3737
3737
  let F = 0;
3738
- for (let Ve = 0; Ve < e.length; Ve++) e[Ve].start <= U && (F = Ve);
3739
- const J = e[F], he = o && J && U < J.start - 0.05;
3740
- if (o && J && (he || e[F + 1] && U >= St(J, J.start, J.start + 4))) {
3741
- const Ve = he ? F : F + 1, Re = e[Ve];
3738
+ for (let We = 0; We < e.length; We++) e[We].start <= U && (F = We);
3739
+ const ee = e[F], Me = o && ee && U < ee.start - 0.05;
3740
+ if (o && ee && (Me || e[F + 1] && U >= St(ee, ee.start, ee.start + 4))) {
3741
+ const We = Me ? F : F + 1, Pe = e[We];
3742
3742
  (st = d.current) == null || st.startWithin(-1, 0);
3743
- const lt = { t: U, sid: Re.sentenceId ?? null };
3744
- $.current = lt, S(lt), ge(Ve);
3743
+ const lt = { t: U, sid: Pe.sentenceId ?? null };
3744
+ $.current = lt, S(lt), ge(We);
3745
3745
  return;
3746
3746
  }
3747
- const xe = (J == null ? void 0 : J.sentenceId) ?? null, { from: ye, span: je } = pe(F);
3748
- let De = je > 0 ? Math.max(0, Math.min(1, (U - ye) / je)) : 0;
3749
- const Ze = xe != null ? (ot = ke.current) == null ? void 0 : ot[String(xe)] : void 0, Qe = Ze != null && Ze.length ? Ze[Ze.length - 1][1] : 0;
3750
- if (J && Ze && Ze.length === J.words.length && Qe > 0) {
3751
- let Ve = 0;
3752
- for (let He = 0; He < J.words.length; He++) J.words[He].start <= U && (Ve = He);
3753
- const Re = J.words[Ve], lt = Re.end > Re.start ? Math.max(0, Math.min(1, (U - Re.start) / (Re.end - Re.start))) : 0;
3754
- De = Math.min(1, (Ze[Ve][0] + lt * (Ze[Ve][1] - Ze[Ve][0])) / Qe);
3747
+ const be = (ee == null ? void 0 : ee.sentenceId) ?? null, { from: Te, span: ze } = K(F);
3748
+ let xe = ze > 0 ? Math.max(0, Math.min(1, (U - Te) / ze)) : 0;
3749
+ const Ze = be != null ? (ot = ke.current) == null ? void 0 : ot[String(be)] : void 0, $e = Ze != null && Ze.length ? Ze[Ze.length - 1][1] : 0;
3750
+ if (ee && Ze && Ze.length === ee.words.length && $e > 0) {
3751
+ let We = 0;
3752
+ for (let Ve = 0; Ve < ee.words.length; Ve++) ee.words[Ve].start <= U && (We = Ve);
3753
+ const Pe = ee.words[We], lt = Pe.end > Pe.start ? Math.max(0, Math.min(1, (U - Pe.start) / (Pe.end - Pe.start))) : 0;
3754
+ xe = Math.min(1, (Ze[We][0] + lt * (Ze[We][1] - Ze[We][0])) / $e);
3755
3755
  }
3756
- xe != null && ((dt = d.current) == null || dt.startWithin(xe, De)), S(De > 0.01 ? { t: U, sid: xe } : null), ge(F);
3756
+ be != null && ((dt = d.current) == null || dt.startWithin(be, xe)), S(xe > 0.01 ? { t: U, sid: be } : null), ge(F);
3757
3757
  },
3758
3758
  seekWord: a ? (Y) => {
3759
- var he, xe, ye, je;
3760
- const U = e[Z];
3759
+ var Me, be, Te, ze;
3760
+ const U = e[q];
3761
3761
  if (!U || U.sentenceId == null) return;
3762
- const F = U.words.findIndex((De) => De.seq === Y.seq && De.idx === Y.idx), J = F >= 0 ? (ye = (xe = (he = ke.current) == null ? void 0 : he[String(U.sentenceId)]) == null ? void 0 : xe[F]) == null ? void 0 : ye[0] : void 0;
3763
- J != null && ((je = d.current) == null || je.seekWithin(J));
3762
+ const F = U.words.findIndex((xe) => xe.seq === Y.seq && xe.idx === Y.idx), ee = F >= 0 ? (Te = (be = (Me = ke.current) == null ? void 0 : Me[String(U.sentenceId)]) == null ? void 0 : be[F]) == null ? void 0 : Te[0] : void 0;
3763
+ ee != null && ((ze = d.current) == null || ze.seekWithin(ee));
3764
3764
  } : void 0,
3765
3765
  playRow: (Y) => {
3766
3766
  var F;
3767
- te();
3767
+ X();
3768
3768
  const U = Math.max(0, Math.min(Math.max(0, e.length - 1), Y));
3769
- S(null), (F = d.current) == null || F.startWithin(-1, 0), p(U), Oe.current = U, w((J) => J + 1), Fe(U);
3769
+ S(null), (F = d.current) == null || F.startWithin(-1, 0), p(U), Ae.current = U, w((ee) => ee + 1), Ue(U);
3770
3770
  },
3771
3771
  prev: () => {
3772
- const Y = Ne(Z - 1, -1);
3773
- Y != null && K(Y);
3772
+ const Y = me(q - 1, -1);
3773
+ Y != null && Re(Y);
3774
3774
  },
3775
3775
  next: () => {
3776
- const Y = Ne(Z + 1, 1);
3777
- Y != null && K(Y);
3776
+ const Y = me(q + 1, 1);
3777
+ Y != null && Re(Y);
3778
3778
  },
3779
3779
  hold: () => {
3780
3780
  var Y;
3781
- u && ((Y = d.current) == null || Y.pause(), Be.current = !0);
3781
+ u && ((Y = d.current) == null || Y.pause(), He.current = !0);
3782
3782
  },
3783
3783
  release: () => {
3784
- Be.current && (Be.current = !1, Fe(Oe.current));
3784
+ He.current && (He.current = !1, Ue(Ae.current));
3785
3785
  },
3786
3786
  clearError: () => D(null),
3787
3787
  setVolume: (Y) => {
@@ -3789,135 +3789,135 @@ function Vl(t, e, n, s, r, a, o = !1, l) {
3789
3789
  return (U = d.current) == null ? void 0 : U.setVolume(Y);
3790
3790
  }
3791
3791
  };
3792
- function Ae(Y) {
3793
- var J, he, xe, ye;
3794
- const U = (J = e[Y]) == null ? void 0 : J.sentenceId;
3792
+ function je(Y) {
3793
+ var ee, Me, be, Te;
3794
+ const U = (ee = e[Y]) == null ? void 0 : ee.sentenceId;
3795
3795
  if (U == null) return;
3796
- p(Y), Oe.current = Y, S(null), $.current = null, (he = d.current) == null || he.joinSilently(U);
3797
- const F = ((xe = d.current) == null ? void 0 : xe.resting()) ?? null;
3798
- ie((F == null ? void 0 : F.s) ?? null), P(!!(F != null && F.silent)), h(!!((ye = d.current) != null && ye.playing));
3796
+ p(Y), Ae.current = Y, S(null), $.current = null, (Me = d.current) == null || Me.joinSilently(U);
3797
+ const F = ((be = d.current) == null ? void 0 : be.resting()) ?? null;
3798
+ re((F == null ? void 0 : F.s) ?? null), P(!!(F != null && F.silent)), h(!!((Te = d.current) != null && Te.playing));
3799
3799
  }
3800
- return ve.joinAt = o ? (Y) => {
3801
- te(), Ae(Tn({ t: Y, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, be).index);
3800
+ return Ne.joinAt = o ? (Y) => {
3801
+ X(), je(Tn({ t: Y, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, Ce).index);
3802
3802
  } : void 0, G.current = (Y) => {
3803
3803
  var F;
3804
- const U = Tn(Y, e, be);
3805
- if (ce.current) {
3806
- p(U.index), Oe.current = U.index, U.playing && Ae(U.index);
3804
+ const U = Tn(Y, e, Ce);
3805
+ if (le.current) {
3806
+ p(U.index), Ae.current = U.index, U.playing && je(U.index);
3807
3807
  return;
3808
3808
  }
3809
- (F = ve.seekFrac) == null || F.call(ve, U.t / be), U.playing && Fe(Oe.current);
3810
- }, ve;
3809
+ (F = Ne.seekFrac) == null || F.call(Ne, U.t / Ce), U.playing && Ue(Ae.current);
3810
+ }, Ne;
3811
3811
  }
3812
3812
  const Wl = () => {
3813
3813
  }, Fl = "The language this recording is read aloud in.", Gl = { title: "READ IN", note: "The transcript and its voice switch to this language." };
3814
3814
  function Zl({ recordingId: t, model: e, rows: n, lenS: s, ended: r, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: d, setPickedLang: u, side: h, hearOriginal: M = !1, timed: p = !1, stockVoices: N = !1, stickyPicker: w = !1, pickerBusy: k = null, voiceSheet: m, forcedVoice: f = null }) {
3815
3815
  var sn, rn, Ft, Gt;
3816
- const { onAddVoice: O, onPickVoice: D, onSelectSpeaker: b, noCloneFor: W, castNoClone: A, castShort: ee, castBuilding: j, castWarn: S, badge: $, titleNode: L } = m ?? {}, z = !!m, E = !!(m != null && m.pendingClones), [ie, V] = gi(), [C, ue] = I(null), [P, q] = I(!1), [ce, ne] = I(!1), [oe, we] = I(!1), [ke, Pe] = I(!1), me = d ?? l, Le = d === null, Ee = d != null || C != null, Ce = ((Q) => !!Q && !!(o != null && o.voice.includes(Q)))(Le ? l : me) ? Le ? l : me : "en", G = Dl(Ce), B = (m == null ? void 0 : m.cloneOn) ?? !0, [te, y] = I(0), R = v(B);
3816
+ const { onAddVoice: O, onPickVoice: D, onSelectSpeaker: b, noCloneFor: W, castNoClone: A, castShort: te, castBuilding: j, castWarn: S, badge: $, titleNode: L } = m ?? {}, z = !!m, E = !!(m != null && m.pendingClones), [re, V] = gi(), [C, ue] = I(null), [P, Z] = I(!1), [le, ne] = I(!1), [ae, we] = I(!1), [ke, Qe] = I(!1), ye = d ?? l, Le = d === null, Se = d != null || C != null, Oe = ((Q) => !!Q && !!(o != null && o.voice.includes(Q)))(Le ? l : ye) ? Le ? l : ye : "en", G = Dl(Oe), B = (m == null ? void 0 : m.cloneOn) ?? !0, [X, y] = I(0), R = v(B);
3817
3817
  _(() => {
3818
3818
  R.current !== B && (R.current = B, y((Q) => Q + 1));
3819
3819
  }, [B]);
3820
- const Me = dl(Ce, Ee || r || ce, Ml(e) * 1e3 + te, { id: t ?? null, shareCode: a.shareCode ?? null }), H = Ie(() => ((Me == null ? void 0 : Me.voices) ?? []).filter((Q) => z || !Q.cloned || Q.speaker != null), [Me, z]), Ne = H.length > 1, Z = ps(o, me), ze = vi(), be = Ie(() => fi(o, "translation"), [o]), [Be, Oe] = I(null), [Fe] = I(() => /* @__PURE__ */ new Set()), [ge, K] = I({}), pe = Ie(() => al(n, e, ze.vcUnknownSpk), [n, e, ze]), re = Ne && pe.filter((Q) => Q.key >= 0).length > 1, ae = Be != null && pe.some((Q) => Q.key === Be) ? Be : ((sn = pe[0]) == null ? void 0 : sn.key) ?? null, Te = Ie(() => {
3821
- const Q = Gr(pe, H, B);
3822
- for (const [Se, We] of Object.entries(ge[Ce ?? ""] ?? {})) Q.set(Number(Se), We);
3820
+ const fe = dl(Oe, Se || r || le, Ml(e) * 1e3 + X, { id: t ?? null, shareCode: a.shareCode ?? null }), H = Ie(() => ((fe == null ? void 0 : fe.voices) ?? []).filter((Q) => z || !Q.cloned || Q.speaker != null), [fe, z]), me = H.length > 1, q = ys(o, ye), ve = vi(), Ce = Ie(() => fi(o, "translation"), [o]), [He, Ae] = I(null), [Ue] = I(() => /* @__PURE__ */ new Set()), [ge, Re] = I({}), K = Ie(() => al(n, e, ve.vcUnknownSpk), [n, e, ve]), ie = me && K.filter((Q) => Q.key >= 0).length > 1, de = He != null && K.some((Q) => Q.key === He) ? He : ((sn = K[0]) == null ? void 0 : sn.key) ?? null, ce = Ie(() => {
3821
+ const Q = Gr(K, H, B);
3822
+ for (const [De, Fe] of Object.entries(ge[Oe ?? ""] ?? {})) Q.set(Number(De), Fe);
3823
3823
  return Q;
3824
- }, [pe, H, ge, Ce, B]), ve = re && Object.keys(ge[Ce ?? ""] ?? {}).length > 0, Ae = Ie(() => N && !ve ? Gr(pe, H, !1) : null, [N, ve, pe, H]), Y = Ie(() => ve ? Wr(Te) || null : Ae && Wr(Ae) || null, [ve, Te, Ae]), U = ve ? Te : Ae, F = H.some((Q) => Q.cloned && Q.consent !== "pending"), J = !!me && !!(o != null && o.voice.includes(me)), he = J && !M, xe = Ie(
3824
+ }, [K, H, ge, Oe, B]), Ne = ie && Object.keys(ge[Oe ?? ""] ?? {}).length > 0, je = Ie(() => N && !Ne ? Gr(K, H, !1) : null, [N, Ne, K, H]), Y = Ie(() => Ne ? Wr(ce) || null : je && Wr(je) || null, [Ne, ce, je]), U = Ne ? ce : je, F = H.some((Q) => Q.cloned && Q.consent !== "pending"), ee = !!ye && !!(o != null && o.voice.includes(ye)), Me = ee && !M, be = Ie(
3825
3825
  () => n.filter((Q) => !Q.suppressed && !Q.unclear).map((Q) => Q.sentenceId).filter((Q) => Q != null),
3826
3826
  [n]
3827
- ), ye = hl({ recordingId: t, lang: me, ended: r, cred: a, pickedVoice: f || (Y ?? C), sentenceIds: r && he ? xe : void 0 }), je = H.find((Q) => Q.id === C) ?? H.find((Q) => {
3828
- var Se;
3829
- return Q.id === ((Se = ye.track) == null ? void 0 : Se.voice);
3830
- }) ?? H.find((Q) => Q.default) ?? H[0] ?? null, De = (je == null ? void 0 : je.id) ?? null;
3827
+ ), Te = hl({ recordingId: t, lang: ye, ended: r, cred: a, pickedVoice: f || (Y ?? C), sentenceIds: r && Me ? be : void 0 }), ze = H.find((Q) => Q.id === C) ?? H.find((Q) => {
3828
+ var De;
3829
+ return Q.id === ((De = Te.track) == null ? void 0 : De.voice);
3830
+ }) ?? H.find((Q) => Q.default) ?? H[0] ?? null, xe = (ze == null ? void 0 : ze.id) ?? null;
3831
3831
  _(() => {
3832
- if (!ye.rendering) return;
3833
- const Q = setInterval(ye.reload, 4e3);
3832
+ if (!Te.rendering) return;
3833
+ const Q = setInterval(Te.reload, 4e3);
3834
3834
  return () => clearInterval(Q);
3835
- }, [ye.rendering, ye.reload]);
3836
- const Ze = `${t ?? ""}|${me ?? ""}|${f || (Y ?? C ?? ((rn = ye.track) == null ? void 0 : rn.voiceKey) ?? "default")}`, Qe = Vl(ye.clips, n, s, Ze, Fe, (Ft = ye.track) == null ? void 0 : Ft.wordTimes, p, ye.coming);
3835
+ }, [Te.rendering, Te.reload]);
3836
+ const Ze = `${t ?? ""}|${ye ?? ""}|${f || (Y ?? C ?? ((rn = Te.track) == null ? void 0 : rn.voiceKey) ?? "default")}`, $e = Vl(Te.clips, n, s, Ze, Ue, (Ft = Te.track) == null ? void 0 : Ft.wordTimes, p, Te.coming);
3837
3837
  _(() => {
3838
- var Se;
3839
- const Q = (Se = n[Qe.idx]) == null ? void 0 : Se.sentenceId;
3840
- Q != null && ye.setNear(Q);
3841
- }, [Qe.idx]), _(() => {
3842
- !ke || !Qe.has || (Pe(!1), Qe.playing || Qe.toggle());
3843
- }, [ke, Qe.has]);
3844
- const st = ye.rendering, ot = st ? null : ye.failed ?? null, dt = !1, Ve = Ee && he, Re = Ee && !Le && he && !(ye.listed && ye.listed.lang === me && ye.listed.recordingId === t), lt = {
3845
- ...Qe,
3846
- has: Qe.has || Ve && r,
3838
+ var De;
3839
+ const Q = (De = n[$e.idx]) == null ? void 0 : De.sentenceId;
3840
+ Q != null && Te.setNear(Q);
3841
+ }, [$e.idx]), _(() => {
3842
+ !ke || !$e.has || (Qe(!1), $e.playing || $e.toggle());
3843
+ }, [ke, $e.has]);
3844
+ const st = Te.rendering, ot = st ? null : Te.failed ?? null, dt = !1, We = Se && Me, Pe = Se && !Le && Me && !(Te.listed && Te.listed.lang === ye && Te.listed.recordingId === t), lt = {
3845
+ ...$e,
3846
+ has: $e.has || We && r,
3847
3847
  toggle: () => {
3848
- if (!Qe.has && !Qe.playing) {
3849
- Pe(!0);
3848
+ if (!$e.has && !$e.playing) {
3849
+ Qe(!0);
3850
3850
  return;
3851
3851
  }
3852
- Qe.toggle();
3852
+ $e.toggle();
3853
3853
  }
3854
- }, He = () => q(!0), mt = () => {
3855
- q(!1), ne(oe), we(!1);
3854
+ }, Ve = () => Z(!0), mt = () => {
3855
+ Z(!1), ne(ae), we(!1);
3856
3856
  }, Mt = (Q) => {
3857
- if (u(Q), V(Q), !((h || w) && !oe)) {
3857
+ if (u(Q), V(Q), !((h || w) && !ae)) {
3858
3858
  if (Q != null) {
3859
3859
  mt();
3860
3860
  return;
3861
3861
  }
3862
- G.reset(), q(!1), ne(!1), we(!1);
3862
+ G.reset(), Z(!1), ne(!1), we(!1);
3863
3863
  }
3864
3864
  }, Bt = () => {
3865
3865
  G.reset(), ne(!0);
3866
3866
  }, se = () => {
3867
3867
  G.reset(), ne(!1);
3868
- }, Ot = P && !oe, x = ce || P && oe, en = () => {
3868
+ }, Ot = P && !ae, x = le || P && ae, en = () => {
3869
3869
  if (Ot) {
3870
- q(!1);
3870
+ Z(!1);
3871
3871
  return;
3872
3872
  }
3873
- G.reset(), ne(!1), we(!1), q(!0);
3873
+ G.reset(), ne(!1), we(!1), Z(!0);
3874
3874
  }, vt = () => {
3875
3875
  if (G.reset(), x) {
3876
- ne(!1), q(!1), we(!1);
3876
+ ne(!1), Z(!1), we(!1);
3877
3877
  return;
3878
3878
  }
3879
- q(!1), we(!1), ne(!0);
3879
+ Z(!1), we(!1), ne(!0);
3880
3880
  }, Et = (Q) => {
3881
- if (G.reset(), ne(re), (me !== Ce || Le) && u(Ce), ye.forget(), Pe(!0), re && ae != null && Ce) {
3882
- const Se = new Map(Te);
3883
- Se.set(ae, Q), K((We) => ({ ...We, [Ce]: Object.fromEntries(Se) })), ue(null);
3881
+ if (G.reset(), ne(ie), (ye !== Oe || Le) && u(Oe), Te.forget(), Qe(!0), ie && de != null && Oe) {
3882
+ const De = new Map(ce);
3883
+ De.set(de, Q), Re((Fe) => ({ ...Fe, [Oe]: Object.fromEntries(De) })), ue(null);
3884
3884
  return;
3885
3885
  }
3886
3886
  ue(Q);
3887
- }, it = Le ? { ...ps(o, null), flag: /* @__PURE__ */ i(le, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, In = c ? h ? /* @__PURE__ */ i("span", { className: "barchip", style: Ot ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(Ln, { flag: it.flag, code: it.code, bordered: !1, onClick: en, style: Zr }) }) : /* @__PURE__ */ i(Ln, { flag: it.flag, code: it.code, bordered: !1, onClick: He, style: Zr }) : null, tn = X.voiceClone, Ke = Ee && (!!ye.track || st), ht = ot ? "var(--conf-low)" : Ke || h && x ? "var(--brand)" : "var(--ink-55)", Ct = st || !!Qe.preparing && Ee, yt = Qe.preparing ? `Speaking this line in ${(je == null ? void 0 : je.name) ?? "this voice"}…` : st ? `Preparing this recording in ${(je == null ? void 0 : je.name) ?? "this voice"} — it will play as soon as it is ready` : ot ? `This voice could not be prepared: ${ot}` : J ? Ne ? "Choose a voice" : je ? je.name : ze.vcNoVoice + Z.label : `${ze.vcNoVoice}${Z.label}`, Tt = /* @__PURE__ */ i($a, { open: P, onClose: mt, keepOpen: (!!h || w) && !oe, value: Le ? null : me, onSelect: Mt, languages: be, title: (h == null ? void 0 : h.title) ?? "SPOKEN LANGUAGE", note: (h == null ? void 0 : h.note) ?? Fl, searchPlaceholder: ze.search, none: "Original", pinned: (Le ? l : me) ? [Le ? l : me] : [], recent: ie, requireVoice: oe, sticky: w, busy: k }), Yt = Ie(() => H.filter((Q) => Q.cloned && !Q.auto), [H]), bt = (Q) => Q.voiceId ? Yt.find((Se) => Se.id === `clone:${Q.voiceId}`) ?? null : null, ct = Ie(() => pe.filter((Q) => Q.key >= 0), [pe]), Ht = Ie(() => {
3888
- const Q = H.filter((We) => !We.cloned);
3889
- if (!re) return [...Q, ...r && ct.length === 1 ? Yt.filter((We) => We.id === `clone:${ct[0].voiceId}`) : []];
3890
- const Se = [];
3891
- for (const We of ct) {
3892
- if (bt(We)) continue;
3893
- const ft = H.find((Zt) => Zt.cloned && Zt.auto && Zt.speaker === We.key);
3894
- !ft || ft.ready === !1 || ft.consent === "pending" && !E || Se.push({ id: ft.id, name: We.name, cloned: !0, default: !1, live: !0, auto: !0, gender: We.sex ?? ft.gender ?? null, speaker: We.key, consent: ft.consent ?? null });
3887
+ }, it = Le ? { ...ys(o, null), flag: /* @__PURE__ */ i(oe, { d: J.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : q, Cn = c ? h ? /* @__PURE__ */ i("span", { className: "barchip", style: Ot ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(vn, { flag: it.flag, code: it.code, bordered: !1, onClick: en, style: Zr }) }) : /* @__PURE__ */ i(vn, { flag: it.flag, code: it.code, bordered: !1, onClick: Ve, style: Zr }) : null, tn = J.voiceClone, Ke = Se && (!!Te.track || st), ht = ot ? "var(--conf-low)" : Ke || h && x ? "var(--brand)" : "var(--ink-55)", Ct = st || !!$e.preparing && Se, yt = $e.preparing ? `Speaking this line in ${(ze == null ? void 0 : ze.name) ?? "this voice"}…` : st ? `Preparing this recording in ${(ze == null ? void 0 : ze.name) ?? "this voice"} — it will play as soon as it is ready` : ot ? `This voice could not be prepared: ${ot}` : ee ? me ? "Choose a voice" : ze ? ze.name : ve.vcNoVoice + q.label : `${ve.vcNoVoice}${q.label}`, Tt = /* @__PURE__ */ i($a, { open: P, onClose: mt, keepOpen: (!!h || w) && !ae, value: Le ? null : ye, onSelect: Mt, languages: Ce, title: (h == null ? void 0 : h.title) ?? "SPOKEN LANGUAGE", note: (h == null ? void 0 : h.note) ?? Fl, searchPlaceholder: ve.search, none: "Original", pinned: (Le ? l : ye) ? [Le ? l : ye] : [], recent: re, requireVoice: ae, sticky: w, busy: k }), Yt = Ie(() => H.filter((Q) => Q.cloned && !Q.auto), [H]), bt = (Q) => Q.voiceId ? Yt.find((De) => De.id === `clone:${Q.voiceId}`) ?? null : null, ct = Ie(() => K.filter((Q) => Q.key >= 0), [K]), Ht = Ie(() => {
3888
+ const Q = H.filter((Fe) => !Fe.cloned);
3889
+ if (!ie) return [...Q, ...r && ct.length === 1 ? Yt.filter((Fe) => Fe.id === `clone:${ct[0].voiceId}`) : []];
3890
+ const De = [];
3891
+ for (const Fe of ct) {
3892
+ if (bt(Fe)) continue;
3893
+ const ft = H.find((Zt) => Zt.cloned && Zt.auto && Zt.speaker === Fe.key);
3894
+ !ft || ft.ready === !1 || ft.consent === "pending" && !E || De.push({ id: ft.id, name: Fe.name, cloned: !0, default: !1, live: !0, auto: !0, gender: Fe.sex ?? ft.gender ?? null, speaker: Fe.key, consent: ft.consent ?? null });
3895
3895
  }
3896
- return [...Q, ...Yt, ...Se];
3897
- }, [H, Yt, re, ct, E, r]), rt = re ? ct.find((Q) => Q.key === ae) ?? null : null, jt = (Q) => {
3898
- var Se;
3899
- return Q ? ((Se = H.find((We) => We.id === Q)) == null ? void 0 : Se.gender) ?? null : null;
3900
- }, qe = rt ? rt.sex ?? jt(Te.get(rt.key)) : null, _t = Ie(() => rt ? Ht.filter((Q) => Q.cloned ? Q.live ? Q.speaker === rt.key : Q.id === `clone:${rt.voiceId}` : !0) : Ht, [Ht, rt, qe, ct]), Vt = (Q) => H.find((Se) => Se.cloned && Se.auto && Se.speaker === Q) ?? null, gt = { people: ct, gvList: H, autoOf: Vt, savedFor: bt }, Je = ($ == null ? void 0 : $(gt)) ?? 0, Wt = S ? ct.map((Q) => S(Q, gt)).filter((Q) => !!Q) : [], xt = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": h ? x : void 0, title: Ct || ot ? yt : void 0, style: { cursor: "pointer", background: Ke || Ct || h && x ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: h && x ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: h ? vt : Bt, children: [
3901
- Ct ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(le, { d: tn, size: 17, sw: 1.6, style: { color: ht } }),
3896
+ return [...Q, ...Yt, ...De];
3897
+ }, [H, Yt, ie, ct, E, r]), rt = ie ? ct.find((Q) => Q.key === de) ?? null : null, jt = (Q) => {
3898
+ var De;
3899
+ return Q ? ((De = H.find((Fe) => Fe.id === Q)) == null ? void 0 : De.gender) ?? null : null;
3900
+ }, qe = rt ? rt.sex ?? jt(ce.get(rt.key)) : null, _t = Ie(() => rt ? Ht.filter((Q) => Q.cloned ? Q.live ? Q.speaker === rt.key : Q.id === `clone:${rt.voiceId}` : !0) : Ht, [Ht, rt, qe, ct]), Vt = (Q) => H.find((De) => De.cloned && De.auto && De.speaker === Q) ?? null, gt = { people: ct, gvList: H, autoOf: Vt, savedFor: bt }, Je = ($ == null ? void 0 : $(gt)) ?? 0, Wt = S ? ct.map((Q) => S(Q, gt)).filter((Q) => !!Q) : [], xt = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": h ? x : void 0, title: Ct || ot ? yt : void 0, style: { cursor: "pointer", background: Ke || Ct || h && x ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: h && x ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: h ? vt : Bt, children: [
3901
+ Ct ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: tn, size: 17, sw: 1.6, style: { color: ht } }),
3902
3902
  Wt.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: Wt.join(" · "), children: "!" }) : !!Je && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${Je} speaker${Je === 1 ? "" : "s"} can get a cloned voice`, children: Je })
3903
- ] }), nn = /* @__PURE__ */ i($t, { open: ce, onClose: se, title: ze.vcSheet, titleNode: L, doneLabel: ze.done, children: /* @__PURE__ */ i(
3903
+ ] }), nn = /* @__PURE__ */ i($t, { open: le, onClose: se, title: ve.vcSheet, titleNode: L, doneLabel: ve.done, children: /* @__PURE__ */ i(
3904
3904
  ll,
3905
3905
  {
3906
- t: ze,
3907
- cast: re && /* @__PURE__ */ i(
3906
+ t: ve,
3907
+ cast: ie && /* @__PURE__ */ i(
3908
3908
  ol,
3909
3909
  {
3910
- t: ze,
3911
- roster: pe,
3912
- selected: ae,
3910
+ t: ve,
3911
+ roster: K,
3912
+ selected: de,
3913
3913
  onSelect: (Q) => {
3914
- G.reset(), Oe(Q), b == null || b(Q);
3914
+ G.reset(), Ae(Q), b == null || b(Q);
3915
3915
  },
3916
3916
  noClone: (Q) => !!(A != null && A(Q, gt)),
3917
- short: (Q) => !!(ee != null && ee(Q, gt)),
3917
+ short: (Q) => !!(te != null && te(Q, gt)),
3918
3918
  warn: (Q) => (S == null ? void 0 : S(Q, gt)) ?? null,
3919
- building: (Q) => !bt(Q) && (H.some((Se) => Se.cloned && Se.speaker === Q.key && Se.ready === !1) || !!(j != null && j(Q, gt))),
3920
- sexOf: (Q) => Q.sex ?? jt(Te.get(Q.key))
3919
+ building: (Q) => !bt(Q) && (H.some((De) => De.cloned && De.speaker === Q.key && De.ready === !1) || !!(j != null && j(Q, gt))),
3920
+ sexOf: (Q) => Q.sex ?? jt(ce.get(Q.key))
3921
3921
  }
3922
3922
  ),
3923
3923
  voices: _t,
@@ -3925,13 +3925,13 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: s, ended: r, cred: a, lan
3925
3925
  G.reset(), O == null || O(Q);
3926
3926
  },
3927
3927
  noClone: rt && !_t.some((Q) => Q.cloned) ? (W == null ? void 0 : W(rt, Vt(rt.key), gt)) ?? null : null,
3928
- usedBy: re && ae != null ? (Q) => {
3929
- const Se = pe.filter((We) => We.key !== ae && Te.get(We.key) === Q.id);
3930
- return Se.length ? Se.map((We) => We.name).join(", ") : null;
3928
+ usedBy: ie && de != null ? (Q) => {
3929
+ const De = K.filter((Fe) => Fe.key !== de && ce.get(Fe.key) === Q.id);
3930
+ return De.length ? De.map((Fe) => Fe.name).join(", ") : null;
3931
3931
  } : void 0,
3932
- foldKey: ae,
3932
+ foldKey: de,
3933
3933
  foldFor: qe,
3934
- currentId: re && ae != null ? Te.get(ae) ?? null : De,
3934
+ currentId: ie && de != null ? ce.get(de) ?? null : xe,
3935
3935
  armedId: G.armId,
3936
3936
  sampleId: G.sampleId,
3937
3937
  dlId: G.dlId,
@@ -3948,34 +3948,34 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: s, ended: r, cred: a, lan
3948
3948
  },
3949
3949
  onUse: Et
3950
3950
  }
3951
- ) }), On = h ? null : /* @__PURE__ */ g(Ue, { children: [
3951
+ ) }), bn = h ? null : /* @__PURE__ */ g(_e, { children: [
3952
3952
  Tt,
3953
3953
  nn
3954
- ] }), zt = h && (P || ce) ? /* @__PURE__ */ i("div", { className: "vs-side", children: P ? Tt : nn }) : null, Cn = Ve && ot ? `This voice could not be prepared: ${ot}` : null, bn = dt;
3954
+ ] }), zt = h && (P || le) ? /* @__PURE__ */ i("div", { className: "vs-side", children: P ? Tt : nn }) : null, xn = We && ot ? `This voice could not be prepared: ${ot}` : null, Dn = dt;
3955
3955
  return {
3956
- barChip: { flag: it.flag, code: it.code, label: it.label, onClick: h || w ? en : He, active: !!((h || w) && Ot), can: c },
3957
- sheetsOpen: P || ce,
3958
- on: Ve,
3956
+ barChip: { flag: it.flag, code: it.code, label: it.label, onClick: h || w ? en : Ve, active: !!((h || w) && Ot), can: c },
3957
+ sheetsOpen: P || le,
3958
+ on: We,
3959
3959
  player: lt,
3960
- chip: In,
3960
+ chip: Cn,
3961
3961
  voiceBtn: xt,
3962
- sheets: On,
3962
+ sheets: bn,
3963
3963
  sidePanel: zt,
3964
3964
  voicesMine: x,
3965
3965
  toggleVoices: vt,
3966
3966
  cloningOn: B,
3967
- playTitle: Cn,
3967
+ playTitle: xn,
3968
3968
  noVoice: dt,
3969
- noVoiceNote: bn,
3970
- relang: Re,
3969
+ noVoiceNote: Dn,
3970
+ relang: Pe,
3971
3971
  sampling: G.sampleId != null,
3972
3972
  error: G.error,
3973
3973
  clearError: () => G.clearError(),
3974
3974
  openVoices: Bt,
3975
- openPicker: He,
3975
+ openPicker: Ve,
3976
3976
  original: Le,
3977
3977
  reloadVoices: () => y((Q) => Q + 1),
3978
- voicesVer: te,
3978
+ voicesVer: X,
3979
3979
  people: ct,
3980
3980
  gvList: H,
3981
3981
  autoOf: Vt,
@@ -3986,149 +3986,149 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: s, ended: r, cred: a, lan
3986
3986
  armVoice: G.arm,
3987
3987
  resetPreview: G.reset,
3988
3988
  armedId: G.armId,
3989
- resetCast: () => K((Q) => ({ ...Q, [Ce ?? ""]: {} })),
3989
+ resetCast: () => Re((Q) => ({ ...Q, [Oe ?? ""]: {} })),
3990
3990
  readLang: typeof d == "string" && d !== l ? d : null,
3991
- readVoiceKey: f || (Y ?? C ?? ((Gt = ye.track) == null ? void 0 : Gt.voiceKey) ?? ""),
3991
+ readVoiceKey: f || (Y ?? C ?? ((Gt = Te.track) == null ? void 0 : Gt.voiceKey) ?? ""),
3992
3992
  pickedVoiceKey: Y ?? C ?? null,
3993
- readVoiceName: (je == null ? void 0 : je.name) ?? null,
3994
- canSpeak: J,
3995
- requestTrack: () => ye.requestRender(Y ?? C, Y ? U : null),
3993
+ readVoiceName: (ze == null ? void 0 : ze.name) ?? null,
3994
+ canSpeak: ee,
3995
+ requestTrack: () => Te.requestRender(Y ?? C, Y ? U : null),
3996
3996
  hasClone: F,
3997
- clips: ye.clips,
3998
- setNear: ye.setNear,
3997
+ clips: Te.clips,
3998
+ setNear: Te.setNear,
3999
3999
  closePicker: () => {
4000
4000
  Ot && mt();
4001
4001
  },
4002
- langList: { value: Le ? null : me, onSelect: Mt, languages: be, searchPlaceholder: ze.search, none: "Original", pinned: (Le ? l : me) ? [Le ? l : me] : [], recent: ie }
4002
+ langList: { value: Le ? null : ye, onSelect: Mt, languages: Ce, searchPlaceholder: ve.search, none: "Original", pinned: (Le ? l : ye) ? [Le ? l : ye] : [], recent: re }
4003
4003
  };
4004
4004
  }
4005
- function ql({ model: t, rows: e, player: n, fixed: s, applied: r, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: d, marks: u = !0, fixBadges: h = !0, tail: M, tailFg: p, running: N, desk: w, feedRef: k, listener: m, showLabels: f, find: O, findOpen: D, lang: b, warm: W, onVisible: A, wordHl: ee = !0 }) {
4006
- const { playing: j, engaged: S, t: $, idx: L, seekN: z, wordSync: E, clipPos: ie } = n;
4005
+ function ql({ model: t, rows: e, player: n, fixed: s, applied: r, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: d, marks: u = !0, fixBadges: h = !0, tail: M, tailFg: p, running: N, desk: w, feedRef: k, listener: m, showLabels: f, find: O, findOpen: D, lang: b, warm: W, onVisible: A, wordHl: te = !0 }) {
4006
+ const { playing: j, engaged: S, t: $, idx: L, seekN: z, wordSync: E, clipPos: re } = n;
4007
4007
  Ll(!0, k);
4008
4008
  const V = v(null);
4009
4009
  qo(k, V);
4010
- const [C, ue] = I(null), P = (O ?? "").trim().toLowerCase(), [q, ce] = I(0), ne = v(0), oe = v(null), we = v(L), ke = (B) => {
4011
- var te;
4012
- return ((te = k.current) == null ? void 0 : te.querySelector(`[data-tx-row="${B}"]`)) ?? null;
4013
- }, Pe = v("");
4010
+ const [C, ue] = I(null), P = (O ?? "").trim().toLowerCase(), [Z, le] = I(0), ne = v(0), ae = v(null), we = v(L), ke = (B) => {
4011
+ var X;
4012
+ return ((X = k.current) == null ? void 0 : X.querySelector(`[data-tx-row="${B}"]`)) ?? null;
4013
+ }, Qe = v("");
4014
4014
  _(() => {
4015
4015
  const B = k.current;
4016
4016
  if (!B || !A) return;
4017
- const te = () => {
4018
- const H = B.getBoundingClientRect(), Ne = [];
4019
- for (const ze of Array.from(B.querySelectorAll("[data-sentence]"))) {
4020
- const be = ze.getBoundingClientRect();
4021
- be.bottom > H.top && be.top < H.bottom && Ne.push(Number(ze.dataset.sentence));
4017
+ const X = () => {
4018
+ const H = B.getBoundingClientRect(), me = [];
4019
+ for (const ve of Array.from(B.querySelectorAll("[data-sentence]"))) {
4020
+ const Ce = ve.getBoundingClientRect();
4021
+ Ce.bottom > H.top && Ce.top < H.bottom && me.push(Number(ve.dataset.sentence));
4022
4022
  }
4023
- const Z = Ne.join(",");
4024
- Z !== Pe.current && (Pe.current = Z, A(Ne));
4025
- }, y = window.setTimeout(te, 120);
4023
+ const q = me.join(",");
4024
+ q !== Qe.current && (Qe.current = q, A(me));
4025
+ }, y = window.setTimeout(X, 120);
4026
4026
  let R;
4027
- const Me = () => {
4028
- window.clearTimeout(R), R = window.setTimeout(te, 120);
4027
+ const fe = () => {
4028
+ window.clearTimeout(R), R = window.setTimeout(X, 120);
4029
4029
  };
4030
- return B.addEventListener("scroll", Me, { passive: !0 }), () => {
4031
- window.clearTimeout(y), window.clearTimeout(R), B.removeEventListener("scroll", Me);
4030
+ return B.addEventListener("scroll", fe, { passive: !0 }), () => {
4031
+ window.clearTimeout(y), window.clearTimeout(R), B.removeEventListener("scroll", fe);
4032
4032
  };
4033
4033
  }, [e, A, k]);
4034
- const me = (B) => {
4035
- const te = k.current, y = ke(B);
4036
- if (!te || !y) return;
4037
- const R = y.getBoundingClientRect().top - te.getBoundingClientRect().top + te.scrollTop, Me = te.scrollHeight - te.clientHeight, H = ss(te), Ne = Math.max(80, te.clientHeight - H.top - H.bottom), Z = y.offsetHeight > Ne ? 8 : (Ne - y.offsetHeight) / 2;
4038
- te.scrollTop = Math.max(0, Math.min(Me, R - H.top - Z));
4034
+ const ye = (B) => {
4035
+ const X = k.current, y = ke(B);
4036
+ if (!X || !y) return;
4037
+ const R = y.getBoundingClientRect().top - X.getBoundingClientRect().top + X.scrollTop, fe = X.scrollHeight - X.clientHeight, H = is(X), me = Math.max(80, X.clientHeight - H.top - H.bottom), q = y.offsetHeight > me ? 8 : (me - y.offsetHeight) / 2;
4038
+ X.scrollTop = Math.max(0, Math.min(fe, R - H.top - q));
4039
4039
  }, Le = (B) => {
4040
- const te = k.current, y = ke(B);
4041
- if (!te || !te.clientHeight || !te.offsetParent || !y) return 0;
4042
- const R = y.getBoundingClientRect(), Me = te.getBoundingClientRect(), H = ss(te), Ne = Me.top + H.top, Z = Me.bottom - H.bottom;
4043
- return R.height > Z - Ne ? R.top < Ne - 4 ? -1 : R.top > Z - 60 ? 1 : 0 : R.bottom < Ne + 10 ? -1 : R.bottom > Z - 4 ? 1 : 0;
4044
- }, Ee = (B) => {
4040
+ const X = k.current, y = ke(B);
4041
+ if (!X || !X.clientHeight || !X.offsetParent || !y) return 0;
4042
+ const R = y.getBoundingClientRect(), fe = X.getBoundingClientRect(), H = is(X), me = fe.top + H.top, q = fe.bottom - H.bottom;
4043
+ return R.height > q - me ? R.top < me - 4 ? -1 : R.top > q - 60 ? 1 : 0 : R.bottom < me + 10 ? -1 : R.bottom > q - 4 ? 1 : 0;
4044
+ }, Se = (B) => {
4045
4045
  ne.current = performance.now() + 420;
4046
- const te = k.current, y = ke(B);
4047
- if (!te || !te.clientHeight || !y) return;
4048
- const R = y.getBoundingClientRect(), Me = te.getBoundingClientRect(), H = te.scrollHeight - te.clientHeight, Ne = te.scrollTop, Z = ss(te), ze = Math.max(80, te.clientHeight - Z.top - Z.bottom), be = R.height > ze ? 8 : (ze - R.height) / 2, Be = Math.max(0, Math.min(H, Ne + (R.top - Me.top) - Z.top - be));
4049
- if (oe.current && cancelAnimationFrame(oe.current), Math.abs(Be - Ne) < 2) {
4050
- te.scrollTop = Be, oe.current = null;
4046
+ const X = k.current, y = ke(B);
4047
+ if (!X || !X.clientHeight || !y) return;
4048
+ const R = y.getBoundingClientRect(), fe = X.getBoundingClientRect(), H = X.scrollHeight - X.clientHeight, me = X.scrollTop, q = is(X), ve = Math.max(80, X.clientHeight - q.top - q.bottom), Ce = R.height > ve ? 8 : (ve - R.height) / 2, He = Math.max(0, Math.min(H, me + (R.top - fe.top) - q.top - Ce));
4049
+ if (ae.current && cancelAnimationFrame(ae.current), Math.abs(He - me) < 2) {
4050
+ X.scrollTop = He, ae.current = null;
4051
4051
  return;
4052
4052
  }
4053
- const Oe = performance.now(), Fe = 360, ge = () => {
4054
- const K = Math.min(1, (performance.now() - Oe) / Fe);
4055
- te.scrollTop = Ne + (Be - Ne) * (1 - Math.pow(1 - K, 3)), oe.current = K < 1 ? requestAnimationFrame(ge) : null;
4053
+ const Ae = performance.now(), Ue = 360, ge = () => {
4054
+ const Re = Math.min(1, (performance.now() - Ae) / Ue);
4055
+ X.scrollTop = me + (He - me) * (1 - Math.pow(1 - Re, 3)), ae.current = Re < 1 ? requestAnimationFrame(ge) : null;
4056
4056
  };
4057
- oe.current = requestAnimationFrame(ge);
4057
+ ae.current = requestAnimationFrame(ge);
4058
4058
  };
4059
4059
  _(() => () => {
4060
- oe.current && cancelAnimationFrame(oe.current);
4060
+ ae.current && cancelAnimationFrame(ae.current);
4061
4061
  }, []);
4062
- const $e = v(0);
4062
+ const Be = v(0);
4063
4063
  _(() => {
4064
4064
  if (!j) {
4065
- we.current = L, $e.current = 0, ce(0);
4065
+ we.current = L, Be.current = 0, le(0);
4066
4066
  return;
4067
4067
  }
4068
4068
  const B = () => {
4069
4069
  const y = L !== we.current;
4070
4070
  we.current = L;
4071
4071
  let R = performance.now() < ne.current ? 0 : Le(L);
4072
- y && R && !$e.current && (me(L), R = 0), $e.current = R, ce(R);
4072
+ y && R && !Be.current && (ye(L), R = 0), Be.current = R, le(R);
4073
4073
  };
4074
4074
  B();
4075
- const te = setInterval(B, 200);
4076
- return () => clearInterval(te);
4075
+ const X = setInterval(B, 200);
4076
+ return () => clearInterval(X);
4077
4077
  }, [L, j]), _(() => {
4078
- z && Ee(L);
4078
+ z && Se(L);
4079
4079
  }, [z]);
4080
- const Ce = () => {
4081
- Ee(L), $e.current = 0, ce(0);
4082
- }, G = (B) => /* @__PURE__ */ i("div", { className: `txfollow txfollow--${B}`, children: /* @__PURE__ */ g("button", { type: "button", className: "txfollow__pill", title: "Jump to the line playing now", onClick: Ce, children: [
4083
- /* @__PURE__ */ i(le, { d: B === "up" ? "m4.5 15.75 7.5-7.5 7.5 7.5" : "m19.5 8.25-7.5 7.5-7.5-7.5", size: 15, sw: 2 }),
4080
+ const Oe = () => {
4081
+ Se(L), Be.current = 0, le(0);
4082
+ }, G = (B) => /* @__PURE__ */ i("div", { className: `txfollow txfollow--${B}`, children: /* @__PURE__ */ g("button", { type: "button", className: "txfollow__pill", title: "Jump to the line playing now", onClick: Oe, children: [
4083
+ /* @__PURE__ */ i(oe, { d: B === "up" ? "m4.5 15.75 7.5-7.5 7.5 7.5" : "m19.5 8.25-7.5 7.5-7.5-7.5", size: 15, sw: 2 }),
4084
4084
  "Now playing"
4085
4085
  ] }) });
4086
4086
  return /* @__PURE__ */ g("div", { ref: k, "data-tx-feed": "1", className: `txfeed${w ? " txfeed--desk" : ""}${D && !N ? " is-find" : ""}`, children: [
4087
4087
  /* @__PURE__ */ i(Ko, { thumbRef: V }),
4088
- j && q === -1 && G("up"),
4089
- e.map((B, te) => {
4090
- var re;
4091
- const y = j && te === L, R = S && te === L, Me = !!d && d === B.id, H = P && !B.text.toLowerCase().includes(P) && !(b && ((re = B.translations[b]) != null && re.toLowerCase().includes(P))) ? 0.22 : !S || te <= L || Me ? 1 : 0.38, Ne = m ? () => n.playRow(te) : c && l ? () => {
4092
- j && !y && n.seekRow(te), l(B);
4093
- } : j && y ? void 0 : () => n.playRow(te), Z = m ? null : el(B, r, s), ze = !!Z && (Z.script > 0 || Z.manual), be = w && !!a && C === B.id && !!Z && !ze, Be = Os(t, B.speaker), Oe = Cs(t, B.speaker), Fe = Oe.lane, ge = b && B.translations[b] && B.language !== b ? B.translations[b] : null, K = bi(e, te, b), pe = R && !E && ie ? Mi(K.map((ae) => ({ t: ae.text, sp: " " })), ie) : null;
4094
- return /* @__PURE__ */ g("div", { "data-tx-row": te, "data-sentence": B.sentenceId, className: `txline${W ? " txline--warm" : ""}${Me ? " txline--fixing" : ""}`, "aria-current": Me || void 0, style: { opacity: H }, onClick: Ne, onMouseEnter: w && a ? () => ue(B.id) : void 0, onMouseLeave: w && a ? () => ue(null) : void 0, children: [
4088
+ j && Z === -1 && G("up"),
4089
+ e.map((B, X) => {
4090
+ var ie;
4091
+ const y = j && X === L, R = S && X === L, fe = !!d && d === B.id, H = P && !B.text.toLowerCase().includes(P) && !(b && ((ie = B.translations[b]) != null && ie.toLowerCase().includes(P))) ? 0.22 : !S || X <= L || fe ? 1 : 0.38, me = m ? () => n.playRow(X) : c && l ? () => {
4092
+ j && !y && n.seekRow(X), l(B);
4093
+ } : j && y ? void 0 : () => n.playRow(X), q = m ? null : el(B, r, s), ve = !!q && (q.script > 0 || q.manual), Ce = w && !!a && C === B.id && !!q && !ve, He = Os(t, B.speaker), Ae = Cs(t, B.speaker), Ue = Ae.lane, ge = b && B.translations[b] && B.language !== b ? B.translations[b] : null, Re = bi(e, X, b), K = R && !E && re ? Mi(Re.map((de) => ({ t: de.text, sp: " " })), re) : null;
4094
+ return /* @__PURE__ */ g("div", { "data-tx-row": X, "data-sentence": B.sentenceId, className: `txline${W ? " txline--warm" : ""}${fe ? " txline--fixing" : ""}`, "aria-current": fe || void 0, style: { opacity: H }, onClick: me, onMouseEnter: w && a ? () => ue(B.id) : void 0, onMouseLeave: w && a ? () => ue(null) : void 0, children: [
4095
4095
  /* @__PURE__ */ g("div", { className: "txline__meta", children: [
4096
4096
  /* @__PURE__ */ i("span", { className: "txline__at", children: Lt(B.start) }),
4097
- f && B.speaker >= 0 && /* @__PURE__ */ g(Ue, { children: [
4098
- /* @__PURE__ */ i("div", { className: `lanechip bg-lane-${Fe}`, style: Oe.soft ? { background: Oe.soft, color: Oe.fg } : void 0, children: mi(t, B.speaker) }),
4099
- /* @__PURE__ */ i("span", { className: `txline__who lane-${Fe}`, style: Oe.fg ? { color: Oe.fg } : void 0, children: Be }),
4100
- Oe.hasVoice && /* @__PURE__ */ i(Ii, { color: Oe.fg ?? `var(--lane-${Fe})` })
4097
+ f && B.speaker >= 0 && /* @__PURE__ */ g(_e, { children: [
4098
+ /* @__PURE__ */ i("div", { className: `lanechip bg-lane-${Ue}`, style: Ae.soft ? { background: Ae.soft, color: Ae.fg } : void 0, children: mi(t, B.speaker) }),
4099
+ /* @__PURE__ */ i("span", { className: `txline__who lane-${Ue}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: He }),
4100
+ Ae.hasVoice && /* @__PURE__ */ i(Ii, { color: Ae.fg ?? `var(--lane-${Ue})` })
4101
4101
  ] }),
4102
- y && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(le, { d: X.headphones, size: w ? 15 : 14, sw: 1.6, stroke: f && B.speaker >= 0 ? Oe.fg ?? `var(--lane-${Fe})` : "var(--ink-45)" }) }),
4103
- Z && h && /* @__PURE__ */ i(tl, { f: Z, desk: w, onOpen: a ? () => a(B, !0) : void 0 }),
4104
- be && /* @__PURE__ */ i(nl, { alone: !0, onOpen: () => a == null ? void 0 : a(B, !1) })
4102
+ y && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: J.headphones, size: w ? 15 : 14, sw: 1.6, stroke: f && B.speaker >= 0 ? Ae.fg ?? `var(--lane-${Ue})` : "var(--ink-45)" }) }),
4103
+ q && h && /* @__PURE__ */ i(tl, { f: q, desk: w, onOpen: a ? () => a(B, !0) : void 0 }),
4104
+ Ce && /* @__PURE__ */ i(nl, { alone: !0, onOpen: () => a == null ? void 0 : a(B, !1) })
4105
4105
  ] }),
4106
- /* @__PURE__ */ i("div", { className: "txline__text", children: K.map((ae, Te) => {
4107
- const ve = `${ae.seq}:${ae.idx}`, Ae = wo(ae.prob), Y = R && ee, U = Y && (E ? $ >= ae.start && ($ < ae.end || Te === K.length - 1 || $ < K[Te + 1].start) : Te === pe), F = Y && !U && (E ? ae.start > $ : pe != null && Te > pe), J = !ge && !m && (!!(s != null && s.has(ve)) || !!ae.script), he = !ge && !m && u && !!Ae && !J, xe = he ? Ae === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, ye = J ? "var(--brand)" : F ? "var(--ink-40)" : xe ?? "var(--ink-96)";
4106
+ /* @__PURE__ */ i("div", { className: "txline__text", children: Re.map((de, ce) => {
4107
+ const Ne = `${de.seq}:${de.idx}`, je = wo(de.prob), Y = R && te, U = Y && (E ? $ >= de.start && ($ < de.end || ce === Re.length - 1 || $ < Re[ce + 1].start) : ce === K), F = Y && !U && (E ? de.start > $ : K != null && ce > K), ee = !ge && !m && (!!(s != null && s.has(Ne)) || !!de.script), Me = !ge && !m && u && !!je && !ee, be = Me ? je === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, Te = ee ? "var(--brand)" : F ? "var(--ink-40)" : be ?? "var(--ink-96)";
4108
4108
  return /* @__PURE__ */ g("span", { children: [
4109
4109
  /* @__PURE__ */ i(
4110
4110
  "span",
4111
4111
  {
4112
4112
  className: "txw",
4113
4113
  title: o && !ge ? c ? "Correct this word" : y && j && n.seekWord ? "Play from this word" : "Play from this line" : y ? "" : "Play from this line",
4114
- onClick: o && !ge ? (je) => {
4115
- var De;
4116
- if (je.stopPropagation(), c) {
4117
- o(B, ae);
4114
+ onClick: o && !ge ? (ze) => {
4115
+ var xe;
4116
+ if (ze.stopPropagation(), c) {
4117
+ o(B, de);
4118
4118
  return;
4119
4119
  }
4120
4120
  if (j && y) {
4121
- (De = n.seekWord) == null || De.call(n, ae);
4121
+ (xe = n.seekWord) == null || xe.call(n, de);
4122
4122
  return;
4123
4123
  }
4124
- n.playRow(te);
4124
+ n.playRow(X);
4125
4125
  } : void 0,
4126
- style: { color: ye, opacity: F ? 0.45 : 1, fontWeight: 300, cursor: o && !ge ? c || !y || !j || n.seekWord ? "pointer" : "default" : y ? "default" : "pointer", textShadow: U ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: he || J ? "underline" : "none", textDecorationStyle: J ? "solid" : "dotted", textDecorationColor: J ? "var(--brand)" : xe ?? "currentColor", textDecorationThickness: he || J ? "1.5px" : void 0, textUnderlineOffset: he || J ? "3px" : void 0 },
4127
- children: ae.text
4126
+ style: { color: Te, opacity: F ? 0.45 : 1, fontWeight: 300, cursor: o && !ge ? c || !y || !j || n.seekWord ? "pointer" : "default" : y ? "default" : "pointer", textShadow: U ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: Me || ee ? "underline" : "none", textDecorationStyle: ee ? "solid" : "dotted", textDecorationColor: ee ? "var(--brand)" : be ?? "currentColor", textDecorationThickness: Me || ee ? "1.5px" : void 0, textUnderlineOffset: Me || ee ? "3px" : void 0 },
4127
+ children: de.text
4128
4128
  }
4129
4129
  ),
4130
4130
  /* @__PURE__ */ i("span", { style: { whiteSpace: "pre-wrap" }, children: " " })
4131
- ] }, ve + Te);
4131
+ ] }, Ne + ce);
4132
4132
  }) })
4133
4133
  ] }, B.id);
4134
4134
  }),
@@ -4137,12 +4137,12 @@ function ql({ model: t, rows: e, player: n, fixed: s, applied: r, onFixOpen: a,
4137
4137
  /* @__PURE__ */ i("span", {}),
4138
4138
  /* @__PURE__ */ i("span", {})
4139
4139
  ] }) }) : /* @__PURE__ */ i("div", { className: "txtail", style: { color: p }, children: M }),
4140
- j && q === 1 && G("down")
4140
+ j && Z === 1 && G("down")
4141
4141
  ] });
4142
4142
  }
4143
4143
  function Kl({ open: t, q: e, onQ: n, onClose: s, hits: r, desk: a, inline: o, flash: l }) {
4144
4144
  return /* @__PURE__ */ i("div", { className: o ? "searchbar searchbar--inline" : `searchbar searchbar--float${a ? " searchbar--desk" : ""}${t ? "" : " is-hidden"}`, children: /* @__PURE__ */ g("div", { children: [
4145
- /* @__PURE__ */ i(le, { d: X.search, size: 16, sw: 1.7, style: { color: "var(--ink-45)", flex: "none" } }),
4145
+ /* @__PURE__ */ i(oe, { d: J.search, size: 16, sw: 1.7, style: { color: "var(--ink-45)", flex: "none" } }),
4146
4146
  /* @__PURE__ */ i("input", { value: e, onChange: (c) => n(c.target.value), onKeyDown: (c) => {
4147
4147
  c.key === "Escape" && (c.stopPropagation(), e ? n("") : s());
4148
4148
  }, placeholder: "Search this transcript" }),
@@ -4151,7 +4151,7 @@ function Kl({ open: t, q: e, onQ: n, onClose: s, hits: r, desk: a, inline: o, fl
4151
4151
  r,
4152
4152
  " found"
4153
4153
  ] }),
4154
- e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(le, { d: X.close, size: 15, sw: 1.7 }) })
4154
+ e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(oe, { d: J.close, size: 15, sw: 1.7 }) })
4155
4155
  ] }) });
4156
4156
  }
4157
4157
  function Jl(t, e, n, s, r) {
@@ -4193,7 +4193,7 @@ function xi(t) {
4193
4193
  return e;
4194
4194
  }
4195
4195
  const Kr = (t) => Math.floor(xi(t) / 8) - Xt.perBlock[t] * Xt.blocks[t];
4196
- function ys(t, e) {
4196
+ function ws(t, e) {
4197
4197
  let n = 0;
4198
4198
  for (let s = 7; s >= 0; s--)
4199
4199
  n = n << 1 ^ (n >>> 7) * 285, n ^= (e >>> s & 1) * t;
@@ -4204,8 +4204,8 @@ function Xl(t) {
4204
4204
  e[t - 1] = 1;
4205
4205
  let n = 1;
4206
4206
  for (let s = 0; s < t; s++) {
4207
- for (let r = 0; r < t; r++) e[r] = ys(e[r], n) ^ (r + 1 < t ? e[r + 1] : 0);
4208
- n = ys(n, 2);
4207
+ for (let r = 0; r < t; r++) e[r] = ws(e[r], n) ^ (r + 1 < t ? e[r + 1] : 0);
4208
+ n = ws(n, 2);
4209
4209
  }
4210
4210
  return e;
4211
4211
  }
@@ -4214,7 +4214,7 @@ function ec(t, e) {
4214
4214
  for (const s of t) {
4215
4215
  const r = s ^ n.shift();
4216
4216
  n.push(0), e.forEach((a, o) => {
4217
- n[o] ^= ys(a, r);
4217
+ n[o] ^= ws(a, r);
4218
4218
  });
4219
4219
  }
4220
4220
  return n;
@@ -4244,8 +4244,8 @@ function nc(t) {
4244
4244
  for (let L = 0, z = 0; L < c; L++) {
4245
4245
  const E = l.slice(z, z + M - d + (L < h ? 0 : 1));
4246
4246
  z += E.length;
4247
- const ie = ec(E, N);
4248
- L < h && E.push(0), p.push(E.concat(ie));
4247
+ const re = ec(E, N);
4248
+ L < h && E.push(0), p.push(E.concat(re));
4249
4249
  }
4250
4250
  const w = [];
4251
4251
  for (let L = 0; L < p[0].length; L++) p.forEach((z, E) => {
@@ -4257,8 +4257,8 @@ function nc(t) {
4257
4257
  for (let L = 0; L < s; L++)
4258
4258
  f(6, L, L % 2 === 0), f(L, 6, L % 2 === 0);
4259
4259
  const O = (L, z) => {
4260
- for (let E = -4; E <= 4; E++) for (let ie = -4; ie <= 4; ie++) {
4261
- const V = Math.max(Math.abs(ie), Math.abs(E)), C = L + ie, ue = z + E;
4260
+ for (let E = -4; E <= 4; E++) for (let re = -4; re <= 4; re++) {
4261
+ const V = Math.max(Math.abs(re), Math.abs(E)), C = L + re, ue = z + E;
4262
4262
  C >= 0 && C < s && ue >= 0 && ue < s && f(C, ue, V !== 2 && V !== 4);
4263
4263
  }
4264
4264
  };
@@ -4266,12 +4266,12 @@ function nc(t) {
4266
4266
  const D = tc(n);
4267
4267
  for (let L = 0; L < D.length; L++) for (let z = 0; z < D.length; z++)
4268
4268
  if (!(L === 0 && z === 0 || L === 0 && z === D.length - 1 || L === D.length - 1 && z === 0))
4269
- for (let E = -2; E <= 2; E++) for (let ie = -2; ie <= 2; ie++) f(D[L] + ie, D[z] + E, Math.max(Math.abs(ie), Math.abs(E)) !== 1);
4269
+ for (let E = -2; E <= 2; E++) for (let re = -2; re <= 2; re++) f(D[L] + re, D[z] + E, Math.max(Math.abs(re), Math.abs(E)) !== 1);
4270
4270
  const b = (L) => {
4271
4271
  const z = Xt.formatBits << 3 | L;
4272
4272
  let E = z;
4273
4273
  for (let C = 0; C < 10; C++) E = E << 1 ^ (E >>> 9) * 1335;
4274
- const ie = (z << 10 | E) ^ 21522, V = (C) => (ie >>> C & 1) !== 0;
4274
+ const re = (z << 10 | E) ^ 21522, V = (C) => (re >>> C & 1) !== 0;
4275
4275
  for (let C = 0; C <= 5; C++) f(8, C, V(C));
4276
4276
  f(8, 7, V(6)), f(8, 8, V(7)), f(7, 8, V(8));
4277
4277
  for (let C = 9; C < 15; C++) f(14 - C, 8, V(C));
@@ -4284,16 +4284,16 @@ function nc(t) {
4284
4284
  for (let E = 0; E < 12; E++) L = L << 1 ^ (L >>> 11) * 7973;
4285
4285
  const z = n << 12 | L;
4286
4286
  for (let E = 0; E < 18; E++) {
4287
- const ie = (z >>> E & 1) !== 0, V = s - 11 + E % 3, C = Math.floor(E / 3);
4288
- f(V, C, ie), f(C, V, ie);
4287
+ const re = (z >>> E & 1) !== 0, V = s - 11 + E % 3, C = Math.floor(E / 3);
4288
+ f(V, C, re), f(C, V, re);
4289
4289
  }
4290
4290
  }
4291
4291
  let W = 0;
4292
4292
  for (let L = s - 1; L >= 1; L -= 2) {
4293
4293
  L === 6 && (L = 5);
4294
4294
  for (let z = 0; z < s; z++) for (let E = 0; E < 2; E++) {
4295
- const ie = L - E, V = L + 1 & 2 ? z : s - 1 - z;
4296
- !m[V][ie] && W < w.length * 8 && (k[V][ie] = (w[W >>> 3] >>> 7 - (W & 7) & 1) !== 0, W++);
4295
+ const re = L - E, V = L + 1 & 2 ? z : s - 1 - z;
4296
+ !m[V][re] && W < w.length * 8 && (k[V][re] = (w[W >>> 3] >>> 7 - (W & 7) & 1) !== 0, W++);
4297
4297
  }
4298
4298
  }
4299
4299
  const A = (L, z, E) => {
@@ -4315,40 +4315,40 @@ function nc(t) {
4315
4315
  default:
4316
4316
  return ((z + E) % 2 + z * E % 3) % 2 === 0;
4317
4317
  }
4318
- }, ee = (L) => {
4318
+ }, te = (L) => {
4319
4319
  for (let z = 0; z < s; z++) for (let E = 0; E < s; E++) !m[z][E] && A(L, E, z) && (k[z][E] = !k[z][E]);
4320
4320
  }, j = () => {
4321
4321
  let L = 0;
4322
4322
  const z = (P) => {
4323
- const q = P[1], ce = q > 0 && P[2] === q && P[3] === q * 3 && P[4] === q && P[5] === q;
4324
- return (ce && P[0] >= q * 4 && P[6] >= q ? 1 : 0) + (ce && P[6] >= q * 4 && P[0] >= q ? 1 : 0);
4325
- }, E = (P, q) => {
4326
- P[0] === 0 && (q += s), P.pop(), P.unshift(q);
4327
- }, ie = (P, q, ce) => (q && (E(P, ce), ce = 0), E(P, ce + s), z(P)), V = (P) => {
4328
- let q = !1, ce = 0;
4323
+ const Z = P[1], le = Z > 0 && P[2] === Z && P[3] === Z * 3 && P[4] === Z && P[5] === Z;
4324
+ return (le && P[0] >= Z * 4 && P[6] >= Z ? 1 : 0) + (le && P[6] >= Z * 4 && P[0] >= Z ? 1 : 0);
4325
+ }, E = (P, Z) => {
4326
+ P[0] === 0 && (Z += s), P.pop(), P.unshift(Z);
4327
+ }, re = (P, Z, le) => (Z && (E(P, le), le = 0), E(P, le + s), z(P)), V = (P) => {
4328
+ let Z = !1, le = 0;
4329
4329
  const ne = [0, 0, 0, 0, 0, 0, 0];
4330
- for (let oe = 0; oe < s; oe++)
4331
- P(oe) === q ? (ce++, ce === 5 ? L += 3 : ce > 5 && L++) : (E(ne, ce), q || (L += z(ne) * 40), q = P(oe), ce = 1);
4332
- L += ie(ne, q, ce) * 40;
4330
+ for (let ae = 0; ae < s; ae++)
4331
+ P(ae) === Z ? (le++, le === 5 ? L += 3 : le > 5 && L++) : (E(ne, le), Z || (L += z(ne) * 40), Z = P(ae), le = 1);
4332
+ L += re(ne, Z, le) * 40;
4333
4333
  };
4334
- for (let P = 0; P < s; P++) V((q) => k[P][q]);
4335
- for (let P = 0; P < s; P++) V((q) => k[q][P]);
4336
- for (let P = 0; P < s - 1; P++) for (let q = 0; q < s - 1; q++) {
4337
- const ce = k[P][q];
4338
- ce === k[P][q + 1] && ce === k[P + 1][q] && ce === k[P + 1][q + 1] && (L += 3);
4334
+ for (let P = 0; P < s; P++) V((Z) => k[P][Z]);
4335
+ for (let P = 0; P < s; P++) V((Z) => k[Z][P]);
4336
+ for (let P = 0; P < s - 1; P++) for (let Z = 0; Z < s - 1; Z++) {
4337
+ const le = k[P][Z];
4338
+ le === k[P][Z + 1] && le === k[P + 1][Z] && le === k[P + 1][Z + 1] && (L += 3);
4339
4339
  }
4340
4340
  let C = 0;
4341
- for (const P of k) for (const q of P) q && C++;
4341
+ for (const P of k) for (const Z of P) Z && C++;
4342
4342
  const ue = s * s;
4343
4343
  return L += (Math.ceil(Math.abs(C * 20 - ue * 10) / ue) - 1) * 10, L;
4344
4344
  };
4345
4345
  let S = 0, $ = 1 / 0;
4346
4346
  for (let L = 0; L < 8; L++) {
4347
- ee(L), b(L);
4347
+ te(L), b(L);
4348
4348
  const z = j();
4349
- z < $ && ($ = z, S = L), ee(L);
4349
+ z < $ && ($ = z, S = L), te(L);
4350
4350
  }
4351
- return ee(S), b(S), k;
4351
+ return te(S), b(S), k;
4352
4352
  }
4353
4353
  function sc(t) {
4354
4354
  const e = nc(t), n = e.length, s = 2;
@@ -4358,7 +4358,7 @@ function sc(t) {
4358
4358
  return `data:image/svg+xml,${encodeURIComponent(a)}`;
4359
4359
  }
4360
4360
  const Di = "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15", rc = "M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25";
4361
- function is() {
4361
+ function os() {
4362
4362
  const t = document;
4363
4363
  return t.fullscreenElement ?? t.webkitFullscreenElement ?? null;
4364
4364
  }
@@ -4404,7 +4404,7 @@ function ac(t) {
4404
4404
  return r(), s.addEventListener("change", r), () => s.removeEventListener("change", r);
4405
4405
  }, [t]), e;
4406
4406
  }
4407
- function Ts({ pos: t, interactive: e, axis: n = "x" }) {
4407
+ function Ln({ pos: t, interactive: e, axis: n = "x" }) {
4408
4408
  const [s, r] = I(null), a = (c) => {
4409
4409
  const d = c.currentTarget.getBoundingClientRect(), u = n === "y" ? (c.clientY - d.top) / Math.max(1, d.height) : (c.clientX - d.left) / Math.max(1, d.width);
4410
4410
  return Math.min(1, Math.max(0, u));
@@ -4413,7 +4413,7 @@ function Ts({ pos: t, interactive: e, axis: n = "x" }) {
4413
4413
  const d = a(c);
4414
4414
  r(null), t.onSeek(d);
4415
4415
  }, l = s != null ? s * 100 : t.pct;
4416
- return /* @__PURE__ */ g(Ue, { children: [
4416
+ return /* @__PURE__ */ g(_e, { children: [
4417
4417
  /* @__PURE__ */ i("span", { className: `gfull__t${e ? " gfull__t--at" : ""}`, children: s != null ? t.labelAt(s) : t.atLabel }),
4418
4418
  /* @__PURE__ */ i(
4419
4419
  "div",
@@ -4484,9 +4484,9 @@ function Vc({ pos: t }) {
4484
4484
  ] })
4485
4485
  ] });
4486
4486
  }
4487
- function ws({ t, mini: e }) {
4487
+ function kn({ t, mini: e }) {
4488
4488
  return /* @__PURE__ */ g("div", { className: "gfull__transport", children: [
4489
- /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(le, { d: X.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
4489
+ /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
4490
4490
  /* @__PURE__ */ i(
4491
4491
  "button",
4492
4492
  {
@@ -4500,12 +4500,12 @@ function ws({ t, mini: e }) {
4500
4500
  children: t.busy ? /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }) : t.playing ? /* @__PURE__ */ i(va, { size: e ? 14 : 18 }) : /* @__PURE__ */ i(vs, { size: e ? 15 : 19 })
4501
4501
  }
4502
4502
  ),
4503
- /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Next line", title: "Next line", style: { opacity: t.nextOn ? 1 : 0.3 }, onClick: t.onNext, children: /* @__PURE__ */ i(le, { d: X.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
4503
+ /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Next line", title: "Next line", style: { opacity: t.nextOn ? 1 : 0.3 }, onClick: t.onNext, children: /* @__PURE__ */ i(oe, { d: J.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
4504
4504
  ] });
4505
4505
  }
4506
4506
  function Ls({ live: t, mini: e, desk: n, pct: s, mark: r }) {
4507
4507
  return /* @__PURE__ */ g("div", { className: `gfull__brand${r ? " gfull__brand--mark" : ""}`, children: [
4508
- /* @__PURE__ */ i("a", { href: ri, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: r ? /* @__PURE__ */ i(ii, { dark: !0, size: 22 }) : /* @__PURE__ */ i(jn, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
4508
+ /* @__PURE__ */ i("a", { href: ri, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: r ? /* @__PURE__ */ i(ii, { dark: !0, size: 22 }) : /* @__PURE__ */ i(In, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
4509
4509
  t && /* @__PURE__ */ g("span", { className: "gfull__live", children: [
4510
4510
  /* @__PURE__ */ i("i", {}),
4511
4511
  "LIVE"
@@ -4514,33 +4514,33 @@ function Ls({ live: t, mini: e, desk: n, pct: s, mark: r }) {
4514
4514
  ] });
4515
4515
  }
4516
4516
  function Si({ v: t, size: e }) {
4517
- return /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Voices", title: t.title, disabled: !t.on, style: { opacity: t.on ? 1 : 0.45, cursor: t.on ? "pointer" : "default" }, onClick: t.on ? t.onClick : void 0, children: /* @__PURE__ */ i(le, { d: X.headphones, size: e, sw: 1.6 }) });
4517
+ return /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Voices", title: t.title, disabled: !t.on, style: { opacity: t.on ? 1 : 0.45, cursor: t.on ? "pointer" : "default" }, onClick: t.on ? t.onClick : void 0, children: /* @__PURE__ */ i(oe, { d: J.headphones, size: e, sw: 1.6 }) });
4518
4518
  }
4519
4519
  function oc({ pos: t, transport: e, chip: n, voices: s, onShare: r, onFull: a, copied: o }) {
4520
4520
  return /* @__PURE__ */ g("div", { className: "gmini", "data-theme": "dark", children: [
4521
4521
  /* @__PURE__ */ i("div", { className: "gmini__shade", "aria-hidden": "true" }),
4522
4522
  /* @__PURE__ */ i("div", { className: "gmini__top", children: /* @__PURE__ */ i(Ls, { live: t.live, mini: !0 }) }),
4523
4523
  /* @__PURE__ */ g("div", { className: "gmini__foot", children: [
4524
- /* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(Ts, { pos: t, interactive: !0 }) }),
4524
+ /* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(Ln, { pos: t, interactive: !0 }) }),
4525
4525
  /* @__PURE__ */ g("div", { className: "gmini__row gmini__row--ctl", children: [
4526
- /* @__PURE__ */ i(ws, { t: e, mini: !0 }),
4526
+ /* @__PURE__ */ i(kn, { t: e, mini: !0 }),
4527
4527
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
4528
4528
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: n }),
4529
4529
  /* @__PURE__ */ i(Si, { v: s, size: 14 }),
4530
4530
  r && /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Share", title: "Share", onClick: (l) => {
4531
4531
  l.stopPropagation(), r();
4532
- }, children: /* @__PURE__ */ i(le, { d: X.share, size: 13, sw: 1.8 }) }),
4533
- /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Full screen", title: "Full screen", onClick: a, children: /* @__PURE__ */ i(le, { d: Di, size: 14, sw: 1.8 }) })
4532
+ }, children: /* @__PURE__ */ i(oe, { d: J.share, size: 13, sw: 1.8 }) }),
4533
+ /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Full screen", title: "Full screen", onClick: a, children: /* @__PURE__ */ i(oe, { d: Di, size: 14, sw: 1.8 }) })
4534
4534
  ] })
4535
4535
  ] }),
4536
4536
  o
4537
4537
  ] });
4538
4538
  }
4539
4539
  const lc = { color: "rgba(255,255,255,.4)" };
4540
- function Ai({ compact: t = !1, noFull: e = !1, page: n = !0, picture: s, title: r, desk: a, pos: o, sub: l, wait: c, pct: d, mute: u, cc: h, ad: M, chip: p, transport: N, picker: w, sheet: k, voices: m, voicesBtn: f, sheetOpen: O, onShare: D, onSettings: b, paused: W, copied: A, onTouch: ee, onClose: j }) {
4541
- const [S, $] = I(() => !!is());
4540
+ function Ai({ compact: t = !1, noFull: e = !1, page: n = !0, picture: s, title: r, desk: a, pos: o, sub: l, wait: c, pct: d, mute: u, cc: h, ad: M, chip: p, transport: N, picker: w, sheet: k, voices: m, voicesBtn: f, sheetOpen: O, onShare: D, onSettings: b, paused: W, copied: A, onTouch: te, onClose: j }) {
4541
+ const [S, $] = I(() => !!os());
4542
4542
  _(() => {
4543
- const K = () => $(!!is());
4543
+ const K = () => $(!!os());
4544
4544
  return document.addEventListener("fullscreenchange", K), document.addEventListener("webkitfullscreenchange", K), () => {
4545
4545
  document.removeEventListener("fullscreenchange", K), document.removeEventListener("webkitfullscreenchange", K);
4546
4546
  };
@@ -4549,160 +4549,160 @@ function Ai({ compact: t = !1, noFull: e = !1, page: n = !0, picture: s, title:
4549
4549
  L.current = j;
4550
4550
  const z = v(N.playable ? N.onPlay : void 0);
4551
4551
  z.current = N.playable ? N.onPlay : void 0;
4552
- const [E, ie] = I(!1), [V, C] = I(0), ue = v(!1);
4552
+ const [E, re] = I(!1), [V, C] = I(0), ue = v(!1);
4553
4553
  _(() => () => wn(!1), []), _(() => {
4554
4554
  if (!n) return;
4555
- const K = [document.documentElement, document.body], pe = K.map((Te) => Te.style.background);
4556
- K.forEach((Te) => {
4557
- Te.style.background = "#050507";
4555
+ const K = [document.documentElement, document.body], ie = K.map((Ne) => Ne.style.background);
4556
+ K.forEach((Ne) => {
4557
+ Ne.style.background = "#050507";
4558
4558
  });
4559
- const re = document.querySelector('meta[name="theme-color"]'), ae = re == null ? void 0 : re.content;
4560
- return re && (re.content = "#050507"), () => {
4561
- K.forEach((Te, ve) => {
4562
- Te.style.background = pe[ve];
4563
- }), re && ae && (re.content = ae);
4559
+ const de = document.querySelector('meta[name="theme-color"]'), ce = de == null ? void 0 : de.content;
4560
+ return de && (de.content = "#050507"), () => {
4561
+ K.forEach((Ne, je) => {
4562
+ Ne.style.background = ie[je];
4563
+ }), de && ce && (de.content = ce);
4564
4564
  };
4565
4565
  }, []);
4566
- const P = Ie(() => n && ic(), [n]), [q, ce] = I(P);
4566
+ const P = Ie(() => n && ic(), [n]), [Z, le] = I(P);
4567
4567
  _(() => {
4568
4568
  if (!n) return;
4569
- const K = [document.documentElement, document.body], pe = K.map((Te) => [Te.style.overflow, Te.style.overscrollBehavior]);
4569
+ const K = [document.documentElement, document.body], ie = K.map((Ne) => [Ne.style.overflow, Ne.style.overscrollBehavior]);
4570
4570
  if (!P)
4571
- return K.forEach((Te) => {
4572
- Te.style.overflow = "hidden", Te.style.overscrollBehavior = "none";
4573
- }), () => K.forEach((Te, ve) => {
4574
- Te.style.overflow = pe[ve][0], Te.style.overscrollBehavior = pe[ve][1];
4571
+ return K.forEach((Ne) => {
4572
+ Ne.style.overflow = "hidden", Ne.style.overscrollBehavior = "none";
4573
+ }), () => K.forEach((Ne, je) => {
4574
+ Ne.style.overflow = ie[je][0], Ne.style.overscrollBehavior = ie[je][1];
4575
4575
  });
4576
- const re = document.createElement("div");
4577
- re.setAttribute("aria-hidden", "true"), re.style.cssText = "position:absolute;top:0;left:0;width:1px;height:calc(100lvh + 160px);pointer-events:none", document.body.appendChild(re), document.documentElement.style.overscrollBehavior = "none";
4578
- const ae = () => {
4579
- window.scrollY > 24 && ce(!1);
4576
+ const de = document.createElement("div");
4577
+ de.setAttribute("aria-hidden", "true"), de.style.cssText = "position:absolute;top:0;left:0;width:1px;height:calc(100lvh + 160px);pointer-events:none", document.body.appendChild(de), document.documentElement.style.overscrollBehavior = "none";
4578
+ const ce = () => {
4579
+ window.scrollY > 24 && le(!1);
4580
4580
  };
4581
- return window.addEventListener("scroll", ae, { passive: !0 }), () => {
4582
- window.removeEventListener("scroll", ae), re.remove(), document.documentElement.style.overscrollBehavior = pe[0][1], window.scrollTo(0, 0);
4581
+ return window.addEventListener("scroll", ce, { passive: !0 }), () => {
4582
+ window.removeEventListener("scroll", ce), de.remove(), document.documentElement.style.overscrollBehavior = ie[0][1], window.scrollTo(0, 0);
4583
4583
  };
4584
4584
  }, [P, n]);
4585
4585
  const ne = v(O);
4586
4586
  ne.current = O, _(() => {
4587
- const K = (ae) => ae instanceof HTMLElement && (ae.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(ae.tagName)), pe = (ae) => {
4588
- var Te;
4589
- ae.key === "Escape" && !ne.current && L.current && (ae.stopPropagation(), L.current()), ae.key === " " && !ne.current && !K(ae.target) && (ae.preventDefault(), ae.stopPropagation(), ae.repeat || (Te = z.current) == null || Te.call(z)), (ae.key === "f" || ae.key === "F") && !ae.metaKey && !ae.ctrlKey && !ae.altKey && !ne.current && !K(ae.target) && Xr() && (ae.preventDefault(), ae.repeat || wn(!is()));
4590
- }, re = (ae) => {
4591
- ae.key === " " && !ne.current && !K(ae.target) && ae.preventDefault();
4587
+ const K = (ce) => ce instanceof HTMLElement && (ce.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(ce.tagName)), ie = (ce) => {
4588
+ var Ne;
4589
+ ce.key === "Escape" && !ne.current && L.current && (ce.stopPropagation(), L.current()), ce.key === " " && !ne.current && !K(ce.target) && (ce.preventDefault(), ce.stopPropagation(), ce.repeat || (Ne = z.current) == null || Ne.call(z)), (ce.key === "f" || ce.key === "F") && !ce.metaKey && !ce.ctrlKey && !ce.altKey && !ne.current && !K(ce.target) && Xr() && (ce.preventDefault(), ce.repeat || wn(!os()));
4590
+ }, de = (ce) => {
4591
+ ce.key === " " && !ne.current && !K(ce.target) && ce.preventDefault();
4592
4592
  };
4593
- return window.addEventListener("keydown", pe, !0), window.addEventListener("keyup", re, !0), () => {
4594
- window.removeEventListener("keydown", pe, !0), window.removeEventListener("keyup", re, !0);
4593
+ return window.addEventListener("keydown", ie, !0), window.addEventListener("keyup", de, !0), () => {
4594
+ window.removeEventListener("keydown", ie, !0), window.removeEventListener("keyup", de, !0);
4595
4595
  };
4596
4596
  }, []);
4597
- const oe = ac("(orientation: landscape) and (max-height: 540px)"), we = v(null), [ke, Pe] = I(null);
4597
+ const ae = ac("(orientation: landscape) and (max-height: 540px)"), we = v(null), [ke, Qe] = I(null);
4598
4598
  Qt(() => {
4599
4599
  const K = we.current;
4600
- if (!K || (Pe(K.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
4601
- const pe = new ResizeObserver(([re]) => Pe(re.contentRect.width));
4602
- return pe.observe(K), () => pe.disconnect();
4600
+ if (!K || (Qe(K.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
4601
+ const ie = new ResizeObserver(([de]) => Qe(de.contentRect.width));
4602
+ return ie.observe(K), () => ie.disconnect();
4603
4603
  }, []);
4604
- const me = t && !S, Le = !me && a && !oe && (ke == null || ke >= 880);
4604
+ const ye = t && !S, Le = !ye && a && !ae && (ke == null || ke >= 880), Se = !Le && !S && ke != null && ke < 480;
4605
4605
  _(() => {
4606
- if (ie(!1), !N.playing || O) return;
4607
- const K = setTimeout(() => ie(!0), 3e3);
4606
+ if (re(!1), !N.playing || O) return;
4607
+ const K = setTimeout(() => re(!0), 3e3);
4608
4608
  return () => clearTimeout(K);
4609
4609
  }, [N.playing, O, V]);
4610
- const Ee = v(E);
4611
- Ee.current = E;
4612
- const $e = v(0), Ce = (K) => {
4610
+ const Be = v(E);
4611
+ Be.current = E;
4612
+ const Oe = v(0), G = (K) => {
4613
4613
  if (K.pointerType !== "mouse") return;
4614
- const pe = Date.now();
4615
- !Ee.current && pe - $e.current < 1e3 || ($e.current = pe, C((re) => re + 1));
4616
- }, G = !Le && oe, B = v(null), te = l ? l.words.map((K) => K.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4614
+ const ie = Date.now();
4615
+ !Be.current && ie - Oe.current < 1e3 || (Oe.current = ie, C((de) => de + 1));
4616
+ }, B = !Le && ae, X = v(null), y = l ? l.words.map((K) => K.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4617
4617
  Qt(() => {
4618
- const K = B.current;
4618
+ const K = X.current;
4619
4619
  if (!K) return;
4620
- const pe = !!(l != null && l.words.some((J) => J.dim)) || (l == null ? void 0 : l.cursor) != null, re = K.querySelectorAll((l == null ? void 0 : l.cursor) != null && !l.words.some((J) => J.dim) ? "[data-at]" : "[data-said]"), ae = parseFloat(getComputedStyle(K).lineHeight) || 24, Te = Math.round(K.scrollHeight / ae) - Math.round(K.clientHeight / ae), ve = Math.max(0, Te) * ae;
4621
- if (ve <= 0) {
4620
+ const ie = !!(l != null && l.words.some((Me) => Me.dim)) || (l == null ? void 0 : l.cursor) != null, de = K.querySelectorAll((l == null ? void 0 : l.cursor) != null && !l.words.some((Me) => Me.dim) ? "[data-at]" : "[data-said]"), ce = parseFloat(getComputedStyle(K).lineHeight) || 24, Ne = Math.round(K.scrollHeight / ce) - Math.round(K.clientHeight / ce), je = Math.max(0, Ne) * ce;
4621
+ if (je <= 0) {
4622
4622
  K.scrollTop && K.scrollTo({ top: 0 });
4623
4623
  return;
4624
4624
  }
4625
- const Ae = (J) => Math.round((J.getBoundingClientRect().top - K.getBoundingClientRect().top + K.scrollTop) / ae), Y = Math.max(1, Math.round(K.clientHeight / ae)), U = pe ? re.length ? Math.floor(Ae(re[re.length - 1]) / Y) * Y * ae : 0 : ve, F = Math.max(0, Math.min(ve, U));
4626
- Math.abs(F - K.scrollTop) > 1 && (K.scrollTop = F);
4627
- }, [te, G]);
4628
- const [y, R] = I(!0), [Me, H] = I(!1), Ne = v(void 0);
4629
- _(() => () => window.clearTimeout(Ne.current), []);
4630
- const Z = W != null && W.share ? W.share.url(y && W.share.at >= 1 ? Math.floor(W.share.at) : null) : "", ze = Ie(() => Le && Z && !N.playing ? sc(Z) : "", [Le, Z, N.playing]), be = () => {
4625
+ const Y = (Me) => Math.round((Me.getBoundingClientRect().top - K.getBoundingClientRect().top + K.scrollTop) / ce), U = Math.max(1, Math.round(K.clientHeight / ce)), F = ie ? de.length ? Math.floor(Y(de[de.length - 1]) / U) * U * ce : 0 : je, ee = Math.max(0, Math.min(je, F));
4626
+ Math.abs(ee - K.scrollTop) > 1 && (K.scrollTop = ee);
4627
+ }, [y, B]);
4628
+ const [R, fe] = I(!0), [H, me] = I(!1), q = v(void 0);
4629
+ _(() => () => window.clearTimeout(q.current), []);
4630
+ const ve = W != null && W.share ? W.share.url(R && W.share.at >= 1 ? Math.floor(W.share.at) : null) : "", Ce = Ie(() => Le && ve && !N.playing ? sc(ve) : "", [Le, ve, N.playing]), He = () => {
4631
4631
  var K;
4632
- (K = navigator.clipboard) == null || K.writeText(Z).then(() => {
4633
- H(!0), window.clearTimeout(Ne.current), Ne.current = window.setTimeout(() => H(!1), 1800);
4632
+ (K = navigator.clipboard) == null || K.writeText(ve).then(() => {
4633
+ me(!0), window.clearTimeout(q.current), q.current = window.setTimeout(() => me(!1), 1800);
4634
4634
  }, () => {
4635
4635
  });
4636
- }, Be = Le && (W == null ? void 0 : W.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: (K) => K.stopPropagation(), onClick: (K) => K.stopPropagation(), children: [
4637
- ze && /* @__PURE__ */ i("div", { className: "gfull__shareqr", role: "img", "aria-label": "QR code for this link", style: { backgroundImage: `url("${ze}")` } }),
4636
+ }, Ae = Le && (W == null ? void 0 : W.share) && /* @__PURE__ */ g("div", { className: "gfull__sharecard", onPointerDown: (K) => K.stopPropagation(), onClick: (K) => K.stopPropagation(), children: [
4637
+ Ce && /* @__PURE__ */ i("div", { className: "gfull__shareqr", role: "img", "aria-label": "QR code for this link", style: { backgroundImage: `url("${Ce}")` } }),
4638
4638
  /* @__PURE__ */ g("div", { className: "gfull__sharebody", children: [
4639
4639
  /* @__PURE__ */ i("div", { className: "gfull__shareeyebrow", children: "SHARE THIS MOMENT" }),
4640
4640
  /* @__PURE__ */ g("label", { className: "gfull__shareat", children: [
4641
- /* @__PURE__ */ i("input", { type: "checkbox", checked: y, onChange: (K) => R(K.target.checked), disabled: W.share.at < 1 }),
4641
+ /* @__PURE__ */ i("input", { type: "checkbox", checked: R, onChange: (K) => fe(K.target.checked), disabled: W.share.at < 1 }),
4642
4642
  "Start at ",
4643
4643
  Lt(Math.floor(W.share.at))
4644
4644
  ] }),
4645
- /* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: Z.replace(/^https?:\/\//, "") }) }),
4645
+ /* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: ve.replace(/^https?:\/\//, "") }) }),
4646
4646
  /* @__PURE__ */ g("div", { className: "gfull__shareacts", children: [
4647
- /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: be, children: [
4648
- /* @__PURE__ */ i(le, { d: Me ? X.check : X.copy, size: 14, sw: 1.8 }),
4649
- Me ? "Copied" : "Copy link"
4647
+ /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: He, children: [
4648
+ /* @__PURE__ */ i(oe, { d: H ? J.check : J.copy, size: 14, sw: 1.8 }),
4649
+ H ? "Copied" : "Copy link"
4650
4650
  ] }),
4651
- /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn", onClick: () => Ds(Z, r), children: [
4652
- /* @__PURE__ */ i(le, { d: X.share, size: 14, sw: 1.6 }),
4651
+ /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn", onClick: () => Ds(ve, r), children: [
4652
+ /* @__PURE__ */ i(oe, { d: J.share, size: 14, sw: 1.6 }),
4653
4653
  "Share"
4654
4654
  ] })
4655
4655
  ] })
4656
4656
  ] })
4657
- ] }), Oe = (K, pe, re, ae, Te, ve = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: K, "aria-label": K, onClick: ae, children: /* @__PURE__ */ i(le, { d: pe, size: (Le ? 20 : 18) + ve, sw: re, style: Te }) }), Fe = /* @__PURE__ */ g("div", { className: "gfull__acts", children: [
4658
- f && /* @__PURE__ */ i(Si, { v: f, size: Le ? 20 : 18 }),
4659
- D && Oe("Share", X.share, 1.6, D),
4660
- Xr() && !e && Oe(S ? "Exit full screen" : "Full screen", S ? rc : Di, 1.7, () => wn(!S)),
4661
- j && Oe("Close player", X.close, 1.7, j)
4662
- ] }), ge = (u || h || b) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
4663
- u && Oe(u.muted ? "Unmute" : "Mute", u.muted ? X.volumeOff : X.volume, 1.6, u.onToggle),
4664
- h && Oe(h.on ? "Hide subtitles" : "Show subtitles", h.on ? X.cc : X.ccOff, 1.7, h.onToggle, void 0, 4),
4665
- b && Oe("Settings", X.cog, 1.6, b)
4657
+ ] }), Ue = (K, ie, de, ce, Ne, je = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: K, "aria-label": K, onClick: ce, children: /* @__PURE__ */ i(oe, { d: ie, size: (Le ? 20 : Se ? 15 : 18) + je, sw: de, style: Ne }) }), ge = /* @__PURE__ */ g("div", { className: "gfull__acts", children: [
4658
+ f && /* @__PURE__ */ i(Si, { v: f, size: Le ? 20 : Se ? 15 : 18 }),
4659
+ D && Ue("Share", J.share, 1.6, D),
4660
+ Xr() && !e && Ue(S ? "Exit full screen" : "Full screen", S ? rc : Di, 1.7, () => wn(!S)),
4661
+ j && Ue("Close player", J.close, 1.7, j)
4662
+ ] }), Re = (u || h || b) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
4663
+ u && Ue(u.muted ? "Unmute" : "Mute", u.muted ? J.volumeOff : J.volume, 1.6, u.onToggle),
4664
+ h && Ue(h.on ? "Hide subtitles" : "Show subtitles", h.on ? J.cc : J.ccOff, 1.7, h.onToggle, void 0, 4),
4665
+ b && Ue("Settings", J.cog, 1.6, b)
4666
4666
  ] });
4667
4667
  return /* @__PURE__ */ g(
4668
4668
  "div",
4669
4669
  {
4670
4670
  ref: we,
4671
- className: `gfull${Le ? " gfull--desk" : ""}${P ? " gfull--swipe" : ""}${M ? " gfull--ad" : ""}${E ? " gfull--calm" : ""}`,
4671
+ className: `gfull${Le ? " gfull--desk" : ""}${Se ? " gfull--mini" : ""}${P ? " gfull--swipe" : ""}${M ? " gfull--ad" : ""}${E ? " gfull--calm" : ""}`,
4672
4672
  "data-theme": "dark",
4673
4673
  role: "dialog",
4674
4674
  "aria-label": r,
4675
- onPointerMove: Ce,
4675
+ onPointerMove: G,
4676
4676
  onPointerDownCapture: (K) => {
4677
- var pe, re;
4678
- E && (ue.current = !0), C((ae) => ae + 1), (re = (pe = K.target).closest) != null && re.call(pe, '[aria-label="Exit full screen"], [aria-label="Full screen"], [aria-label="Close player"]') || ee();
4677
+ var ie, de;
4678
+ E && (ue.current = !0), C((ce) => ce + 1), (de = (ie = K.target).closest) != null && de.call(ie, '[aria-label="Exit full screen"], [aria-label="Full screen"], [aria-label="Close player"]') || te();
4679
4679
  },
4680
4680
  onClickCapture: (K) => {
4681
4681
  ue.current && (ue.current = !1, K.stopPropagation(), K.preventDefault());
4682
4682
  },
4683
4683
  children: [
4684
- P && q && /* @__PURE__ */ g("div", { className: "gfull__swipe", "aria-live": "polite", children: [
4685
- /* @__PURE__ */ i(le, { d: "m4.5 15.75 7.5-7.5 7.5 7.5", size: 14, sw: 2 }),
4684
+ P && Z && /* @__PURE__ */ g("div", { className: "gfull__swipe", "aria-live": "polite", children: [
4685
+ /* @__PURE__ */ i(oe, { d: "m4.5 15.75 7.5-7.5 7.5 7.5", size: 14, sw: 2 }),
4686
4686
  "Swipe up for full screen"
4687
4687
  ] }),
4688
- /* @__PURE__ */ g("div", { className: `gfull__frame${G ? " gfull__frame--land" : ""}`, children: [
4688
+ /* @__PURE__ */ g("div", { className: `gfull__frame${B ? " gfull__frame--land" : ""}`, children: [
4689
4689
  s,
4690
4690
  /* @__PURE__ */ i("div", { className: "gfull__shade", "aria-hidden": "true" }),
4691
- W && !M && !me && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${N.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": N.playing, children: [
4691
+ W && !M && !ye && /* @__PURE__ */ g("div", { className: `gfull__pausedinfo${N.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": N.playing, children: [
4692
4692
  /* @__PURE__ */ g("div", { className: "gfull__pausedtext", children: [
4693
4693
  /* @__PURE__ */ i("div", { className: "gfull__pausedtitle", children: W.title }),
4694
4694
  W.summary && /* @__PURE__ */ i("div", { className: "gfull__pausedsum", children: W.summary })
4695
4695
  ] }),
4696
- Be
4696
+ Ae
4697
4697
  ] }),
4698
- ge,
4698
+ Re,
4699
4699
  A,
4700
4700
  c ? typeof c == "string" ? /* @__PURE__ */ i("div", { className: "gfull__sub", "aria-live": "polite", children: /* @__PURE__ */ g("div", { className: "gfull__wait", children: [
4701
4701
  /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }),
4702
4702
  c
4703
- ] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: B, children: [
4703
+ ] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: X, children: [
4704
4704
  /* @__PURE__ */ i("div", { className: "gfull__subback", "aria-hidden": "true", children: /* @__PURE__ */ g("span", { children: [
4705
- l.who && /* @__PURE__ */ g(Ue, { children: [
4705
+ l.who && /* @__PURE__ */ g(_e, { children: [
4706
4706
  /* @__PURE__ */ g("b", { children: [
4707
4707
  l.who,
4708
4708
  ":"
@@ -4712,35 +4712,40 @@ function Ai({ compact: t = !1, noFull: e = !1, page: n = !0, picture: s, title:
4712
4712
  l.words.map((K) => K.t + K.sp).join("")
4713
4713
  ] }) }),
4714
4714
  /* @__PURE__ */ g("span", { children: [
4715
- l.who && /* @__PURE__ */ g(Ue, { children: [
4715
+ l.who && /* @__PURE__ */ g(_e, { children: [
4716
4716
  /* @__PURE__ */ g("b", { style: { color: l.color }, children: [
4717
4717
  l.who,
4718
4718
  ":"
4719
4719
  ] }),
4720
4720
  " "
4721
4721
  ] }),
4722
- l.words.map((K, pe) => /* @__PURE__ */ g("span", { "data-said": K.dim ? void 0 : "", "data-at": l.cursor != null && pe <= l.cursor ? "" : void 0, style: K.dim ? lc : void 0, children: [
4722
+ l.words.map((K, ie) => /* @__PURE__ */ g("span", { "data-said": K.dim ? void 0 : "", "data-at": l.cursor != null && ie <= l.cursor ? "" : void 0, style: K.dim ? lc : void 0, children: [
4723
4723
  K.t,
4724
4724
  K.sp
4725
- ] }, pe))
4725
+ ] }, ie))
4726
4726
  ] })
4727
4727
  ] }) }),
4728
- /* @__PURE__ */ i("div", { className: `gfull__prog${Le ? "" : " gfull__prog--two"}`, children: Le ? /* @__PURE__ */ g(Ue, { children: [
4728
+ /* @__PURE__ */ i("div", { className: `gfull__prog${Le ? "" : " gfull__prog--two"}`, children: Le ? /* @__PURE__ */ g(_e, { children: [
4729
4729
  /* @__PURE__ */ i(Ls, { live: o.live, desk: !0, pct: d }),
4730
- /* @__PURE__ */ i(ws, { t: N }),
4731
- /* @__PURE__ */ i(Ts, { pos: o, interactive: !0 }),
4730
+ /* @__PURE__ */ i(kn, { t: N }),
4731
+ /* @__PURE__ */ i(Ln, { pos: o, interactive: !0 }),
4732
+ /* @__PURE__ */ i("div", { className: "gfull__chip", children: p }),
4733
+ ge
4734
+ ] }) : Se ? /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4735
+ /* @__PURE__ */ i(kn, { t: N, mini: !0 }),
4736
+ /* @__PURE__ */ i(Ln, { pos: o, interactive: !0 }),
4732
4737
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: p }),
4733
- Fe
4734
- ] }) : /* @__PURE__ */ g(Ue, { children: [
4738
+ ge
4739
+ ] }) : /* @__PURE__ */ g(_e, { children: [
4735
4740
  /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4736
4741
  /* @__PURE__ */ i(Ls, { live: o.live, pct: d, mark: !0 }),
4737
- /* @__PURE__ */ i(Ts, { pos: o, interactive: !0 })
4742
+ /* @__PURE__ */ i(Ln, { pos: o, interactive: !0 })
4738
4743
  ] }),
4739
4744
  /* @__PURE__ */ g("div", { className: "gfull__row", children: [
4740
- /* @__PURE__ */ i(ws, { t: N }),
4745
+ /* @__PURE__ */ i(kn, { t: N }),
4741
4746
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
4742
4747
  /* @__PURE__ */ i("div", { className: "gfull__chip", children: p }),
4743
- Fe
4748
+ ge
4744
4749
  ] })
4745
4750
  ] }) }),
4746
4751
  w,
@@ -4753,9 +4758,9 @@ function Ai({ compact: t = !1, noFull: e = !1, page: n = !0, picture: s, title:
4753
4758
  }
4754
4759
  function cc({ dark: t, back: e, home: n, live: s, title: r, badge: a, subline: o, onOptions: l, optionsActive: c }) {
4755
4760
  return /* @__PURE__ */ g("div", { className: "ghead", children: [
4756
- e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(le, { d: X.chevronLeft, size: 19, sw: 1.7 }) }),
4761
+ e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 19, sw: 1.7 }) }),
4757
4762
  s && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(ii, { dark: t, size: 30 }) }),
4758
- /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(jn, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
4763
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(In, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
4759
4764
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
4760
4765
  /* @__PURE__ */ i("span", { className: "ghead__name", children: r }),
4761
4766
  a
@@ -4769,7 +4774,7 @@ function cc({ dark: t, back: e, home: n, live: s, title: r, badge: a, subline: o
4769
4774
  ] }) })
4770
4775
  ] });
4771
4776
  }
4772
- const uc = "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", dc = (t, e = !1) => [{ value: "read", label: t.read, icon: /* @__PURE__ */ i(le, { d: X.book, size: 17 }) }, { value: "listen", label: /* @__PURE__ */ i("span", { style: { display: "inline-block", minWidth: 52, textAlign: "center" }, children: e ? t.watch : t.listen }), icon: /* @__PURE__ */ i(le, { d: e ? uc : X.headphones, size: 19, sw: 1.5 }) }];
4777
+ const uc = "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", dc = (t, e = !1) => [{ value: "read", label: t.read, icon: /* @__PURE__ */ i(oe, { d: J.book, size: 17 }) }, { value: "listen", label: /* @__PURE__ */ i("span", { style: { display: "inline-block", minWidth: 52, textAlign: "center" }, children: e ? t.watch : t.listen }), icon: /* @__PURE__ */ i(oe, { d: e ? uc : J.headphones, size: 19, sw: 1.5 }) }];
4773
4778
  function Mc(t) {
4774
4779
  if (!t.lang) return null;
4775
4780
  const e = t.langName;
@@ -4820,7 +4825,7 @@ function fc({ state: t, line: e, onRetry: n, onOriginal: s }) {
4820
4825
  onPointerDown: (u) => u.stopPropagation(),
4821
4826
  children: [
4822
4827
  /* @__PURE__ */ g("div", { className: "pwait__head", children: [
4823
- l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(le, { d: X.warnCircle, size: 18, sw: 1.8 }) }) : /* @__PURE__ */ i("div", { className: "pwait__spin", "aria-hidden": "true" }),
4828
+ l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(oe, { d: J.warnCircle, size: 18, sw: 1.8 }) }) : /* @__PURE__ */ i("div", { className: "pwait__spin", "aria-hidden": "true" }),
4824
4829
  /* @__PURE__ */ i("div", { className: "pwait__t", children: c }),
4825
4830
  !l && o != null && o >= 3 && /* @__PURE__ */ i("div", { className: "pwait__clock", "aria-label": `${o} seconds`, children: gc(o) })
4826
4831
  ] }),
@@ -4931,8 +4936,8 @@ function kc({ options: t, onStarted: e, onReplay: n, onClose: s }) {
4931
4936
  return /* @__PURE__ */ i("div", { className: "vsp-end", role: "dialog", "aria-label": "Transcribe another video", onPointerDown: (w) => w.stopPropagation(), onClick: (w) => {
4932
4937
  w.stopPropagation(), w.target === w.currentTarget && s();
4933
4938
  }, children: /* @__PURE__ */ g("div", { className: "vsp-end__card", children: [
4934
- /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: s, children: /* @__PURE__ */ i(le, { d: X.close, size: 16, sw: 1.8 }) }),
4935
- /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(jn, { dark: !0, link: !1, height: 16 }) }),
4939
+ /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: s, children: /* @__PURE__ */ i(oe, { d: J.close, size: 16, sw: 1.8 }) }),
4940
+ /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(In, { dark: !0, link: !1, height: 16 }) }),
4936
4941
  /* @__PURE__ */ i("div", { className: "vsp-end__title", children: t.title ?? "Transcribe and translate any video" }),
4937
4942
  /* @__PURE__ */ i("div", { className: "vsp-end__note", children: t.note ?? "Paste a link from YouTube, Vimeo or any page with a video. It plays right here with subtitles and spoken translations." }),
4938
4943
  /* @__PURE__ */ g("form", { className: "vsp-end__row", onSubmit: (w) => {
@@ -4948,7 +4953,7 @@ function kc({ options: t, onStarted: e, onReplay: n, onClose: s }) {
4948
4953
  /* @__PURE__ */ g("div", { className: "vsp-end__foot", children: [
4949
4954
  /* @__PURE__ */ i("span", { children: "Uses your VocalStack account. You'll be asked to sign in if you're not." }),
4950
4955
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-end__replay", onClick: n, children: [
4951
- /* @__PURE__ */ i(le, { d: X.uturn, size: 14, sw: 1.8 }),
4956
+ /* @__PURE__ */ i(oe, { d: J.uturn, size: 14, sw: 1.8 }),
4952
4957
  "Replay"
4953
4958
  ] })
4954
4959
  ] })
@@ -4964,22 +4969,22 @@ function _i(t) {
4964
4969
  }
4965
4970
  const vc = { lang: null, subtitles: !0, speakerLabels: !1, wordHighlight: !0, translateAudio: !0, voices: "cloned", removeBackground: !1, muted: !1 };
4966
4971
  function jc(t, e) {
4967
- const n = Li(), [s, r] = gi(), [a, o] = I(null), [l, c] = I("main"), d = ps(n, t.lang), u = Ie(() => fi(n, "translation"), [n]), h = (A) => {
4972
+ const n = Li(), [s, r] = gi(), [a, o] = I(null), [l, c] = I("main"), d = ys(n, t.lang), u = Ie(() => fi(n, "translation"), [n]), h = (A) => {
4968
4973
  e({ lang: A }), r(A);
4969
4974
  }, M = zs({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: h, languages: u, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: s, keepOpen: !0 }), p = () => {
4970
4975
  o(null), c("main");
4971
- }, N = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: d.flag }) : /* @__PURE__ */ i(le, { d: X.langAuto, size: 19, sw: 1.7 }), w = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? d.label : "As spoken"}`, title: t.lang ? d.label : "As spoken", onClick: (A) => {
4972
- A.stopPropagation(), c("main"), o((ee) => ee === "lang" ? null : "lang");
4973
- }, children: N }), k = /* @__PURE__ */ i(le, { d: X.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), m = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
4976
+ }, N = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: d.flag }) : /* @__PURE__ */ i(oe, { d: J.langAuto, size: 19, sw: 1.7 }), w = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? d.label : "As spoken"}`, title: t.lang ? d.label : "As spoken", onClick: (A) => {
4977
+ A.stopPropagation(), c("main"), o((te) => te === "lang" ? null : "lang");
4978
+ }, children: N }), k = /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), m = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
4974
4979
  " ",
4975
4980
  /* @__PURE__ */ g("button", { type: "button", onClick: () => c("main"), "aria-label": "Back", className: "vsp-idlesheet__back", children: [
4976
- /* @__PURE__ */ i(le, { d: X.chevronLeft, size: 18, sw: 1.8 }),
4981
+ /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 18, sw: 1.8 }),
4977
4982
  "Back"
4978
4983
  ] })
4979
- ] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, O = (A, ee, j) => /* @__PURE__ */ g("div", { className: "srow", children: [
4984
+ ] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, O = (A, te, j) => /* @__PURE__ */ g("div", { className: "srow", children: [
4980
4985
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
4981
4986
  /* @__PURE__ */ i("div", { className: "srow__t", children: A }),
4982
- /* @__PURE__ */ i("div", { className: "srow__s", children: ee })
4987
+ /* @__PURE__ */ i("div", { className: "srow__s", children: te })
4983
4988
  ] }),
4984
4989
  j
4985
4990
  ] }), D = /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
@@ -4991,8 +4996,8 @@ function jc(t, e) {
4991
4996
  O("Highlight words", "Follow each word as it is spoken", /* @__PURE__ */ i(pt, { checked: t.wordHighlight, onChange: (A) => e({ wordHighlight: A }), label: "Highlight words" }))
4992
4997
  ] }) : l === "audio" ? /* @__PURE__ */ g("div", { style: f, children: [
4993
4998
  O("Translate audio", t.lang ? "Hear the translation read aloud instead of the original speech" : "Pick a language to hear the translation read aloud", /* @__PURE__ */ i(pt, { checked: t.translateAudio && !!t.lang, onChange: (A) => e({ translateAudio: A }), label: "Translate audio", disabled: !t.lang })),
4994
- O("Voices", t.voices === "cloned" ? "Each speaker in their own cloned voice, where they agreed to it" : "Synthetic voices matched to each speaker", /* @__PURE__ */ i(os, { value: t.voices, onChange: (A) => e({ voices: A }), size: "sm", options: [{ value: "synthetic", label: "Synthetic" }, { value: "cloned", label: "Cloned" }] })),
4995
- O(kn, "Takes out everything that isn't speech: music, ambience and noise.", /* @__PURE__ */ i(pt, { checked: t.removeBackground, onChange: (A) => e({ removeBackground: A }), label: kn }))
4999
+ O("Voices", t.voices === "cloned" ? "Each speaker in their own cloned voice, where they agreed to it" : "Synthetic voices matched to each speaker", /* @__PURE__ */ i(cs, { value: t.voices, onChange: (A) => e({ voices: A }), size: "sm", options: [{ value: "synthetic", label: "Synthetic" }, { value: "cloned", label: "Cloned" }] })),
5000
+ O(jn, "Takes out everything that isn't speech: music, ambience and noise.", /* @__PURE__ */ i(pt, { checked: t.removeBackground, onChange: (A) => e({ removeBackground: A }), label: jn }))
4996
5001
  ] }) : /* @__PURE__ */ g("div", { style: f, children: [
4997
5002
  /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => c("lang"), children: [
4998
5003
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -5018,9 +5023,9 @@ function jc(t, e) {
5018
5023
  ] }),
5019
5024
  k
5020
5025
  ] })
5021
- ] }), W = /* @__PURE__ */ g(Ue, { children: [
5022
- /* @__PURE__ */ i($t, { open: a === "lang", onClose: p, title: "LANGUAGE", kind: "picker", sticky: !0, children: /* @__PURE__ */ i(ls, { children: D }) }),
5023
- /* @__PURE__ */ i($t, { open: a === "settings", onClose: p, title: { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO" }[l], titleNode: l === "main" ? void 0 : m, kind: l === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(ls, { children: b }) })
5026
+ ] }), W = /* @__PURE__ */ g(_e, { children: [
5027
+ /* @__PURE__ */ i($t, { open: a === "lang", onClose: p, title: "LANGUAGE", kind: "picker", sticky: !0, children: /* @__PURE__ */ i(us, { children: D }) }),
5028
+ /* @__PURE__ */ i($t, { open: a === "settings", onClose: p, title: { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO" }[l], titleNode: l === "main" ? void 0 : m, kind: l === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(us, { children: b }) })
5024
5029
  ] });
5025
5030
  return {
5026
5031
  chip: w,
@@ -5039,7 +5044,7 @@ const Ui = {
5039
5044
  checking: "Checking the link…",
5040
5045
  starting: "Starting the transcription…"
5041
5046
  }, zc = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
5042
- function as(t) {
5047
+ function ls(t) {
5043
5048
  try {
5044
5049
  return new URL(t).hostname.replace(/^www\./, "");
5045
5050
  } catch {
@@ -5068,7 +5073,7 @@ function Oc(t) {
5068
5073
  return /\.(mp4|webm|mov|m4v|ogv|mkv)(\?|#|$)/i.test(t);
5069
5074
  }
5070
5075
  function Cc({ poster: t, src: e }) {
5071
- const n = e ? Ns(e) : null, s = t ?? (n ? `https://i.ytimg.com/vi/${n}/hqdefault.jpg` : null);
5076
+ const n = e ? ms(e) : null, s = t ?? (n ? `https://i.ytimg.com/vi/${n}/hqdefault.jpg` : null);
5072
5077
  return s ? /* @__PURE__ */ i("div", { className: "vsp-idle__pic", style: { backgroundImage: `url(${s})` } }) : e && Oc(e) ? /* @__PURE__ */ i("video", { className: "vsp-idle__pic vsp-idle__frame", src: `${e}#t=1`, muted: !0, playsInline: !0, preload: "metadata", "aria-hidden": "true" }) : /* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" });
5073
5078
  }
5074
5079
  const bc = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
@@ -5094,9 +5099,9 @@ function ks({ idle: t, poster: e, src: n, title: s, page: r, onAct: a, children:
5094
5099
  ] });
5095
5100
  }
5096
5101
  function Ri({ connect: t, onClick: e, label: n }) {
5097
- return /* @__PURE__ */ g(Ue, { children: [
5102
+ return /* @__PURE__ */ g(_e, { children: [
5098
5103
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
5099
- t.busy ? /* @__PURE__ */ i(at, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(le, { d: X.link, size: 18, sw: 1.8 }),
5104
+ t.busy ? /* @__PURE__ */ i(at, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: J.link, size: 18, sw: 1.8 }),
5100
5105
  /* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
5101
5106
  ] }),
5102
5107
  t.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", role: "status", children: Ui[t.status ?? "checking"] }),
@@ -5105,9 +5110,9 @@ function Ri({ connect: t, onClick: e, label: n }) {
5105
5110
  }
5106
5111
  function xc({ idle: t, src: e, ask: n, connect: s, page: r, poster: a = null, onClear: o }) {
5107
5112
  const l = () => s.start(e, n);
5108
- return /* @__PURE__ */ g(ks, { idle: t, poster: a, src: e, title: as(e), page: r, onAct: l, children: [
5113
+ return /* @__PURE__ */ g(ks, { idle: t, poster: a, src: e, title: ls(e), page: r, onAct: l, children: [
5109
5114
  /* @__PURE__ */ i(Ri, { connect: s, onClick: l, label: s.connected ? "Play with VocalStack" : "Connect to VocalStack" }),
5110
- !s.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: s.connected ? `Plays ${as(e)} with subtitles and spoken translations.` : `Connect to play ${as(e)} with subtitles and spoken translations.` }),
5115
+ !s.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", children: s.connected ? `Plays ${ls(e)} with subtitles and spoken translations.` : `Connect to play ${ls(e)} with subtitles and spoken translations.` }),
5111
5116
  o && !s.busy && /* @__PURE__ */ i("button", { type: "button", className: "vsp-idle__other", onClick: o, children: "Choose another video" })
5112
5117
  ] });
5113
5118
  }
@@ -5124,7 +5129,7 @@ function Dc({ idle: t, connect: e, page: n, poster: s = null, onPick: r }) {
5124
5129
  /* @__PURE__ */ i("form", { className: "vsp-idle__form", onSubmit: (M) => {
5125
5130
  M.preventDefault(), u();
5126
5131
  }, children: /* @__PURE__ */ g("span", { className: "vsp-idle__field", children: [
5127
- /* @__PURE__ */ i(le, { d: X.link, size: 16, sw: 1.8 }),
5132
+ /* @__PURE__ */ i(oe, { d: J.link, size: 16, sw: 1.8 }),
5128
5133
  /* @__PURE__ */ i("input", { ref: l, className: "vsp-idle__input", type: "url", inputMode: "url", enterKeyHint: "go", autoComplete: "off", spellCheck: !1, placeholder: "Paste a video link", value: a, onChange: (M) => o(M.target.value), "aria-label": "Video link", autoFocus: !0 }),
5129
5134
  e.busy && /* @__PURE__ */ i(at, { size: 15, color: "#eef0f8", track: "rgba(255,255,255,.2)" })
5130
5135
  ] }) }),
@@ -5215,7 +5220,7 @@ const Wc = fa(function(e, n) {
5215
5220
  _(() => {
5216
5221
  c(null);
5217
5222
  }, [e.id, e.src]);
5218
- const k = e.src ?? l, m = !r.id && !!k && (l != null || o !== void 0), f = !r.id && !e.src && !l, O = wi({ id: r.id, token: r.token, baseUrl: e.baseUrl, listen: r.listen }), { source: D, gone: b, error: W, reload: A } = Ao(O, r.id), ee = Eo(O, (D == null ? void 0 : D.recording.id) ?? null), j = Ie(() => Do(O, ee), [O, ee]);
5223
+ const k = e.src ?? l, m = !r.id && !!k && (l != null || o !== void 0), f = !r.id && !e.src && !l, O = wi({ id: r.id, token: r.token, baseUrl: e.baseUrl, listen: r.listen }), { source: D, gone: b, error: W, reload: A } = Ao(O, r.id), te = Eo(O, (D == null ? void 0 : D.recording.id) ?? null), j = Ie(() => Do(O, te), [O, te]);
5219
5224
  _(() => {
5220
5225
  var C;
5221
5226
  D && ((C = e.onSource) == null || C.call(e, D));
@@ -5223,105 +5228,105 @@ const Wc = fa(function(e, n) {
5223
5228
  var C;
5224
5229
  W && ((C = e.onError) == null || C.call(e, W));
5225
5230
  }, [W]);
5226
- const S = _i(e.desk), $ = (e.layout ?? "embed") === "embed", L = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), z = Xe((C) => a({ id: C.transcriptionId, token: null, listen: { transcriptionId: C.transcriptionId, recordingId: C.recordingId, token: C.token } }), []), E = Ic(L, z), ie = v(null);
5227
- return _(() => (Jr($ ? ie.current : null), () => Jr(null)), [$]), /* @__PURE__ */ i(Oo, { value: j, children: /* @__PURE__ */ i("div", { ref: ie, className: `vsp${$ ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Dc, { idle: p, connect: E, page: !$, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(xc, { idle: p, src: k, ask: !l, connect: E, page: !$, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : r.id ? /* @__PURE__ */ i(Yc, { ...e, initial: { ...e.initial ?? {}, ...w }, startMuted: N === !0, handle: s, id: r.id, api: j, shared: D, gone: b, loadError: W, reread: A, desk: S, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (C) => a({ id: C.transcriptionId, token: null, listen: { transcriptionId: C.transcriptionId, recordingId: C.recordingId, token: C.token } }) }, r.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5231
+ const S = _i(e.desk), $ = (e.layout ?? "embed") === "embed", L = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), z = Xe((C) => a({ id: C.transcriptionId, token: null, listen: { transcriptionId: C.transcriptionId, recordingId: C.recordingId, token: C.token } }), []), E = Ic(L, z), re = v(null);
5232
+ return _(() => (Jr($ ? re.current : null), () => Jr(null)), [$]), /* @__PURE__ */ i(Oo, { value: j, children: /* @__PURE__ */ i("div", { ref: re, className: `vsp${$ ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Dc, { idle: p, connect: E, page: !$, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(xc, { idle: p, src: k, ask: !l, connect: E, page: !$, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : r.id ? /* @__PURE__ */ i(Yc, { ...e, initial: { ...e.initial ?? {}, ...w }, startMuted: N === !0, handle: s, id: r.id, api: j, shared: D, gone: b, loadError: W, reread: A, desk: S, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (C) => a({ id: C.transcriptionId, token: null, listen: { transcriptionId: C.transcriptionId, recordingId: C.recordingId, token: C.token } }) }, r.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5228
5233
  });
5229
5234
  function Yc(t) {
5230
5235
  var dr, Mr, hr, gr, fr, Nr, pr, mr, yr, Tr, wr, Lr, kr, vr, jr, zr, Ir, Or, Cr, br, xr, Dr, Sr, Ar;
5231
- const { api: e, shared: n, gone: s, desk: r, dark: a } = t, o = t.id ?? "", l = Ie(() => Ec(t), []), c = (t.mode ?? "video") === "video", d = ((Mr = (dr = n == null ? void 0 : n.job) == null ? void 0 : dr.source) == null ? void 0 : Mr.kind) === "url" ? Ns(n.job.source.url) : null, u = c && !(n && !d), [h, M] = I(t.loadError);
5236
+ const { api: e, shared: n, gone: s, desk: r, dark: a } = t, o = t.id ?? "", l = Ie(() => Ec(t), []), c = (t.mode ?? "video") === "video", d = ((Mr = (dr = n == null ? void 0 : n.job) == null ? void 0 : dr.source) == null ? void 0 : Mr.kind) === "url" ? ms(n.job.source.url) : null, u = c && !(n && !d), [h, M] = I(t.loadError);
5232
5237
  _(() => {
5233
5238
  t.loadError && M(t.loadError);
5234
5239
  }, [t.loadError]);
5235
- const [p, N] = I("none"), [w, k] = I(!1), [m, f] = I(""), [O, D] = Ul(), [b, W] = I(null), [A, ee] = I(u ? "listen" : "read"), [j, S] = I(!1), $ = v(null), L = v(/* @__PURE__ */ new Map()), [z, E] = I("main"), ie = (T) => {
5236
- const fe = document.querySelector(".vs-sheet--settings"), _e = fe == null ? void 0 : fe.parentElement;
5237
- fe && _e && z === "main" && T !== "main" && _e.style.setProperty("--vs-sheet-top", `${Math.round(fe.getBoundingClientRect().top - _e.getBoundingClientRect().top)}px`), E(T);
5240
+ const [p, N] = I("none"), [w, k] = I(!1), [m, f] = I(""), [O, D] = Ul(), [b, W] = I(null), [A, te] = I(u ? "listen" : "read"), [j, S] = I(!1), $ = v(null), L = v(/* @__PURE__ */ new Map()), [z, E] = I("main"), re = (T) => {
5241
+ const pe = document.querySelector(".vs-sheet--settings"), Ye = pe == null ? void 0 : pe.parentElement;
5242
+ pe && Ye && z === "main" && T !== "main" && Ye.style.setProperty("--vs-sheet-top", `${Math.round(pe.getBoundingClientRect().top - Ye.getBoundingClientRect().top)}px`), E(T);
5238
5243
  };
5239
5244
  _(() => {
5240
- j || ie("main");
5245
+ j || re("main");
5241
5246
  }, [j]);
5242
- const [V, C] = I(u), ue = (n == null ? void 0 : n.recording) ?? null, P = (ue == null ? void 0 : ue.id) ?? null, [q, ce] = I(l.lang), ne = typeof q == "string" ? q : null, [oe, we] = I(l.labels), [ke, Pe] = I(l.words), [me, Le] = I(l.cc), [Ee, $e] = I(l.translateAudio), [Ce, G] = I(l.clonedVoices), [B, te] = I(l.removeBackground), y = t.settings;
5247
+ const [V, C] = I(u), ue = (n == null ? void 0 : n.recording) ?? null, P = (ue == null ? void 0 : ue.id) ?? null, [Z, le] = I(l.lang), ne = typeof Z == "string" ? Z : null, [ae, we] = I(l.labels), [ke, Qe] = I(l.words), [ye, Le] = I(l.cc), [Se, Be] = I(l.translateAudio), [Oe, G] = I(l.clonedVoices), [B, X] = I(l.removeBackground), y = t.settings;
5243
5248
  _(() => {
5244
- (y == null ? void 0 : y.lang) !== void 0 && ce(y.lang);
5249
+ (y == null ? void 0 : y.lang) !== void 0 && le(y.lang);
5245
5250
  }, [y == null ? void 0 : y.lang]), _(() => {
5246
5251
  (y == null ? void 0 : y.speakerLabels) !== void 0 && we(y.speakerLabels ? "on" : "off");
5247
5252
  }, [y == null ? void 0 : y.speakerLabels]), _(() => {
5248
- (y == null ? void 0 : y.wordHighlight) !== void 0 && Pe(y.wordHighlight ? "on" : "off");
5253
+ (y == null ? void 0 : y.wordHighlight) !== void 0 && Qe(y.wordHighlight ? "on" : "off");
5249
5254
  }, [y == null ? void 0 : y.wordHighlight]), _(() => {
5250
5255
  (y == null ? void 0 : y.subtitles) !== void 0 && Le(y.subtitles);
5251
5256
  }, [y == null ? void 0 : y.subtitles]), _(() => {
5252
- (y == null ? void 0 : y.translateAudio) !== void 0 && $e(y.translateAudio);
5257
+ (y == null ? void 0 : y.translateAudio) !== void 0 && Be(y.translateAudio);
5253
5258
  }, [y == null ? void 0 : y.translateAudio]), _(() => {
5254
5259
  (y == null ? void 0 : y.voices) !== void 0 && G(y.voices === "cloned");
5255
5260
  }, [y == null ? void 0 : y.voices]), _(() => {
5256
- (y == null ? void 0 : y.removeBackground) !== void 0 && te(y.removeBackground);
5261
+ (y == null ? void 0 : y.removeBackground) !== void 0 && X(y.removeBackground);
5257
5262
  }, [y == null ? void 0 : y.removeBackground]);
5258
- const R = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, Me = u && !Ee;
5263
+ const R = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, fe = u && !Se;
5259
5264
  _(() => {
5260
5265
  if (!t.syncUrl) return;
5261
5266
  const T = new URL(window.location.href);
5262
- ne ? T.searchParams.set("lang", ne) : T.searchParams.delete("lang"), oe ? T.searchParams.set("labels", oe) : T.searchParams.delete("labels"), ke ? T.searchParams.set("words", ke) : T.searchParams.delete("words"), me ? T.searchParams.delete("cc") : T.searchParams.set("cc", "off"), Ee ? T.searchParams.delete("audio") : T.searchParams.set("audio", "original"), Ce ? T.searchParams.delete("voices") : T.searchParams.set("voices", "stock"), Za(T, B), T.href !== window.location.href && window.history.replaceState(window.history.state, "", T);
5263
- }, [ne, oe, ke, me, Ee, Ce, B]), _(() => {
5264
- n && !n.allowTranslate && ne && ce(null);
5267
+ ne ? T.searchParams.set("lang", ne) : T.searchParams.delete("lang"), ae ? T.searchParams.set("labels", ae) : T.searchParams.delete("labels"), ke ? T.searchParams.set("words", ke) : T.searchParams.delete("words"), ye ? T.searchParams.delete("cc") : T.searchParams.set("cc", "off"), Se ? T.searchParams.delete("audio") : T.searchParams.set("audio", "original"), Oe ? T.searchParams.delete("voices") : T.searchParams.set("voices", "stock"), Za(T, B), T.href !== window.location.href && window.history.replaceState(window.history.state, "", T);
5268
+ }, [ne, ae, ke, ye, Se, Oe, B]), _(() => {
5269
+ n && !n.allowTranslate && ne && le(null);
5265
5270
  }, [n, ne]);
5266
- const { model: H, error: Ne, clearError: Z, setLanguage: ze, mergeTranslations: be, translating: Be, translateFailed: Oe, shownLang: Fe } = Ro(P, {
5271
+ const { model: H, error: me, clearError: q, setLanguage: ve, mergeTranslations: Ce, translating: He, translateFailed: Ae, shownLang: Ue } = Ro(P, {
5267
5272
  lang: null,
5268
5273
  onFrame: (T) => {
5269
5274
  T.type === "job.progress" && W({ state: T.state, processedS: T.processedS ?? 0, totalS: T.totalS ?? null, segmentsDone: T.segmentsDone ?? 0, segmentsTotal: T.segmentsTotal ?? null, pct: T.pct ?? 0, error: T.error ?? null });
5270
5275
  }
5271
- }), ge = Ie(() => No(H).filter((T) => !T.suppressed), [H]), K = Po((n == null ? void 0 : n.job) ?? null), pe = ["done", "failed", "stopped"].includes(ns((K == null ? void 0 : K.state) ?? ((hr = n == null ? void 0 : n.job) == null ? void 0 : hr.state))), re = pe ? K : b ?? K, ae = !!b && !["done", "failed", "stopped"].includes(ns(b.state)), Te = v(0);
5276
+ }), ge = Ie(() => No(H).filter((T) => !T.suppressed), [H]), Re = Po((n == null ? void 0 : n.job) ?? null), K = ["done", "failed", "stopped"].includes(rs((Re == null ? void 0 : Re.state) ?? ((hr = n == null ? void 0 : n.job) == null ? void 0 : hr.state))), ie = K ? Re : b ?? Re, de = !!b && !["done", "failed", "stopped"].includes(rs(b.state)), ce = v(0);
5272
5277
  _(() => {
5273
- !pe || !ae || Date.now() - Te.current < 1e4 || (Te.current = Date.now(), t.reread());
5274
- }, [pe, ae, b == null ? void 0 : b.state, b == null ? void 0 : b.processedS, o]);
5275
- const ve = ns((re == null ? void 0 : re.state) ?? ((gr = n == null ? void 0 : n.job) == null ? void 0 : gr.state)), Ae = !!P && (ve === "transcribing" || ve === "queued"), Y = u && !s && (!n || (Ae || ve === "cropping") && ge.length === 0), U = Ae ? (re == null ? void 0 : re.pct) ?? 0 : 100, F = $o(n == null ? void 0 : n.job, re) ?? (ue == null ? void 0 : ue.mediaDurationS) ?? null, J = ((fr = H.segments.values().next().value) == null ? void 0 : fr.language) ?? (ue == null ? void 0 : ue.spokenLanguage) ?? null, he = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", xe = ((mr = (pr = (Nr = n == null ? void 0 : n.job) == null ? void 0 : Nr.source) == null ? void 0 : pr.name) == null ? void 0 : mr.trim()) || null, ye = n ? ((yr = n.name) == null ? void 0 : yr.trim()) || xe : null, je = !!((Tr = n == null ? void 0 : n.job) != null && Tr.hasAudio), De = (wr = n == null ? void 0 : n.job) == null ? void 0 : wr.source, Ze = !je && !!De && (De.kind !== "url" || De.bytes != null) && (ve === "transcribing" || ve === "queued" || ve === "done"), Qe = P && (n != null && n.allowDownload) && je ? ba(e.origin, P, e.cred) : P && (n != null && n.allowDownload) && Ze ? Kn(e.origin, P, "source", e.cred) : null, st = ge[ge.length - 1], ot = st ? ((Lr = st.words[st.words.length - 1]) == null ? void 0 : Lr.end) ?? st.start : 0, dt = u && Ae ? Math.max(ot, (re == null ? void 0 : re.processedS) ?? 0) : null, Ve = Hl(Qe, (je || Ze) && !!(n != null && n.allowDownload), ge, F, Ze ? ((vr = (kr = n == null ? void 0 : n.job) == null ? void 0 : kr.crop) == null ? void 0 : vr.startS) ?? 0 : 0, dt), Re = ((zr = (jr = n == null ? void 0 : n.job) == null ? void 0 : jr.source) == null ? void 0 : zr.kind) === "url" ? Ns(n.job.source.url) : null, lt = Bl(ge, F, ((Or = (Ir = n == null ? void 0 : n.job) == null ? void 0 : Ir.crop) == null ? void 0 : Or.startS) ?? 0, dt), He = !!Re, mt = He ? lt.player : Ve, Mt = Li(), Bt = v(null), se = Zl({ forcedVoice: t.voice ?? null, recordingId: P, model: H, rows: ge, lenS: F, ended: !!P && !Ae, cred: e.cred, langs: Mt, srcLang: J, canTranslate: !!(n != null && n.allowTranslate), pickedLang: q, setPickedLang: ce, side: r && !V ? Gl : void 0, hearOriginal: Me, timed: !!Re, stockVoices: u && !Ce, stickyPicker: u, pickerBusy: Bt.current }), Ot = v(null);
5278
+ !K || !de || Date.now() - ce.current < 1e4 || (ce.current = Date.now(), t.reread());
5279
+ }, [K, de, b == null ? void 0 : b.state, b == null ? void 0 : b.processedS, o]);
5280
+ const Ne = rs((ie == null ? void 0 : ie.state) ?? ((gr = n == null ? void 0 : n.job) == null ? void 0 : gr.state)), je = !!P && (Ne === "transcribing" || Ne === "queued"), Y = u && !s && (!n || (je || Ne === "cropping") && ge.length === 0), U = je ? (ie == null ? void 0 : ie.pct) ?? 0 : 100, F = $o(n == null ? void 0 : n.job, ie) ?? (ue == null ? void 0 : ue.mediaDurationS) ?? null, ee = ((fr = H.segments.values().next().value) == null ? void 0 : fr.language) ?? (ue == null ? void 0 : ue.spokenLanguage) ?? null, Me = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", be = ((mr = (pr = (Nr = n == null ? void 0 : n.job) == null ? void 0 : Nr.source) == null ? void 0 : pr.name) == null ? void 0 : mr.trim()) || null, Te = n ? ((yr = n.name) == null ? void 0 : yr.trim()) || be : null, ze = !!((Tr = n == null ? void 0 : n.job) != null && Tr.hasAudio), xe = (wr = n == null ? void 0 : n.job) == null ? void 0 : wr.source, Ze = !ze && !!xe && (xe.kind !== "url" || xe.bytes != null) && (Ne === "transcribing" || Ne === "queued" || Ne === "done"), $e = P && (n != null && n.allowDownload) && ze ? ba(e.origin, P, e.cred) : P && (n != null && n.allowDownload) && Ze ? Xn(e.origin, P, "source", e.cred) : null, st = ge[ge.length - 1], ot = st ? ((Lr = st.words[st.words.length - 1]) == null ? void 0 : Lr.end) ?? st.start : 0, dt = u && je ? Math.max(ot, (ie == null ? void 0 : ie.processedS) ?? 0) : null, We = Hl($e, (ze || Ze) && !!(n != null && n.allowDownload), ge, F, Ze ? ((vr = (kr = n == null ? void 0 : n.job) == null ? void 0 : kr.crop) == null ? void 0 : vr.startS) ?? 0 : 0, dt), Pe = ((zr = (jr = n == null ? void 0 : n.job) == null ? void 0 : jr.source) == null ? void 0 : zr.kind) === "url" ? ms(n.job.source.url) : null, lt = Bl(ge, F, ((Or = (Ir = n == null ? void 0 : n.job) == null ? void 0 : Ir.crop) == null ? void 0 : Or.startS) ?? 0, dt), Ve = !!Pe, mt = Ve ? lt.player : We, Mt = Li(), Bt = v(null), se = Zl({ forcedVoice: t.voice ?? null, recordingId: P, model: H, rows: ge, lenS: F, ended: !!P && !je, cred: e.cred, langs: Mt, srcLang: ee, canTranslate: !!(n != null && n.allowTranslate), pickedLang: Z, setPickedLang: le, side: r && !V ? Gl : void 0, hearOriginal: fe, timed: !!Pe, stockVoices: u && !Oe, stickyPicker: u, pickerBusy: Bt.current }), Ot = v(null);
5276
5281
  _(() => {
5277
- !P || Ot.current === ne || (Ot.current = ne, ze(ne));
5282
+ !P || Ot.current === ne || (Ot.current = ne, ve(ne));
5278
5283
  }, [ne, P]);
5279
- const x = He ? lt.player : se.on ? se.player : mt;
5284
+ const x = Ve ? lt.player : se.on ? se.player : mt;
5280
5285
  _(() => {
5281
- if (He) {
5286
+ if (Ve) {
5282
5287
  se.player.pause();
5283
5288
  return;
5284
5289
  }
5285
5290
  (se.on ? mt : se.player).pause();
5286
- }, [se.on, He]);
5287
- const en = Ie(() => ge.filter((T) => T.sentenceId != null).map((T, fe, _e) => {
5291
+ }, [se.on, Ve]);
5292
+ const en = Ie(() => ge.filter((T) => T.sentenceId != null).map((T, pe, Ye) => {
5288
5293
  var Ge;
5289
- return { sid: T.sentenceId, start: T.start, end: ((Ge = _e[fe + 1]) == null ? void 0 : Ge.start) ?? St(T, T.start, T.start + 4) };
5290
- }), [ge]), vt = lo({ on: He && se.on, lines: en, clips: se.clips, t: x.t, playing: x.playing, muted: x.muted }), Et = !!ne && (Be || se.relang || se.on && vt.missing != null);
5294
+ return { sid: T.sentenceId, start: T.start, end: ((Ge = Ye[pe + 1]) == null ? void 0 : Ge.start) ?? St(T, T.start, T.start + 4) };
5295
+ }), [ge]), vt = lo({ on: Ve && se.on, lines: en, clips: se.clips, t: x.t, playing: x.playing, muted: x.muted }), Et = !!ne && (He || se.relang || se.on && vt.missing != null);
5291
5296
  Bt.current = Et ? ne : null, _(() => {
5292
- He && se.on && vt.sid != null && se.setNear(vt.sid);
5293
- }, [vt.sid, He, se.on]), $l([mt, se.player], se.sampling);
5297
+ Ve && se.on && vt.sid != null && se.setNear(vt.sid);
5298
+ }, [vt.sid, Ve, se.on]), $l([mt, se.player], se.sampling);
5294
5299
  const it = v(null);
5295
5300
  _(() => {
5296
- Ae && !x.playing && it.current && (it.current.scrollTop = it.current.scrollHeight);
5297
- }, [Ae, ge.length]);
5298
- const In = Jl(it, ge, w, m, k), tn = /* @__PURE__ */ i(Kl, { open: w, q: m, onQ: f, onClose: () => k(!1), hits: In, desk: r, inline: r }), Ke = (n == null ? void 0 : n.name) || t.src || o, ht = !!(n != null && n.allowDownload), Ct = !!(n != null && n.allowExport), yt = se.readLang, Tt = yt ? ((Cr = Mt == null ? void 0 : Mt.languages.find((T) => T.code === yt)) == null ? void 0 : Cr.name) ?? yt.toUpperCase() : null, Yt = async () => {
5301
+ je && !x.playing && it.current && (it.current.scrollTop = it.current.scrollHeight);
5302
+ }, [je, ge.length]);
5303
+ const Cn = Jl(it, ge, w, m, k), tn = /* @__PURE__ */ i(Kl, { open: w, q: m, onQ: f, onClose: () => k(!1), hits: Cn, desk: r, inline: r }), Ke = (n == null ? void 0 : n.name) || t.src || o, ht = !!(n != null && n.allowDownload), Ct = !!(n != null && n.allowExport), yt = se.readLang, Tt = yt ? ((Cr = Mt == null ? void 0 : Mt.languages.find((T) => T.code === yt)) == null ? void 0 : Cr.name) ?? yt.toUpperCase() : null, Yt = async () => {
5299
5304
  if (P)
5300
5305
  try {
5301
5306
  if (yt && se.canSpeak) {
5302
5307
  D(`Preparing ${Ke} in ${Tt}${se.readVoiceName ? `, read by ${se.readVoiceName}` : ""} — the download starts when it is ready.`), await Vo(e, { recordingId: P, lang: yt, voiceKey: se.readVoiceKey, cred: e.cred, request: se.requestTrack }), D(`Downloading ${Ke} in ${Tt}.`);
5303
5308
  return;
5304
5309
  }
5305
- if (je) {
5306
- D(`Preparing ${Ke} as MP3 — the download starts when it is ready.`), await Bo(Kn(e.origin, P, "delivery", e.cred)), D(`Downloading ${Ke}.`);
5310
+ if (ze) {
5311
+ D(`Preparing ${Ke} as MP3 — the download starts when it is ready.`), await Bo(Xn(e.origin, P, "delivery", e.cred)), D(`Downloading ${Ke}.`);
5307
5312
  return;
5308
5313
  }
5309
- xs(Kn(e.origin, P, "source", e.cred)), D(`Downloading ${Ke} — the full audio, since the transcript is still being written.`);
5314
+ xs(Xn(e.origin, P, "source", e.cred)), D(`Downloading ${Ke} — the full audio, since the transcript is still being written.`);
5310
5315
  } catch (T) {
5311
5316
  throw M(kt(T)), T;
5312
5317
  }
5313
5318
  }, bt = (T) => {
5314
5319
  if (!P) return;
5315
- const fe = fs.find((Ge) => Ge.key === T).name, _e = Tt ? ` in ${Tt}` : "";
5316
- return Ho(e, P, T, { lang: yt }).then(() => D(Ae ? `${fe} exported${_e} for the first ${ge.length} segments — the rest is still transcribing.` : `${fe} exported${_e}.`)).catch((Ge) => {
5320
+ const pe = ps.find((Ge) => Ge.key === T).name, Ye = Tt ? ` in ${Tt}` : "";
5321
+ return Ho(e, P, T, { lang: yt }).then(() => D(je ? `${pe} exported${Ye} for the first ${ge.length} segments — the rest is still transcribing.` : `${pe} exported${Ye}.`)).catch((Ge) => {
5317
5322
  throw M(kt(Ge)), Ge;
5318
5323
  });
5319
- }, ct = Ae ? "MORE TO COME…" : "END OF TRANSCRIPT", Ht = Ae ? "var(--brand)" : "var(--ink-28)", rt = Qo(re, ge.length), jt = x.has && (!se.relang || !!Re), qe = v(x);
5324
+ }, ct = je ? "MORE TO COME…" : "END OF TRANSCRIPT", Ht = je ? "var(--brand)" : "var(--ink-28)", rt = Qo(ie, ge.length), jt = x.has && (!se.relang || !!Pe), qe = v(x);
5320
5325
  qe.current = x;
5321
5326
  const _t = `${ne ?? ""}|${se.on ? "voice" : "source"}`, Vt = v({ key: _t, idx: 0, t: 0, playing: !1, until: 0 });
5322
5327
  _(() => {
5323
5328
  const T = Vt.current;
5324
- if (T.key !== _t && (T.key = _t, T.until = Date.now() + 15e3), !He) {
5329
+ if (T.key !== _t && (T.key = _t, T.until = Date.now() + 15e3), !Ve) {
5325
5330
  if (!T.until) {
5326
5331
  T.idx = x.idx, T.t = x.t, T.playing = x.playing;
5327
5332
  return;
@@ -5335,28 +5340,28 @@ function Yc(t) {
5335
5340
  });
5336
5341
  const gt = v(!1), Je = v(!1);
5337
5342
  u && (li.video = !0);
5338
- const [Wt, xt] = I(!1), [nn, On] = I(!1);
5343
+ const [Wt, xt] = I(!1), [nn, bn] = I(!1);
5339
5344
  _(() => {
5340
5345
  if (!u || gt.current || !jt || !V || Y || t.autoplay === !1) return;
5341
5346
  gt.current = !0;
5342
5347
  const T = (Ge) => {
5343
5348
  qe.current.playing || Je.current || (qe.current.toggle(), Ge > 0 && setTimeout(() => T(Ge - 1), 1500));
5344
- }, fe = () => {
5349
+ }, pe = () => {
5345
5350
  qe.current.muted || qe.current.toggleMute(), xt(!0), T(3);
5346
- }, _e = qe.current;
5347
- if (!_e.autoplay || t.startMuted) {
5348
- fe();
5351
+ }, Ye = qe.current;
5352
+ if (!Ye.autoplay || t.startMuted) {
5353
+ pe();
5349
5354
  return;
5350
5355
  }
5351
- _e.autoplay().then((Ge) => {
5352
- Ge === !1 ? xt(!0) : Ge == null && !Je.current && fe();
5356
+ Ye.autoplay().then((Ge) => {
5357
+ Ge === !1 ? xt(!0) : Ge == null && !Je.current && pe();
5353
5358
  });
5354
5359
  }, [u, jt, V, Y]);
5355
- const zt = v(!1), Cn = () => {
5360
+ const zt = v(!1), xn = () => {
5356
5361
  Wt && (xt(!1), zt.current = !0, setTimeout(() => {
5357
5362
  zt.current = !1;
5358
5363
  }, 500), qe.current.muted && qe.current.toggleMute());
5359
- }, bn = () => {
5364
+ }, Dn = () => {
5360
5365
  if (zt.current) {
5361
5366
  zt.current = !1;
5362
5367
  return;
@@ -5368,20 +5373,20 @@ function Yc(t) {
5368
5373
  return;
5369
5374
  }
5370
5375
  Je.current = !0, qe.current.toggle();
5371
- }, rn = (T) => /* @__PURE__ */ i(_l, { player: x, size: T }), Ft = !!P && !Ae, [Gt, Q] = I(!1);
5376
+ }, rn = (T) => /* @__PURE__ */ i(_l, { player: x, size: T }), Ft = !!P && !je, [Gt, Q] = I(!1);
5372
5377
  _(() => {
5373
- if (!Be) {
5378
+ if (!He) {
5374
5379
  Q(!1);
5375
5380
  return;
5376
5381
  }
5377
5382
  const T = setTimeout(() => Q(!0), 180);
5378
5383
  return () => clearTimeout(T);
5379
- }, [Be]);
5380
- const Se = Gt ? Fe : ne, We = sl(P, ne, ge, be), ft = ml(yl(ue), P, se.readLang), Zt = ht || Ct, Pi = (((xr = (br = n == null ? void 0 : n.job) == null ? void 0 : br.crop) == null ? void 0 : xr.startS) ?? 0) + rs(x, ge), xn = A === "listen", Dt = xn && !!Re, Qi = (T) => {
5381
- mt.pause(), se.player.pause(), ee(T), T === "read" && V && (Kt(!1), C(!1));
5382
- }, Ye = se.barChip, Ut = vi(Ye.label), Es = /* @__PURE__ */ i(os, { value: A, onChange: Qi, bordered: !1, options: dc(Ut, !!Re) }), Rt = [...Ft ? [{ key: "summary", label: "Summary" }] : [], ...Zt ? [{ key: "export", label: "Export" }] : []], Ys = (T) => /* @__PURE__ */ g(Ue, { children: [
5384
+ }, [He]);
5385
+ const De = Gt ? Ue : ne, Fe = sl(P, ne, ge, Ce), ft = ml(yl(ue), P, se.readLang), Zt = ht || Ct, Pi = (((xr = (br = n == null ? void 0 : n.job) == null ? void 0 : br.crop) == null ? void 0 : xr.startS) ?? 0) + as(x, ge), Sn = A === "listen", Dt = Sn && !!Pe, Qi = (T) => {
5386
+ mt.pause(), se.player.pause(), te(T), T === "read" && V && (Kt(!1), C(!1));
5387
+ }, Ee = se.barChip, Ut = vi(Ee.label), Es = /* @__PURE__ */ i(cs, { value: A, onChange: Qi, bordered: !1, options: dc(Ut, !!Pe) }), Rt = [...Ft ? [{ key: "summary", label: "Summary" }] : [], ...Zt ? [{ key: "export", label: "Export" }] : []], Ys = (T) => /* @__PURE__ */ g(_e, { children: [
5383
5388
  T === "summary" && Ft && /* @__PURE__ */ i(Tl, { s: ft }),
5384
- T === "export" && /* @__PURE__ */ i(pl, { audio: ht ? { name: Ke, meta: yt && se.canSpeak || je ? `MP3${F ? ` · ${Lt(F)}` : ""}` : "ORIGINAL AUDIO", onClick: Yt } : null, formats: Ct, onExport: bt })
5389
+ T === "export" && /* @__PURE__ */ i(pl, { audio: ht ? { name: Ke, meta: yt && se.canSpeak || ze ? `MP3${F ? ` · ${Lt(F)}` : ""}` : "ORIGINAL AUDIO", onClick: Yt } : null, formats: Ct, onExport: bt })
5385
5390
  ] }), $i = (T) => /* @__PURE__ */ i(Xo, { index: x.idx, total: Math.max(1, ge.length), frac: x.dur > 0 ? Math.min(1, x.t / x.dur) : 0, glideMs: x.wordSync ? 0 : 220, atLabel: Lt(x.t), durLabel: Lt(x.dur), stepLabel: T ? `${x.idx + 1} / ${ge.length}` : "", onSeek: se.relang ? Wl : x.seekRow, onSeekFrac: se.relang ? void 0 : x.seekFrac, onScrubStart: x.hold, onScrubEnd: x.release }), _s = {
5386
5391
  live: !1,
5387
5392
  atEdge: !1,
@@ -5392,85 +5397,85 @@ function Yc(t) {
5392
5397
  labelAt: (T) => Lt(T * x.dur),
5393
5398
  endLabel: Lt(x.dur),
5394
5399
  onSeek: (T) => {
5395
- var fe;
5396
- se.relang || (fe = x.seekFrac) == null || fe.call(x, T);
5400
+ var pe;
5401
+ se.relang || (pe = x.seekFrac) == null || pe.call(x, T);
5397
5402
  }
5398
- }, [Bi, Hi] = hc(se.on && !!x.preparing && x.playing, 1500), Dn = se.on && ((Dr = x.error) == null ? void 0 : Dr.code) === "voice_not_started", Sn = se.canSpeak && !se.error && !Dn, an = ne ? ((Sr = Mt == null ? void 0 : Mt.languages.find((T) => T.code === ne)) == null ? void 0 : Sr.name) ?? Ye.label : "", tt = V ? Mc({ lang: ne, langName: an, translating: Be && !!ne, translateFailed: Oe, voiceFailed: Dn, relang: se.relang, starting: se.on ? x.starting : null, slowLine: Bi, lineSince: Hi }) : null, An = !!Re && !!tt && (tt.kind === "translating" || tt.kind === "voice" && se.relang), Us = !An || !tt ? null : tt.kind === "translating" ? `Translating into ${an || "the new language"}…` : `Preparing the ${an || "translated"} voice…`, on = !An && ((tt == null ? void 0 : tt.kind) === "voice" || (tt == null ? void 0 : tt.kind) === "starting"), Rs = zs({ ...se.langList, keepOpen: !0, open: z === "lang", onClose: () => ie("main") }), Ps = Fa(B, se.on), Vi = u && Ps.bed && ht && P && (!Ae || Qe) ? Yr(e.origin, P, e.cred) : null, Qs = no(Vi, { t: rs(x, ge), playing: x.playing && !on && !(x.timed && x.preparing), muted: x.muted }), Wi = u && Ps.speech && ht && P && (!Ae || Qe) ? Yr(e.origin, P, e.cred, "speech") : null, En = Ni(Wi, { t: rs(x, ge), playing: !se.on && x.playing, muted: x.muted }), Yn = !se.on && En.on;
5403
+ }, [Bi, Hi] = hc(se.on && !!x.preparing && x.playing, 1500), An = se.on && ((Dr = x.error) == null ? void 0 : Dr.code) === "voice_not_started", En = se.canSpeak && !se.error && !An, an = ne ? ((Sr = Mt == null ? void 0 : Mt.languages.find((T) => T.code === ne)) == null ? void 0 : Sr.name) ?? Ee.label : "", tt = V ? Mc({ lang: ne, langName: an, translating: He && !!ne, translateFailed: Ae, voiceFailed: An, relang: se.relang, starting: se.on ? x.starting : null, slowLine: Bi, lineSince: Hi }) : null, Yn = !!Pe && !!tt && (tt.kind === "translating" || tt.kind === "voice" && se.relang), Us = !Yn || !tt ? null : tt.kind === "translating" ? `Translating into ${an || "the new language"}…` : `Preparing the ${an || "translated"} voice…`, on = !Yn && ((tt == null ? void 0 : tt.kind) === "voice" || (tt == null ? void 0 : tt.kind) === "starting"), Rs = zs({ ...se.langList, keepOpen: !0, open: z === "lang", onClose: () => re("main") }), Ps = Fa(B, se.on), Vi = u && Ps.bed && ht && P && (!je || $e) ? Yr(e.origin, P, e.cred) : null, Qs = no(Vi, { t: as(x, ge), playing: x.playing && !on && !(x.timed && x.preparing), muted: x.muted }), Wi = u && Ps.speech && ht && P && (!je || $e) ? Yr(e.origin, P, e.cred, "speech") : null, _n = Ni(Wi, { t: as(x, ge), playing: !se.on && x.playing, muted: x.muted }), Un = !se.on && _n.on;
5399
5404
  _(() => {
5400
5405
  var T;
5401
- lt.setVideoSound(!(He && (se.on || Yn))), (T = Ve.silence) == null || T.call(Ve, !He && Yn);
5402
- }, [He, se.on, Yn, Qe]);
5403
- const _n = ht ? se.on ? Qs : En.state : "unavailable", Un = Ee && Sn && !!ne, Fi = Un ? [`Translated${se.hasClone ? Ce ? ", cloned voices" : ", synthetic voices" : ""}`, !B && ht && Qs !== "unavailable" ? "with background sound" : null].filter(Boolean).join(" ") : B && _n !== "unavailable" ? "Original speech, background removed" : "Original sound", Gi = () => {
5406
+ lt.setVideoSound(!(Ve && (se.on || Un))), (T = We.silence) == null || T.call(We, !Ve && Un);
5407
+ }, [Ve, se.on, Un, $e]);
5408
+ const Rn = ht ? se.on ? Qs : _n.state : "unavailable", Pn = Se && En && !!ne, Fi = Pn ? [`Translated${se.hasClone ? Oe ? ", cloned voices" : ", synthetic voices" : ""}`, !B && ht && Qs !== "unavailable" ? "with background sound" : null].filter(Boolean).join(" ") : B && Rn !== "unavailable" ? "Original speech, background removed" : "Original sound", Gi = () => {
5404
5409
  if ((tt == null ? void 0 : tt.kind) === "translateFailed") {
5405
- ze(ne);
5410
+ ve(ne);
5406
5411
  return;
5407
5412
  }
5408
5413
  Je.current = !0, x.toggle();
5409
5414
  }, Zi = () => {
5410
5415
  const T = x.idx;
5411
- x.pause(), ce(null), Je.current = !0, mt.playRow(T);
5416
+ x.pause(), le(null), Je.current = !0, mt.playRow(T);
5412
5417
  }, $s = { prevOn: x.idx > 0, nextOn: x.idx < ge.length - 1, onPrev: x.prev, onNext: x.next, playing: x.playing, playable: jt, playTitle: se.playTitle ?? (x.playing ? "Pause" : "Play"), onPlay: () => {
5413
5418
  Je.current = !0, x.toggle();
5414
- }, busy: se.relang && !Re || on };
5419
+ }, busy: se.relang && !Pe || on };
5415
5420
  Mo(jt ? { playing: x.playing, toggle: () => {
5416
5421
  Je.current = !0, x.toggle();
5417
- }, next: x.next, prev: x.prev } : null, ye);
5418
- const Rn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, Pn = (T, fe) => !Ye.can || !R.language ? null : u ? /* @__PURE__ */ g("button", { type: "button", className: "gfull__btn", title: Et ? `${Ye.label ?? Ye.code}: still being prepared` : Ye.label ?? Ye.code, "aria-label": `Language: ${Ye.label ?? Ye.code}`, "aria-busy": Et || void 0, onClick: () => {
5419
- S(!1), Ye.onClick();
5422
+ }, next: x.next, prev: x.prev } : null, Te);
5423
+ const Qn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, $n = (T, pe) => !Ee.can || !R.language ? null : u ? /* @__PURE__ */ g("button", { type: "button", className: "gfull__btn", title: Et ? `${Ee.label ?? Ee.code}: still being prepared` : Ee.label ?? Ee.code, "aria-label": `Language: ${Ee.label ?? Ee.code}`, "aria-busy": Et || void 0, onClick: () => {
5424
+ S(!1), Ee.onClick();
5420
5425
  }, style: { position: "relative" }, children: [
5421
- /* @__PURE__ */ i("span", { style: { fontSize: fe === "sm" ? 17 : 21, lineHeight: 1 }, children: Ye.flag }),
5426
+ /* @__PURE__ */ i("span", { style: { fontSize: pe === "sm" ? 17 : 21, lineHeight: 1 }, children: Ee.flag }),
5422
5427
  Et && /* @__PURE__ */ i("span", { style: { position: "absolute", right: 2, bottom: 2, display: "flex", borderRadius: 999, background: "rgba(5,6,21,.7)", padding: 1 }, children: /* @__PURE__ */ i(at, { size: 11, color: "#eef0f8", track: "rgba(255,255,255,.25)" }) })
5423
- ] }) : /* @__PURE__ */ i(Ln, { flag: Ye.flag, code: Ye.code, label: Ye.label, bordered: !1, size: fe, onClick: Ye.onClick, style: T }), Bs = { on: !1, title: "Voices", onClick: () => {
5428
+ ] }) : /* @__PURE__ */ i(vn, { flag: Ee.flag, code: Ee.code, label: Ee.label, bordered: !1, size: pe, onClick: Ee.onClick, style: T }), Bs = { on: !1, title: "Voices", onClick: () => {
5424
5429
  } }, [qi, Ki] = I(!1);
5425
5430
  _(() => {
5426
5431
  x.t > 0.3 && Ki(!0);
5427
5432
  }, [x.t]);
5428
- const Hs = Re && /* @__PURE__ */ g(Ue, { children: [
5429
- /* @__PURE__ */ i(Al, { ytId: Re, title: Ke, t: Pi, playing: x.playing && !on, waiting: se.on && !!x.timed && !!x.preparing, seekN: x.seekN, onTime: (T) => {
5430
- var fe, _e, Ge;
5431
- return (Ge = x.videoAt) == null ? void 0 : Ge.call(x, T - (((_e = (fe = n == null ? void 0 : n.job) == null ? void 0 : fe.crop) == null ? void 0 : _e.startS) ?? 0));
5432
- }, onToggle: x.has ? sn : void 0, onAd: On, lead: He ? lt.lead : void 0 }),
5433
+ const Hs = Pe && /* @__PURE__ */ g(_e, { children: [
5434
+ /* @__PURE__ */ i(Al, { ytId: Pe, title: Ke, t: Pi, playing: x.playing && !on, waiting: se.on && !!x.timed && !!x.preparing, seekN: x.seekN, onTime: (T) => {
5435
+ var pe, Ye, Ge;
5436
+ return (Ge = x.videoAt) == null ? void 0 : Ge.call(x, T - (((Ye = (pe = n == null ? void 0 : n.job) == null ? void 0 : pe.crop) == null ? void 0 : Ye.startS) ?? 0));
5437
+ }, onToggle: x.has ? sn : void 0, onAd: bn, lead: Ve ? lt.lead : void 0 }),
5433
5438
  /* @__PURE__ */ g("div", { className: "vsp-poster", "aria-hidden": "true", style: { opacity: qi ? 0 : 1 }, children: [
5434
- /* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Re}/hqdefault.jpg)` } }),
5439
+ /* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Pe}/hqdefault.jpg)` } }),
5435
5440
  /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(vs, { size: 44 }) })
5436
5441
  ] })
5437
- ] }), Vs = Dt && Re && !V ? /* @__PURE__ */ i(wl, { ytId: Re, title: Ke, radius: 14, large: !0, style: r ? void 0 : { margin: "8px 20px 2px" }, picture: Hs, children: /* @__PURE__ */ i(oc, { pos: _s, transport: $s, chip: Pn({ ...Rn, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: Bs, onFull: () => {
5442
+ ] }), Vs = Dt && Pe && !V ? /* @__PURE__ */ i(wl, { ytId: Pe, title: Ke, radius: 14, large: !0, style: r ? void 0 : { margin: "8px 20px 2px" }, picture: Hs, children: /* @__PURE__ */ i(oc, { pos: _s, transport: $s, chip: $n({ ...Qn, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: Bs, onFull: () => {
5438
5443
  Kt(!0), C(!0);
5439
5444
  }, copied: null }) }) : null, et = x.wordSync ? Go(ge, x.idx, x.t) ? ge[x.idx] : void 0 : ge[x.idx];
5440
- for (const T of ge) for (const [fe, _e] of Object.entries(T.translations)) _e && L.current.set(`${T.sentenceId ?? T.start}|${fe}`, _e);
5441
- const Ws = (T, fe) => T.translations[fe] || L.current.get(`${T.sentenceId ?? T.start}|${fe}`) || null, Qn = (T, fe) => !T || !fe || T.language === fe || !!Ws(T, fe), wt = Qn(et, ne) ? ne : Qn(et, $.current) ? $.current : ne;
5442
- et && Qn(et, wt) && ($.current = wt);
5443
- const Fs = et && wt && et.language !== wt ? Ws(et, wt) : null, Ji = et && Fs && wt && !et.translations[wt] ? Object.assign([...ge], { [x.idx]: { ...et, translations: { ...et.translations, [wt]: Fs } } }) : ge, ln = et ? bi(Ji, x.idx, wt) : [], cn = ke ? ke === "on" : !u || se.on || !Se || Se === J, Gs = cn ? qr(x, x.idx, ln) : null, Zs = ln.map((T, fe) => ({ t: T.text, sp: fe < ln.length - 1 ? " " : "", dim: Gs != null && fe > Gs })), un = oe ? oe === "on" : u ? !1 : zo(H, ge, ue == null ? void 0 : ue.settings), qs = { lang: ne, subtitles: me, speakerLabels: un, wordHighlight: cn, translateAudio: Ee, voices: Ce ? "cloned" : "synthetic", removeBackground: B }, Xi = JSON.stringify(qs), dn = v(t.onSettingsChange);
5445
+ for (const T of ge) for (const [pe, Ye] of Object.entries(T.translations)) Ye && L.current.set(`${T.sentenceId ?? T.start}|${pe}`, Ye);
5446
+ const Ws = (T, pe) => T.translations[pe] || L.current.get(`${T.sentenceId ?? T.start}|${pe}`) || null, Bn = (T, pe) => !T || !pe || T.language === pe || !!Ws(T, pe), wt = Bn(et, ne) ? ne : Bn(et, $.current) ? $.current : ne;
5447
+ et && Bn(et, wt) && ($.current = wt);
5448
+ const Fs = et && wt && et.language !== wt ? Ws(et, wt) : null, Ji = et && Fs && wt && !et.translations[wt] ? Object.assign([...ge], { [x.idx]: { ...et, translations: { ...et.translations, [wt]: Fs } } }) : ge, ln = et ? bi(Ji, x.idx, wt) : [], cn = ke ? ke === "on" : !u || se.on || !De || De === ee, Gs = cn ? qr(x, x.idx, ln) : null, Zs = ln.map((T, pe) => ({ t: T.text, sp: pe < ln.length - 1 ? " " : "", dim: Gs != null && pe > Gs })), un = ae ? ae === "on" : u ? !1 : zo(H, ge, ue == null ? void 0 : ue.settings), qs = { lang: ne, subtitles: ye, speakerLabels: un, wordHighlight: cn, translateAudio: Se, voices: Oe ? "cloned" : "synthetic", removeBackground: B }, Xi = JSON.stringify(qs), dn = v(t.onSettingsChange);
5444
5449
  dn.current = t.onSettingsChange, _(() => {
5445
5450
  var T;
5446
5451
  (T = dn.current) == null || T.call(dn, qs);
5447
5452
  }, [Xi]);
5448
- const Mn = et && et.speaker >= 0 && un ? Cs(H, et.speaker) : null, [ea, Ks] = I(!1), [$n, Js] = I(null), [ta, Xs] = I(null), Bn = v(void 0);
5449
- _(() => () => window.clearTimeout(Bn.current), []);
5450
- const Hn = v(void 0);
5451
- _(() => () => window.clearTimeout(Hn.current), []);
5453
+ const Mn = et && et.speaker >= 0 && un ? Cs(H, et.speaker) : null, [ea, Ks] = I(!1), [Hn, Js] = I(null), [ta, Xs] = I(null), Vn = v(void 0);
5454
+ _(() => () => window.clearTimeout(Vn.current), []);
5455
+ const Wn = v(void 0);
5456
+ _(() => () => window.clearTimeout(Wn.current), []);
5452
5457
  const er = (T) => {
5453
5458
  if (t.shareUrl) return t.shareUrl(T);
5454
- const fe = new URL(window.location.href);
5455
- return T != null && T > 0 ? fe.searchParams.set("t", String(T)) : fe.searchParams.delete("t"), fe.href;
5456
- }, hn = v(l.startAt), Vn = (T) => {
5459
+ const pe = new URL(window.location.href);
5460
+ return T != null && T > 0 ? pe.searchParams.set("t", String(T)) : pe.searchParams.delete("t"), pe.href;
5461
+ }, hn = v(l.startAt), Fn = (T) => {
5457
5462
  if (x.seekFrac && x.dur > 0) {
5458
5463
  x.seekFrac(Math.min(1, T / x.dur));
5459
5464
  return;
5460
5465
  }
5461
- let fe = 0;
5462
- for (let _e = 0; _e < ge.length; _e++) ge[_e].start <= T && (fe = _e);
5463
- x.seekRow(fe);
5466
+ let pe = 0;
5467
+ for (let Ye = 0; Ye < ge.length; Ye++) ge[Ye].start <= T && (pe = Ye);
5468
+ x.seekRow(pe);
5464
5469
  }, tr = v(!1);
5465
5470
  _(() => {
5466
5471
  const T = hn.current;
5467
- T == null || tr.current || !x.has || ge.length === 0 || (tr.current = !0, Vn(T));
5472
+ T == null || tr.current || !x.has || ge.length === 0 || (tr.current = !0, Fn(T));
5468
5473
  }, [x.has, ge.length]), _(() => {
5469
5474
  const T = hn.current;
5470
- T == null || !x.playing || (hn.current = null, Math.abs(x.t - T) > 2 && Vn(T));
5475
+ T == null || !x.playing || (hn.current = null, Math.abs(x.t - T) > 2 && Fn(T));
5471
5476
  }, [x.playing]);
5472
5477
  const na = (T) => {
5473
- Je.current = !0, hn.current = null, Vn(Math.max(0, T));
5478
+ Je.current = !0, hn.current = null, Fn(Math.max(0, T));
5474
5479
  };
5475
5480
  t.handle.current = {
5476
5481
  seek: (T) => na(T),
@@ -5494,40 +5499,40 @@ function Yc(t) {
5494
5499
  const sr = v(ne);
5495
5500
  sr.current = ne, _(() => {
5496
5501
  let T = "";
5497
- const fe = () => {
5502
+ const pe = () => {
5498
5503
  const Ge = nr.current;
5499
5504
  if (!Ge) return;
5500
5505
  const Nt = qe.current, ut = { t: Nt.t, dur: Nt.dur, playing: Nt.playing, idx: Nt.idx, seekN: Nt.seekN, lang: sr.current, muted: Nt.muted }, pn = `${ut.t.toFixed(2)}|${ut.dur}|${ut.playing}|${ut.idx}|${ut.seekN}|${ut.lang}|${ut.muted}`;
5501
5506
  pn !== T && (T = pn, Ge(ut));
5502
5507
  };
5503
- fe();
5504
- const _e = window.setInterval(fe, Ac);
5505
- return () => window.clearInterval(_e);
5508
+ pe();
5509
+ const Ye = window.setInterval(pe, Ac);
5510
+ return () => window.clearInterval(Ye);
5506
5511
  }, []);
5507
5512
  const sa = () => t.onShare ? t.onShare() : Ds(er(null), Ke, () => {
5508
- window.clearTimeout(Hn.current), Ks(!0), Hn.current = window.setTimeout(() => Ks(!1), 2200);
5509
- }), rr = (T, fe, _e) => {
5510
- const Ge = fs.find((pn) => pn.key === T), Nt = $n === T, ut = ta === T;
5511
- return /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", "aria-busy": Nt || void 0, style: $n && !Nt ? { opacity: 0.45, pointerEvents: "none" } : void 0, onClick: () => {
5512
- $n || (Js(T), Promise.resolve().then(() => bt(T)).then(() => {
5513
- Xs(T), window.clearTimeout(Bn.current), Bn.current = window.setTimeout(() => Xs(null), 1600);
5513
+ window.clearTimeout(Wn.current), Ks(!0), Wn.current = window.setTimeout(() => Ks(!1), 2200);
5514
+ }), rr = (T, pe, Ye) => {
5515
+ const Ge = ps.find((pn) => pn.key === T), Nt = Hn === T, ut = ta === T;
5516
+ return /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", "aria-busy": Nt || void 0, style: Hn && !Nt ? { opacity: 0.45, pointerEvents: "none" } : void 0, onClick: () => {
5517
+ Hn || (Js(T), Promise.resolve().then(() => bt(T)).then(() => {
5518
+ Xs(T), window.clearTimeout(Vn.current), Vn.current = window.setTimeout(() => Xs(null), 1600);
5514
5519
  }).catch(() => {
5515
5520
  }).finally(() => Js(null)));
5516
5521
  }, children: [
5517
- Nt ? /* @__PURE__ */ i(at, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(le, { d: Ge.icon, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
5522
+ Nt ? /* @__PURE__ */ i(at, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: Ge.icon, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
5518
5523
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5519
- /* @__PURE__ */ i("div", { className: "srow__t", children: fe }),
5520
- /* @__PURE__ */ i("div", { className: "srow__s", children: _e })
5524
+ /* @__PURE__ */ i("div", { className: "srow__t", children: pe }),
5525
+ /* @__PURE__ */ i("div", { className: "srow__s", children: Ye })
5521
5526
  ] }),
5522
- /* @__PURE__ */ i(le, { d: ut ? X.check : X.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: ut ? "var(--brand)" : "var(--ink-62)" } })
5527
+ /* @__PURE__ */ i(oe, { d: ut ? J.check : J.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: ut ? "var(--brand)" : "var(--ink-62)" } })
5523
5528
  ] });
5524
5529
  }, ra = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
5525
5530
  " ",
5526
- /* @__PURE__ */ g("button", { type: "button", onClick: () => ie("main"), "aria-label": "Back", style: { position: "absolute", left: -6, top: "50%", transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", gap: 2, padding: "4px 6px 4px 0", border: 0, background: "none", color: "var(--ink-96)", fontFamily: "var(--vs-font-sans)", fontSize: 15, fontWeight: 600, letterSpacing: 0, lineHeight: 1, whiteSpace: "nowrap", cursor: "pointer" }, children: [
5527
- /* @__PURE__ */ i(le, { d: X.chevronLeft, size: 18, sw: 1.8 }),
5531
+ /* @__PURE__ */ g("button", { type: "button", onClick: () => re("main"), "aria-label": "Back", style: { position: "absolute", left: -6, top: "50%", transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", gap: 2, padding: "4px 6px 4px 0", border: 0, background: "none", color: "var(--ink-96)", fontFamily: "var(--vs-font-sans)", fontSize: 15, fontWeight: 600, letterSpacing: 0, lineHeight: 1, whiteSpace: "nowrap", cursor: "pointer" }, children: [
5532
+ /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 18, sw: 1.8 }),
5528
5533
  "Back"
5529
5534
  ] })
5530
- ] }), gn = /* @__PURE__ */ i(le, { d: X.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), ia = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[z], fn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, Wn = u ? /* @__PURE__ */ i($t, { open: j, onClose: () => S(!1), title: ia, titleNode: z === "main" ? void 0 : ra, doneLabel: Ut.done, kind: z === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(ls, { children: z === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5535
+ ] }), gn = /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), ia = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[z], fn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, Gn = u ? /* @__PURE__ */ i($t, { open: j, onClose: () => S(!1), title: ia, titleNode: z === "main" ? void 0 : ra, doneLabel: Ut.done, kind: z === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(us, { children: z === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5531
5536
  /* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: Rs.search }),
5532
5537
  Rs.list
5533
5538
  ] }) : z === "subs" ? /* @__PURE__ */ g("div", { style: fn, children: [
@@ -5536,7 +5541,7 @@ function Yc(t) {
5536
5541
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Show subtitles" }),
5537
5542
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Captions over the video" })
5538
5543
  ] }),
5539
- /* @__PURE__ */ i(pt, { checked: me, onChange: Le, label: "Show subtitles" })
5544
+ /* @__PURE__ */ i(pt, { checked: ye, onChange: Le, label: "Show subtitles" })
5540
5545
  ] }),
5541
5546
  /* @__PURE__ */ g("div", { className: "srow", children: [
5542
5547
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
@@ -5550,57 +5555,57 @@ function Yc(t) {
5550
5555
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Highlight words" }),
5551
5556
  /* @__PURE__ */ i("div", { className: "srow__s", children: "Follow each word as it is spoken" })
5552
5557
  ] }),
5553
- /* @__PURE__ */ i(pt, { checked: cn, onChange: (T) => Pe(T ? "on" : "off"), label: "Highlight words" })
5558
+ /* @__PURE__ */ i(pt, { checked: cn, onChange: (T) => Qe(T ? "on" : "off"), label: "Highlight words" })
5554
5559
  ] })
5555
5560
  ] }) : z === "audio" ? /* @__PURE__ */ g("div", { style: fn, children: [
5556
5561
  /* @__PURE__ */ g("div", { className: "srow", children: [
5557
5562
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5558
5563
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Translate audio" }),
5559
- /* @__PURE__ */ i("div", { className: "srow__s", children: ne ? Sn ? "Hear the translation read aloud instead of the original speech" : se.canSpeak ? "Not available right now" : "Not available in this language" : "Pick a language to hear the translation read aloud" })
5564
+ /* @__PURE__ */ i("div", { className: "srow__s", children: ne ? En ? "Hear the translation read aloud instead of the original speech" : se.canSpeak ? "Not available right now" : "Not available in this language" : "Pick a language to hear the translation read aloud" })
5560
5565
  ] }),
5561
- /* @__PURE__ */ i(pt, { checked: Un, onChange: $e, label: "Translate audio", disabled: !Sn || !ne })
5566
+ /* @__PURE__ */ i(pt, { checked: Pn, onChange: Be, label: "Translate audio", disabled: !En || !ne })
5562
5567
  ] }),
5563
- Un && se.hasClone && /* @__PURE__ */ g("div", { className: "srow", children: [
5568
+ Pn && se.hasClone && /* @__PURE__ */ g("div", { className: "srow", children: [
5564
5569
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5565
5570
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Voices" }),
5566
- /* @__PURE__ */ i("div", { className: "srow__s", children: Ce ? "Each speaker in their own cloned voice" : "Synthetic voices matched to each speaker" })
5571
+ /* @__PURE__ */ i("div", { className: "srow__s", children: Oe ? "Each speaker in their own cloned voice" : "Synthetic voices matched to each speaker" })
5567
5572
  ] }),
5568
- /* @__PURE__ */ i(os, { value: Ce ? "clone" : "stock", onChange: (T) => G(T === "clone"), size: "sm", options: [{ value: "stock", label: "Synthetic" }, { value: "clone", label: "Cloned" }] })
5573
+ /* @__PURE__ */ i(cs, { value: Oe ? "clone" : "stock", onChange: (T) => G(T === "clone"), size: "sm", options: [{ value: "stock", label: "Synthetic" }, { value: "clone", label: "Cloned" }] })
5569
5574
  ] }),
5570
5575
  /* @__PURE__ */ g("div", { className: "srow", children: [
5571
5576
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5572
- /* @__PURE__ */ i("div", { className: "srow__t", children: kn }),
5573
- /* @__PURE__ */ i("div", { className: "srow__s", children: Wa(B, _n, "video", se.on ? 0 : En.untilS) })
5577
+ /* @__PURE__ */ i("div", { className: "srow__t", children: jn }),
5578
+ /* @__PURE__ */ i("div", { className: "srow__s", children: Wa(B, Rn, "video", se.on ? 0 : _n.untilS) })
5574
5579
  ] }),
5575
- /* @__PURE__ */ i(pt, { checked: B && ht, onChange: te, label: kn, disabled: !ht || _n === "unavailable" && !B })
5580
+ /* @__PURE__ */ i(pt, { checked: B && ht, onChange: X, label: jn, disabled: !ht || Rn === "unavailable" && !B })
5576
5581
  ] })
5577
5582
  ] }) : z === "export" ? /* @__PURE__ */ g("div", { style: fn, children: [
5578
5583
  rr("srt", "Subtitles", "SRT / VTT caption cues, ready for a video editor or a player"),
5579
5584
  rr("pdf", "PDF", "Formatted transcript in paragraphs, with timestamps and speaker labels")
5580
5585
  ] }) : /* @__PURE__ */ i("div", { style: fn, children: [
5581
- Ye.can && R.language && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => ie("lang"), children: [
5586
+ Ee.can && R.language && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => re("lang"), children: [
5582
5587
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5583
5588
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Language" }),
5584
- /* @__PURE__ */ i("div", { className: "srow__s", children: ne ? `Translated to ${Ye.label ?? ne.toUpperCase()}` : "Original language" })
5589
+ /* @__PURE__ */ i("div", { className: "srow__s", children: ne ? `Translated to ${Ee.label ?? ne.toUpperCase()}` : "Original language" })
5585
5590
  ] }),
5586
- /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ye.flag }),
5591
+ /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ee.flag }),
5587
5592
  gn
5588
5593
  ] }, "lang"),
5589
- R.subtitles && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => ie("subs"), children: [
5594
+ R.subtitles && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => re("subs"), children: [
5590
5595
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5591
5596
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Subtitles" }),
5592
- /* @__PURE__ */ i("div", { className: "srow__s", children: me ? "On · speaker labels and word highlighting" : "Off" })
5597
+ /* @__PURE__ */ i("div", { className: "srow__s", children: ye ? "On · speaker labels and word highlighting" : "Off" })
5593
5598
  ] }),
5594
5599
  gn
5595
5600
  ] }, "subs"),
5596
- R.audio && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => ie("audio"), children: [
5601
+ R.audio && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => re("audio"), children: [
5597
5602
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5598
5603
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Audio" }),
5599
5604
  /* @__PURE__ */ i("div", { className: "srow__s", children: Fi })
5600
5605
  ] }),
5601
5606
  gn
5602
5607
  ] }, "audio"),
5603
- R.export && Ct && !!P && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => ie("export"), children: [
5608
+ R.export && Ct && !!P && /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => re("export"), children: [
5604
5609
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5605
5610
  /* @__PURE__ */ g("div", { className: "srow__t", children: [
5606
5611
  "Export",
@@ -5610,23 +5615,23 @@ function Yc(t) {
5610
5615
  ] }),
5611
5616
  gn
5612
5617
  ] }, "export")
5613
- ].filter(Boolean).flatMap((T, fe) => fe ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${fe}`), T] : [T]) }) }) }) : /* @__PURE__ */ i($t, { open: j, onClose: () => S(!1), title: Ut.settings, doneLabel: Ut.done, drawer: r, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5614
- Ye.can && /* @__PURE__ */ g(Ue, { children: [
5618
+ ].filter(Boolean).flatMap((T, pe) => pe ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${pe}`), T] : [T]) }) }) }) : /* @__PURE__ */ i($t, { open: j, onClose: () => S(!1), title: Ut.settings, doneLabel: Ut.done, drawer: r, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5619
+ Ee.can && /* @__PURE__ */ g(_e, { children: [
5615
5620
  /* @__PURE__ */ g("div", { className: "srow srow--tap", onClick: () => {
5616
- S(!1), Ye.onClick();
5621
+ S(!1), Ee.onClick();
5617
5622
  }, children: [
5618
5623
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5619
5624
  /* @__PURE__ */ i("div", { className: "srow__t", children: Ut.langLabel }),
5620
5625
  /* @__PURE__ */ i("div", { className: "srow__s", children: Ut.langCount })
5621
5626
  ] }),
5622
- /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ye.flag }),
5623
- se.original ? null : /* @__PURE__ */ i("span", { style: { fontSize: 14, fontWeight: 600, color: "var(--ink-96)" }, children: Ye.label }),
5624
- /* @__PURE__ */ i(le, { d: X.chevronRight, size: 15, style: { color: "var(--ink-45)" } })
5627
+ /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ee.flag }),
5628
+ se.original ? null : /* @__PURE__ */ i("span", { style: { fontSize: 14, fontWeight: 600, color: "var(--ink-96)" }, children: Ee.label }),
5629
+ /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 15, style: { color: "var(--ink-45)" } })
5625
5630
  ] }),
5626
5631
  /* @__PURE__ */ i("div", { className: "sdiv" })
5627
5632
  ] }),
5628
5633
  t.settingsExtra
5629
- ] }) }), It = V && Dt && Re && /* @__PURE__ */ i(
5634
+ ] }) }), It = V && Dt && Pe && /* @__PURE__ */ i(
5630
5635
  Ai,
5631
5636
  {
5632
5637
  page: (t.layout ?? "embed") === "page",
@@ -5634,17 +5639,17 @@ function Yc(t) {
5634
5639
  title: Ke,
5635
5640
  desk: r,
5636
5641
  pos: _s,
5637
- mute: { muted: x.muted, onToggle: bn },
5638
- cc: R.subtitles ? { on: me, onToggle: () => Le((T) => !T) } : void 0,
5642
+ mute: { muted: x.muted, onToggle: Dn },
5643
+ cc: R.subtitles ? { on: ye, onToggle: () => Le((T) => !T) } : void 0,
5639
5644
  noFull: !R.fullscreen,
5640
5645
  ad: nn,
5641
- wait: tt && !An ? /* @__PURE__ */ i(fc, { state: tt, line: on ? Zs.map((T) => T.t + T.sp).join("") : null, onRetry: Gi, onOriginal: Zi }) : x.edgeWait ? `Transcribing ${Math.round(U)}% — it plays on as more is written` : null,
5642
- pct: Ae ? Math.round(U) : null,
5643
- sub: me && et ? { who: Mn ? Os(H, et.speaker) : null, color: Mn ? Mn.fg ?? `var(--lane-${Mn.lane})` : "#fff", words: Zs, cursor: qr(x, x.idx, ln) } : null,
5644
- chip: Pn(r ? Rn : { ...Rn, width: 64, padding: "0 6px" }, r ? void 0 : "sm"),
5646
+ wait: tt && !Yn ? /* @__PURE__ */ i(fc, { state: tt, line: on ? Zs.map((T) => T.t + T.sp).join("") : null, onRetry: Gi, onOriginal: Zi }) : x.edgeWait ? `Transcribing ${Math.round(U)}% — it plays on as more is written` : null,
5647
+ pct: je ? Math.round(U) : null,
5648
+ sub: ye && et ? { who: Mn ? Os(H, et.speaker) : null, color: Mn ? Mn.fg ?? `var(--lane-${Mn.lane})` : "#fff", words: Zs, cursor: qr(x, x.idx, ln) } : null,
5649
+ chip: $n(r ? Qn : { ...Qn, width: 64, padding: "0 6px" }, r ? void 0 : "sm"),
5645
5650
  transport: $s,
5646
5651
  picker: se.sheets,
5647
- sheet: u ? Wn : null,
5652
+ sheet: u ? Gn : null,
5648
5653
  voices: null,
5649
5654
  voicesBtn: u ? null : Bs,
5650
5655
  sheetOpen: se.sheetsOpen || j,
@@ -5655,20 +5660,20 @@ function Yc(t) {
5655
5660
  compact: !!t.compact,
5656
5661
  paused: { title: Ke, summary: ft.state === "ready" ? ft.summary ?? null : null, share: R.share && (t.shareUrl || !t.onShare) ? { url: er, at: x.t } : null },
5657
5662
  copied: ea ? /* @__PURE__ */ g("div", { className: "gfull__toast", "aria-live": "polite", children: [
5658
- /* @__PURE__ */ i(le, { d: X.check, size: 13, sw: 2 }),
5663
+ /* @__PURE__ */ i(oe, { d: J.check, size: 13, sw: 2 }),
5659
5664
  "Link copied"
5660
5665
  ] }) : Wt ? /* @__PURE__ */ g("div", { className: "gfull__toast gfull__soundtip", "aria-live": "polite", children: [
5661
- /* @__PURE__ */ i(le, { d: X.volumeOff, size: 14, sw: 1.8 }),
5666
+ /* @__PURE__ */ i(oe, { d: J.volumeOff, size: 14, sw: 1.8 }),
5662
5667
  "Tap for sound"
5663
5668
  ] }) : Us ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5664
5669
  /* @__PURE__ */ i(at, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5665
5670
  Us
5666
- ] }) : se.on && (He ? vt.missing != null : x.silent) ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5671
+ ] }) : se.on && (Ve ? vt.missing != null : x.silent) ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5667
5672
  /* @__PURE__ */ i(at, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
5668
5673
  `${an || "Translated"} voice is still being prepared · playing with subtitles`
5669
5674
  ] }) : null,
5670
5675
  onTouch: () => {
5671
- Kt(!0), Cn();
5676
+ Kt(!0), xn();
5672
5677
  },
5673
5678
  onClose: u ? void 0 : () => {
5674
5679
  Kt(!1), C(!1);
@@ -5678,7 +5683,7 @@ function Yc(t) {
5678
5683
  _(() => {
5679
5684
  !u && V && !Dt && (Kt(!1), C(!1));
5680
5685
  }, [u, V, Dt]);
5681
- const ir = Ae && /* @__PURE__ */ g("div", { className: `pubprog${r ? " pubprog--desk" : ""}${w ? " pubprog--find" : ""}`, children: [
5686
+ const ir = je && /* @__PURE__ */ g("div", { className: `pubprog${r ? " pubprog--desk" : ""}${w ? " pubprog--find" : ""}`, children: [
5682
5687
  /* @__PURE__ */ g("div", { className: "pubprog__row", children: [
5683
5688
  /* @__PURE__ */ i("span", { className: "l", children: `TRANSCRIBING ${U}%` }),
5684
5689
  !r && /* @__PURE__ */ i("div", { style: { flex: 1 } }),
@@ -5686,93 +5691,93 @@ function Yc(t) {
5686
5691
  /* @__PURE__ */ i("span", { className: "s", children: rt })
5687
5692
  ] }),
5688
5693
  !r && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
5689
- ] }), Fn = s && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), ar = /* @__PURE__ */ i(ql, { model: H, rows: ge, player: x, tail: ct, tailFg: Ht, running: Ae, desk: r, feedRef: it, listener: !0, showLabels: un, find: m, findOpen: !r && w, lang: Se, warm: Gt, onVisible: We, wordHl: cn }), Gn = /* @__PURE__ */ i(Jo, { error: h ?? Ne ?? (Dn && V ? null : x.error) ?? se.error, onClose: () => {
5690
- M(null), Z(), x.clearError(), se.clearError();
5691
- } }), or = [F ? Lt(F) : null, J ? J.toUpperCase() : null, he || "Read-only copy"].filter(Boolean).join(" · "), lr = (T) => /* @__PURE__ */ i("div", { className: "ctrans", children: se.noVoice ? se.noVoiceNote : /* @__PURE__ */ g(Ue, { children: [
5694
+ ] }), Zn = s && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), ar = /* @__PURE__ */ i(ql, { model: H, rows: ge, player: x, tail: ct, tailFg: Ht, running: je, desk: r, feedRef: it, listener: !0, showLabels: un, find: m, findOpen: !r && w, lang: De, warm: Gt, onVisible: Fe, wordHl: cn }), qn = /* @__PURE__ */ i(Jo, { error: h ?? me ?? (An && V ? null : x.error) ?? se.error, onClose: () => {
5695
+ M(null), q(), x.clearError(), se.clearError();
5696
+ } }), or = [F ? Lt(F) : null, ee ? ee.toUpperCase() : null, Me || "Read-only copy"].filter(Boolean).join(" · "), lr = (T) => /* @__PURE__ */ i("div", { className: "ctrans", children: se.noVoice ? se.noVoiceNote : /* @__PURE__ */ g(_e, { children: [
5692
5697
  /* @__PURE__ */ g("div", { className: "ctrans__row", children: [
5693
5698
  /* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
5694
5699
  /* @__PURE__ */ g("div", { className: "ctrans__mid", children: [
5695
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: x.idx <= 0 ? 0.3 : 1 }, onClick: x.prev, children: /* @__PURE__ */ i(le, { d: X.chevronLeft, size: 16, sw: 1.8 }) }),
5700
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: x.idx <= 0 ? 0.3 : 1 }, onClick: x.prev, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 16, sw: 1.8 }) }),
5696
5701
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": se.relang ? "Preparing audio" : x.playing ? "Pause" : "Play", title: se.relang ? "Preparing audio…" : se.playTitle ?? (x.playing ? "Pause" : "Play"), disabled: !jt, onClick: x.toggle, children: se.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: x.playing ? void 0 : { marginLeft: 2 }, children: x.playing ? El : Yl }) }),
5697
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: x.idx >= ge.length - 1 ? 0.3 : 1 }, onClick: x.next, children: /* @__PURE__ */ i(le, { d: X.chevronRight, size: 16, sw: 1.8 }) })
5702
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: x.idx >= ge.length - 1 ? 0.3 : 1 }, onClick: x.next, children: /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 16, sw: 1.8 }) })
5698
5703
  ] }),
5699
5704
  /* @__PURE__ */ i("span", { className: "ctrans__mute", children: rn(36) })
5700
5705
  ] }),
5701
5706
  /* @__PURE__ */ i("div", { className: "ctrans__scrub", children: $i(T) })
5702
5707
  ] }) }), aa = vl("ga", { tabs: Rt, cur: p, pref: (Ar = Rt[0]) == null ? void 0 : Ar.key, onPick: N }), cr = Math.max(0, Math.min(100, Math.round(U))), oa = Y && /* @__PURE__ */ g("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
5703
- Re && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Re}/hqdefault.jpg)` } }),
5704
- /* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(Ue, { children: [
5708
+ Pe && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Pe}/hqdefault.jpg)` } }),
5709
+ /* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ g(_e, { children: [
5705
5710
  Ke && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: Ke }),
5706
- /* @__PURE__ */ i("div", { className: "gfull__holdpct", children: ve === "transcribing" ? `${cr}%` : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin" }) }),
5707
- /* @__PURE__ */ i("div", { className: "gfull__holdbar", children: /* @__PURE__ */ i("div", { style: { width: `${ve === "transcribing" ? cr : 0}%` } }) }),
5711
+ /* @__PURE__ */ i("div", { className: "gfull__holdpct", children: Ne === "transcribing" ? `${cr}%` : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin" }) }),
5712
+ /* @__PURE__ */ i("div", { className: "gfull__holdbar", children: /* @__PURE__ */ i("div", { style: { width: `${Ne === "transcribing" ? cr : 0}%` } }) }),
5708
5713
  /* @__PURE__ */ g("div", { className: "gfull__holds", children: [
5709
- ve === "transcribing" ? "Transcribing" : ve === "cropping" ? "Preparing the video" : "Waiting to start",
5710
- ve === "transcribing" && (re != null && re.segmentsDone) ? ` · ${rt.toLowerCase()}` : ""
5714
+ Ne === "transcribing" ? "Transcribing" : Ne === "cropping" ? "Preparing the video" : "Waiting to start",
5715
+ Ne === "transcribing" && (ie != null && ie.segmentsDone) ? ` · ${rt.toLowerCase()}` : ""
5711
5716
  ] }),
5712
5717
  /* @__PURE__ */ i("div", { className: "gfull__holdn", children: "The video starts as soon as the first lines are transcribed." })
5713
5718
  ] }) : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) })
5714
- ] }), ur = u && n && (Ae || ve === "cropping") ? Math.max(0, Math.min(100, Math.round(U))) : null, Nn = v(t.onProgress);
5719
+ ] }), ur = u && n && (je || Ne === "cropping") ? Math.max(0, Math.min(100, Math.round(U))) : null, Nn = v(t.onProgress);
5715
5720
  Nn.current = t.onProgress, _(() => {
5716
5721
  var T;
5717
5722
  (T = Nn.current) == null || T.call(Nn, ur);
5718
5723
  }, [ur]);
5719
- const [la, Zn] = I(!1), qn = !!It && !Y && (He ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5724
+ const [la, Kn] = I(!1), Jn = !!It && !Y && (Ve ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5720
5725
  _(() => {
5721
- qn || Zn(!1);
5722
- }, [qn]);
5723
- const ca = t.endCard !== !1 && qn && !la && /* @__PURE__ */ i(kc, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => Zn(!0), onReplay: () => {
5724
- Zn(!0), Je.current = !0, x.seekFrac ? x.seekFrac(0) : x.seekRow(0), x.playing || x.toggle();
5726
+ Jn || Kn(!1);
5727
+ }, [Jn]);
5728
+ const ca = t.endCard !== !1 && Jn && !la && /* @__PURE__ */ i(kc, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => Kn(!0), onReplay: () => {
5729
+ Kn(!0), Je.current = !0, x.seekFrac ? x.seekFrac(0) : x.seekRow(0), x.playing || x.toggle();
5725
5730
  } });
5726
- if (u) return /* @__PURE__ */ g(Ue, { children: [
5727
- s ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: Fn }) : oa || It || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
5731
+ if (u) return /* @__PURE__ */ g(_e, { children: [
5732
+ s ? /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark", children: Zn }) : oa || It || /* @__PURE__ */ i("div", { className: "gfull", "data-theme": "dark" }),
5728
5733
  ca,
5729
- Gn
5734
+ qn
5730
5735
  ] });
5731
5736
  if (r) {
5732
- const T = xn && !Dt && !s && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: lr(!0) }), fe = !s && (Rt.length > 0 || Dt || !!se.sidePanel || !!T);
5733
- return /* @__PURE__ */ g(Ue, { children: [
5737
+ const T = Sn && !Dt && !s && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: lr(!0) }), pe = !s && (Rt.length > 0 || Dt || !!se.sidePanel || !!T);
5738
+ return /* @__PURE__ */ g(_e, { children: [
5734
5739
  /* @__PURE__ */ i("div", { className: "dhead dhead--listener dhead--cols", children: /* @__PURE__ */ g("div", { className: "gcolhead", children: [
5735
5740
  /* @__PURE__ */ i("div", { className: "gcolhead__main", children: /* @__PURE__ */ g("div", { className: "gcolhead__col", children: [
5736
- /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(jn, { dark: a, height: 20.38 }) }),
5741
+ /* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(In, { dark: a, height: 20.38 }) }),
5737
5742
  !s && /* @__PURE__ */ g("div", { className: "dhead__session", children: [
5738
5743
  /* @__PURE__ */ i("span", { className: "t", children: n ? Ke : "" }),
5739
5744
  /* @__PURE__ */ i("span", { className: "s", children: n ? or : "" })
5740
5745
  ] })
5741
5746
  ] }) }),
5742
- fe && /* @__PURE__ */ i("div", { className: "gcolhead__side" })
5747
+ pe && /* @__PURE__ */ i("div", { className: "gcolhead__side" })
5743
5748
  ] }) }),
5744
5749
  /* @__PURE__ */ g("div", { className: "listenerlive listenerlive--cols listenerlive--pub", children: [
5745
5750
  /* @__PURE__ */ g("div", { className: "listenerlive__main", children: [
5746
- Fn,
5751
+ Zn,
5747
5752
  !s && tn,
5748
5753
  ir,
5749
5754
  O && /* @__PURE__ */ i("div", { className: "pubflash", children: O }),
5750
5755
  !s && /* @__PURE__ */ i("div", { className: "listenerlive__inner", style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", marginTop: 6 }, children: ar }),
5751
5756
  !s && /* @__PURE__ */ g("div", { className: "listenerlive__inner gdeskbar", "data-transport": "1", children: [
5752
- Ye.can && /* @__PURE__ */ i("span", { className: "barchip", style: Ye.active ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)", borderRadius: 12 } : void 0, children: /* @__PURE__ */ i(Ln, { flag: Ye.flag, code: Ye.code, label: Ye.label, bordered: !1, onClick: Ye.onClick }) }),
5757
+ Ee.can && /* @__PURE__ */ i("span", { className: "barchip", style: Ee.active ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)", borderRadius: 12 } : void 0, children: /* @__PURE__ */ i(vn, { flag: Ee.flag, code: Ee.code, label: Ee.label, bordered: !1, onClick: Ee.onClick }) }),
5753
5758
  Es
5754
5759
  ] })
5755
5760
  ] }),
5756
- fe && /* @__PURE__ */ g(Il, { id: "ga", className: "listenerside", gap: 20, plain: !0, children: [
5761
+ pe && /* @__PURE__ */ g(Il, { id: "ga", className: "listenerside", gap: 20, plain: !0, children: [
5757
5762
  !se.sidePanel && T,
5758
5763
  !se.sidePanel && Vs,
5759
- !se.sidePanel && Rt.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i(jl, { col: aa, order: ["summary", "export"], onPick: N, grip: { summary: 40, export: 28 }, render: (_e) => /* @__PURE__ */ i(Er, { panel: !0, children: Ys(_e) }) }) }),
5764
+ !se.sidePanel && Rt.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i(jl, { col: aa, order: ["summary", "export"], onPick: N, grip: { summary: 40, export: 28 }, render: (Ye) => /* @__PURE__ */ i(Er, { panel: !0, children: Ys(Ye) }) }) }),
5760
5765
  se.sidePanel
5761
5766
  ] })
5762
5767
  ] }),
5763
5768
  !It && se.sheets,
5764
- !(u && It) && Wn,
5769
+ !(u && It) && Gn,
5765
5770
  It,
5766
- Gn
5771
+ qn
5767
5772
  ] });
5768
5773
  }
5769
5774
  const ua = Rt.length > 0 && !w && /* @__PURE__ */ i("div", { className: "txwidget", children: /* @__PURE__ */ g(Er, { panel: !0, children: [
5770
5775
  /* @__PURE__ */ i(Oi, { tabs: Rt, current: p, onPick: N, gap: p !== "none" }),
5771
5776
  p !== "none" && Ys(p)
5772
5777
  ] }) });
5773
- return /* @__PURE__ */ g(Ue, { children: [
5778
+ return /* @__PURE__ */ g(_e, { children: [
5774
5779
  /* @__PURE__ */ i(cc, { dark: a, title: n ? Ke : "", subline: n ? or : "", onOptions: () => S(!0), optionsActive: j }),
5775
- Fn,
5780
+ Zn,
5776
5781
  ir,
5777
5782
  !s && ua,
5778
5783
  !s && Vs,
@@ -5782,16 +5787,16 @@ function Yc(t) {
5782
5787
  O && /* @__PURE__ */ i("div", { className: "txflash", children: O })
5783
5788
  ] }),
5784
5789
  !s && /* @__PURE__ */ g("div", { className: "gbottom", "data-transport": "1", children: [
5785
- xn && !Dt && /* @__PURE__ */ i("div", { className: "pubctl", children: lr(!1) }),
5790
+ Sn && !Dt && /* @__PURE__ */ i("div", { className: "pubctl", children: lr(!1) }),
5786
5791
  /* @__PURE__ */ g("div", { className: "gbottom__bar", children: [
5787
- Ye.can && /* @__PURE__ */ i("div", { style: { flex: "none" }, children: Pn({ width: 87 }, void 0) }),
5792
+ Ee.can && /* @__PURE__ */ i("div", { style: { flex: "none" }, children: $n({ width: 87 }, void 0) }),
5788
5793
  /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: Es })
5789
5794
  ] })
5790
5795
  ] }),
5791
5796
  !It && se.sheets,
5792
- !(u && It) && Wn,
5797
+ !(u && It) && Gn,
5793
5798
  It,
5794
- Gn
5799
+ qn
5795
5800
  ] });
5796
5801
  }
5797
5802
  export {
@@ -5805,7 +5810,7 @@ export {
5805
5810
  Gl as PUB_SIDE,
5806
5811
  Vc as PanelSeek,
5807
5812
  Oo as PlayerApiProvider,
5808
- kn as REMOVE_BG_LABEL,
5813
+ jn as REMOVE_BG_LABEL,
5809
5814
  Ha as REMOVE_BG_NOTE,
5810
5815
  Xo as ReplayScrub,
5811
5816
  ol as SpeakerCast,
@@ -5820,7 +5825,7 @@ export {
5820
5825
  Kt as browserFull,
5821
5826
  St as lineEnd,
5822
5827
  bi as lineWords,
5823
- rs as pictureT,
5828
+ as as pictureT,
5824
5829
  Tn as placePosition,
5825
5830
  wn as realFull,
5826
5831
  Bc as setErrorReporter,