@vocalstack/player 0.1.0-alpha.26 → 0.1.0-alpha.28
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 +421 -412
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var da = Object.defineProperty;
|
|
|
2
2
|
var ha = (t, e, n) => e in t ? da(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var Me = (t, e, n) => ha(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
4
|
import { jsx as i, jsxs as h, Fragment as xe } from "react/jsx-runtime";
|
|
5
|
-
import { useState as
|
|
5
|
+
import { useState as z, useRef as v, useEffect as U, useLayoutEffect as Bt, createContext as ni, useMemo as Ie, useContext as Ma, useCallback as Ke, Fragment as ga, forwardRef as fa, useImperativeHandle as pa } from "react";
|
|
6
6
|
import { createPortal as Na } from "react-dom";
|
|
7
7
|
import { VocalStackError as ri, VocalStack as si } from "@vocalstack/js-sdk";
|
|
8
8
|
const ii = "https://vocalstack.com", ma = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDUxLjY5MDciIGhlaWdodD0iMTU1LjMwNjQxIiB2aWV3Qm94PSIwIDAgMTA1MS42OTA2IDE1NS4zMDY0MSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMC44ODczNDc3MSwwLDAsMC44OTExODY4MiwtNDIuNzE2NjMsLTEyMy44NTM4OCkiPjxwYXRoIHN0eWxlPSJmaWxsOiM1NWFiZTU7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjAuMzcyOTYyIiBkPSJtIDE2NS43NDM2OSwzMTIuMzQ1MTQgYyAtMy42NTkwNCwtMC45NTg2MSAtNi44OTEzMSwtMy4zNTM0OCAtOS4yMTQ5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2h0PSI0Mi4wOTc2MjIiIHg9IjExOS43ODkyNCIgeT0iMTc2LjI1OTA5IiByeT0iNS42MTA0OTYiLz48L2c+PC9nPjwvc3ZnPg==";
|
|
@@ -55,7 +55,7 @@ const X = {
|
|
|
55
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
|
-
function
|
|
58
|
+
function va({ size: t = 15 }) {
|
|
59
59
|
return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ i("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2.5" }) });
|
|
60
60
|
}
|
|
61
61
|
function jr({ size: t = 13 }) {
|
|
@@ -80,7 +80,7 @@ function at({ size: t = 15, color: e = "currentColor", track: n = "rgba(127,127,
|
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ka({ size: t = 12 }) {
|
|
84
84
|
return /* @__PURE__ */ h("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "currentColor", "aria-hidden": "true", children: [
|
|
85
85
|
/* @__PURE__ */ i("rect", { x: "6.5", y: "5", width: "3.75", height: "14", rx: "1.2" }),
|
|
86
86
|
/* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
|
|
@@ -100,7 +100,7 @@ function Nt({ checked: t, onChange: e, label: n, disabled: r }) {
|
|
|
100
100
|
return /* @__PURE__ */ i("button", { type: "button", role: "switch", "aria-checked": t, "aria-label": n, className: "vs-toggle", disabled: r, onClick: () => e(!t), children: /* @__PURE__ */ i("span", { className: "vs-toggle__knob" }) });
|
|
101
101
|
}
|
|
102
102
|
function hr({ value: t, onChange: e, options: n, size: r, bordered: s = !0, fill: a }) {
|
|
103
|
-
const o = v(null), [l, c] =
|
|
103
|
+
const o = v(null), [l, c] = z(null), u = Math.max(0, n.findIndex((d) => d.value === t));
|
|
104
104
|
return Bt(() => {
|
|
105
105
|
const d = o.current;
|
|
106
106
|
if (!d) return;
|
|
@@ -136,7 +136,7 @@ function zn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bord
|
|
|
136
136
|
] });
|
|
137
137
|
}
|
|
138
138
|
function za({ value: t, label: e = "Copy", onCopied: n }) {
|
|
139
|
-
const [r, s] =
|
|
139
|
+
const [r, s] = z(!1), a = async () => {
|
|
140
140
|
try {
|
|
141
141
|
await navigator.clipboard.writeText(t), s(!0), n == null || n(), setTimeout(() => s(!1), 1400);
|
|
142
142
|
} catch {
|
|
@@ -178,7 +178,7 @@ function Ia(t, e) {
|
|
|
178
178
|
}, [t, e]);
|
|
179
179
|
}
|
|
180
180
|
function Mr({ children: t, ms: e = 220 }) {
|
|
181
|
-
const n = v(null), r = v(null), [s, a] =
|
|
181
|
+
const n = v(null), r = v(null), [s, a] = z(null);
|
|
182
182
|
return Bt(() => {
|
|
183
183
|
const o = r.current, l = n.current;
|
|
184
184
|
if (!o || !l) return;
|
|
@@ -933,7 +933,7 @@ function Mi(t, e) {
|
|
|
933
933
|
for (const n of Nr) n();
|
|
934
934
|
}
|
|
935
935
|
function Ir(t, e) {
|
|
936
|
-
const [n, r] =
|
|
936
|
+
const [n, r] = z(() => mr(t, e));
|
|
937
937
|
return U(() => {
|
|
938
938
|
const s = () => r(mr(t, e));
|
|
939
939
|
return Nr.add(s), window.addEventListener("storage", s), () => {
|
|
@@ -968,7 +968,7 @@ function Qa(t) {
|
|
|
968
968
|
return [typeof e == "number" && e > 0 ? e : t === "ga" ? 560 : Pa, n];
|
|
969
969
|
}
|
|
970
970
|
function Or({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPlaceholder: a = "Search languages", none: o, pinned: l = [], recent: c = [], requireVoice: u, keepOpen: d, busy: g }) {
|
|
971
|
-
const [M, N] =
|
|
971
|
+
const [M, N] = z(""), [p, y] = z(!1), [L, m] = z(null);
|
|
972
972
|
U(() => {
|
|
973
973
|
t && (N(""), y(!1), m(null));
|
|
974
974
|
}, [t]);
|
|
@@ -978,10 +978,10 @@ function Or({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
|
|
|
978
978
|
const re = l.indexOf(O.code), K = l.indexOf(S.code);
|
|
979
979
|
return re !== -1 || K !== -1 ? (re === -1 ? 999 : re) - (K === -1 ? 999 : K) : O.label.localeCompare(S.label);
|
|
980
980
|
});
|
|
981
|
-
}, [s, M, l]),
|
|
981
|
+
}, [s, M, l]), I = Ie(
|
|
982
982
|
() => M ? [] : c.map((E) => f.find((Q) => Q.code === E)).filter((E) => !!E).sort((E, Q) => E.label.localeCompare(Q.label)),
|
|
983
983
|
[c, f, M]
|
|
984
|
-
),
|
|
984
|
+
), b = Ie(() => I.length ? f.filter((E) => !I.some((Q) => Q.code === E.code)) : f, [f, I]), D = p || M ? b : b.slice(0, 12), V = b.length - D.length, _ = (E, Q = !1) => {
|
|
985
985
|
const T = !!u && !E.voice;
|
|
986
986
|
return /* @__PURE__ */ h(
|
|
987
987
|
"button",
|
|
@@ -1029,9 +1029,9 @@ function Or({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
|
|
|
1029
1029
|
/* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
|
|
1030
1030
|
/* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: X.check, size: 16, sw: 2.2 }) })
|
|
1031
1031
|
] }),
|
|
1032
|
-
|
|
1032
|
+
I.length > 0 && /* @__PURE__ */ h(xe, { children: [
|
|
1033
1033
|
/* @__PURE__ */ i("div", { className: "vs-picker__head", children: "RECENT" }),
|
|
1034
|
-
|
|
1034
|
+
I.map((E) => _(E, !0)),
|
|
1035
1035
|
/* @__PURE__ */ i("div", { className: "vs-picker__rule" })
|
|
1036
1036
|
] }),
|
|
1037
1037
|
D.map((E) => _(E)),
|
|
@@ -1119,7 +1119,7 @@ function rr(t) {
|
|
|
1119
1119
|
t && (t.pause(), t.removeAttribute("src"), t.load());
|
|
1120
1120
|
}
|
|
1121
1121
|
function pi(t, e) {
|
|
1122
|
-
const [n, r] =
|
|
1122
|
+
const [n, r] = z("off"), [s, a] = z([]), [o, l] = z(!1), c = v(null), u = v([null, null]), d = v([NaN, NaN]), g = v(0);
|
|
1123
1123
|
return U(() => {
|
|
1124
1124
|
if (a([]), l(!1), !t) {
|
|
1125
1125
|
r("off");
|
|
@@ -1167,8 +1167,8 @@ function pi(t, e) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
const p = eo(s, N, d.current, g.current);
|
|
1169
1169
|
for (const [m, f] of p.load) {
|
|
1170
|
-
let
|
|
1171
|
-
|
|
1170
|
+
let I = u.current[m];
|
|
1171
|
+
I || (I = new Audio(), I.preload = "auto", u.current[m] = I), I.pause(), I.src = s[f].url, d.current[m] = s[f].startS;
|
|
1172
1172
|
}
|
|
1173
1173
|
g.current = p.play;
|
|
1174
1174
|
const y = u.current[p.play], L = u.current[1 - p.play];
|
|
@@ -1222,7 +1222,7 @@ function lo(t) {
|
|
|
1222
1222
|
const c = /* @__PURE__ */ new Map();
|
|
1223
1223
|
for (const u of t.clips) c.set(u.sentenceId, [...c.get(u.sentenceId) ?? [], u]);
|
|
1224
1224
|
return c;
|
|
1225
|
-
}, [t.clips]), n = v(/* @__PURE__ */ new Map()), r = v(null), [s, a] =
|
|
1225
|
+
}, [t.clips]), n = v(/* @__PURE__ */ new Map()), r = v(null), [s, a] = z({ missing: null, sid: null }), o = (c) => {
|
|
1226
1226
|
let u = n.current.get(c);
|
|
1227
1227
|
return u || (u = new Audio(), u.preload = "auto", u.src = c, n.current.set(c, u)), u;
|
|
1228
1228
|
}, l = () => {
|
|
@@ -1627,7 +1627,7 @@ const Tn = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
|
|
1627
1627
|
function Lo(t) {
|
|
1628
1628
|
return Tn[(t % Tn.length + Tn.length) % Tn.length];
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function vo(t) {
|
|
1631
1631
|
if (t.numbers) return t.numbers;
|
|
1632
1632
|
const e = /* @__PURE__ */ new Map(), n = (a, o) => {
|
|
1633
1633
|
if (a < 0) return;
|
|
@@ -1643,12 +1643,12 @@ function ko(t) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
function On(t, e) {
|
|
1645
1645
|
if (e < 0) return 0;
|
|
1646
|
-
const n =
|
|
1646
|
+
const n = vo(t);
|
|
1647
1647
|
return n.get(e) ?? n.size + 1 + e;
|
|
1648
1648
|
}
|
|
1649
|
-
const
|
|
1649
|
+
const ko = /^\s*speaker\s+\d+\s*$/i;
|
|
1650
1650
|
function Qs(t) {
|
|
1651
|
-
return t && t.trim() && !
|
|
1651
|
+
return t && t.trim() && !ko.test(t) ? t : void 0;
|
|
1652
1652
|
}
|
|
1653
1653
|
function Ni(t, e) {
|
|
1654
1654
|
var n;
|
|
@@ -1786,7 +1786,7 @@ async function So(t, e) {
|
|
|
1786
1786
|
};
|
|
1787
1787
|
}
|
|
1788
1788
|
function Ao(t, e) {
|
|
1789
|
-
const [n, r] =
|
|
1789
|
+
const [n, r] = z(null), [s, a] = z(!1), [o, l] = z(null), [c, u] = z(0);
|
|
1790
1790
|
return U(() => {
|
|
1791
1791
|
let d = !0;
|
|
1792
1792
|
return So(t, e).then((g) => {
|
|
@@ -1801,7 +1801,7 @@ function Ao(t, e) {
|
|
|
1801
1801
|
}, [t, e, c]), { source: n, gone: s, error: o, reload: () => u((d) => d + 1) };
|
|
1802
1802
|
}
|
|
1803
1803
|
function Eo(t, e) {
|
|
1804
|
-
const [n, r] =
|
|
1804
|
+
const [n, r] = z(null);
|
|
1805
1805
|
return U(() => {
|
|
1806
1806
|
if (!t.owner || !e) {
|
|
1807
1807
|
r(null);
|
|
@@ -1835,7 +1835,7 @@ async function Bs(t, e, n = {}) {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
const ar = /* @__PURE__ */ new Map();
|
|
1837
1837
|
function Li() {
|
|
1838
|
-
const t = Et(), [e, n] =
|
|
1838
|
+
const t = Et(), [e, n] = z(ar.get(t.origin) ?? null);
|
|
1839
1839
|
return U(() => {
|
|
1840
1840
|
ar.has(t.origin) || t.client.languages.list().then((r) => {
|
|
1841
1841
|
ar.set(t.origin, r), n(r);
|
|
@@ -1843,8 +1843,8 @@ function Li() {
|
|
|
1843
1843
|
});
|
|
1844
1844
|
}, [t]), e;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1847
|
-
const [n, r] =
|
|
1846
|
+
function vi(t, e) {
|
|
1847
|
+
const [n, r] = z(null), [s, a] = z(null), [o, l] = z(0);
|
|
1848
1848
|
return U(() => {
|
|
1849
1849
|
let c = !0;
|
|
1850
1850
|
return t().then((u) => c && r(u)).catch((u) => c && a(Tt(u))), () => {
|
|
@@ -1856,7 +1856,7 @@ const _o = (t) => new Promise((e) => setTimeout(e, t)), Yo = 2500, Uo = 72;
|
|
|
1856
1856
|
function Ro(t, e) {
|
|
1857
1857
|
const n = Et(), r = v(n);
|
|
1858
1858
|
r.current = n;
|
|
1859
|
-
const [s, a] =
|
|
1859
|
+
const [s, a] = z($t), o = v($t()), l = v(null), c = v(e.lang ?? null), [u, d] = z(!1), [g, M] = z(null), [N, p] = z(!1), y = Ke(() => {
|
|
1860
1860
|
const Q = o.current;
|
|
1861
1861
|
a({ ...Q });
|
|
1862
1862
|
}, []), L = v(e);
|
|
@@ -1929,11 +1929,11 @@ function Ro(t, e) {
|
|
|
1929
1929
|
Q = !1, (K = l.current) == null || K.close(), l.current = null, d(!1);
|
|
1930
1930
|
};
|
|
1931
1931
|
}, [t, n, e.voice]);
|
|
1932
|
-
const [m, f] =
|
|
1932
|
+
const [m, f] = z(!1), [I, b] = z(null), D = v(0), [V, _] = z(null), ee = Ke((Q) => {
|
|
1933
1933
|
var re;
|
|
1934
1934
|
if (c.current = Q, (re = l.current) == null || re.setLanguage(Q), !t) return;
|
|
1935
1935
|
const T = r.current.client, O = ++D.current;
|
|
1936
|
-
f(!0),
|
|
1936
|
+
f(!0), b(null);
|
|
1937
1937
|
const S = (K) => T.recordings.transcript(t, { lang: Q ?? void 0, ...r.current.readAs, asListener: !r.current.owner }).then((k) => {
|
|
1938
1938
|
O === D.current && (o.current = sr(k, o.current), _(Q), y(), k.translationPending && K > 0 && window.setTimeout(() => {
|
|
1939
1939
|
O === D.current && S(K - 1).catch(() => {
|
|
@@ -1941,7 +1941,7 @@ function Ro(t, e) {
|
|
|
1941
1941
|
}, Yo));
|
|
1942
1942
|
});
|
|
1943
1943
|
S(Uo).catch(() => {
|
|
1944
|
-
O === D.current && Q &&
|
|
1944
|
+
O === D.current && Q && b(Q);
|
|
1945
1945
|
}).finally(() => {
|
|
1946
1946
|
O === D.current && f(!1);
|
|
1947
1947
|
});
|
|
@@ -1954,7 +1954,7 @@ function Ro(t, e) {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
S && y();
|
|
1956
1956
|
}, [y]), E = Ke(() => M(null), []);
|
|
1957
|
-
return { model: s, connected: u, error: g, notFound: N, clearError: E, setLanguage: ee, mergeTranslations: j, translating: m, translateFailed:
|
|
1957
|
+
return { model: s, connected: u, error: g, notFound: N, clearError: E, setLanguage: ee, mergeTranslations: j, translating: m, translateFailed: I, shownLang: V };
|
|
1958
1958
|
}
|
|
1959
1959
|
const Vs = {
|
|
1960
1960
|
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" },
|
|
@@ -1964,7 +1964,7 @@ const Vs = {
|
|
|
1964
1964
|
Romanian: { vcFor: "Vocea pentru", vcMute: "Oprește", vcUnmute: "Pornește", vcMuted: "OPRIT", vcShared: "Folosită și de", vcUsedBy: "Folosită de", vcUnknownSpk: "Necunoscut", vcUse: "Folosește această voce", vcGetting: "Se descarcă…", vcSample: "Așa sună această voce.", vcPreview: "MOSTRĂ", vcMale: "Bărbat", vcFemale: "Femeie", vcSynth: "SINTETICĂ", origAudio: "AUDIO ORIGINAL", vcCloned: "VOCI", vcBadge: "CLONATĂ", vcNone: "DOAR TEXT", vcNoVoice: "Nicio voce pentru ", vcSheet: "VOCE", vcNeutral: "VOCE SINTETICĂ", vcWarm: "VOCE SINTETICĂ", searchPlaceholder: "Caută în transmisiune", noise: "Sunet neclar", newLines: "noi", live: "ÎN DIRECT", ended: "ÎNCHEIAT", waiting: "ÎN AȘTEPTARE", corrected: "CORECTAT", hostLine: "Prezentat de Marcus Reed · 4 vorbitori", langLabel: "LIMBĂ", langCount: "100+ de limbi", read: "Citește", listen: "Ascultă", watch: "Vizionează", waitTitle: "Transmisiunea nu a început încă", waitBody: "Transcrierea va apărea aici imediat ce gazda începe să vorbească.", english: "ENGLEZĂ", playing: "Se redă traducerea în română", ready: "Atinge pentru a porni audio", readyNote: "Reglează întâi volumul", voiceMeta: "VOCE NEUTRĂ", voice: "Voce", sheetTitle: "LIMBA APLICAȚIEI", done: "Gata", search: "Caută printre 100+ de limbi", sheetNote: "Urmărește transmisiunea în limba ta.", moreLangs: "în plus", confTitle: "Unele cuvinte nu s-au auzit clar", confBody: "Transcrierea marchează cuvintele incerte cu o subliniere întreruptă. Cuvintele își păstrează culoarea, doar sublinierea îți arată unde să te uiți.", confMid: "Ușoară nesiguranță — probabil corect", confHigh: "Încredere scăzută — poate fi greșit", settings: "TRANSMISIUNE", setOrig: "Arată limba originală", setTheme: "Aspect", light: "Luminos", dark: "Întunecat", setConf: "Arată cuvintele incerte", setConfHint1: "Colorează cuvintele incerte — ", setConfMid: "galben", setConfSep: " sau ", setConfLow: "roșu", setConfHint2: "", behindLive: "LATENȚA TRADUCERII", behindNote: "Cu cât urmează traducerea vorbitorul în acest moment.", shareLabel: "LINK DE URMĂRIRE", copy: "Copiază", copied: "Copiat" },
|
|
1965
1965
|
Portuguese: { vcFor: "Voz de", vcMute: "Silenciar", vcUnmute: "Ativar", vcMuted: "SILENCIADO", vcShared: "Também usada por", vcUsedBy: "Usada por", vcUnknownSpk: "Desconhecido", vcUse: "Usar esta voz", vcGetting: "Baixando…", vcSample: "É assim que soa.", vcPreview: "AMOSTRA", vcMale: "Homem", vcFemale: "Mulher", vcSynth: "SINTÉTICA", origAudio: "ÁUDIO ORIGINAL", vcCloned: "VOZES", vcBadge: "CLONADA", vcNone: "SÓ TEXTO", vcNoVoice: "Sem voz para ", vcSheet: "VOZ", vcNeutral: "VOZ SINTÉTICA", vcWarm: "VOZ SINTÉTICA", searchPlaceholder: "Pesquisar nesta transmissão", noise: "Áudio pouco claro", newLines: "novas", live: "AO VIVO", ended: "ENCERRADA", waiting: "AGUARDANDO", corrected: "CORRIGIDO", hostLine: "Apresentado por Marcus Reed · 4 falantes", langLabel: "IDIOMA", langCount: "100+ idiomas", read: "Ler", listen: "Ouvir", watch: "Assistir", waitTitle: "A transmissão ainda não começou", waitBody: "A transcrição aparece aqui assim que o apresentador começar a falar.", english: "INGLÊS", playing: "Reproduzindo a tradução em português", ready: "Toque para iniciar o áudio", readyNote: "Ajuste o volume primeiro", voiceMeta: "VOZ NEUTRA", voice: "Voz", sheetTitle: "IDIOMA DO APP", done: "Concluído", search: "Pesquisar entre 100+ idiomas", sheetNote: "Acompanhe a transmissão no seu idioma.", moreLangs: "mais", confTitle: "Algumas palavras não foram bem ouvidas", confBody: "A transcrição marca as palavras duvidosas com um sublinhado tracejado. As palavras mantêm a sua cor, por isso só o sublinhado indica onde olhar.", confMid: "Pouca dúvida — provavelmente certa", confHigh: "Baixa confiança — pode estar errada", settings: "TRANSMISSÃO", setOrig: "Mostrar idioma original", setTheme: "Aparência", light: "Claro", dark: "Escuro", setConf: "Mostrar palavras duvidosas", setConfHint1: "Colore as palavras duvidosas: ", setConfMid: "âmbar", setConfSep: " ou ", setConfLow: "vermelho", setConfHint2: "", behindLive: "LATÊNCIA DE TRADUÇÃO", behindNote: "Quanto a tradução está atrás de quem fala agora.", shareLabel: "LINK PARA ACOMPANHAR", copy: "Copiar", copied: "Copiado" }
|
|
1966
1966
|
};
|
|
1967
|
-
function
|
|
1967
|
+
function ki(t) {
|
|
1968
1968
|
return t && Vs[t] || Vs.English;
|
|
1969
1969
|
}
|
|
1970
1970
|
async function ji(t) {
|
|
@@ -2116,7 +2116,7 @@ function qo(t, e, n = 0) {
|
|
|
2116
2116
|
a.style.pointerEvents = "auto", a.style.height = j.size + "px", a.style.transform = "translateY(" + Math.round(s.scrollTop / j.max * (j.vis - j.size)) + "px)", _ && p();
|
|
2117
2117
|
}, f = parseFloat(getComputedStyle(s).paddingRight) || 0;
|
|
2118
2118
|
a.style.right = (f >= 12 ? -(f - 6) : 2) + "px";
|
|
2119
|
-
const
|
|
2119
|
+
const I = () => m(!0), b = (_) => {
|
|
2120
2120
|
const ee = l();
|
|
2121
2121
|
ee.vis - ee.size <= 0 || (_.preventDefault(), _.stopPropagation(), a.setPointerCapture(_.pointerId), d = !0, g = _.clientY, M = s.scrollTop, a.style.cursor = "grabbing", p());
|
|
2122
2122
|
}, D = (_) => {
|
|
@@ -2126,9 +2126,9 @@ function qo(t, e, n = 0) {
|
|
|
2126
2126
|
}, V = () => {
|
|
2127
2127
|
d && (d = !1, a.style.cursor = "grab", p());
|
|
2128
2128
|
};
|
|
2129
|
-
return s.addEventListener("scroll",
|
|
2129
|
+
return s.addEventListener("scroll", I, { passive: !0 }), a.addEventListener("pointerdown", b), a.addEventListener("pointermove", D), a.addEventListener("pointerup", V), a.addEventListener("pointercancel", V), typeof ResizeObserver < "u" && (y = new ResizeObserver(() => m()), y.observe(s)), r.current = () => m(), m(), () => {
|
|
2130
2130
|
r.current = () => {
|
|
2131
|
-
}, s.removeEventListener("scroll",
|
|
2131
|
+
}, s.removeEventListener("scroll", I), a.removeEventListener("pointerdown", b), a.removeEventListener("pointermove", D), a.removeEventListener("pointerup", V), a.removeEventListener("pointercancel", V), y == null || y.disconnect(), clearTimeout(u);
|
|
2132
2132
|
};
|
|
2133
2133
|
}, []);
|
|
2134
2134
|
}
|
|
@@ -2176,7 +2176,7 @@ function Zc({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
|
|
|
2176
2176
|
] });
|
|
2177
2177
|
}
|
|
2178
2178
|
function Xo({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek: a, onSeekFrac: o, onScrubStart: l, onScrubEnd: c, frac: u, glideMs: d = 260 }) {
|
|
2179
|
-
const g = v(null), M = v(!1), [N, p] =
|
|
2179
|
+
const g = v(null), M = v(!1), [N, p] = z(null), y = Math.max(1, e), L = N ?? u, m = L != null ? Math.min(100, Math.max(0, L * 100)) : t / Math.max(1, y - 1) * 100, f = u != null && d > 0 && N == null ? `width ${d}ms linear, left ${d}ms linear` : "none", I = (D) => {
|
|
2180
2180
|
var j;
|
|
2181
2181
|
const V = (j = g.current) == null ? void 0 : j.getBoundingClientRect();
|
|
2182
2182
|
if (!V) return;
|
|
@@ -2187,7 +2187,7 @@ function Xo({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
|
|
|
2187
2187
|
}
|
|
2188
2188
|
const ee = Math.round(_ * (y - 1));
|
|
2189
2189
|
ee !== t && a(ee);
|
|
2190
|
-
},
|
|
2190
|
+
}, b = () => {
|
|
2191
2191
|
M.current && (M.current = !1, p(null), c == null || c());
|
|
2192
2192
|
};
|
|
2193
2193
|
return /* @__PURE__ */ h("div", { className: "rscrub", children: [
|
|
@@ -2198,13 +2198,13 @@ function Xo({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
|
|
|
2198
2198
|
className: "rscrub__track",
|
|
2199
2199
|
onPointerDown: (D) => {
|
|
2200
2200
|
var V;
|
|
2201
|
-
M.current = !0, (V = g.current) == null || V.setPointerCapture(D.pointerId), l == null || l(),
|
|
2201
|
+
M.current = !0, (V = g.current) == null || V.setPointerCapture(D.pointerId), l == null || l(), I(D), D.preventDefault();
|
|
2202
2202
|
},
|
|
2203
2203
|
onPointerMove: (D) => {
|
|
2204
|
-
M.current &&
|
|
2204
|
+
M.current && I(D);
|
|
2205
2205
|
},
|
|
2206
|
-
onPointerUp:
|
|
2207
|
-
onPointerCancel:
|
|
2206
|
+
onPointerUp: b,
|
|
2207
|
+
onPointerCancel: b,
|
|
2208
2208
|
children: [
|
|
2209
2209
|
/* @__PURE__ */ i("div", { className: "rscrub__rail" }),
|
|
2210
2210
|
/* @__PURE__ */ i("div", { className: "rscrub__fill", style: { width: `${m}%`, transition: f } }),
|
|
@@ -2241,7 +2241,7 @@ function tl({ f: t, desk: e, onOpen: n }) {
|
|
|
2241
2241
|
] });
|
|
2242
2242
|
}
|
|
2243
2243
|
function nl({ onOpen: t, alone: e }) {
|
|
2244
|
-
const [n, r] =
|
|
2244
|
+
const [n, r] = z(!1);
|
|
2245
2245
|
return /* @__PURE__ */ h("span", { role: "button", title: "Fix this line", className: `badge badge--pen${n ? " is-over" : ""}`, style: { marginLeft: e ? "auto" : 0 }, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), onClick: (s) => {
|
|
2246
2246
|
s.stopPropagation(), t();
|
|
2247
2247
|
}, children: [
|
|
@@ -2250,7 +2250,7 @@ function nl({ onOpen: t, alone: e }) {
|
|
|
2250
2250
|
] });
|
|
2251
2251
|
}
|
|
2252
2252
|
function rl(t, e, n, r) {
|
|
2253
|
-
const s = Et(), [a, o] =
|
|
2253
|
+
const s = Et(), [a, o] = z([]), [l, c] = z(0), u = v(/* @__PURE__ */ new Set()), d = v(!1), g = Ie(() => new Map(n.filter((N) => N.sentenceId != null).map((N) => [N.sentenceId, N])), [n]);
|
|
2254
2254
|
U(() => {
|
|
2255
2255
|
u.current = /* @__PURE__ */ new Set();
|
|
2256
2256
|
}, [t, e]);
|
|
@@ -2376,15 +2376,15 @@ function ol({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
|
|
|
2376
2376
|
}) }) : null;
|
|
2377
2377
|
}
|
|
2378
2378
|
function ll({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s = null, dlId: a = null, onPick: o, onAdd: l, onUse: c, usedBy: u, foldKey: d, foldFor: g = null, problem: M, noClone: N = null, t: p }) {
|
|
2379
|
-
const y = Ie(() => il(e, p), [e, p]), [L, m] =
|
|
2379
|
+
const y = Ie(() => il(e, p), [e, p]), [L, m] = z({});
|
|
2380
2380
|
U(() => {
|
|
2381
2381
|
m({});
|
|
2382
2382
|
}, [d, g]);
|
|
2383
|
-
const f = (D) => D === p.vcMale.toUpperCase() || D === p.vcFemale.toUpperCase(),
|
|
2383
|
+
const f = (D) => D === p.vcMale.toUpperCase() || D === p.vcFemale.toUpperCase(), I = (D) => {
|
|
2384
2384
|
if (D === p.vcSheet) return !0;
|
|
2385
2385
|
const V = L[D];
|
|
2386
2386
|
return V != null ? !V : !g || !f(D) ? !0 : D === (g === "female" ? p.vcFemale : p.vcMale).toUpperCase();
|
|
2387
|
-
},
|
|
2387
|
+
}, b = !!r && r !== n;
|
|
2388
2388
|
return /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
2389
2389
|
M && /* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
|
|
2390
2390
|
/* @__PURE__ */ i(oe, { d: X.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
|
|
@@ -2405,7 +2405,7 @@ function ll({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
2405
2405
|
] })
|
|
2406
2406
|
] }),
|
|
2407
2407
|
y.map(({ v: D, headOn: V, head: _, headCount: ee, rule: j }, E) => {
|
|
2408
|
-
const Q = sl(D), T = a === D.id, O =
|
|
2408
|
+
const Q = sl(D), T = a === D.id, O = I(_), S = (u == null ? void 0 : u(D)) ?? null;
|
|
2409
2409
|
return /* @__PURE__ */ h(ga, { children: [
|
|
2410
2410
|
V && _ === p.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: E === 0 && !N ? "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: _ }) }),
|
|
2411
2411
|
V && _ !== p.vcSheet && /* @__PURE__ */ h(
|
|
@@ -2413,7 +2413,7 @@ function ll({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
2413
2413
|
{
|
|
2414
2414
|
type: "button",
|
|
2415
2415
|
onClick: (re) => {
|
|
2416
|
-
re.stopPropagation(), m((K) => ({ ...K, [_]:
|
|
2416
|
+
re.stopPropagation(), m((K) => ({ ...K, [_]: I(_) }));
|
|
2417
2417
|
},
|
|
2418
2418
|
title: `${O ? "Hide " : "Show "}${_.toLowerCase()} voices`,
|
|
2419
2419
|
"aria-expanded": O,
|
|
@@ -2437,7 +2437,7 @@ function ll({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
2437
2437
|
children: [
|
|
2438
2438
|
/* @__PURE__ */ i("span", { title: T ? "Downloading this voice" : void 0, style: { flex: "none", width: 32, height: 32, borderRadius: "50%", background: T ? "transparent" : D.cloned ? "var(--brand-soft)" : "var(--fill-06)", display: "flex", alignItems: "center", justifyContent: "center" }, children: T ? /* @__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" } }) : s === D.id ? /* @__PURE__ */ h("span", { className: "vcplay", children: [
|
|
2439
2439
|
/* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(cl, { height: 13, width: 2.5 }) }),
|
|
2440
|
-
/* @__PURE__ */ i("span", { className: "vcplay__stop", children: /* @__PURE__ */ i(
|
|
2440
|
+
/* @__PURE__ */ i("span", { className: "vcplay__stop", children: /* @__PURE__ */ i(va, { size: 11 }) })
|
|
2441
2441
|
] }) : /* @__PURE__ */ i(oe, { d: D.cloned ? X.voiceClone : D.gender === "female" ? X.venus : D.gender === "male" ? X.mars : X.mic, size: 15, sw: 1.6, style: { color: D.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
|
|
2442
2442
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2443
2443
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 14.5, fontWeight: D.id === n ? 600 : 400, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: D.name }) }),
|
|
@@ -2462,7 +2462,7 @@ function ll({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
2462
2462
|
)
|
|
2463
2463
|
] }, D.id);
|
|
2464
2464
|
}),
|
|
2465
|
-
|
|
2465
|
+
b && /* @__PURE__ */ i("div", { style: { position: "sticky", bottom: 0, zIndex: 3, marginTop: 6, padding: "11px 0 3px", animation: "vs-slide-up .18s ease-out" }, children: /* @__PURE__ */ i("button", { type: "button", className: "vcuse", title: "Apply this voice", onClick: () => r && c(r), children: /* @__PURE__ */ i("span", { children: p.vcUse }) }) })
|
|
2466
2466
|
] });
|
|
2467
2467
|
}
|
|
2468
2468
|
function cl({ height: t, width: e = 2 }) {
|
|
@@ -2482,7 +2482,7 @@ function wr(t, e) {
|
|
|
2482
2482
|
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" };
|
|
2483
2483
|
}
|
|
2484
2484
|
function dl(t, e, n = 0, r) {
|
|
2485
|
-
const s = (r == null ? void 0 : r.id) ?? null, a = (r == null ? void 0 : r.token) ?? null, o = (r == null ? void 0 : r.shareCode) ?? null, l = Et(), { data: c } =
|
|
2485
|
+
const s = (r == null ? void 0 : r.id) ?? null, a = (r == null ? void 0 : r.token) ?? null, o = (r == null ? void 0 : r.shareCode) ?? null, l = Et(), { data: c } = vi(async () => {
|
|
2486
2486
|
if (!t || !e) return null;
|
|
2487
2487
|
try {
|
|
2488
2488
|
return await l.client.voices.available(t, { recording: s ?? void 0, shareCode: s ? o ?? void 0 : void 0, asOwner: l.owner });
|
|
@@ -2496,14 +2496,14 @@ function hl(t) {
|
|
|
2496
2496
|
return (/* @__PURE__ */ new Set([...Object.keys(t.speakers), ...Object.keys(t.speakerIds)])).size;
|
|
2497
2497
|
}
|
|
2498
2498
|
function Ml({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, sentenceIds: a }) {
|
|
2499
|
-
const o = Et(), { data: l, reload: c } =
|
|
2499
|
+
const o = Et(), { data: l, reload: c } = vi(async () => {
|
|
2500
2500
|
if (!t || !e) return null;
|
|
2501
2501
|
const K = await o.client.recordings.voice(t, e, o.readAs).catch(() => []);
|
|
2502
2502
|
return { recordingId: t, lang: e, rows: K.filter((k) => k.lang === e) };
|
|
2503
2503
|
}, [t, e, o, n]), u = Ie(
|
|
2504
2504
|
() => l && l.lang === e && l.recordingId === t ? l.rows : [],
|
|
2505
2505
|
[l, e, t]
|
|
2506
|
-
), d = Ie(() => di(u, s), [u, s]), g = d ? d.voiceKey || null : s, [M, N] =
|
|
2506
|
+
), d = Ie(() => di(u, s), [u, s]), g = d ? d.voiceKey || null : s, [M, N] = z(null), [p, y] = z(null), L = v(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${g ?? ""}`, f = Ke(async (K, k) => {
|
|
2507
2507
|
if (!t || !e || !n) return;
|
|
2508
2508
|
const ae = k != null && k.size ? null : Fs(K), te = k != null && k.size ? k : ae, G = te && te.size ? Object.fromEntries([...te].map(([Te, je]) => [String(Te), je])) : null, J = `${t}|${e}|${G ? JSON.stringify(G) : K ?? ""}`;
|
|
2509
2509
|
if (L.current.has(J)) return;
|
|
@@ -2518,11 +2518,11 @@ function Ml({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
|
|
|
2518
2518
|
return;
|
|
2519
2519
|
}
|
|
2520
2520
|
c();
|
|
2521
|
-
}, [t, e, n, o, c]),
|
|
2521
|
+
}, [t, e, n, o, c]), I = Ke(() => {
|
|
2522
2522
|
const K = `${t ?? ""}|${e ?? ""}|`;
|
|
2523
2523
|
for (const k of [...L.current]) k.startsWith(K) && L.current.delete(k);
|
|
2524
2524
|
y(null);
|
|
2525
|
-
}, [t, e]),
|
|
2525
|
+
}, [t, e]), b = !!d && (d.state === "queued" || d.state === "running") || M === m, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, V = (a == null ? void 0 : a.join(",")) ?? "", [_, ee] = z(null), j = Ie(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), E = Ie(() => n && V ? V.split(",").map(Number).filter((K) => !j.has(K)) : [], [n, V, j]), Q = v(null);
|
|
2526
2526
|
U(() => {
|
|
2527
2527
|
if (!n || !t || !e || !E.length) return;
|
|
2528
2528
|
const K = _ ?? E[0], k = E.find((pe) => pe >= K) ?? E[0], ae = `${t}|${e}|${g ?? ""}`, te = Q.current;
|
|
@@ -2549,11 +2549,11 @@ function Ml({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
|
|
|
2549
2549
|
const K = V ? V.split(",").map(Number).filter((ae) => !n || j.has(ae)) : void 0, k = d ?? (K != null && K.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
|
|
2550
2550
|
return Ya(k, t, o.origin, r, K);
|
|
2551
2551
|
}, [d, t, o, r, V, e, s, n, j]), re = Ie(() => new Set(E), [E]);
|
|
2552
|
-
return { listed: l, rows: u, track: d, renderVoiceId: g, rendering:
|
|
2552
|
+
return { listed: l, rows: u, track: d, renderVoiceId: g, rendering: b, failed: D, clips: S, requestRender: f, forget: I, reload: c, setNear: ee, missing: E.length, coming: re };
|
|
2553
2553
|
}
|
|
2554
2554
|
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 };
|
|
2555
2555
|
function Ci({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s }) {
|
|
2556
|
-
const o = s && t.length <= 3, l = t.some((L) => L.key === e), [c, u] =
|
|
2556
|
+
const o = s && t.length <= 3, l = t.some((L) => L.key === e), [c, u] = z(null), d = v(null), [g, M] = z(0);
|
|
2557
2557
|
U(() => {
|
|
2558
2558
|
d.current && M(d.current.offsetWidth);
|
|
2559
2559
|
}, [c == null ? void 0 : c.k]);
|
|
@@ -2564,8 +2564,8 @@ function Ci({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
|
|
|
2564
2564
|
return;
|
|
2565
2565
|
}
|
|
2566
2566
|
if ((c == null ? void 0 : c.k) === m.key) return;
|
|
2567
|
-
const
|
|
2568
|
-
u({ k: m.key, label: m.label, x:
|
|
2567
|
+
const I = L.currentTarget.getBoundingClientRect(), b = L.currentTarget.parentElement.getBoundingClientRect();
|
|
2568
|
+
u({ k: m.key, label: m.label, x: I.left + I.width / 2, y: b.top });
|
|
2569
2569
|
}, p = () => u(null);
|
|
2570
2570
|
let y = null;
|
|
2571
2571
|
if (c) {
|
|
@@ -2580,15 +2580,15 @@ function Ci({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
|
|
|
2580
2580
|
}
|
|
2581
2581
|
return /* @__PURE__ */ h("div", { role: "tablist", className: `tabbar tabbar--icons${s ? "" : " tabbar--desk"}`, "data-desk-tabs": a ? "" : void 0, "data-tab-n": a ? t.length : void 0, style: { marginBottom: r ? 12 : 0 }, onMouseLeave: p, children: [
|
|
2582
2582
|
t.map((L) => {
|
|
2583
|
-
const m = e === L.key, f = o || m,
|
|
2583
|
+
const m = e === L.key, f = o || m, I = o ? "1 1 0" : m ? "1 1 auto" : s && !l ? "1 1 0" : "0 0 auto", b = L.icon ?? gl[L.key], D = () => {
|
|
2584
2584
|
p(), n(s && m ? "none" : L.key);
|
|
2585
2585
|
};
|
|
2586
|
-
return s ? /* @__PURE__ */ h("button", { type: "button", role: "tab", "aria-selected": m, title: L.label, className: `tabbar__tab${m ? " is-on" : ""}`, style: { flex:
|
|
2587
|
-
|
|
2586
|
+
return s ? /* @__PURE__ */ h("button", { type: "button", role: "tab", "aria-selected": m, title: L.label, className: `tabbar__tab${m ? " is-on" : ""}`, style: { flex: I }, onClick: D, children: [
|
|
2587
|
+
b && /* @__PURE__ */ i(oe, { d: b, size: 15, sw: L.sw ?? 2, style: { flex: "none" } }),
|
|
2588
2588
|
f && /* @__PURE__ */ i("span", { className: "tabbar__label", children: L.label })
|
|
2589
|
-
] }, L.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex:
|
|
2590
|
-
|
|
2591
|
-
/* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: f ? "1fr" : "0fr", marginLeft: f &&
|
|
2589
|
+
] }, L.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: I }, onMouseEnter: (V) => N(V, L), onMouseMove: (V) => N(V, L), onClick: D, children: /* @__PURE__ */ h("button", { type: "button", role: "tab", "aria-selected": m, "aria-label": L.label, className: `tabbar__tab${m ? " is-on" : ""}${(c == null ? void 0 : c.k) === L.key ? " is-tip" : ""}`, children: [
|
|
2590
|
+
b && /* @__PURE__ */ i(oe, { d: b, size: 15, sw: L.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: m && !o ? "scale(1.12)" : "none" } }),
|
|
2591
|
+
/* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: f ? "1fr" : "0fr", marginLeft: f && b ? 6 : 0 }, children: /* @__PURE__ */ i("span", { className: "tabbar__label", "data-tab-l": "", style: { opacity: f ? 1 : 0, transform: f ? "none" : "translateX(-6px)" }, children: L.label }) })
|
|
2592
2592
|
] }) }, L.key);
|
|
2593
2593
|
}),
|
|
2594
2594
|
y
|
|
@@ -2596,7 +2596,7 @@ function Ci({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
|
|
|
2596
2596
|
}
|
|
2597
2597
|
const fl = "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3", pl = "m9 9 10.5-3m0 6.553v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 1 1-.99-3.467l2.31-.66a2.25 2.25 0 0 0 1.632-2.163Zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 0 1-.99-3.467l2.31-.66A2.25 2.25 0 0 0 9 15.553Z";
|
|
2598
2598
|
function Nl({ audio: t, video: e, formats: n, onExport: r }) {
|
|
2599
|
-
const [s, a] =
|
|
2599
|
+
const [s, a] = z(null), [o, l] = z(null), c = v(void 0), u = v(!0);
|
|
2600
2600
|
U(() => (u.current = !0, () => {
|
|
2601
2601
|
u.current = !1, window.clearTimeout(c.current);
|
|
2602
2602
|
}), []);
|
|
@@ -2654,7 +2654,7 @@ function Ar(t, e, n) {
|
|
|
2654
2654
|
r();
|
|
2655
2655
|
}
|
|
2656
2656
|
function ml(t, e, n) {
|
|
2657
|
-
const [r, s] =
|
|
2657
|
+
const [r, s] = z(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
|
|
2658
2658
|
${t.summary}` : ""}`, l = Et();
|
|
2659
2659
|
return U(() => {
|
|
2660
2660
|
if (!e || !n || !a) return;
|
|
@@ -2676,7 +2676,7 @@ function yl(t) {
|
|
|
2676
2676
|
} };
|
|
2677
2677
|
}
|
|
2678
2678
|
function Tl({ s: t }) {
|
|
2679
|
-
const [e, n] =
|
|
2679
|
+
const [e, n] = z(!1), r = v(void 0);
|
|
2680
2680
|
U(() => () => window.clearTimeout(r.current), []);
|
|
2681
2681
|
const s = t.title ?? "", a = t.summary ?? "", o = () => {
|
|
2682
2682
|
var c;
|
|
@@ -2692,7 +2692,7 @@ ${a}`).catch(() => {
|
|
|
2692
2692
|
/* @__PURE__ */ h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, minHeight: 24 }, children: [
|
|
2693
2693
|
/* @__PURE__ */ i(gr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "SUMMARY" }),
|
|
2694
2694
|
t.state === "ready" && /* @__PURE__ */ h("button", { type: "button", className: "sumcopy", title: "Copy title and summary", style: { color: e ? "var(--brand)" : "var(--ink-70)" }, onClick: o, children: [
|
|
2695
|
-
/* @__PURE__ */ i(oe, { d: e ? X.check :
|
|
2695
|
+
/* @__PURE__ */ i(oe, { d: e ? X.check : vl, size: 13, sw: 1.6 }),
|
|
2696
2696
|
e ? "Copied" : "Copy"
|
|
2697
2697
|
] })
|
|
2698
2698
|
] }),
|
|
@@ -2734,8 +2734,8 @@ function Ll(t = !0, e) {
|
|
|
2734
2734
|
};
|
|
2735
2735
|
}, [t]), r;
|
|
2736
2736
|
}
|
|
2737
|
-
const
|
|
2738
|
-
function
|
|
2737
|
+
const vl = "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";
|
|
2738
|
+
function kl(t, e) {
|
|
2739
2739
|
const [n, r] = Ra(t), s = e.tabs.map((f) => f.key), a = e.tabbed !== !1, o = e.pinnable ?? s;
|
|
2740
2740
|
let l = n;
|
|
2741
2741
|
[...e.autoPin ?? []].reverse().forEach((f) => {
|
|
@@ -2743,33 +2743,33 @@ function vl(t, e) {
|
|
|
2743
2743
|
});
|
|
2744
2744
|
const c = l;
|
|
2745
2745
|
(e.forcePin ?? []).forEach((f) => {
|
|
2746
|
-
l = l.filter((
|
|
2746
|
+
l = l.filter((I) => I !== `!${f}`), s.includes(f) && !l.includes(f) && (l = [f, ...l]);
|
|
2747
2747
|
});
|
|
2748
2748
|
const u = (f) => (e.forcePin ?? []).includes(f) && !c.includes(f), d = a ? l.filter((f) => s.includes(f) && o.includes(f)) : [], g = s.filter((f) => !d.includes(f)), M = e.cur && e.cur !== "none" && g.includes(e.cur) ? e.cur : e.pref && g.includes(e.pref) ? e.pref : g[0] ?? null, N = (f) => {
|
|
2749
|
-
const
|
|
2750
|
-
return
|
|
2751
|
-
}, p = (f,
|
|
2749
|
+
const I = g.filter((b) => b !== f);
|
|
2750
|
+
return I[g.indexOf(f)] ?? I[I.length - 1] ?? null;
|
|
2751
|
+
}, p = (f, I) => {
|
|
2752
2752
|
if (!o.includes(f)) return;
|
|
2753
|
-
const
|
|
2754
|
-
if (
|
|
2753
|
+
const b = d.filter((D) => D !== f);
|
|
2754
|
+
if (b.splice(I ?? b.length, 0, f), M === f) {
|
|
2755
2755
|
const D = N(f);
|
|
2756
2756
|
D && e.onPick(D);
|
|
2757
2757
|
}
|
|
2758
|
-
r([...
|
|
2758
|
+
r([...b.filter((D) => !u(D) || D === f), ...c.filter((D) => !b.includes(D) && D !== `!${f}`)]);
|
|
2759
2759
|
}, y = (f) => {
|
|
2760
|
-
r([...c.filter((
|
|
2760
|
+
r([...c.filter((I) => I !== f && I !== `!${f}`), ...(e.autoPin ?? []).includes(f) ? [`!${f}`] : []]), e.onPick(f);
|
|
2761
2761
|
}, L = (f) => {
|
|
2762
|
-
var
|
|
2763
|
-
return ((
|
|
2762
|
+
var I;
|
|
2763
|
+
return ((I = e.tabs.find((b) => b.key === f)) == null ? void 0 : I.label) ?? f;
|
|
2764
2764
|
}, m = (f) => {
|
|
2765
|
-
const
|
|
2765
|
+
const I = d.includes(f), b = s.includes(f);
|
|
2766
2766
|
return {
|
|
2767
|
-
show:
|
|
2768
|
-
pinned:
|
|
2769
|
-
order:
|
|
2770
|
-
pill: a &&
|
|
2771
|
-
title:
|
|
2772
|
-
toggle: () =>
|
|
2767
|
+
show: b && (!a || I || M === f),
|
|
2768
|
+
pinned: I,
|
|
2769
|
+
order: I ? d.indexOf(f) + 1 : 1e3,
|
|
2770
|
+
pill: a && b && o.includes(f) && g.length > 0 && (I || g.length > 1),
|
|
2771
|
+
title: I ? `Unpin — return ${L(f)} to the tabs` : `Pin ${L(f)} open above the tabs`,
|
|
2772
|
+
toggle: () => I ? y(f) : p(f)
|
|
2773
2773
|
};
|
|
2774
2774
|
};
|
|
2775
2775
|
return { id: t, tabbed: a && g.length > 1, cur: M, seq: d, pinnable: o, tabKeys: g, stripTabs: e.tabs.filter((f) => g.includes(f.key)), panel: m, pin: p, unpin: y };
|
|
@@ -2801,60 +2801,60 @@ function zl(t) {
|
|
|
2801
2801
|
r !== m && (r && r.removeAttribute("data-grip-hot"), r = m, m && m.setAttribute("data-grip-hot", ""));
|
|
2802
2802
|
}, o = (m) => m.col.querySelector("[data-desk-tabs]"), l = (m) => {
|
|
2803
2803
|
var ee;
|
|
2804
|
-
const f = m.el.getBoundingClientRect(),
|
|
2805
|
-
|
|
2804
|
+
const f = m.el.getBoundingClientRect(), I = m.el.cloneNode(!0);
|
|
2805
|
+
I.querySelectorAll("*").forEach((j) => {
|
|
2806
2806
|
j.style.animation = "none", j.style.transition = "none";
|
|
2807
|
-
}),
|
|
2807
|
+
}), I.querySelectorAll("iframe,video").forEach((j) => {
|
|
2808
2808
|
const E = document.createElement("div");
|
|
2809
2809
|
E.style.cssText = "width:100%;height:100%;background:#000", j.replaceWith(E);
|
|
2810
|
-
}),
|
|
2811
|
-
const
|
|
2812
|
-
for (let j = 0; j <
|
|
2813
|
-
const E =
|
|
2814
|
-
E.startsWith("--") &&
|
|
2810
|
+
}), I.removeAttribute("data-panel-key"), I.querySelectorAll("[data-panel-key],[data-pin-pill]").forEach((j) => j.hasAttribute("data-pin-pill") ? j.remove() : j.removeAttribute("data-panel-key")), Object.assign(I.style, { position: "fixed", left: `${f.left}px`, top: `${f.top}px`, width: `${f.width}px`, height: `${f.height}px`, margin: "0", zIndex: "1000", pointerEvents: "none", opacity: ".95", borderRadius: "14px", boxShadow: "0 14px 36px rgba(0,0,0,.3)", animation: "none", transition: "none", cursor: "move", willChange: "transform", contain: "layout paint", overflow: "hidden" });
|
|
2811
|
+
const b = getComputedStyle(m.el);
|
|
2812
|
+
for (let j = 0; j < b.length; j++) {
|
|
2813
|
+
const E = b[j];
|
|
2814
|
+
E.startsWith("--") && I.style.setProperty(E, b.getPropertyValue(E));
|
|
2815
2815
|
}
|
|
2816
|
-
|
|
2816
|
+
I.style.fontFamily = b.fontFamily, I.style.color = b.color;
|
|
2817
2817
|
let D = m.el.parentElement, V = "";
|
|
2818
2818
|
for (; D && !V; ) {
|
|
2819
2819
|
const j = getComputedStyle(D).backgroundColor;
|
|
2820
2820
|
j && !/rgba?\(0, 0, 0, 0\)|transparent/.test(j) && !/\/ 0\.|, 0\.\d+\)$/.test(j) && (V = j), D = D.parentElement;
|
|
2821
2821
|
}
|
|
2822
|
-
|
|
2822
|
+
I.style.background = V || getComputedStyle(document.body).backgroundColor, document.body.appendChild(I), m.orig = [...m.col.querySelectorAll("[data-panel-key]")].map((j) => [j, j.style.order]), m.snap = {}, m.orig.forEach(([j]) => {
|
|
2823
2823
|
m.snap[j.getAttribute("data-panel-key")] = j.getBoundingClientRect();
|
|
2824
2824
|
}), m.tabsSnap = ((ee = o(m)) == null ? void 0 : ee.getBoundingClientRect()) ?? null;
|
|
2825
2825
|
const _ = m.col.querySelector("[data-panel-grid]");
|
|
2826
|
-
m.grid = !!_ && getComputedStyle(_).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:
|
|
2826
|
+
m.grid = !!_ && getComputedStyle(_).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: I }), a(null);
|
|
2827
2827
|
}, c = () => {
|
|
2828
2828
|
const m = s;
|
|
2829
2829
|
if (!m || !m.on || m.px == null || m.py == null) return;
|
|
2830
2830
|
m.raf = 0, m.clone.style.transform = `translate3d(${m.px - m.x0}px,${m.py - m.y0}px,0)`;
|
|
2831
|
-
const f = e.current,
|
|
2831
|
+
const f = e.current, I = m.key, b = o(m), D = f.seq.includes(I), V = D || f.tabKeys.length > 1, _ = b && m.tabsSnap, ee = !_ || m.py < _.top + _.height / 2 ? V ? "pin" : null : "tabs";
|
|
2832
2832
|
let j = null;
|
|
2833
2833
|
if (ee === "pin") {
|
|
2834
|
-
const Q = f.seq.filter((O) => O !==
|
|
2835
|
-
D && f.seq.indexOf(
|
|
2834
|
+
const Q = f.seq.filter((O) => O !== I).map((O) => m.snap[O]).filter(Boolean), T = m.grid ? Q.filter((O) => O.bottom < m.py || O.top <= m.py && O.left + O.width / 2 < m.px).length : Q.filter((O) => O.top + O.height / 2 < m.py).length;
|
|
2835
|
+
D && f.seq.indexOf(I) === T || (j = { zone: ee, idx: T });
|
|
2836
2836
|
} else ee === "tabs" && D && (j = { zone: ee });
|
|
2837
2837
|
const E = j ? j.zone + (j.idx ?? "") : "";
|
|
2838
2838
|
if (E !== m.sig) {
|
|
2839
2839
|
if (m.sig = E, m.target = j, m.orig.forEach(([Q, T]) => {
|
|
2840
2840
|
Q.style.order = T;
|
|
2841
2841
|
}), (j == null ? void 0 : j.zone) === "pin") {
|
|
2842
|
-
const Q = f.seq.filter((T) => T !==
|
|
2843
|
-
Q.splice(j.idx, 0,
|
|
2842
|
+
const Q = f.seq.filter((T) => T !== I);
|
|
2843
|
+
Q.splice(j.idx, 0, I), Q.forEach((T, O) => {
|
|
2844
2844
|
const S = m.col.querySelector(`[data-panel-key="${T}"]`);
|
|
2845
2845
|
S && (S.style.order = String(O + 1));
|
|
2846
2846
|
});
|
|
2847
2847
|
} else (j == null ? void 0 : j.zone) === "tabs" && (m.el.style.order = "998");
|
|
2848
|
-
|
|
2848
|
+
b && ((j == null ? void 0 : j.zone) === "tabs" ? b.setAttribute("data-drop-hot", "") : b.removeAttribute("data-drop-hot"));
|
|
2849
2849
|
}
|
|
2850
2850
|
}, u = (m) => {
|
|
2851
|
-
var
|
|
2851
|
+
var I;
|
|
2852
2852
|
const f = s;
|
|
2853
|
-
if (s = null, !(!f || !f.on) && (f.raf && cancelAnimationFrame(f.raf), f.clone.remove(), f.orig.forEach(([
|
|
2854
|
-
|
|
2855
|
-
}), f.el.classList.remove("is-dragging"), document.documentElement.style.cursor = "", document.body.style.userSelect = "", document.body.style.webkitUserSelect = "", (
|
|
2856
|
-
const
|
|
2857
|
-
f.target.zone === "tabs" ?
|
|
2853
|
+
if (s = null, !(!f || !f.on) && (f.raf && cancelAnimationFrame(f.raf), f.clone.remove(), f.orig.forEach(([b, D]) => {
|
|
2854
|
+
b.style.order = D;
|
|
2855
|
+
}), f.el.classList.remove("is-dragging"), document.documentElement.style.cursor = "", document.body.style.userSelect = "", document.body.style.webkitUserSelect = "", (I = o(f)) == null || I.removeAttribute("data-drop-hot"), m && f.target)) {
|
|
2856
|
+
const b = e.current;
|
|
2857
|
+
f.target.zone === "tabs" ? b.seq.includes(f.key) && b.unpin(f.key) : b.pin(f.key, f.target.idx);
|
|
2858
2858
|
}
|
|
2859
2859
|
}, d = (m) => {
|
|
2860
2860
|
const f = m instanceof Element ? m.closest("[data-tab-col]") : null;
|
|
@@ -2874,10 +2874,10 @@ function zl(t) {
|
|
|
2874
2874
|
r && ((_ = r.closest("[data-tab-col]")) == null ? void 0 : _.getAttribute("data-tab-col")) === n && a(null);
|
|
2875
2875
|
return;
|
|
2876
2876
|
}
|
|
2877
|
-
const
|
|
2878
|
-
if (!
|
|
2879
|
-
const D =
|
|
2880
|
-
a(m.clientY >= D.top && m.clientY <= D.top + V ?
|
|
2877
|
+
const I = f.closest("[data-panel-key]"), b = I == null ? void 0 : I.firstElementChild;
|
|
2878
|
+
if (!I || !b || !e.current.tabbed || !e.current.pinnable.includes(I.getAttribute("data-panel-key")) || f.closest("[role=button],[role=tab],button,a,input,textarea,select,iframe,[data-pin-pill],[contenteditable=true]")) return a(null);
|
|
2879
|
+
const D = b.getBoundingClientRect(), V = parseFloat(getComputedStyle(I).getPropertyValue("--grip-h")) || 30;
|
|
2880
|
+
a(m.clientY >= D.top && m.clientY <= D.top + V ? I : null);
|
|
2881
2881
|
}, M = (m) => {
|
|
2882
2882
|
if (!r || m.button !== 0) return;
|
|
2883
2883
|
const f = d(r);
|
|
@@ -2901,13 +2901,13 @@ function Il({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
|
|
|
2901
2901
|
const N = c.current, p = N == null ? void 0 : N.parentElement;
|
|
2902
2902
|
if (M.button !== 0 || !N || !p) return;
|
|
2903
2903
|
M.preventDefault();
|
|
2904
|
-
const y = M.currentTarget, L = getComputedStyle(p), m = p.clientWidth - parseFloat(L.paddingLeft) - parseFloat(L.paddingRight) - (parseFloat(L.columnGap) || 0), f = 320,
|
|
2904
|
+
const y = M.currentTarget, L = getComputedStyle(p), m = p.clientWidth - parseFloat(L.paddingLeft) - parseFloat(L.paddingRight) - (parseFloat(L.columnGap) || 0), f = 320, I = 320, b = Math.max(f, m - I), D = M.clientX, V = N.getBoundingClientRect().width;
|
|
2905
2905
|
let _ = V;
|
|
2906
2906
|
y.classList.add("is-on");
|
|
2907
2907
|
const ee = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
|
|
2908
2908
|
document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
2909
2909
|
const j = (Q) => {
|
|
2910
|
-
_ = Math.round(Math.min(
|
|
2910
|
+
_ = Math.round(Math.min(b, Math.max(f, V + (D - Q.clientX)))), N.style.flexBasis = `${_}px`, document.documentElement.style.setProperty("--colw", `${_}px`);
|
|
2911
2911
|
}, E = () => {
|
|
2912
2912
|
window.removeEventListener("pointermove", j), window.removeEventListener("pointerup", E), window.removeEventListener("pointercancel", E), document.body.style.cursor = ee.cur, document.body.style.userSelect = ee.sel, y.classList.remove("is-on"), l(_);
|
|
2913
2913
|
};
|
|
@@ -2951,7 +2951,7 @@ function Cl(t) {
|
|
|
2951
2951
|
}
|
|
2952
2952
|
const bl = 1500, xl = 3e5;
|
|
2953
2953
|
function Dl(t) {
|
|
2954
|
-
const e = Et(), [n, r] =
|
|
2954
|
+
const e = Et(), [n, r] = z(null), [s, a] = z(null), [o, l] = z(null), [c, u] = z(null), d = v(null), g = v(null), M = v(null), N = v(0), p = Ke(() => {
|
|
2955
2955
|
M.current && (clearTimeout(M.current), M.current = null), d.current && (d.current.pause(), d.current.removeAttribute("src"), d.current.load(), d.current = null), g.current && (URL.revokeObjectURL(g.current), g.current = null);
|
|
2956
2956
|
}, []), y = Ke(() => {
|
|
2957
2957
|
N.current += 1, p(), a(null), l(null);
|
|
@@ -2963,24 +2963,24 @@ function Dl(t) {
|
|
|
2963
2963
|
}, [p]);
|
|
2964
2964
|
const m = Ke((f) => {
|
|
2965
2965
|
N.current += 1;
|
|
2966
|
-
const
|
|
2966
|
+
const I = N.current;
|
|
2967
2967
|
if (p(), r(f.id), a(null), l(null), u(null), !t) return;
|
|
2968
|
-
let
|
|
2969
|
-
xn() === "caf" && (
|
|
2968
|
+
let b = f.previewUrl ? `${e.origin}${f.previewUrl}` : `${e.origin}/v1/voices/preview?voice=${encodeURIComponent(f.id)}&lang=${encodeURIComponent(t)}`;
|
|
2969
|
+
xn() === "caf" && (b += `${b.includes("?") ? "&" : "?"}format=caf`);
|
|
2970
2970
|
const D = Date.now();
|
|
2971
|
-
e.shareCode &&
|
|
2971
|
+
e.shareCode && b.includes("recording=") && (b += `&shareCode=${encodeURIComponent(e.shareCode)}`);
|
|
2972
2972
|
const V = async () => {
|
|
2973
|
-
if (N.current !==
|
|
2973
|
+
if (N.current !== I) return;
|
|
2974
2974
|
let _;
|
|
2975
2975
|
try {
|
|
2976
2976
|
const Q = e.owner ? await e.bearer() : void 0;
|
|
2977
|
-
_ = await fetch(
|
|
2977
|
+
_ = await fetch(b, { headers: Q ? { Authorization: `Bearer ${Q}` } : {} });
|
|
2978
2978
|
} catch (Q) {
|
|
2979
|
-
if (N.current !==
|
|
2979
|
+
if (N.current !== I) return;
|
|
2980
2980
|
l(null), u(Tt(Q));
|
|
2981
2981
|
return;
|
|
2982
2982
|
}
|
|
2983
|
-
if (N.current !==
|
|
2983
|
+
if (N.current !== I) return;
|
|
2984
2984
|
if (_.status === 202 || _.status === 503) {
|
|
2985
2985
|
if (Date.now() - D > xl) {
|
|
2986
2986
|
l(null), u({ message: "This voice is still being fetched. Try it again in a moment." });
|
|
@@ -2998,15 +2998,15 @@ function Dl(t) {
|
|
|
2998
2998
|
return;
|
|
2999
2999
|
}
|
|
3000
3000
|
const ee = await _.blob();
|
|
3001
|
-
if (N.current !==
|
|
3001
|
+
if (N.current !== I) return;
|
|
3002
3002
|
l(null), g.current = URL.createObjectURL(ee);
|
|
3003
3003
|
const j = new Audio(g.current);
|
|
3004
3004
|
j.playsInline = !0;
|
|
3005
3005
|
const E = () => {
|
|
3006
|
-
N.current ===
|
|
3006
|
+
N.current === I && (p(), a(null));
|
|
3007
3007
|
};
|
|
3008
3008
|
j.onended = E, j.onerror = E, d.current = j, j.play().then(() => {
|
|
3009
|
-
N.current ===
|
|
3009
|
+
N.current === I && a(f.id);
|
|
3010
3010
|
}).catch(E);
|
|
3011
3011
|
};
|
|
3012
3012
|
V();
|
|
@@ -3064,7 +3064,7 @@ function At(t, e, n) {
|
|
|
3064
3064
|
return r != null && r > e ? r : (t == null ? void 0 : t.end) != null && t.end > e ? t.end : n > e ? n : e + 4;
|
|
3065
3065
|
}
|
|
3066
3066
|
function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd: o, endT: l, onGone: c, onKnown: u, lead: d, onTime: g, waiting: M = !1 }) {
|
|
3067
|
-
const N = v(null), [p, y] =
|
|
3067
|
+
const N = v(null), [p, y] = z(!1);
|
|
3068
3068
|
U(() => {
|
|
3069
3069
|
if (!M) {
|
|
3070
3070
|
y(!1);
|
|
@@ -3073,11 +3073,11 @@ function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3073
3073
|
const F = setTimeout(() => y(!0), 300);
|
|
3074
3074
|
return () => clearTimeout(F);
|
|
3075
3075
|
}, [M]);
|
|
3076
|
-
const L = r && !p, m = v(!1), [f,
|
|
3077
|
-
var Z,
|
|
3076
|
+
const L = r && !p, m = v(!1), [f, I] = z(!1), b = (F, me = []) => {
|
|
3077
|
+
var Z, ve;
|
|
3078
3078
|
if (!(m.current && (F === "pauseVideo" || F === "seekTo" || F === "setPlaybackRate")))
|
|
3079
3079
|
try {
|
|
3080
|
-
(
|
|
3080
|
+
(ve = (Z = N.current) == null ? void 0 : Z.contentWindow) == null || ve.postMessage(JSON.stringify({ event: "command", func: F, args: me }), "*");
|
|
3081
3081
|
} catch {
|
|
3082
3082
|
}
|
|
3083
3083
|
}, D = v(null), V = v(!1), _ = v(!1), ee = v(!1), j = v(a);
|
|
@@ -3090,16 +3090,16 @@ function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3090
3090
|
var me, Z;
|
|
3091
3091
|
const F = _.current || ee.current;
|
|
3092
3092
|
if (F !== m.current)
|
|
3093
|
-
if (m.current = F,
|
|
3094
|
-
if (
|
|
3093
|
+
if (m.current = F, I(F), (me = Q.current) == null || me.call(Q, F), F) {
|
|
3094
|
+
if (b("playVideo"), E.current) return;
|
|
3095
3095
|
we.current && j.current && (T.current = !0, j.current());
|
|
3096
3096
|
} else T.current && !E.current && (T.current = !1, we.current || (Z = j.current) == null || Z.call(j));
|
|
3097
3097
|
}, S = v(n);
|
|
3098
3098
|
S.current = n;
|
|
3099
3099
|
const re = v(g);
|
|
3100
3100
|
re.current = g;
|
|
3101
|
-
const K = v(null), k = v(null), [ae, te] =
|
|
3102
|
-
|
|
3101
|
+
const K = v(null), k = v(null), [ae, te] = z(!0), [G, J] = z(!1), pe = () => {
|
|
3102
|
+
b("unloadModule", ["captions"]), b("unloadModule", ["cc"]);
|
|
3103
3103
|
}, le = v([]), Te = () => {
|
|
3104
3104
|
pe(), le.current.forEach(clearTimeout), le.current = [400, 1200, 2500, 5e3].map((F) => window.setTimeout(pe, F));
|
|
3105
3105
|
};
|
|
@@ -3110,10 +3110,10 @@ function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3110
3110
|
(me = (F = N.current) == null ? void 0 : F.contentWindow) == null || me.postMessage(JSON.stringify({ event: "listening", id: "reader" }), "*");
|
|
3111
3111
|
} catch {
|
|
3112
3112
|
}
|
|
3113
|
-
(!E.current || E.current.muted) &&
|
|
3113
|
+
(!E.current || E.current.muted) && b("mute"), J(!0);
|
|
3114
3114
|
};
|
|
3115
|
-
U(() => (d == null || d.bind(
|
|
3116
|
-
!d && G &&
|
|
3115
|
+
U(() => (d == null || d.bind(b), () => d == null ? void 0 : d.bind(null)), [!!d]), U(() => {
|
|
3116
|
+
!d && G && b("mute");
|
|
3117
3117
|
}, [!!d]);
|
|
3118
3118
|
const Ee = v(null), Le = v(l);
|
|
3119
3119
|
Le.current = l;
|
|
@@ -3123,11 +3123,11 @@ function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3123
3123
|
Pe.current = c;
|
|
3124
3124
|
const Se = v(u);
|
|
3125
3125
|
Se.current = u;
|
|
3126
|
-
const B = v(!1), [W, A] =
|
|
3126
|
+
const B = v(!1), [W, A] = z(!1), C = (F) => {
|
|
3127
3127
|
const me = Ee.current;
|
|
3128
3128
|
return !!me && (F < me.start - 1 || F > me.end + 5);
|
|
3129
3129
|
}, H = () => {
|
|
3130
|
-
|
|
3130
|
+
C(S.current) || b("seekTo", [S.current, !0]);
|
|
3131
3131
|
}, ce = () => K.current;
|
|
3132
3132
|
return U(() => {
|
|
3133
3133
|
const F = (me) => {
|
|
@@ -3140,42 +3140,42 @@ function Al({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3140
3140
|
return;
|
|
3141
3141
|
}
|
|
3142
3142
|
(ge = (Ae = Z == null ? void 0 : Z.info) == null ? void 0 : Ae.videoData) != null && ge.isLive && (V.current = !0);
|
|
3143
|
-
const
|
|
3144
|
-
typeof
|
|
3143
|
+
const ve = (Ye = Z == null ? void 0 : Z.info) == null ? void 0 : Ye.duration;
|
|
3144
|
+
typeof ve == "number" && ve > 0 && !V.current && (D.current == null ? D.current = ve : (_.current = Math.abs(ve - D.current) > 1.5, O())), (Z == null ? void 0 : Z.event) === "onReady" && ((!E.current || E.current.muted) && b("mute"), Te(), (Ve = E.current) == null || Ve.onInfo({ ready: !0 })), typeof (($ = Z == null ? void 0 : Z.info) == null ? void 0 : $.playerState) == "number" && (Z.info.playerState !== k.current && (Z.info.playerState === 1 || Z.info.playerState === 2) && Te(), k.current = Z.info.playerState, te(Z.info.playerState !== 1 && Z.info.playerState !== 3), (he = E.current) == null || he.onInfo({ state: Z.info.playerState }));
|
|
3145
3145
|
const ze = (ue = Z == null ? void 0 : Z.info) == null ? void 0 : ue.progressState;
|
|
3146
3146
|
if (ze && typeof ze.seekableStart == "number" && typeof ze.seekableEnd == "number" && ze.seekableEnd > ze.seekableStart) {
|
|
3147
3147
|
const Oe = Ee.current == null;
|
|
3148
|
-
if (Ee.current = { start: ze.seekableStart, end: ze.seekableEnd }, Oe && !we.current && (
|
|
3148
|
+
if (Ee.current = { start: ze.seekableStart, end: ze.seekableEnd }, Oe && !we.current && (b("pauseVideo"), C(S.current) || b("seekTo", [S.current, !0])), !B.current && Le.current != null) {
|
|
3149
3149
|
B.current = !0;
|
|
3150
3150
|
const ye = Le.current < ze.seekableStart - 1;
|
|
3151
3151
|
(ie = Se.current) == null || ie.call(Se, ye), ye && ((fe = Pe.current) == null || fe.call(Pe));
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
typeof ((Ue = Z == null ? void 0 : Z.info) == null ? void 0 : Ue.currentTime) == "number" && (K.current = Z.info.currentTime, (Y = E.current) == null || Y.onInfo({ t: Z.info.currentTime }), !m.current && k.current === 1 && ((R = re.current) == null || R.call(re, Z.info.currentTime))), ((q = Z == null ? void 0 : Z.info) == null ? void 0 : q.muted) === !1 && !E.current &&
|
|
3154
|
+
typeof ((Ue = Z == null ? void 0 : Z.info) == null ? void 0 : Ue.currentTime) == "number" && (K.current = Z.info.currentTime, (Y = E.current) == null || Y.onInfo({ t: Z.info.currentTime }), !m.current && k.current === 1 && ((R = re.current) == null || R.call(re, Z.info.currentTime))), ((q = Z == null ? void 0 : Z.info) == null ? void 0 : q.muted) === !1 && !E.current && b("mute"), typeof ((ne = Z == null ? void 0 : Z.info) == null ? void 0 : ne.muted) == "boolean" && ((de = E.current) == null || de.onInfo({ muted: Z.info.muted }));
|
|
3155
3155
|
};
|
|
3156
3156
|
return window.addEventListener("message", F), () => window.removeEventListener("message", F);
|
|
3157
3157
|
}, []), U(() => {
|
|
3158
3158
|
if (d) return;
|
|
3159
|
-
const F =
|
|
3160
|
-
F !== W && (A(F), F ?
|
|
3159
|
+
const F = C(n);
|
|
3160
|
+
F !== W && (A(F), F ? b("pauseVideo") : G && (b("seekTo", [n, !0]), L && b("playVideo")));
|
|
3161
3161
|
}), U(() => {
|
|
3162
3162
|
if (!G || W || d) return;
|
|
3163
3163
|
if (!L && Ee.current == null && !_e.current) {
|
|
3164
|
-
_e.current = !0,
|
|
3164
|
+
_e.current = !0, b("seekTo", [S.current, !0]), b("playVideo");
|
|
3165
3165
|
return;
|
|
3166
3166
|
}
|
|
3167
3167
|
const F = ce();
|
|
3168
|
-
L && (F == null || Math.abs(F - S.current) > 1.5) && H(),
|
|
3168
|
+
L && (F == null || Math.abs(F - S.current) > 1.5) && H(), b(L ? "playVideo" : "pauseVideo");
|
|
3169
3169
|
}, [L, G, W]), U(() => {
|
|
3170
3170
|
if (!G || s === 0 || W || d) return;
|
|
3171
3171
|
const F = ce();
|
|
3172
|
-
(F == null || Math.abs(F - S.current) > 0.5) && H(), L ||
|
|
3172
|
+
(F == null || Math.abs(F - S.current) > 0.5) && H(), L || b("pauseVideo");
|
|
3173
3173
|
}, [s, G]), U(() => {
|
|
3174
3174
|
if (!G) return;
|
|
3175
3175
|
let F = null, me = 0;
|
|
3176
3176
|
const Z = setInterval(() => {
|
|
3177
|
-
const
|
|
3178
|
-
me = k.current === 1 &&
|
|
3177
|
+
const ve = K.current;
|
|
3178
|
+
me = k.current === 1 && ve != null && F != null && Math.abs(ve - F) < 0.05 ? me + 1 : 0, F = ve;
|
|
3179
3179
|
const ze = me >= 3;
|
|
3180
3180
|
ze !== ee.current && (ee.current = ze, O());
|
|
3181
3181
|
}, 1e3);
|
|
@@ -3200,7 +3200,7 @@ function Yl({ player: t, size: e }) {
|
|
|
3200
3200
|
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 ? X.volumeOff : X.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
|
|
3201
3201
|
}
|
|
3202
3202
|
function Ul() {
|
|
3203
|
-
const [t, e] =
|
|
3203
|
+
const [t, e] = z(""), n = v(null), r = Ke((s) => {
|
|
3204
3204
|
clearTimeout(n.current), e(s), n.current = setTimeout(() => e(""), 3e3);
|
|
3205
3205
|
}, []);
|
|
3206
3206
|
return U(() => () => clearTimeout(n.current), []), [t, r];
|
|
@@ -3228,14 +3228,14 @@ function $l(t, e) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
function Bl(t, e, n, r) {
|
|
3230
3230
|
var Se;
|
|
3231
|
-
const s = v(null), a = v(!1), o = v(!1), [l, c] =
|
|
3231
|
+
const s = v(null), a = v(!1), o = v(!1), [l, c] = z(null), [u, d] = z(!0), g = v(!0), M = v(!1), [N, p] = z(0), y = v(0);
|
|
3232
3232
|
y.current = N;
|
|
3233
3233
|
const L = v({ t: 0, at: 0 }), m = v(n);
|
|
3234
3234
|
m.current = n;
|
|
3235
3235
|
const f = v(r);
|
|
3236
3236
|
f.current = r;
|
|
3237
|
-
const [
|
|
3238
|
-
D.current = B,
|
|
3237
|
+
const [I, b] = z(!1), D = v(!1), V = (B) => {
|
|
3238
|
+
D.current = B, b(B);
|
|
3239
3239
|
}, _ = (B, W) => {
|
|
3240
3240
|
var A;
|
|
3241
3241
|
return (A = s.current) == null ? void 0 : A.call(s, B, W);
|
|
@@ -3255,17 +3255,17 @@ function Bl(t, e, n, r) {
|
|
|
3255
3255
|
if (l !== 1) return;
|
|
3256
3256
|
let B = 0;
|
|
3257
3257
|
const W = () => {
|
|
3258
|
-
const A = L.current,
|
|
3259
|
-
if (f.current != null &&
|
|
3260
|
-
V(!0), _("pauseVideo"), p(
|
|
3258
|
+
const A = L.current, C = A.t + Math.min(1.2, (performance.now() - A.at) / 1e3);
|
|
3259
|
+
if (f.current != null && C >= f.current) {
|
|
3260
|
+
V(!0), _("pauseVideo"), p(C);
|
|
3261
3261
|
return;
|
|
3262
3262
|
}
|
|
3263
|
-
|
|
3263
|
+
C > y.current && p(C), B = requestAnimationFrame(W);
|
|
3264
3264
|
};
|
|
3265
3265
|
return B = requestAnimationFrame(W), () => cancelAnimationFrame(B);
|
|
3266
3266
|
}, [l]), U(() => {
|
|
3267
|
-
!
|
|
3268
|
-
}, [
|
|
3267
|
+
!I || r == null || r < N + 1.5 || (V(!1), _("playVideo"));
|
|
3268
|
+
}, [I, r, N]), U(() => {
|
|
3269
3269
|
r == null && D.current && (V(!1), _("playVideo"));
|
|
3270
3270
|
}, [r]);
|
|
3271
3271
|
const T = t.length ? ((Se = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : Se.end) ?? t[t.length - 1].start + 4 : 0, O = e || T || 1, S = Ie(() => {
|
|
@@ -3273,7 +3273,7 @@ function Bl(t, e, n, r) {
|
|
|
3273
3273
|
let B = 0;
|
|
3274
3274
|
for (let W = 0; W < t.length; W++) t[W].start <= N + 0.05 && (B = W);
|
|
3275
3275
|
return B;
|
|
3276
|
-
}, [t, N]), [re, K] =
|
|
3276
|
+
}, [t, N]), [re, K] = z(0), k = (B) => {
|
|
3277
3277
|
const W = Math.max(0, f.current != null ? Math.min(B, Math.max(0, f.current - 0.5)) : B);
|
|
3278
3278
|
_("seekTo", [W + m.current, !0]), L.current = { t: W, at: performance.now() }, p(W), K((A) => A + 1);
|
|
3279
3279
|
}, ae = v(!1), te = v(void 0), G = (B) => {
|
|
@@ -3317,8 +3317,8 @@ function Bl(t, e, n, r) {
|
|
|
3317
3317
|
};
|
|
3318
3318
|
return { player: {
|
|
3319
3319
|
autoplay: async () => {
|
|
3320
|
-
const B = (A) => new Promise((
|
|
3321
|
-
for (let H = 0; H <
|
|
3320
|
+
const B = (A) => new Promise((C) => setTimeout(C, A)), W = async (A, C) => {
|
|
3321
|
+
for (let H = 0; H < C / 250 && !A(); H++) await B(250);
|
|
3322
3322
|
return A();
|
|
3323
3323
|
};
|
|
3324
3324
|
if (!await W(() => a.current, 1e4)) return null;
|
|
@@ -3363,7 +3363,7 @@ function Bl(t, e, n, r) {
|
|
|
3363
3363
|
clearError: () => {
|
|
3364
3364
|
},
|
|
3365
3365
|
has: !0,
|
|
3366
|
-
edgeWait:
|
|
3366
|
+
edgeWait: I,
|
|
3367
3367
|
wordSync: !0,
|
|
3368
3368
|
pause: pe,
|
|
3369
3369
|
setVolume: (B) => _("setVolume", [Math.round(B * 100)])
|
|
@@ -3371,22 +3371,22 @@ function Bl(t, e, n, r) {
|
|
|
3371
3371
|
}
|
|
3372
3372
|
function Vl(t, e, n, r, s = 0, a = null) {
|
|
3373
3373
|
var A;
|
|
3374
|
-
const o = v(null), [l, c] =
|
|
3374
|
+
const o = v(null), [l, c] = z(!1), [u, d] = z(0), [g, M] = z(!1), N = v(g);
|
|
3375
3375
|
N.current = g;
|
|
3376
|
-
const p = v(!1), [y, L] =
|
|
3377
|
-
|
|
3378
|
-
const
|
|
3376
|
+
const p = v(!1), [y, L] = z(null), [m, f] = z(!1), I = v(s);
|
|
3377
|
+
I.current = s;
|
|
3378
|
+
const b = v(null), [D, V] = z(0);
|
|
3379
3379
|
U(() => {
|
|
3380
3380
|
f(!1);
|
|
3381
|
-
const
|
|
3382
|
-
if (
|
|
3381
|
+
const C = b.current;
|
|
3382
|
+
if (b.current = null, C || d(0), !t) {
|
|
3383
3383
|
c(!1), o.current = null;
|
|
3384
3384
|
return;
|
|
3385
3385
|
}
|
|
3386
|
-
const H = ci(t), ce =
|
|
3386
|
+
const H = ci(t), ce = I.current;
|
|
3387
3387
|
return H.preload = "metadata", H.muted = N.current || p.current, H.onplay = () => c(!0), H.onpause = () => c(!1), H.onended = () => c(!1), H.onloadedmetadata = () => {
|
|
3388
|
-
f(!0), H.currentTime = ((
|
|
3389
|
-
|
|
3388
|
+
f(!0), H.currentTime = ((C == null ? void 0 : C.t) ?? 0) + ce, C != null && C.playing && H.play().catch((F) => {
|
|
3389
|
+
C.asked && (F == null ? void 0 : F.name) === "NotAllowedError" || L(Tt(F));
|
|
3390
3390
|
});
|
|
3391
3391
|
}, H.onerror = () => {
|
|
3392
3392
|
c(!1);
|
|
@@ -3395,10 +3395,10 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3395
3395
|
Cl(Z == null ? void 0 : Z.message) || oi(F), o.current === H && (L({ message: (Z == null ? void 0 : Z.message) ?? me }), Z != null && Z.permanent || (o.current = null));
|
|
3396
3396
|
});
|
|
3397
3397
|
}, o.current = H, () => {
|
|
3398
|
-
|
|
3398
|
+
b.current = { t: Math.max(0, H.currentTime - ce), playing: !H.paused && !H.ended }, H.pause(), H.onplay = H.onpause = H.onended = H.onloadedmetadata = H.onerror = null, o.current = null;
|
|
3399
3399
|
};
|
|
3400
3400
|
}, [t, D]), U(() => () => {
|
|
3401
|
-
|
|
3401
|
+
b.current = null;
|
|
3402
3402
|
}, []);
|
|
3403
3403
|
const _ = n.length ? ((A = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : A.end) ?? n[n.length - 1].start + 4 : 0, ee = s > 0 || r != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > r + 1, j = !ee && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || r || _ || 1, E = v(j);
|
|
3404
3404
|
E.current = j;
|
|
@@ -3406,24 +3406,24 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3406
3406
|
Q.current = ee;
|
|
3407
3407
|
const T = v(a);
|
|
3408
3408
|
T.current = a;
|
|
3409
|
-
const [O, S] =
|
|
3410
|
-
re.current =
|
|
3409
|
+
const [O, S] = z(!1), re = v(!1), K = (C) => {
|
|
3410
|
+
re.current = C, S(C);
|
|
3411
3411
|
};
|
|
3412
3412
|
U(() => {
|
|
3413
|
-
var
|
|
3414
|
-
a == null && re.current && (K(!1), (
|
|
3413
|
+
var C;
|
|
3414
|
+
a == null && re.current && (K(!1), (C = o.current) == null || C.play().catch(() => {
|
|
3415
3415
|
}));
|
|
3416
3416
|
}, [a]), U(() => {
|
|
3417
|
-
var
|
|
3418
|
-
!O || a == null || a < u + 1.5 || (K(!1), (
|
|
3417
|
+
var C;
|
|
3418
|
+
!O || a == null || a < u + 1.5 || (K(!1), (C = o.current) == null || C.play().catch(() => {
|
|
3419
3419
|
}));
|
|
3420
3420
|
}, [O, a, u]), U(() => {
|
|
3421
3421
|
if (!l) return;
|
|
3422
|
-
let
|
|
3422
|
+
let C = 0;
|
|
3423
3423
|
const H = () => {
|
|
3424
3424
|
const ce = o.current;
|
|
3425
3425
|
if (ce) {
|
|
3426
|
-
const F = ce.currentTime -
|
|
3426
|
+
const F = ce.currentTime - I.current;
|
|
3427
3427
|
if (Q.current && F >= E.current) {
|
|
3428
3428
|
ce.pause(), d(E.current);
|
|
3429
3429
|
return;
|
|
@@ -3434,45 +3434,45 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3434
3434
|
}
|
|
3435
3435
|
d(F);
|
|
3436
3436
|
}
|
|
3437
|
-
|
|
3437
|
+
C = requestAnimationFrame(H);
|
|
3438
3438
|
};
|
|
3439
|
-
return
|
|
3439
|
+
return C = requestAnimationFrame(H), () => cancelAnimationFrame(C);
|
|
3440
3440
|
}, [l]);
|
|
3441
3441
|
const k = Ie(() => {
|
|
3442
3442
|
if (!n.length) return 0;
|
|
3443
|
-
let
|
|
3444
|
-
for (let H = 0; H < n.length; H++) n[H].start <= u + 0.05 && (
|
|
3445
|
-
return
|
|
3446
|
-
}, [n, u]), [ae, te] =
|
|
3447
|
-
const H = T.current != null ? Math.min(
|
|
3448
|
-
d(H), ce && (ce.currentTime = H +
|
|
3449
|
-
}, J = (
|
|
3450
|
-
(
|
|
3443
|
+
let C = 0;
|
|
3444
|
+
for (let H = 0; H < n.length; H++) n[H].start <= u + 0.05 && (C = H);
|
|
3445
|
+
return C;
|
|
3446
|
+
}, [n, u]), [ae, te] = z(0), G = (C) => {
|
|
3447
|
+
const H = T.current != null ? Math.min(C, Math.max(0, T.current - 0.5)) : C, ce = o.current;
|
|
3448
|
+
d(H), ce && (ce.currentTime = H + I.current), te((F) => F + 1);
|
|
3449
|
+
}, J = (C) => {
|
|
3450
|
+
(C == null ? void 0 : C.name) !== "AbortError" && L(Tt(C));
|
|
3451
3451
|
}, pe = () => {
|
|
3452
3452
|
var H;
|
|
3453
|
-
const
|
|
3454
|
-
if (!
|
|
3453
|
+
const C = o.current;
|
|
3454
|
+
if (!C) {
|
|
3455
3455
|
if (!t && e) {
|
|
3456
|
-
|
|
3456
|
+
b.current = (H = b.current) != null && H.asked ? null : { t: u, playing: !0, asked: !0 };
|
|
3457
3457
|
return;
|
|
3458
3458
|
}
|
|
3459
3459
|
t && V((ce) => ce + 1), L({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
|
|
3460
3460
|
return;
|
|
3461
3461
|
}
|
|
3462
3462
|
if (l) {
|
|
3463
|
-
|
|
3463
|
+
C.pause();
|
|
3464
3464
|
return;
|
|
3465
3465
|
}
|
|
3466
3466
|
if (re.current) {
|
|
3467
3467
|
K(!1);
|
|
3468
3468
|
return;
|
|
3469
3469
|
}
|
|
3470
|
-
|
|
3471
|
-
}, le = (
|
|
3472
|
-
const H = n[Math.max(0, Math.min(n.length - 1,
|
|
3470
|
+
C.currentTime < I.current && (C.currentTime = I.current), u >= j - 0.25 && G(0), C.play().catch(J);
|
|
3471
|
+
}, le = (C) => {
|
|
3472
|
+
const H = n[Math.max(0, Math.min(n.length - 1, C))];
|
|
3473
3473
|
H && G(H.start);
|
|
3474
|
-
}, Te = (
|
|
3475
|
-
const H = Ln(
|
|
3474
|
+
}, Te = (C) => G(Math.max(0, Math.min(1, C)) * j), je = (C) => {
|
|
3475
|
+
const H = Ln(C, n, j);
|
|
3476
3476
|
G(H.t);
|
|
3477
3477
|
const ce = o.current;
|
|
3478
3478
|
if (ce) {
|
|
@@ -3482,33 +3482,33 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3482
3482
|
}
|
|
3483
3483
|
K(!1), ce.play().catch(J);
|
|
3484
3484
|
}
|
|
3485
|
-
}, Ee = (
|
|
3486
|
-
le(
|
|
3485
|
+
}, Ee = (C) => G(C.start), Le = (C) => {
|
|
3486
|
+
le(C);
|
|
3487
3487
|
const H = o.current;
|
|
3488
3488
|
H && H.paused && H.play().catch(J);
|
|
3489
3489
|
}, we = v(!1), _e = v(0), Pe = () => {
|
|
3490
|
-
var
|
|
3491
|
-
l && ((
|
|
3490
|
+
var C;
|
|
3491
|
+
l && ((C = o.current) == null || C.pause(), we.current = !0);
|
|
3492
3492
|
}, Se = () => {
|
|
3493
|
-
var
|
|
3494
|
-
we.current && (we.current = !1, (
|
|
3493
|
+
var C;
|
|
3494
|
+
we.current && (we.current = !1, (C = o.current) == null || C.play().catch(J));
|
|
3495
3495
|
};
|
|
3496
3496
|
return {
|
|
3497
3497
|
autoplay: async () => {
|
|
3498
|
-
const
|
|
3499
|
-
if (!
|
|
3500
|
-
|
|
3498
|
+
const C = o.current;
|
|
3499
|
+
if (!C) return null;
|
|
3500
|
+
C.currentTime < I.current && (C.currentTime = I.current);
|
|
3501
3501
|
const H = (ce) => {
|
|
3502
|
-
N.current = ce,
|
|
3502
|
+
N.current = ce, C.muted = ce || p.current, M(ce);
|
|
3503
3503
|
};
|
|
3504
3504
|
try {
|
|
3505
|
-
return H(!1), await
|
|
3505
|
+
return H(!1), await C.play(), !0;
|
|
3506
3506
|
} catch (ce) {
|
|
3507
3507
|
if ((ce == null ? void 0 : ce.name) !== "NotAllowedError")
|
|
3508
3508
|
return H(!0), null;
|
|
3509
3509
|
}
|
|
3510
3510
|
try {
|
|
3511
|
-
return H(!0), await
|
|
3511
|
+
return H(!0), await C.play(), !1;
|
|
3512
3512
|
} catch {
|
|
3513
3513
|
return null;
|
|
3514
3514
|
}
|
|
@@ -3519,8 +3519,8 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3519
3519
|
dur: j,
|
|
3520
3520
|
muted: g,
|
|
3521
3521
|
toggleMute: () => {
|
|
3522
|
-
const
|
|
3523
|
-
N.current =
|
|
3522
|
+
const C = !N.current;
|
|
3523
|
+
N.current = C, o.current && (o.current.muted = C || p.current), M(C);
|
|
3524
3524
|
},
|
|
3525
3525
|
toggle: pe,
|
|
3526
3526
|
seekRow: le,
|
|
@@ -3530,13 +3530,13 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3530
3530
|
playRow: Le,
|
|
3531
3531
|
seekN: ae,
|
|
3532
3532
|
stop: () => {
|
|
3533
|
-
const
|
|
3534
|
-
|
|
3533
|
+
const C = o.current;
|
|
3534
|
+
C && (C.pause(), C.currentTime = I.current), d(0);
|
|
3535
3535
|
},
|
|
3536
|
-
videoAt: (
|
|
3536
|
+
videoAt: (C) => {
|
|
3537
3537
|
const H = o.current;
|
|
3538
3538
|
if (!H || H.paused || H.ended || we.current || Date.now() - _e.current < 3e3) return;
|
|
3539
|
-
const ce =
|
|
3539
|
+
const ce = C + I.current;
|
|
3540
3540
|
Math.abs(H.currentTime - ce) <= 0.2 || (_e.current = Date.now(), H.currentTime = ce);
|
|
3541
3541
|
},
|
|
3542
3542
|
engaged: l || u > 0,
|
|
@@ -3550,25 +3550,25 @@ function Vl(t, e, n, r, s = 0, a = null) {
|
|
|
3550
3550
|
edgeWait: O,
|
|
3551
3551
|
wordSync: !0,
|
|
3552
3552
|
pause: () => {
|
|
3553
|
-
var
|
|
3554
|
-
K(!1), (
|
|
3553
|
+
var C;
|
|
3554
|
+
K(!1), (C = o.current) == null || C.pause();
|
|
3555
3555
|
},
|
|
3556
|
-
setVolume: (
|
|
3557
|
-
o.current && (o.current.volume =
|
|
3556
|
+
setVolume: (C) => {
|
|
3557
|
+
o.current && (o.current.volume = C);
|
|
3558
3558
|
},
|
|
3559
|
-
silence: (
|
|
3560
|
-
p.current =
|
|
3559
|
+
silence: (C) => {
|
|
3560
|
+
p.current = C, o.current && (o.current.muted = N.current || C);
|
|
3561
3561
|
}
|
|
3562
3562
|
};
|
|
3563
3563
|
}
|
|
3564
3564
|
function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
3565
3565
|
const c = v(/* @__PURE__ */ new Set());
|
|
3566
3566
|
c.current = l ?? c.current;
|
|
3567
|
-
const u = v(null), [d, g] =
|
|
3567
|
+
const u = v(null), [d, g] = z(!1), [M, N] = z(0), [p, y] = z(0), [L, m] = z(!1), f = v(L);
|
|
3568
3568
|
f.current = L;
|
|
3569
|
-
const [
|
|
3569
|
+
const [I, b] = z(null), [D, V] = z(null), [_, ee] = z(null), [j, E] = z(null), Q = v(j);
|
|
3570
3570
|
Q.current = j;
|
|
3571
|
-
const [T, O] =
|
|
3571
|
+
const [T, O] = z(null), [S, re] = z(null), [K, k] = z(null), [ae, te] = z(!1), G = v(e);
|
|
3572
3572
|
G.current = e;
|
|
3573
3573
|
const J = v(o), pe = v([]);
|
|
3574
3574
|
J.current = o, u.current && (u.current.flow = o);
|
|
@@ -3582,20 +3582,20 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3582
3582
|
const q = G.current.findIndex((ne) => ne.sentenceId === R);
|
|
3583
3583
|
q >= 0 && N(q);
|
|
3584
3584
|
}, Y.onError = (R) => {
|
|
3585
|
-
g(Y.playing),
|
|
3585
|
+
g(Y.playing), b(R 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." });
|
|
3586
3586
|
}, Y.gapBefore = (R, q) => {
|
|
3587
3587
|
if (!J.current) return 0;
|
|
3588
3588
|
const ne = G.current, de = ne.find((Ce) => Ce.sentenceId === R), Oe = ne.find((Ce) => Ce.sentenceId === q);
|
|
3589
3589
|
if (!Oe) return 0;
|
|
3590
3590
|
const ye = Q.current;
|
|
3591
3591
|
if (R == null) return ye && ye.sid === q ? Math.max(0, Oe.start - ye.t) : 0;
|
|
3592
|
-
const
|
|
3593
|
-
return
|
|
3592
|
+
const ke = le.current;
|
|
3593
|
+
return ke && Date.now() - ke.at < 2e3 ? Math.max(0, Oe.start - (ke.t + (Date.now() - ke.at) / 1e3 * Y.rate)) : !de || Oe.start <= de.start ? 0 : Math.max(0, Oe.start - At(de, de.start, de.start + 4));
|
|
3594
3594
|
}, Y.flow = J.current, Y.silentSpan = (R) => {
|
|
3595
3595
|
var $e;
|
|
3596
3596
|
const q = G.current, ne = q.findIndex((ot) => ot.sentenceId === R), de = q[ne];
|
|
3597
3597
|
if (!de) return null;
|
|
3598
|
-
const Oe = (($e = q[ne + 1]) == null ? void 0 : $e.start) ?? At(de, de.start, de.start + 4), ye = Math.max(0, Oe - de.start),
|
|
3598
|
+
const Oe = (($e = q[ne + 1]) == null ? void 0 : $e.start) ?? At(de, de.start, de.start + 4), ye = Math.max(0, Oe - de.start), ke = le.current, Ce = ke && Date.now() - ke.at < 2e3 ? ke.t + (Date.now() - ke.at) / 1e3 * (Y.rate || 1) : de.start, Ze = Math.max(0, Math.min(ye, Ce - de.start));
|
|
3599
3599
|
return { fromS: Ze, ms: (ye - Ze) * 1e3 / (Y.rate || 1) };
|
|
3600
3600
|
}, Y.speakable = (R) => {
|
|
3601
3601
|
const q = Te.current;
|
|
@@ -3603,7 +3603,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3603
3603
|
const ne = G.current.find((de) => de.sentenceId === R);
|
|
3604
3604
|
return !ne || !q.has(ne.speaker);
|
|
3605
3605
|
};
|
|
3606
|
-
}, []), Le = v(null), we = v(null), _e = v(null), [Pe, Se] =
|
|
3606
|
+
}, []), Le = v(null), we = v(null), _e = v(null), [Pe, Se] = z(!1), B = v(() => {
|
|
3607
3607
|
}), W = (Y) => {
|
|
3608
3608
|
if (_e.current = Y, Se(!!(Y != null && Y.playing)), !Y) return;
|
|
3609
3609
|
const R = Ln(Y, G.current, ze).index;
|
|
@@ -3615,7 +3615,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3615
3615
|
var q;
|
|
3616
3616
|
if (Le.current !== r) {
|
|
3617
3617
|
const ne = Le.current != null ? we.current : null;
|
|
3618
|
-
Le.current = r, (q = u.current) == null || q.stop(), u.current = new fr(), Ee(u.current), u.current.setSequence(pe.current), g(!1), N(0),
|
|
3618
|
+
Le.current = r, (q = u.current) == null || q.stop(), u.current = new fr(), Ee(u.current), u.current.setSequence(pe.current), g(!1), N(0), b(null), ee(null), E(null), W(ne && (ne.playing || ne.t > 0) ? ne : null);
|
|
3619
3619
|
}
|
|
3620
3620
|
const Y = u.current;
|
|
3621
3621
|
Y.setMuted(f.current);
|
|
@@ -3623,11 +3623,11 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3623
3623
|
const R = _e.current;
|
|
3624
3624
|
R && (J.current || t.some((ne) => ne.sentenceId >= (R.sentenceId ?? 0))) && (W(null), B.current(R));
|
|
3625
3625
|
}, [r, t]);
|
|
3626
|
-
const
|
|
3627
|
-
pe.current =
|
|
3626
|
+
const C = Ie(() => o ? e.map((Y) => Y.sentenceId).filter((Y) => Y != null) : [], [e, o]);
|
|
3627
|
+
pe.current = C, U(() => {
|
|
3628
3628
|
var Y;
|
|
3629
|
-
(Y = u.current) == null || Y.setSequence(
|
|
3630
|
-
}, [
|
|
3629
|
+
(Y = u.current) == null || Y.setSequence(C);
|
|
3630
|
+
}, [C, r]), U(() => () => {
|
|
3631
3631
|
var Y;
|
|
3632
3632
|
(Y = u.current) == null || Y.stop(), u.current = null, Le.current = null;
|
|
3633
3633
|
}, []);
|
|
@@ -3638,12 +3638,12 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3638
3638
|
return;
|
|
3639
3639
|
}
|
|
3640
3640
|
const Y = () => {
|
|
3641
|
-
var ye,
|
|
3641
|
+
var ye, ke;
|
|
3642
3642
|
const q = ((ye = u.current) == null ? void 0 : ye.resting()) ?? null;
|
|
3643
3643
|
te(!!(q != null && q.silent)), q != null && q.silent && Q.current && (Q.current = null, E(null)), re((Ce) => q == null ? null : Ce != null && Math.abs(Ce - q.s) < 0.05 ? Ce : q.s);
|
|
3644
3644
|
const ne = Q.current;
|
|
3645
3645
|
q == null ? k(null) : ne && ne.sid === q.sentenceId && (k(ne.t), Q.current = null, E(null));
|
|
3646
|
-
const de = ((
|
|
3646
|
+
const de = ((ke = u.current) == null ? void 0 : ke.position()) ?? null, Oe = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
|
|
3647
3647
|
ne && de && de.sentenceId === ne.sid && de.t > 0.1 && E(null), O((Ce) => de ? Ce && Math.abs(Ce.t - de.t) < 0.05 && Ce.dur === de.dur && Ce.words === Oe ? Ce : { t: de.t, dur: de.dur, words: Oe } : Ce == null ? Ce : null);
|
|
3648
3648
|
};
|
|
3649
3649
|
Y();
|
|
@@ -3657,7 +3657,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3657
3657
|
}, me = (Y, R) => {
|
|
3658
3658
|
for (let q = Y; q >= 0 && q < e.length; q += R) if (F(q)) return q;
|
|
3659
3659
|
return null;
|
|
3660
|
-
}, Z = Math.max(0, Math.min(M, Math.max(0, e.length - 1))),
|
|
3660
|
+
}, Z = Math.max(0, Math.min(M, Math.max(0, e.length - 1))), ve = e.length ? e[e.length - 1].start + 4 : 0, ze = n || ve || 1, Ge = v(!1), Ae = v(M);
|
|
3661
3661
|
Ae.current = M;
|
|
3662
3662
|
const ge = (Y) => {
|
|
3663
3663
|
var R, q, ne;
|
|
@@ -3694,7 +3694,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3694
3694
|
preparing: D != null || Pe,
|
|
3695
3695
|
silent: d && ae,
|
|
3696
3696
|
starting: _,
|
|
3697
|
-
error:
|
|
3697
|
+
error: I,
|
|
3698
3698
|
seekN: p,
|
|
3699
3699
|
toggleMute: () => {
|
|
3700
3700
|
var R;
|
|
@@ -3711,7 +3711,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3711
3711
|
(R = u.current) == null || R.pause(), g(!1);
|
|
3712
3712
|
return;
|
|
3713
3713
|
}
|
|
3714
|
-
|
|
3714
|
+
b(null);
|
|
3715
3715
|
const Y = Ae.current;
|
|
3716
3716
|
if (!Q.current && ((ne = u.current) != null && ne.resume(((q = e[Y]) == null ? void 0 : q.sentenceId) ?? null))) {
|
|
3717
3717
|
g(!0);
|
|
@@ -3745,8 +3745,8 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3745
3745
|
Q.current = He, E(He), Ye(be);
|
|
3746
3746
|
return;
|
|
3747
3747
|
}
|
|
3748
|
-
const Oe = (ne == null ? void 0 : ne.sentenceId) ?? null, { from: ye, span:
|
|
3749
|
-
let Ce =
|
|
3748
|
+
const Oe = (ne == null ? void 0 : ne.sentenceId) ?? null, { from: ye, span: ke } = $(q);
|
|
3749
|
+
let Ce = ke > 0 ? Math.max(0, Math.min(1, (R - ye) / ke)) : 0;
|
|
3750
3750
|
const Ze = Oe != null ? (rt = je.current) == null ? void 0 : rt[String(Oe)] : void 0, $e = Ze != null && Ze.length ? Ze[Ze.length - 1][1] : 0;
|
|
3751
3751
|
if (ne && Ze && Ze.length === ne.words.length && $e > 0) {
|
|
3752
3752
|
let be = 0;
|
|
@@ -3757,11 +3757,11 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3757
3757
|
Oe != null && ((gt = u.current) == null || gt.startWithin(Oe, Ce)), E(Ce > 0.01 ? { t: R, sid: Oe } : null), Ye(q);
|
|
3758
3758
|
},
|
|
3759
3759
|
seekWord: a ? (Y) => {
|
|
3760
|
-
var de, Oe, ye,
|
|
3760
|
+
var de, Oe, ye, ke;
|
|
3761
3761
|
const R = e[Z];
|
|
3762
3762
|
if (!R || R.sentenceId == null) return;
|
|
3763
3763
|
const q = R.words.findIndex((Ce) => Ce.seq === Y.seq && Ce.idx === Y.idx), ne = q >= 0 ? (ye = (Oe = (de = je.current) == null ? void 0 : de[String(R.sentenceId)]) == null ? void 0 : Oe[q]) == null ? void 0 : ye[0] : void 0;
|
|
3764
|
-
ne != null && ((
|
|
3764
|
+
ne != null && ((ke = u.current) == null || ke.seekWithin(ne));
|
|
3765
3765
|
} : void 0,
|
|
3766
3766
|
playRow: (Y) => {
|
|
3767
3767
|
var q;
|
|
@@ -3784,7 +3784,7 @@ function Hl(t, e, n, r, s, a, o = !1, l) {
|
|
|
3784
3784
|
release: () => {
|
|
3785
3785
|
Ge.current && (Ge.current = !1, ge(Ae.current));
|
|
3786
3786
|
},
|
|
3787
|
-
clearError: () =>
|
|
3787
|
+
clearError: () => b(null),
|
|
3788
3788
|
setVolume: (Y) => {
|
|
3789
3789
|
var R;
|
|
3790
3790
|
return (R = u.current) == null ? void 0 : R.setVolume(Y);
|
|
@@ -3814,21 +3814,21 @@ const Wl = () => {
|
|
|
3814
3814
|
}, Fl = "The language this recording is read aloud in.", Gl = { title: "READ IN", note: "The transcript and its voice switch to this language." };
|
|
3815
3815
|
function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: g, hearOriginal: M = !1, timed: N = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: L = null, voiceSheet: m, forcedVoice: f = null }) {
|
|
3816
3816
|
var on, Gt, Zt, qt;
|
|
3817
|
-
const { onAddVoice:
|
|
3817
|
+
const { onAddVoice: I, onPickVoice: b, onSelectSpeaker: D, noCloneFor: V, castNoClone: _, castShort: ee, castBuilding: j, castWarn: E, badge: Q, titleNode: T } = m ?? {}, O = !!m, S = !!(m != null && m.pendingClones), [re, K] = gi(), [k, ae] = z(null), [te, G] = z(!1), [J, pe] = z(!1), [le, Te] = z(!1), [je, Ee] = z(!1), Le = u ?? l, we = u === null, _e = u != null || k != null, Se = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : Le) ? we ? l : Le : "en", B = Dl(Se), W = (m == null ? void 0 : m.cloneOn) ?? !0, [A, C] = z(0), H = v(W);
|
|
3818
3818
|
U(() => {
|
|
3819
|
-
H.current !== W && (H.current = W,
|
|
3819
|
+
H.current !== W && (H.current = W, C((P) => P + 1));
|
|
3820
3820
|
}, [W]);
|
|
3821
|
-
const ce = dl(Se, _e || s || J, hl(e) * 1e3 + A, { id: t ?? null, shareCode: a.shareCode ?? null }), F = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => O || !P.cloned || P.speaker != null), [ce, O]), me = F.length > 1, Z = wr(o, Le),
|
|
3821
|
+
const ce = dl(Se, _e || s || J, hl(e) * 1e3 + A, { id: t ?? null, shareCode: a.shareCode ?? null }), F = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => O || !P.cloned || P.speaker != null), [ce, O]), me = F.length > 1, Z = wr(o, Le), ve = ki(), ze = Ie(() => fi(o, "translation"), [o]), [Ge, Ae] = z(null), [ge] = z(() => /* @__PURE__ */ new Set()), [Ye, Ve] = z({}), $ = Ie(() => al(n, e, ve.vcUnknownSpk), [n, e, ve]), he = me && $.filter((P) => P.key >= 0).length > 1, ue = Ge != null && $.some((P) => P.key === Ge) ? Ge : ((on = $[0]) == null ? void 0 : on.key) ?? null, ie = Ie(() => {
|
|
3822
3822
|
const P = Gs($, F, W);
|
|
3823
3823
|
for (const [De, Be] of Object.entries(Ye[Se ?? ""] ?? {})) P.set(Number(De), Be);
|
|
3824
3824
|
return P;
|
|
3825
3825
|
}, [$, F, Ye, Se, W]), fe = he && Object.keys(Ye[Se ?? ""] ?? {}).length > 0, Ue = Ie(() => p && !fe ? Gs($, F, !1) : null, [p, fe, $, F]), Y = Ie(() => fe ? Ws(ie) || null : Ue && Ws(Ue) || null, [fe, ie, Ue]), R = fe ? ie : Ue, q = F.some((P) => P.cloned && P.consent !== "pending"), ne = !!Le && !!(o != null && o.voice.includes(Le)), de = ne && !M, Oe = Ie(
|
|
3826
3826
|
() => n.filter((P) => !P.suppressed && !P.unclear).map((P) => P.sentenceId).filter((P) => P != null),
|
|
3827
3827
|
[n]
|
|
3828
|
-
), ye = Ml({ recordingId: t, lang: Le, ended: s, cred: a, pickedVoice: f || (Y ?? k), sentenceIds: s && de ? Oe : void 0 }),
|
|
3828
|
+
), ye = Ml({ recordingId: t, lang: Le, ended: s, cred: a, pickedVoice: f || (Y ?? k), sentenceIds: s && de ? Oe : void 0 }), ke = F.find((P) => P.id === k) ?? F.find((P) => {
|
|
3829
3829
|
var De;
|
|
3830
3830
|
return P.id === ((De = ye.track) == null ? void 0 : De.voice);
|
|
3831
|
-
}) ?? F.find((P) => P.default) ?? F[0] ?? null, Ce = (
|
|
3831
|
+
}) ?? F.find((P) => P.default) ?? F[0] ?? null, Ce = (ke == null ? void 0 : ke.id) ?? null;
|
|
3832
3832
|
U(() => {
|
|
3833
3833
|
if (!ye.rendering) return;
|
|
3834
3834
|
const P = setInterval(ye.reload, 4e3);
|
|
@@ -3885,7 +3885,7 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3885
3885
|
return;
|
|
3886
3886
|
}
|
|
3887
3887
|
ae(P);
|
|
3888
|
-
}, ct = we ? { ...wr(o, null), flag: /* @__PURE__ */ i(oe, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, nn = c ? g ? /* @__PURE__ */ i("span", { className: "barchip", style: x ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(zn, { flag: ct.flag, code: ct.code, bordered: !1, onClick: Lt, flagOnly: !0, label: ct.label }) }) : /* @__PURE__ */ i(zn, { flag: ct.flag, code: ct.code, bordered: !1, onClick: it, flagOnly: !0, label: ct.label }) : null, Je = X.voiceClone, ut = _e && (!!ye.track || ot), Ft = rt ? "var(--conf-low)" : ut || g && wt ? "var(--brand)" : "var(--ink-55)", dt = ot || !!$e.preparing && _e,
|
|
3888
|
+
}, ct = we ? { ...wr(o, null), flag: /* @__PURE__ */ i(oe, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, nn = c ? g ? /* @__PURE__ */ i("span", { className: "barchip", style: x ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(zn, { flag: ct.flag, code: ct.code, bordered: !1, onClick: Lt, flagOnly: !0, label: ct.label }) }) : /* @__PURE__ */ i(zn, { flag: ct.flag, code: ct.code, bordered: !1, onClick: it, flagOnly: !0, label: ct.label }) : null, Je = X.voiceClone, ut = _e && (!!ye.track || ot), Ft = rt ? "var(--conf-low)" : ut || g && wt ? "var(--brand)" : "var(--ink-55)", dt = ot || !!$e.preparing && _e, vt = $e.preparing ? `Speaking this line in ${(ke == null ? void 0 : ke.name) ?? "this voice"}…` : ot ? `Preparing this recording in ${(ke == null ? void 0 : ke.name) ?? "this voice"} — it will play as soon as it is ready` : rt ? `This voice could not be prepared: ${rt}` : ne ? me ? "Choose a voice" : ke ? ke.name : ve.vcNoVoice + Z.label : `${ve.vcNoVoice}${Z.label}`, rn = /* @__PURE__ */ i($a, { open: te, onClose: lt, keepOpen: (!!g || y) && !le, value: we ? null : Le, onSelect: Ht, languages: ze, title: (g == null ? void 0 : g.title) ?? "SPOKEN LANGUAGE", note: (g == null ? void 0 : g.note) ?? Fl, searchPlaceholder: ve.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: re, requireVoice: le, sticky: y, busy: L }), bt = Ie(() => F.filter((P) => P.cloned && !P.auto), [F]), _t = (P) => P.voiceId ? bt.find((De) => De.id === `clone:${P.voiceId}`) ?? null : null, ht = Ie(() => $.filter((P) => P.key >= 0), [$]), Yt = Ie(() => {
|
|
3889
3889
|
const P = F.filter((Be) => !Be.cloned);
|
|
3890
3890
|
if (!he) return [...P, ...s && ht.length === 1 ? bt.filter((Be) => Be.id === `clone:${ht[0].voiceId}`) : []];
|
|
3891
3891
|
const De = [];
|
|
@@ -3898,17 +3898,17 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3898
3898
|
}, [F, bt, he, ht, S, s]), Xe = he ? ht.find((P) => P.key === ue) ?? null : null, qe = (P) => {
|
|
3899
3899
|
var De;
|
|
3900
3900
|
return P ? ((De = F.find((Be) => Be.id === P)) == null ? void 0 : De.gender) ?? null : null;
|
|
3901
|
-
}, Ut = Xe ? Xe.sex ?? qe(ie.get(Xe.key)) : null, sn = Ie(() => Xe ? Yt.filter((P) => P.cloned ? P.live ? P.speaker === Xe.key : P.id === `clone:${Xe.voiceId}` : !0) : Yt, [Yt, Xe, Ut, ht]), Rt = (P) => F.find((De) => De.cloned && De.auto && De.speaker === P) ?? null, We = { people: ht, gvList: F, autoOf: Rt, savedFor: _t }, xt = (Q == null ? void 0 : Q(We)) ?? 0,
|
|
3901
|
+
}, Ut = Xe ? Xe.sex ?? qe(ie.get(Xe.key)) : null, sn = Ie(() => Xe ? Yt.filter((P) => P.cloned ? P.live ? P.speaker === Xe.key : P.id === `clone:${Xe.voiceId}` : !0) : Yt, [Yt, Xe, Ut, ht]), Rt = (P) => F.find((De) => De.cloned && De.auto && De.speaker === P) ?? null, We = { people: ht, gvList: F, autoOf: Rt, savedFor: _t }, xt = (Q == null ? void 0 : Q(We)) ?? 0, kt = E ? ht.map((P) => E(P, We)).filter((P) => !!P) : [], Dn = /* @__PURE__ */ h("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": g ? wt : void 0, title: dt || rt ? vt : void 0, style: { cursor: "pointer", background: ut || dt || g && wt ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: g && wt ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: g ? Ot : se, children: [
|
|
3902
3902
|
dt ? /* @__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: Je, size: 17, sw: 1.6, style: { color: Ft } }),
|
|
3903
|
-
|
|
3904
|
-
] }), an = /* @__PURE__ */ i(Vt, { open: J, onClose: Wt, title:
|
|
3903
|
+
kt.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: kt.join(" · "), children: "!" }) : !!xt && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${xt} speaker${xt === 1 ? "" : "s"} can get a cloned voice`, children: xt })
|
|
3904
|
+
] }), an = /* @__PURE__ */ i(Vt, { open: J, onClose: Wt, title: ve.vcSheet, titleNode: T, doneLabel: ve.done, children: /* @__PURE__ */ i(
|
|
3905
3905
|
ll,
|
|
3906
3906
|
{
|
|
3907
|
-
t:
|
|
3907
|
+
t: ve,
|
|
3908
3908
|
cast: he && /* @__PURE__ */ i(
|
|
3909
3909
|
ol,
|
|
3910
3910
|
{
|
|
3911
|
-
t:
|
|
3911
|
+
t: ve,
|
|
3912
3912
|
roster: $,
|
|
3913
3913
|
selected: ue,
|
|
3914
3914
|
onSelect: (P) => {
|
|
@@ -3923,7 +3923,7 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3923
3923
|
),
|
|
3924
3924
|
voices: sn,
|
|
3925
3925
|
onAdd: (P) => {
|
|
3926
|
-
B.reset(),
|
|
3926
|
+
B.reset(), I == null || I(P);
|
|
3927
3927
|
},
|
|
3928
3928
|
noClone: Xe && !sn.some((P) => P.cloned) ? (V == null ? void 0 : V(Xe, Rt(Xe.key), We)) ?? null : null,
|
|
3929
3929
|
usedBy: he && ue != null ? (P) => {
|
|
@@ -3941,7 +3941,7 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3941
3941
|
B.stop();
|
|
3942
3942
|
return;
|
|
3943
3943
|
}
|
|
3944
|
-
if ((
|
|
3944
|
+
if ((b == null ? void 0 : b(P)) === !1) {
|
|
3945
3945
|
B.reset();
|
|
3946
3946
|
return;
|
|
3947
3947
|
}
|
|
@@ -3975,7 +3975,7 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3975
3975
|
openVoices: se,
|
|
3976
3976
|
openPicker: it,
|
|
3977
3977
|
original: we,
|
|
3978
|
-
reloadVoices: () =>
|
|
3978
|
+
reloadVoices: () => C((P) => P + 1),
|
|
3979
3979
|
voicesVer: A,
|
|
3980
3980
|
people: ht,
|
|
3981
3981
|
gvList: F,
|
|
@@ -3991,7 +3991,7 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
3991
3991
|
readLang: typeof u == "string" && u !== l ? u : null,
|
|
3992
3992
|
readVoiceKey: f || (Y ?? k ?? ((qt = ye.track) == null ? void 0 : qt.voiceKey) ?? ""),
|
|
3993
3993
|
pickedVoiceKey: Y ?? k ?? null,
|
|
3994
|
-
readVoiceName: (
|
|
3994
|
+
readVoiceName: (ke == null ? void 0 : ke.name) ?? null,
|
|
3995
3995
|
canSpeak: ne,
|
|
3996
3996
|
requestTrack: () => ye.requestRender(Y ?? k, Y ? R : null),
|
|
3997
3997
|
hasClone: q,
|
|
@@ -4000,15 +4000,15 @@ function Zl({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4000
4000
|
closePicker: () => {
|
|
4001
4001
|
x && lt();
|
|
4002
4002
|
},
|
|
4003
|
-
langList: { value: we ? null : Le, onSelect: Ht, languages: ze, searchPlaceholder:
|
|
4003
|
+
langList: { value: we ? null : Le, onSelect: Ht, languages: ze, searchPlaceholder: ve.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: re }
|
|
4004
4004
|
};
|
|
4005
4005
|
}
|
|
4006
|
-
function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: g = !0, tail: M, tailFg: N, running: p, desk: y, feedRef: L, listener: m, showLabels: f, find:
|
|
4006
|
+
function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: g = !0, tail: M, tailFg: N, running: p, desk: y, feedRef: L, listener: m, showLabels: f, find: I, findOpen: b, lang: D, warm: V, onVisible: _, wordHl: ee = !0 }) {
|
|
4007
4007
|
const { playing: j, engaged: E, t: Q, idx: T, seekN: O, wordSync: S, clipPos: re } = n;
|
|
4008
4008
|
Ll(!0, L);
|
|
4009
4009
|
const K = v(null);
|
|
4010
4010
|
qo(L, K);
|
|
4011
|
-
const [k, ae] =
|
|
4011
|
+
const [k, ae] = z(null), te = (I ?? "").trim().toLowerCase(), [G, J] = z(0), pe = v(0), le = v(null), Te = v(T), je = (W) => {
|
|
4012
4012
|
var A;
|
|
4013
4013
|
return ((A = L.current) == null ? void 0 : A.querySelector(`[data-tx-row="${W}"]`)) ?? null;
|
|
4014
4014
|
}, Ee = v("");
|
|
@@ -4017,36 +4017,36 @@ function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4017
4017
|
if (!W || !_) return;
|
|
4018
4018
|
const A = () => {
|
|
4019
4019
|
const F = W.getBoundingClientRect(), me = [];
|
|
4020
|
-
for (const
|
|
4021
|
-
const ze =
|
|
4022
|
-
ze.bottom > F.top && ze.top < F.bottom && me.push(Number(
|
|
4020
|
+
for (const ve of Array.from(W.querySelectorAll("[data-sentence]"))) {
|
|
4021
|
+
const ze = ve.getBoundingClientRect();
|
|
4022
|
+
ze.bottom > F.top && ze.top < F.bottom && me.push(Number(ve.dataset.sentence));
|
|
4023
4023
|
}
|
|
4024
4024
|
const Z = me.join(",");
|
|
4025
4025
|
Z !== Ee.current && (Ee.current = Z, _(me));
|
|
4026
|
-
},
|
|
4026
|
+
}, C = window.setTimeout(A, 120);
|
|
4027
4027
|
let H;
|
|
4028
4028
|
const ce = () => {
|
|
4029
4029
|
window.clearTimeout(H), H = window.setTimeout(A, 120);
|
|
4030
4030
|
};
|
|
4031
4031
|
return W.addEventListener("scroll", ce, { passive: !0 }), () => {
|
|
4032
|
-
window.clearTimeout(
|
|
4032
|
+
window.clearTimeout(C), window.clearTimeout(H), W.removeEventListener("scroll", ce);
|
|
4033
4033
|
};
|
|
4034
4034
|
}, [e, _, L]);
|
|
4035
4035
|
const Le = (W) => {
|
|
4036
|
-
const A = L.current,
|
|
4037
|
-
if (!A || !
|
|
4038
|
-
const H =
|
|
4036
|
+
const A = L.current, C = je(W);
|
|
4037
|
+
if (!A || !C) return;
|
|
4038
|
+
const H = C.getBoundingClientRect().top - A.getBoundingClientRect().top + A.scrollTop, ce = A.scrollHeight - A.clientHeight, F = lr(A), me = Math.max(80, A.clientHeight - F.top - F.bottom), Z = C.offsetHeight > me ? 8 : (me - C.offsetHeight) / 2;
|
|
4039
4039
|
A.scrollTop = Math.max(0, Math.min(ce, H - F.top - Z));
|
|
4040
4040
|
}, we = (W) => {
|
|
4041
|
-
const A = L.current,
|
|
4042
|
-
if (!A || !A.clientHeight || !A.offsetParent || !
|
|
4043
|
-
const H =
|
|
4041
|
+
const A = L.current, C = je(W);
|
|
4042
|
+
if (!A || !A.clientHeight || !A.offsetParent || !C) return 0;
|
|
4043
|
+
const H = C.getBoundingClientRect(), ce = A.getBoundingClientRect(), F = lr(A), me = ce.top + F.top, Z = ce.bottom - F.bottom;
|
|
4044
4044
|
return H.height > Z - me ? H.top < me - 4 ? -1 : H.top > Z - 60 ? 1 : 0 : H.bottom < me + 10 ? -1 : H.bottom > Z - 4 ? 1 : 0;
|
|
4045
4045
|
}, _e = (W) => {
|
|
4046
4046
|
pe.current = performance.now() + 420;
|
|
4047
|
-
const A = L.current,
|
|
4048
|
-
if (!A || !A.clientHeight || !
|
|
4049
|
-
const H =
|
|
4047
|
+
const A = L.current, C = je(W);
|
|
4048
|
+
if (!A || !A.clientHeight || !C) return;
|
|
4049
|
+
const H = C.getBoundingClientRect(), ce = A.getBoundingClientRect(), F = A.scrollHeight - A.clientHeight, me = A.scrollTop, Z = lr(A), ve = Math.max(80, A.clientHeight - Z.top - Z.bottom), ze = H.height > ve ? 8 : (ve - H.height) / 2, Ge = Math.max(0, Math.min(F, me + (H.top - ce.top) - Z.top - ze));
|
|
4050
4050
|
if (le.current && cancelAnimationFrame(le.current), Math.abs(Ge - me) < 2) {
|
|
4051
4051
|
A.scrollTop = Ge, le.current = null;
|
|
4052
4052
|
return;
|
|
@@ -4067,10 +4067,10 @@ function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4067
4067
|
return;
|
|
4068
4068
|
}
|
|
4069
4069
|
const W = () => {
|
|
4070
|
-
const
|
|
4070
|
+
const C = T !== Te.current;
|
|
4071
4071
|
Te.current = T;
|
|
4072
4072
|
let H = performance.now() < pe.current ? 0 : we(T);
|
|
4073
|
-
|
|
4073
|
+
C && H && !Pe.current && (Le(T), H = 0), Pe.current = H, J(H);
|
|
4074
4074
|
};
|
|
4075
4075
|
W();
|
|
4076
4076
|
const A = setInterval(W, 200);
|
|
@@ -4084,14 +4084,14 @@ function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4084
4084
|
/* @__PURE__ */ i(oe, { d: W === "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 }),
|
|
4085
4085
|
"Now playing"
|
|
4086
4086
|
] }) });
|
|
4087
|
-
return /* @__PURE__ */ h("div", { ref: L, "data-tx-feed": "1", className: `txfeed${y ? " txfeed--desk" : ""}${
|
|
4087
|
+
return /* @__PURE__ */ h("div", { ref: L, "data-tx-feed": "1", className: `txfeed${y ? " txfeed--desk" : ""}${b && !p ? " is-find" : ""}`, children: [
|
|
4088
4088
|
/* @__PURE__ */ i(Ko, { thumbRef: K }),
|
|
4089
4089
|
j && G === -1 && B("up"),
|
|
4090
4090
|
e.map((W, A) => {
|
|
4091
4091
|
var he;
|
|
4092
|
-
const
|
|
4093
|
-
j && !
|
|
4094
|
-
} : j &&
|
|
4092
|
+
const C = j && A === T, H = E && A === T, ce = !!u && u === W.id, F = te && !W.text.toLowerCase().includes(te) && !(D && ((he = W.translations[D]) != null && he.toLowerCase().includes(te))) ? 0.22 : !E || A <= T || ce ? 1 : 0.38, me = m ? () => n.playRow(A) : c && l ? () => {
|
|
4093
|
+
j && !C && n.seekRow(A), l(W);
|
|
4094
|
+
} : j && C ? void 0 : () => n.playRow(A), Z = m ? null : el(W, s, r), ve = !!Z && (Z.script > 0 || Z.manual), ze = y && !!a && k === W.id && !!Z && !ve, Ge = br(t, W.speaker), Ae = xr(t, W.speaker), ge = Ae.lane, Ye = D && W.translations[D] && W.language !== D ? W.translations[D] : null, Ve = xi(e, A, D), $ = H && !S && re ? hi(Ve.map((ue) => ({ t: ue.text, sp: " " })), re) : null;
|
|
4095
4095
|
return /* @__PURE__ */ h("div", { "data-tx-row": A, "data-sentence": W.sentenceId, className: `txline${V ? " txline--warm" : ""}${ce ? " txline--fixing" : ""}`, "aria-current": ce || void 0, style: { opacity: F }, onClick: me, onMouseEnter: y && a ? () => ae(W.id) : void 0, onMouseLeave: y && a ? () => ae(null) : void 0, children: [
|
|
4096
4096
|
/* @__PURE__ */ h("div", { className: "txline__meta", children: [
|
|
4097
4097
|
/* @__PURE__ */ i("span", { className: "txline__at", children: yt(W.start) }),
|
|
@@ -4100,7 +4100,7 @@ function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4100
4100
|
/* @__PURE__ */ i("span", { className: `txline__who lane-${ge}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Ge }),
|
|
4101
4101
|
Ae.hasVoice && /* @__PURE__ */ i(Oi, { color: Ae.fg ?? `var(--lane-${ge})` })
|
|
4102
4102
|
] }),
|
|
4103
|
-
|
|
4103
|
+
C && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: X.headphones, size: y ? 15 : 14, sw: 1.6, stroke: f && W.speaker >= 0 ? Ae.fg ?? `var(--lane-${ge})` : "var(--ink-45)" }) }),
|
|
4104
4104
|
Z && g && /* @__PURE__ */ i(tl, { f: Z, desk: y, onOpen: a ? () => a(W, !0) : void 0 }),
|
|
4105
4105
|
ze && /* @__PURE__ */ i(nl, { alone: !0, onOpen: () => a == null ? void 0 : a(W, !1) })
|
|
4106
4106
|
] }),
|
|
@@ -4111,20 +4111,20 @@ function ql({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4111
4111
|
"span",
|
|
4112
4112
|
{
|
|
4113
4113
|
className: "txw",
|
|
4114
|
-
title: o && !Ye ? c ? "Correct this word" :
|
|
4115
|
-
onClick: o && !Ye ? (
|
|
4114
|
+
title: o && !Ye ? c ? "Correct this word" : C && j && n.seekWord ? "Play from this word" : "Play from this line" : C ? "" : "Play from this line",
|
|
4115
|
+
onClick: o && !Ye ? (ke) => {
|
|
4116
4116
|
var Ce;
|
|
4117
|
-
if (
|
|
4117
|
+
if (ke.stopPropagation(), c) {
|
|
4118
4118
|
o(W, ue);
|
|
4119
4119
|
return;
|
|
4120
4120
|
}
|
|
4121
|
-
if (j &&
|
|
4121
|
+
if (j && C) {
|
|
4122
4122
|
(Ce = n.seekWord) == null || Ce.call(n, ue);
|
|
4123
4123
|
return;
|
|
4124
4124
|
}
|
|
4125
4125
|
n.playRow(A);
|
|
4126
4126
|
} : void 0,
|
|
4127
|
-
style: { color: ye, opacity: q ? 0.45 : 1, fontWeight: 300, cursor: o && !Ye ? c || !
|
|
4127
|
+
style: { color: ye, opacity: q ? 0.45 : 1, fontWeight: 300, cursor: o && !Ye ? c || !C || !j || n.seekWord ? "pointer" : "default" : C ? "default" : "pointer", textShadow: R ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: de || ne ? "underline" : "none", textDecorationStyle: ne ? "solid" : "dotted", textDecorationColor: ne ? "var(--brand)" : Oe ?? "currentColor", textDecorationThickness: de || ne ? "1.5px" : void 0, textUnderlineOffset: de || ne ? "3px" : void 0 },
|
|
4128
4128
|
children: ue.text
|
|
4129
4129
|
}
|
|
4130
4130
|
),
|
|
@@ -4160,7 +4160,7 @@ function Jl(t, e, n, r, s) {
|
|
|
4160
4160
|
a.current = n;
|
|
4161
4161
|
const o = v(r);
|
|
4162
4162
|
o.current = r;
|
|
4163
|
-
const [l, c] =
|
|
4163
|
+
const [l, c] = z(0), u = r.trim().toLowerCase();
|
|
4164
4164
|
return U(() => {
|
|
4165
4165
|
c(u ? e.filter((d) => d.text.toLowerCase().includes(u)).length : 0);
|
|
4166
4166
|
}, [e, u]), U(() => {
|
|
@@ -4194,7 +4194,7 @@ function Di(t) {
|
|
|
4194
4194
|
return e;
|
|
4195
4195
|
}
|
|
4196
4196
|
const qs = (t) => Math.floor(Di(t) / 8) - tn.perBlock[t] * tn.blocks[t];
|
|
4197
|
-
function
|
|
4197
|
+
function vr(t, e) {
|
|
4198
4198
|
let n = 0;
|
|
4199
4199
|
for (let r = 7; r >= 0; r--)
|
|
4200
4200
|
n = n << 1 ^ (n >>> 7) * 285, n ^= (e >>> r & 1) * t;
|
|
@@ -4205,8 +4205,8 @@ function Xl(t) {
|
|
|
4205
4205
|
e[t - 1] = 1;
|
|
4206
4206
|
let n = 1;
|
|
4207
4207
|
for (let r = 0; r < t; r++) {
|
|
4208
|
-
for (let s = 0; s < t; s++) e[s] =
|
|
4209
|
-
n =
|
|
4208
|
+
for (let s = 0; s < t; s++) e[s] = vr(e[s], n) ^ (s + 1 < t ? e[s + 1] : 0);
|
|
4209
|
+
n = vr(n, 2);
|
|
4210
4210
|
}
|
|
4211
4211
|
return e;
|
|
4212
4212
|
}
|
|
@@ -4215,7 +4215,7 @@ function ec(t, e) {
|
|
|
4215
4215
|
for (const r of t) {
|
|
4216
4216
|
const s = r ^ n.shift();
|
|
4217
4217
|
n.push(0), e.forEach((a, o) => {
|
|
4218
|
-
n[o] ^=
|
|
4218
|
+
n[o] ^= vr(a, s);
|
|
4219
4219
|
});
|
|
4220
4220
|
}
|
|
4221
4221
|
return n;
|
|
@@ -4257,17 +4257,17 @@ function nc(t) {
|
|
|
4257
4257
|
};
|
|
4258
4258
|
for (let T = 0; T < r; T++)
|
|
4259
4259
|
f(6, T, T % 2 === 0), f(T, 6, T % 2 === 0);
|
|
4260
|
-
const
|
|
4260
|
+
const I = (T, O) => {
|
|
4261
4261
|
for (let S = -4; S <= 4; S++) for (let re = -4; re <= 4; re++) {
|
|
4262
4262
|
const K = Math.max(Math.abs(re), Math.abs(S)), k = T + re, ae = O + S;
|
|
4263
4263
|
k >= 0 && k < r && ae >= 0 && ae < r && f(k, ae, K !== 2 && K !== 4);
|
|
4264
4264
|
}
|
|
4265
4265
|
};
|
|
4266
|
-
|
|
4267
|
-
const
|
|
4268
|
-
for (let T = 0; T <
|
|
4269
|
-
if (!(T === 0 && O === 0 || T === 0 && O ===
|
|
4270
|
-
for (let S = -2; S <= 2; S++) for (let re = -2; re <= 2; re++) f(
|
|
4266
|
+
I(3, 3), I(r - 4, 3), I(3, r - 4);
|
|
4267
|
+
const b = tc(n);
|
|
4268
|
+
for (let T = 0; T < b.length; T++) for (let O = 0; O < b.length; O++)
|
|
4269
|
+
if (!(T === 0 && O === 0 || T === 0 && O === b.length - 1 || T === b.length - 1 && O === 0))
|
|
4270
|
+
for (let S = -2; S <= 2; S++) for (let re = -2; re <= 2; re++) f(b[T] + re, b[O] + S, Math.max(Math.abs(re), Math.abs(S)) !== 1);
|
|
4271
4271
|
const D = (T) => {
|
|
4272
4272
|
const O = tn.formatBits << 3 | T;
|
|
4273
4273
|
let S = O;
|
|
@@ -4379,9 +4379,9 @@ function ic() {
|
|
|
4379
4379
|
}
|
|
4380
4380
|
function Xt(t) {
|
|
4381
4381
|
var e;
|
|
4382
|
-
typeof document > "u" || !((e = window.matchMedia) != null && e.call(window, "(pointer: coarse)").matches) ||
|
|
4382
|
+
typeof document > "u" || !((e = window.matchMedia) != null && e.call(window, "(pointer: coarse)").matches) || vn(t);
|
|
4383
4383
|
}
|
|
4384
|
-
function
|
|
4384
|
+
function vn(t) {
|
|
4385
4385
|
var s, a, o, l;
|
|
4386
4386
|
if (typeof document > "u") return;
|
|
4387
4387
|
const e = document, n = Er ?? document.documentElement, r = e.fullscreenElement ?? e.webkitFullscreenElement;
|
|
@@ -4393,7 +4393,7 @@ function kn(t) {
|
|
|
4393
4393
|
}
|
|
4394
4394
|
}
|
|
4395
4395
|
function ac(t) {
|
|
4396
|
-
const [e, n] =
|
|
4396
|
+
const [e, n] = z(() => {
|
|
4397
4397
|
var r;
|
|
4398
4398
|
return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, t).matches);
|
|
4399
4399
|
});
|
|
@@ -4405,8 +4405,8 @@ function ac(t) {
|
|
|
4405
4405
|
return s(), r.addEventListener("change", s), () => r.removeEventListener("change", s);
|
|
4406
4406
|
}, [t]), e;
|
|
4407
4407
|
}
|
|
4408
|
-
function
|
|
4409
|
-
const [r, s] =
|
|
4408
|
+
function kn({ pos: t, interactive: e, axis: n = "x" }) {
|
|
4409
|
+
const [r, s] = z(null), a = (c) => {
|
|
4410
4410
|
const u = c.currentTarget.getBoundingClientRect(), d = n === "y" ? (c.clientY - u.top) / Math.max(1, u.height) : (c.clientX - u.left) / Math.max(1, u.width);
|
|
4411
4411
|
return Math.min(1, Math.max(0, d));
|
|
4412
4412
|
}, o = (c) => {
|
|
@@ -4445,7 +4445,7 @@ function vn({ pos: t, interactive: e, axis: n = "x" }) {
|
|
|
4445
4445
|
] });
|
|
4446
4446
|
}
|
|
4447
4447
|
function qc({ pos: t }) {
|
|
4448
|
-
const [e, n] =
|
|
4448
|
+
const [e, n] = z(null), r = (l) => {
|
|
4449
4449
|
const c = l.currentTarget.getBoundingClientRect();
|
|
4450
4450
|
return Math.min(1, Math.max(0, (l.clientX - c.left) / Math.max(1, c.width)));
|
|
4451
4451
|
}, s = (l) => {
|
|
@@ -4498,13 +4498,13 @@ function jn({ t, mini: e }) {
|
|
|
4498
4498
|
disabled: !t.playable,
|
|
4499
4499
|
style: { background: t.playable ? t.playing ? "rgba(238,240,248,.92)" : "var(--brand)" : "rgba(5,6,21,.42)", color: t.playable ? t.playing ? "#131326" : "var(--brand-ink)" : "rgba(234,236,250,.5)", cursor: t.playable ? "pointer" : "default" },
|
|
4500
4500
|
onClick: t.onPlay,
|
|
4501
|
-
children: t.busy ? /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }) : t.playing ? /* @__PURE__ */ i(
|
|
4501
|
+
children: t.busy ? /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }) : t.playing ? /* @__PURE__ */ i(ka, { size: e ? 14 : 18 }) : /* @__PURE__ */ i(jr, { size: e ? 15 : 19 })
|
|
4502
4502
|
}
|
|
4503
4503
|
),
|
|
4504
4504
|
/* @__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: X.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
|
|
4505
4505
|
] });
|
|
4506
4506
|
}
|
|
4507
|
-
function
|
|
4507
|
+
function kr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
|
|
4508
4508
|
return /* @__PURE__ */ h("div", { className: `gfull__brand${s ? " gfull__brand--mark" : ""}`, children: [
|
|
4509
4509
|
/* @__PURE__ */ i("a", { href: ii, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(zr, { dark: !0, size: 22 }) : /* @__PURE__ */ i(bn, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
|
|
4510
4510
|
t && /* @__PURE__ */ h("span", { className: "gfull__live", children: [
|
|
@@ -4520,9 +4520,9 @@ function Ai({ v: t, size: e }) {
|
|
|
4520
4520
|
function oc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, copied: o }) {
|
|
4521
4521
|
return /* @__PURE__ */ h("div", { className: "gmini", "data-theme": "dark", children: [
|
|
4522
4522
|
/* @__PURE__ */ i("div", { className: "gmini__shade", "aria-hidden": "true" }),
|
|
4523
|
-
/* @__PURE__ */ i("div", { className: "gmini__top", children: /* @__PURE__ */ i(
|
|
4523
|
+
/* @__PURE__ */ i("div", { className: "gmini__top", children: /* @__PURE__ */ i(kr, { live: t.live, mini: !0 }) }),
|
|
4524
4524
|
/* @__PURE__ */ h("div", { className: "gmini__foot", children: [
|
|
4525
|
-
/* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(
|
|
4525
|
+
/* @__PURE__ */ i("div", { className: "gmini__row", children: /* @__PURE__ */ i(kn, { pos: t, interactive: !0 }) }),
|
|
4526
4526
|
/* @__PURE__ */ h("div", { className: "gmini__row gmini__row--ctl", children: [
|
|
4527
4527
|
/* @__PURE__ */ i(jn, { t: e, mini: !0 }),
|
|
4528
4528
|
/* @__PURE__ */ i("span", { style: { flex: 1 } }),
|
|
@@ -4538,8 +4538,8 @@ function oc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
|
|
|
4538
4538
|
] });
|
|
4539
4539
|
}
|
|
4540
4540
|
const lc = { color: "rgba(255,255,255,.4)" };
|
|
4541
|
-
function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: g, ad: M, chip: N, transport: p, picker: y, sheet: L, voices: m, voicesBtn: f, sheetOpen:
|
|
4542
|
-
const [E, Q] =
|
|
4541
|
+
function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: g, ad: M, chip: N, transport: p, picker: y, sheet: L, voices: m, voicesBtn: f, sheetOpen: I, onShare: b, onSettings: D, paused: V, copied: _, onTouch: ee, onClose: j }) {
|
|
4542
|
+
const [E, Q] = z(() => !!ur());
|
|
4543
4543
|
U(() => {
|
|
4544
4544
|
const $ = () => Q(!!ur());
|
|
4545
4545
|
return document.addEventListener("fullscreenchange", $), document.addEventListener("webkitfullscreenchange", $), () => {
|
|
@@ -4550,8 +4550,8 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4550
4550
|
T.current = j;
|
|
4551
4551
|
const O = v(p.playable ? p.onPlay : void 0);
|
|
4552
4552
|
O.current = p.playable ? p.onPlay : void 0;
|
|
4553
|
-
const [S, re] =
|
|
4554
|
-
U(() => () =>
|
|
4553
|
+
const [S, re] = z(!1), [K, k] = z(0), ae = v(!1);
|
|
4554
|
+
U(() => () => vn(!1), []), U(() => {
|
|
4555
4555
|
if (!n) return;
|
|
4556
4556
|
const $ = [document.documentElement, document.body], he = $.map((fe) => fe.style.background);
|
|
4557
4557
|
$.forEach((fe) => {
|
|
@@ -4564,7 +4564,7 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4564
4564
|
}), ue && ie && (ue.content = ie);
|
|
4565
4565
|
};
|
|
4566
4566
|
}, []);
|
|
4567
|
-
const te = Ie(() => n && ic(), [n]), [G, J] =
|
|
4567
|
+
const te = Ie(() => n && ic(), [n]), [G, J] = z(te);
|
|
4568
4568
|
U(() => {
|
|
4569
4569
|
if (!n) return;
|
|
4570
4570
|
const $ = [document.documentElement, document.body], he = $.map((fe) => [fe.style.overflow, fe.style.overscrollBehavior]);
|
|
@@ -4583,11 +4583,11 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4583
4583
|
window.removeEventListener("scroll", ie), ue.remove(), document.documentElement.style.overscrollBehavior = he[0][1], window.scrollTo(0, 0);
|
|
4584
4584
|
};
|
|
4585
4585
|
}, [te, n]);
|
|
4586
|
-
const pe = v(
|
|
4587
|
-
pe.current =
|
|
4586
|
+
const pe = v(I);
|
|
4587
|
+
pe.current = I, U(() => {
|
|
4588
4588
|
const $ = (ie) => ie instanceof HTMLElement && (ie.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(ie.tagName)), he = (ie) => {
|
|
4589
4589
|
var fe;
|
|
4590
|
-
ie.key === "Escape" && !pe.current && T.current && (ie.stopPropagation(), T.current()), ie.key === " " && !pe.current && !$(ie.target) && (ie.preventDefault(), ie.stopPropagation(), ie.repeat || (fe = O.current) == null || fe.call(O)), (ie.key === "f" || ie.key === "F") && !ie.metaKey && !ie.ctrlKey && !ie.altKey && !pe.current && !$(ie.target) && Js() && (ie.preventDefault(), ie.repeat ||
|
|
4590
|
+
ie.key === "Escape" && !pe.current && T.current && (ie.stopPropagation(), T.current()), ie.key === " " && !pe.current && !$(ie.target) && (ie.preventDefault(), ie.stopPropagation(), ie.repeat || (fe = O.current) == null || fe.call(O)), (ie.key === "f" || ie.key === "F") && !ie.metaKey && !ie.ctrlKey && !ie.altKey && !pe.current && !$(ie.target) && Js() && (ie.preventDefault(), ie.repeat || vn(!ur()));
|
|
4591
4591
|
}, ue = (ie) => {
|
|
4592
4592
|
ie.key === " " && !pe.current && !$(ie.target) && ie.preventDefault();
|
|
4593
4593
|
};
|
|
@@ -4595,7 +4595,7 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4595
4595
|
window.removeEventListener("keydown", he, !0), window.removeEventListener("keyup", ue, !0);
|
|
4596
4596
|
};
|
|
4597
4597
|
}, []);
|
|
4598
|
-
const le = ac("(orientation: landscape) and (max-height: 540px)"), Te = v(null), [je, Ee] =
|
|
4598
|
+
const le = ac("(orientation: landscape) and (max-height: 540px)"), Te = v(null), [je, Ee] = z(null);
|
|
4599
4599
|
Bt(() => {
|
|
4600
4600
|
const $ = Te.current;
|
|
4601
4601
|
if (!$ || (Ee($.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
|
|
@@ -4604,17 +4604,17 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4604
4604
|
}, []);
|
|
4605
4605
|
const Le = t && !E, we = !Le && a && !le && (je == null || je >= 880), _e = !we;
|
|
4606
4606
|
U(() => {
|
|
4607
|
-
if (re(!1), !p.playing ||
|
|
4607
|
+
if (re(!1), !p.playing || I) return;
|
|
4608
4608
|
const $ = setTimeout(() => re(!0), 3e3);
|
|
4609
4609
|
return () => clearTimeout($);
|
|
4610
|
-
}, [p.playing,
|
|
4610
|
+
}, [p.playing, I, K]);
|
|
4611
4611
|
const Pe = v(S);
|
|
4612
4612
|
Pe.current = S;
|
|
4613
4613
|
const Se = v(0), B = ($) => {
|
|
4614
4614
|
if ($.pointerType !== "mouse") return;
|
|
4615
4615
|
const he = Date.now();
|
|
4616
4616
|
!Pe.current && he - Se.current < 1e3 || (Se.current = he, k((ue) => ue + 1));
|
|
4617
|
-
}, W = !we && le, A = v(null),
|
|
4617
|
+
}, W = !we && le, A = v(null), C = l ? l.words.map(($) => $.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
|
|
4618
4618
|
Bt(() => {
|
|
4619
4619
|
const $ = A.current;
|
|
4620
4620
|
if (!$) return;
|
|
@@ -4625,12 +4625,12 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4625
4625
|
}
|
|
4626
4626
|
const Y = (de) => Math.round((de.getBoundingClientRect().top - $.getBoundingClientRect().top + $.scrollTop) / ie), R = Math.max(1, Math.round($.clientHeight / ie)), q = he ? ue.length ? Math.floor(Y(ue[ue.length - 1]) / R) * R * ie : 0 : Ue, ne = Math.max(0, Math.min(Ue, q));
|
|
4627
4627
|
Math.abs(ne - $.scrollTop) > 1 && ($.scrollTop = ne);
|
|
4628
|
-
}, [
|
|
4629
|
-
const [H, ce] =
|
|
4628
|
+
}, [C, W]);
|
|
4629
|
+
const [H, ce] = z(!0), [F, me] = z(!1), Z = v(void 0);
|
|
4630
4630
|
U(() => () => window.clearTimeout(Z.current), []);
|
|
4631
|
-
const
|
|
4631
|
+
const ve = V != null && V.share ? V.share.url(H && V.share.at >= 1 ? Math.floor(V.share.at) : null) : "", ze = Ie(() => we && ve && !p.playing ? rc(ve) : "", [we, ve, p.playing]), Ge = () => {
|
|
4632
4632
|
var $;
|
|
4633
|
-
($ = navigator.clipboard) == null || $.writeText(
|
|
4633
|
+
($ = navigator.clipboard) == null || $.writeText(ve).then(() => {
|
|
4634
4634
|
me(!0), window.clearTimeout(Z.current), Z.current = window.setTimeout(() => me(!1), 1800);
|
|
4635
4635
|
}, () => {
|
|
4636
4636
|
});
|
|
@@ -4643,13 +4643,13 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4643
4643
|
"Start at ",
|
|
4644
4644
|
yt(Math.floor(V.share.at))
|
|
4645
4645
|
] }),
|
|
4646
|
-
/* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children:
|
|
4646
|
+
/* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: ve.replace(/^https?:\/\//, "") }) }),
|
|
4647
4647
|
/* @__PURE__ */ h("div", { className: "gfull__shareacts", children: [
|
|
4648
4648
|
/* @__PURE__ */ h("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: Ge, children: [
|
|
4649
4649
|
/* @__PURE__ */ i(oe, { d: F ? X.check : X.copy, size: 14, sw: 1.8 }),
|
|
4650
4650
|
F ? "Copied" : "Copy link"
|
|
4651
4651
|
] }),
|
|
4652
|
-
/* @__PURE__ */ h("button", { type: "button", className: "gfull__sharebtn", onClick: () => Ar(
|
|
4652
|
+
/* @__PURE__ */ h("button", { type: "button", className: "gfull__sharebtn", onClick: () => Ar(ve, s), children: [
|
|
4653
4653
|
/* @__PURE__ */ i(oe, { d: X.share, size: 14, sw: 1.6 }),
|
|
4654
4654
|
"Share"
|
|
4655
4655
|
] })
|
|
@@ -4657,8 +4657,8 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4657
4657
|
] })
|
|
4658
4658
|
] }), ge = ($, he, ue, ie, fe, Ue = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: $, "aria-label": $, onClick: ie, children: /* @__PURE__ */ i(oe, { d: he, size: (we ? 20 : _e ? 15 : 18) + Ue, sw: ue, style: fe }) }), Ye = /* @__PURE__ */ h("div", { className: "gfull__acts", children: [
|
|
4659
4659
|
f && /* @__PURE__ */ i(Ai, { v: f, size: we ? 20 : _e ? 15 : 18 }),
|
|
4660
|
-
|
|
4661
|
-
Js() && !e && ge(E ? "Exit full screen" : "Full screen", E ? sc : Si, 1.7, () =>
|
|
4660
|
+
b && ge("Share", X.share, 1.6, b),
|
|
4661
|
+
Js() && !e && ge(E ? "Exit full screen" : "Full screen", E ? sc : Si, 1.7, () => vn(!E)),
|
|
4662
4662
|
j && ge("Close player", X.close, 1.7, j)
|
|
4663
4663
|
] }), Ve = (d || g || D) && /* @__PURE__ */ h("div", { className: "gfull__top", children: [
|
|
4664
4664
|
d && ge(d.muted ? "Unmute" : "Mute", d.muted ? X.volumeOff : X.volume, 1.6, d.onToggle),
|
|
@@ -4730,20 +4730,20 @@ function Ei({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
4730
4730
|
] })
|
|
4731
4731
|
] }) }),
|
|
4732
4732
|
/* @__PURE__ */ i("div", { className: `gfull__prog${we ? "" : " gfull__prog--two"}`, children: we ? /* @__PURE__ */ h(xe, { children: [
|
|
4733
|
-
/* @__PURE__ */ i(
|
|
4733
|
+
/* @__PURE__ */ i(kr, { live: o.live, desk: !0, pct: u }),
|
|
4734
4734
|
/* @__PURE__ */ i(jn, { t: p }),
|
|
4735
|
-
/* @__PURE__ */ i(
|
|
4735
|
+
/* @__PURE__ */ i(kn, { pos: o, interactive: !0 }),
|
|
4736
4736
|
/* @__PURE__ */ i("div", { className: "gfull__chip", children: N }),
|
|
4737
4737
|
Ye
|
|
4738
4738
|
] }) : _e ? /* @__PURE__ */ h("div", { className: "gfull__row", children: [
|
|
4739
4739
|
/* @__PURE__ */ i(jn, { t: p, mini: !0 }),
|
|
4740
|
-
/* @__PURE__ */ i(
|
|
4740
|
+
/* @__PURE__ */ i(kn, { pos: o, interactive: !0 }),
|
|
4741
4741
|
/* @__PURE__ */ i("div", { className: "gfull__chip", children: N }),
|
|
4742
4742
|
Ye
|
|
4743
4743
|
] }) : /* @__PURE__ */ h(xe, { children: [
|
|
4744
4744
|
/* @__PURE__ */ h("div", { className: "gfull__row", children: [
|
|
4745
|
-
/* @__PURE__ */ i(
|
|
4746
|
-
/* @__PURE__ */ i(
|
|
4745
|
+
/* @__PURE__ */ i(kr, { live: o.live, pct: u, mark: !0 }),
|
|
4746
|
+
/* @__PURE__ */ i(kn, { pos: o, interactive: !0 })
|
|
4747
4747
|
] }),
|
|
4748
4748
|
/* @__PURE__ */ h("div", { className: "gfull__row", children: [
|
|
4749
4749
|
/* @__PURE__ */ i(jn, { t: p }),
|
|
@@ -4785,7 +4785,7 @@ function hc(t) {
|
|
|
4785
4785
|
return t.translateFailed === t.lang ? { kind: "translateFailed", lang: e } : t.voiceFailed ? { kind: "voiceFailed", lang: e } : t.translating ? { kind: "translating", lang: e } : t.starting != null ? { kind: "starting", lang: e, since: t.starting } : t.relang || t.slowLine ? { kind: "voice", lang: e, since: t.lineSince } : null;
|
|
4786
4786
|
}
|
|
4787
4787
|
function Mc(t, e) {
|
|
4788
|
-
const [n, r] =
|
|
4788
|
+
const [n, r] = z(null), [s, a] = z(!1);
|
|
4789
4789
|
return U(() => {
|
|
4790
4790
|
if (!t) {
|
|
4791
4791
|
r(null), a(!1);
|
|
@@ -4799,7 +4799,7 @@ function Mc(t, e) {
|
|
|
4799
4799
|
}
|
|
4800
4800
|
const gc = (t) => `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
4801
4801
|
function fc({ state: t, line: e, onRetry: n, onOriginal: r }) {
|
|
4802
|
-
const [s, a] =
|
|
4802
|
+
const [s, a] = z(() => Date.now());
|
|
4803
4803
|
U(() => {
|
|
4804
4804
|
if (t.since == null) return;
|
|
4805
4805
|
const d = setInterval(() => a(Date.now()), 1e3);
|
|
@@ -4916,8 +4916,8 @@ const wc = {
|
|
|
4916
4916
|
checking: "Checking the link…",
|
|
4917
4917
|
starting: "Starting the transcription…"
|
|
4918
4918
|
}, Lc = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
|
|
4919
|
-
function
|
|
4920
|
-
const [s, a] =
|
|
4919
|
+
function vc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
|
|
4920
|
+
const [s, a] = z(""), [o, l] = z(!1), [c, u] = z(null), [d, g] = z(null);
|
|
4921
4921
|
U(() => {
|
|
4922
4922
|
const y = (L) => {
|
|
4923
4923
|
L.key === "Escape" && r();
|
|
@@ -4964,16 +4964,16 @@ function kc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
|
|
|
4964
4964
|
] }) });
|
|
4965
4965
|
}
|
|
4966
4966
|
function Ui(t) {
|
|
4967
|
-
const [e, n] =
|
|
4967
|
+
const [e, n] = z(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
|
|
4968
4968
|
return U(() => {
|
|
4969
4969
|
if (t != null) return;
|
|
4970
4970
|
const r = () => n(window.innerWidth >= 880);
|
|
4971
4971
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
4972
4972
|
}, [t]), t ?? e;
|
|
4973
4973
|
}
|
|
4974
|
-
const
|
|
4974
|
+
const kc = { lang: null, subtitles: !0, speakerLabels: !1, wordHighlight: !0, translateAudio: !0, voices: "cloned", removeBackground: !1, muted: !1 };
|
|
4975
4975
|
function jc(t, e) {
|
|
4976
|
-
const n = Li(), [r, s] = gi(), [a, o] =
|
|
4976
|
+
const n = Li(), [r, s] = gi(), [a, o] = z(null), [l, c] = z("main"), u = wr(n, t.lang), d = Ie(() => fi(n, "translation"), [n]), g = (_) => {
|
|
4977
4977
|
e({ lang: _ }), s(_);
|
|
4978
4978
|
}, M = Or({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: g, languages: d, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: r, keepOpen: !0 }), N = () => {
|
|
4979
4979
|
o(null), c("main");
|
|
@@ -4985,23 +4985,23 @@ function jc(t, e) {
|
|
|
4985
4985
|
/* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 18, sw: 1.8 }),
|
|
4986
4986
|
"Back"
|
|
4987
4987
|
] })
|
|
4988
|
-
] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 },
|
|
4988
|
+
] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, I = (_, ee, j) => /* @__PURE__ */ h("div", { className: "srow", children: [
|
|
4989
4989
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
4990
4990
|
/* @__PURE__ */ i("div", { className: "srow__t", children: _ }),
|
|
4991
4991
|
/* @__PURE__ */ i("div", { className: "srow__s", children: ee })
|
|
4992
4992
|
] }),
|
|
4993
4993
|
j
|
|
4994
|
-
] }),
|
|
4994
|
+
] }), b = /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
4995
4995
|
/* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: M.search }),
|
|
4996
4996
|
M.list
|
|
4997
|
-
] }), D = l === "lang" ?
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4997
|
+
] }), D = l === "lang" ? b : l === "subs" ? /* @__PURE__ */ h("div", { style: f, children: [
|
|
4998
|
+
I("Show subtitles", "Captions over the video", /* @__PURE__ */ i(Nt, { checked: t.subtitles, onChange: (_) => e({ subtitles: _ }), label: "Show subtitles" })),
|
|
4999
|
+
I("Show speaker labels", "Who is speaking, before each line", /* @__PURE__ */ i(Nt, { checked: t.speakerLabels, onChange: (_) => e({ speakerLabels: _ }), label: "Show speaker labels" })),
|
|
5000
|
+
I("Highlight words", "Follow each word as it is spoken", /* @__PURE__ */ i(Nt, { checked: t.wordHighlight, onChange: (_) => e({ wordHighlight: _ }), label: "Highlight words" }))
|
|
5001
5001
|
] }) : l === "audio" ? /* @__PURE__ */ h("div", { style: f, children: [
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5002
|
+
I("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(Nt, { checked: t.translateAudio && !!t.lang, onChange: (_) => e({ translateAudio: _ }), label: "Translate audio", disabled: !t.lang })),
|
|
5003
|
+
I("Voices", t.voices === "cloned" ? "Each speaker in their own cloned voice, where they agreed to it" : "Synthetic voices matched to each speaker", /* @__PURE__ */ i(hr, { value: t.voices, onChange: (_) => e({ voices: _ }), size: "sm", options: [{ value: "synthetic", label: "Synthetic" }, { value: "cloned", label: "Cloned" }] })),
|
|
5004
|
+
I(In, "Takes out everything that isn't speech: music, ambience and noise.", /* @__PURE__ */ i(Nt, { checked: t.removeBackground, onChange: (_) => e({ removeBackground: _ }), label: In }))
|
|
5005
5005
|
] }) : /* @__PURE__ */ h("div", { style: f, children: [
|
|
5006
5006
|
/* @__PURE__ */ h("div", { className: "srow srow--tap", role: "button", onClick: () => c("lang"), children: [
|
|
5007
5007
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -5028,7 +5028,7 @@ function jc(t, e) {
|
|
|
5028
5028
|
L
|
|
5029
5029
|
] })
|
|
5030
5030
|
] }), V = /* @__PURE__ */ h(xe, { children: [
|
|
5031
|
-
/* @__PURE__ */ i(Vt, { open: a === "lang", onClose: N, title: "LANGUAGE", kind: "picker", sticky: !0, children: /* @__PURE__ */ i(Mr, { children:
|
|
5031
|
+
/* @__PURE__ */ i(Vt, { open: a === "lang", onClose: N, title: "LANGUAGE", kind: "picker", header: M.search, sticky: !0, children: /* @__PURE__ */ i(Mr, { children: M.list }) }),
|
|
5032
5032
|
/* @__PURE__ */ i(Vt, { open: a === "settings", onClose: N, 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(Mr, { children: D }) })
|
|
5033
5033
|
] });
|
|
5034
5034
|
return {
|
|
@@ -5103,9 +5103,18 @@ function Cc({ t }) {
|
|
|
5103
5103
|
] });
|
|
5104
5104
|
}
|
|
5105
5105
|
function bc() {
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5106
|
+
const t = v(null), [e, n] = z(!0), [r, s] = z(() => typeof document > "u" || !document.hidden);
|
|
5107
|
+
return U(() => {
|
|
5108
|
+
const a = () => s(!document.hidden);
|
|
5109
|
+
document.addEventListener("visibilitychange", a);
|
|
5110
|
+
const o = t.current;
|
|
5111
|
+
let l = null;
|
|
5112
|
+
return o && typeof IntersectionObserver < "u" && (l = new IntersectionObserver(([c]) => n(c.isIntersecting)), l.observe(o)), () => {
|
|
5113
|
+
document.removeEventListener("visibilitychange", a), l == null || l.disconnect();
|
|
5114
|
+
};
|
|
5115
|
+
}, []), /* @__PURE__ */ i("div", { ref: t, className: `vsp-prov${e && r ? "" : " vsp-prov--still"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("div", { className: "vsp-prov__plane", children: Array.from({ length: zc }, (a, o) => {
|
|
5116
|
+
const l = Oc(o);
|
|
5117
|
+
return /* @__PURE__ */ i("div", { className: `vsp-prov__row${o % 2 ? " vsp-prov__row--rev" : ""}`, style: { animationDuration: `${80 + o * 11}s`, animationDelay: `-${o * 17}s` }, children: Array.from({ length: Ic }, (c, u) => l.map((d, g) => /* @__PURE__ */ i(Cc, { t: d }, `${u}-${g}`))) }, o);
|
|
5109
5118
|
}) }) });
|
|
5110
5119
|
}
|
|
5111
5120
|
const Ri = {
|
|
@@ -5124,7 +5133,7 @@ function dr(t) {
|
|
|
5124
5133
|
}
|
|
5125
5134
|
}
|
|
5126
5135
|
function xc(t, e) {
|
|
5127
|
-
const [n, r] =
|
|
5136
|
+
const [n, r] = z(!1), [s, a] = z(null), [o, l] = z(null), [c, u] = z(() => yc(t)), d = Ke((N) => {
|
|
5128
5137
|
if (n) return;
|
|
5129
5138
|
r(!0), l(null);
|
|
5130
5139
|
let p;
|
|
@@ -5154,7 +5163,7 @@ function Sc({ poster: t, src: e }) {
|
|
|
5154
5163
|
const Ac = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
|
|
5155
5164
|
} };
|
|
5156
5165
|
function Cn({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
|
|
5157
|
-
const l = jc(t.prefs, t.set), c = Ui(), u = v(null), [d, g] =
|
|
5166
|
+
const l = jc(t.prefs, t.set), c = Ui(), u = v(null), [d, g] = z(!1);
|
|
5158
5167
|
Bt(() => {
|
|
5159
5168
|
var L;
|
|
5160
5169
|
const N = (L = u.current) == null ? void 0 : L.parentElement;
|
|
@@ -5192,7 +5201,7 @@ function Ec({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, on
|
|
|
5192
5201
|
] });
|
|
5193
5202
|
}
|
|
5194
5203
|
function _c({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
|
|
5195
|
-
const [a, o] =
|
|
5204
|
+
const [a, o] = z(""), l = v(null), c = v(null), u = a.trim(), d = ei.test(u), g = () => {
|
|
5196
5205
|
if (!d || e.busy) return;
|
|
5197
5206
|
const p = /^https?:\/\//i.test(u) ? u : `https://${u}`;
|
|
5198
5207
|
s(p), e.start(p, !1);
|
|
@@ -5240,7 +5249,7 @@ function Yc({ idle: t, message: e, onRetry: n, page: r }) {
|
|
|
5240
5249
|
] });
|
|
5241
5250
|
}
|
|
5242
5251
|
function Uc(t, e, n) {
|
|
5243
|
-
const [r, s] =
|
|
5252
|
+
const [r, s] = z(t && e ? void 0 : null);
|
|
5244
5253
|
return U(() => {
|
|
5245
5254
|
if (!t) {
|
|
5246
5255
|
s(null);
|
|
@@ -5305,7 +5314,7 @@ const Kc = fa(function(e, n) {
|
|
|
5305
5314
|
return (k = r.current) == null ? void 0 : k.toggle();
|
|
5306
5315
|
}
|
|
5307
5316
|
}), []);
|
|
5308
|
-
const [s, a] =
|
|
5317
|
+
const [s, a] = z({ id: e.id ?? "", token: e.token });
|
|
5309
5318
|
U(() => {
|
|
5310
5319
|
a({ id: e.id ?? "", token: e.token });
|
|
5311
5320
|
}, [e.id, e.token, e.src]);
|
|
@@ -5313,37 +5322,37 @@ const Kc = fa(function(e, n) {
|
|
|
5313
5322
|
U(() => {
|
|
5314
5323
|
o != null && o.id && a({ id: o.id, token: e.token });
|
|
5315
5324
|
}, [o == null ? void 0 : o.id]);
|
|
5316
|
-
const [l, c] =
|
|
5325
|
+
const [l, c] = z(null), [u, d] = z(() => ({ ...kc, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, k]) => k !== void 0)) })), [g, M] = z({}), N = { prefs: u, set: (k) => {
|
|
5317
5326
|
d((ae) => ({ ...ae, ...k })), M((ae) => ({ ...ae, ...k }));
|
|
5318
5327
|
}, shareUrl: (K = e.shareUrl) == null ? void 0 : K.call(e, null) }, { muted: p, ...y } = g;
|
|
5319
5328
|
U(() => {
|
|
5320
5329
|
c(null);
|
|
5321
5330
|
}, [e.id, e.src]);
|
|
5322
|
-
const L = e.src ?? l, m = !s.id && !!L && (l != null || o !== void 0), f = !s.id && !e.src && !l,
|
|
5331
|
+
const L = e.src ?? l, m = !s.id && !!L && (l != null || o !== void 0), f = !s.id && !e.src && !l, I = wi({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: b, gone: D, error: V, reload: _ } = Ao(I, s.id), ee = Eo(I, (b == null ? void 0 : b.recording.id) ?? null), j = Ie(() => Do(I, ee), [I, ee]);
|
|
5323
5332
|
U(() => {
|
|
5324
5333
|
var k;
|
|
5325
|
-
|
|
5326
|
-
}, [
|
|
5334
|
+
b && ((k = e.onSource) == null || k.call(e, b));
|
|
5335
|
+
}, [b]), U(() => {
|
|
5327
5336
|
var k;
|
|
5328
5337
|
V && ((k = e.onError) == null || k.call(e, V));
|
|
5329
5338
|
}, [V]);
|
|
5330
5339
|
const E = Ui(e.desk), Q = (e.layout ?? "embed") === "embed", T = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), O = Ke((k) => a({ id: k.transcriptionId, token: null, listen: { transcriptionId: k.transcriptionId, recordingId: k.recordingId, token: k.token } }), []), S = xc(T, O), re = v(null);
|
|
5331
|
-
return U(() => (Ks(Q ? re.current : null), () => Ks(null)), [Q]), /* @__PURE__ */ i(Oo, { value: j, children: /* @__PURE__ */ i("div", { ref: re, className: `vsp${Q ? " 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(_c, { idle: N, connect: S, page: !Q, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Ec, { idle: N, src: L, ask: !l, connect: S, page: !Q, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? V && !
|
|
5340
|
+
return U(() => (Ks(Q ? re.current : null), () => Ks(null)), [Q]), /* @__PURE__ */ i(Oo, { value: j, children: /* @__PURE__ */ i("div", { ref: re, className: `vsp${Q ? " 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(_c, { idle: N, connect: S, page: !Q, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Ec, { idle: N, src: L, ask: !l, connect: S, page: !Q, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? V && !b ? /* @__PURE__ */ i(Yc, { idle: N, message: V.message, onRetry: _, page: !Q }) : /* @__PURE__ */ i(Qc, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: j, shared: b, gone: D, loadError: V, reread: _, desk: E, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (k) => a({ id: k.transcriptionId, token: null, listen: { transcriptionId: k.transcriptionId, recordingId: k.recordingId, token: k.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
|
|
5332
5341
|
});
|
|
5333
5342
|
function Qc(t) {
|
|
5334
|
-
var Ms, gs, fs, ps, Ns, ms, ys, Ts, ws, Ls,
|
|
5335
|
-
const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => Pc(t), []), u = (t.mode ?? "video") === "video", [d, g] =
|
|
5343
|
+
var Ms, gs, fs, ps, Ns, ms, ys, Ts, ws, Ls, vs, ks, js, zs, Is, Os, Cs, bs, xs, Ds, Ss, As;
|
|
5344
|
+
const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => Pc(t), []), u = (t.mode ?? "video") === "video", [d, g] = z(t.loadError);
|
|
5336
5345
|
U(() => {
|
|
5337
5346
|
t.loadError && g(t.loadError);
|
|
5338
5347
|
}, [t.loadError]);
|
|
5339
|
-
const [M, N] =
|
|
5348
|
+
const [M, N] = z("none"), [p, y] = z(!1), [L, m] = z(""), [f, I] = Ul(), [b, D] = z(null), [V, _] = z(u ? "listen" : "read"), [ee, j] = z(!1), E = v(null), Q = v(/* @__PURE__ */ new Map()), [T, O] = z("main"), S = (w) => {
|
|
5340
5349
|
const Ne = document.querySelector(".vs-sheet--settings"), Qe = Ne == null ? void 0 : Ne.parentElement;
|
|
5341
5350
|
Ne && Qe && T === "main" && w !== "main" && Qe.style.setProperty("--vs-sheet-top", `${Math.round(Ne.getBoundingClientRect().top - Qe.getBoundingClientRect().top)}px`), O(w);
|
|
5342
5351
|
};
|
|
5343
5352
|
U(() => {
|
|
5344
5353
|
ee || S("main");
|
|
5345
5354
|
}, [ee]);
|
|
5346
|
-
const [re, K] =
|
|
5355
|
+
const [re, K] = z(u), k = (n == null ? void 0 : n.recording) ?? null, ae = (k == null ? void 0 : k.id) ?? null, [te, G] = z(l.lang), J = typeof te == "string" ? te : null, [pe, le] = z(l.labels), [Te, je] = z(l.words), [Ee, Le] = z(l.cc), [we, _e] = z(l.translateAudio), [Pe, Se] = z(l.clonedVoices), [B, W] = z(l.removeBackground), A = t.settings;
|
|
5347
5356
|
U(() => {
|
|
5348
5357
|
(A == null ? void 0 : A.lang) !== void 0 && G(A.lang);
|
|
5349
5358
|
}, [A == null ? void 0 : A.lang]), U(() => {
|
|
@@ -5359,7 +5368,7 @@ function Qc(t) {
|
|
|
5359
5368
|
}, [A == null ? void 0 : A.voices]), U(() => {
|
|
5360
5369
|
(A == null ? void 0 : A.removeBackground) !== void 0 && W(A.removeBackground);
|
|
5361
5370
|
}, [A == null ? void 0 : A.removeBackground]);
|
|
5362
|
-
const
|
|
5371
|
+
const C = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, H = u && !we;
|
|
5363
5372
|
U(() => {
|
|
5364
5373
|
if (!t.syncUrl) return;
|
|
5365
5374
|
const w = new URL(window.location.href);
|
|
@@ -5367,16 +5376,16 @@ function Qc(t) {
|
|
|
5367
5376
|
}, [J, pe, Te, Ee, we, Pe, B]), U(() => {
|
|
5368
5377
|
n && !n.allowTranslate && J && G(null);
|
|
5369
5378
|
}, [n, J]);
|
|
5370
|
-
const { model: ce, error: F, clearError: me, setLanguage: Z, mergeTranslations:
|
|
5379
|
+
const { model: ce, error: F, clearError: me, setLanguage: Z, mergeTranslations: ve, translating: ze, translateFailed: Ge, shownLang: Ae } = Ro(ae, {
|
|
5371
5380
|
lang: null,
|
|
5372
5381
|
onFrame: (w) => {
|
|
5373
5382
|
w.type === "job.progress" && D({ state: w.state, processedS: w.processedS ?? 0, totalS: w.totalS ?? null, segmentsDone: w.segmentsDone ?? 0, segmentsTotal: w.segmentsTotal ?? null, pct: w.pct ?? 0, error: w.error ?? null });
|
|
5374
5383
|
}
|
|
5375
|
-
}), ge = Ie(() => po(ce).filter((w) => !w.suppressed), [ce]), Ye = Po((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(or((Ye == null ? void 0 : Ye.state) ?? ((Ms = n == null ? void 0 : n.job) == null ? void 0 : Ms.state))), $ = Ve ? Ye :
|
|
5384
|
+
}), ge = Ie(() => po(ce).filter((w) => !w.suppressed), [ce]), Ye = Po((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(or((Ye == null ? void 0 : Ye.state) ?? ((Ms = n == null ? void 0 : n.job) == null ? void 0 : Ms.state))), $ = Ve ? Ye : b ?? Ye, he = !!b && !["done", "failed", "stopped"].includes(or(b.state)), ue = v(0);
|
|
5376
5385
|
U(() => {
|
|
5377
5386
|
!Ve || !he || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
|
|
5378
|
-
}, [Ve, he,
|
|
5379
|
-
const ie = or(($ == null ? void 0 : $.state) ?? ((gs = n == null ? void 0 : n.job) == null ? void 0 : gs.state)), fe = !!ae && (ie === "transcribing" || ie === "queued"), Ue = u && !r && (!n || (fe || ie === "cropping") && ge.length === 0), Y = fe ? ($ == null ? void 0 : $.pct) ?? 0 : 100, R = $o(n == null ? void 0 : n.job, $) ?? (k == null ? void 0 : k.mediaDurationS) ?? null, q = ((fs = ce.segments.values().next().value) == null ? void 0 : fs.language) ?? (k == null ? void 0 : k.spokenLanguage) ?? null, ne = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((ms = (Ns = (ps = n == null ? void 0 : n.job) == null ? void 0 : ps.source) == null ? void 0 : Ns.name) == null ? void 0 : ms.trim()) || null, Oe = n ? ((ys = n.name) == null ? void 0 : ys.trim()) || de : null, ye = !!((Ts = n == null ? void 0 : n.job) != null && Ts.hasAudio),
|
|
5387
|
+
}, [Ve, he, b == null ? void 0 : b.state, b == null ? void 0 : b.processedS, o]);
|
|
5388
|
+
const ie = or(($ == null ? void 0 : $.state) ?? ((gs = n == null ? void 0 : n.job) == null ? void 0 : gs.state)), fe = !!ae && (ie === "transcribing" || ie === "queued"), Ue = u && !r && (!n || (fe || ie === "cropping") && ge.length === 0), Y = fe ? ($ == null ? void 0 : $.pct) ?? 0 : 100, R = $o(n == null ? void 0 : n.job, $) ?? (k == null ? void 0 : k.mediaDurationS) ?? null, q = ((fs = ce.segments.values().next().value) == null ? void 0 : fs.language) ?? (k == null ? void 0 : k.spokenLanguage) ?? null, ne = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((ms = (Ns = (ps = n == null ? void 0 : n.job) == null ? void 0 : ps.source) == null ? void 0 : Ns.name) == null ? void 0 : ms.trim()) || null, Oe = n ? ((ys = n.name) == null ? void 0 : ys.trim()) || de : null, ye = !!((Ts = n == null ? void 0 : n.job) != null && Ts.hasAudio), ke = (ws = n == null ? void 0 : n.job) == null ? void 0 : ws.source, Ce = !ye && !!ke && (ke.kind !== "url" || ke.bytes != null) && (ie === "transcribing" || ie === "queued" || ie === "done"), Ze = ae && (n != null && n.allowDownload) && ye ? ba(e.origin, ae, e.cred) : ae && (n != null && n.allowDownload) && Ce ? nr(e.origin, ae, "source", e.cred) : null, $e = ge[ge.length - 1], ot = $e ? ((Ls = $e.words[$e.words.length - 1]) == null ? void 0 : Ls.end) ?? $e.start : 0, rt = u && fe ? Math.max(ot, ($ == null ? void 0 : $.processedS) ?? 0) : null, gt = Vl(Ze, (ye || Ce) && !!(n != null && n.allowDownload), ge, R, Ce ? ((ks = (vs = n == null ? void 0 : n.job) == null ? void 0 : vs.crop) == null ? void 0 : ks.startS) ?? 0 : 0, rt), be = ((zs = (js = n == null ? void 0 : n.job) == null ? void 0 : js.source) == null ? void 0 : zs.kind) === "url" ? zi(n.job.source.url) : null, st = Bl(ge, R, ((Os = (Is = n == null ? void 0 : n.job) == null ? void 0 : Is.crop) == null ? void 0 : Os.startS) ?? 0, rt), He = !!be, it = He ? st.player : gt, lt = Li(), Ht = v(null), se = Zl({ forcedVoice: t.voice ?? null, recordingId: ae, model: ce, rows: ge, lenS: R, ended: !!ae && !fe, cred: e.cred, langs: lt, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: te, setPickedLang: G, side: s && !re ? Gl : void 0, hearOriginal: H, timed: !!be, stockVoices: u && !Pe, stickyPicker: u, pickerBusy: Ht.current }), Wt = v(null);
|
|
5380
5389
|
U(() => {
|
|
5381
5390
|
!ae || Wt.current === J || (Wt.current = J, Z(J));
|
|
5382
5391
|
}, [J, ae]);
|
|
@@ -5399,25 +5408,25 @@ function Qc(t) {
|
|
|
5399
5408
|
U(() => {
|
|
5400
5409
|
fe && !x.playing && Ct.current && (Ct.current.scrollTop = Ct.current.scrollHeight);
|
|
5401
5410
|
}, [fe, ge.length]);
|
|
5402
|
-
const ct = Jl(Ct, ge, p, L, y), nn = /* @__PURE__ */ i(Kl, { open: p, q: L, onQ: m, onClose: () => y(!1), hits: ct, desk: s, inline: s }), Je = (n == null ? void 0 : n.name) || t.src || o, ut = !!(n != null && n.allowDownload), Ft = !!(n != null && n.allowExport), dt = se.readLang,
|
|
5411
|
+
const ct = Jl(Ct, ge, p, L, y), nn = /* @__PURE__ */ i(Kl, { open: p, q: L, onQ: m, onClose: () => y(!1), hits: ct, desk: s, inline: s }), Je = (n == null ? void 0 : n.name) || t.src || o, ut = !!(n != null && n.allowDownload), Ft = !!(n != null && n.allowExport), dt = se.readLang, vt = dt ? ((Cs = lt == null ? void 0 : lt.languages.find((w) => w.code === dt)) == null ? void 0 : Cs.name) ?? dt.toUpperCase() : null, rn = async () => {
|
|
5403
5412
|
if (ae)
|
|
5404
5413
|
try {
|
|
5405
5414
|
if (dt && se.canSpeak) {
|
|
5406
|
-
|
|
5415
|
+
I(`Preparing ${Je} in ${vt}${se.readVoiceName ? `, read by ${se.readVoiceName}` : ""} — the download starts when it is ready.`), await Ho(e, { recordingId: ae, lang: dt, voiceKey: se.readVoiceKey, cred: e.cred, request: se.requestTrack }), I(`Downloading ${Je} in ${vt}.`);
|
|
5407
5416
|
return;
|
|
5408
5417
|
}
|
|
5409
5418
|
if (ye) {
|
|
5410
|
-
|
|
5419
|
+
I(`Preparing ${Je} as MP3 — the download starts when it is ready.`), await Bo(nr(e.origin, ae, "delivery", e.cred)), I(`Downloading ${Je}.`);
|
|
5411
5420
|
return;
|
|
5412
5421
|
}
|
|
5413
|
-
Sr(nr(e.origin, ae, "source", e.cred)),
|
|
5422
|
+
Sr(nr(e.origin, ae, "source", e.cred)), I(`Downloading ${Je} — the full audio, since the transcript is still being written.`);
|
|
5414
5423
|
} catch (w) {
|
|
5415
5424
|
throw g(Tt(w)), w;
|
|
5416
5425
|
}
|
|
5417
5426
|
}, bt = (w) => {
|
|
5418
5427
|
if (!ae) return;
|
|
5419
|
-
const Ne = Tr.find((Fe) => Fe.key === w).name, Qe =
|
|
5420
|
-
return Vo(e, ae, w, { lang: dt }).then(() =>
|
|
5428
|
+
const Ne = Tr.find((Fe) => Fe.key === w).name, Qe = vt ? ` in ${vt}` : "";
|
|
5429
|
+
return Vo(e, ae, w, { lang: dt }).then(() => I(fe ? `${Ne} exported${Qe} for the first ${ge.length} segments — the rest is still transcribing.` : `${Ne} exported${Qe}.`)).catch((Fe) => {
|
|
5421
5430
|
throw g(Tt(Fe)), Fe;
|
|
5422
5431
|
});
|
|
5423
5432
|
}, _t = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", ht = fe ? "var(--brand)" : "var(--ink-28)", Yt = Qo($, ge.length), Xe = x.has && (!se.relang || !!be), qe = v(x);
|
|
@@ -5439,25 +5448,25 @@ function Qc(t) {
|
|
|
5439
5448
|
});
|
|
5440
5449
|
const Rt = v(!1), We = v(!1);
|
|
5441
5450
|
u && (li.video = !0);
|
|
5442
|
-
const [xt,
|
|
5451
|
+
const [xt, kt] = z(!1), [Dn, an] = z(!1);
|
|
5443
5452
|
U(() => {
|
|
5444
5453
|
if (!u || Rt.current || !Xe || !re || Ue || t.autoplay === !1) return;
|
|
5445
5454
|
Rt.current = !0;
|
|
5446
5455
|
const w = (Fe) => {
|
|
5447
5456
|
qe.current.playing || We.current || (qe.current.toggle(), Fe > 0 && setTimeout(() => w(Fe - 1), 1500));
|
|
5448
5457
|
}, Ne = () => {
|
|
5449
|
-
qe.current.muted || qe.current.toggleMute(),
|
|
5458
|
+
qe.current.muted || qe.current.toggleMute(), kt(!0), w(3);
|
|
5450
5459
|
}, Qe = qe.current;
|
|
5451
5460
|
if (!Qe.autoplay || t.startMuted) {
|
|
5452
5461
|
Ne();
|
|
5453
5462
|
return;
|
|
5454
5463
|
}
|
|
5455
5464
|
Qe.autoplay().then((Fe) => {
|
|
5456
|
-
Fe === !1 ?
|
|
5465
|
+
Fe === !1 ? kt(!0) : Fe == null && !We.current && Ne();
|
|
5457
5466
|
});
|
|
5458
5467
|
}, [u, Xe, re, Ue]);
|
|
5459
5468
|
const jt = v(!1), Sn = () => {
|
|
5460
|
-
xt && (
|
|
5469
|
+
xt && (kt(!1), jt.current = !0, setTimeout(() => {
|
|
5461
5470
|
jt.current = !1;
|
|
5462
5471
|
}, 500), qe.current.muted && qe.current.toggleMute());
|
|
5463
5472
|
}, An = () => {
|
|
@@ -5465,14 +5474,14 @@ function Qc(t) {
|
|
|
5465
5474
|
jt.current = !1;
|
|
5466
5475
|
return;
|
|
5467
5476
|
}
|
|
5468
|
-
|
|
5477
|
+
kt(!1), qe.current.toggleMute();
|
|
5469
5478
|
}, En = () => {
|
|
5470
5479
|
if (jt.current) {
|
|
5471
5480
|
jt.current = !1;
|
|
5472
5481
|
return;
|
|
5473
5482
|
}
|
|
5474
5483
|
We.current = !0, qe.current.toggle();
|
|
5475
|
-
}, on = (w) => /* @__PURE__ */ i(Yl, { player: x, size: w }), Gt = !!ae && !fe, [Zt, qt] =
|
|
5484
|
+
}, on = (w) => /* @__PURE__ */ i(Yl, { player: x, size: w }), Gt = !!ae && !fe, [Zt, qt] = z(!1);
|
|
5476
5485
|
U(() => {
|
|
5477
5486
|
if (!ze) {
|
|
5478
5487
|
qt(!1);
|
|
@@ -5481,9 +5490,9 @@ function Qc(t) {
|
|
|
5481
5490
|
const w = setTimeout(() => qt(!0), 180);
|
|
5482
5491
|
return () => clearTimeout(w);
|
|
5483
5492
|
}, [ze]);
|
|
5484
|
-
const P = Zt ? Ae : J, De = rl(ae, J, ge,
|
|
5493
|
+
const P = Zt ? Ae : J, De = rl(ae, J, ge, ve), Be = ml(yl(k), ae, se.readLang), zt = ut || Ft, Kt = (((xs = (bs = n == null ? void 0 : n.job) == null ? void 0 : bs.crop) == null ? void 0 : xs.startS) ?? 0) + cr(x, ge), _n = V === "listen", Dt = _n && (!!be || u), Qi = (w) => {
|
|
5485
5494
|
it.pause(), se.player.pause(), _(w), w === "read" && re && (Xt(!1), K(!1));
|
|
5486
|
-
}, Re = se.barChip, Pt =
|
|
5495
|
+
}, Re = se.barChip, Pt = ki(Re.label), Yr = /* @__PURE__ */ i(hr, { value: V, onChange: Qi, bordered: !1, options: dc(Pt, !!be) }), Qt = [...Gt ? [{ key: "summary", label: "Summary" }] : [], ...zt ? [{ key: "export", label: "Export" }] : []], Ur = (w) => /* @__PURE__ */ h(xe, { children: [
|
|
5487
5496
|
w === "summary" && Gt && /* @__PURE__ */ i(Tl, { s: Be }),
|
|
5488
5497
|
w === "export" && /* @__PURE__ */ i(Nl, { audio: ut ? { name: Je, meta: dt && se.canSpeak || ye ? `MP3${R ? ` · ${yt(R)}` : ""}` : "ORIGINAL AUDIO", onClick: rn } : null, formats: Ft, onExport: bt })
|
|
5489
5498
|
] }), $i = (w) => /* @__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: yt(x.t), durLabel: yt(x.dur), stepLabel: w ? `${x.idx + 1} / ${ge.length}` : "", onSeek: se.relang ? Wl : x.seekRow, onSeekFrac: se.relang ? void 0 : x.seekFrac, onScrubStart: x.hold, onScrubEnd: x.release }), Rr = {
|
|
@@ -5519,13 +5528,13 @@ function Qc(t) {
|
|
|
5519
5528
|
ho(Xe ? { playing: x.playing, toggle: () => {
|
|
5520
5529
|
We.current = !0, x.toggle();
|
|
5521
5530
|
}, next: x.next, prev: x.prev } : null, Oe);
|
|
5522
|
-
const Vn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, Hn = (w, Ne) => !Re.can || !
|
|
5531
|
+
const Vn = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, Hn = (w, Ne) => !Re.can || !C.language ? null : u ? /* @__PURE__ */ h("button", { type: "button", className: "gfull__btn", title: Ot ? `${Re.label ?? Re.code}: still being prepared` : Re.label ?? Re.code, "aria-label": `Language: ${Re.label ?? Re.code}`, "aria-busy": Ot || void 0, onClick: () => {
|
|
5523
5532
|
j(!1), Re.onClick();
|
|
5524
5533
|
}, style: { position: "relative" }, children: [
|
|
5525
5534
|
/* @__PURE__ */ i("span", { style: { fontSize: Ne === "sm" ? 17 : 21, lineHeight: 1 }, children: Re.flag }),
|
|
5526
5535
|
Ot && /* @__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)" }) })
|
|
5527
5536
|
] }) : /* @__PURE__ */ i(zn, { flag: Re.flag, code: Re.code, label: Re.label, bordered: !1, size: Ne, onClick: Re.onClick, style: w }), Hr = { on: !1, title: "Voices", onClick: () => {
|
|
5528
|
-
} }, [qi, Ki] =
|
|
5537
|
+
} }, [qi, Ki] = z(!1);
|
|
5529
5538
|
U(() => {
|
|
5530
5539
|
x.t > 0.3 && Ki(!0);
|
|
5531
5540
|
}, [x.t]);
|
|
@@ -5549,7 +5558,7 @@ function Qc(t) {
|
|
|
5549
5558
|
var w;
|
|
5550
5559
|
(w = Mn.current) == null || w.call(Mn, Jr);
|
|
5551
5560
|
}, [Xi]);
|
|
5552
|
-
const gn = et && et.speaker >= 0 && hn ? xr(ce, et.speaker) : null, [ea, Xr] =
|
|
5561
|
+
const gn = et && et.speaker >= 0 && hn ? xr(ce, et.speaker) : null, [ea, Xr] = z(!1), [Fn, es] = z(null), [ta, ts] = z(null), Gn = v(void 0);
|
|
5553
5562
|
U(() => () => window.clearTimeout(Gn.current), []);
|
|
5554
5563
|
const Zn = v(void 0);
|
|
5555
5564
|
U(() => () => window.clearTimeout(Zn.current), []);
|
|
@@ -5588,7 +5597,7 @@ function Qc(t) {
|
|
|
5588
5597
|
We.current = !0, qe.current.toggle();
|
|
5589
5598
|
},
|
|
5590
5599
|
toggleMute: () => {
|
|
5591
|
-
|
|
5600
|
+
kt(!1), qe.current.toggleMute();
|
|
5592
5601
|
}
|
|
5593
5602
|
}, U(() => () => {
|
|
5594
5603
|
t.handle.current = null;
|
|
@@ -5682,7 +5691,7 @@ function Qc(t) {
|
|
|
5682
5691
|
as("srt", "Subtitles", "SRT / VTT caption cues, ready for a video editor or a player"),
|
|
5683
5692
|
as("pdf", "PDF", "Formatted transcript in paragraphs, with timestamps and speaker labels")
|
|
5684
5693
|
] }) : /* @__PURE__ */ i("div", { style: Nn, children: [
|
|
5685
|
-
Re.can &&
|
|
5694
|
+
Re.can && C.language && /* @__PURE__ */ h("div", { className: "srow srow--tap", role: "button", onClick: () => S("lang"), children: [
|
|
5686
5695
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5687
5696
|
/* @__PURE__ */ i("div", { className: "srow__t", children: "Language" }),
|
|
5688
5697
|
/* @__PURE__ */ i("div", { className: "srow__s", children: J ? `Translated to ${Re.label ?? J.toUpperCase()}` : "Original language" })
|
|
@@ -5690,25 +5699,25 @@ function Qc(t) {
|
|
|
5690
5699
|
/* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Re.flag }),
|
|
5691
5700
|
pn
|
|
5692
5701
|
] }, "lang"),
|
|
5693
|
-
|
|
5702
|
+
C.subtitles && /* @__PURE__ */ h("div", { className: "srow srow--tap", role: "button", onClick: () => S("subs"), children: [
|
|
5694
5703
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5695
5704
|
/* @__PURE__ */ i("div", { className: "srow__t", children: "Subtitles" }),
|
|
5696
5705
|
/* @__PURE__ */ i("div", { className: "srow__s", children: Ee ? "On · speaker labels and word highlighting" : "Off" })
|
|
5697
5706
|
] }),
|
|
5698
5707
|
pn
|
|
5699
5708
|
] }, "subs"),
|
|
5700
|
-
|
|
5709
|
+
C.audio && /* @__PURE__ */ h("div", { className: "srow srow--tap", role: "button", onClick: () => S("audio"), children: [
|
|
5701
5710
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5702
5711
|
/* @__PURE__ */ i("div", { className: "srow__t", children: "Audio" }),
|
|
5703
5712
|
/* @__PURE__ */ i("div", { className: "srow__s", children: Fi })
|
|
5704
5713
|
] }),
|
|
5705
5714
|
pn
|
|
5706
5715
|
] }, "audio"),
|
|
5707
|
-
|
|
5716
|
+
C.export && Ft && !!ae && /* @__PURE__ */ h("div", { className: "srow srow--tap", role: "button", onClick: () => S("export"), children: [
|
|
5708
5717
|
/* @__PURE__ */ h("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
5709
5718
|
/* @__PURE__ */ h("div", { className: "srow__t", children: [
|
|
5710
5719
|
"Export",
|
|
5711
|
-
|
|
5720
|
+
vt ? ` in ${vt}` : ""
|
|
5712
5721
|
] }),
|
|
5713
5722
|
/* @__PURE__ */ i("div", { className: "srow__s", children: "Subtitles (SRT / VTT) or a PDF of the transcript" })
|
|
5714
5723
|
] }),
|
|
@@ -5739,8 +5748,8 @@ function Qc(t) {
|
|
|
5739
5748
|
desk: s,
|
|
5740
5749
|
pos: Rr,
|
|
5741
5750
|
mute: { muted: x.muted, onToggle: An },
|
|
5742
|
-
cc:
|
|
5743
|
-
noFull: !
|
|
5751
|
+
cc: C.subtitles ? { on: Ee, onToggle: () => Le((w) => !w) } : void 0,
|
|
5752
|
+
noFull: !C.fullscreen,
|
|
5744
5753
|
ad: Dn,
|
|
5745
5754
|
wait: tt && !Rn ? /* @__PURE__ */ i(fc, { state: tt, line: cn ? Kr.map((w) => w.t + w.sp).join("") : null, onRetry: Gi, onOriginal: Zi }) : x.edgeWait ? `Transcribing ${Math.round(Y)}% — it plays on as more is written` : null,
|
|
5746
5755
|
pct: fe ? Math.round(Y) : null,
|
|
@@ -5752,12 +5761,12 @@ function Qc(t) {
|
|
|
5752
5761
|
voices: null,
|
|
5753
5762
|
voicesBtn: u ? null : Hr,
|
|
5754
5763
|
sheetOpen: se.sheetsOpen || ee,
|
|
5755
|
-
onShare: u &&
|
|
5756
|
-
onSettings: u &&
|
|
5764
|
+
onShare: u && C.share ? ra : void 0,
|
|
5765
|
+
onSettings: u && C.settings ? () => {
|
|
5757
5766
|
se.closePicker(), j((w) => !w);
|
|
5758
5767
|
} : void 0,
|
|
5759
5768
|
compact: !!t.compact,
|
|
5760
|
-
paused: { title: Je, summary: Be.state === "ready" ? Be.summary ?? null : null, share:
|
|
5769
|
+
paused: { title: Je, summary: Be.state === "ready" ? Be.summary ?? null : null, share: C.share && (t.shareUrl || !t.onShare) ? { url: ns, at: x.t } : null },
|
|
5761
5770
|
copied: ea ? /* @__PURE__ */ h("div", { className: "gfull__toast", "aria-live": "polite", children: [
|
|
5762
5771
|
/* @__PURE__ */ i(oe, { d: X.check, size: 13, sw: 2 }),
|
|
5763
5772
|
"Link copied"
|
|
@@ -5803,7 +5812,7 @@ function Qc(t) {
|
|
|
5803
5812
|
/* @__PURE__ */ i("span", { className: "ctrans__mute", children: on(36) })
|
|
5804
5813
|
] }),
|
|
5805
5814
|
/* @__PURE__ */ i("div", { className: "ctrans__scrub", children: $i(w) })
|
|
5806
|
-
] }) }), aa =
|
|
5815
|
+
] }) }), aa = kl("ga", { tabs: Qt, cur: M, pref: (As = Qt[0]) == null ? void 0 : As.key, onPick: N }), ds = Math.max(0, Math.min(100, Math.round(Y))), oa = Ue && /* @__PURE__ */ h("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
|
|
5807
5816
|
be && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${be}/hqdefault.jpg)` } }),
|
|
5808
5817
|
/* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ h(xe, { children: [
|
|
5809
5818
|
Je && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: Je }),
|
|
@@ -5820,11 +5829,11 @@ function Qc(t) {
|
|
|
5820
5829
|
var w;
|
|
5821
5830
|
(w = mn.current) == null || w.call(mn, hs);
|
|
5822
5831
|
}, [hs]);
|
|
5823
|
-
const [la, er] =
|
|
5832
|
+
const [la, er] = z(!1), tr = !!It && !Ue && (He ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
|
|
5824
5833
|
U(() => {
|
|
5825
5834
|
tr || er(!1);
|
|
5826
5835
|
}, [tr]);
|
|
5827
|
-
const ca = t.endCard !== !1 && tr && !la && /* @__PURE__ */ i(
|
|
5836
|
+
const ca = t.endCard !== !1 && tr && !la && /* @__PURE__ */ i(vc, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => er(!0), onReplay: () => {
|
|
5828
5837
|
er(!0), We.current = !0, x.seekFrac ? x.seekFrac(0) : x.seekRow(0), x.playing || x.toggle();
|
|
5829
5838
|
} });
|
|
5830
5839
|
if (u) return /* @__PURE__ */ h(xe, { children: [
|
|
@@ -5926,7 +5935,7 @@ export {
|
|
|
5926
5935
|
xi as lineWords,
|
|
5927
5936
|
cr as pictureT,
|
|
5928
5937
|
Ln as placePosition,
|
|
5929
|
-
|
|
5938
|
+
vn as realFull,
|
|
5930
5939
|
Gc as setErrorReporter,
|
|
5931
5940
|
Ks as setFullTarget,
|
|
5932
5941
|
Sl as snapPosition,
|