@vocalstack/player 0.1.0-alpha.55 → 0.1.0-alpha.57
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 +623 -621
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,13 +9,14 @@ const Zi = "https://vocalstack.com", yo = "data:image/svg+xml;base64,PHN2ZyB4bWx
|
|
|
9
9
|
function wo({ size: t = 16, sw: e = 1.5, children: n, style: r, ...s }) {
|
|
10
10
|
return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "none", stroke: "currentColor", strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", style: { flex: "none", ...r }, ...s, children: n });
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const J = {
|
|
13
13
|
plus: "M12 4.5v15m7.5-7.5h-15",
|
|
14
14
|
check: "M4.5 12.75l6 6 9-13.5",
|
|
15
15
|
downloaded: "M12 21a9 9 0 100-18 9 9 0 000 18zM12 6.75v10.5m0 0l3.75-3.75M12 17.25l-3.75-3.75",
|
|
16
16
|
chevronRight: "m8.25 4.5 7.5 7.5-7.5 7.5",
|
|
17
17
|
chevronLeft: "M15.75 19.5 8.25 12l7.5-7.5",
|
|
18
18
|
chevronDown: "m19.5 8.25-7.5 7.5-7.5-7.5",
|
|
19
|
+
arrowRight: "M4 12h15m0 0-5-5m5 5-5 5",
|
|
19
20
|
notice: "M12 9v3.75m9-1.5a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z",
|
|
20
21
|
close: "M6 18 18 6M6 6l12 12",
|
|
21
22
|
search: "M21 21l-4.35-4.35M17 11a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z",
|
|
@@ -86,11 +87,11 @@ function Lo({ size: t = 12 }) {
|
|
|
86
87
|
/* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
|
|
87
88
|
] });
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function Pr({ dark: t, height: e = 20, link: n = !0 }) {
|
|
90
91
|
const r = /* @__PURE__ */ i("img", { src: t ? yo : No, alt: "VocalStack", decoding: "sync", style: { height: e, width: "auto", display: "block" } });
|
|
91
92
|
return n ? /* @__PURE__ */ i("a", { href: Zi, style: { display: "block" }, children: r }) : r;
|
|
92
93
|
}
|
|
93
|
-
function
|
|
94
|
+
function Fn({ dark: t, size: e = 30 }) {
|
|
94
95
|
return /* @__PURE__ */ i("img", { src: t ? To : vo, alt: "VocalStack", style: { width: e, height: Math.round(e * 26 / 30 * 100) / 100, display: "block" } });
|
|
95
96
|
}
|
|
96
97
|
function vi({ children: t, panel: e, inset: n, className: r = "", style: s }) {
|
|
@@ -132,7 +133,7 @@ function Bn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bord
|
|
|
132
133
|
return /* @__PURE__ */ m("button", { type: "button", className: `vs-lang-chip${s ? ` vs-lang-chip--${s}` : ""}${a ? " vs-lang-chip--block" : ""}${a && !d ? " vs-lang-chip--bare" : ""}${o ? "" : " vs-lang-chip--borderless"}${l === "sm" ? " vs-lang-chip--sm" : ""}`, onClick: r, "aria-label": n ? e ? `${n} (${e})` : n : e, style: c, children: [
|
|
133
134
|
t ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__flag", children: t }) : null,
|
|
134
135
|
d ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__name", children: n ?? e }) : a ? null : /* @__PURE__ */ i("span", { className: "vs-lang-chip__code", children: e }),
|
|
135
|
-
/* @__PURE__ */ i(oe, { d:
|
|
136
|
+
/* @__PURE__ */ i(oe, { d: J.chevronDown, size: 13, className: "vs-lang-chip__chevron", style: { color: s === "primary" ? "currentColor" : "var(--vs-text-muted)" } })
|
|
136
137
|
] });
|
|
137
138
|
}
|
|
138
139
|
function zo({ value: t, label: e = "Copy", onCopied: n }) {
|
|
@@ -155,7 +156,7 @@ function zo({ value: t, label: e = "Copy", onCopied: n }) {
|
|
|
155
156
|
},
|
|
156
157
|
children: [
|
|
157
158
|
/* @__PURE__ */ i("span", { className: "vs-sr", "aria-live": "polite", children: r ? `Copied${e.replace(/^Copy\b/, "")}` : "" }),
|
|
158
|
-
r ? /* @__PURE__ */ i(oe, { d:
|
|
159
|
+
r ? /* @__PURE__ */ i(oe, { d: J.check, size: 13, sw: 2.2 }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" }) })
|
|
159
160
|
]
|
|
160
161
|
}
|
|
161
162
|
);
|
|
@@ -233,7 +234,7 @@ function xr({ children: t, style: e, className: n }) {
|
|
|
233
234
|
return /* @__PURE__ */ i("div", { className: n ? `eyebrow ${n}` : "eyebrow", style: e, children: t });
|
|
234
235
|
}
|
|
235
236
|
let $n = null;
|
|
236
|
-
function
|
|
237
|
+
function jd(t) {
|
|
237
238
|
$n = t;
|
|
238
239
|
}
|
|
239
240
|
function Gi(t) {
|
|
@@ -995,8 +996,8 @@ function Vr({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
|
|
|
995
996
|
const p = ze(() => {
|
|
996
997
|
const E = M.trim().toLowerCase();
|
|
997
998
|
return [...E ? s.filter((C) => C.label.toLowerCase().includes(E) || C.native.toLowerCase().includes(E) || C.code.toLowerCase().includes(E)) : s].sort((C, te) => {
|
|
998
|
-
const
|
|
999
|
-
return
|
|
999
|
+
const X = l.indexOf(C.code), L = l.indexOf(te.code);
|
|
1000
|
+
return X !== -1 || L !== -1 ? (X === -1 ? 999 : X) - (L === -1 ? 999 : L) : C.label.localeCompare(te.label);
|
|
1000
1001
|
});
|
|
1001
1002
|
}, [s, M, l]), b = ze(
|
|
1002
1003
|
() => M ? [] : c.map((E) => p.find((k) => k.code === E)).filter((E) => !!E).sort((E, k) => E.label.localeCompare(k.label)),
|
|
@@ -1026,28 +1027,28 @@ function Vr({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPl
|
|
|
1026
1027
|
te.stopPropagation(), ki(E.code);
|
|
1027
1028
|
}, onKeyDown: (te) => {
|
|
1028
1029
|
(te.key === "Enter" || te.key === " ") && (te.preventDefault(), te.stopPropagation(), ki(E.code));
|
|
1029
|
-
}, children: /* @__PURE__ */ i(oe, { d:
|
|
1030
|
-
/* @__PURE__ */ i("span", { className: `vs-picker__slot${C ? " vs-picker__slot--wide" : ""}`, title: E.voice ? "Voice available" : C ? "No voice speaks this language yet" : void 0, children: C ? T === E.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : E.voice && /* @__PURE__ */ i(oe, { d:
|
|
1031
|
-
/* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === E.code && (h === E.code ? /* @__PURE__ */ i(Mt, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d:
|
|
1030
|
+
}, children: /* @__PURE__ */ i(oe, { d: J.close, size: 16 }) }) }),
|
|
1031
|
+
/* @__PURE__ */ i("span", { className: `vs-picker__slot${C ? " vs-picker__slot--wide" : ""}`, title: E.voice ? "Voice available" : C ? "No voice speaks this language yet" : void 0, children: C ? T === E.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : E.voice && /* @__PURE__ */ i(oe, { d: J.headphones, size: 16 }) }),
|
|
1032
|
+
/* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === E.code && (h === E.code ? /* @__PURE__ */ i(Mt, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: J.check, size: 16, sw: 2.2 })) })
|
|
1032
1033
|
]
|
|
1033
1034
|
},
|
|
1034
1035
|
E.code
|
|
1035
1036
|
);
|
|
1036
1037
|
}, I = /* @__PURE__ */ m("div", { className: "vs-picker__search", children: [
|
|
1037
|
-
/* @__PURE__ */ i(oe, { d:
|
|
1038
|
+
/* @__PURE__ */ i(oe, { d: J.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
|
|
1038
1039
|
/* @__PURE__ */ i("input", { value: M, onChange: (E) => g(E.target.value), placeholder: a, "aria-label": a })
|
|
1039
1040
|
] }), W = /* @__PURE__ */ m("div", { className: "vs-picker__list", children: [
|
|
1040
1041
|
o && !M && /* @__PURE__ */ m("button", { type: "button", className: "vs-picker__row", "data-vs-original": "", "aria-selected": n === null, onClick: () => {
|
|
1041
1042
|
r(null), d || e();
|
|
1042
1043
|
}, children: [
|
|
1043
|
-
/* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d:
|
|
1044
|
+
/* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d: J.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
|
|
1044
1045
|
/* @__PURE__ */ m("span", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1045
1046
|
/* @__PURE__ */ i("div", { className: "vs-picker__label", children: o }),
|
|
1046
1047
|
/* @__PURE__ */ i("div", { className: "vs-picker__native", children: "As spoken · no translation" })
|
|
1047
1048
|
] }),
|
|
1048
1049
|
/* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
|
|
1049
1050
|
/* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
|
|
1050
|
-
/* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d:
|
|
1051
|
+
/* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: J.check, size: 16, sw: 2.2 }) })
|
|
1051
1052
|
] }),
|
|
1052
1053
|
b.length > 0 && /* @__PURE__ */ m(xe, { children: [
|
|
1053
1054
|
/* @__PURE__ */ i("div", { className: "vs-picker__head", children: "RECENT" }),
|
|
@@ -1157,7 +1158,7 @@ const ia = [
|
|
|
1157
1158
|
{ id: "audioboom", name: "Audioboom", color: "#1ea2e0", hosts: /(^|\.)audioboom\.com$/, audioOnly: !0, glyph: "M12 3a9 9 0 1 1 0 18 9 9 0 0 1 0-18Zm-4 6v6h2V9H8Zm3-2v10h2V7h-2Zm3 3v4h2v-4h-2Z" },
|
|
1158
1159
|
{ id: "cnn", name: "CNN", color: "#cc0000", hosts: /(^|\.)cnn\.com$/, glyph: "M2 7h20v10H2V7Zm3.5 2.2a2.8 2.8 0 1 0 0 5.6h1.4v-1.6H5.6a1.2 1.2 0 1 1 0-2.4h1.3V9.2H5.5Zm3 0v5.6h1.6v-3.3l2.4 3.3H14V9.2h-1.6v3.3L10 9.2H8.5Zm6.2 0v5.6h1.6v-3.3l2.4 3.3h1.5V9.2h-1.6v3.3l-2.4-3.3h-1.5Z" }
|
|
1159
1160
|
], Ho = new Map(ia.map((t) => [t.id, t]));
|
|
1160
|
-
function
|
|
1161
|
+
function zd(t) {
|
|
1161
1162
|
return t ? Ho.get(t) ?? null : null;
|
|
1162
1163
|
}
|
|
1163
1164
|
function Wo(t) {
|
|
@@ -1169,7 +1170,7 @@ function Wo(t) {
|
|
|
1169
1170
|
return null;
|
|
1170
1171
|
}
|
|
1171
1172
|
}
|
|
1172
|
-
function
|
|
1173
|
+
function Yt(t) {
|
|
1173
1174
|
const e = Wo(t);
|
|
1174
1175
|
return e ? ia.find((n) => n.hosts.test(e)) ?? null : null;
|
|
1175
1176
|
}
|
|
@@ -1180,7 +1181,7 @@ function Ke(t) {
|
|
|
1180
1181
|
return null;
|
|
1181
1182
|
}
|
|
1182
1183
|
}
|
|
1183
|
-
const
|
|
1184
|
+
const Ft = (t) => Math.max(0, Math.floor(t));
|
|
1184
1185
|
function aa(t) {
|
|
1185
1186
|
var n;
|
|
1186
1187
|
const e = /\/(?:share|embed)\/(?:[^/?#]*-)?([0-9a-f]{32})(?:[/?#]|$)/i.exec(((n = Ke(t)) == null ? void 0 : n.pathname) ?? "");
|
|
@@ -1212,31 +1213,31 @@ function Go(t) {
|
|
|
1212
1213
|
return s >= 0 && n[s + 1] ? { clip: n[s + 1] } : n[0] ? { channel: n[0] } : null;
|
|
1213
1214
|
}
|
|
1214
1215
|
const qo = (t) => {
|
|
1215
|
-
const e =
|
|
1216
|
+
const e = Ft(t);
|
|
1216
1217
|
return `${Math.floor(e / 3600)}h${Math.floor(e % 3600 / 60)}m${e % 60}s`;
|
|
1217
1218
|
};
|
|
1218
1219
|
function oa(t, e) {
|
|
1219
1220
|
var s, a, o, l, c, u, d, h, M, g;
|
|
1220
|
-
const n =
|
|
1221
|
+
const n = Yt(t);
|
|
1221
1222
|
if (!n) return null;
|
|
1222
1223
|
const r = e.play ? 1 : 0;
|
|
1223
1224
|
switch (n.id) {
|
|
1224
1225
|
case "loom": {
|
|
1225
1226
|
const f = aa(t);
|
|
1226
1227
|
if (!f) return null;
|
|
1227
|
-
const y = new URLSearchParams({ hide_owner: "true", hide_share: "true", hide_title: "true", hideEmbedTopBar: "true", hide_speed: "true", muted: "true", autoplay: e.play ? "true" : "false", t: String(
|
|
1228
|
+
const y = new URLSearchParams({ hide_owner: "true", hide_share: "true", hide_title: "true", hideEmbedTopBar: "true", hide_speed: "true", muted: "true", autoplay: e.play ? "true" : "false", t: String(Ft(e.t)) });
|
|
1228
1229
|
return `https://www.loom.com/embed/${f}?${y}`;
|
|
1229
1230
|
}
|
|
1230
1231
|
case "vimeo": {
|
|
1231
1232
|
const f = Fo(t);
|
|
1232
1233
|
if (!f) return null;
|
|
1233
1234
|
const y = new URLSearchParams({ autoplay: String(r), muted: "1", controls: "0", title: "0", byline: "0", portrait: "0", dnt: "1" });
|
|
1234
|
-
return f.h && y.set("h", f.h), `https://player.vimeo.com/video/${f.id}?${y}#t=${
|
|
1235
|
+
return f.h && y.set("h", f.h), `https://player.vimeo.com/video/${f.id}?${y}#t=${Ft(e.t)}s`;
|
|
1235
1236
|
}
|
|
1236
1237
|
case "dailymotion": {
|
|
1237
1238
|
const f = Zo(t);
|
|
1238
1239
|
if (!f) return null;
|
|
1239
|
-
const y = new URLSearchParams({ autoplay: String(r), mute: "1", controls: "0", "queue-enable": "0", "sharing-enable": "0", "ui-start-screen-info": "0", start: String(
|
|
1240
|
+
const y = new URLSearchParams({ autoplay: String(r), mute: "1", controls: "0", "queue-enable": "0", "sharing-enable": "0", "ui-start-screen-info": "0", start: String(Ft(e.t)), api: "postMessage" });
|
|
1240
1241
|
return `https://www.dailymotion.com/embed/video/${f}?${y}`;
|
|
1241
1242
|
}
|
|
1242
1243
|
case "twitch": {
|
|
@@ -1270,7 +1271,7 @@ function oa(t, e) {
|
|
|
1270
1271
|
}
|
|
1271
1272
|
case "wistia": {
|
|
1272
1273
|
const f = Ke(t), y = /\/(?:medias|embed\/iframe|embed\/medias)\/([a-z0-9]+)/i.exec((f == null ? void 0 : f.pathname) ?? "") ?? (f && /(^|\.)wi\.st$/i.test(f.hostname) ? /\/([a-z0-9]+)/i.exec(f.pathname) : null);
|
|
1273
|
-
return y ? `https://fast.wistia.net/embed/iframe/${y[1]}?${new URLSearchParams({ autoPlay: String(!!e.play), muted: "true", playbar: "false", controlsVisibleOnLoad: "false", time: String(
|
|
1274
|
+
return y ? `https://fast.wistia.net/embed/iframe/${y[1]}?${new URLSearchParams({ autoPlay: String(!!e.play), muted: "true", playbar: "false", controlsVisibleOnLoad: "false", time: String(Ft(e.t)) })}` : null;
|
|
1274
1275
|
}
|
|
1275
1276
|
case "vidyard": {
|
|
1276
1277
|
const f = /\/(?:watch\/)?([A-Za-z0-9_-]{16,})(?:\.html)?\/?$/.exec(((u = Ke(t)) == null ? void 0 : u.pathname) ?? "");
|
|
@@ -1282,7 +1283,7 @@ function oa(t, e) {
|
|
|
1282
1283
|
}
|
|
1283
1284
|
case "odysee": {
|
|
1284
1285
|
const f = Ke(t), y = f == null ? void 0 : f.pathname.replace(/^\/\$\/embed\//, "/").replace(/^\//, "");
|
|
1285
|
-
return y && y.includes(":") ? `https://odysee.com/$/embed/${y}?${new URLSearchParams({ autoplay: "false", t: String(
|
|
1286
|
+
return y && y.includes(":") ? `https://odysee.com/$/embed/${y}?${new URLSearchParams({ autoplay: "false", t: String(Ft(e.t)) })}` : null;
|
|
1286
1287
|
}
|
|
1287
1288
|
case "bluesky": {
|
|
1288
1289
|
const f = /\/profile\/([^/]+)\/post\/([^/?#]+)/.exec(((h = Ke(t)) == null ? void 0 : h.pathname) ?? "");
|
|
@@ -1294,16 +1295,18 @@ function oa(t, e) {
|
|
|
1294
1295
|
}
|
|
1295
1296
|
case "streamable": {
|
|
1296
1297
|
const f = (g = Ke(t)) == null ? void 0 : g.pathname.split("/").filter(Boolean).pop();
|
|
1297
|
-
return f ? `https://streamable.com/e/${f}?${new URLSearchParams({ autoplay: String(r), muted: "1", nocontrols: "1" })}${e.t ? `#t=${
|
|
1298
|
+
return f ? `https://streamable.com/e/${f}?${new URLSearchParams({ autoplay: String(r), muted: "1", nocontrols: "1" })}${e.t ? `#t=${Ft(e.t)}` : ""}` : null;
|
|
1298
1299
|
}
|
|
1299
1300
|
default:
|
|
1300
1301
|
return null;
|
|
1301
1302
|
}
|
|
1302
1303
|
}
|
|
1303
|
-
|
|
1304
|
-
|
|
1304
|
+
const Ko = /* @__PURE__ */ new Set(["loom", "vimeo", "dailymotion", "twitch", "facebook", "tiktok", "kick", "streamable", "wistia", "vidyard"]);
|
|
1305
|
+
function Jo(t) {
|
|
1306
|
+
const e = Yt(t);
|
|
1307
|
+
return !!t && !!e && Ko.has(e.id) && oa(t, { t: 0, play: !1, host: "localhost" }) != null;
|
|
1305
1308
|
}
|
|
1306
|
-
function
|
|
1309
|
+
function Xo(t, e) {
|
|
1307
1310
|
const n = e == null ? void 0 : e.trim();
|
|
1308
1311
|
if (!t || !n) return null;
|
|
1309
1312
|
switch (t) {
|
|
@@ -1347,31 +1350,31 @@ function Jo(t, e) {
|
|
|
1347
1350
|
return null;
|
|
1348
1351
|
}
|
|
1349
1352
|
}
|
|
1350
|
-
function Xo(t) {
|
|
1351
|
-
return !t || t.kind !== "url" ? null : Jo(t.site, t.embedId) ?? t.url ?? null;
|
|
1352
|
-
}
|
|
1353
1353
|
function el(t) {
|
|
1354
|
+
return !t || t.kind !== "url" ? null : Xo(t.site, t.embedId) ?? t.url ?? null;
|
|
1355
|
+
}
|
|
1356
|
+
function tl(t) {
|
|
1354
1357
|
const e = Ke(t);
|
|
1355
1358
|
if (!e) return null;
|
|
1356
1359
|
const n = /\/(?:medias|embed\/iframe|embed\/medias)\/([a-z0-9]+)/i.exec(e.pathname) ?? (/(^|\.)wi\.st$/i.test(e.hostname) ? /\/([a-z0-9]+)/i.exec(e.pathname) : null);
|
|
1357
1360
|
return n ? n[1] : null;
|
|
1358
1361
|
}
|
|
1359
|
-
function
|
|
1362
|
+
function nl(t) {
|
|
1360
1363
|
var n;
|
|
1361
1364
|
const e = /\/(?:watch\/)?([A-Za-z0-9_-]{16,})(?:\.html)?\/?$/.exec(((n = Ke(t)) == null ? void 0 : n.pathname) ?? "");
|
|
1362
1365
|
return e ? e[1] : null;
|
|
1363
1366
|
}
|
|
1364
|
-
const
|
|
1365
|
-
function
|
|
1366
|
-
const e =
|
|
1367
|
-
return e ?
|
|
1367
|
+
const rl = { dailymotion: /(^|\.)dailymotion\.com$/ };
|
|
1368
|
+
function sl(t) {
|
|
1369
|
+
const e = Yt(t);
|
|
1370
|
+
return e ? rl[e.id] ?? null : null;
|
|
1368
1371
|
}
|
|
1369
|
-
function
|
|
1372
|
+
function il({ url: t, t: e, playing: n, seekN: r, title: s, onToggle: a }) {
|
|
1370
1373
|
const o = w(e);
|
|
1371
1374
|
o.current = e;
|
|
1372
1375
|
const [l, c] = z(!1), u = typeof window < "u" ? window.location.hostname : "localhost", d = ze(() => oa(t, { t: o.current, play: n, host: u }), [t, n, r, u]), [h, M] = z(!1), g = w(!1);
|
|
1373
1376
|
return x(() => {
|
|
1374
|
-
const f =
|
|
1377
|
+
const f = sl(t);
|
|
1375
1378
|
if (!f) return;
|
|
1376
1379
|
g.current = !1, M(!1);
|
|
1377
1380
|
const y = (N) => {
|
|
@@ -1408,7 +1411,7 @@ function sl({ url: t, t: e, playing: n, seekN: r, title: s, onToggle: a }) {
|
|
|
1408
1411
|
] });
|
|
1409
1412
|
}
|
|
1410
1413
|
let En = null;
|
|
1411
|
-
function
|
|
1414
|
+
function al() {
|
|
1412
1415
|
return En || (En = new Promise((t) => {
|
|
1413
1416
|
const e = window;
|
|
1414
1417
|
if (e.FB) {
|
|
@@ -1424,11 +1427,11 @@ function il() {
|
|
|
1424
1427
|
r.src = "https://connect.facebook.net/en_US/sdk.js", r.async = !0, r.crossOrigin = "anonymous", r.onerror = () => t(null), document.body.appendChild(r);
|
|
1425
1428
|
}), En);
|
|
1426
1429
|
}
|
|
1427
|
-
let
|
|
1428
|
-
function
|
|
1430
|
+
let ol = 0;
|
|
1431
|
+
function ll({ url: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
1429
1432
|
const a = w(null), o = w(null), l = w(e);
|
|
1430
1433
|
l.current = e;
|
|
1431
|
-
const [c, u] = z(!1), [d] = z(() => `vsp-fb-${++
|
|
1434
|
+
const [c, u] = z(!1), [d] = z(() => `vsp-fb-${++ol}`);
|
|
1432
1435
|
return x(() => {
|
|
1433
1436
|
let h = !0;
|
|
1434
1437
|
const M = a.current;
|
|
@@ -1447,7 +1450,7 @@ function ol({ url: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1447
1450
|
u(!0);
|
|
1448
1451
|
}
|
|
1449
1452
|
};
|
|
1450
|
-
return
|
|
1453
|
+
return al().then((T) => {
|
|
1451
1454
|
!h || !T || (f = T, T.Event.subscribe("xfbml.ready", y), T.XFBML.parse(M));
|
|
1452
1455
|
}), () => {
|
|
1453
1456
|
h = !1, o.current = null, u(!1);
|
|
@@ -1488,13 +1491,13 @@ function ol({ url: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1488
1491
|
] });
|
|
1489
1492
|
}
|
|
1490
1493
|
let _n = null;
|
|
1491
|
-
function
|
|
1494
|
+
function cl() {
|
|
1492
1495
|
return _n || (_n = new Promise((t) => {
|
|
1493
1496
|
const e = document.createElement("script");
|
|
1494
1497
|
e.src = "https://fast.wistia.net/assets/external/E-v1.js", e.async = !0, e.onload = () => t(), e.onerror = () => t(), document.head.appendChild(e);
|
|
1495
1498
|
}), _n);
|
|
1496
1499
|
}
|
|
1497
|
-
function
|
|
1500
|
+
function ul({ id: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
1498
1501
|
const a = w(null), o = w(e);
|
|
1499
1502
|
o.current = e;
|
|
1500
1503
|
const l = w(n);
|
|
@@ -1515,7 +1518,7 @@ function cl({ id: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1515
1518
|
u(!0);
|
|
1516
1519
|
}
|
|
1517
1520
|
}
|
|
1518
|
-
}),
|
|
1521
|
+
}), cl(), () => {
|
|
1519
1522
|
h = !1, a.current = null, u(!1);
|
|
1520
1523
|
};
|
|
1521
1524
|
}, [t]), x(() => {
|
|
@@ -1551,7 +1554,7 @@ function cl({ id: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1551
1554
|
] });
|
|
1552
1555
|
}
|
|
1553
1556
|
let Yn = null;
|
|
1554
|
-
function
|
|
1557
|
+
function dl() {
|
|
1555
1558
|
return Yn || (Yn = new Promise((t) => {
|
|
1556
1559
|
const e = window;
|
|
1557
1560
|
if (e.VidyardV4) {
|
|
@@ -1567,7 +1570,7 @@ function ul() {
|
|
|
1567
1570
|
}, n.onerror = () => t(null), document.head.appendChild(n);
|
|
1568
1571
|
}), Yn);
|
|
1569
1572
|
}
|
|
1570
|
-
function
|
|
1573
|
+
function hl({ uuid: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
1571
1574
|
const a = w(null), o = w(null), l = w(e);
|
|
1572
1575
|
l.current = e;
|
|
1573
1576
|
const c = w(n);
|
|
@@ -1577,7 +1580,7 @@ function dl({ uuid: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1577
1580
|
let h = !0;
|
|
1578
1581
|
const M = a.current;
|
|
1579
1582
|
if (M)
|
|
1580
|
-
return M.innerHTML = "",
|
|
1583
|
+
return M.innerHTML = "", dl().then((g) => {
|
|
1581
1584
|
if (!(!h || !g))
|
|
1582
1585
|
return g.renderPlayer({ uuid: t, container: M, type: "inline", autoplay: 0, muted: 1, controls: 0 }).then((f) => {
|
|
1583
1586
|
if (h) {
|
|
@@ -1623,7 +1626,7 @@ function dl({ uuid: t, t: e, playing: n, seekN: r, onToggle: s }) {
|
|
|
1623
1626
|
u && /* @__PURE__ */ i("div", { className: `txyt__paused${n ? "" : " txyt__paused--on"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(xt, { size: 44 }) }) })
|
|
1624
1627
|
] });
|
|
1625
1628
|
}
|
|
1626
|
-
async function
|
|
1629
|
+
async function fl(t) {
|
|
1627
1630
|
try {
|
|
1628
1631
|
const e = await fetch(`https://www.loom.com/api/campaigns/sessions/${t}/raw-url`, { method: "POST" });
|
|
1629
1632
|
if (!e.ok || e.status === 204) return null;
|
|
@@ -1633,17 +1636,17 @@ async function hl(t) {
|
|
|
1633
1636
|
return null;
|
|
1634
1637
|
}
|
|
1635
1638
|
}
|
|
1636
|
-
function
|
|
1639
|
+
function Ml(t) {
|
|
1637
1640
|
const e = t.includes("?") ? t.slice(t.indexOf("?") + 1) : "";
|
|
1638
1641
|
return (n, r) => {
|
|
1639
1642
|
e && !r.includes("Signature=") && n.open("GET", r + (r.includes("?") ? "&" : "?") + e, !0);
|
|
1640
1643
|
};
|
|
1641
1644
|
}
|
|
1642
|
-
function
|
|
1645
|
+
function gl(t) {
|
|
1643
1646
|
return (e, n) => {
|
|
1644
1647
|
let r = !0, s = null;
|
|
1645
1648
|
return (async () => {
|
|
1646
|
-
const a = await
|
|
1649
|
+
const a = await fl(t);
|
|
1647
1650
|
if (!r) return;
|
|
1648
1651
|
if (!a) {
|
|
1649
1652
|
n();
|
|
@@ -1656,7 +1659,7 @@ function Ml(t) {
|
|
|
1656
1659
|
n();
|
|
1657
1660
|
return;
|
|
1658
1661
|
}
|
|
1659
|
-
const c = new l({ xhrSetup:
|
|
1662
|
+
const c = new l({ xhrSetup: Ml(a), capLevelToPlayerSize: !0, startLevel: 0, maxBufferLength: 20 });
|
|
1660
1663
|
c.on(l.Events.ERROR, (u, d) => {
|
|
1661
1664
|
d.fatal && (c.destroy(), n());
|
|
1662
1665
|
}), c.loadSource(a), c.attachMedia(e), s = () => c.destroy();
|
|
@@ -1666,7 +1669,7 @@ function Ml(t) {
|
|
|
1666
1669
|
};
|
|
1667
1670
|
}
|
|
1668
1671
|
const cn = /* @__PURE__ */ new Map();
|
|
1669
|
-
function
|
|
1672
|
+
function ml(t) {
|
|
1670
1673
|
const [e, n] = z(() => t ? cn.get(t) ?? null : null);
|
|
1671
1674
|
return x(() => {
|
|
1672
1675
|
if (!t) {
|
|
@@ -1688,11 +1691,11 @@ function gl(t) {
|
|
|
1688
1691
|
};
|
|
1689
1692
|
}, [t]), e;
|
|
1690
1693
|
}
|
|
1691
|
-
const
|
|
1692
|
-
function
|
|
1694
|
+
const pl = /^(?:[0-9a-f]{16,}|(?:https?:\/\/)?(?:[\w-]+\.)+[a-z]{2,}(?::\d+)?\/\S*)$/i, ji = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
1695
|
+
function yl(t) {
|
|
1693
1696
|
const e = (r) => {
|
|
1694
1697
|
const s = r == null ? void 0 : r.trim();
|
|
1695
|
-
return s && s !== t.id && !ji.test(s) && !
|
|
1698
|
+
return s && s !== t.id && !ji.test(s) && !pl.test(s) ? s : null;
|
|
1696
1699
|
}, n = (() => {
|
|
1697
1700
|
if (!t.url) return null;
|
|
1698
1701
|
try {
|
|
@@ -1703,37 +1706,37 @@ function pl(t) {
|
|
|
1703
1706
|
})();
|
|
1704
1707
|
return e(t.name) ?? e(t.sourceName) ?? e(t.ytTitle) ?? n ?? (ji.test(t.id) ? "VocalStack" : t.id);
|
|
1705
1708
|
}
|
|
1706
|
-
const
|
|
1709
|
+
const Nl = 0.3;
|
|
1707
1710
|
function zi(t, e) {
|
|
1708
|
-
t.muted = e.muted, Math.abs(t.currentTime - e.t) >
|
|
1711
|
+
t.muted = e.muted, Math.abs(t.currentTime - e.t) > Nl && (t.currentTime = Math.max(0, e.t)), e.playing ? t.paused && Promise.resolve(t.play()).catch(() => {
|
|
1709
1712
|
}) : t.paused || t.pause();
|
|
1710
1713
|
}
|
|
1711
|
-
const Hn = "Remove background sound",
|
|
1712
|
-
function
|
|
1714
|
+
const Hn = "Remove background sound", Tl = "Takes out everything that isn't speech: music, ambience and noise.";
|
|
1715
|
+
function vl(t) {
|
|
1713
1716
|
const e = Math.max(0, Math.floor(t)), n = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), s = String(e % 60).padStart(2, "0");
|
|
1714
1717
|
return n ? `${n}:${String(r).padStart(2, "0")}:${s}` : `${r}:${s}`;
|
|
1715
1718
|
}
|
|
1716
|
-
function
|
|
1717
|
-
return e === "unavailable" ? `Not available for this ${n}` : e === "making" ? r > 0 ? `Separating the speech from the background… ready up to ${
|
|
1719
|
+
function wl(t, e, n = "transcription", r = 0) {
|
|
1720
|
+
return e === "unavailable" ? `Not available for this ${n}` : e === "making" ? r > 0 ? `Separating the speech from the background… ready up to ${vl(r)}` : "Separating the speech from the background…" : Tl;
|
|
1718
1721
|
}
|
|
1719
|
-
function
|
|
1722
|
+
function kl(t, e) {
|
|
1720
1723
|
return { bed: e && !t, speech: !e && t };
|
|
1721
1724
|
}
|
|
1722
|
-
function
|
|
1725
|
+
function Ll(t) {
|
|
1723
1726
|
const e = t.get("bg");
|
|
1724
1727
|
return e === "off" || e === "remove";
|
|
1725
1728
|
}
|
|
1726
|
-
function
|
|
1729
|
+
function jl(t, e) {
|
|
1727
1730
|
e ? t.searchParams.set("bg", "remove") : t.searchParams.delete("bg");
|
|
1728
1731
|
}
|
|
1729
|
-
function
|
|
1732
|
+
function zl(t, e) {
|
|
1730
1733
|
var r, s;
|
|
1731
1734
|
if (t !== 503) return null;
|
|
1732
1735
|
const n = (s = (r = e == null ? void 0 : e.data) == null ? void 0 : r.details) == null ? void 0 : s.retryAfterS;
|
|
1733
1736
|
return typeof n == "number" && n > 0 ? Math.max(2, n) : 3;
|
|
1734
1737
|
}
|
|
1735
|
-
const
|
|
1736
|
-
function
|
|
1738
|
+
const Il = 0.05;
|
|
1739
|
+
function bl(t) {
|
|
1737
1740
|
var r, s;
|
|
1738
1741
|
const e = (s = (r = t == null ? void 0 : t.data) == null ? void 0 : r.details) == null ? void 0 : s.parts, n = [];
|
|
1739
1742
|
if (Array.isArray(e))
|
|
@@ -1745,8 +1748,8 @@ function Il(t) {
|
|
|
1745
1748
|
}
|
|
1746
1749
|
return { untilS: n.length ? n[n.length - 1].endS : 0, parts: n };
|
|
1747
1750
|
}
|
|
1748
|
-
function
|
|
1749
|
-
if (!t.length || e < 0 || e >= t[t.length - 1].endS -
|
|
1751
|
+
function Ol(t, e) {
|
|
1752
|
+
if (!t.length || e < 0 || e >= t[t.length - 1].endS - Il) return -1;
|
|
1750
1753
|
let n = 0, r = t.length - 1;
|
|
1751
1754
|
for (; n < r; ) {
|
|
1752
1755
|
const s = n + r + 1 >> 1;
|
|
@@ -1754,17 +1757,17 @@ function bl(t, e) {
|
|
|
1754
1757
|
}
|
|
1755
1758
|
return n;
|
|
1756
1759
|
}
|
|
1757
|
-
function
|
|
1760
|
+
function xl(t, e, n, r) {
|
|
1758
1761
|
const s = t[e].startS, a = n[r] === s ? r : n[1 - r] === s ? 1 - r : r, o = [];
|
|
1759
1762
|
n[a] !== s && o.push([a, e]);
|
|
1760
1763
|
const l = 1 - a;
|
|
1761
1764
|
return e + 1 < t.length && n[l] !== t[e + 1].startS && o.push([l, e + 1]), { play: a, load: o };
|
|
1762
1765
|
}
|
|
1763
|
-
async function
|
|
1766
|
+
async function Cl(t) {
|
|
1764
1767
|
const e = await fetch(t, { redirect: "manual", credentials: "omit" });
|
|
1765
1768
|
if (e.type === "opaqueredirect" || e.status >= 300 && e.status < 400 || e.ok) return { ready: !0 };
|
|
1766
1769
|
const n = await e.json().catch(() => null);
|
|
1767
|
-
return { ready: !1, retryS:
|
|
1770
|
+
return { ready: !1, retryS: zl(e.status, n), ...bl(n) };
|
|
1768
1771
|
}
|
|
1769
1772
|
function Tr(t) {
|
|
1770
1773
|
t && (t.pause(), t.removeAttribute("src"), t.load());
|
|
@@ -1779,7 +1782,7 @@ function la(t, e) {
|
|
|
1779
1782
|
let M = !1, g;
|
|
1780
1783
|
r("making");
|
|
1781
1784
|
const f = () => {
|
|
1782
|
-
|
|
1785
|
+
Cl(t).then((y) => {
|
|
1783
1786
|
if (!M) {
|
|
1784
1787
|
if (y.ready) {
|
|
1785
1788
|
const T = new Audio();
|
|
@@ -1811,12 +1814,12 @@ function la(t, e) {
|
|
|
1811
1814
|
M(), zi(c.current, e), l(!0);
|
|
1812
1815
|
return;
|
|
1813
1816
|
}
|
|
1814
|
-
const g = n === "making" ?
|
|
1817
|
+
const g = n === "making" ? Ol(s, e.t) : -1;
|
|
1815
1818
|
if (g < 0) {
|
|
1816
1819
|
M(), l(!1);
|
|
1817
1820
|
return;
|
|
1818
1821
|
}
|
|
1819
|
-
const f =
|
|
1822
|
+
const f = xl(s, g, d.current, h.current);
|
|
1820
1823
|
for (const [N, p] of f.load) {
|
|
1821
1824
|
let b = u.current[N];
|
|
1822
1825
|
b || (b = new Audio(), b.preload = "auto", u.current[N] = b), b.pause(), b.src = s[p].url, d.current[N] = s[p].startS;
|
|
@@ -1826,16 +1829,16 @@ function la(t, e) {
|
|
|
1826
1829
|
T && !T.paused && T.pause(), zi(y, { ...e, t: e.t - s[g].startS }), l(!e.playing || y.readyState >= 3);
|
|
1827
1830
|
}, [n, s, e.t, e.playing, e.muted]), { state: n, on: o, untilS: n === "ready" ? 1 / 0 : s.length ? s[s.length - 1].endS : 0 };
|
|
1828
1831
|
}
|
|
1829
|
-
function
|
|
1832
|
+
function Sl(t, e) {
|
|
1830
1833
|
return la(t, e).state;
|
|
1831
1834
|
}
|
|
1832
|
-
const
|
|
1835
|
+
const Dl = 0.5, Al = 3;
|
|
1833
1836
|
function Br(t, e) {
|
|
1834
1837
|
let n = -1;
|
|
1835
1838
|
for (let r = 0; r < t.length && t[r].start <= e + 0.02; r++) n = r;
|
|
1836
1839
|
return n;
|
|
1837
1840
|
}
|
|
1838
|
-
function
|
|
1841
|
+
function El(t, e, n) {
|
|
1839
1842
|
const r = Br(t, n);
|
|
1840
1843
|
if (r < 0) return { kind: "none" };
|
|
1841
1844
|
const s = t[r];
|
|
@@ -1853,14 +1856,14 @@ function Al(t, e, n) {
|
|
|
1853
1856
|
}
|
|
1854
1857
|
return { kind: "done", sid: s.sid };
|
|
1855
1858
|
}
|
|
1856
|
-
function
|
|
1859
|
+
function _l(t, e, n) {
|
|
1857
1860
|
if (n == null) return !1;
|
|
1858
1861
|
const r = Br(t, e);
|
|
1859
1862
|
if (r < 0) return !1;
|
|
1860
1863
|
const s = t[r];
|
|
1861
1864
|
return e >= s.end ? s.sid === n : r > 0 && t[r - 1].sid === n && e - s.start < 1.5;
|
|
1862
1865
|
}
|
|
1863
|
-
function
|
|
1866
|
+
function Yl(t, e, n, r = Al) {
|
|
1864
1867
|
const s = Math.max(0, Br(t, n)), a = [];
|
|
1865
1868
|
for (let o = s; o < t.length && o <= s + r; o++) {
|
|
1866
1869
|
const l = (e.get(t[o].sid) ?? []).find((c) => c.part === 0);
|
|
@@ -1868,7 +1871,7 @@ function _l(t, e, n, r = Dl) {
|
|
|
1868
1871
|
}
|
|
1869
1872
|
return a;
|
|
1870
1873
|
}
|
|
1871
|
-
function
|
|
1874
|
+
function Ul(t) {
|
|
1872
1875
|
const e = ze(() => {
|
|
1873
1876
|
const c = /* @__PURE__ */ new Map();
|
|
1874
1877
|
for (const u of t.clips) c.set(u.sentenceId, [...c.get(u.sentenceId) ?? [], u]);
|
|
@@ -1889,9 +1892,9 @@ function Yl(t) {
|
|
|
1889
1892
|
l(), a((f) => f.missing == null && f.sid == null ? f : { missing: null, sid: null });
|
|
1890
1893
|
return;
|
|
1891
1894
|
}
|
|
1892
|
-
const c =
|
|
1895
|
+
const c = El(t.lines, e, t.t), u = c.kind === "missing" ? c.sid : null, d = c.kind === "none" ? null : c.sid;
|
|
1893
1896
|
a((f) => f.missing === u && f.sid === d ? f : { missing: u, sid: d });
|
|
1894
|
-
const h = new Set(
|
|
1897
|
+
const h = new Set(Yl(t.lines, e, t.t));
|
|
1895
1898
|
for (const f of h) o(f);
|
|
1896
1899
|
const M = r.current;
|
|
1897
1900
|
M && h.add(M.src);
|
|
@@ -1901,12 +1904,12 @@ function Yl(t) {
|
|
|
1901
1904
|
return;
|
|
1902
1905
|
}
|
|
1903
1906
|
if (c.kind !== "play") {
|
|
1904
|
-
if (M && !M.el.paused && !M.el.ended &&
|
|
1907
|
+
if (M && !M.el.paused && !M.el.ended && _l(t.lines, t.t, M.sid)) return;
|
|
1905
1908
|
M && M.el.pause(), r.current = null;
|
|
1906
1909
|
return;
|
|
1907
1910
|
}
|
|
1908
1911
|
if (M && M.src === c.src) {
|
|
1909
|
-
if (M.el.muted = t.muted, !M.el.ended && Math.abs(M.el.currentTime - c.offset) >
|
|
1912
|
+
if (M.el.muted = t.muted, !M.el.ended && Math.abs(M.el.currentTime - c.offset) > Dl)
|
|
1910
1913
|
try {
|
|
1911
1914
|
M.el.currentTime = c.offset;
|
|
1912
1915
|
} catch {
|
|
@@ -1927,7 +1930,7 @@ function Yl(t) {
|
|
|
1927
1930
|
}, [t.on, t.t, t.playing, t.muted, t.lines, e]), s;
|
|
1928
1931
|
}
|
|
1929
1932
|
const Ii = ["play", "pause", "stop", "nexttrack", "previoustrack"];
|
|
1930
|
-
function
|
|
1933
|
+
function $l(t, e) {
|
|
1931
1934
|
var n, r;
|
|
1932
1935
|
if (t === "play") {
|
|
1933
1936
|
e.playing || e.toggle();
|
|
@@ -1943,12 +1946,12 @@ function Ul(t, e) {
|
|
|
1943
1946
|
}
|
|
1944
1947
|
(r = e.prev) == null || r.call(e);
|
|
1945
1948
|
}
|
|
1946
|
-
function
|
|
1949
|
+
function Rl(t, e) {
|
|
1947
1950
|
for (const n of Ii)
|
|
1948
1951
|
try {
|
|
1949
1952
|
t.setActionHandler(n, () => {
|
|
1950
1953
|
const r = e();
|
|
1951
|
-
r &&
|
|
1954
|
+
r && $l(n, r);
|
|
1952
1955
|
});
|
|
1953
1956
|
} catch {
|
|
1954
1957
|
}
|
|
@@ -1960,14 +1963,14 @@ function $l(t, e) {
|
|
|
1960
1963
|
}
|
|
1961
1964
|
};
|
|
1962
1965
|
}
|
|
1963
|
-
function
|
|
1966
|
+
function Pl(t, e) {
|
|
1964
1967
|
const n = w(t);
|
|
1965
1968
|
n.current = t;
|
|
1966
1969
|
const r = !!t;
|
|
1967
1970
|
x(() => {
|
|
1968
1971
|
const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
|
|
1969
1972
|
if (!(!a || !r))
|
|
1970
|
-
return
|
|
1973
|
+
return Rl(a, () => n.current);
|
|
1971
1974
|
}, [r]);
|
|
1972
1975
|
const s = !!(t != null && t.playing);
|
|
1973
1976
|
x(() => {
|
|
@@ -1999,7 +2002,7 @@ function en() {
|
|
|
1999
2002
|
spans: []
|
|
2000
2003
|
};
|
|
2001
2004
|
}
|
|
2002
|
-
function
|
|
2005
|
+
function Ql(t, e) {
|
|
2003
2006
|
for (const r of t.spans) {
|
|
2004
2007
|
const s = r.mediaEnd ?? 1 / 0;
|
|
2005
2008
|
if (e < s || r.mediaEnd == null) return r.wallStart + Math.max(0, e - r.mediaStart);
|
|
@@ -2076,7 +2079,7 @@ function bi(t, e) {
|
|
|
2076
2079
|
const n = e ?? {};
|
|
2077
2080
|
return !t || !Object.keys(t).length ? n : Object.keys(n).length ? { ...t, ...n } : t;
|
|
2078
2081
|
}
|
|
2079
|
-
function
|
|
2082
|
+
function Vl(t, e) {
|
|
2080
2083
|
const n = e.tail;
|
|
2081
2084
|
if (!n || !Array.isArray(n.words) || n.replaced !== t.length || n.words.length !== t.length) return !1;
|
|
2082
2085
|
let r = !1;
|
|
@@ -2093,7 +2096,7 @@ function Ql(t, e) {
|
|
|
2093
2096
|
}
|
|
2094
2097
|
return r;
|
|
2095
2098
|
}
|
|
2096
|
-
function
|
|
2099
|
+
function Bl(t, e) {
|
|
2097
2100
|
var n;
|
|
2098
2101
|
switch (delete t.numbers, e.type) {
|
|
2099
2102
|
case "transcript.committed": {
|
|
@@ -2134,7 +2137,7 @@ function Vl(t, e) {
|
|
|
2134
2137
|
}
|
|
2135
2138
|
case "transcript.amended": {
|
|
2136
2139
|
const r = t.segments.get(e.seq);
|
|
2137
|
-
if (r && r.corrected &&
|
|
2140
|
+
if (r && r.corrected && Vl(r.words, e)) {
|
|
2138
2141
|
r.text = e.text, r.words = hn(e.seq, e.tail.words);
|
|
2139
2142
|
break;
|
|
2140
2143
|
}
|
|
@@ -2182,7 +2185,7 @@ function Vl(t, e) {
|
|
|
2182
2185
|
seqs: r.seqs,
|
|
2183
2186
|
speaker: r.speaker,
|
|
2184
2187
|
start: r.start,
|
|
2185
|
-
wallStart:
|
|
2188
|
+
wallStart: Ql(t, r.start),
|
|
2186
2189
|
text: a ? s.text : r.text,
|
|
2187
2190
|
status: r.status === "open" ? "open" : "closed",
|
|
2188
2191
|
settled: !!r.settled,
|
|
@@ -2234,7 +2237,7 @@ function Vl(t, e) {
|
|
|
2234
2237
|
}
|
|
2235
2238
|
return typeof e.seq == "number" && (t.lastSeq = Math.max(t.lastSeq, e.seq)), t;
|
|
2236
2239
|
}
|
|
2237
|
-
function
|
|
2240
|
+
function Hl(t) {
|
|
2238
2241
|
const e = [], n = [...t.sentences.values()].sort((r, s) => r.start - s.start || (r.sentenceId ?? 0) - (s.sentenceId ?? 0));
|
|
2239
2242
|
for (const r of n) {
|
|
2240
2243
|
const s = r.seqs.map((l) => t.segments.get(l)).filter(Boolean), a = s.length === r.seqs.length || !r.text ? s.flatMap((l) => l.words) : [], o = s[s.length - 1];
|
|
@@ -2247,16 +2250,16 @@ function Bl(t) {
|
|
|
2247
2250
|
catchup: s.some((l) => l.catchup),
|
|
2248
2251
|
suppressed: r.suppressed || s.length > 0 && s.every((l) => l.suppressed),
|
|
2249
2252
|
unclear: r.unclear || s.length > 0 && s.every((l) => l.unclear),
|
|
2250
|
-
confidence:
|
|
2253
|
+
confidence: Wl(s),
|
|
2251
2254
|
latencyS: o == null ? void 0 : o.latencyS,
|
|
2252
2255
|
settled: r.settled || s.length > 0 && s.every((l) => l.settled),
|
|
2253
|
-
translations: Object.keys(r.translations).length ? r.translations :
|
|
2256
|
+
translations: Object.keys(r.translations).length ? r.translations : Fl(s),
|
|
2254
2257
|
speaker: r.speaker >= 0 ? r.speaker : (o == null ? void 0 : o.speaker) ?? -1
|
|
2255
2258
|
});
|
|
2256
2259
|
}
|
|
2257
2260
|
return e.sort((r, s) => r.start - s.start), e;
|
|
2258
2261
|
}
|
|
2259
|
-
function
|
|
2262
|
+
function Wl(t) {
|
|
2260
2263
|
let e = 0, n = 0;
|
|
2261
2264
|
for (const r of t) {
|
|
2262
2265
|
if (r.confidence == null) continue;
|
|
@@ -2265,20 +2268,20 @@ function Hl(t) {
|
|
|
2265
2268
|
}
|
|
2266
2269
|
return n ? e / n : void 0;
|
|
2267
2270
|
}
|
|
2268
|
-
function
|
|
2271
|
+
function Fl(t) {
|
|
2269
2272
|
const e = {};
|
|
2270
2273
|
for (const n of t) for (const [r, s] of Object.entries(n.translations)) e[r] = e[r] ? `${e[r]} ${s}` : s;
|
|
2271
2274
|
return e;
|
|
2272
2275
|
}
|
|
2273
|
-
const
|
|
2274
|
-
function
|
|
2275
|
-
return t == null ? "" : t <
|
|
2276
|
+
const Zl = 0.85, Gl = 0.75;
|
|
2277
|
+
function ql(t) {
|
|
2278
|
+
return t == null ? "" : t < Gl ? "low" : t < Zl ? "mid" : "";
|
|
2276
2279
|
}
|
|
2277
2280
|
const Un = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
|
2278
|
-
function
|
|
2281
|
+
function Kl(t) {
|
|
2279
2282
|
return Un[(t % Un.length + Un.length) % Un.length];
|
|
2280
2283
|
}
|
|
2281
|
-
function
|
|
2284
|
+
function Jl(t) {
|
|
2282
2285
|
if (t.numbers) return t.numbers;
|
|
2283
2286
|
const e = /* @__PURE__ */ new Map(), n = (a, o) => {
|
|
2284
2287
|
if (a < 0) return;
|
|
@@ -2294,12 +2297,12 @@ function Kl(t) {
|
|
|
2294
2297
|
}
|
|
2295
2298
|
function Wn(t, e) {
|
|
2296
2299
|
if (e < 0) return 0;
|
|
2297
|
-
const n =
|
|
2300
|
+
const n = Jl(t);
|
|
2298
2301
|
return n.get(e) ?? n.size + 1 + e;
|
|
2299
2302
|
}
|
|
2300
|
-
const
|
|
2303
|
+
const Xl = /^\s*speaker\s+\d+\s*$/i;
|
|
2301
2304
|
function Oi(t) {
|
|
2302
|
-
return t && t.trim() && !
|
|
2305
|
+
return t && t.trim() && !Xl.test(t) ? t : void 0;
|
|
2303
2306
|
}
|
|
2304
2307
|
function ca(t, e) {
|
|
2305
2308
|
var n;
|
|
@@ -2313,7 +2316,7 @@ function ua(t, e) {
|
|
|
2313
2316
|
const n = ca(t, e);
|
|
2314
2317
|
return n ? (n.split(" ").filter(Boolean).slice(0, 2).map((s) => s[0]).join("") || `S${Wn(t, e)}`).toUpperCase() : `S${Wn(t, e)}`;
|
|
2315
2318
|
}
|
|
2316
|
-
function
|
|
2319
|
+
function ec(t) {
|
|
2317
2320
|
if (t) {
|
|
2318
2321
|
if (t.startsWith("#"))
|
|
2319
2322
|
return { fg: t, soft: `color-mix(in srgb, ${t} 16%, transparent)` };
|
|
@@ -2322,10 +2325,10 @@ function Xl(t) {
|
|
|
2322
2325
|
}
|
|
2323
2326
|
}
|
|
2324
2327
|
function Wr(t, e) {
|
|
2325
|
-
const n = t.speakerIds[e], r =
|
|
2326
|
-
return { fg: r == null ? void 0 : r.fg, soft: r == null ? void 0 : r.soft, lane:
|
|
2328
|
+
const n = t.speakerIds[e], r = ec(n == null ? void 0 : n.color);
|
|
2329
|
+
return { fg: r == null ? void 0 : r.fg, soft: r == null ? void 0 : r.soft, lane: Kl(Wn(t, e) - 1), hasVoice: !!n };
|
|
2327
2330
|
}
|
|
2328
|
-
function
|
|
2331
|
+
function tc(t, e, n, r = !1) {
|
|
2329
2332
|
const s = n ? n.speakerLabels ?? "auto" : null, a = (r ? s : null) ?? t.labels ?? s ?? "on";
|
|
2330
2333
|
if (a !== "auto") return a === "on";
|
|
2331
2334
|
const o = /* @__PURE__ */ new Set();
|
|
@@ -2333,7 +2336,7 @@ function ec(t, e, n, r = !1) {
|
|
|
2333
2336
|
return !0;
|
|
2334
2337
|
return !1;
|
|
2335
2338
|
}
|
|
2336
|
-
const
|
|
2339
|
+
const nc = /* @__PURE__ */ new Set([
|
|
2337
2340
|
"invalid_audio",
|
|
2338
2341
|
"invalid_options",
|
|
2339
2342
|
"invalid_token",
|
|
@@ -2374,7 +2377,7 @@ function Ct(t) {
|
|
|
2374
2377
|
const e = t, n = typeof (e == null ? void 0 : e.code) == "string" ? e.code : void 0, r = typeof (e == null ? void 0 : e.status) == "number" ? e.status : void 0, s = e == null ? void 0 : e.details;
|
|
2375
2378
|
if (n || r && r >= 400) {
|
|
2376
2379
|
const o = typeof (e == null ? void 0 : e.requestId) == "string" && e.requestId ? { requestId: e.requestId } : {};
|
|
2377
|
-
return n &&
|
|
2380
|
+
return n && nc.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: r, details: s, ...o } : n === "unavailable" && r === void 0 ? { message: wr, code: n, details: s, ...o } : r === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : wr, code: n, status: r, details: s, ...o } : { message: n && da[n] || Er, code: n, status: r, details: s, ...o };
|
|
2378
2381
|
}
|
|
2379
2382
|
const a = (e == null ? void 0 : e.name) ?? "";
|
|
2380
2383
|
return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && Gi(t instanceof Error ? t : new Error(String(t))), { message: wr }) : xi[a] ? { message: xi[a] } : t instanceof Error && a === "Error" && !(t instanceof Wi) ? { message: t.message } : { message: Er };
|
|
@@ -2385,19 +2388,19 @@ function Gt() {
|
|
|
2385
2388
|
if (!t) throw new Error("VocalStack player hooks must be used inside <VocalStackPlayer> or <PlayerApiProvider>");
|
|
2386
2389
|
return t;
|
|
2387
2390
|
}
|
|
2388
|
-
function
|
|
2389
|
-
return t.value ? /* @__PURE__ */ i(Fr.Provider, { value: t.value, children: t.children }) : /* @__PURE__ */ i(
|
|
2391
|
+
function rc(t) {
|
|
2392
|
+
return t.value ? /* @__PURE__ */ i(Fr.Provider, { value: t.value, children: t.children }) : /* @__PURE__ */ i(sc, { ...t });
|
|
2390
2393
|
}
|
|
2391
|
-
function
|
|
2394
|
+
function sc({ children: t, ...e }) {
|
|
2392
2395
|
const n = fa(e);
|
|
2393
2396
|
return /* @__PURE__ */ i(Fr.Provider, { value: n, children: t });
|
|
2394
2397
|
}
|
|
2395
|
-
const
|
|
2396
|
-
function
|
|
2397
|
-
return
|
|
2398
|
+
const ic = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2399
|
+
function ac(t) {
|
|
2400
|
+
return ic.test(t);
|
|
2398
2401
|
}
|
|
2399
2402
|
function fa(t) {
|
|
2400
|
-
const e = t.listen ?? null, n = e ? null : t.listenerToken ?? null, r = !e && !n && !!t.token && (!t.id ||
|
|
2403
|
+
const e = t.listen ?? null, n = e ? null : t.listenerToken ?? null, r = !e && !n && !!t.token && (!t.id || ac(t.id)), s = (t.baseUrl ?? ha).replace(/\/$/, ""), a = w(t.token);
|
|
2401
2404
|
a.current = t.token;
|
|
2402
2405
|
const o = !!t.token, l = ze(() => async () => {
|
|
2403
2406
|
const M = a.current;
|
|
@@ -2423,10 +2426,10 @@ function fa(t) {
|
|
|
2423
2426
|
return { client: h, origin: s, owner: r, shareCode: M, listen: null, bearer: l, cred: r ? { accessToken: c ?? void 0 } : { shareCode: M }, readAs: M ? { shareCode: M } : {} };
|
|
2424
2427
|
}, [h, s, r, t.id, l, e, n, c]);
|
|
2425
2428
|
}
|
|
2426
|
-
function
|
|
2429
|
+
function oc(t, e) {
|
|
2427
2430
|
return e ? { ...t, cred: { ...t.cred, media: e } } : t;
|
|
2428
2431
|
}
|
|
2429
|
-
async function
|
|
2432
|
+
async function lc(t, e) {
|
|
2430
2433
|
if (t.listen) {
|
|
2431
2434
|
const r = await t.client.recordings.get(t.listen.recordingId, t.readAs), s = r;
|
|
2432
2435
|
return { key: e, code: null, transcriptionId: t.listen.transcriptionId, name: s.name ?? s.title ?? "", recording: r, job: s.job ?? (s.source ? { source: s.source } : null), allowDownload: !0, allowExport: !0, allowTranslate: !0, sharedBy: null };
|
|
@@ -2451,11 +2454,11 @@ async function oc(t, e) {
|
|
|
2451
2454
|
sharedBy: n.sharedBy ?? null
|
|
2452
2455
|
};
|
|
2453
2456
|
}
|
|
2454
|
-
function
|
|
2457
|
+
function cc(t, e) {
|
|
2455
2458
|
const [n, r] = z(null), [s, a] = z(!1), [o, l] = z(null), [c, u] = z(0);
|
|
2456
2459
|
return x(() => {
|
|
2457
2460
|
let d = !0;
|
|
2458
|
-
return
|
|
2461
|
+
return lc(t, e).then((h) => {
|
|
2459
2462
|
d && (r(h), a(!1), l(null));
|
|
2460
2463
|
}).catch((h) => {
|
|
2461
2464
|
if (!d) return;
|
|
@@ -2466,7 +2469,7 @@ function lc(t, e) {
|
|
|
2466
2469
|
};
|
|
2467
2470
|
}, [t, e, c]), { source: n, gone: s, error: o, reload: () => u((d) => d + 1) };
|
|
2468
2471
|
}
|
|
2469
|
-
function
|
|
2472
|
+
function uc(t, e) {
|
|
2470
2473
|
const [n, r] = z(null);
|
|
2471
2474
|
return x(() => {
|
|
2472
2475
|
if (!t.owner || !e) {
|
|
@@ -2518,8 +2521,8 @@ function ga(t, e) {
|
|
|
2518
2521
|
};
|
|
2519
2522
|
}, [...e, o]), { data: n, error: s, reload: () => l((c) => c + 1) };
|
|
2520
2523
|
}
|
|
2521
|
-
const
|
|
2522
|
-
function
|
|
2524
|
+
const dc = (t) => new Promise((e) => setTimeout(e, t)), hc = 2500, fc = 72;
|
|
2525
|
+
function Mc(t, e) {
|
|
2523
2526
|
const n = Gt(), r = w(n);
|
|
2524
2527
|
r.current = n;
|
|
2525
2528
|
const [s, a] = z(en), o = w(en()), l = w(null), c = w(e.lang ?? null), [u, d] = z(!1), [h, M] = z(null), [g, f] = z(!1), y = Je(() => {
|
|
@@ -2534,11 +2537,11 @@ function fc(t, e) {
|
|
|
2534
2537
|
let C = o.current.state;
|
|
2535
2538
|
const te = () => {
|
|
2536
2539
|
var L, ie;
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2540
|
+
const X = o.current.state;
|
|
2541
|
+
X !== C && (C = X, (ie = (L = T.current).onState) == null || ie.call(L, X));
|
|
2539
2542
|
};
|
|
2540
2543
|
return (async () => {
|
|
2541
|
-
var
|
|
2544
|
+
var X, L, ie, ne;
|
|
2542
2545
|
for (; E; ) {
|
|
2543
2546
|
let G = null;
|
|
2544
2547
|
try {
|
|
@@ -2553,9 +2556,9 @@ function fc(t, e) {
|
|
|
2553
2556
|
if (le.type === "snapshot")
|
|
2554
2557
|
o.current = vr(le.snapshot, le.reason === "gap" ? o.current : en()), y(), te();
|
|
2555
2558
|
else if (le.type === "frame") {
|
|
2556
|
-
|
|
2559
|
+
Bl(o.current, le.frame);
|
|
2557
2560
|
const Te = le.frame;
|
|
2558
|
-
Te.type === "recording.state" && (C = o.current.state, (L = (
|
|
2561
|
+
Te.type === "recording.state" && (C = o.current.state, (L = (X = T.current).onState) == null || L.call(X, Te.state, Te.reason)), (ne = (ie = T.current).onFrame) == null || ne.call(ie, Te), y();
|
|
2559
2562
|
} else le.type === "closed" && d(!1);
|
|
2560
2563
|
}
|
|
2561
2564
|
} catch (me) {
|
|
@@ -2586,13 +2589,13 @@ function fc(t, e) {
|
|
|
2586
2589
|
} finally {
|
|
2587
2590
|
l.current === G && (l.current = null), d(!1);
|
|
2588
2591
|
}
|
|
2589
|
-
const
|
|
2590
|
-
if (!E ||
|
|
2591
|
-
k += 1, await
|
|
2592
|
+
const ee = o.current.state;
|
|
2593
|
+
if (!E || ee === "ended" || ee === "finalized" || ee === "processing") return;
|
|
2594
|
+
k += 1, await dc(Math.min(15e3, 1e3 * 2 ** Math.min(k, 4)));
|
|
2592
2595
|
}
|
|
2593
2596
|
})(), () => {
|
|
2594
|
-
var
|
|
2595
|
-
E = !1, (
|
|
2597
|
+
var X;
|
|
2598
|
+
E = !1, (X = l.current) == null || X.close(), l.current = null, d(!1);
|
|
2596
2599
|
};
|
|
2597
2600
|
}, [t, n, e.voice]);
|
|
2598
2601
|
const [N, p] = z(!1), [b, S] = z(null), A = w(0), [P, O] = z(null), V = Je((E) => {
|
|
@@ -2600,13 +2603,13 @@ function fc(t, e) {
|
|
|
2600
2603
|
if (c.current = E, (te = l.current) == null || te.setLanguage(E), !t) return;
|
|
2601
2604
|
const k = r.current.client, Y = ++A.current;
|
|
2602
2605
|
p(!0), S(null);
|
|
2603
|
-
const C = (
|
|
2604
|
-
Y === A.current && (o.current = vr(L, o.current), O(E), y(), L.translationPending &&
|
|
2605
|
-
Y === A.current && C(
|
|
2606
|
+
const C = (X) => k.recordings.transcript(t, { lang: E ?? void 0, ...r.current.readAs, asListener: !r.current.owner }).then((L) => {
|
|
2607
|
+
Y === A.current && (o.current = vr(L, o.current), O(E), y(), L.translationPending && X > 0 && window.setTimeout(() => {
|
|
2608
|
+
Y === A.current && C(X - 1).catch(() => {
|
|
2606
2609
|
});
|
|
2607
|
-
},
|
|
2610
|
+
}, hc));
|
|
2608
2611
|
});
|
|
2609
|
-
C(
|
|
2612
|
+
C(fc).catch(() => {
|
|
2610
2613
|
Y === A.current && E && S(E);
|
|
2611
2614
|
}).finally(() => {
|
|
2612
2615
|
Y === A.current && p(!1);
|
|
@@ -2614,9 +2617,9 @@ function fc(t, e) {
|
|
|
2614
2617
|
}, [y, t]), I = Je((E, k) => {
|
|
2615
2618
|
const Y = o.current;
|
|
2616
2619
|
let C = !1;
|
|
2617
|
-
for (const [te,
|
|
2620
|
+
for (const [te, X] of Object.entries(k)) {
|
|
2618
2621
|
const L = Y.sentences.get(Number(te));
|
|
2619
|
-
L && (L.translations = { ...L.translations, [E]:
|
|
2622
|
+
L && (L.translations = { ...L.translations, [E]: X }, C = !0);
|
|
2620
2623
|
}
|
|
2621
2624
|
C && y();
|
|
2622
2625
|
}, [y]), W = Je(() => M(null), []);
|
|
@@ -2654,14 +2657,14 @@ function Lr(t) {
|
|
|
2654
2657
|
return "queued";
|
|
2655
2658
|
}
|
|
2656
2659
|
}
|
|
2657
|
-
function
|
|
2660
|
+
function gc(t) {
|
|
2658
2661
|
return t ? t.progress ? { state: t.state, processedS: t.progress.processedS, totalS: t.progress.totalS ?? null, segmentsDone: t.progress.segmentsDone, segmentsTotal: t.progress.segmentsTotal ?? null, pct: t.progress.pct, error: t.error ?? null } : t.state ? { state: t.state, processedS: 0, totalS: null, segmentsDone: 0, segmentsTotal: null, pct: 0, error: t.error ?? null } : null : null;
|
|
2659
2662
|
}
|
|
2660
|
-
const
|
|
2663
|
+
const mc = (t, e) => {
|
|
2661
2664
|
const n = (t == null ? void 0 : t.segmentsDone) ?? e, r = Math.max(n, (t == null ? void 0 : t.segmentsTotal) ?? n);
|
|
2662
2665
|
return `${n} / ${r} SEGMENTS`;
|
|
2663
2666
|
};
|
|
2664
|
-
function
|
|
2667
|
+
function pc(t, e) {
|
|
2665
2668
|
var s;
|
|
2666
2669
|
const n = ((s = t == null ? void 0 : t.source) == null ? void 0 : s.durationS) ?? (e == null ? void 0 : e.totalS) ?? null, r = t == null ? void 0 : t.crop;
|
|
2667
2670
|
if (r && (r.startS != null || r.endS != null)) {
|
|
@@ -2680,19 +2683,19 @@ function Zr(t) {
|
|
|
2680
2683
|
const e = document.createElement("a");
|
|
2681
2684
|
e.href = t, e.style.display = "none", document.body.appendChild(e), e.click(), e.remove();
|
|
2682
2685
|
}
|
|
2683
|
-
async function
|
|
2686
|
+
async function yc(t) {
|
|
2684
2687
|
const e = await fetch(t, { redirect: "manual" });
|
|
2685
2688
|
if (e.type !== "opaqueredirect" && !e.ok) throw await pa(e);
|
|
2686
2689
|
Zr(t);
|
|
2687
2690
|
}
|
|
2688
|
-
async function
|
|
2691
|
+
async function Nc(t, e, n, r = {}) {
|
|
2689
2692
|
var M, g;
|
|
2690
2693
|
const s = await t.client.recordings.export(e, n, { lang: r.lang ?? void 0, ...t.readAs });
|
|
2691
2694
|
if (!s.ok) throw await pa(s);
|
|
2692
2695
|
const a = await s.blob(), o = s.headers.get("content-disposition") ?? "", l = (M = /filename\*=UTF-8''([^;]+)/i.exec(o)) == null ? void 0 : M[1], c = (g = /filename="([^"]+)"/i.exec(o)) == null ? void 0 : g[1], u = l ? decodeURIComponent(l) : c ?? `transcript.${n}`, d = URL.createObjectURL(a), h = document.createElement("a");
|
|
2693
2696
|
h.href = d, h.download = u, h.style.display = "none", document.body.appendChild(h), h.click(), h.remove(), window.setTimeout(() => URL.revokeObjectURL(d), 6e4);
|
|
2694
2697
|
}
|
|
2695
|
-
async function
|
|
2698
|
+
async function Tc(t, e) {
|
|
2696
2699
|
const { recordingId: n, lang: r, voiceKey: s, cred: a } = e, o = async () => (await t.client.recordings.voice(n, r, t.readAs)).filter((h) => h.lang === r), l = (d) => ea(d, s);
|
|
2697
2700
|
let c = l(await o());
|
|
2698
2701
|
(!c || c.state === "clips" || c.state === "failed") && await e.request();
|
|
@@ -2707,20 +2710,20 @@ async function Nc(t, e) {
|
|
|
2707
2710
|
const ya = (t) => {
|
|
2708
2711
|
var e;
|
|
2709
2712
|
return ((e = t == null ? void 0 : t.match(/(?:youtu\.be\/|[?&]v=|\/shorts\/|\/embed\/|\/live\/)([\w-]{11})/)) == null ? void 0 : e[1]) ?? null;
|
|
2710
|
-
},
|
|
2713
|
+
}, vc = (t) => `https://www.youtube-nocookie.com/embed/${t}?autoplay=1&mute=1&controls=0&rel=0&modestbranding=1&playsinline=1&iv_load_policy=3`, Di = 0.3, wc = 1.5;
|
|
2711
2714
|
function Na(t, e, n) {
|
|
2712
2715
|
var s;
|
|
2713
2716
|
const r = (s = t.words[t.words.length - 1]) == null ? void 0 : s.end;
|
|
2714
2717
|
return r != null && r > t.start ? r : t.end != null && t.end > t.start ? t.end : (e == null ? void 0 : e.start) ?? n;
|
|
2715
2718
|
}
|
|
2716
|
-
function
|
|
2719
|
+
function kc(t, e, n) {
|
|
2717
2720
|
var c, u;
|
|
2718
2721
|
const r = t[e];
|
|
2719
2722
|
if (!r) return !1;
|
|
2720
|
-
const s = (((c = r.words[0]) == null ? void 0 : c.start) ?? r.start) - Di, a = t[e + 1], o = Na(r, a, r.start + 4) +
|
|
2723
|
+
const s = (((c = r.words[0]) == null ? void 0 : c.start) ?? r.start) - Di, a = t[e + 1], o = Na(r, a, r.start + 4) + wc, l = a ? Math.min(o, (((u = a.words[0]) == null ? void 0 : u.start) ?? a.start) - Di) : o;
|
|
2721
2724
|
return n >= s && n < Math.max(l, s + 0.5);
|
|
2722
2725
|
}
|
|
2723
|
-
function
|
|
2726
|
+
function Lc(t, e, n) {
|
|
2724
2727
|
const r = Math.max(0, n - e), s = t.map((l) => Math.max(1, [...l.replace(/[^\p{L}\p{N}]/gu, "")].length)), a = s.reduce((l, c) => l + c, 0) || 1;
|
|
2725
2728
|
let o = e;
|
|
2726
2729
|
return t.map((l, c) => {
|
|
@@ -2735,7 +2738,7 @@ function jr(t) {
|
|
|
2735
2738
|
bottom: Math.min(parseFloat(e.paddingBottom) || 0, n)
|
|
2736
2739
|
};
|
|
2737
2740
|
}
|
|
2738
|
-
function
|
|
2741
|
+
function jc(t, e, n = 0) {
|
|
2739
2742
|
const r = w(() => {
|
|
2740
2743
|
});
|
|
2741
2744
|
x(() => {
|
|
@@ -2798,10 +2801,10 @@ function Lc(t, e, n = 0) {
|
|
|
2798
2801
|
};
|
|
2799
2802
|
}, []);
|
|
2800
2803
|
}
|
|
2801
|
-
function
|
|
2804
|
+
function zc({ thumbRef: t }) {
|
|
2802
2805
|
return /* @__PURE__ */ i("div", { className: "feedbar", "aria-hidden": "true", children: /* @__PURE__ */ i("div", { ref: t, className: "feedbar__thumb" }) });
|
|
2803
2806
|
}
|
|
2804
|
-
function
|
|
2807
|
+
function Ic({ error: t, onClose: e }) {
|
|
2805
2808
|
const n = w(e);
|
|
2806
2809
|
n.current = e;
|
|
2807
2810
|
const [r, s] = z(!1), [a, o] = z(!1), l = w();
|
|
@@ -2822,7 +2825,7 @@ Request id: ${t.requestId}` : t.message;
|
|
|
2822
2825
|
});
|
|
2823
2826
|
}, u = t.code === "insufficient_credit" || t.code === "quota_exceeded" || t.status === 402;
|
|
2824
2827
|
return /* @__PURE__ */ m("div", { className: "toast", role: "alert", onPointerEnter: () => s(!0), onPointerLeave: () => s(!1), children: [
|
|
2825
|
-
/* @__PURE__ */ i(oe, { d:
|
|
2828
|
+
/* @__PURE__ */ i(oe, { d: J.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
|
|
2826
2829
|
/* @__PURE__ */ m("span", { style: { flex: 1 }, children: [
|
|
2827
2830
|
t.message,
|
|
2828
2831
|
u && /* @__PURE__ */ m(xe, { children: [
|
|
@@ -2830,14 +2833,14 @@ Request id: ${t.requestId}` : t.message;
|
|
|
2830
2833
|
/* @__PURE__ */ i("a", { href: "https://app.vocalstack.com/billing", target: "_blank", rel: "noopener", className: "dev-link", style: { fontSize: "inherit", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add credit" })
|
|
2831
2834
|
] })
|
|
2832
2835
|
] }),
|
|
2833
|
-
/* @__PURE__ */ i("button", { type: "button", onClick: c, "aria-label": a ? "Copied" : "Copy error", title: a ? "Copied" : "Copy error", children: /* @__PURE__ */ i(oe, { d: a ?
|
|
2834
|
-
/* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(oe, { d:
|
|
2836
|
+
/* @__PURE__ */ i("button", { type: "button", onClick: c, "aria-label": a ? "Copied" : "Copy error", title: a ? "Copied" : "Copy error", children: /* @__PURE__ */ i(oe, { d: a ? J.check : J.copy, size: 14 }) }),
|
|
2837
|
+
/* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(oe, { d: J.close, size: 14 }) })
|
|
2835
2838
|
] });
|
|
2836
2839
|
}
|
|
2837
2840
|
function Ta({ color: t }) {
|
|
2838
|
-
return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(oe, { d:
|
|
2841
|
+
return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(oe, { d: J.voiceClone, size: 13, sw: 1.7, stroke: t }) });
|
|
2839
2842
|
}
|
|
2840
|
-
function
|
|
2843
|
+
function Id({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, next: l }) {
|
|
2841
2844
|
return /* @__PURE__ */ m("div", { className: "vs-tt", children: [
|
|
2842
2845
|
/* @__PURE__ */ m("div", { className: "vs-tt__r1", children: [
|
|
2843
2846
|
/* @__PURE__ */ i("div", { className: "vs-tt__chip", children: t }),
|
|
@@ -2854,7 +2857,7 @@ function zd({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
|
|
|
2854
2857
|
] })
|
|
2855
2858
|
] });
|
|
2856
2859
|
}
|
|
2857
|
-
function
|
|
2860
|
+
function bc({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek: a, onSeekFrac: o, onScrubStart: l, onScrubEnd: c, frac: u, glideMs: d = 260 }) {
|
|
2858
2861
|
const h = w(null), M = w(!1), [g, f] = z(null), y = Math.max(1, e), T = g ?? u, N = T != null ? Math.min(100, Math.max(0, T * 100)) : t / Math.max(1, y - 1) * 100, p = u != null && d > 0 && g == null ? `width ${d}ms linear, left ${d}ms linear` : "none", b = (A) => {
|
|
2859
2862
|
var I;
|
|
2860
2863
|
const P = (I = h.current) == null ? void 0 : I.getBoundingClientRect();
|
|
@@ -2898,7 +2901,7 @@ function Ic({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
|
|
|
2898
2901
|
] })
|
|
2899
2902
|
] });
|
|
2900
2903
|
}
|
|
2901
|
-
function
|
|
2904
|
+
function Oc(t, e, n) {
|
|
2902
2905
|
const r = new Set(t.seqs ?? t.words.map((l) => l.seq)), s = (e ?? []).filter((l) => !l.revertedAt && l.seq != null && r.has(l.seq) && (l.kind === "word" || l.kind === "line")), a = s.some((l) => l.kind === "line"), o = (l) => !!(n != null && n.has(`${l.seq}:${l.idx}`));
|
|
2903
2906
|
return {
|
|
2904
2907
|
script: a ? 0 : t.words.filter((l) => l.script && !o(l)).length,
|
|
@@ -2906,11 +2909,11 @@ function bc(t, e, n) {
|
|
|
2906
2909
|
manualCount: a ? 0 : s.filter((l) => l.kind === "word").length
|
|
2907
2910
|
};
|
|
2908
2911
|
}
|
|
2909
|
-
function
|
|
2912
|
+
function xc({ f: t, desk: e, onOpen: n }) {
|
|
2910
2913
|
const r = (s, a, o) => /* @__PURE__ */ m("span", { role: "button", title: "Open this line in Fix", className: "badge badge--fix", style: { marginLeft: o ? "auto" : 0 }, onClick: (l) => {
|
|
2911
2914
|
l.stopPropagation(), n == null || n();
|
|
2912
2915
|
}, children: [
|
|
2913
|
-
/* @__PURE__ */ i(oe, { d:
|
|
2916
|
+
/* @__PURE__ */ i(oe, { d: J.pencilFix, size: e ? 10 : 9, sw: 2 }),
|
|
2914
2917
|
s,
|
|
2915
2918
|
a > 0 && /* @__PURE__ */ i("span", { className: "badge__n", children: a })
|
|
2916
2919
|
] }, s);
|
|
@@ -2919,16 +2922,16 @@ function Oc({ f: t, desk: e, onOpen: n }) {
|
|
|
2919
2922
|
t.manual && r(e ? "MANUAL FIX" : "MANUAL", t.manualCount, t.script === 0)
|
|
2920
2923
|
] });
|
|
2921
2924
|
}
|
|
2922
|
-
function
|
|
2925
|
+
function Cc({ onOpen: t, alone: e }) {
|
|
2923
2926
|
const [n, r] = z(!1);
|
|
2924
2927
|
return /* @__PURE__ */ m("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) => {
|
|
2925
2928
|
s.stopPropagation(), t();
|
|
2926
2929
|
}, children: [
|
|
2927
|
-
/* @__PURE__ */ i(oe, { d:
|
|
2930
|
+
/* @__PURE__ */ i(oe, { d: J.pencilFix, size: 11, sw: 2 }),
|
|
2928
2931
|
n && "FIX"
|
|
2929
2932
|
] });
|
|
2930
2933
|
}
|
|
2931
|
-
function
|
|
2934
|
+
function Sc(t, e, n, r) {
|
|
2932
2935
|
const s = Gt(), [a, o] = z([]), [l, c] = z(0), u = w(/* @__PURE__ */ new Set()), d = w(!1), h = ze(() => new Map(n.filter((g) => g.sentenceId != null).map((g) => [g.sentenceId, g])), [n]);
|
|
2933
2936
|
x(() => {
|
|
2934
2937
|
u.current = /* @__PURE__ */ new Set();
|
|
@@ -2955,13 +2958,13 @@ function Cc(t, e, n, r) {
|
|
|
2955
2958
|
}
|
|
2956
2959
|
}, [t, e, a, l, h, r]), M;
|
|
2957
2960
|
}
|
|
2958
|
-
function
|
|
2961
|
+
function Dc(t) {
|
|
2959
2962
|
return t.live || t.auto ? "From this session" : t.cloned ? t.library === !1 ? "This transcription only" : "Saved in Voices" : "";
|
|
2960
2963
|
}
|
|
2961
2964
|
function un(t, e) {
|
|
2962
2965
|
return t.cloned ? { rank: 0, head: e.vcSheet } : t.gender === "male" ? { rank: 1, head: e.vcMale.toUpperCase() } : t.gender === "female" ? { rank: 2, head: e.vcFemale.toUpperCase() } : { rank: 3, head: e.vcSynth };
|
|
2963
2966
|
}
|
|
2964
|
-
function
|
|
2967
|
+
function Ac(t, e) {
|
|
2965
2968
|
const n = t.slice().sort((s, a) => un(s, e).rank - un(a, e).rank || s.name.localeCompare(a.name, void 0, { numeric: !0 })), r = {};
|
|
2966
2969
|
for (const s of n) {
|
|
2967
2970
|
const a = un(s, e).head;
|
|
@@ -2972,7 +2975,7 @@ function Dc(t, e) {
|
|
|
2972
2975
|
return { v: s, headOn: l, head: o, headCount: r[o], rule: l ? "0" : "1px solid var(--hair)" };
|
|
2973
2976
|
});
|
|
2974
2977
|
}
|
|
2975
|
-
function
|
|
2978
|
+
function Ec(t, e, n) {
|
|
2976
2979
|
const r = /* @__PURE__ */ new Set();
|
|
2977
2980
|
let s = !1;
|
|
2978
2981
|
for (const o of t)
|
|
@@ -3022,7 +3025,7 @@ function _i(t, e, n = !0) {
|
|
|
3022
3025
|
}
|
|
3023
3026
|
return a;
|
|
3024
3027
|
}
|
|
3025
|
-
function
|
|
3028
|
+
function _c({ roster: t, selected: e, onSelect: n, noClone: r, building: s, short: a, warn: o, sexOf: l, t: c }) {
|
|
3026
3029
|
const u = t.find((d) => d.key === e) ?? t[0] ?? null;
|
|
3027
3030
|
return u ? /* @__PURE__ */ i("div", { style: { display: "flex", flexWrap: "wrap", gap: 6, padding: "0 2px 9px", margin: "0 -2px" }, children: t.map((d) => {
|
|
3028
3031
|
const h = d.key === u.key, M = d.key >= 0 ? (o == null ? void 0 : o(d)) ?? null : null, g = d.key >= 0 && !M && !!(s != null && s(d)), f = d.key >= 0 && !M && !g && r(d), y = d.key >= 0 && !M && !g && !f && !d.hasVoice && !!(a != null && a(d));
|
|
@@ -3046,7 +3049,7 @@ function Ec({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
|
|
|
3046
3049
|
/* @__PURE__ */ i("span", { style: { fontSize: 12.5, fontWeight: 500, color: h ? "var(--ink-96)" : "var(--ink-62)", whiteSpace: "nowrap" }, children: d.name }),
|
|
3047
3050
|
d.hasVoice && !M && /* @__PURE__ */ i(Ta, { color: d.fg ?? (h ? "var(--ink-62)" : "var(--ink-45)") }),
|
|
3048
3051
|
M && /* @__PURE__ */ i("span", { title: M, "aria-label": M, style: { flex: "none", width: 15, height: 15, marginRight: -2, borderRadius: "50%", background: "#c27c00", color: "#fff", font: "900 10.5px/1 system-ui, sans-serif", display: "flex", alignItems: "center", justifyContent: "center" }, children: "!" }),
|
|
3049
|
-
y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: h ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d:
|
|
3052
|
+
y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: h ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: J.micOff, size: 13, sw: 1.7 }) }),
|
|
3050
3053
|
(f || g) && /* @__PURE__ */ i("span", { title: g ? "Cloning this voice…" : "No voice clone yet", "aria-label": g ? "Cloning this voice" : "No voice clone yet", style: { flex: "none", width: 10, height: 10, marginRight: -2, display: "flex", alignItems: "center", justifyContent: "center" }, children: g ? /* @__PURE__ */ i(Mt, { size: 10, color: "var(--brand)", track: "var(--fill-10)", sw: 1.6 }) : /* @__PURE__ */ i("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--brand)" } }) })
|
|
3051
3054
|
]
|
|
3052
3055
|
},
|
|
@@ -3054,8 +3057,8 @@ function Ec({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
|
|
|
3054
3057
|
);
|
|
3055
3058
|
}) }) : null;
|
|
3056
3059
|
}
|
|
3057
|
-
function
|
|
3058
|
-
const y = ze(() =>
|
|
3060
|
+
function Yc({ 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: h = null, problem: M, noClone: g = null, t: f }) {
|
|
3061
|
+
const y = ze(() => Ac(e, f), [e, f]), [T, N] = z({});
|
|
3059
3062
|
x(() => {
|
|
3060
3063
|
N({});
|
|
3061
3064
|
}, [d, h]);
|
|
@@ -3066,7 +3069,7 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3066
3069
|
}, S = !!r && r !== n;
|
|
3067
3070
|
return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
3068
3071
|
M && /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
|
|
3069
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3072
|
+
/* @__PURE__ */ i(oe, { d: J.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
|
|
3070
3073
|
/* @__PURE__ */ i("span", { style: { flex: 1, minWidth: 0, fontSize: 12.5, fontWeight: 300, lineHeight: 1.45, color: "var(--ink-80)", textWrap: "pretty" }, children: M }),
|
|
3071
3074
|
/* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(zo, { value: M, label: "Copy this error" }) })
|
|
3072
3075
|
] }),
|
|
@@ -3076,7 +3079,7 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3076
3079
|
/* @__PURE__ */ m("div", { role: g.action ? "button" : "status", tabIndex: g.action ? 0 : void 0, title: g.tip, onClick: g.action, onKeyDown: g.action ? (A) => {
|
|
3077
3080
|
(A.key === "Enter" || A.key === " ") && (A.preventDefault(), g.action());
|
|
3078
3081
|
} : void 0, style: { display: "flex", alignItems: "center", gap: 11, padding: "11px 8px", margin: "0 -6px", borderRadius: 10, cursor: g.action ? "pointer" : "default" }, children: [
|
|
3079
|
-
/* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: g.busy ? 0 : g.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: g.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: g.action ?
|
|
3082
|
+
/* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: g.busy ? 0 : g.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: g.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: g.action ? J.plus : J.mic, size: 15, sw: g.action ? 2 : 1.6, style: { color: g.action ? "var(--brand)" : "var(--ink-45)" } }) }),
|
|
3080
3083
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3081
3084
|
/* @__PURE__ */ i("div", { style: { fontSize: 14.5, fontWeight: g.action ? 500 : 400, color: g.action ? "var(--brand)" : "var(--ink-62)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: g.title }),
|
|
3082
3085
|
/* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: g.sub })
|
|
@@ -3084,7 +3087,7 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3084
3087
|
] })
|
|
3085
3088
|
] }),
|
|
3086
3089
|
y.map(({ v: A, headOn: P, head: O, headCount: V, rule: I }, W) => {
|
|
3087
|
-
const E =
|
|
3090
|
+
const E = Dc(A), k = a === A.id, Y = b(O), C = (u == null ? void 0 : u(A)) ?? null;
|
|
3088
3091
|
return /* @__PURE__ */ m(Mo, { children: [
|
|
3089
3092
|
P && O === f.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: W === 0 && !g ? "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: O }) }),
|
|
3090
3093
|
P && O !== f.vcSheet && /* @__PURE__ */ m(
|
|
@@ -3092,13 +3095,13 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3092
3095
|
{
|
|
3093
3096
|
type: "button",
|
|
3094
3097
|
onClick: (te) => {
|
|
3095
|
-
te.stopPropagation(), N((
|
|
3098
|
+
te.stopPropagation(), N((X) => ({ ...X, [O]: b(O) }));
|
|
3096
3099
|
},
|
|
3097
3100
|
title: `${Y ? "Hide " : "Show "}${O.toLowerCase()} voices`,
|
|
3098
3101
|
"aria-expanded": Y,
|
|
3099
3102
|
style: { width: "100%", textAlign: "left", font: "inherit", display: "flex", alignItems: "center", gap: 7, padding: Y ? "14px 2px 6px" : "14px 2px 14px", border: 0, borderTop: W === 0 && !g ? "0" : "1px solid var(--hair)", background: "transparent", cursor: "pointer", userSelect: "none" },
|
|
3100
3103
|
children: [
|
|
3101
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3104
|
+
/* @__PURE__ */ i(oe, { d: J.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${Y ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
|
|
3102
3105
|
/* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: O }),
|
|
3103
3106
|
/* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: V })
|
|
3104
3107
|
]
|
|
@@ -3115,25 +3118,25 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3115
3118
|
style: { width: "100%", textAlign: "left", font: "inherit", border: 0, borderTop: Y ? I : "0", display: "flex", alignItems: "center", gap: 11, padding: Y ? "11px 8px" : "0px 8px", margin: "0 -6px", borderRadius: 10, background: r === A.id ? "var(--brand-tint)" : "transparent", cursor: "pointer", opacity: Y ? 1 : 0, maxHeight: Y ? 120 : 0, overflow: "hidden", transition: "max-height 280ms cubic-bezier(.32,.72,0,1),padding 280ms cubic-bezier(.32,.72,0,1),opacity 200ms ease" },
|
|
3116
3119
|
children: [
|
|
3117
3120
|
/* @__PURE__ */ i("span", { title: k ? "Downloading this voice" : void 0, style: { flex: "none", width: 32, height: 32, borderRadius: "50%", background: k ? "transparent" : A.cloned ? "var(--brand-soft)" : "var(--fill-06)", display: "flex", alignItems: "center", justifyContent: "center" }, children: k ? /* @__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 === A.id ? /* @__PURE__ */ m("span", { className: "vcplay", children: [
|
|
3118
|
-
/* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(
|
|
3121
|
+
/* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(Uc, { height: 13, width: 2.5 }) }),
|
|
3119
3122
|
/* @__PURE__ */ i("span", { className: "vcplay__stop", children: /* @__PURE__ */ i(ko, { size: 11 }) })
|
|
3120
|
-
] }) : /* @__PURE__ */ i(oe, { d: A.cloned ?
|
|
3123
|
+
] }) : /* @__PURE__ */ i(oe, { d: A.cloned ? J.voiceClone : A.gender === "female" ? J.venus : A.gender === "male" ? J.mars : J.mic, size: 15, sw: 1.6, style: { color: A.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
|
|
3121
3124
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3122
3125
|
/* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 14.5, fontWeight: A.id === n ? 600 : 400, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: A.name }) }),
|
|
3123
3126
|
E && /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: E }),
|
|
3124
3127
|
C && (A.id === n ? /* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 5, marginTop: 3, minWidth: 0 }, children: [
|
|
3125
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3128
|
+
/* @__PURE__ */ i(oe, { d: J.notice, size: 12, sw: 1.7, style: { flex: "none", color: "var(--conf-mid)" } }),
|
|
3126
3129
|
/* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 11, fontWeight: 300, color: "var(--conf-mid)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${f.vcShared} ${C}` })
|
|
3127
3130
|
] }) : /* @__PURE__ */ i("div", { style: { marginTop: 2, minWidth: 0, fontSize: 12, fontWeight: 300, color: "var(--ink-50)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${f.vcUsedBy} ${C}` }))
|
|
3128
3131
|
] }),
|
|
3129
3132
|
/* @__PURE__ */ m("div", { style: { flex: "none", width: A.live ? A.id === n ? 18 : 0 : 42, overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 6 }, children: [
|
|
3130
3133
|
/* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18 } }),
|
|
3131
|
-
/* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: A.id === n && /* @__PURE__ */ i(oe, { d:
|
|
3134
|
+
/* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: A.id === n && /* @__PURE__ */ i(oe, { d: J.check, size: 17, sw: 2.2, style: { flex: "none", color: "var(--brand)" } }) })
|
|
3132
3135
|
] }),
|
|
3133
3136
|
(A.live || A.cloned && A.library === !1 && !A.auto && !!l) && /* @__PURE__ */ m("span", { className: "gvadd", role: "button", title: A.live ? `Save ${A.name}’s voice from this session` : `Add ${A.name} to My voices`, onClick: l ? (te) => {
|
|
3134
3137
|
te.stopPropagation(), l(A);
|
|
3135
3138
|
} : void 0, children: [
|
|
3136
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3139
|
+
/* @__PURE__ */ i(oe, { d: J.plus, size: 14, sw: 2 }),
|
|
3137
3140
|
"Add"
|
|
3138
3141
|
] })
|
|
3139
3142
|
]
|
|
@@ -3144,7 +3147,7 @@ function _c({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
|
|
|
3144
3147
|
S && /* @__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: f.vcUse }) }) })
|
|
3145
3148
|
] });
|
|
3146
3149
|
}
|
|
3147
|
-
function
|
|
3150
|
+
function Uc({ height: t, width: e = 2 }) {
|
|
3148
3151
|
const n = { width: e, height: "100%", borderRadius: 1, background: "var(--brand)" };
|
|
3149
3152
|
return /* @__PURE__ */ m("span", { style: { flex: "none", display: "flex", alignItems: "flex-end", gap: 2, height: t }, children: [
|
|
3150
3153
|
/* @__PURE__ */ i("span", { style: { ...n, animation: "vs-eq .62s ease-in-out infinite" } }),
|
|
@@ -3152,15 +3155,15 @@ function Yc({ height: t, width: e = 2 }) {
|
|
|
3152
3155
|
/* @__PURE__ */ i("span", { style: { ...n, animation: "vs-eq .62s ease-in-out .38s infinite" } })
|
|
3153
3156
|
] });
|
|
3154
3157
|
}
|
|
3155
|
-
const
|
|
3156
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3157
|
-
/* @__PURE__ */ i(oe, { d:
|
|
3158
|
+
const $c = /* @__PURE__ */ m("span", { style: { display: "inline-flex", alignItems: "center", gap: 3 }, children: [
|
|
3159
|
+
/* @__PURE__ */ i(oe, { d: J.langAuto, size: 19, sw: 1.7, style: { color: "var(--ink-62)", display: "block" } }),
|
|
3160
|
+
/* @__PURE__ */ i(oe, { d: J.globe, size: 18, sw: 1.6, style: { color: "var(--ink-62)", display: "block" } })
|
|
3158
3161
|
] });
|
|
3159
3162
|
function Yr(t, e) {
|
|
3160
3163
|
const n = e ? t == null ? void 0 : t.languages.find((r) => r.code === e) : null;
|
|
3161
|
-
return { flag: e ? (n == null ? void 0 : n.flag) ?? "🌐" :
|
|
3164
|
+
return { flag: e ? (n == null ? void 0 : n.flag) ?? "🌐" : $c, code: e ? e.toUpperCase() : "", label: (n == null ? void 0 : n.native) ?? "As spoken", name: (n == null ? void 0 : n.name) ?? "Original" };
|
|
3162
3165
|
}
|
|
3163
|
-
function
|
|
3166
|
+
function Rc(t, e, n = 0, r) {
|
|
3164
3167
|
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 = Gt(), { data: c } = ga(async () => {
|
|
3165
3168
|
if (!t || !e) return null;
|
|
3166
3169
|
try {
|
|
@@ -3171,44 +3174,44 @@ function $c(t, e, n = 0, r) {
|
|
|
3171
3174
|
}, [t, e, n, s, a, o]);
|
|
3172
3175
|
return c;
|
|
3173
3176
|
}
|
|
3174
|
-
function
|
|
3177
|
+
function Pc(t) {
|
|
3175
3178
|
return (/* @__PURE__ */ new Set([...Object.keys(t.speakers), ...Object.keys(t.speakerIds)])).size;
|
|
3176
3179
|
}
|
|
3177
|
-
function
|
|
3180
|
+
function Qc({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, sentenceIds: a }) {
|
|
3178
3181
|
const o = Gt(), { data: l, reload: c } = ga(async () => {
|
|
3179
3182
|
if (!t || !e) return null;
|
|
3180
|
-
const
|
|
3181
|
-
return { recordingId: t, lang: e, rows:
|
|
3183
|
+
const X = await o.client.recordings.voice(t, e, o.readAs).catch(() => []);
|
|
3184
|
+
return { recordingId: t, lang: e, rows: X.filter((L) => L.lang === e) };
|
|
3182
3185
|
}, [t, e, o, n]), u = ze(
|
|
3183
3186
|
() => l && l.lang === e && l.recordingId === t ? l.rows : [],
|
|
3184
3187
|
[l, e, t]
|
|
3185
|
-
), d = ze(() => ea(u, s), [u, s]), h = d ? d.voiceKey || null : s, [M, g] = z(null), [f, y] = z(null), T = w(/* @__PURE__ */ new Set()), N = `${t ?? ""}|${e ?? ""}|${h ?? ""}`, p = Je(async (
|
|
3188
|
+
), d = ze(() => ea(u, s), [u, s]), h = d ? d.voiceKey || null : s, [M, g] = z(null), [f, y] = z(null), T = w(/* @__PURE__ */ new Set()), N = `${t ?? ""}|${e ?? ""}|${h ?? ""}`, p = Je(async (X, L) => {
|
|
3186
3189
|
if (!t || !e || !n) return;
|
|
3187
|
-
const ie = L != null && L.size ? null : Ei(
|
|
3188
|
-
if (T.current.has(
|
|
3189
|
-
T.current.add(
|
|
3190
|
+
const ie = L != null && L.size ? null : Ei(X), ne = L != null && L.size ? L : ie, G = ne && ne.size ? Object.fromEntries([...ne].map(([Te, je]) => [String(Te), je])) : null, ee = `${t}|${e}|${G ? JSON.stringify(G) : X ?? ""}`;
|
|
3191
|
+
if (T.current.has(ee)) return;
|
|
3192
|
+
T.current.add(ee), g(ee), y(null);
|
|
3190
3193
|
const me = { langs: [e] };
|
|
3191
|
-
G ? me.voiceBySpeaker = G :
|
|
3194
|
+
G ? me.voiceBySpeaker = G : X && (me.voice = X);
|
|
3192
3195
|
const le = await Ci(o, `/v1/recordings/${t}/voice`, { method: "POST", body: me }).catch(() => null);
|
|
3193
|
-
if (g((Te) => Te ===
|
|
3194
|
-
T.current.delete(
|
|
3196
|
+
if (g((Te) => Te === ee ? null : Te), !(le != null && le.ok)) {
|
|
3197
|
+
T.current.delete(ee);
|
|
3195
3198
|
const Te = le ? await le.json().catch(() => null) : null;
|
|
3196
3199
|
y((Te == null ? void 0 : Te.message) || "This voice could not be prepared.");
|
|
3197
3200
|
return;
|
|
3198
3201
|
}
|
|
3199
3202
|
c();
|
|
3200
3203
|
}, [t, e, n, o, c]), b = Je(() => {
|
|
3201
|
-
const
|
|
3202
|
-
for (const L of [...T.current]) L.startsWith(
|
|
3204
|
+
const X = `${t ?? ""}|${e ?? ""}|`;
|
|
3205
|
+
for (const L of [...T.current]) L.startsWith(X) && T.current.delete(L);
|
|
3203
3206
|
y(null);
|
|
3204
|
-
}, [t, e]), S = !!d && (d.state === "queued" || d.state === "running") || M === N, A = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : f, P = (a == null ? void 0 : a.join(",")) ?? "", [O, V] = z(null), I = ze(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), W = ze(() => n && P ? P.split(",").map(Number).filter((
|
|
3207
|
+
}, [t, e]), S = !!d && (d.state === "queued" || d.state === "running") || M === N, A = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : f, P = (a == null ? void 0 : a.join(",")) ?? "", [O, V] = z(null), I = ze(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), W = ze(() => n && P ? P.split(",").map(Number).filter((X) => !I.has(X)) : [], [n, P, I]), E = w(null);
|
|
3205
3208
|
x(() => {
|
|
3206
3209
|
if (!n || !t || !e || !W.length) return;
|
|
3207
|
-
const
|
|
3210
|
+
const X = O ?? W[0], L = W.find((me) => me >= X) ?? W[0], ie = `${t}|${e}|${h ?? ""}`, ne = E.current;
|
|
3208
3211
|
if (ne && ne.key === ie && Math.abs(ne.near - L) < 12 && Date.now() - ne.at < 6e4) return;
|
|
3209
3212
|
E.current = { key: ie, near: L, at: Date.now() };
|
|
3210
|
-
const G = Ei(h),
|
|
3211
|
-
G && G.size ?
|
|
3213
|
+
const G = Ei(h), ee = { langs: [e], near: L };
|
|
3214
|
+
G && G.size ? ee.voiceBySpeaker = Object.fromEntries([...G].map(([me, le]) => [String(me), le])) : h && (ee.voice = h), Ci(o, `/v1/recordings/${t}/voice`, { method: "POST", body: ee }).then((me) => {
|
|
3212
3215
|
me.ok || (E.current = null);
|
|
3213
3216
|
}).catch(() => {
|
|
3214
3217
|
E.current = null;
|
|
@@ -3217,20 +3220,20 @@ function Pc({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
|
|
|
3217
3220
|
const k = W.length > 0, Y = w({ n: -1, at: 0 });
|
|
3218
3221
|
x(() => {
|
|
3219
3222
|
if (!k) return;
|
|
3220
|
-
const
|
|
3223
|
+
const X = setInterval(() => {
|
|
3221
3224
|
const L = I.size;
|
|
3222
3225
|
L !== Y.current.n && (Y.current = { n: L, at: Date.now() }), !(Date.now() - Y.current.at > 10 * 6e4) && c();
|
|
3223
3226
|
}, 3e3);
|
|
3224
|
-
return () => clearInterval(
|
|
3227
|
+
return () => clearInterval(X);
|
|
3225
3228
|
}, [k, c, I]);
|
|
3226
3229
|
const C = ze(() => {
|
|
3227
3230
|
if (!t) return [];
|
|
3228
|
-
const
|
|
3229
|
-
return $o(L, t, o.origin, r,
|
|
3231
|
+
const X = P ? P.split(",").map(Number).filter((ie) => !n || I.has(ie)) : void 0, L = d ?? (X != null && X.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
|
|
3232
|
+
return $o(L, t, o.origin, r, X);
|
|
3230
3233
|
}, [d, t, o, r, P, e, s, n, I]), te = ze(() => new Set(W), [W]);
|
|
3231
3234
|
return { listed: l, rows: u, track: d, renderVoiceId: h, rendering: S, failed: A, clips: C, requestRender: p, forget: b, reload: c, setNear: V, missing: W.length, coming: te };
|
|
3232
3235
|
}
|
|
3233
|
-
const
|
|
3236
|
+
const Vc = { share: J.share, delay: J.tabGauge, video: J.video, source: J.tabSources, script: J.tabScript, fix: J.tabFix, ending: J.tabEnding, summary: J.tabSummary, export: J.tabExport, settings: J.tabSettings, sources: J.tabSources, recs: J.mic };
|
|
3234
3237
|
function va({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s }) {
|
|
3235
3238
|
const o = s && t.length <= 3, l = t.some((T) => T.key === e), [c, u] = z(null), d = w(null), [h, M] = z(0);
|
|
3236
3239
|
x(() => {
|
|
@@ -3259,7 +3262,7 @@ function va({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
|
|
|
3259
3262
|
}
|
|
3260
3263
|
return /* @__PURE__ */ m("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: f, children: [
|
|
3261
3264
|
t.map((T) => {
|
|
3262
|
-
const N = e === T.key, p = o || N, b = o ? "1 1 0" : N ? "1 1 auto" : s && !l ? "1 1 0" : "0 0 auto", S = T.icon ??
|
|
3265
|
+
const N = e === T.key, p = o || N, b = o ? "1 1 0" : N ? "1 1 auto" : s && !l ? "1 1 0" : "0 0 auto", S = T.icon ?? Vc[T.key], A = () => {
|
|
3263
3266
|
f(), n(s && N ? "none" : T.key);
|
|
3264
3267
|
};
|
|
3265
3268
|
return s ? /* @__PURE__ */ m("button", { type: "button", role: "tab", "aria-selected": N, title: T.label, className: `tabbar__tab${N ? " is-on" : ""}`, style: { flex: b }, onClick: A, children: [
|
|
@@ -3273,8 +3276,8 @@ function va({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
|
|
|
3273
3276
|
y
|
|
3274
3277
|
] });
|
|
3275
3278
|
}
|
|
3276
|
-
const
|
|
3277
|
-
function
|
|
3279
|
+
const Bc = "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", Hc = "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";
|
|
3280
|
+
function Wc({ audio: t, video: e, formats: n, onExport: r }) {
|
|
3278
3281
|
const [s, a] = z(null), [o, l] = z(null), c = w(void 0), u = w(!0);
|
|
3279
3282
|
x(() => (u.current = !0, () => {
|
|
3280
3283
|
u.current = !1, window.clearTimeout(c.current);
|
|
@@ -3303,16 +3306,16 @@ function Hc({ audio: t, video: e, formats: n, onExport: r }) {
|
|
|
3303
3306
|
/* @__PURE__ */ i("span", { style: { fontSize: 13, fontWeight: 500, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: y.name }),
|
|
3304
3307
|
/* @__PURE__ */ i("span", { style: { font: "500 9.5px var(--vs-font-mono)", color: "var(--ink-40)", letterSpacing: ".04em" }, children: y.meta })
|
|
3305
3308
|
] }),
|
|
3306
|
-
/* @__PURE__ */ i(oe, { d: s === f ?
|
|
3309
|
+
/* @__PURE__ */ i(oe, { d: s === f ? J.check : Bc, size: 17, sw: 1.6, style: { flex: "none", color: s === f ? "var(--brand)" : "var(--ink-62)" } })
|
|
3307
3310
|
] })
|
|
3308
3311
|
] });
|
|
3309
3312
|
return /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
3310
|
-
t && g("audio", t,
|
|
3311
|
-
e && g("video", e,
|
|
3313
|
+
t && g("audio", t, Hc, "DOWNLOAD AUDIO"),
|
|
3314
|
+
e && g("video", e, J.video, "DOWNLOAD VIDEO"),
|
|
3312
3315
|
n !== !1 && /* @__PURE__ */ m(xe, { children: [
|
|
3313
3316
|
/* @__PURE__ */ i(xr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
|
|
3314
3317
|
/* @__PURE__ */ i("div", { className: "fmtgrid", children: _r.map((f) => /* @__PURE__ */ m("button", { type: "button", className: "fmtgrid__cell", title: o === f.key ? `Building the ${f.name}…` : f.note, disabled: o != null, "aria-busy": o === f.key || void 0, onClick: () => h(f.key), style: o && o !== f.key ? { opacity: 0.45 } : void 0, children: [
|
|
3315
|
-
o === f.key ? /* @__PURE__ */ i(Mt, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === f.key ?
|
|
3318
|
+
o === f.key ? /* @__PURE__ */ i(Mt, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === f.key ? J.check : f.icon, size: 16, sw: 1.6, style: { color: s === f.key ? "var(--brand)" : "var(--ink-62)" } }),
|
|
3316
3319
|
/* @__PURE__ */ i("span", { children: f.name })
|
|
3317
3320
|
] }, f.key)) })
|
|
3318
3321
|
] })
|
|
@@ -3332,7 +3335,7 @@ function Gr(t, e, n) {
|
|
|
3332
3335
|
}
|
|
3333
3336
|
r();
|
|
3334
3337
|
}
|
|
3335
|
-
function
|
|
3338
|
+
function Fc(t, e, n) {
|
|
3336
3339
|
const [r, s] = z(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
|
|
3337
3340
|
${t.summary}` : ""}`, l = Gt();
|
|
3338
3341
|
return x(() => {
|
|
@@ -3349,12 +3352,12 @@ ${t.summary}` : ""}`, l = Gt();
|
|
|
3349
3352
|
};
|
|
3350
3353
|
}, [o, l]), !n || !a ? t : (r == null ? void 0 : r.key) === o ? r.s : { state: "pending", retry: t.retry };
|
|
3351
3354
|
}
|
|
3352
|
-
function
|
|
3355
|
+
function Zc(t) {
|
|
3353
3356
|
return t != null && t.title && (t != null && t.summary) ? { state: "ready", title: t.title, summary: t.summary, retry: () => {
|
|
3354
3357
|
} } : { state: "unavailable", retry: () => {
|
|
3355
3358
|
} };
|
|
3356
3359
|
}
|
|
3357
|
-
function
|
|
3360
|
+
function Gc({ s: t }) {
|
|
3358
3361
|
const [e, n] = z(!1), r = w(void 0);
|
|
3359
3362
|
x(() => () => window.clearTimeout(r.current), []);
|
|
3360
3363
|
const s = t.title ?? "", a = t.summary ?? "", o = () => {
|
|
@@ -3371,7 +3374,7 @@ ${a}`).catch(() => {
|
|
|
3371
3374
|
/* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, minHeight: 24 }, children: [
|
|
3372
3375
|
/* @__PURE__ */ i(xr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "SUMMARY" }),
|
|
3373
3376
|
t.state === "ready" && /* @__PURE__ */ m("button", { type: "button", className: "sumcopy", title: "Copy title and summary", style: { color: e ? "var(--brand)" : "var(--ink-70)" }, onClick: o, children: [
|
|
3374
|
-
/* @__PURE__ */ i(oe, { d: e ?
|
|
3377
|
+
/* @__PURE__ */ i(oe, { d: e ? J.check : Jc, size: 13, sw: 1.6 }),
|
|
3375
3378
|
e ? "Copied" : "Copy"
|
|
3376
3379
|
] })
|
|
3377
3380
|
] }),
|
|
@@ -3384,15 +3387,15 @@ ${a}`).catch(() => {
|
|
|
3384
3387
|
] })
|
|
3385
3388
|
] });
|
|
3386
3389
|
}
|
|
3387
|
-
function
|
|
3390
|
+
function qc({ ytId: t, title: e, timeLabel: n, radius: r, style: s, large: a, children: o, picture: l }) {
|
|
3388
3391
|
return /* @__PURE__ */ m("div", { className: "livevid", style: { ...r != null ? { borderRadius: r } : null, ...s }, children: [
|
|
3389
3392
|
/* @__PURE__ */ i(oe, { d: "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", size: a ? 34 : 30, sw: 1.2 }),
|
|
3390
|
-
l ?? /* @__PURE__ */ i("iframe", { src:
|
|
3393
|
+
l ?? /* @__PURE__ */ i("iframe", { src: vc(t), title: e, referrerPolicy: "strict-origin-when-cross-origin", allow: "autoplay; encrypted-media; picture-in-picture" }),
|
|
3391
3394
|
n && /* @__PURE__ */ i("span", { className: "livevid__t", style: a ? { bottom: 10, right: 10 } : void 0, children: n }),
|
|
3392
3395
|
o
|
|
3393
3396
|
] });
|
|
3394
3397
|
}
|
|
3395
|
-
function
|
|
3398
|
+
function Kc(t = !0, e) {
|
|
3396
3399
|
const n = w(null), r = e ?? n;
|
|
3397
3400
|
return x(() => {
|
|
3398
3401
|
const s = r.current;
|
|
@@ -3413,8 +3416,8 @@ function qc(t = !0, e) {
|
|
|
3413
3416
|
};
|
|
3414
3417
|
}, [t]), r;
|
|
3415
3418
|
}
|
|
3416
|
-
const
|
|
3417
|
-
function
|
|
3419
|
+
const Jc = "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";
|
|
3420
|
+
function Xc(t, e) {
|
|
3418
3421
|
const [n, r] = Po(t), s = e.tabs.map((p) => p.key), a = e.tabbed !== !1, o = e.pinnable ?? s;
|
|
3419
3422
|
let l = n;
|
|
3420
3423
|
[...e.autoPin ?? []].reverse().forEach((p) => {
|
|
@@ -3453,15 +3456,15 @@ function Jc(t, e) {
|
|
|
3453
3456
|
};
|
|
3454
3457
|
return { id: t, tabbed: a && h.length > 1, cur: M, seq: d, pinnable: o, tabKeys: h, stripTabs: e.tabs.filter((p) => h.includes(p.key)), panel: N, pin: f, unpin: y };
|
|
3455
3458
|
}
|
|
3456
|
-
function
|
|
3457
|
-
return
|
|
3459
|
+
function eu({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
|
|
3460
|
+
return tu(t), /* @__PURE__ */ m(xe, { children: [
|
|
3458
3461
|
e.map((o) => {
|
|
3459
3462
|
const l = t.panel(o);
|
|
3460
3463
|
if (!l.show) return null;
|
|
3461
3464
|
const c = n(o);
|
|
3462
3465
|
return c ? /* @__PURE__ */ m("div", { "data-panel-key": o, "data-pinned": l.pinned ? "true" : "false", className: `pinwrap sidepanel ${(a == null ? void 0 : a(o, l.pinned)) ?? ""}`, style: { order: l.order, "--grip-h": `${(r == null ? void 0 : r[o]) ?? 30}px` }, children: [
|
|
3463
3466
|
c,
|
|
3464
|
-
l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(oe, { d:
|
|
3467
|
+
l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(oe, { d: J.pin, size: 12, sw: 2 }) })
|
|
3465
3468
|
] }, o) : null;
|
|
3466
3469
|
}),
|
|
3467
3470
|
t.tabbed && t.cur && /* @__PURE__ */ i("div", { className: "deskstrip", style: { order: 999 }, children: /* @__PURE__ */ i(va, { tabs: t.stripTabs, current: t.cur, onPick: (o) => {
|
|
@@ -3470,7 +3473,7 @@ function Xc({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
|
|
|
3470
3473
|
}, fold: !1 }) })
|
|
3471
3474
|
] });
|
|
3472
3475
|
}
|
|
3473
|
-
function
|
|
3476
|
+
function tu(t) {
|
|
3474
3477
|
const e = w(t);
|
|
3475
3478
|
e.current = t;
|
|
3476
3479
|
const n = t.id;
|
|
@@ -3571,9 +3574,9 @@ function eu(t) {
|
|
|
3571
3574
|
};
|
|
3572
3575
|
}, [n]);
|
|
3573
3576
|
}
|
|
3574
|
-
function
|
|
3577
|
+
function nu({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
|
|
3575
3578
|
const [o, l] = Vo(t), c = w(null), u = w(null);
|
|
3576
|
-
|
|
3579
|
+
ru(u), x(() => {
|
|
3577
3580
|
document.documentElement.style.setProperty("--colw", `${o}px`);
|
|
3578
3581
|
}, [o]);
|
|
3579
3582
|
const d = (M) => {
|
|
@@ -3597,7 +3600,7 @@ function tu({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
|
|
|
3597
3600
|
/* @__PURE__ */ i("div", { ref: c, "data-tab-col": t, className: `${e} sidecol`, style: { flex: `0 0 ${o}px`, ...h }, children: s ? a : /* @__PURE__ */ i("div", { ref: u, "data-panel-grid": "", className: "panelgrid", children: a }) })
|
|
3598
3601
|
] });
|
|
3599
3602
|
}
|
|
3600
|
-
function
|
|
3603
|
+
function ru(t) {
|
|
3601
3604
|
x(() => {
|
|
3602
3605
|
const e = t.current;
|
|
3603
3606
|
if (!e) return;
|
|
@@ -3625,11 +3628,11 @@ function nu(t) {
|
|
|
3625
3628
|
};
|
|
3626
3629
|
}, [t]);
|
|
3627
3630
|
}
|
|
3628
|
-
function
|
|
3631
|
+
function su(t) {
|
|
3629
3632
|
return /\bwas not captured\b/i.test(t ?? "");
|
|
3630
3633
|
}
|
|
3631
|
-
const
|
|
3632
|
-
function
|
|
3634
|
+
const iu = 1500, au = 3e5;
|
|
3635
|
+
function ou(t) {
|
|
3633
3636
|
const e = Gt(), [n, r] = z(null), [s, a] = z(null), [o, l] = z(null), [c, u] = z(null), d = w(null), h = w(null), M = w(null), g = w(0), f = Je(() => {
|
|
3634
3637
|
M.current && (clearTimeout(M.current), M.current = null), d.current && (d.current.pause(), d.current.removeAttribute("src"), d.current.load(), d.current = null), h.current && (URL.revokeObjectURL(h.current), h.current = null);
|
|
3635
3638
|
}, []), y = Je(() => {
|
|
@@ -3661,13 +3664,13 @@ function au(t) {
|
|
|
3661
3664
|
}
|
|
3662
3665
|
if (g.current !== b) return;
|
|
3663
3666
|
if (O.status === 202 || O.status === 503) {
|
|
3664
|
-
if (Date.now() - A >
|
|
3667
|
+
if (Date.now() - A > au) {
|
|
3665
3668
|
l(null), u({ message: "This voice is still being fetched. Try it again in a moment." });
|
|
3666
3669
|
return;
|
|
3667
3670
|
}
|
|
3668
3671
|
l(p.id), M.current = setTimeout(() => {
|
|
3669
3672
|
P();
|
|
3670
|
-
},
|
|
3673
|
+
}, iu);
|
|
3671
3674
|
return;
|
|
3672
3675
|
}
|
|
3673
3676
|
if (!O.ok) {
|
|
@@ -3697,7 +3700,7 @@ const Ur = 0.05, wa = (t, e) => {
|
|
|
3697
3700
|
for (let r = 0; r < t.length; r++) t[r].start <= e + 1e-6 && (n = r);
|
|
3698
3701
|
return n;
|
|
3699
3702
|
};
|
|
3700
|
-
function
|
|
3703
|
+
function lu(t, e, n, r) {
|
|
3701
3704
|
const s = Math.max(0, e), a = r > 0 && s >= r - Ur, o = t.length && t[0].start <= s + 1e-6 ? wa(t, s) : -1;
|
|
3702
3705
|
return o < 0 ? { t: s, playing: n && !a, sentenceId: null, offset: 0, ended: a } : { t: s, playing: n && !a, sentenceId: t[o].sentenceId ?? null, offset: Math.max(0, s - t[o].start), ended: a };
|
|
3703
3706
|
}
|
|
@@ -3715,11 +3718,11 @@ function Rn(t, e, n) {
|
|
|
3715
3718
|
const o = r > 0 && a >= r - Ur && s < 0;
|
|
3716
3719
|
return { t: a, playing: t.playing && !o, index: s >= 0 ? s : wa(e, a) };
|
|
3717
3720
|
}
|
|
3718
|
-
function
|
|
3721
|
+
function cu(t) {
|
|
3719
3722
|
return t.on ? t.want || t.relang ? "asked" : t.playing && (t.preparing || t.starting != null) ? "line" : null : null;
|
|
3720
3723
|
}
|
|
3721
3724
|
const Yi = "Preparing the voice…";
|
|
3722
|
-
function
|
|
3725
|
+
function uu(t) {
|
|
3723
3726
|
if (!t.lang) return null;
|
|
3724
3727
|
const e = t.langName;
|
|
3725
3728
|
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;
|
|
@@ -3737,8 +3740,8 @@ function ka(t, e) {
|
|
|
3737
3740
|
return () => clearTimeout(l);
|
|
3738
3741
|
}, [t, e]), [s, n];
|
|
3739
3742
|
}
|
|
3740
|
-
const
|
|
3741
|
-
function
|
|
3743
|
+
const du = (t) => `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
|
|
3744
|
+
function hu({ state: t, line: e, onRetry: n, onOriginal: r }) {
|
|
3742
3745
|
const [s, a] = z(() => Date.now());
|
|
3743
3746
|
x(() => {
|
|
3744
3747
|
if (t.since == null) return;
|
|
@@ -3769,9 +3772,9 @@ function du({ state: t, line: e, onRetry: n, onOriginal: r }) {
|
|
|
3769
3772
|
onPointerDown: (d) => d.stopPropagation(),
|
|
3770
3773
|
children: [
|
|
3771
3774
|
/* @__PURE__ */ m("div", { className: "pwait__head", children: [
|
|
3772
|
-
l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(oe, { d:
|
|
3775
|
+
l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(oe, { d: J.warnCircle, size: 18, sw: 1.8 }) }) : /* @__PURE__ */ i("div", { className: "pwait__spin", "aria-hidden": "true" }),
|
|
3773
3776
|
/* @__PURE__ */ i("div", { className: "pwait__t", children: c }),
|
|
3774
|
-
!l && o != null && o >= 3 && /* @__PURE__ */ i("div", { className: "pwait__clock", "aria-label": `${o} seconds`, children:
|
|
3777
|
+
!l && o != null && o >= 3 && /* @__PURE__ */ i("div", { className: "pwait__clock", "aria-label": `${o} seconds`, children: du(o) })
|
|
3775
3778
|
] }),
|
|
3776
3779
|
/* @__PURE__ */ i("div", { className: "pwait__note", children: u }),
|
|
3777
3780
|
!l && /* @__PURE__ */ i("div", { className: "pwait__bar", "aria-hidden": "true", children: /* @__PURE__ */ i("div", {}) }),
|
|
@@ -3789,7 +3792,7 @@ function La(t, e, n) {
|
|
|
3789
3792
|
const r = t[e], s = n && r.translations[n] && r.language !== n ? r.translations[n] : null;
|
|
3790
3793
|
if (!s && r.words.length) return r.words;
|
|
3791
3794
|
const a = (s ?? r.text).split(/\s+/).filter(Boolean), o = ((c = r.words[0]) == null ? void 0 : c.start) ?? r.start, l = Na(r, t[e + 1], r.start + Math.max(2, a.length * 0.4));
|
|
3792
|
-
return
|
|
3795
|
+
return Lc(a, o, l).map((u, d) => ({ ...u, seq: r.seqs[0] ?? 0, idx: d }));
|
|
3793
3796
|
}
|
|
3794
3797
|
function Ui(t, e, n) {
|
|
3795
3798
|
if (!t.engaged || e !== t.idx || !n.length) return null;
|
|
@@ -3803,15 +3806,15 @@ function bt(t, e) {
|
|
|
3803
3806
|
var l;
|
|
3804
3807
|
const n = t.clipPos;
|
|
3805
3808
|
if (t.wordSync || t.timed || !n || !(n.dur > 0)) return t.t;
|
|
3806
|
-
const r = e[t.idx], s = (r == null ? void 0 : r.start) ?? t.t, a = ((l = e[t.idx + 1]) == null ? void 0 : l.start) ??
|
|
3809
|
+
const r = e[t.idx], s = (r == null ? void 0 : r.start) ?? t.t, a = ((l = e[t.idx + 1]) == null ? void 0 : l.start) ?? Zt(r, s, t.dur), o = Math.max(0, a - s);
|
|
3807
3810
|
return s + Math.min(o, n.t / n.dur * o);
|
|
3808
3811
|
}
|
|
3809
|
-
function
|
|
3812
|
+
function Zt(t, e, n) {
|
|
3810
3813
|
var s;
|
|
3811
3814
|
const r = (s = t == null ? void 0 : t.words[t.words.length - 1]) == null ? void 0 : s.end;
|
|
3812
3815
|
return r != null && r > e ? r : (t == null ? void 0 : t.end) != null && t.end > e ? t.end : n > e ? n : e + 4;
|
|
3813
3816
|
}
|
|
3814
|
-
function
|
|
3817
|
+
function fu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd: o, endT: l, onGone: c, onKnown: u, lead: d, onTime: h, waiting: M = !1 }) {
|
|
3815
3818
|
const g = w(null), [f, y] = z(!1);
|
|
3816
3819
|
x(() => {
|
|
3817
3820
|
if (!M) {
|
|
@@ -3846,7 +3849,7 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3846
3849
|
C.current = n;
|
|
3847
3850
|
const te = w(h);
|
|
3848
3851
|
te.current = h;
|
|
3849
|
-
const
|
|
3852
|
+
const X = w(null), L = w(null), [ie, ne] = z(!0), [G, ee] = z(!1), me = () => {
|
|
3850
3853
|
S("unloadModule", ["captions"]), S("unloadModule", ["cc"]);
|
|
3851
3854
|
}, le = w([]), Te = () => {
|
|
3852
3855
|
me(), le.current.forEach(clearTimeout), le.current = [400, 1200, 2500, 5e3].map((Z) => window.setTimeout(me, Z));
|
|
@@ -3858,7 +3861,7 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3858
3861
|
(Ne = (Z = g.current) == null ? void 0 : Z.contentWindow) == null || Ne.postMessage(JSON.stringify({ event: "listening", id: "reader" }), "*");
|
|
3859
3862
|
} catch {
|
|
3860
3863
|
}
|
|
3861
|
-
(!W.current || W.current.muted) && S("mute"),
|
|
3864
|
+
(!W.current || W.current.muted) && S("mute"), ee(!0);
|
|
3862
3865
|
};
|
|
3863
3866
|
x(() => (d == null || d.bind(S), () => d == null ? void 0 : d.bind(null)), [!!d]), x(() => {
|
|
3864
3867
|
!d && G && S("mute");
|
|
@@ -3876,7 +3879,7 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3876
3879
|
return !!Ne && (Z < Ne.start - 1 || Z > Ne.end + 5);
|
|
3877
3880
|
}, H = () => {
|
|
3878
3881
|
D(C.current) || S("seekTo", [C.current, !0]);
|
|
3879
|
-
}, ce = () =>
|
|
3882
|
+
}, ce = () => X.current;
|
|
3880
3883
|
return x(() => {
|
|
3881
3884
|
const Z = (Ne) => {
|
|
3882
3885
|
var Fe, Ae, ue, _e, Ve, Q, fe, de, ae, ge, Ye, U, $, K, se, he;
|
|
@@ -3899,7 +3902,7 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3899
3902
|
(ae = De.current) == null || ae.call(De, ye), ye && ((ge = $e.current) == null || ge.call($e));
|
|
3900
3903
|
}
|
|
3901
3904
|
}
|
|
3902
|
-
typeof ((Ye = q == null ? void 0 : q.info) == null ? void 0 : Ye.currentTime) == "number" && (
|
|
3905
|
+
typeof ((Ye = q == null ? void 0 : q.info) == null ? void 0 : Ye.currentTime) == "number" && (X.current = q.info.currentTime, (U = W.current) == null || U.onInfo({ t: q.info.currentTime }), !N.current && L.current === 1 && (($ = te.current) == null || $.call(te, q.info.currentTime))), ((K = q == null ? void 0 : q.info) == null ? void 0 : K.muted) === !1 && !W.current && S("mute"), typeof ((se = q == null ? void 0 : q.info) == null ? void 0 : se.muted) == "boolean" && ((he = W.current) == null || he.onInfo({ muted: q.info.muted }));
|
|
3903
3906
|
};
|
|
3904
3907
|
return window.addEventListener("message", Z), () => window.removeEventListener("message", Z);
|
|
3905
3908
|
}, []), x(() => {
|
|
@@ -3922,7 +3925,7 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3922
3925
|
if (!G) return;
|
|
3923
3926
|
let Z = null, Ne = 0;
|
|
3924
3927
|
const q = setInterval(() => {
|
|
3925
|
-
const Le =
|
|
3928
|
+
const Le = X.current;
|
|
3926
3929
|
Ne = L.current === 1 && Le != null && Z != null && Math.abs(Le - Z) < 0.05 ? Ne + 1 : 0, Z = Le;
|
|
3927
3930
|
const Ie = Ne >= 3;
|
|
3928
3931
|
Ie !== V.current && (V.current = Ie, Y());
|
|
@@ -3939,22 +3942,22 @@ function hu({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
|
|
|
3939
3942
|
] })
|
|
3940
3943
|
] });
|
|
3941
3944
|
}
|
|
3942
|
-
const
|
|
3945
|
+
const Mu = /* @__PURE__ */ m(xe, { children: [
|
|
3943
3946
|
/* @__PURE__ */ i("rect", { x: "6.5", y: "5", width: "3.75", height: "14", rx: "1.2" }),
|
|
3944
3947
|
/* @__PURE__ */ i("rect", { x: "13.75", y: "5", width: "3.75", height: "14", rx: "1.2" })
|
|
3945
|
-
] }),
|
|
3946
|
-
function
|
|
3948
|
+
] }), gu = /* @__PURE__ */ i("path", { d: "M7.5 5.6a1 1 0 0 1 1.52-.85l9.1 5.55a1 1 0 0 1 0 1.7l-9.1 5.55a1 1 0 0 1-1.52-.85V5.6Z" });
|
|
3949
|
+
function mu({ player: t, size: e }) {
|
|
3947
3950
|
const n = t.muted ? "Unmute" : "Mute";
|
|
3948
|
-
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 ?
|
|
3951
|
+
return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(oe, { d: t.muted ? J.volumeOff : J.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
|
|
3949
3952
|
}
|
|
3950
|
-
function
|
|
3953
|
+
function pu() {
|
|
3951
3954
|
const [t, e] = z(""), n = w(null), r = Je((s) => {
|
|
3952
3955
|
clearTimeout(n.current), e(s), n.current = setTimeout(() => e(""), 3e3);
|
|
3953
3956
|
}, []);
|
|
3954
3957
|
return x(() => () => clearTimeout(n.current), []), [t, r];
|
|
3955
3958
|
}
|
|
3956
|
-
const
|
|
3957
|
-
function
|
|
3959
|
+
const yu = 0.2, Nu = 140, Tu = 320;
|
|
3960
|
+
function vu(t, e) {
|
|
3958
3961
|
const n = w(t);
|
|
3959
3962
|
n.current = t;
|
|
3960
3963
|
const r = w(0), s = w(1), a = Je((o, l) => {
|
|
@@ -3968,13 +3971,13 @@ function Tu(t, e) {
|
|
|
3968
3971
|
d();
|
|
3969
3972
|
}, []);
|
|
3970
3973
|
x(() => {
|
|
3971
|
-
a(e ?
|
|
3974
|
+
a(e ? yu : 1, e ? Nu : Tu);
|
|
3972
3975
|
}, [e, a]), x(() => () => {
|
|
3973
3976
|
cancelAnimationFrame(r.current), s.current = 1;
|
|
3974
3977
|
for (const o of n.current) o.setVolume(1);
|
|
3975
3978
|
}, []);
|
|
3976
3979
|
}
|
|
3977
|
-
function
|
|
3980
|
+
function wu(t, e, n, r) {
|
|
3978
3981
|
var De;
|
|
3979
3982
|
const s = w(null), a = w(!1), o = w(!1), [l, c] = z(null), [u, d] = z(!0), h = w(!0), M = w(!1), [g, f] = z(0), y = w(0);
|
|
3980
3983
|
y.current = g;
|
|
@@ -4021,16 +4024,16 @@ function vu(t, e, n, r) {
|
|
|
4021
4024
|
let B = 0;
|
|
4022
4025
|
for (let F = 0; F < t.length; F++) t[F].start <= g + 0.05 && (B = F);
|
|
4023
4026
|
return B;
|
|
4024
|
-
}, [t, g]), [te,
|
|
4027
|
+
}, [t, g]), [te, X] = z(0), L = (B) => {
|
|
4025
4028
|
const F = Math.max(0, p.current != null ? Math.min(B, Math.max(0, p.current - 0.5)) : B);
|
|
4026
|
-
O("seekTo", [F + N.current, !0]), T.current = { t: F, at: performance.now() }, f(F),
|
|
4029
|
+
O("seekTo", [F + N.current, !0]), T.current = { t: F, at: performance.now() }, f(F), X((_) => _ + 1);
|
|
4027
4030
|
}, ie = w(!1), ne = w(void 0), G = (B) => {
|
|
4028
4031
|
window.clearTimeout(ne.current), ne.current = window.setTimeout(() => {
|
|
4029
4032
|
!ie.current || B <= 0 || I.current === 1 || I.current === 3 || (O("playVideo"), G(B - 1));
|
|
4030
4033
|
}, 1200);
|
|
4031
4034
|
};
|
|
4032
4035
|
x(() => () => window.clearTimeout(ne.current), []);
|
|
4033
|
-
const
|
|
4036
|
+
const ee = () => {
|
|
4034
4037
|
if (ie.current = !0, !a.current) {
|
|
4035
4038
|
o.current = !0;
|
|
4036
4039
|
return;
|
|
@@ -4051,7 +4054,7 @@ function vu(t, e, n, r) {
|
|
|
4051
4054
|
P(!1);
|
|
4052
4055
|
return;
|
|
4053
4056
|
}
|
|
4054
|
-
g >= Y - 0.25 && L(0),
|
|
4057
|
+
g >= Y - 0.25 && L(0), ee();
|
|
4055
4058
|
}, Te = (B) => {
|
|
4056
4059
|
const F = t[Math.max(0, Math.min(t.length - 1, B))];
|
|
4057
4060
|
F && L(F.start);
|
|
@@ -4093,7 +4096,7 @@ function vu(t, e, n, r) {
|
|
|
4093
4096
|
seekFrac: (B) => L(Math.max(0, Math.min(1, B)) * Y),
|
|
4094
4097
|
seekWord: (B) => L(B.start),
|
|
4095
4098
|
playRow: (B) => {
|
|
4096
|
-
Te(B), V ||
|
|
4099
|
+
Te(B), V || ee();
|
|
4097
4100
|
},
|
|
4098
4101
|
stop: () => {
|
|
4099
4102
|
me(), L(0);
|
|
@@ -4105,7 +4108,7 @@ function vu(t, e, n, r) {
|
|
|
4105
4108
|
V && (O("pauseVideo"), je.current = !0);
|
|
4106
4109
|
},
|
|
4107
4110
|
release: () => {
|
|
4108
|
-
je.current && (je.current = !1,
|
|
4111
|
+
je.current && (je.current = !1, ee());
|
|
4109
4112
|
},
|
|
4110
4113
|
error: null,
|
|
4111
4114
|
clearError: () => {
|
|
@@ -4117,7 +4120,7 @@ function vu(t, e, n, r) {
|
|
|
4117
4120
|
setVolume: (B) => O("setVolume", [Math.round(B * 100)])
|
|
4118
4121
|
}, lead: E, setVideoSound: ve };
|
|
4119
4122
|
}
|
|
4120
|
-
function
|
|
4123
|
+
function ku(t, e, n, r, s = 0, a = null) {
|
|
4121
4124
|
var _;
|
|
4122
4125
|
const o = w(null), [l, c] = z(!1), [u, d] = z(0), [h, M] = z(!1), g = w(h);
|
|
4123
4126
|
g.current = h;
|
|
@@ -4140,7 +4143,7 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4140
4143
|
c(!1);
|
|
4141
4144
|
const Z = H.error, Ne = Eo(Z, !1);
|
|
4142
4145
|
xo(t).then((q) => {
|
|
4143
|
-
|
|
4146
|
+
su(q == null ? void 0 : q.message) || qi(Z), o.current === H && (T({ message: (q == null ? void 0 : q.message) ?? Ne }), q != null && q.permanent || (o.current = null));
|
|
4144
4147
|
});
|
|
4145
4148
|
}, o.current = H, () => {
|
|
4146
4149
|
S.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;
|
|
@@ -4154,16 +4157,16 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4154
4157
|
E.current = V;
|
|
4155
4158
|
const k = w(a);
|
|
4156
4159
|
k.current = a;
|
|
4157
|
-
const [Y, C] = z(!1), te = w(!1),
|
|
4160
|
+
const [Y, C] = z(!1), te = w(!1), X = (D) => {
|
|
4158
4161
|
te.current = D, C(D);
|
|
4159
4162
|
};
|
|
4160
4163
|
x(() => {
|
|
4161
4164
|
var D;
|
|
4162
|
-
a == null && te.current && (
|
|
4165
|
+
a == null && te.current && (X(!1), (D = o.current) == null || D.play().catch(() => {
|
|
4163
4166
|
}));
|
|
4164
4167
|
}, [a]), x(() => {
|
|
4165
4168
|
var D;
|
|
4166
|
-
!Y || a == null || a < u + 1.5 || (
|
|
4169
|
+
!Y || a == null || a < u + 1.5 || (X(!1), (D = o.current) == null || D.play().catch(() => {
|
|
4167
4170
|
}));
|
|
4168
4171
|
}, [Y, a, u]), x(() => {
|
|
4169
4172
|
if (!l) return;
|
|
@@ -4177,7 +4180,7 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4177
4180
|
return;
|
|
4178
4181
|
}
|
|
4179
4182
|
if (k.current != null && Z >= k.current) {
|
|
4180
|
-
|
|
4183
|
+
X(!0), ce.pause(), d(Z);
|
|
4181
4184
|
return;
|
|
4182
4185
|
}
|
|
4183
4186
|
d(Z);
|
|
@@ -4194,7 +4197,7 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4194
4197
|
}, [n, u]), [ie, ne] = z(0), G = (D) => {
|
|
4195
4198
|
const H = k.current != null ? Math.min(D, Math.max(0, k.current - 0.5)) : D, ce = o.current;
|
|
4196
4199
|
d(H), ce && (ce.currentTime = H + b.current), ne((Z) => Z + 1);
|
|
4197
|
-
},
|
|
4200
|
+
}, ee = (D) => {
|
|
4198
4201
|
(D == null ? void 0 : D.name) !== "AbortError" && T(Ct(D));
|
|
4199
4202
|
}, me = () => {
|
|
4200
4203
|
var H;
|
|
@@ -4212,10 +4215,10 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4212
4215
|
return;
|
|
4213
4216
|
}
|
|
4214
4217
|
if (te.current) {
|
|
4215
|
-
|
|
4218
|
+
X(!1);
|
|
4216
4219
|
return;
|
|
4217
4220
|
}
|
|
4218
|
-
D.currentTime < b.current && (D.currentTime = b.current), u >= I - 0.25 && G(0), D.play().catch(
|
|
4221
|
+
D.currentTime < b.current && (D.currentTime = b.current), u >= I - 0.25 && G(0), D.play().catch(ee);
|
|
4219
4222
|
}, le = (D) => {
|
|
4220
4223
|
const H = n[Math.max(0, Math.min(n.length - 1, D))];
|
|
4221
4224
|
H && G(H.start);
|
|
@@ -4228,18 +4231,18 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4228
4231
|
ce.pause();
|
|
4229
4232
|
return;
|
|
4230
4233
|
}
|
|
4231
|
-
|
|
4234
|
+
X(!1), ce.play().catch(ee);
|
|
4232
4235
|
}
|
|
4233
4236
|
}, Se = (D) => G(D.start), we = (D) => {
|
|
4234
4237
|
le(D);
|
|
4235
4238
|
const H = o.current;
|
|
4236
|
-
H && H.paused && H.play().catch(
|
|
4239
|
+
H && H.paused && H.play().catch(ee);
|
|
4237
4240
|
}, ve = w(!1), Ee = w(0), $e = () => {
|
|
4238
4241
|
var D;
|
|
4239
4242
|
l && ((D = o.current) == null || D.pause(), ve.current = !0);
|
|
4240
4243
|
}, De = () => {
|
|
4241
4244
|
var D;
|
|
4242
|
-
ve.current && (ve.current = !1, (D = o.current) == null || D.play().catch(
|
|
4245
|
+
ve.current && (ve.current = !1, (D = o.current) == null || D.play().catch(ee));
|
|
4243
4246
|
};
|
|
4244
4247
|
return {
|
|
4245
4248
|
autoplay: async () => {
|
|
@@ -4299,7 +4302,7 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4299
4302
|
wordSync: !0,
|
|
4300
4303
|
pause: () => {
|
|
4301
4304
|
var D, H;
|
|
4302
|
-
|
|
4305
|
+
X(!1), (D = S.current) != null && D.asked && (S.current = null), (H = o.current) == null || H.pause();
|
|
4303
4306
|
},
|
|
4304
4307
|
setVolume: (D) => {
|
|
4305
4308
|
o.current && (o.current.volume = D);
|
|
@@ -4309,17 +4312,17 @@ function wu(t, e, n, r, s = 0, a = null) {
|
|
|
4309
4312
|
}
|
|
4310
4313
|
};
|
|
4311
4314
|
}
|
|
4312
|
-
function
|
|
4315
|
+
function Lu(t, e, n, r, s, a, o = !1, l) {
|
|
4313
4316
|
const c = w(/* @__PURE__ */ new Set());
|
|
4314
4317
|
c.current = l ?? c.current;
|
|
4315
4318
|
const u = w(null), [d, h] = z(!1), [M, g] = z(0), [f, y] = z(0), [T, N] = z(!1), p = w(T);
|
|
4316
4319
|
p.current = T;
|
|
4317
4320
|
const [b, S] = z(null), [A, P] = z(null), [O, V] = z(null), [I, W] = z(null), E = w(I);
|
|
4318
4321
|
E.current = I;
|
|
4319
|
-
const [k, Y] = z(null), [C, te] = z(null), [
|
|
4322
|
+
const [k, Y] = z(null), [C, te] = z(null), [X, L] = z(null), [ie, ne] = z(!1), G = w(e);
|
|
4320
4323
|
G.current = e;
|
|
4321
|
-
const
|
|
4322
|
-
|
|
4324
|
+
const ee = w(o), me = w([]);
|
|
4325
|
+
ee.current = o, u.current && (u.current.flow = o);
|
|
4323
4326
|
const le = w(null), Te = w(s);
|
|
4324
4327
|
Te.current = s;
|
|
4325
4328
|
const je = w(a);
|
|
@@ -4332,18 +4335,18 @@ function ku(t, e, n, r, s, a, o = !1, l) {
|
|
|
4332
4335
|
}, U.onError = ($) => {
|
|
4333
4336
|
h(U.playing), S($ instanceof Xi ? { 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." });
|
|
4334
4337
|
}, U.gapBefore = ($, K) => {
|
|
4335
|
-
if (!
|
|
4338
|
+
if (!ee.current) return 0;
|
|
4336
4339
|
const se = G.current, he = se.find((Oe) => Oe.sentenceId === $), be = se.find((Oe) => Oe.sentenceId === K);
|
|
4337
4340
|
if (!be) return 0;
|
|
4338
4341
|
const ye = E.current;
|
|
4339
4342
|
if ($ == null) return ye && ye.sid === K ? Math.max(0, be.start - ye.t) : 0;
|
|
4340
4343
|
const ke = le.current;
|
|
4341
|
-
return ke && Date.now() - ke.at < 2e3 ? Math.max(0, be.start - (ke.t + (Date.now() - ke.at) / 1e3 * U.rate)) : !he || be.start <= he.start ? 0 : Math.max(0, be.start -
|
|
4342
|
-
}, U.flow =
|
|
4344
|
+
return ke && Date.now() - ke.at < 2e3 ? Math.max(0, be.start - (ke.t + (Date.now() - ke.at) / 1e3 * U.rate)) : !he || be.start <= he.start ? 0 : Math.max(0, be.start - Zt(he, he.start, he.start + 4));
|
|
4345
|
+
}, U.flow = ee.current, U.silentSpan = ($) => {
|
|
4343
4346
|
var Pe;
|
|
4344
4347
|
const K = G.current, se = K.findIndex((ht) => ht.sentenceId === $), he = K[se];
|
|
4345
4348
|
if (!he) return null;
|
|
4346
|
-
const be = ((Pe = K[se + 1]) == null ? void 0 : Pe.start) ??
|
|
4349
|
+
const be = ((Pe = K[se + 1]) == null ? void 0 : Pe.start) ?? Zt(he, he.start, he.start + 4), ye = Math.max(0, be - he.start), ke = le.current, Oe = ke && Date.now() - ke.at < 2e3 ? ke.t + (Date.now() - ke.at) / 1e3 * (U.rate || 1) : he.start, He = Math.max(0, Math.min(ye, Oe - he.start));
|
|
4347
4350
|
return { fromS: He, ms: (ye - He) * 1e3 / (U.rate || 1) };
|
|
4348
4351
|
}, U.speakable = ($) => {
|
|
4349
4352
|
const K = Te.current;
|
|
@@ -4369,7 +4372,7 @@ function ku(t, e, n, r, s, a, o = !1, l) {
|
|
|
4369
4372
|
U.setMuted(p.current);
|
|
4370
4373
|
for (const se of t) U.add(se);
|
|
4371
4374
|
const $ = Ee.current;
|
|
4372
|
-
$ && (
|
|
4375
|
+
$ && (ee.current || t.some((se) => se.sentenceId >= ($.sentenceId ?? 0))) && (F(null), B.current($));
|
|
4373
4376
|
}, [r, t]);
|
|
4374
4377
|
const D = ze(() => o ? e.map((U) => U.sentenceId).filter((U) => U != null) : [], [e, o]);
|
|
4375
4378
|
me.current = D, x(() => {
|
|
@@ -4419,11 +4422,11 @@ function ku(t, e, n, r, s, a, o = !1, l) {
|
|
|
4419
4422
|
_(), W(null), ($ = u.current) == null || $.startWithin(-1, 0), _e(U);
|
|
4420
4423
|
}, Q = (U) => {
|
|
4421
4424
|
var he;
|
|
4422
|
-
const $ = e[U], K = ($ == null ? void 0 : $.start) ?? 0, se = ((he = e[U + 1]) == null ? void 0 : he.start) ??
|
|
4425
|
+
const $ = e[U], K = ($ == null ? void 0 : $.start) ?? 0, se = ((he = e[U + 1]) == null ? void 0 : he.start) ?? Zt($, K, Ie);
|
|
4423
4426
|
return { from: K, span: Math.max(0, se - K) };
|
|
4424
|
-
}, fe = Q(q), de = Math.max(0, Math.min(fe.span,
|
|
4427
|
+
}, fe = Q(q), de = Math.max(0, Math.min(fe.span, Zt(e[q], fe.from, fe.from + 4) - fe.from)), ae = I ? I.t : o ? C != null && ie ? fe.from + Math.min(fe.span, C) : C != null ? X != null ? Math.min(fe.from, X + C) : fe.from + Math.min(fe.span, de + C) : k && k.dur > 0 ? fe.from + Math.min(de, k.t / k.dur * de) : fe.from : k && k.dur > 0 ? fe.from + Math.min(fe.span, k.t / k.dur * fe.span) : fe.from;
|
|
4425
4428
|
x(() => {
|
|
4426
|
-
ve.current = Ee.current ??
|
|
4429
|
+
ve.current = Ee.current ?? lu(e, ae, d, Ie);
|
|
4427
4430
|
});
|
|
4428
4431
|
const ge = {
|
|
4429
4432
|
playing: d || $e,
|
|
@@ -4486,7 +4489,7 @@ function ku(t, e, n, r, s, a, o = !1, l) {
|
|
|
4486
4489
|
let K = 0;
|
|
4487
4490
|
for (let Ge = 0; Ge < e.length; Ge++) e[Ge].start <= $ && (K = Ge);
|
|
4488
4491
|
const se = e[K], he = o && se && $ < se.start - 0.05;
|
|
4489
|
-
if (o && se && (he || e[K + 1] && $ >=
|
|
4492
|
+
if (o && se && (he || e[K + 1] && $ >= Zt(se, se.start, se.start + 4))) {
|
|
4490
4493
|
const Ge = he ? K : K + 1, st = e[Ge];
|
|
4491
4494
|
(ht = u.current) == null || ht.startWithin(-1, 0);
|
|
4492
4495
|
const gt = { t: $, sid: st.sentenceId ?? null };
|
|
@@ -4551,29 +4554,29 @@ function ku(t, e, n, r, s, a, o = !1, l) {
|
|
|
4551
4554
|
} : void 0, B.current = (U) => {
|
|
4552
4555
|
var K;
|
|
4553
4556
|
const $ = Rn(U, e, Ie);
|
|
4554
|
-
if (
|
|
4557
|
+
if (ee.current) {
|
|
4555
4558
|
g($.index), Ae.current = $.index, $.playing && Ye($.index);
|
|
4556
4559
|
return;
|
|
4557
4560
|
}
|
|
4558
4561
|
(K = ge.seekFrac) == null || K.call(ge, $.t / Ie), $.playing && ue(Ae.current);
|
|
4559
4562
|
}, ge;
|
|
4560
4563
|
}
|
|
4561
|
-
const
|
|
4562
|
-
},
|
|
4563
|
-
function
|
|
4564
|
+
const ju = () => {
|
|
4565
|
+
}, zu = "The language this recording is read aloud in.", Iu = { title: "READ IN", note: "The transcript and its voice switch to this language." };
|
|
4566
|
+
function bu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: h, hearOriginal: M = !1, timed: g = !1, stockVoices: f = !1, stickyPicker: y = !1, pickerBusy: T = null, voiceSheet: N, forcedVoice: p = null }) {
|
|
4564
4567
|
var yn, pt, Nn, ln;
|
|
4565
|
-
const { onAddVoice: b, onPickVoice: S, onSelectSpeaker: A, noCloneFor: P, castNoClone: O, castShort: V, castBuilding: I, castWarn: W, badge: E, titleNode: k } = N ?? {}, Y = !!N, C = !!(N != null && N.pendingClones), [te,
|
|
4568
|
+
const { onAddVoice: b, onPickVoice: S, onSelectSpeaker: A, noCloneFor: P, castNoClone: O, castShort: V, castBuilding: I, castWarn: W, badge: E, titleNode: k } = N ?? {}, Y = !!N, C = !!(N != null && N.pendingClones), [te, X] = ra(), [L, ie] = z(null), [ne, G] = z(!1), [ee, me] = z(!1), [le, Te] = z(!1), [je, Se] = z(!1), we = u ?? l, ve = u === null, Ee = u != null || L != null, De = ((R) => !!R && !!(o != null && o.voice.includes(R)))(ve ? l : we) ? ve ? l : we : "en", B = ou(De), F = (N == null ? void 0 : N.cloneOn) ?? !0, [_, D] = z(0), H = w(F);
|
|
4566
4569
|
x(() => {
|
|
4567
4570
|
H.current !== F && (H.current = F, D((R) => R + 1));
|
|
4568
4571
|
}, [F]);
|
|
4569
|
-
const ce =
|
|
4572
|
+
const ce = Rc(De, Ee || s || ee, Pc(e) * 1e3 + _, { id: t ?? null, shareCode: a.shareCode ?? null }), Z = ze(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((R) => Y || !R.cloned || R.speaker != null), [ce, Y]), Ne = Z.length > 1, q = Yr(o, we), Le = ma(), Ie = ze(() => sa(o, "translation"), [o]), [Fe, Ae] = z(null), [ue] = z(() => /* @__PURE__ */ new Set()), [_e, Ve] = z({}), Q = ze(() => Ec(n, e, Le.vcUnknownSpk), [n, e, Le]), fe = Ne && Q.filter((R) => R.key >= 0).length > 1, de = Fe != null && Q.some((R) => R.key === Fe) ? Fe : ((yn = Q[0]) == null ? void 0 : yn.key) ?? null, ae = ze(() => {
|
|
4570
4573
|
const R = _i(Q, Z, F);
|
|
4571
4574
|
for (const [Ce, Qe] of Object.entries(_e[De ?? ""] ?? {})) R.set(Number(Ce), Qe);
|
|
4572
4575
|
return R;
|
|
4573
4576
|
}, [Q, Z, _e, De, F]), ge = fe && Object.keys(_e[De ?? ""] ?? {}).length > 0, Ye = ze(() => f && !ge ? _i(Q, Z, !1) : null, [f, ge, Q, Z]), U = ze(() => ge ? Ai(ae) || null : Ye && Ai(Ye) || null, [ge, ae, Ye]), $ = ge ? ae : Ye, K = Z.some((R) => R.cloned && R.consent !== "pending"), se = !!we && !!(o != null && o.voice.includes(we)), he = se && !M, be = ze(
|
|
4574
4577
|
() => n.filter((R) => !R.suppressed && !R.unclear).map((R) => R.sentenceId).filter((R) => R != null),
|
|
4575
4578
|
[n]
|
|
4576
|
-
), ye =
|
|
4579
|
+
), ye = Qc({ recordingId: t, lang: we, ended: s, cred: a, pickedVoice: p || (U ?? L), sentenceIds: s && he ? be : void 0 }), ke = Z.find((R) => R.id === L) ?? Z.find((R) => {
|
|
4577
4580
|
var Ce;
|
|
4578
4581
|
return R.id === ((Ce = ye.track) == null ? void 0 : Ce.voice);
|
|
4579
4582
|
}) ?? Z.find((R) => R.default) ?? Z[0] ?? null, Oe = (ke == null ? void 0 : ke.id) ?? null;
|
|
@@ -4582,7 +4585,7 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4582
4585
|
const R = setInterval(ye.reload, 4e3);
|
|
4583
4586
|
return () => clearInterval(R);
|
|
4584
4587
|
}, [ye.rendering, ye.reload]);
|
|
4585
|
-
const He = `${t ?? ""}|${we ?? ""}|${p || (U ?? L ?? ((pt = ye.track) == null ? void 0 : pt.voiceKey) ?? "default")}`, Pe =
|
|
4588
|
+
const He = `${t ?? ""}|${we ?? ""}|${p || (U ?? L ?? ((pt = ye.track) == null ? void 0 : pt.voiceKey) ?? "default")}`, Pe = Lu(ye.clips, n, r, He, ue, (Nn = ye.track) == null ? void 0 : Nn.wordTimes, g, ye.coming);
|
|
4586
4589
|
x(() => {
|
|
4587
4590
|
var Ce;
|
|
4588
4591
|
const R = (Ce = n[Pe.idx]) == null ? void 0 : Ce.sentenceId;
|
|
@@ -4606,18 +4609,18 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4606
4609
|
}, it = () => G(!0), Be = () => {
|
|
4607
4610
|
G(!1), me(le), Te(!1);
|
|
4608
4611
|
}, Mn = (R) => {
|
|
4609
|
-
if (d(R),
|
|
4612
|
+
if (d(R), X(R), !((h || y) && !le)) {
|
|
4610
4613
|
if (R != null) {
|
|
4611
4614
|
Be();
|
|
4612
4615
|
return;
|
|
4613
4616
|
}
|
|
4614
4617
|
B.reset(), G(!1), me(!1), Te(!1);
|
|
4615
4618
|
}
|
|
4616
|
-
},
|
|
4619
|
+
}, Ut = () => {
|
|
4617
4620
|
B.reset(), me(!0);
|
|
4618
4621
|
}, Xe = () => {
|
|
4619
4622
|
B.reset(), me(!1);
|
|
4620
|
-
}, ct = ne && !le, ot =
|
|
4623
|
+
}, ct = ne && !le, ot = ee || ne && le, rn = () => {
|
|
4621
4624
|
if (ct) {
|
|
4622
4625
|
G(!1);
|
|
4623
4626
|
return;
|
|
@@ -4636,29 +4639,29 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4636
4639
|
return;
|
|
4637
4640
|
}
|
|
4638
4641
|
ie(R);
|
|
4639
|
-
}, v = ve ? { ...Yr(o, null), flag: /* @__PURE__ */ i(oe, { d:
|
|
4642
|
+
}, v = ve ? { ...Yr(o, null), flag: /* @__PURE__ */ i(oe, { d: J.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : q, Gn = c ? h ? /* @__PURE__ */ i("span", { className: "barchip", style: ct ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(Bn, { flag: v.flag, code: v.code, bordered: !1, onClick: rn, flagOnly: !0, label: v.label }) }) : /* @__PURE__ */ i(Bn, { flag: v.flag, code: v.code, bordered: !1, onClick: it, flagOnly: !0, label: v.label }) : null, $t = J.voiceClone, Rt = Ee && (!!ye.track || ht), Pt = at ? "var(--conf-low)" : Rt || h && ot ? "var(--brand)" : "var(--ink-55)", qt = cu({ on: Ee, want: je, relang: st, playing: Pe.playing, preparing: !!Pe.preparing, starting: Pe.starting }), [mn] = ka(qt === "line", 400), qe = qt === "asked" || qt === "line" && mn, lt = ht || qe, sn = qt === "asked" ? Yi : Pe.preparing ? `Speaking this line in ${(ke == null ? void 0 : ke.name) ?? "this voice"}…` : ht ? `Preparing this recording in ${(ke == null ? void 0 : ke.name) ?? "this voice"} — it will play as soon as it is ready` : at ? `This voice could not be prepared: ${at}` : se ? Ne ? "Choose a voice" : ke ? ke.name : Le.vcNoVoice + q.label : `${Le.vcNoVoice}${q.label}`, vt = /* @__PURE__ */ i(Bo, { open: ne, onClose: Be, keepOpen: (!!h || y) && !le, value: ve ? null : we, onSelect: Mn, languages: Ie, title: (h == null ? void 0 : h.title) ?? "SPOKEN LANGUAGE", note: (h == null ? void 0 : h.note) ?? zu, searchPlaceholder: Le.search, none: "Original", pinned: (ve ? l : we) ? [ve ? l : we] : [], recent: te, requireVoice: le, sticky: y, busy: T }), mt = ze(() => Z.filter((R) => R.cloned && !R.auto), [Z]), Kt = (R) => R.voiceId ? mt.find((Ce) => Ce.id === `clone:${R.voiceId}`) ?? null : null, ft = ze(() => Q.filter((R) => R.key >= 0), [Q]), an = ze(() => {
|
|
4640
4643
|
const R = Z.filter((Qe) => !Qe.cloned);
|
|
4641
4644
|
if (!fe) return [...R, ...s && ft.length === 1 ? mt.filter((Qe) => Qe.id === `clone:${ft[0].voiceId}`) : []];
|
|
4642
4645
|
const Ce = [];
|
|
4643
4646
|
for (const Qe of ft) {
|
|
4644
4647
|
if (Kt(Qe)) continue;
|
|
4645
|
-
const Et = Z.find((
|
|
4648
|
+
const Et = Z.find((Bt) => Bt.cloned && Bt.auto && Bt.speaker === Qe.key);
|
|
4646
4649
|
!Et || Et.ready === !1 || Et.consent === "pending" && !C || Ce.push({ id: Et.id, name: Qe.name, cloned: !0, default: !1, live: !0, auto: !0, gender: Qe.sex ?? Et.gender ?? null, speaker: Qe.key, consent: Et.consent ?? null });
|
|
4647
4650
|
}
|
|
4648
4651
|
return [...R, ...mt, ...Ce];
|
|
4649
4652
|
}, [Z, mt, fe, ft, C, s]), ut = fe ? ft.find((R) => R.key === de) ?? null : null, on = (R) => {
|
|
4650
4653
|
var Ce;
|
|
4651
4654
|
return R ? ((Ce = Z.find((Qe) => Qe.id === R)) == null ? void 0 : Ce.gender) ?? null : null;
|
|
4652
|
-
}, St = ut ? ut.sex ?? on(ae.get(ut.key)) : null, Ze = ze(() => ut ? an.filter((R) => R.cloned ? R.live ? R.speaker === ut.key : R.id === `clone:${ut.voiceId}` : !0) : an, [an, ut, St, ft]),
|
|
4653
|
-
/* @__PURE__ */ i(oe, { d:
|
|
4655
|
+
}, St = ut ? ut.sex ?? on(ae.get(ut.key)) : null, Ze = ze(() => ut ? an.filter((R) => R.cloned ? R.live ? R.speaker === ut.key : R.id === `clone:${ut.voiceId}` : !0) : an, [an, ut, St, ft]), Qt = (R) => Z.find((Ce) => Ce.cloned && Ce.auto && Ce.speaker === R) ?? null, jt = { people: ft, gvList: Z, autoOf: Qt, savedFor: Kt }, Vt = (E == null ? void 0 : E(jt)) ?? 0, tt = W ? ft.map((R) => W(R, jt)).filter((R) => !!R) : [], pn = /* @__PURE__ */ m("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": h ? ot : void 0, "aria-busy": lt || void 0, title: lt || at ? sn : void 0, style: { cursor: "pointer", background: Rt || lt || h && ot ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: h && ot ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: h ? re : Ut, children: [
|
|
4656
|
+
/* @__PURE__ */ i(oe, { d: $t, size: 17, sw: 1.6, style: { color: Pt } }),
|
|
4654
4657
|
lt && /* @__PURE__ */ i("span", { "aria-hidden": "true", style: { position: "absolute", inset: 0, boxSizing: "border-box", borderRadius: "50%", border: "2px solid var(--fill-12)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite", pointerEvents: "none" } }),
|
|
4655
|
-
tt.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: tt.join(" · "), children: "!" }) : !!
|
|
4656
|
-
] }), Dt = /* @__PURE__ */ i(nn, { open:
|
|
4657
|
-
|
|
4658
|
+
tt.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: tt.join(" · "), children: "!" }) : !!Vt && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${Vt} speaker${Vt === 1 ? "" : "s"} can get a cloned voice`, children: Vt })
|
|
4659
|
+
] }), Dt = /* @__PURE__ */ i(nn, { open: ee, onClose: Xe, title: Le.vcSheet, titleNode: k, doneLabel: Le.done, children: /* @__PURE__ */ i(
|
|
4660
|
+
Yc,
|
|
4658
4661
|
{
|
|
4659
4662
|
t: Le,
|
|
4660
4663
|
cast: fe && /* @__PURE__ */ i(
|
|
4661
|
-
|
|
4664
|
+
_c,
|
|
4662
4665
|
{
|
|
4663
4666
|
t: Le,
|
|
4664
4667
|
roster: Q,
|
|
@@ -4677,7 +4680,7 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4677
4680
|
onAdd: (R) => {
|
|
4678
4681
|
B.reset(), b == null || b(R);
|
|
4679
4682
|
},
|
|
4680
|
-
noClone: ut && !Ze.some((R) => R.cloned) ? (P == null ? void 0 : P(ut,
|
|
4683
|
+
noClone: ut && !Ze.some((R) => R.cloned) ? (P == null ? void 0 : P(ut, Qt(ut.key), jt)) ?? null : null,
|
|
4681
4684
|
usedBy: fe && de != null ? (R) => {
|
|
4682
4685
|
const Ce = Q.filter((Qe) => Qe.key !== de && ae.get(Qe.key) === R.id);
|
|
4683
4686
|
return Ce.length ? Ce.map((Qe) => Qe.name).join(", ") : null;
|
|
@@ -4704,10 +4707,10 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4704
4707
|
) }), qn = h ? null : /* @__PURE__ */ m(xe, { children: [
|
|
4705
4708
|
vt,
|
|
4706
4709
|
Dt
|
|
4707
|
-
] }), Kn = h && (ne ||
|
|
4710
|
+
] }), Kn = h && (ne || ee) ? /* @__PURE__ */ i("div", { className: "vs-side", children: ne ? vt : Dt }) : null, At = Ge ? at ? `This voice could not be prepared: ${at}` : qe && (je || Pe.playing) ? Yi : null : null, Jn = Tt;
|
|
4708
4711
|
return {
|
|
4709
4712
|
barChip: { flag: v.flag, code: v.code, label: v.label, onClick: h || y ? rn : it, active: !!((h || y) && ct), can: c },
|
|
4710
|
-
sheetsOpen: ne ||
|
|
4713
|
+
sheetsOpen: ne || ee,
|
|
4711
4714
|
on: Ge,
|
|
4712
4715
|
player: gt,
|
|
4713
4716
|
chip: Gn,
|
|
@@ -4725,14 +4728,14 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4725
4728
|
sampling: B.sampleId != null,
|
|
4726
4729
|
error: B.error,
|
|
4727
4730
|
clearError: () => B.clearError(),
|
|
4728
|
-
openVoices:
|
|
4731
|
+
openVoices: Ut,
|
|
4729
4732
|
openPicker: it,
|
|
4730
4733
|
original: ve,
|
|
4731
4734
|
reloadVoices: () => D((R) => R + 1),
|
|
4732
4735
|
voicesVer: _,
|
|
4733
4736
|
people: ft,
|
|
4734
4737
|
gvList: Z,
|
|
4735
|
-
autoOf:
|
|
4738
|
+
autoOf: Qt,
|
|
4736
4739
|
savedFor: Kt,
|
|
4737
4740
|
closeVoices: Xe,
|
|
4738
4741
|
setSheet: me,
|
|
@@ -4756,12 +4759,12 @@ function Iu({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
|
|
|
4756
4759
|
langList: { value: ve ? null : we, onSelect: Mn, languages: Ie, searchPlaceholder: Le.search, none: "Original", pinned: (ve ? l : we) ? [ve ? l : we] : [], recent: te }
|
|
4757
4760
|
};
|
|
4758
4761
|
}
|
|
4759
|
-
function
|
|
4762
|
+
function Ou({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: h = !0, tail: M, tailFg: g, running: f, desk: y, feedRef: T, listener: N, showLabels: p, find: b, findOpen: S, lang: A, warm: P, onVisible: O, wordHl: V = !0 }) {
|
|
4760
4763
|
const { playing: I, engaged: W, t: E, idx: k, seekN: Y, wordSync: C, clipPos: te } = n;
|
|
4761
|
-
|
|
4762
|
-
const
|
|
4763
|
-
|
|
4764
|
-
const [L, ie] = z(null), ne = (b ?? "").trim().toLowerCase(), [G,
|
|
4764
|
+
Kc(!0, T);
|
|
4765
|
+
const X = w(null);
|
|
4766
|
+
jc(T, X);
|
|
4767
|
+
const [L, ie] = z(null), ne = (b ?? "").trim().toLowerCase(), [G, ee] = z(0), me = w(0), le = w(null), Te = w(k), je = (F) => {
|
|
4765
4768
|
var _;
|
|
4766
4769
|
return ((_ = T.current) == null ? void 0 : _.querySelector(`[data-tx-row="${F}"]`)) ?? null;
|
|
4767
4770
|
}, Se = w("");
|
|
@@ -4816,14 +4819,14 @@ function bu({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4816
4819
|
const $e = w(0);
|
|
4817
4820
|
x(() => {
|
|
4818
4821
|
if (!I) {
|
|
4819
|
-
Te.current = k, $e.current = 0,
|
|
4822
|
+
Te.current = k, $e.current = 0, ee(0);
|
|
4820
4823
|
return;
|
|
4821
4824
|
}
|
|
4822
4825
|
const F = () => {
|
|
4823
4826
|
const D = k !== Te.current;
|
|
4824
4827
|
Te.current = k;
|
|
4825
4828
|
let H = performance.now() < me.current ? 0 : ve(k);
|
|
4826
|
-
D && H && !$e.current && (we(k), H = 0), $e.current = H,
|
|
4829
|
+
D && H && !$e.current && (we(k), H = 0), $e.current = H, ee(H);
|
|
4827
4830
|
};
|
|
4828
4831
|
F();
|
|
4829
4832
|
const _ = setInterval(F, 200);
|
|
@@ -4832,19 +4835,19 @@ function bu({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4832
4835
|
Y && Ee(k);
|
|
4833
4836
|
}, [Y]);
|
|
4834
4837
|
const De = () => {
|
|
4835
|
-
Ee(k), $e.current = 0,
|
|
4838
|
+
Ee(k), $e.current = 0, ee(0);
|
|
4836
4839
|
}, B = (F) => /* @__PURE__ */ i("div", { className: `txfollow txfollow--${F}`, children: /* @__PURE__ */ m("button", { type: "button", className: "txfollow__pill", title: "Jump to the line playing now", onClick: De, children: [
|
|
4837
4840
|
/* @__PURE__ */ i(oe, { d: F === "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 }),
|
|
4838
4841
|
"Now playing"
|
|
4839
4842
|
] }) });
|
|
4840
4843
|
return /* @__PURE__ */ m("div", { ref: T, "data-tx-feed": "1", className: `txfeed${y ? " txfeed--desk" : ""}${S && !f ? " is-find" : ""}`, children: [
|
|
4841
|
-
/* @__PURE__ */ i(
|
|
4844
|
+
/* @__PURE__ */ i(zc, { thumbRef: X }),
|
|
4842
4845
|
I && G === -1 && B("up"),
|
|
4843
4846
|
e.map((F, _) => {
|
|
4844
4847
|
var fe;
|
|
4845
4848
|
const D = I && _ === k, H = W && _ === k, ce = !!u && u === F.id, Z = ne && !F.text.toLowerCase().includes(ne) && !(A && ((fe = F.translations[A]) != null && fe.toLowerCase().includes(ne))) ? 0.22 : !W || _ <= k || ce ? 1 : 0.38, Ne = N ? () => n.playRow(_) : c && l ? () => {
|
|
4846
4849
|
I && !D && n.seekRow(_), l(F);
|
|
4847
|
-
} : I && D ? void 0 : () => n.playRow(_), q = N ? null :
|
|
4850
|
+
} : I && D ? void 0 : () => n.playRow(_), q = N ? null : Oc(F, s, r), Le = !!q && (q.script > 0 || q.manual), Ie = y && !!a && L === F.id && !!q && !Le, Fe = Hr(t, F.speaker), Ae = Wr(t, F.speaker), ue = Ae.lane, _e = A && F.translations[A] && F.language !== A ? F.translations[A] : null, Ve = La(e, _, A), Q = H && !C && te ? ta(Ve.map((de) => ({ t: de.text, sp: " " })), te) : null;
|
|
4848
4851
|
return /* @__PURE__ */ m("div", { "data-tx-row": _, "data-sentence": F.sentenceId, className: `txline${P ? " txline--warm" : ""}${ce ? " txline--fixing" : ""}`, "aria-current": ce || void 0, style: { opacity: Z }, onClick: Ne, onMouseEnter: y && a ? () => ie(F.id) : void 0, onMouseLeave: y && a ? () => ie(null) : void 0, children: [
|
|
4849
4852
|
/* @__PURE__ */ m("div", { className: "txline__meta", children: [
|
|
4850
4853
|
/* @__PURE__ */ i("span", { className: "txline__at", children: Ot(F.start) }),
|
|
@@ -4853,12 +4856,12 @@ function bu({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4853
4856
|
/* @__PURE__ */ i("span", { className: `txline__who lane-${ue}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Fe }),
|
|
4854
4857
|
Ae.hasVoice && /* @__PURE__ */ i(Ta, { color: Ae.fg ?? `var(--lane-${ue})` })
|
|
4855
4858
|
] }),
|
|
4856
|
-
D && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d:
|
|
4857
|
-
q && h && /* @__PURE__ */ i(
|
|
4858
|
-
Ie && /* @__PURE__ */ i(
|
|
4859
|
+
D && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: J.headphones, size: y ? 15 : 14, sw: 1.6, stroke: p && F.speaker >= 0 ? Ae.fg ?? `var(--lane-${ue})` : "var(--ink-45)" }) }),
|
|
4860
|
+
q && h && /* @__PURE__ */ i(xc, { f: q, desk: y, onOpen: a ? () => a(F, !0) : void 0 }),
|
|
4861
|
+
Ie && /* @__PURE__ */ i(Cc, { alone: !0, onOpen: () => a == null ? void 0 : a(F, !1) })
|
|
4859
4862
|
] }),
|
|
4860
4863
|
/* @__PURE__ */ i("div", { className: "txline__text", children: Ve.map((de, ae) => {
|
|
4861
|
-
const ge = `${de.seq}:${de.idx}`, Ye =
|
|
4864
|
+
const ge = `${de.seq}:${de.idx}`, Ye = ql(de.prob), U = H && V, $ = U && (C ? E >= de.start && (E < de.end || ae === Ve.length - 1 || E < Ve[ae + 1].start) : ae === Q), K = U && !$ && (C ? de.start > E : Q != null && ae > Q), se = !_e && !N && (!!(r != null && r.has(ge)) || !!de.script), he = !_e && !N && d && !!Ye && !se, be = he ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, ye = se ? "var(--brand)" : K ? "var(--ink-40)" : be ?? "var(--ink-96)";
|
|
4862
4865
|
return /* @__PURE__ */ m("span", { children: [
|
|
4863
4866
|
/* @__PURE__ */ i(
|
|
4864
4867
|
"span",
|
|
@@ -4894,9 +4897,9 @@ function bu({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
|
|
|
4894
4897
|
I && G === 1 && B("down")
|
|
4895
4898
|
] });
|
|
4896
4899
|
}
|
|
4897
|
-
function
|
|
4900
|
+
function xu({ open: t, q: e, onQ: n, onClose: r, hits: s, desk: a, inline: o, flash: l }) {
|
|
4898
4901
|
return /* @__PURE__ */ i("div", { className: o ? "searchbar searchbar--inline" : `searchbar searchbar--float${a ? " searchbar--desk" : ""}${t ? "" : " is-hidden"}`, children: /* @__PURE__ */ m("div", { children: [
|
|
4899
|
-
/* @__PURE__ */ i(oe, { d:
|
|
4902
|
+
/* @__PURE__ */ i(oe, { d: J.search, size: 16, sw: 1.7, style: { color: "var(--ink-45)", flex: "none" } }),
|
|
4900
4903
|
/* @__PURE__ */ i("input", { value: e, onChange: (c) => n(c.target.value), onKeyDown: (c) => {
|
|
4901
4904
|
c.key === "Escape" && (c.stopPropagation(), e ? n("") : r());
|
|
4902
4905
|
}, placeholder: "Search this transcript" }),
|
|
@@ -4905,10 +4908,10 @@ function Ou({ open: t, q: e, onQ: n, onClose: r, hits: s, desk: a, inline: o, fl
|
|
|
4905
4908
|
s,
|
|
4906
4909
|
" found"
|
|
4907
4910
|
] }),
|
|
4908
|
-
e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(oe, { d:
|
|
4911
|
+
e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(oe, { d: J.close, size: 15, sw: 1.7 }) })
|
|
4909
4912
|
] }) });
|
|
4910
4913
|
}
|
|
4911
|
-
function
|
|
4914
|
+
function Cu(t, e, n, r, s) {
|
|
4912
4915
|
const a = w(n);
|
|
4913
4916
|
a.current = n;
|
|
4914
4917
|
const o = w(r);
|
|
@@ -4953,7 +4956,7 @@ function $r(t, e) {
|
|
|
4953
4956
|
n = n << 1 ^ (n >>> 7) * 285, n ^= (e >>> r & 1) * t;
|
|
4954
4957
|
return n;
|
|
4955
4958
|
}
|
|
4956
|
-
function
|
|
4959
|
+
function Su(t) {
|
|
4957
4960
|
const e = new Array(t).fill(0);
|
|
4958
4961
|
e[t - 1] = 1;
|
|
4959
4962
|
let n = 1;
|
|
@@ -4963,7 +4966,7 @@ function Cu(t) {
|
|
|
4963
4966
|
}
|
|
4964
4967
|
return e;
|
|
4965
4968
|
}
|
|
4966
|
-
function
|
|
4969
|
+
function Du(t, e) {
|
|
4967
4970
|
const n = new Array(e.length).fill(0);
|
|
4968
4971
|
for (const r of t) {
|
|
4969
4972
|
const s = r ^ n.shift();
|
|
@@ -4973,13 +4976,13 @@ function Su(t, e) {
|
|
|
4973
4976
|
}
|
|
4974
4977
|
return n;
|
|
4975
4978
|
}
|
|
4976
|
-
function
|
|
4979
|
+
function Au(t) {
|
|
4977
4980
|
if (t === 1) return [];
|
|
4978
4981
|
const e = Math.floor(t / 7) + 2, n = t * 4 + 17, r = t === 32 ? 26 : Math.ceil((t * 4 + 4) / (e * 2 - 2)) * 2, s = [6];
|
|
4979
4982
|
for (let a = n - 7; s.length < e; a -= r) s.splice(1, 0, a);
|
|
4980
4983
|
return s;
|
|
4981
4984
|
}
|
|
4982
|
-
function
|
|
4985
|
+
function Eu(t) {
|
|
4983
4986
|
const e = Array.from(new TextEncoder().encode(t));
|
|
4984
4987
|
let n = 1;
|
|
4985
4988
|
for (; n <= 40 && !(4 + (n <= 9 ? 8 : 16) + e.length * 8 <= $i(n) * 8); n++)
|
|
@@ -4994,11 +4997,11 @@ function Au(t) {
|
|
|
4994
4997
|
for (let k = 236; a.length < s; k ^= 253) o(k, 8);
|
|
4995
4998
|
const l = [];
|
|
4996
4999
|
for (let k = 0; k < a.length; k += 8) l.push(a.slice(k, k + 8).reduce((Y, C) => Y << 1 | C, 0));
|
|
4997
|
-
const c = fn.blocks[n], u = fn.perBlock[n], d = Math.floor(ja(n) / 8), h = c - d % c, M = Math.floor(d / c), g = [], f =
|
|
5000
|
+
const c = fn.blocks[n], u = fn.perBlock[n], d = Math.floor(ja(n) / 8), h = c - d % c, M = Math.floor(d / c), g = [], f = Su(u);
|
|
4998
5001
|
for (let k = 0, Y = 0; k < c; k++) {
|
|
4999
5002
|
const C = l.slice(Y, Y + M - u + (k < h ? 0 : 1));
|
|
5000
5003
|
Y += C.length;
|
|
5001
|
-
const te =
|
|
5004
|
+
const te = Du(C, f);
|
|
5002
5005
|
k < h && C.push(0), g.push(C.concat(te));
|
|
5003
5006
|
}
|
|
5004
5007
|
const y = [];
|
|
@@ -5012,12 +5015,12 @@ function Au(t) {
|
|
|
5012
5015
|
p(6, k, k % 2 === 0), p(k, 6, k % 2 === 0);
|
|
5013
5016
|
const b = (k, Y) => {
|
|
5014
5017
|
for (let C = -4; C <= 4; C++) for (let te = -4; te <= 4; te++) {
|
|
5015
|
-
const
|
|
5016
|
-
L >= 0 && L < r && ie >= 0 && ie < r && p(L, ie,
|
|
5018
|
+
const X = Math.max(Math.abs(te), Math.abs(C)), L = k + te, ie = Y + C;
|
|
5019
|
+
L >= 0 && L < r && ie >= 0 && ie < r && p(L, ie, X !== 2 && X !== 4);
|
|
5017
5020
|
}
|
|
5018
5021
|
};
|
|
5019
5022
|
b(3, 3), b(r - 4, 3), b(3, r - 4);
|
|
5020
|
-
const S =
|
|
5023
|
+
const S = Au(n);
|
|
5021
5024
|
for (let k = 0; k < S.length; k++) for (let Y = 0; Y < S.length; Y++)
|
|
5022
5025
|
if (!(k === 0 && Y === 0 || k === 0 && Y === S.length - 1 || k === S.length - 1 && Y === 0))
|
|
5023
5026
|
for (let C = -2; C <= 2; C++) for (let te = -2; te <= 2; te++) p(S[k] + te, S[Y] + C, Math.max(Math.abs(te), Math.abs(C)) !== 1);
|
|
@@ -5025,12 +5028,12 @@ function Au(t) {
|
|
|
5025
5028
|
const Y = fn.formatBits << 3 | k;
|
|
5026
5029
|
let C = Y;
|
|
5027
5030
|
for (let L = 0; L < 10; L++) C = C << 1 ^ (C >>> 9) * 1335;
|
|
5028
|
-
const te = (Y << 10 | C) ^ 21522,
|
|
5029
|
-
for (let L = 0; L <= 5; L++) p(8, L,
|
|
5030
|
-
p(8, 7,
|
|
5031
|
-
for (let L = 9; L < 15; L++) p(14 - L, 8,
|
|
5032
|
-
for (let L = 0; L < 8; L++) p(r - 1 - L, 8,
|
|
5033
|
-
for (let L = 8; L < 15; L++) p(8, r - 15 + L,
|
|
5031
|
+
const te = (Y << 10 | C) ^ 21522, X = (L) => (te >>> L & 1) !== 0;
|
|
5032
|
+
for (let L = 0; L <= 5; L++) p(8, L, X(L));
|
|
5033
|
+
p(8, 7, X(6)), p(8, 8, X(7)), p(7, 8, X(8));
|
|
5034
|
+
for (let L = 9; L < 15; L++) p(14 - L, 8, X(L));
|
|
5035
|
+
for (let L = 0; L < 8; L++) p(r - 1 - L, 8, X(L));
|
|
5036
|
+
for (let L = 8; L < 15; L++) p(8, r - 15 + L, X(L));
|
|
5034
5037
|
p(8, r - 8, !0);
|
|
5035
5038
|
};
|
|
5036
5039
|
if (A(0), n >= 7) {
|
|
@@ -5038,16 +5041,16 @@ function Au(t) {
|
|
|
5038
5041
|
for (let C = 0; C < 12; C++) k = k << 1 ^ (k >>> 11) * 7973;
|
|
5039
5042
|
const Y = n << 12 | k;
|
|
5040
5043
|
for (let C = 0; C < 18; C++) {
|
|
5041
|
-
const te = (Y >>> C & 1) !== 0,
|
|
5042
|
-
p(
|
|
5044
|
+
const te = (Y >>> C & 1) !== 0, X = r - 11 + C % 3, L = Math.floor(C / 3);
|
|
5045
|
+
p(X, L, te), p(L, X, te);
|
|
5043
5046
|
}
|
|
5044
5047
|
}
|
|
5045
5048
|
let P = 0;
|
|
5046
5049
|
for (let k = r - 1; k >= 1; k -= 2) {
|
|
5047
5050
|
k === 6 && (k = 5);
|
|
5048
5051
|
for (let Y = 0; Y < r; Y++) for (let C = 0; C < 2; C++) {
|
|
5049
|
-
const te = k - C,
|
|
5050
|
-
!N[
|
|
5052
|
+
const te = k - C, X = k + 1 & 2 ? Y : r - 1 - Y;
|
|
5053
|
+
!N[X][te] && P < y.length * 8 && (T[X][te] = (y[P >>> 3] >>> 7 - (P & 7) & 1) !== 0, P++);
|
|
5051
5054
|
}
|
|
5052
5055
|
}
|
|
5053
5056
|
const O = (k, Y, C) => {
|
|
@@ -5074,22 +5077,22 @@ function Au(t) {
|
|
|
5074
5077
|
}, I = () => {
|
|
5075
5078
|
let k = 0;
|
|
5076
5079
|
const Y = (ne) => {
|
|
5077
|
-
const G = ne[1],
|
|
5078
|
-
return (
|
|
5080
|
+
const G = ne[1], ee = G > 0 && ne[2] === G && ne[3] === G * 3 && ne[4] === G && ne[5] === G;
|
|
5081
|
+
return (ee && ne[0] >= G * 4 && ne[6] >= G ? 1 : 0) + (ee && ne[6] >= G * 4 && ne[0] >= G ? 1 : 0);
|
|
5079
5082
|
}, C = (ne, G) => {
|
|
5080
5083
|
ne[0] === 0 && (G += r), ne.pop(), ne.unshift(G);
|
|
5081
|
-
}, te = (ne, G,
|
|
5082
|
-
let G = !1,
|
|
5084
|
+
}, te = (ne, G, ee) => (G && (C(ne, ee), ee = 0), C(ne, ee + r), Y(ne)), X = (ne) => {
|
|
5085
|
+
let G = !1, ee = 0;
|
|
5083
5086
|
const me = [0, 0, 0, 0, 0, 0, 0];
|
|
5084
5087
|
for (let le = 0; le < r; le++)
|
|
5085
|
-
ne(le) === G ? (
|
|
5086
|
-
k += te(me, G,
|
|
5088
|
+
ne(le) === G ? (ee++, ee === 5 ? k += 3 : ee > 5 && k++) : (C(me, ee), G || (k += Y(me) * 40), G = ne(le), ee = 1);
|
|
5089
|
+
k += te(me, G, ee) * 40;
|
|
5087
5090
|
};
|
|
5088
|
-
for (let ne = 0; ne < r; ne++)
|
|
5089
|
-
for (let ne = 0; ne < r; ne++)
|
|
5091
|
+
for (let ne = 0; ne < r; ne++) X((G) => T[ne][G]);
|
|
5092
|
+
for (let ne = 0; ne < r; ne++) X((G) => T[G][ne]);
|
|
5090
5093
|
for (let ne = 0; ne < r - 1; ne++) for (let G = 0; G < r - 1; G++) {
|
|
5091
|
-
const
|
|
5092
|
-
|
|
5094
|
+
const ee = T[ne][G];
|
|
5095
|
+
ee === T[ne][G + 1] && ee === T[ne + 1][G] && ee === T[ne + 1][G + 1] && (k += 3);
|
|
5093
5096
|
}
|
|
5094
5097
|
let L = 0;
|
|
5095
5098
|
for (const ne of T) for (const G of ne) G && L++;
|
|
@@ -5104,14 +5107,14 @@ function Au(t) {
|
|
|
5104
5107
|
}
|
|
5105
5108
|
return V(W), A(W), T;
|
|
5106
5109
|
}
|
|
5107
|
-
function
|
|
5108
|
-
const e =
|
|
5110
|
+
function _u(t) {
|
|
5111
|
+
const e = Eu(t), n = e.length, r = 2;
|
|
5109
5112
|
let s = "";
|
|
5110
5113
|
for (let o = 0; o < n; o++) for (let l = 0; l < n; l++) e[o][l] && (s += `M${l} ${o}h1v1h-1z`);
|
|
5111
5114
|
const a = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${-r} ${-r} ${n + r * 2} ${n + r * 2}" shape-rendering="crispEdges"><rect x="${-r}" y="${-r}" width="${n + r * 2}" height="${n + r * 2}" fill="#fff"/><path fill="#111" d="${s}"/></svg>`;
|
|
5112
5115
|
return `data:image/svg+xml,${encodeURIComponent(a)}`;
|
|
5113
5116
|
}
|
|
5114
|
-
const za = "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15",
|
|
5117
|
+
const za = "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15", Yu = "M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25";
|
|
5115
5118
|
function zr() {
|
|
5116
5119
|
const t = document;
|
|
5117
5120
|
return t.fullscreenElement ?? t.webkitFullscreenElement ?? null;
|
|
@@ -5124,7 +5127,7 @@ function Pi() {
|
|
|
5124
5127
|
const t = document;
|
|
5125
5128
|
return !!(t.fullscreenEnabled || t.webkitFullscreenEnabled);
|
|
5126
5129
|
}
|
|
5127
|
-
function
|
|
5130
|
+
function Uu() {
|
|
5128
5131
|
var e;
|
|
5129
5132
|
if (typeof document > "u" || !((e = window.matchMedia) != null && e.call(window, "(pointer: coarse)").matches)) return !1;
|
|
5130
5133
|
const t = qr ?? document.documentElement;
|
|
@@ -5145,7 +5148,7 @@ function Pn(t) {
|
|
|
5145
5148
|
} catch {
|
|
5146
5149
|
}
|
|
5147
5150
|
}
|
|
5148
|
-
function
|
|
5151
|
+
function $u(t) {
|
|
5149
5152
|
const [e, n] = z(() => {
|
|
5150
5153
|
var r;
|
|
5151
5154
|
return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, t).matches);
|
|
@@ -5197,7 +5200,7 @@ function Qn({ pos: t, interactive: e, axis: n = "x" }) {
|
|
|
5197
5200
|
/* @__PURE__ */ i("span", { className: "gfull__t gfull__end", style: { color: t.live ? "#ec634d" : "rgba(234,236,250,.6)" }, children: t.endLabel })
|
|
5198
5201
|
] });
|
|
5199
5202
|
}
|
|
5200
|
-
function
|
|
5203
|
+
function bd({ pos: t }) {
|
|
5201
5204
|
const [e, n] = z(null), r = (l) => {
|
|
5202
5205
|
const c = l.currentTarget.getBoundingClientRect();
|
|
5203
5206
|
return Math.min(1, Math.max(0, (l.clientX - c.left) / Math.max(1, c.width)));
|
|
@@ -5240,7 +5243,7 @@ function Id({ pos: t }) {
|
|
|
5240
5243
|
}
|
|
5241
5244
|
function Vn({ t, mini: e }) {
|
|
5242
5245
|
return /* @__PURE__ */ m("div", { className: "gfull__transport", children: [
|
|
5243
|
-
/* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d:
|
|
5246
|
+
/* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
|
|
5244
5247
|
/* @__PURE__ */ i(
|
|
5245
5248
|
"button",
|
|
5246
5249
|
{
|
|
@@ -5254,12 +5257,12 @@ function Vn({ t, mini: e }) {
|
|
|
5254
5257
|
children: t.busy ? /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }) : t.playing ? /* @__PURE__ */ i(Lo, { size: e ? 14 : 18 }) : /* @__PURE__ */ i(xt, { size: e ? 15 : 19 })
|
|
5255
5258
|
}
|
|
5256
5259
|
),
|
|
5257
|
-
/* @__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:
|
|
5260
|
+
/* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Next line", title: "Next line", style: { opacity: t.nextOn ? 1 : 0.3 }, onClick: t.onNext, children: /* @__PURE__ */ i(oe, { d: J.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
|
|
5258
5261
|
] });
|
|
5259
5262
|
}
|
|
5260
5263
|
function Rr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
|
|
5261
5264
|
return /* @__PURE__ */ m("div", { className: `gfull__brand${s ? " gfull__brand--mark" : ""}`, children: [
|
|
5262
|
-
/* @__PURE__ */ i("a", { href: Zi, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(
|
|
5265
|
+
/* @__PURE__ */ i("a", { href: Zi, target: "_blank", rel: "noopener", style: { display: "block", lineHeight: 0 }, "aria-label": "VocalStack", title: "VocalStack", children: s ? /* @__PURE__ */ i(Fn, { dark: !0, size: 22 }) : /* @__PURE__ */ i(Pr, { dark: !0, link: !1, height: e ? 11 : n ? 18 : 15 }) }),
|
|
5263
5266
|
t && /* @__PURE__ */ m("span", { className: "gfull__live", children: [
|
|
5264
5267
|
/* @__PURE__ */ i("i", {}),
|
|
5265
5268
|
"LIVE"
|
|
@@ -5269,11 +5272,11 @@ function Rr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
|
|
|
5269
5272
|
}
|
|
5270
5273
|
function Ia({ v: t, size: e }) {
|
|
5271
5274
|
return /* @__PURE__ */ m("button", { type: "button", className: "gfull__btn", "aria-label": "Voices", "aria-busy": t.busy || void 0, title: t.busy ? "Preparing the voice…" : t.title, disabled: !t.on, style: { position: "relative", opacity: t.on || t.busy ? 1 : 0.45, cursor: t.on ? "pointer" : "default" }, onClick: t.on ? t.onClick : void 0, children: [
|
|
5272
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5275
|
+
/* @__PURE__ */ i(oe, { d: J.headphones, size: e, sw: 1.6 }),
|
|
5273
5276
|
t.busy && /* @__PURE__ */ i("span", { "aria-hidden": "true", style: { position: "absolute", inset: 0, boxSizing: "border-box", borderRadius: "50%", border: "2px solid var(--fill-12)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite", pointerEvents: "none" } })
|
|
5274
5277
|
] });
|
|
5275
5278
|
}
|
|
5276
|
-
function
|
|
5279
|
+
function Ru({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, copied: o }) {
|
|
5277
5280
|
return /* @__PURE__ */ m("div", { className: "gmini", "data-theme": "dark", children: [
|
|
5278
5281
|
/* @__PURE__ */ i("div", { className: "gmini__shade", "aria-hidden": "true" }),
|
|
5279
5282
|
/* @__PURE__ */ i("div", { className: "gmini__top", children: /* @__PURE__ */ i(Rr, { live: t.live, mini: !0 }) }),
|
|
@@ -5286,14 +5289,14 @@ function $u({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
|
|
|
5286
5289
|
/* @__PURE__ */ i(Ia, { v: r, size: 14 }),
|
|
5287
5290
|
s && /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Share", title: "Share", onClick: (l) => {
|
|
5288
5291
|
l.stopPropagation(), s();
|
|
5289
|
-
}, children: /* @__PURE__ */ i(oe, { d:
|
|
5292
|
+
}, children: /* @__PURE__ */ i(oe, { d: J.share, size: 13, sw: 1.8 }) }),
|
|
5290
5293
|
/* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Full screen", title: "Full screen", onClick: a, children: /* @__PURE__ */ i(oe, { d: za, size: 14, sw: 1.8 }) })
|
|
5291
5294
|
] })
|
|
5292
5295
|
] }),
|
|
5293
5296
|
o
|
|
5294
5297
|
] });
|
|
5295
5298
|
}
|
|
5296
|
-
const
|
|
5299
|
+
const Pu = { color: "rgba(255,255,255,.4)" };
|
|
5297
5300
|
function ba({ 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: h, ad: M, chip: g, transport: f, picker: y, sheet: T, voices: N, voicesBtn: p, sheetOpen: b, onShare: S, onSettings: A, paused: P, copied: O, onTouch: V, onClose: I }) {
|
|
5298
5301
|
const [W, E] = z(() => !!zr());
|
|
5299
5302
|
x(() => {
|
|
@@ -5306,7 +5309,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5306
5309
|
k.current = I;
|
|
5307
5310
|
const Y = w(f.playable ? f.onPlay : void 0);
|
|
5308
5311
|
Y.current = f.playable ? f.onPlay : void 0;
|
|
5309
|
-
const [C, te] = z(!1), [
|
|
5312
|
+
const [C, te] = z(!1), [X, L] = z(0), ie = w(!1);
|
|
5310
5313
|
x(() => () => Pn(!1), []), x(() => {
|
|
5311
5314
|
if (!n) return;
|
|
5312
5315
|
const Q = [document.documentElement, document.body], fe = Q.map((ge) => ge.style.background);
|
|
@@ -5320,7 +5323,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5320
5323
|
}), de && ae && (de.content = ae);
|
|
5321
5324
|
};
|
|
5322
5325
|
}, []);
|
|
5323
|
-
const ne = ze(() => n &&
|
|
5326
|
+
const ne = ze(() => n && Uu(), [n]), [G, ee] = z(ne);
|
|
5324
5327
|
x(() => {
|
|
5325
5328
|
if (!n) return;
|
|
5326
5329
|
const Q = [document.documentElement, document.body], fe = Q.map((ge) => [ge.style.overflow, ge.style.overscrollBehavior]);
|
|
@@ -5333,7 +5336,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5333
5336
|
const de = document.createElement("div");
|
|
5334
5337
|
de.setAttribute("aria-hidden", "true"), de.style.cssText = "position:absolute;top:0;left:0;width:1px;height:calc(100lvh + 160px);pointer-events:none", document.body.appendChild(de), document.documentElement.style.overscrollBehavior = "none";
|
|
5335
5338
|
const ae = () => {
|
|
5336
|
-
window.scrollY > 24 &&
|
|
5339
|
+
window.scrollY > 24 && ee(!1);
|
|
5337
5340
|
};
|
|
5338
5341
|
return window.addEventListener("scroll", ae, { passive: !0 }), () => {
|
|
5339
5342
|
window.removeEventListener("scroll", ae), de.remove(), document.documentElement.style.overscrollBehavior = fe[0][1], window.scrollTo(0, 0);
|
|
@@ -5351,7 +5354,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5351
5354
|
window.removeEventListener("keydown", fe, !0), window.removeEventListener("keyup", de, !0);
|
|
5352
5355
|
};
|
|
5353
5356
|
}, []);
|
|
5354
|
-
const le =
|
|
5357
|
+
const le = $u("(orientation: landscape) and (max-height: 540px)"), Te = w(null), [je, Se] = z(null);
|
|
5355
5358
|
tn(() => {
|
|
5356
5359
|
const Q = Te.current;
|
|
5357
5360
|
if (!Q || (Se(Q.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
|
|
@@ -5363,7 +5366,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5363
5366
|
if (te(!1), !f.playing || b) return;
|
|
5364
5367
|
const Q = setTimeout(() => te(!0), 3e3);
|
|
5365
5368
|
return () => clearTimeout(Q);
|
|
5366
|
-
}, [f.playing, b,
|
|
5369
|
+
}, [f.playing, b, X]);
|
|
5367
5370
|
const $e = w(C);
|
|
5368
5371
|
$e.current = C;
|
|
5369
5372
|
const De = w(0), B = (Q) => {
|
|
@@ -5384,7 +5387,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5384
5387
|
}, [D, F]);
|
|
5385
5388
|
const [H, ce] = z(!0), [Z, Ne] = z(!1), q = w(void 0);
|
|
5386
5389
|
x(() => () => window.clearTimeout(q.current), []);
|
|
5387
|
-
const Le = P != null && P.share ? P.share.url(H && P.share.at >= 1 ? Math.floor(P.share.at) : null) : "", Ie = ze(() => ve && Le && !f.playing ?
|
|
5390
|
+
const Le = P != null && P.share ? P.share.url(H && P.share.at >= 1 ? Math.floor(P.share.at) : null) : "", Ie = ze(() => ve && Le && !f.playing ? _u(Le) : "", [ve, Le, f.playing]), Fe = () => {
|
|
5388
5391
|
var Q;
|
|
5389
5392
|
(Q = navigator.clipboard) == null || Q.writeText(Le).then(() => {
|
|
5390
5393
|
Ne(!0), window.clearTimeout(q.current), q.current = window.setTimeout(() => Ne(!1), 1800);
|
|
@@ -5402,24 +5405,24 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5402
5405
|
/* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: Le.replace(/^https?:\/\//, "") }) }),
|
|
5403
5406
|
/* @__PURE__ */ m("div", { className: "gfull__shareacts", children: [
|
|
5404
5407
|
/* @__PURE__ */ m("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: Fe, children: [
|
|
5405
|
-
/* @__PURE__ */ i(oe, { d: Z ?
|
|
5408
|
+
/* @__PURE__ */ i(oe, { d: Z ? J.check : J.copy, size: 14, sw: 1.8 }),
|
|
5406
5409
|
Z ? "Copied" : "Copy link"
|
|
5407
5410
|
] }),
|
|
5408
5411
|
/* @__PURE__ */ m("button", { type: "button", className: "gfull__sharebtn", onClick: () => Gr(Le, s), children: [
|
|
5409
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5412
|
+
/* @__PURE__ */ i(oe, { d: J.share, size: 14, sw: 1.6 }),
|
|
5410
5413
|
"Share"
|
|
5411
5414
|
] })
|
|
5412
5415
|
] })
|
|
5413
5416
|
] })
|
|
5414
5417
|
] }), ue = (Q, fe, de, ae, ge, Ye = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: Q, "aria-label": Q, onClick: ae, children: /* @__PURE__ */ i(oe, { d: fe, size: (ve ? 20 : Ee ? 15 : 18) + Ye, sw: de, style: ge }) }), _e = /* @__PURE__ */ m("div", { className: "gfull__acts", children: [
|
|
5415
5418
|
p && /* @__PURE__ */ i(Ia, { v: p, size: ve ? 20 : Ee ? 15 : 18 }),
|
|
5416
|
-
S && ue("Share",
|
|
5417
|
-
Pi() && !e && ue(W ? "Exit full screen" : "Full screen", W ?
|
|
5418
|
-
I && ue("Close player",
|
|
5419
|
+
S && ue("Share", J.share, 1.6, S),
|
|
5420
|
+
Pi() && !e && ue(W ? "Exit full screen" : "Full screen", W ? Yu : za, 1.7, () => Pn(!W)),
|
|
5421
|
+
I && ue("Close player", J.close, 1.7, I)
|
|
5419
5422
|
] }), Ve = (d || h || A) && /* @__PURE__ */ m("div", { className: "gfull__top", children: [
|
|
5420
|
-
d && ue(d.muted ? "Unmute" : "Mute", d.muted ?
|
|
5421
|
-
h && ue(h.on ? "Hide subtitles" : "Show subtitles", h.on ?
|
|
5422
|
-
A && ue("Settings",
|
|
5423
|
+
d && ue(d.muted ? "Unmute" : "Mute", d.muted ? J.volumeOff : J.volume, 1.6, d.onToggle),
|
|
5424
|
+
h && ue(h.on ? "Hide subtitles" : "Show subtitles", h.on ? J.cc : J.ccOff, 1.7, h.onToggle, void 0, 4),
|
|
5425
|
+
A && ue("Settings", J.cog, 1.6, A)
|
|
5423
5426
|
] });
|
|
5424
5427
|
return /* @__PURE__ */ m(
|
|
5425
5428
|
"div",
|
|
@@ -5448,7 +5451,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5448
5451
|
P && !M && /* @__PURE__ */ m("div", { className: `gfull__pausedinfo${f.playing ? "" : " gfull__pausedinfo--on"}`, "aria-hidden": f.playing, children: [
|
|
5449
5452
|
/* @__PURE__ */ m("div", { className: "gfull__pausedtext", children: [
|
|
5450
5453
|
/* @__PURE__ */ m("div", { className: "gfull__pausedhead", children: [
|
|
5451
|
-
(Ee || we) && /* @__PURE__ */ i("span", { className: "gfull__pausedmark", "aria-hidden": "true", children: /* @__PURE__ */ i(
|
|
5454
|
+
(Ee || we) && /* @__PURE__ */ i("span", { className: "gfull__pausedmark", "aria-hidden": "true", children: /* @__PURE__ */ i(Fn, { dark: !0, size: 20 }) }),
|
|
5452
5455
|
/* @__PURE__ */ i("div", { className: "gfull__pausedtitle", children: P.title })
|
|
5453
5456
|
] }),
|
|
5454
5457
|
P.summary && /* @__PURE__ */ i("div", { className: "gfull__pausedsum", children: P.summary })
|
|
@@ -5479,7 +5482,7 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5479
5482
|
] }),
|
|
5480
5483
|
" "
|
|
5481
5484
|
] }),
|
|
5482
|
-
l.words.map((Q, fe) => /* @__PURE__ */ m("span", { "data-said": Q.dim ? void 0 : "", "data-at": l.cursor != null && fe <= l.cursor ? "" : void 0, style: Q.dim ?
|
|
5485
|
+
l.words.map((Q, fe) => /* @__PURE__ */ m("span", { "data-said": Q.dim ? void 0 : "", "data-at": l.cursor != null && fe <= l.cursor ? "" : void 0, style: Q.dim ? Pu : void 0, children: [
|
|
5483
5486
|
Q.t,
|
|
5484
5487
|
Q.sp
|
|
5485
5488
|
] }, fe))
|
|
@@ -5516,11 +5519,11 @@ function ba({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
|
|
|
5516
5519
|
}
|
|
5517
5520
|
);
|
|
5518
5521
|
}
|
|
5519
|
-
function
|
|
5522
|
+
function Qu({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o, onOptions: l, optionsActive: c }) {
|
|
5520
5523
|
return /* @__PURE__ */ m("div", { className: "ghead", children: [
|
|
5521
|
-
e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d:
|
|
5522
|
-
r && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(
|
|
5523
|
-
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(
|
|
5524
|
+
e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 19, sw: 1.7 }) }),
|
|
5525
|
+
r && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(Fn, { dark: t, size: 30 }) }),
|
|
5526
|
+
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(Pr, { dark: t, height: 22 }) }) : /* @__PURE__ */ m("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
|
|
5524
5527
|
/* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
5525
5528
|
/* @__PURE__ */ i("span", { className: "ghead__name", children: s }),
|
|
5526
5529
|
a
|
|
@@ -5534,13 +5537,13 @@ function Pu({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o
|
|
|
5534
5537
|
] }) })
|
|
5535
5538
|
] });
|
|
5536
5539
|
}
|
|
5537
|
-
const
|
|
5538
|
-
function
|
|
5540
|
+
const Vu = "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", Bu = (t, e = !1) => [{ value: "read", label: t.read, icon: /* @__PURE__ */ i(oe, { d: J.book, size: 17 }) }, { value: "listen", label: /* @__PURE__ */ i("span", { style: { display: "inline-block", minWidth: 52, textAlign: "center" }, children: e ? t.watch : t.listen }), icon: /* @__PURE__ */ i(oe, { d: e ? Vu : J.headphones, size: 19, sw: 1.5 }) }], Kr = "https://app.vocalstack.com", Hu = "/connect/transcribe";
|
|
5541
|
+
function Wu() {
|
|
5539
5542
|
const t = new Uint8Array(24);
|
|
5540
5543
|
return crypto.getRandomValues(t), btoa(String.fromCharCode(...t)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
5541
5544
|
}
|
|
5542
5545
|
function Oa(t, e, n) {
|
|
5543
|
-
const r = new URL(t ?? Kr), s =
|
|
5546
|
+
const r = new URL(t ?? Kr), s = Wu(), a = new URL(Hu, r);
|
|
5544
5547
|
e.url && a.searchParams.set("url", e.url), e.transcription && a.searchParams.set("transcription", e.transcription), e.ask && a.searchParams.set("ask", "1"), e.connect && a.searchParams.set("connect", "1"), a.searchParams.set("origin", window.location.origin), a.searchParams.set("nonce", s);
|
|
5545
5548
|
const o = 480, l = 640, c = Math.max(0, (window.screenX ?? 0) + ((window.outerWidth ?? o) - o) / 2), u = Math.max(0, (window.screenY ?? 0) + ((window.outerHeight ?? l) - l) / 2), d = window.open(a.toString(), "vocalstack-connect", `popup=yes,width=${o},height=${l},left=${Math.round(c)},top=${Math.round(u)}`);
|
|
5546
5549
|
return d ? new Promise((h, M) => {
|
|
@@ -5580,33 +5583,33 @@ function Oa(t, e, n) {
|
|
|
5580
5583
|
}, 500);
|
|
5581
5584
|
}) : Promise.reject(new Error("Your browser blocked the VocalStack window. Allow pop-ups for this site and try again."));
|
|
5582
5585
|
}
|
|
5583
|
-
async function
|
|
5586
|
+
async function Fu(t, e, n) {
|
|
5584
5587
|
const r = await Oa(t, { url: e }, n);
|
|
5585
5588
|
return r === "connected" ? null : r;
|
|
5586
5589
|
}
|
|
5587
5590
|
const xa = "vsp.connected";
|
|
5588
|
-
function
|
|
5591
|
+
function Zu(t) {
|
|
5589
5592
|
try {
|
|
5590
5593
|
return localStorage.getItem(xa) === new URL(t ?? Kr).origin;
|
|
5591
5594
|
} catch {
|
|
5592
5595
|
return !1;
|
|
5593
5596
|
}
|
|
5594
5597
|
}
|
|
5595
|
-
function
|
|
5598
|
+
function Gu(t) {
|
|
5596
5599
|
try {
|
|
5597
5600
|
localStorage.setItem(xa, new URL(t ?? Kr).origin);
|
|
5598
5601
|
} catch {
|
|
5599
5602
|
}
|
|
5600
5603
|
}
|
|
5601
|
-
const
|
|
5604
|
+
const qu = {
|
|
5602
5605
|
"signing-in": "Sign in to VocalStack in the window that opened…",
|
|
5603
5606
|
consent: "Confirm in the VocalStack window…",
|
|
5604
5607
|
looking: "Looking for your transcription of this video…",
|
|
5605
5608
|
confirm: "Confirm in the VocalStack window…",
|
|
5606
5609
|
checking: "Checking the link…",
|
|
5607
5610
|
starting: "Starting the transcription…"
|
|
5608
|
-
},
|
|
5609
|
-
function
|
|
5611
|
+
}, Ku = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
|
|
5612
|
+
function Ju({ options: t, onStarted: e, onReplay: n, onClose: r }) {
|
|
5610
5613
|
const [s, a] = z(""), [o, l] = z(!1), [c, u] = z(null), [d, h] = z(null);
|
|
5611
5614
|
x(() => {
|
|
5612
5615
|
const y = (T) => {
|
|
@@ -5614,11 +5617,11 @@ function Ku({ options: t, onStarted: e, onReplay: n, onClose: r }) {
|
|
|
5614
5617
|
};
|
|
5615
5618
|
return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
|
|
5616
5619
|
}, [r]);
|
|
5617
|
-
const M = s.trim(), g =
|
|
5620
|
+
const M = s.trim(), g = Ku.test(M), f = async () => {
|
|
5618
5621
|
if (!(!g || o)) {
|
|
5619
5622
|
l(!0), u(null);
|
|
5620
5623
|
try {
|
|
5621
|
-
const y = await
|
|
5624
|
+
const y = await Fu(t.appUrl, /^https?:\/\//i.test(M) ? M : `https://${M}`, h);
|
|
5622
5625
|
y && e(y);
|
|
5623
5626
|
} catch (y) {
|
|
5624
5627
|
u(y instanceof Error ? y.message : "Something went wrong. Please try again.");
|
|
@@ -5627,31 +5630,30 @@ function Ku({ options: t, onStarted: e, onReplay: n, onClose: r }) {
|
|
|
5627
5630
|
}
|
|
5628
5631
|
}
|
|
5629
5632
|
};
|
|
5630
|
-
return /* @__PURE__ */
|
|
5633
|
+
return /* @__PURE__ */ m("div", { className: "vsp-end vsp-end--v2", role: "dialog", "aria-label": "Transcribe another video", onPointerDown: (y) => y.stopPropagation(), onClick: (y) => {
|
|
5631
5634
|
y.stopPropagation(), y.target === y.currentTarget && r();
|
|
5632
|
-
}, children:
|
|
5633
|
-
/* @__PURE__ */ i("button", { type: "button", className: "vsp-
|
|
5634
|
-
/* @__PURE__ */
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
a
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
/* @__PURE__ */
|
|
5649
|
-
|
|
5650
|
-
/* @__PURE__ */ i(oe, { d: ee.uturn, size: 14, sw: 1.8 }),
|
|
5635
|
+
}, children: [
|
|
5636
|
+
/* @__PURE__ */ i("button", { type: "button", className: "gfull__btn vsp-end2__close", "aria-label": "Close", title: "Close", onClick: r, children: /* @__PURE__ */ i(oe, { d: J.close, size: 17, sw: 1.8 }) }),
|
|
5637
|
+
/* @__PURE__ */ m("div", { className: "vsp-end2", children: [
|
|
5638
|
+
/* @__PURE__ */ i("span", { className: "vsp-end2__mark", children: /* @__PURE__ */ i(Fn, { dark: !0, size: 26 }) }),
|
|
5639
|
+
/* @__PURE__ */ i("div", { className: "vsp-end2__title", children: t.title ?? "Watch another video in your language" }),
|
|
5640
|
+
/* @__PURE__ */ m("form", { className: "vsp-end2__field", onSubmit: (y) => {
|
|
5641
|
+
y.preventDefault(), f();
|
|
5642
|
+
}, children: [
|
|
5643
|
+
/* @__PURE__ */ i(oe, { d: J.link, size: 16, sw: 1.8, style: { flex: "none", color: "rgba(238,240,248,.55)" } }),
|
|
5644
|
+
/* @__PURE__ */ i("input", { className: "vsp-end2__input", type: "url", inputMode: "url", autoComplete: "off", spellCheck: !1, placeholder: "Paste a video link", value: s, onChange: (y) => {
|
|
5645
|
+
a(y.target.value), u(null);
|
|
5646
|
+
}, "aria-label": "Video link" }),
|
|
5647
|
+
/* @__PURE__ */ i("button", { type: "submit", className: "vsp-end2__go", disabled: !g || o, "aria-label": "Transcribe", title: "Transcribe", children: o ? /* @__PURE__ */ i(Mt, { size: 15, color: "#06101c", track: "rgba(6,16,28,.25)" }) : /* @__PURE__ */ i(oe, { d: J.arrowRight, size: 17, sw: 2 }) })
|
|
5648
|
+
] }),
|
|
5649
|
+
/* @__PURE__ */ i("div", { className: "vsp-end2__note", role: o ? "status" : void 0, children: o ? qu[d ?? "checking"] : t.note ?? "YouTube, Vimeo, TikTok and more, with subtitles and spoken translations." }),
|
|
5650
|
+
c && /* @__PURE__ */ i("div", { className: "vsp-end__err", role: "alert", children: c }),
|
|
5651
|
+
/* @__PURE__ */ m("button", { type: "button", className: "vsp-end2__replay", onClick: n, children: [
|
|
5652
|
+
/* @__PURE__ */ i(oe, { d: J.uturn, size: 14, sw: 1.8 }),
|
|
5651
5653
|
"Replay"
|
|
5652
5654
|
] })
|
|
5653
5655
|
] })
|
|
5654
|
-
] })
|
|
5656
|
+
] });
|
|
5655
5657
|
}
|
|
5656
5658
|
function Ca(t) {
|
|
5657
5659
|
const [e, n] = z(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
|
|
@@ -5661,18 +5663,18 @@ function Ca(t) {
|
|
|
5661
5663
|
return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
5662
5664
|
}, [t]), t ?? e;
|
|
5663
5665
|
}
|
|
5664
|
-
const
|
|
5665
|
-
function
|
|
5666
|
+
const Xu = { lang: null, subtitles: !0, speakerLabels: !1, wordHighlight: !0, translateAudio: !0, voices: "cloned", removeBackground: !1, muted: !1 };
|
|
5667
|
+
function ed(t, e) {
|
|
5666
5668
|
const n = Ma(), [r, s] = ra(), [a, o] = z(null), [l, c] = z("main"), u = Yr(n, t.lang), d = ze(() => sa(n, "translation"), [n]), h = (O) => {
|
|
5667
5669
|
e({ lang: O }), s(O);
|
|
5668
5670
|
}, M = Vr({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: h, languages: d, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: r, keepOpen: !0 }), g = () => {
|
|
5669
5671
|
o(null), c("main");
|
|
5670
|
-
}, f = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: u.flag }) : /* @__PURE__ */ i(oe, { d:
|
|
5672
|
+
}, f = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: u.flag }) : /* @__PURE__ */ i(oe, { d: J.langAuto, size: 19, sw: 1.7 }), y = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? u.label : "As spoken"}`, title: t.lang ? u.label : "As spoken", onClick: (O) => {
|
|
5671
5673
|
O.stopPropagation(), c("main"), o((V) => V === "lang" ? null : "lang");
|
|
5672
|
-
}, children: f }), T = /* @__PURE__ */ i(oe, { d:
|
|
5674
|
+
}, children: f }), T = /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), N = /* @__PURE__ */ m("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
|
|
5673
5675
|
" ",
|
|
5674
5676
|
/* @__PURE__ */ m("button", { type: "button", onClick: () => c("main"), "aria-label": "Back", className: "vsp-idlesheet__back", children: [
|
|
5675
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5677
|
+
/* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 18, sw: 1.8 }),
|
|
5676
5678
|
"Back"
|
|
5677
5679
|
] })
|
|
5678
5680
|
] }), p = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, b = (O, V, I) => /* @__PURE__ */ m("div", { className: "srow", children: [
|
|
@@ -5740,20 +5742,20 @@ function Qi(t) {
|
|
|
5740
5742
|
return null;
|
|
5741
5743
|
}
|
|
5742
5744
|
}
|
|
5743
|
-
const kt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }),
|
|
5745
|
+
const kt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "currentColor", fillRule: e }), Wt = (t) => /* @__PURE__ */ m(xe, { children: [
|
|
5744
5746
|
/* @__PURE__ */ i("path", { d: "M6.5 2.75h7.25l4.75 4.75v12.25a1.5 1.5 0 0 1-1.5 1.5H6.5a1.5 1.5 0 0 1-1.5-1.5V4.25a1.5 1.5 0 0 1 1.5-1.5Z", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
|
|
5745
5747
|
/* @__PURE__ */ i("path", { d: "M13.75 2.75V7.5h4.75", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round" }),
|
|
5746
5748
|
/* @__PURE__ */ i("text", { x: "11.75", y: "17.4", textAnchor: "middle", fontSize: t.length > 3 ? 4.4 : 5.2, fontWeight: "800", fill: "currentColor", fontFamily: "inherit", letterSpacing: ".2", children: t })
|
|
5747
5749
|
] }), Vi = [
|
|
5748
5750
|
{ name: "YouTube", tint: "#ff3b30", glyph: kt("M21.6 7.2a2.7 2.7 0 0 0-1.9-1.9C18 4.8 12 4.8 12 4.8s-6 0-7.7.5a2.7 2.7 0 0 0-1.9 1.9C2 8.9 2 12 2 12s0 3.1.4 4.8a2.7 2.7 0 0 0 1.9 1.9c1.7.5 7.7.5 7.7.5s6 0 7.7-.5a2.7 2.7 0 0 0 1.9-1.9c.4-1.7.4-4.8.4-4.8s0-3.1-.4-4.8ZM10 15.1V8.9l5.3 3.1L10 15.1Z", "evenodd") },
|
|
5749
|
-
{ name: "MP3", tint: "#f78472", glyph:
|
|
5751
|
+
{ name: "MP3", tint: "#f78472", glyph: Wt("MP3") },
|
|
5750
5752
|
{ name: "Vimeo", tint: "#1ab7ea", glyph: kt("M22 7.4c-.1 2-1.5 4.7-4.2 8.1-2.8 3.6-5.1 5.4-7 5.4-1.2 0-2.2-1.1-3-3.3L6.2 11.6C5.6 9.4 5 8.3 4.3 8.3c-.1 0-.6.3-1.4.9L2 8l2.7-2.4C5.9 4.6 6.8 4 7.4 4c1.4-.1 2.3.9 2.6 2.9.4 2.2.6 3.6.8 4.1.4 1.8.9 2.7 1.4 2.7.4 0 1-.6 1.8-1.9.8-1.2 1.2-2.2 1.3-2.8.1-1.1-.3-1.6-1.3-1.6-.5 0-.9.1-1.4.3.9-3 2.7-4.5 5.3-4.4 1.9.1 2.8 1.3 2.7 3.7Z") },
|
|
5751
5753
|
{ name: "Video", tint: "#55abe5", glyph: /* @__PURE__ */ m(xe, { children: [
|
|
5752
5754
|
/* @__PURE__ */ i("rect", { x: "3", y: "5.5", width: "13", height: "13", rx: "2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
5753
5755
|
kt("M16 10.2 21 7v10l-5-3.2v-3.6Z")
|
|
5754
5756
|
] }) },
|
|
5755
5757
|
{ name: "Twitch", tint: "#a970ff", glyph: kt("M5 2.5 3 6.5v13h4.5V22H10l2.5-2.5h3.8L21 14.8V2.5H5Zm14 11.4-2.9 2.9h-4.3L9.4 19.2v-2.4H6V4.5h13v9.4ZM15.2 7.4h1.9v5.2h-1.9V7.4Zm-5 0h1.9v5.2h-1.9V7.4Z", "evenodd") },
|
|
5756
|
-
{ name: "WAV", tint: "#7ee0b4", glyph:
|
|
5758
|
+
{ name: "WAV", tint: "#7ee0b4", glyph: Wt("WAV") },
|
|
5757
5759
|
{ name: "SoundCloud", tint: "#ff7a1a", glyph: /* @__PURE__ */ m(xe, { children: [
|
|
5758
5760
|
kt("M11 8.6a5 5 0 0 1 7.8 3.1 3 3 0 0 1-.3 6H11V8.6Z"),
|
|
5759
5761
|
/* @__PURE__ */ i("rect", { x: "8.6", y: "9.4", width: "1.3", height: "8.3", rx: ".65", fill: "currentColor" }),
|
|
@@ -5761,11 +5763,11 @@ const kt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "curren
|
|
|
5761
5763
|
/* @__PURE__ */ i("rect", { x: "3.8", y: "12.2", width: "1.3", height: "5.5", rx: ".65", fill: "currentColor" }),
|
|
5762
5764
|
/* @__PURE__ */ i("rect", { x: "1.4", y: "13.8", width: "1.3", height: "3.9", rx: ".65", fill: "currentColor" })
|
|
5763
5765
|
] }) },
|
|
5764
|
-
{ name: "MP4", tint: "#5b63d7", glyph:
|
|
5766
|
+
{ name: "MP4", tint: "#5b63d7", glyph: Wt("MP4") },
|
|
5765
5767
|
{ name: "TikTok", tint: "#25f4ee", glyph: kt("M16.6 2.5c.3 2.3 1.7 3.8 3.9 4v2.7a6.8 6.8 0 0 1-3.9-1.3v6.5a5.7 5.7 0 1 1-5.7-5.7l.9.1v2.8a2.9 2.9 0 1 0 2 2.8V2.5h2.8Z") },
|
|
5766
5768
|
{ name: "Audio", tint: "#f7c948", glyph: /* @__PURE__ */ i("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", children: /* @__PURE__ */ i("path", { d: "M3 10.5v3M6.5 7.5v9M10 4.5v15M13.5 8v8M17 6v12M20.5 10v4" }) }) },
|
|
5767
5769
|
{ name: "X", tint: "#e8eaf2", glyph: kt("M17.8 3h3.1l-6.7 7.7L22 21h-6.2l-4.8-6.3L5.5 21H2.4l7.2-8.2L2.1 3h6.3l4.4 5.8L17.8 3Zm-1.1 16.2h1.7L7.4 4.7H5.6l11.1 14.5Z") },
|
|
5768
|
-
{ name: "MOV", tint: "#55abe5", glyph:
|
|
5770
|
+
{ name: "MOV", tint: "#55abe5", glyph: Wt("MOV") },
|
|
5769
5771
|
{ name: "Facebook", tint: "#3b82f6", glyph: kt("M13.9 21.5v-8h2.7l.4-3.1h-3.1V8.4c0-.9.3-1.5 1.6-1.5H17V4.1c-.3 0-1.3-.1-2.4-.1-2.4 0-4 1.4-4 4.1v2.3H7.9v3.1h2.7v8h3.3Z") },
|
|
5770
5772
|
{ name: "Podcast", tint: "#c46bff", glyph: /* @__PURE__ */ m("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
|
|
5771
5773
|
/* @__PURE__ */ i("rect", { x: "9", y: "3", width: "6", height: "10.5", rx: "3" }),
|
|
@@ -5776,33 +5778,33 @@ const kt = (t, e = "nonzero") => /* @__PURE__ */ i("path", { d: t, fill: "curren
|
|
|
5776
5778
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "4" }),
|
|
5777
5779
|
/* @__PURE__ */ i("circle", { cx: "17.2", cy: "6.8", r: ".9", fill: "currentColor", stroke: "none" })
|
|
5778
5780
|
] }) },
|
|
5779
|
-
{ name: "M4A", tint: "#f78472", glyph:
|
|
5781
|
+
{ name: "M4A", tint: "#f78472", glyph: Wt("M4A") },
|
|
5780
5782
|
{ name: "Dailymotion", tint: "#4aa3ff", glyph: kt("M14.6 3.5h3.2V20h-3v-1.2a5.4 5.4 0 0 1-3.6 1.4c-3.3 0-5.9-2.7-5.9-6.1S7.9 8 11.2 8c1.3 0 2.5.4 3.4 1.2V3.5Zm-3.1 7.4a3.2 3.2 0 1 0 0 6.4 3.2 3.2 0 0 0 0-6.4Z", "evenodd") },
|
|
5781
5783
|
{ name: "Radio", tint: "#7ee0b4", glyph: /* @__PURE__ */ m("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
|
|
5782
5784
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "1.8", fill: "currentColor", stroke: "none" }),
|
|
5783
5785
|
/* @__PURE__ */ i("path", { d: "M8.5 15.5a5 5 0 0 1 0-7M15.5 8.5a5 5 0 0 1 0 7M5.6 18.4a9 9 0 0 1 0-12.8M18.4 5.6a9 9 0 0 1 0 12.8" })
|
|
5784
5786
|
] }) },
|
|
5785
|
-
{ name: "WEBM", tint: "#5b63d7", glyph:
|
|
5787
|
+
{ name: "WEBM", tint: "#5b63d7", glyph: Wt("WEBM") },
|
|
5786
5788
|
{ name: "Loom", tint: "#8f7bff", glyph: kt("M21 11h-5.2l4.5-2.6-1-1.7-4.5 2.6 2.6-4.5-1.7-1-2.6 4.5V3h-2v5.3L8.5 3.8l-1.7 1 2.6 4.5-4.5-2.6-1 1.7L8.2 11H3v2h5.2l-4.5 2.6 1 1.7 4.5-2.6-2.6 4.5 1.7 1 2.6-4.5V21h2v-5.2l2.6 4.5 1.7-1-2.6-4.5 4.5 2.6 1-1.7-4.5-2.6H21v-2Zm-9 3.4a2.4 2.4 0 1 1 0-4.8 2.4 2.4 0 0 1 0 4.8Z", "evenodd") },
|
|
5787
|
-
{ name: "FLAC", tint: "#f7c948", glyph:
|
|
5789
|
+
{ name: "FLAC", tint: "#f7c948", glyph: Wt("FLAC") },
|
|
5788
5790
|
{ name: "Live", tint: "#ff5a5a", glyph: /* @__PURE__ */ m("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", children: [
|
|
5789
5791
|
/* @__PURE__ */ i("rect", { x: "3", y: "6", width: "18", height: "12", rx: "3" }),
|
|
5790
5792
|
/* @__PURE__ */ i("circle", { cx: "8", cy: "12", r: "1.6", fill: "currentColor", stroke: "none" }),
|
|
5791
5793
|
/* @__PURE__ */ i("path", { d: "M11.5 10h6M11.5 14h4" })
|
|
5792
5794
|
] }) }
|
|
5793
|
-
],
|
|
5794
|
-
function
|
|
5795
|
+
], td = 14, nd = 4;
|
|
5796
|
+
function rd(t) {
|
|
5795
5797
|
const e = Vi.length, n = [];
|
|
5796
5798
|
for (let r = 0; r < 11; r++) n.push(Vi[(r + t * 7) % e]);
|
|
5797
5799
|
return n;
|
|
5798
5800
|
}
|
|
5799
|
-
function
|
|
5801
|
+
function sd({ t }) {
|
|
5800
5802
|
return /* @__PURE__ */ m("span", { className: "vsp-prov__tile", style: { "--tint": t.tint }, children: [
|
|
5801
5803
|
/* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", "aria-hidden": "true", children: t.glyph }),
|
|
5802
5804
|
/* @__PURE__ */ i("span", { className: "vsp-prov__name", children: t.name })
|
|
5803
5805
|
] });
|
|
5804
5806
|
}
|
|
5805
|
-
function
|
|
5807
|
+
function id() {
|
|
5806
5808
|
const t = w(null), [e, n] = z(!0), [r, s] = z(() => typeof document > "u" || !document.hidden);
|
|
5807
5809
|
return x(() => {
|
|
5808
5810
|
const a = () => s(!document.hidden);
|
|
@@ -5812,9 +5814,9 @@ function sd() {
|
|
|
5812
5814
|
return o && typeof IntersectionObserver < "u" && (l = new IntersectionObserver(([c]) => n(c.isIntersecting)), l.observe(o)), () => {
|
|
5813
5815
|
document.removeEventListener("visibilitychange", a), l == null || l.disconnect();
|
|
5814
5816
|
};
|
|
5815
|
-
}, []), /* @__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:
|
|
5816
|
-
const l =
|
|
5817
|
-
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:
|
|
5817
|
+
}, []), /* @__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: td }, (a, o) => {
|
|
5818
|
+
const l = rd(o);
|
|
5819
|
+
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: nd }, (c, u) => l.map((d, h) => /* @__PURE__ */ i(sd, { t: d }, `${u}-${h}`))) }, o);
|
|
5818
5820
|
}) }) });
|
|
5819
5821
|
}
|
|
5820
5822
|
const Sa = {
|
|
@@ -5824,7 +5826,7 @@ const Sa = {
|
|
|
5824
5826
|
confirm: "Confirm in the VocalStack window…",
|
|
5825
5827
|
checking: "Checking the link…",
|
|
5826
5828
|
starting: "Starting the transcription…"
|
|
5827
|
-
},
|
|
5829
|
+
}, ad = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
|
|
5828
5830
|
function Ir(t) {
|
|
5829
5831
|
try {
|
|
5830
5832
|
return new URL(t).hostname.replace(/^www\./, "");
|
|
@@ -5832,8 +5834,8 @@ function Ir(t) {
|
|
|
5832
5834
|
return t;
|
|
5833
5835
|
}
|
|
5834
5836
|
}
|
|
5835
|
-
function
|
|
5836
|
-
const [n, r] = z(!1), [s, a] = z(null), [o, l] = z(null), [c, u] = z(() =>
|
|
5837
|
+
function od(t, e) {
|
|
5838
|
+
const [n, r] = z(!1), [s, a] = z(null), [o, l] = z(null), [c, u] = z(() => Zu(t)), d = Je((g) => {
|
|
5837
5839
|
if (n) return;
|
|
5838
5840
|
r(!0), l(null);
|
|
5839
5841
|
let f;
|
|
@@ -5843,28 +5845,28 @@ function ad(t, e) {
|
|
|
5843
5845
|
f = Promise.reject(y);
|
|
5844
5846
|
}
|
|
5845
5847
|
f.then((y) => {
|
|
5846
|
-
y && (
|
|
5848
|
+
y && (Gu(t), u(!0), y !== "connected" && e(y));
|
|
5847
5849
|
}).catch((y) => l(y instanceof Error ? y.message : "Something went wrong. Please try again.")).finally(() => {
|
|
5848
5850
|
r(!1), a(null);
|
|
5849
5851
|
});
|
|
5850
5852
|
}, [t, n, e]), h = Je(() => d({ connect: !0 }), [d]), M = Je((g, f) => d({ url: g, ask: f }), [d]);
|
|
5851
5853
|
return { busy: n, status: s, err: o, connected: c, connect: h, start: M };
|
|
5852
5854
|
}
|
|
5853
|
-
function
|
|
5855
|
+
function ld(t) {
|
|
5854
5856
|
return /\.(mp4|webm|mov|m4v|ogv|mkv)(\?|#|$)/i.test(t);
|
|
5855
5857
|
}
|
|
5856
|
-
function
|
|
5858
|
+
function cd({ poster: t, src: e }) {
|
|
5857
5859
|
var s;
|
|
5858
|
-
const n = e && ((s =
|
|
5859
|
-
return r ? /* @__PURE__ */ i("div", { className: "vsp-idle__pic", style: { backgroundImage: `url(${r})` } }) : e &&
|
|
5860
|
+
const n = e && ((s = Yt(e)) == null ? void 0 : s.id) === "youtube" ? ya(e) : null, r = t ?? (n ? `https://i.ytimg.com/vi/${n}/hqdefault.jpg` : null);
|
|
5861
|
+
return r ? /* @__PURE__ */ i("div", { className: "vsp-idle__pic", style: { backgroundImage: `url(${r})` } }) : e && ld(e) ? /* @__PURE__ */ i("video", { className: "vsp-idle__pic vsp-idle__frame", src: `${e}#t=1`, muted: !0, playsInline: !0, preload: "metadata", "aria-hidden": "true" }) : /* @__PURE__ */ m(xe, { children: [
|
|
5860
5862
|
/* @__PURE__ */ i("div", { className: "vsp-idle__pic vsp-idle__pic--brand" }),
|
|
5861
|
-
/* @__PURE__ */ i(
|
|
5863
|
+
/* @__PURE__ */ i(id, {})
|
|
5862
5864
|
] });
|
|
5863
5865
|
}
|
|
5864
|
-
const
|
|
5866
|
+
const ud = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
|
|
5865
5867
|
} };
|
|
5866
5868
|
function Jr({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
|
|
5867
|
-
const l =
|
|
5869
|
+
const l = ed(t.prefs, t.set), c = Ca(), u = w(null), [d, h] = z(!1);
|
|
5868
5870
|
tn(() => {
|
|
5869
5871
|
var T;
|
|
5870
5872
|
const g = (T = u.current) == null ? void 0 : T.parentElement;
|
|
@@ -5878,7 +5880,7 @@ function Jr({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
|
|
|
5878
5880
|
}, onNext: () => {
|
|
5879
5881
|
}, playing: !1, playable: !0, playTitle: "Connect to play", onPlay: a };
|
|
5880
5882
|
return /* @__PURE__ */ m("div", { ref: u, className: `vsp-idleroot${d ? " vsp-idleroot--small" : ""}`, children: [
|
|
5881
|
-
/* @__PURE__ */ i(ba, { page: s, picture: /* @__PURE__ */ i(
|
|
5883
|
+
/* @__PURE__ */ i(ba, { page: s, picture: /* @__PURE__ */ i(cd, { poster: e, src: n }), title: r, desk: c, pos: ud, sub: null, mute: { muted: t.prefs.muted, onToggle: () => t.set({ muted: !t.prefs.muted }) }, cc: { on: t.prefs.subtitles, onToggle: () => t.set({ subtitles: !t.prefs.subtitles }) }, chip: l.chip, transport: M, picker: l.sheets, sheet: null, voices: null, voicesBtn: null, sheetOpen: l.sheetOpen, onSettings: l.openSettings, onShare: () => Gr(t.shareUrl ?? window.location.href, r), copied: null, onTouch: () => {
|
|
5882
5884
|
} }),
|
|
5883
5885
|
!l.sheetOpen && /* @__PURE__ */ i("div", { className: "vsp-idle", "data-theme": "dark", children: /* @__PURE__ */ i("div", { className: "vsp-idle__box", children: o }) })
|
|
5884
5886
|
] });
|
|
@@ -5886,14 +5888,14 @@ function Jr({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
|
|
|
5886
5888
|
function Da({ connect: t, onClick: e, label: n }) {
|
|
5887
5889
|
return /* @__PURE__ */ m(xe, { children: [
|
|
5888
5890
|
/* @__PURE__ */ m("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
|
|
5889
|
-
t.busy ? /* @__PURE__ */ i(Mt, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d:
|
|
5891
|
+
t.busy ? /* @__PURE__ */ i(Mt, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: J.link, size: 18, sw: 1.8 }),
|
|
5890
5892
|
/* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
|
|
5891
5893
|
] }),
|
|
5892
5894
|
t.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", role: "status", children: Sa[t.status ?? "checking"] }),
|
|
5893
5895
|
t.err && /* @__PURE__ */ i("div", { className: "vsp-end__err", role: "alert", children: t.err })
|
|
5894
5896
|
] });
|
|
5895
5897
|
}
|
|
5896
|
-
function
|
|
5898
|
+
function dd({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, onClear: o }) {
|
|
5897
5899
|
const l = () => r.start(e, n);
|
|
5898
5900
|
return /* @__PURE__ */ m(Jr, { idle: t, poster: a, src: e, title: Ir(e), page: s, onAct: l, children: [
|
|
5899
5901
|
/* @__PURE__ */ i(Da, { connect: r, onClick: l, label: r.connected ? "Play with VocalStack" : "Connect to VocalStack" }),
|
|
@@ -5901,8 +5903,8 @@ function ud({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, on
|
|
|
5901
5903
|
o && !r.busy && /* @__PURE__ */ i("button", { type: "button", className: "vsp-idle__other", onClick: o, children: "Choose another video" })
|
|
5902
5904
|
] });
|
|
5903
5905
|
}
|
|
5904
|
-
function
|
|
5905
|
-
const [o, l] = z(""), [c, u] = z(!1), [d, h] = z(null), M = w(null), g = w(null), f = o.trim(), y = (O) =>
|
|
5906
|
+
function hd({ idle: t, connect: e, page: n, poster: r = null, onPick: s, onShare: a }) {
|
|
5907
|
+
const [o, l] = z(""), [c, u] = z(!1), [d, h] = z(null), M = w(null), g = w(null), f = o.trim(), y = (O) => ad.test(O) || !!Qi(O), T = y(f), N = e.busy || c, p = async (O) => {
|
|
5906
5908
|
const V = /^https?:\/\//i.test(O) ? O : `https://${O}`;
|
|
5907
5909
|
h(null);
|
|
5908
5910
|
const I = Qi(V);
|
|
@@ -5929,7 +5931,7 @@ function dd({ idle: t, connect: e, page: n, poster: r = null, onPick: s, onShare
|
|
|
5929
5931
|
/* @__PURE__ */ i("form", { className: "vsp-idle__form", onSubmit: (O) => {
|
|
5930
5932
|
O.preventDefault(), b();
|
|
5931
5933
|
}, children: /* @__PURE__ */ m("span", { className: "vsp-idle__field", children: [
|
|
5932
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5934
|
+
/* @__PURE__ */ i(oe, { d: J.link, size: 16, sw: 1.8 }),
|
|
5933
5935
|
/* @__PURE__ */ i("input", { ref: M, className: "vsp-idle__input", type: "url", inputMode: "url", enterKeyHint: "go", autoComplete: "off", spellCheck: !1, placeholder: e.connected ? "Paste a video link" : "Paste a share link", value: o, onChange: (O) => l(O.target.value), onPaste: (O) => {
|
|
5934
5936
|
const V = O.clipboardData.getData("text");
|
|
5935
5937
|
V && (l(V.trim()), A(V), O.preventDefault());
|
|
@@ -5941,19 +5943,19 @@ function dd({ idle: t, connect: e, page: n, poster: r = null, onPick: s, onShare
|
|
|
5941
5943
|
(d || e.err) && /* @__PURE__ */ i("div", { className: "vsp-end__err", role: "alert", children: d ?? e.err })
|
|
5942
5944
|
] });
|
|
5943
5945
|
}
|
|
5944
|
-
function
|
|
5946
|
+
function fd({ idle: t, message: e, onRetry: n, page: r }) {
|
|
5945
5947
|
return /* @__PURE__ */ m(Jr, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
|
|
5946
5948
|
/* @__PURE__ */ m("div", { className: "vsp-idle__err", role: "alert", children: [
|
|
5947
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5949
|
+
/* @__PURE__ */ i(oe, { d: J.warn, size: 16, sw: 1.8 }),
|
|
5948
5950
|
e
|
|
5949
5951
|
] }),
|
|
5950
5952
|
/* @__PURE__ */ m("button", { type: "button", className: "vsp-idle__connect", onClick: n, children: [
|
|
5951
|
-
/* @__PURE__ */ i(oe, { d:
|
|
5953
|
+
/* @__PURE__ */ i(oe, { d: J.uturn, size: 18, sw: 1.8 }),
|
|
5952
5954
|
/* @__PURE__ */ i("span", { children: "Try again" })
|
|
5953
5955
|
] })
|
|
5954
5956
|
] });
|
|
5955
5957
|
}
|
|
5956
|
-
function
|
|
5958
|
+
function Md(t, e, n) {
|
|
5957
5959
|
const [r, s] = z(t && e ? void 0 : null);
|
|
5958
5960
|
return x(() => {
|
|
5959
5961
|
if (!t) {
|
|
@@ -5980,8 +5982,8 @@ function fd(t, e, n) {
|
|
|
5980
5982
|
};
|
|
5981
5983
|
}, [t, e, n]), r;
|
|
5982
5984
|
}
|
|
5983
|
-
const
|
|
5984
|
-
function
|
|
5985
|
+
const gd = 100, Bi = (t) => t == null ? null : t ? "on" : "off";
|
|
5986
|
+
function md(t) {
|
|
5985
5987
|
const e = t.syncUrl && typeof window < "u" ? new URLSearchParams(window.location.search) : null, n = { ...t.initial ?? {}, ...t.settings ?? {} }, r = (a) => a === "on" || a === "off" ? a : null, s = Number(e == null ? void 0 : e.get("t"));
|
|
5986
5988
|
return {
|
|
5987
5989
|
lang: (e == null ? void 0 : e.get("lang")) || n.lang || null,
|
|
@@ -5990,12 +5992,12 @@ function gd(t) {
|
|
|
5990
5992
|
cc: e != null && e.get("cc") ? e.get("cc") !== "off" : n.subtitles ?? !0,
|
|
5991
5993
|
translateAudio: e != null && e.get("audio") ? e.get("audio") !== "original" : n.translateAudio ?? !0,
|
|
5992
5994
|
clonedVoices: e != null && e.get("voices") ? e.get("voices") !== "stock" : (n.voices ?? "cloned") === "cloned",
|
|
5993
|
-
removeBackground: e && e.get("bg") ?
|
|
5995
|
+
removeBackground: e && e.get("bg") ? Ll(e) : n.removeBackground ?? !1,
|
|
5994
5996
|
startAt: Number.isFinite(s) && s > 0 ? s : t.startAt ?? null
|
|
5995
5997
|
};
|
|
5996
5998
|
}
|
|
5997
|
-
const
|
|
5998
|
-
var
|
|
5999
|
+
const Od = go(function(e, n) {
|
|
6000
|
+
var X;
|
|
5999
6001
|
const r = w(null);
|
|
6000
6002
|
mo(n, () => ({
|
|
6001
6003
|
seek: (L) => {
|
|
@@ -6023,17 +6025,17 @@ const bd = go(function(e, n) {
|
|
|
6023
6025
|
x(() => {
|
|
6024
6026
|
a({ id: e.id ?? "", token: e.token });
|
|
6025
6027
|
}, [e.id, e.token, e.src]);
|
|
6026
|
-
const o =
|
|
6028
|
+
const o = Md(e.src ?? null, e.token ?? null, e.baseUrl ?? null);
|
|
6027
6029
|
x(() => {
|
|
6028
6030
|
o != null && o.id && a({ id: o.id, token: e.token });
|
|
6029
6031
|
}, [o == null ? void 0 : o.id]);
|
|
6030
|
-
const [l, c] = z(null), [u, d] = z(() => ({ ...
|
|
6032
|
+
const [l, c] = z(null), [u, d] = z(() => ({ ...Xu, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, L]) => L !== void 0)) })), [h, M] = z({}), g = { prefs: u, set: (L) => {
|
|
6031
6033
|
d((ie) => ({ ...ie, ...L })), M((ie) => ({ ...ie, ...L }));
|
|
6032
|
-
}, shareUrl: (
|
|
6034
|
+
}, shareUrl: (X = e.shareUrl) == null ? void 0 : X.call(e, null) }, { muted: f, ...y } = h;
|
|
6033
6035
|
x(() => {
|
|
6034
6036
|
c(null);
|
|
6035
6037
|
}, [e.id, e.src]);
|
|
6036
|
-
const T = e.src ?? l, N = !s.id && !!T && (l != null || o !== void 0), p = !s.id && !e.src && !l, b = fa({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: S, gone: A, error: P, reload: O } =
|
|
6038
|
+
const T = e.src ?? l, N = !s.id && !!T && (l != null || o !== void 0), p = !s.id && !e.src && !l, b = fa({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: S, gone: A, error: P, reload: O } = cc(b, s.id), V = uc(b, (S == null ? void 0 : S.recording.id) ?? null), I = ze(() => oc(b, V), [b, V]);
|
|
6037
6039
|
x(() => {
|
|
6038
6040
|
var L;
|
|
6039
6041
|
S && ((L = e.onSource) == null || L.call(e, S));
|
|
@@ -6041,29 +6043,29 @@ const bd = go(function(e, n) {
|
|
|
6041
6043
|
var L;
|
|
6042
6044
|
P && ((L = e.onError) == null || L.call(e, P));
|
|
6043
6045
|
}, [P]);
|
|
6044
|
-
const W = Ca(e.desk), E = (e.layout ?? "embed") === "embed", k = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), Y = Je((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), C =
|
|
6045
|
-
return x(() => (Ri(E ? te.current : null), () => Ri(null)), [E]), /* @__PURE__ */ i(
|
|
6046
|
+
const W = Ca(e.desk), E = (e.layout ?? "embed") === "embed", k = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), Y = Je((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), C = od(k, Y), te = w(null);
|
|
6047
|
+
return x(() => (Ri(E ? te.current : null), () => Ri(null)), [E]), /* @__PURE__ */ i(rc, { value: I, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${E ? " 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: p ? /* @__PURE__ */ i(hd, { idle: g, connect: C, page: !E, poster: e.poster ?? null, onPick: c, onShare: async (L) => {
|
|
6046
6048
|
try {
|
|
6047
6049
|
return await b.client.shareLinks.open(L), a({ id: L, token: null }), !0;
|
|
6048
6050
|
} catch {
|
|
6049
6051
|
return !1;
|
|
6050
6052
|
}
|
|
6051
|
-
} }) : N ? /* @__PURE__ */ i(
|
|
6053
|
+
} }) : N ? /* @__PURE__ */ i(dd, { idle: g, src: T, ask: !l, connect: C, page: !E, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? P && !S ? /* @__PURE__ */ i(fd, { idle: g, message: P.message, onRetry: O, page: !E }) : /* @__PURE__ */ i(pd, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: f === !0, handle: r, id: s.id, api: I, shared: S, gone: A, loadError: P, reread: O, desk: W, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
|
|
6052
6054
|
});
|
|
6053
|
-
function
|
|
6055
|
+
function pd(t) {
|
|
6054
6056
|
var Cs, Ss, Ds, As, Es, _s, Ys, Us, $s, Rs, Ps, Qs, Vs, Bs, Hs, Ws, Fs, Zs, Gs, qs, Ks, Js, Xs, ei, ti, ni, ri, si, ii, ai, oi, li, ci, ui, di, hi, fi, Mi, gi, mi, pi, yi, Ni, Ti;
|
|
6055
|
-
const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = ze(() =>
|
|
6057
|
+
const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = ze(() => md(t), []), u = (t.mode ?? "video") === "video", [d, h] = z(t.loadError);
|
|
6056
6058
|
x(() => {
|
|
6057
6059
|
t.loadError && h(t.loadError);
|
|
6058
6060
|
}, [t.loadError]);
|
|
6059
|
-
const [M, g] = z("none"), [f, y] = z(!1), [T, N] = z(""), [p, b] =
|
|
6061
|
+
const [M, g] = z("none"), [f, y] = z(!1), [T, N] = z(""), [p, b] = pu(), [S, A] = z(null), [P, O] = z(u ? "listen" : "read"), [V, I] = z(!1), W = w(null), E = w(/* @__PURE__ */ new Map()), [k, Y] = z("main"), C = (j) => {
|
|
6060
6062
|
const pe = document.querySelector(".vs-sheet--settings"), Re = pe == null ? void 0 : pe.parentElement;
|
|
6061
6063
|
pe && Re && k === "main" && j !== "main" && Re.style.setProperty("--vs-sheet-top", `${Math.round(pe.getBoundingClientRect().top - Re.getBoundingClientRect().top)}px`), Y(j);
|
|
6062
6064
|
};
|
|
6063
6065
|
x(() => {
|
|
6064
6066
|
V || C("main");
|
|
6065
6067
|
}, [V]);
|
|
6066
|
-
const [te,
|
|
6068
|
+
const [te, X] = z(u), L = (n == null ? void 0 : n.recording) ?? null, ie = (L == null ? void 0 : L.id) ?? null, [ne, G] = z(l.lang), ee = typeof ne == "string" ? ne : null, [me, le] = z(l.labels), [Te, je] = z(l.words), [Se, we] = z(l.cc), [ve, Ee] = z(l.translateAudio), [$e, De] = z(l.clonedVoices), [B, F] = z(l.removeBackground), _ = t.settings;
|
|
6067
6069
|
x(() => {
|
|
6068
6070
|
(_ == null ? void 0 : _.lang) !== void 0 && G(_.lang);
|
|
6069
6071
|
}, [_ == null ? void 0 : _.lang]), x(() => {
|
|
@@ -6083,24 +6085,24 @@ function md(t) {
|
|
|
6083
6085
|
x(() => {
|
|
6084
6086
|
if (!t.syncUrl) return;
|
|
6085
6087
|
const j = new URL(window.location.href);
|
|
6086
|
-
|
|
6087
|
-
}, [
|
|
6088
|
-
n && !n.allowTranslate &&
|
|
6089
|
-
}, [n,
|
|
6090
|
-
const { model: ce, error: Z, clearError: Ne, setLanguage: q, mergeTranslations: Le, translating: Ie, translateFailed: Fe, shownLang: Ae } =
|
|
6088
|
+
ee ? j.searchParams.set("lang", ee) : j.searchParams.delete("lang"), me ? j.searchParams.set("labels", me) : j.searchParams.delete("labels"), Te ? j.searchParams.set("words", Te) : j.searchParams.delete("words"), Se ? j.searchParams.delete("cc") : j.searchParams.set("cc", "off"), ve ? j.searchParams.delete("audio") : j.searchParams.set("audio", "original"), $e ? j.searchParams.delete("voices") : j.searchParams.set("voices", "stock"), jl(j, B), j.href !== window.location.href && window.history.replaceState(window.history.state, "", j);
|
|
6089
|
+
}, [ee, me, Te, Se, ve, $e, B]), x(() => {
|
|
6090
|
+
n && !n.allowTranslate && ee && G(null);
|
|
6091
|
+
}, [n, ee]);
|
|
6092
|
+
const { model: ce, error: Z, clearError: Ne, setLanguage: q, mergeTranslations: Le, translating: Ie, translateFailed: Fe, shownLang: Ae } = Mc(ie, {
|
|
6091
6093
|
lang: null,
|
|
6092
6094
|
onFrame: (j) => {
|
|
6093
6095
|
j.type === "job.progress" && A({ state: j.state, processedS: j.processedS ?? 0, totalS: j.totalS ?? null, segmentsDone: j.segmentsDone ?? 0, segmentsTotal: j.segmentsTotal ?? null, pct: j.pct ?? 0, error: j.error ?? null });
|
|
6094
6096
|
}
|
|
6095
|
-
}), ue = ze(() =>
|
|
6097
|
+
}), ue = ze(() => Hl(ce).filter((j) => !j.suppressed), [ce]), _e = gc((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(Lr((_e == null ? void 0 : _e.state) ?? ((Cs = n == null ? void 0 : n.job) == null ? void 0 : Cs.state))), Q = Ve ? _e : S ?? _e, fe = !!S && !["done", "failed", "stopped"].includes(Lr(S.state)), de = w(0);
|
|
6096
6098
|
x(() => {
|
|
6097
6099
|
!Ve || !fe || Date.now() - de.current < 1e4 || (de.current = Date.now(), t.reread());
|
|
6098
6100
|
}, [Ve, fe, S == null ? void 0 : S.state, S == null ? void 0 : S.processedS, o]);
|
|
6099
|
-
const ae = Lr((Q == null ? void 0 : Q.state) ?? ((Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.state) ?? (e.listen ? (L == null ? void 0 : L.state) === "finalized" ? "done" : L != null && L.state ? "transcribing" : void 0 : void 0)), ge = !!ie && (ae === "transcribing" || ae === "queued"), Ye = u && !r && (!n || (ge || ae === "cropping") && ue.length === 0), U = ge ? (Q == null ? void 0 : Q.pct) ?? 0 : 100, $ =
|
|
6101
|
+
const ae = Lr((Q == null ? void 0 : Q.state) ?? ((Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.state) ?? (e.listen ? (L == null ? void 0 : L.state) === "finalized" ? "done" : L != null && L.state ? "transcribing" : void 0 : void 0)), ge = !!ie && (ae === "transcribing" || ae === "queued"), Ye = u && !r && (!n || (ge || ae === "cropping") && ue.length === 0), U = ge ? (Q == null ? void 0 : Q.pct) ?? 0 : 100, $ = pc(n == null ? void 0 : n.job, Q) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, K = ((Ds = ce.segments.values().next().value) == null ? void 0 : Ds.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, se = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", he = ((_s = (Es = (As = n == null ? void 0 : n.job) == null ? void 0 : As.source) == null ? void 0 : Es.name) == null ? void 0 : _s.trim()) || null, be = n ? ((Ys = n.name) == null ? void 0 : Ys.trim()) || he : null, ye = !!((Us = n == null ? void 0 : n.job) != null && Us.hasAudio), ke = ($s = n == null ? void 0 : n.job) == null ? void 0 : $s.source, Oe = !ye && !!ke && (ke.kind !== "url" || ke.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), He = ie && (n != null && n.allowDownload) && ye ? So(e.origin, ie, e.cred) : null, Pe = !!ke && (ke.kind !== "url" || ke.bytes != null), ht = yd(He && Pe ? He : null), at = He && (!Pe || ht === "yes") ? He : He && ht === "unknown" ? null : ie && (n != null && n.allowDownload) && (Oe || ye && Pe) ? An(e.origin, ie, "source", e.cred) : null, Tt = ue[ue.length - 1], Ge = Tt ? ((Rs = Tt.words[Tt.words.length - 1]) == null ? void 0 : Rs.end) ?? Tt.start : 0, st = u && ge ? Math.max(Ge, (Q == null ? void 0 : Q.processedS) ?? 0) : null, gt = ku(at, (ye || Oe) && !!(n != null && n.allowDownload), ue, $, Oe ? ((Qs = (Ps = n == null ? void 0 : n.job) == null ? void 0 : Ps.crop) == null ? void 0 : Qs.startS) ?? 0 : 0, st), it = el((Vs = n == null ? void 0 : n.job) == null ? void 0 : Vs.source), Be = it && ((Bs = Yt(it)) == null ? void 0 : Bs.id) === "youtube" ? ya(it) : null, Mn = ml(Be), Ut = wu(ue, $, ((Ws = (Hs = n == null ? void 0 : n.job) == null ? void 0 : Hs.crop) == null ? void 0 : Ws.startS) ?? 0, st), Xe = !!Be, ct = Xe ? Ut.player : gt, ot = Ma(), rn = w(null), re = bu({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: ue, lenS: $, ended: !!ie && !ge, cred: e.cred, langs: ot, srcLang: K, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: G, side: s && !te ? Iu : void 0, hearOriginal: H, timed: !!Be, stockVoices: u && !$e, stickyPicker: u, pickerBusy: rn.current }), gn = w(null);
|
|
6100
6102
|
x(() => {
|
|
6101
|
-
!ie || gn.current ===
|
|
6102
|
-
}, [
|
|
6103
|
-
const v = Xe ?
|
|
6103
|
+
!ie || gn.current === ee || (gn.current = ee, q(ee));
|
|
6104
|
+
}, [ee, ie]);
|
|
6105
|
+
const v = Xe ? Ut.player : re.on ? re.player : ct;
|
|
6104
6106
|
x(() => {
|
|
6105
6107
|
if (Xe) {
|
|
6106
6108
|
re.player.pause();
|
|
@@ -6110,24 +6112,24 @@ function md(t) {
|
|
|
6110
6112
|
}, [re.on, Xe]);
|
|
6111
6113
|
const Gn = ze(() => ue.filter((j) => j.sentenceId != null).map((j, pe, Re) => {
|
|
6112
6114
|
var We;
|
|
6113
|
-
return { sid: j.sentenceId, start: j.start, end: ((We = Re[pe + 1]) == null ? void 0 : We.start) ??
|
|
6114
|
-
}), [ue]),
|
|
6115
|
-
rn.current =
|
|
6116
|
-
Xe && re.on &&
|
|
6117
|
-
}, [
|
|
6118
|
-
const
|
|
6115
|
+
return { sid: j.sentenceId, start: j.start, end: ((We = Re[pe + 1]) == null ? void 0 : We.start) ?? Zt(j, j.start, j.start + 4) };
|
|
6116
|
+
}), [ue]), $t = Ul({ on: Xe && re.on, lines: Gn, clips: re.clips, t: v.t, playing: v.playing, muted: v.muted }), Rt = !!ee && (Ie || re.relang || re.on && $t.missing != null);
|
|
6117
|
+
rn.current = Rt ? ee : null, x(() => {
|
|
6118
|
+
Xe && re.on && $t.sid != null && re.setNear($t.sid);
|
|
6119
|
+
}, [$t.sid, Xe, re.on]), vu([ct, re.player], re.sampling);
|
|
6120
|
+
const Pt = w(null);
|
|
6119
6121
|
x(() => {
|
|
6120
|
-
ge && !v.playing &&
|
|
6122
|
+
ge && !v.playing && Pt.current && (Pt.current.scrollTop = Pt.current.scrollHeight);
|
|
6121
6123
|
}, [ge, ue.length]);
|
|
6122
|
-
const qt =
|
|
6124
|
+
const qt = Cu(Pt, ue, f, T, y), mn = /* @__PURE__ */ i(xu, { open: f, q: T, onQ: N, onClose: () => y(!1), hits: qt, desk: s, inline: s }), qe = yl({ name: n == null ? void 0 : n.name, sourceName: (Zs = (Fs = n == null ? void 0 : n.job) == null ? void 0 : Fs.source) == null ? void 0 : Zs.name, ytTitle: Mn, url: ((qs = (Gs = n == null ? void 0 : n.job) == null ? void 0 : Gs.source) == null ? void 0 : qs.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), lt = !!(n != null && n.allowDownload), sn = !!(n != null && n.allowExport), vt = re.readLang, mt = vt ? ((Ks = ot == null ? void 0 : ot.languages.find((j) => j.code === vt)) == null ? void 0 : Ks.name) ?? vt.toUpperCase() : null, Kt = async () => {
|
|
6123
6125
|
if (ie)
|
|
6124
6126
|
try {
|
|
6125
6127
|
if (vt && re.canSpeak) {
|
|
6126
|
-
b(`Preparing ${qe} in ${mt}${re.readVoiceName ? `, read by ${re.readVoiceName}` : ""} — the download starts when it is ready.`), await
|
|
6128
|
+
b(`Preparing ${qe} in ${mt}${re.readVoiceName ? `, read by ${re.readVoiceName}` : ""} — the download starts when it is ready.`), await Tc(e, { recordingId: ie, lang: vt, voiceKey: re.readVoiceKey, cred: e.cred, request: re.requestTrack }), b(`Downloading ${qe} in ${mt}.`);
|
|
6127
6129
|
return;
|
|
6128
6130
|
}
|
|
6129
6131
|
if (ye) {
|
|
6130
|
-
b(`Preparing ${qe} as MP3 — the download starts when it is ready.`), await
|
|
6132
|
+
b(`Preparing ${qe} as MP3 — the download starts when it is ready.`), await yc(An(e.origin, ie, "delivery", e.cred)), b(`Downloading ${qe}.`);
|
|
6131
6133
|
return;
|
|
6132
6134
|
}
|
|
6133
6135
|
Zr(An(e.origin, ie, "source", e.cred)), b(`Downloading ${qe} — the full audio, since the transcript is still being written.`);
|
|
@@ -6137,15 +6139,15 @@ function md(t) {
|
|
|
6137
6139
|
}, ft = (j) => {
|
|
6138
6140
|
if (!ie) return;
|
|
6139
6141
|
const pe = _r.find((We) => We.key === j).name, Re = mt ? ` in ${mt}` : "";
|
|
6140
|
-
return
|
|
6142
|
+
return Nc(e, ie, j, { lang: vt }).then(() => b(ge ? `${pe} exported${Re} for the first ${ue.length} segments — the rest is still transcribing.` : `${pe} exported${Re}.`)).catch((We) => {
|
|
6141
6143
|
throw h(Ct(We)), We;
|
|
6142
6144
|
});
|
|
6143
|
-
}, an = ge ? "MORE TO COME…" : "END OF TRANSCRIPT", ut = ge ? "var(--brand)" : "var(--ink-28)", on =
|
|
6145
|
+
}, an = ge ? "MORE TO COME…" : "END OF TRANSCRIPT", ut = ge ? "var(--brand)" : "var(--ink-28)", on = mc(Q, ue.length), St = v.has && (!re.relang || !!Be), Ze = w(v);
|
|
6144
6146
|
Ze.current = v;
|
|
6145
|
-
const
|
|
6147
|
+
const Qt = `${ee ?? ""}|${re.on ? "voice" : "source"}`, jt = w({ key: Qt, idx: 0, t: 0, playing: !1, until: 0 });
|
|
6146
6148
|
x(() => {
|
|
6147
6149
|
const j = jt.current;
|
|
6148
|
-
if (j.key !==
|
|
6150
|
+
if (j.key !== Qt && (j.key = Qt, j.until = Date.now() + 15e3), !Xe) {
|
|
6149
6151
|
if (!j.until) {
|
|
6150
6152
|
j.idx = v.idx, j.t = v.t, j.playing = v.playing;
|
|
6151
6153
|
return;
|
|
@@ -6157,12 +6159,12 @@ function md(t) {
|
|
|
6157
6159
|
!v.has || re.relang || (j.until = 0, Math.abs(v.t - j.t) > 0.5 && (v.seekFrac && v.dur > 0 ? v.seekFrac(j.t / v.dur) : v.seekRow(j.idx)), j.playing && !v.playing && P === "listen" && (tt.current = !0, v.toggle()));
|
|
6158
6160
|
}
|
|
6159
6161
|
});
|
|
6160
|
-
const
|
|
6162
|
+
const Vt = w(!1), tt = w(!1);
|
|
6161
6163
|
u && (Ki.video = !0);
|
|
6162
6164
|
const [pn, Dt] = z(!1), [qn, Kn] = z(!1);
|
|
6163
6165
|
x(() => {
|
|
6164
|
-
if (!u ||
|
|
6165
|
-
|
|
6166
|
+
if (!u || Vt.current || !St || !te || Ye || t.autoplay === !1) return;
|
|
6167
|
+
Vt.current = !0;
|
|
6166
6168
|
const j = (We) => {
|
|
6167
6169
|
Ze.current.playing || tt.current || (Ze.current.toggle(), We > 0 && setTimeout(() => j(We - 1), 1500));
|
|
6168
6170
|
}, pe = () => {
|
|
@@ -6192,7 +6194,7 @@ function md(t) {
|
|
|
6192
6194
|
return;
|
|
6193
6195
|
}
|
|
6194
6196
|
tt.current = !0, Ze.current.toggle();
|
|
6195
|
-
}, Nn = (j) => /* @__PURE__ */ i(
|
|
6197
|
+
}, Nn = (j) => /* @__PURE__ */ i(mu, { player: v, size: j }), ln = !!ie && !ge, [R, Ce] = z(!1);
|
|
6196
6198
|
x(() => {
|
|
6197
6199
|
if (!Ie) {
|
|
6198
6200
|
Ce(!1);
|
|
@@ -6201,16 +6203,16 @@ function md(t) {
|
|
|
6201
6203
|
const j = setTimeout(() => Ce(!0), 180);
|
|
6202
6204
|
return () => clearTimeout(j);
|
|
6203
6205
|
}, [Ie]);
|
|
6204
|
-
const Qe = R ? Ae :
|
|
6205
|
-
ct.pause(), re.player.pause(), O(j), j === "read" && te && (dn(!1),
|
|
6206
|
+
const Qe = R ? Ae : ee, Et = Sc(ie, ee, ue, Le), Bt = Fc(Zc(L), ie, re.readLang), Aa = lt || sn, Ea = (((Xs = (Js = n == null ? void 0 : n.job) == null ? void 0 : Js.crop) == null ? void 0 : Xs.startS) ?? 0) + bt(v, ue), zt = P === "listen", Ht = zt && (!!Be || u), _a = (j) => {
|
|
6207
|
+
ct.pause(), re.player.pause(), O(j), j === "read" && te && (dn(!1), X(!1));
|
|
6206
6208
|
};
|
|
6207
6209
|
x(() => {
|
|
6208
6210
|
zt || (ct.playing && ct.pause(), re.player.playing && re.player.pause());
|
|
6209
6211
|
}, [zt, ct.playing, re.player.playing]);
|
|
6210
|
-
const Ue = re.barChip, Jt = ma(Ue.label), Xr = /* @__PURE__ */ i(br, { value: P, onChange: _a, bordered: !1, options:
|
|
6211
|
-
j === "summary" && ln && /* @__PURE__ */ i(
|
|
6212
|
-
j === "export" && /* @__PURE__ */ i(
|
|
6213
|
-
] }), Ya = (j) => /* @__PURE__ */ i(
|
|
6212
|
+
const Ue = re.barChip, Jt = ma(Ue.label), Xr = /* @__PURE__ */ i(br, { value: P, onChange: _a, bordered: !1, options: Bu(Jt, !!Be) }), Xt = [...ln ? [{ key: "summary", label: "Summary" }] : [], ...Aa ? [{ key: "export", label: "Export" }] : []], es = (j) => /* @__PURE__ */ m(xe, { children: [
|
|
6213
|
+
j === "summary" && ln && /* @__PURE__ */ i(Gc, { s: Bt }),
|
|
6214
|
+
j === "export" && /* @__PURE__ */ i(Wc, { audio: lt ? { name: qe, meta: vt && re.canSpeak || ye ? `MP3${$ ? ` · ${Ot($)}` : ""}` : "ORIGINAL AUDIO", onClick: Kt } : null, formats: sn, onExport: ft })
|
|
6215
|
+
] }), Ya = (j) => /* @__PURE__ */ i(bc, { index: v.idx, total: Math.max(1, ue.length), frac: v.dur > 0 ? Math.min(1, v.t / v.dur) : 0, glideMs: v.wordSync ? 0 : 220, atLabel: Ot(v.t), durLabel: Ot(v.dur), stepLabel: j ? `${v.idx + 1} / ${ue.length}` : "", onSeek: re.relang ? ju : v.seekRow, onSeekFrac: re.relang ? void 0 : v.seekFrac, onScrubStart: v.hold, onScrubEnd: v.release }), ts = {
|
|
6214
6216
|
live: !1,
|
|
6215
6217
|
atEdge: !1,
|
|
6216
6218
|
edgeFrac: null,
|
|
@@ -6223,14 +6225,14 @@ function md(t) {
|
|
|
6223
6225
|
var pe;
|
|
6224
6226
|
re.relang || (pe = v.seekFrac) == null || pe.call(v, j);
|
|
6225
6227
|
}
|
|
6226
|
-
}, [Ua, $a] = ka(re.on && !!v.preparing && v.playing, 1500), Xn = re.on && ((ei = v.error) == null ? void 0 : ei.code) === "voice_not_started", er = re.canSpeak && !re.error && !Xn, Tn =
|
|
6228
|
+
}, [Ua, $a] = ka(re.on && !!v.preparing && v.playing, 1500), Xn = re.on && ((ei = v.error) == null ? void 0 : ei.code) === "voice_not_started", er = re.canSpeak && !re.error && !Xn, Tn = ee ? ((ti = ot == null ? void 0 : ot.languages.find((j) => j.code === ee)) == null ? void 0 : ti.name) ?? Ue.label : "", nt = te ? uu({ lang: ee, langName: Tn, translating: Ie && !!ee, translateFailed: Fe, voiceFailed: Xn, relang: re.relang, starting: re.on ? v.starting : null, slowLine: Ua, lineSince: $a }) : null, tr = !!Be && !!nt && (nt.kind === "translating" || nt.kind === "voice" && re.relang), ns = !tr || !nt ? null : nt.kind === "translating" ? `Translating into ${Tn || "the new language"}…` : `Preparing the ${Tn || "translated"} voice…`, yt = !tr && ((nt == null ? void 0 : nt.kind) === "voice" || (nt == null ? void 0 : nt.kind) === "starting"), rs = Vr({ ...re.langList, keepOpen: !0, open: k === "lang", onClose: () => C("main") }), ss = kl(B, re.on), Ra = u && ss.bed && lt && ie && (!ge || at) ? wi(e.origin, ie, e.cred) : null, is = Sl(Ra, { t: bt(v, ue), playing: v.playing && !yt && !(v.timed && v.preparing), muted: v.muted }), Pa = u && ss.speech && lt && ie && (!ge || at) ? wi(e.origin, ie, e.cred, "speech") : null, nr = la(Pa, { t: bt(v, ue), playing: !re.on && v.playing, muted: v.muted }), rr = !re.on && nr.on;
|
|
6227
6229
|
x(() => {
|
|
6228
6230
|
var j;
|
|
6229
|
-
|
|
6231
|
+
Ut.setVideoSound(!(Xe && (re.on || rr))), (j = gt.silence) == null || j.call(gt, !Xe && rr);
|
|
6230
6232
|
}, [Xe, re.on, rr, at]);
|
|
6231
|
-
const sr = lt ? re.on ? is : nr.state : "unavailable", ir = ve && er && !!
|
|
6233
|
+
const sr = lt ? re.on ? is : nr.state : "unavailable", ir = ve && er && !!ee, Qa = ir ? [`Translated${re.hasClone ? $e ? ", cloned voices" : ", synthetic voices" : ""}`, !B && lt && is !== "unavailable" ? "with background sound" : null].filter(Boolean).join(" ") : B && sr !== "unavailable" ? "Original speech, background removed" : "Original sound", Va = () => {
|
|
6232
6234
|
if ((nt == null ? void 0 : nt.kind) === "translateFailed") {
|
|
6233
|
-
q(
|
|
6235
|
+
q(ee);
|
|
6234
6236
|
return;
|
|
6235
6237
|
}
|
|
6236
6238
|
tt.current = !0, v.toggle();
|
|
@@ -6240,27 +6242,27 @@ function md(t) {
|
|
|
6240
6242
|
}, as = { prevOn: v.idx > 0, nextOn: v.idx < ue.length - 1, onPrev: v.prev, onNext: v.next, playing: v.playing, playable: St, playTitle: re.playTitle ?? (v.playing ? "Pause" : "Play"), onPlay: () => {
|
|
6241
6243
|
tt.current = !0, v.toggle();
|
|
6242
6244
|
}, busy: re.relang && !Be || yt };
|
|
6243
|
-
|
|
6245
|
+
Pl(St && zt ? { playing: v.playing, toggle: () => {
|
|
6244
6246
|
tt.current = !0, v.toggle();
|
|
6245
6247
|
}, next: v.next, prev: v.prev } : null, be);
|
|
6246
|
-
const ar = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, or = (j, pe) => !Ue.can || !D.language ? null : u ? /* @__PURE__ */ m("button", { type: "button", className: "gfull__btn", title:
|
|
6248
|
+
const ar = { background: "transparent", color: "#eef0f8", width: 74, justifyContent: "center", boxSizing: "border-box" }, or = (j, pe) => !Ue.can || !D.language ? null : u ? /* @__PURE__ */ m("button", { type: "button", className: "gfull__btn", title: Rt ? `${Ue.label ?? Ue.code}: still being prepared` : Ue.label ?? Ue.code, "aria-label": `Language: ${Ue.label ?? Ue.code}`, "aria-busy": Rt || void 0, onClick: () => {
|
|
6247
6249
|
I(!1), Ue.onClick();
|
|
6248
6250
|
}, style: { position: "relative" }, children: [
|
|
6249
6251
|
/* @__PURE__ */ i("span", { style: { fontSize: pe === "sm" ? 17 : 21, lineHeight: 1 }, children: Ue.flag }),
|
|
6250
|
-
|
|
6252
|
+
Rt && /* @__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(Mt, { size: 11, color: "#eef0f8", track: "rgba(255,255,255,.25)" }) })
|
|
6251
6253
|
] }) : /* @__PURE__ */ i(Bn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, size: pe, onClick: Ue.onClick, style: j }), os = { on: !1, title: "Voices", onClick: () => {
|
|
6252
6254
|
}, busy: re.voiceWaiting || yt }, [Ha, Wa] = z(!1);
|
|
6253
6255
|
x(() => {
|
|
6254
6256
|
v.t > 0.3 && Wa(!0);
|
|
6255
6257
|
}, [v.t]);
|
|
6256
|
-
const Fa = !Be && u && ie && (n != null && n.allowDownload) && !ge && ((ni = n == null ? void 0 : n.job) == null ? void 0 : ni.hasVideo) !== !1 && ((si = (ri = n == null ? void 0 : n.job) == null ? void 0 : ri.source) == null ? void 0 : si.kind) !== "url" ? /* @__PURE__ */ i(Li, { src: An(e.origin, ie, "video", e.cred), t: bt(v, ue), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, ie) : null, dt = !Be && u && it &&
|
|
6258
|
+
const Fa = !Be && u && ie && (n != null && n.allowDownload) && !ge && ((ni = n == null ? void 0 : n.job) == null ? void 0 : ni.hasVideo) !== !1 && ((si = (ri = n == null ? void 0 : n.job) == null ? void 0 : ri.source) == null ? void 0 : si.kind) !== "url" ? /* @__PURE__ */ i(Li, { src: An(e.origin, ie, "video", e.cred), t: bt(v, ue), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, ie) : null, dt = !Be && u && it && Jo(it) ? it : null, vn = dt ? aa(dt) : null, ls = ze(() => vn ? gl(vn) : void 0, [vn]), lr = dt && ((ii = Yt(dt)) == null ? void 0 : ii.id) === "facebook" ? dt : null, cr = dt && ((ai = Yt(dt)) == null ? void 0 : ai.id) === "wistia" ? tl(dt) : null, ur = dt && ((oi = Yt(dt)) == null ? void 0 : oi.id) === "vidyard" ? nl(dt) : null, Za = ur ? /* @__PURE__ */ i(hl, { uuid: ur, t: bt(v, ue) + (((ci = (li = n == null ? void 0 : n.job) == null ? void 0 : li.crop) == null ? void 0 : ci.startS) ?? 0), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, ur) : cr ? /* @__PURE__ */ i(ul, { id: cr, t: bt(v, ue) + (((di = (ui = n == null ? void 0 : n.job) == null ? void 0 : ui.crop) == null ? void 0 : di.startS) ?? 0), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, cr) : lr ? /* @__PURE__ */ i(ll, { url: lr, t: bt(v, ue) + (((fi = (hi = n == null ? void 0 : n.job) == null ? void 0 : hi.crop) == null ? void 0 : fi.startS) ?? 0), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, lr) : ls ? /* @__PURE__ */ i(Li, { setup: ls, seekOver: 1, t: bt(v, ue) + (((gi = (Mi = n == null ? void 0 : n.job) == null ? void 0 : Mi.crop) == null ? void 0 : gi.startS) ?? 0), playing: v.playing && !yt, seekN: v.seekN, onToggle: v.has ? pt : void 0 }, vn) : dt ? /* @__PURE__ */ i(il, { url: dt, t: bt(v, ue) + (((pi = (mi = n == null ? void 0 : n.job) == null ? void 0 : mi.crop) == null ? void 0 : pi.startS) ?? 0), playing: v.playing && !yt, seekN: v.seekN, title: qe, onToggle: v.has ? pt : void 0 }) : null, Ga = v.has ? /* @__PURE__ */ m("div", { className: "txyt vsp-follow", children: [
|
|
6257
6259
|
/* @__PURE__ */ i("div", { "aria-hidden": "true", className: "txyt__tap", onClick: pt, style: { cursor: "pointer" } }),
|
|
6258
6260
|
/* @__PURE__ */ i("div", { className: `txyt__paused${v.playing ? "" : " txyt__paused--on"}`, "aria-hidden": "true", children: /* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(xt, { size: 44 }) }) })
|
|
6259
6261
|
] }) : null, dr = ((Ni = (yi = n == null ? void 0 : n.job) == null ? void 0 : yi.source) == null ? void 0 : Ni.thumbnailUrl) ?? null, qa = dr && /^https:\/\//.test(dr) ? /* @__PURE__ */ i("div", { className: "vsp-thumbpic", "aria-hidden": "true", style: { backgroundImage: `url(${JSON.stringify(dr)})` } }) : null, cs = Be ? /* @__PURE__ */ m(xe, { children: [
|
|
6260
|
-
/* @__PURE__ */ i(
|
|
6262
|
+
/* @__PURE__ */ i(fu, { ytId: Be, title: qe, t: Ea, playing: v.playing && !yt, waiting: re.on && !!v.timed && !!v.preparing, seekN: v.seekN, onTime: (j) => {
|
|
6261
6263
|
var pe, Re, We;
|
|
6262
6264
|
return (We = v.videoAt) == null ? void 0 : We.call(v, j - (((Re = (pe = n == null ? void 0 : n.job) == null ? void 0 : pe.crop) == null ? void 0 : Re.startS) ?? 0));
|
|
6263
|
-
}, onToggle: v.has ? pt : void 0, onAd: Kn, lead: Xe ?
|
|
6265
|
+
}, onToggle: v.has ? pt : void 0, onAd: Kn, lead: Xe ? Ut.lead : void 0 }),
|
|
6264
6266
|
/* @__PURE__ */ m("div", { className: "vsp-poster", "aria-hidden": "true", style: { opacity: Ha ? 0 : 1 }, children: [
|
|
6265
6267
|
/* @__PURE__ */ i("div", { className: "vsp-poster__img", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Be}/hqdefault.jpg)` } }),
|
|
6266
6268
|
/* @__PURE__ */ i("span", { className: "txyt__pausedplay", children: /* @__PURE__ */ i(xt, { size: 44 }) })
|
|
@@ -6271,13 +6273,13 @@ function md(t) {
|
|
|
6271
6273
|
Ga,
|
|
6272
6274
|
Za,
|
|
6273
6275
|
Fa
|
|
6274
|
-
] }) : null, us =
|
|
6275
|
-
dn(!0),
|
|
6276
|
-
}, copied: null }) }) : null, et = v.wordSync ?
|
|
6276
|
+
] }) : null, us = Ht && Be && !te ? /* @__PURE__ */ i(qc, { ytId: Be, title: qe, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: cs, children: /* @__PURE__ */ i(Ru, { pos: ts, transport: as, chip: or({ ...ar, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: os, onFull: () => {
|
|
6277
|
+
dn(!0), X(!0);
|
|
6278
|
+
}, copied: null }) }) : null, et = v.wordSync ? kc(ue, v.idx, v.t) ? ue[v.idx] : void 0 : ue[v.idx];
|
|
6277
6279
|
for (const j of ue) for (const [pe, Re] of Object.entries(j.translations)) Re && E.current.set(`${j.sentenceId ?? j.start}|${pe}`, Re);
|
|
6278
|
-
const ds = (j, pe) => j.translations[pe] || E.current.get(`${j.sentenceId ?? j.start}|${pe}`) || null, hr = (j, pe) => !j || !pe || j.language === pe || !!ds(j, pe), It = hr(et,
|
|
6280
|
+
const ds = (j, pe) => j.translations[pe] || E.current.get(`${j.sentenceId ?? j.start}|${pe}`) || null, hr = (j, pe) => !j || !pe || j.language === pe || !!ds(j, pe), It = hr(et, ee) ? ee : hr(et, W.current) ? W.current : ee;
|
|
6279
6281
|
et && hr(et, It) && (W.current = It);
|
|
6280
|
-
const hs = et && It && et.language !== It ? ds(et, It) : null, Ka = et && hs && It && !et.translations[It] ? Object.assign([...ue], { [v.idx]: { ...et, translations: { ...et.translations, [It]: hs } } }) : ue, wn = et ? La(Ka, v.idx, It) : [], kn = Te ? Te === "on" : !u || re.on || !Qe || Qe === K, fs = kn ? Ui(v, v.idx, wn) : null, Ms = wn.map((j, pe) => ({ t: j.text, sp: pe < wn.length - 1 ? " " : "", dim: fs != null && pe > fs })), Ln = me ? me === "on" : u ? !1 :
|
|
6282
|
+
const hs = et && It && et.language !== It ? ds(et, It) : null, Ka = et && hs && It && !et.translations[It] ? Object.assign([...ue], { [v.idx]: { ...et, translations: { ...et.translations, [It]: hs } } }) : ue, wn = et ? La(Ka, v.idx, It) : [], kn = Te ? Te === "on" : !u || re.on || !Qe || Qe === K, fs = kn ? Ui(v, v.idx, wn) : null, Ms = wn.map((j, pe) => ({ t: j.text, sp: pe < wn.length - 1 ? " " : "", dim: fs != null && pe > fs })), Ln = me ? me === "on" : u ? !1 : tc(ce, ue, L == null ? void 0 : L.settings), gs = { lang: ee, subtitles: Se, speakerLabels: Ln, wordHighlight: kn, translateAudio: ve, voices: $e ? "cloned" : "synthetic", removeBackground: B }, Ja = JSON.stringify(gs), jn = w(t.onSettingsChange);
|
|
6281
6283
|
jn.current = t.onSettingsChange, x(() => {
|
|
6282
6284
|
var j;
|
|
6283
6285
|
(j = jn.current) == null || j.call(jn, gs);
|
|
@@ -6328,8 +6330,8 @@ function md(t) {
|
|
|
6328
6330
|
}, []);
|
|
6329
6331
|
const vs = w(t.onPlayback);
|
|
6330
6332
|
vs.current = t.onPlayback;
|
|
6331
|
-
const ws = w(
|
|
6332
|
-
ws.current =
|
|
6333
|
+
const ws = w(ee);
|
|
6334
|
+
ws.current = ee, x(() => {
|
|
6333
6335
|
let j = "";
|
|
6334
6336
|
const pe = () => {
|
|
6335
6337
|
const We = vs.current;
|
|
@@ -6338,7 +6340,7 @@ function md(t) {
|
|
|
6338
6340
|
Dn !== j && (j = Dn, We(Nt));
|
|
6339
6341
|
};
|
|
6340
6342
|
pe();
|
|
6341
|
-
const Re = window.setInterval(pe,
|
|
6343
|
+
const Re = window.setInterval(pe, gd);
|
|
6342
6344
|
return () => window.clearInterval(Re);
|
|
6343
6345
|
}, []);
|
|
6344
6346
|
const no = () => t.onShare ? t.onShare() : Gr(Ns(null), qe, () => {
|
|
@@ -6356,15 +6358,15 @@ function md(t) {
|
|
|
6356
6358
|
/* @__PURE__ */ i("div", { className: "srow__t", children: pe }),
|
|
6357
6359
|
/* @__PURE__ */ i("div", { className: "srow__s", children: Re })
|
|
6358
6360
|
] }),
|
|
6359
|
-
/* @__PURE__ */ i(oe, { d: Nt ?
|
|
6361
|
+
/* @__PURE__ */ i(oe, { d: Nt ? J.check : J.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: Nt ? "var(--brand)" : "var(--ink-62)" } })
|
|
6360
6362
|
] });
|
|
6361
6363
|
}, ro = /* @__PURE__ */ m("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
|
|
6362
6364
|
" ",
|
|
6363
6365
|
/* @__PURE__ */ m("button", { type: "button", onClick: () => C("main"), "aria-label": "Back", style: { position: "absolute", left: -6, top: "50%", transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", gap: 2, padding: "4px 6px 4px 0", border: 0, background: "none", color: "var(--ink-96)", fontFamily: "var(--vs-font-sans)", fontSize: 15, fontWeight: 600, letterSpacing: 0, lineHeight: 1, whiteSpace: "nowrap", cursor: "pointer" }, children: [
|
|
6364
|
-
/* @__PURE__ */ i(oe, { d:
|
|
6366
|
+
/* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 18, sw: 1.8 }),
|
|
6365
6367
|
"Back"
|
|
6366
6368
|
] })
|
|
6367
|
-
] }), bn = /* @__PURE__ */ i(oe, { d:
|
|
6369
|
+
] }), bn = /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), so = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[k], On = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, pr = u ? /* @__PURE__ */ i(nn, { open: V, onClose: () => I(!1), title: so, titleNode: k === "main" ? void 0 : ro, doneLabel: Jt.done, kind: k === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(Or, { children: k === "lang" ? /* @__PURE__ */ m("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
6368
6370
|
/* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: rs.search }),
|
|
6369
6371
|
rs.list
|
|
6370
6372
|
] }) : k === "subs" ? /* @__PURE__ */ m("div", { style: On, children: [
|
|
@@ -6393,9 +6395,9 @@ function md(t) {
|
|
|
6393
6395
|
/* @__PURE__ */ m("div", { className: "srow", children: [
|
|
6394
6396
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
6395
6397
|
/* @__PURE__ */ i("div", { className: "srow__t", children: "Translate audio" }),
|
|
6396
|
-
/* @__PURE__ */ i("div", { className: "srow__s", children:
|
|
6398
|
+
/* @__PURE__ */ i("div", { className: "srow__s", children: ee ? er ? "Hear the translation read aloud instead of the original speech" : re.canSpeak ? "Not available right now" : "Not available in this language" : "Pick a language to hear the translation read aloud" })
|
|
6397
6399
|
] }),
|
|
6398
|
-
/* @__PURE__ */ i(Lt, { checked: ir, onChange: Ee, label: "Translate audio", disabled: !er || !
|
|
6400
|
+
/* @__PURE__ */ i(Lt, { checked: ir, onChange: Ee, label: "Translate audio", disabled: !er || !ee })
|
|
6399
6401
|
] }),
|
|
6400
6402
|
ir && re.hasClone && /* @__PURE__ */ m("div", { className: "srow", children: [
|
|
6401
6403
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
@@ -6407,7 +6409,7 @@ function md(t) {
|
|
|
6407
6409
|
/* @__PURE__ */ m("div", { className: "srow", children: [
|
|
6408
6410
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
6409
6411
|
/* @__PURE__ */ i("div", { className: "srow__t", children: Hn }),
|
|
6410
|
-
/* @__PURE__ */ i("div", { className: "srow__s", children:
|
|
6412
|
+
/* @__PURE__ */ i("div", { className: "srow__s", children: wl(B, sr, "video", re.on ? 0 : nr.untilS) })
|
|
6411
6413
|
] }),
|
|
6412
6414
|
/* @__PURE__ */ i(Lt, { checked: B && lt, onChange: F, label: Hn, disabled: !lt || sr === "unavailable" && !B })
|
|
6413
6415
|
] })
|
|
@@ -6418,7 +6420,7 @@ function md(t) {
|
|
|
6418
6420
|
Ue.can && D.language && /* @__PURE__ */ m("div", { className: "srow srow--tap", role: "button", onClick: () => C("lang"), children: [
|
|
6419
6421
|
/* @__PURE__ */ m("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
6420
6422
|
/* @__PURE__ */ i("div", { className: "srow__t", children: "Language" }),
|
|
6421
|
-
/* @__PURE__ */ i("div", { className: "srow__s", children:
|
|
6423
|
+
/* @__PURE__ */ i("div", { className: "srow__s", children: ee ? `Translated to ${Ue.label ?? ee.toUpperCase()}` : "Original language" })
|
|
6422
6424
|
] }),
|
|
6423
6425
|
/* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ue.flag }),
|
|
6424
6426
|
bn
|
|
@@ -6458,12 +6460,12 @@ function md(t) {
|
|
|
6458
6460
|
] }),
|
|
6459
6461
|
/* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ue.flag }),
|
|
6460
6462
|
re.original ? null : /* @__PURE__ */ i("span", { style: { fontSize: 14, fontWeight: 600, color: "var(--ink-96)" }, children: Ue.label }),
|
|
6461
|
-
/* @__PURE__ */ i(oe, { d:
|
|
6463
|
+
/* @__PURE__ */ i(oe, { d: J.chevronRight, size: 15, style: { color: "var(--ink-45)" } })
|
|
6462
6464
|
] }),
|
|
6463
6465
|
/* @__PURE__ */ i("div", { className: "sdiv" })
|
|
6464
6466
|
] }),
|
|
6465
6467
|
t.settingsExtra
|
|
6466
|
-
] }) }), _t = te &&
|
|
6468
|
+
] }) }), _t = te && Ht && (!!Be || u) && /* @__PURE__ */ i(
|
|
6467
6469
|
ba,
|
|
6468
6470
|
{
|
|
6469
6471
|
page: (t.layout ?? "embed") === "page",
|
|
@@ -6475,7 +6477,7 @@ function md(t) {
|
|
|
6475
6477
|
cc: D.subtitles ? { on: Se, onToggle: () => we((j) => !j) } : void 0,
|
|
6476
6478
|
noFull: !D.fullscreen,
|
|
6477
6479
|
ad: qn,
|
|
6478
|
-
wait: nt && !tr ? /* @__PURE__ */ i(
|
|
6480
|
+
wait: nt && !tr ? /* @__PURE__ */ i(hu, { state: nt, line: yt ? Ms.map((j) => j.t + j.sp).join("") : null, onRetry: Va, onOriginal: Ba }) : v.edgeWait ? `Transcribing ${Math.round(U)}% — it plays on as more is written` : null,
|
|
6479
6481
|
pct: ge ? Math.round(U) : null,
|
|
6480
6482
|
sub: Se && et ? { who: zn ? Hr(ce, et.speaker) : null, color: zn ? zn.fg ?? `var(--lane-${zn.lane})` : "#fff", words: Ms, cursor: Ui(v, v.idx, wn) } : null,
|
|
6481
6483
|
chip: or(s ? ar : { ...ar, width: 64, padding: "0 6px" }, s ? void 0 : "sm"),
|
|
@@ -6490,17 +6492,17 @@ function md(t) {
|
|
|
6490
6492
|
re.closePicker(), I((j) => !j);
|
|
6491
6493
|
} : void 0,
|
|
6492
6494
|
compact: !!t.compact,
|
|
6493
|
-
paused: { title: qe, summary:
|
|
6495
|
+
paused: { title: qe, summary: Bt.state === "ready" ? Bt.summary ?? null : null, share: D.share && (t.shareUrl || !t.onShare) ? { url: Ns, at: v.t } : null },
|
|
6494
6496
|
copied: Xa ? /* @__PURE__ */ m("div", { className: "gfull__toast", "aria-live": "polite", children: [
|
|
6495
|
-
/* @__PURE__ */ i(oe, { d:
|
|
6497
|
+
/* @__PURE__ */ i(oe, { d: J.check, size: 13, sw: 2 }),
|
|
6496
6498
|
"Link copied"
|
|
6497
6499
|
] }) : pn ? /* @__PURE__ */ m("div", { className: "gfull__toast gfull__soundtip", "aria-live": "polite", children: [
|
|
6498
|
-
/* @__PURE__ */ i(oe, { d:
|
|
6500
|
+
/* @__PURE__ */ i(oe, { d: J.volumeOff, size: 14, sw: 1.8 }),
|
|
6499
6501
|
"Tap for sound"
|
|
6500
6502
|
] }) : ns ? /* @__PURE__ */ m("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
|
|
6501
6503
|
/* @__PURE__ */ i(Mt, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
|
|
6502
6504
|
ns
|
|
6503
|
-
] }) : re.on && (Xe ?
|
|
6505
|
+
] }) : re.on && (Xe ? $t.missing != null : v.silent) ? /* @__PURE__ */ m("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
|
|
6504
6506
|
/* @__PURE__ */ i(Mt, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
|
|
6505
6507
|
`${Tn || "Translated"} voice is still being prepared · playing with subtitles`
|
|
6506
6508
|
] }) : null,
|
|
@@ -6508,13 +6510,13 @@ function md(t) {
|
|
|
6508
6510
|
dn(!0), Jn();
|
|
6509
6511
|
},
|
|
6510
6512
|
onClose: u ? void 0 : () => {
|
|
6511
|
-
dn(!1),
|
|
6513
|
+
dn(!1), X(!1);
|
|
6512
6514
|
}
|
|
6513
6515
|
}
|
|
6514
6516
|
);
|
|
6515
6517
|
x(() => {
|
|
6516
|
-
!u && te && !
|
|
6517
|
-
}, [u, te,
|
|
6518
|
+
!u && te && !Ht && (dn(!1), X(!1));
|
|
6519
|
+
}, [u, te, Ht]);
|
|
6518
6520
|
const Ls = ge && /* @__PURE__ */ m("div", { className: `pubprog${s ? " pubprog--desk" : ""}${f ? " pubprog--find" : ""}`, children: [
|
|
6519
6521
|
/* @__PURE__ */ m("div", { className: "pubprog__row", children: [
|
|
6520
6522
|
/* @__PURE__ */ i("span", { className: "l", children: `TRANSCRIBING ${U}%` }),
|
|
@@ -6523,20 +6525,20 @@ function md(t) {
|
|
|
6523
6525
|
/* @__PURE__ */ i("span", { className: "s", children: on })
|
|
6524
6526
|
] }),
|
|
6525
6527
|
!s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
|
|
6526
|
-
] }), yr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), js = /* @__PURE__ */ i(
|
|
6528
|
+
] }), yr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), js = /* @__PURE__ */ i(Ou, { model: ce, rows: ue, player: zt ? v : { ...v, playRow: v.seekRow }, tail: an, tailFg: ut, running: ge, desk: s, feedRef: Pt, listener: !0, showLabels: Ln, find: T, findOpen: !s && f, lang: Qe, warm: R, onVisible: Et, wordHl: kn }), Nr = /* @__PURE__ */ i(Ic, { error: d ?? Z ?? (Xn && te ? null : v.error) ?? re.error, onClose: () => {
|
|
6527
6529
|
h(null), Ne(), v.clearError(), re.clearError();
|
|
6528
6530
|
} }), zs = [$ ? Ot($) : null, K ? K.toUpperCase() : null, se || "Read-only copy"].filter(Boolean).join(" · "), Is = (j) => /* @__PURE__ */ i("div", { className: "ctrans", children: re.noVoice ? re.noVoiceNote : /* @__PURE__ */ m(xe, { children: [
|
|
6529
6531
|
/* @__PURE__ */ m("div", { className: "ctrans__row", children: [
|
|
6530
6532
|
/* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
|
|
6531
6533
|
/* @__PURE__ */ m("div", { className: "ctrans__mid", children: [
|
|
6532
|
-
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: v.idx <= 0 ? 0.3 : 1 }, onClick: v.prev, children: /* @__PURE__ */ i(oe, { d:
|
|
6533
|
-
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": re.relang ? "Preparing audio" : v.playing ? "Pause" : "Play", title: re.relang ? "Preparing audio…" : re.playTitle ?? (v.playing ? "Pause" : "Play"), disabled: !St, onClick: v.toggle, children: re.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: v.playing ? void 0 : { marginLeft: 2 }, children: v.playing ?
|
|
6534
|
-
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: v.idx >= ue.length - 1 ? 0.3 : 1 }, onClick: v.next, children: /* @__PURE__ */ i(oe, { d:
|
|
6534
|
+
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: v.idx <= 0 ? 0.3 : 1 }, onClick: v.prev, children: /* @__PURE__ */ i(oe, { d: J.chevronLeft, size: 16, sw: 1.8 }) }),
|
|
6535
|
+
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": re.relang ? "Preparing audio" : v.playing ? "Pause" : "Play", title: re.relang ? "Preparing audio…" : re.playTitle ?? (v.playing ? "Pause" : "Play"), disabled: !St, onClick: v.toggle, children: re.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: v.playing ? void 0 : { marginLeft: 2 }, children: v.playing ? Mu : gu }) }),
|
|
6536
|
+
/* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: v.idx >= ue.length - 1 ? 0.3 : 1 }, onClick: v.next, children: /* @__PURE__ */ i(oe, { d: J.chevronRight, size: 16, sw: 1.8 }) })
|
|
6535
6537
|
] }),
|
|
6536
6538
|
/* @__PURE__ */ i("span", { className: "ctrans__mute", children: Nn(36) })
|
|
6537
6539
|
] }),
|
|
6538
6540
|
/* @__PURE__ */ i("div", { className: "ctrans__scrub", children: Ya(j) })
|
|
6539
|
-
] }) }), io =
|
|
6541
|
+
] }) }), io = Xc("ga", { tabs: Xt, cur: M, pref: (Ti = Xt[0]) == null ? void 0 : Ti.key, onPick: g }), bs = Math.max(0, Math.min(100, Math.round(U))), ao = Ye && /* @__PURE__ */ m("div", { className: "gfull gfull--hold", "data-theme": "dark", role: "status", "aria-live": "polite", children: [
|
|
6540
6542
|
Be && /* @__PURE__ */ i("div", { className: "gfull__holdbg", style: { backgroundImage: `url(https://i.ytimg.com/vi/${Be}/hqdefault.jpg)` } }),
|
|
6541
6543
|
/* @__PURE__ */ i("div", { className: "gfull__hold", children: n ? /* @__PURE__ */ m(xe, { children: [
|
|
6542
6544
|
qe && /* @__PURE__ */ i("div", { className: "gfull__holdt", children: qe }),
|
|
@@ -6557,12 +6559,12 @@ function md(t) {
|
|
|
6557
6559
|
x(() => {
|
|
6558
6560
|
Sn || Cn(!1);
|
|
6559
6561
|
}, [Sn]);
|
|
6560
|
-
const oo = t.endCard !== !1 && Sn && !xs && /* @__PURE__ */ i(
|
|
6562
|
+
const oo = t.endCard !== !1 && Sn && !xs && /* @__PURE__ */ i(Ju, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => Cn(!0), onReplay: () => {
|
|
6561
6563
|
Cn(!0), tt.current = !0, v.seekFrac ? v.seekFrac(0) : v.seekRow(0), v.playing || v.toggle();
|
|
6562
6564
|
} }), lo = t.endCard !== !1 && Sn && xs && /* @__PURE__ */ m("button", { type: "button", className: "vsp-endpill", onClick: (j) => {
|
|
6563
6565
|
j.stopPropagation(), Cn(!1);
|
|
6564
6566
|
}, children: [
|
|
6565
|
-
/* @__PURE__ */ i(oe, { d:
|
|
6567
|
+
/* @__PURE__ */ i(oe, { d: J.link, size: 15, sw: 1.8 }),
|
|
6566
6568
|
"Transcribe a video"
|
|
6567
6569
|
] });
|
|
6568
6570
|
if (u) return /* @__PURE__ */ m(xe, { children: [
|
|
@@ -6572,11 +6574,11 @@ function md(t) {
|
|
|
6572
6574
|
Nr
|
|
6573
6575
|
] });
|
|
6574
6576
|
if (s) {
|
|
6575
|
-
const j = zt && !
|
|
6577
|
+
const j = zt && !Ht && !r && /* @__PURE__ */ i("div", { className: "pubdeskctl", children: Is(!0) }), pe = !r && (Xt.length > 0 || Ht || !!re.sidePanel || !!j);
|
|
6576
6578
|
return /* @__PURE__ */ m(xe, { children: [
|
|
6577
6579
|
/* @__PURE__ */ i("div", { className: "dhead dhead--listener dhead--cols", children: /* @__PURE__ */ m("div", { className: "gcolhead", children: [
|
|
6578
6580
|
/* @__PURE__ */ i("div", { className: "gcolhead__main", children: /* @__PURE__ */ m("div", { className: "gcolhead__col", children: [
|
|
6579
|
-
/* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(
|
|
6581
|
+
/* @__PURE__ */ i("div", { style: { flex: "none" }, children: /* @__PURE__ */ i(Pr, { dark: a, height: 20.38 }) }),
|
|
6580
6582
|
!r && /* @__PURE__ */ m("div", { className: "dhead__session", children: [
|
|
6581
6583
|
/* @__PURE__ */ i("span", { className: "t", children: n ? qe : "" }),
|
|
6582
6584
|
/* @__PURE__ */ i("span", { className: "s", children: n ? zs : "" })
|
|
@@ -6596,10 +6598,10 @@ function md(t) {
|
|
|
6596
6598
|
Xr
|
|
6597
6599
|
] })
|
|
6598
6600
|
] }),
|
|
6599
|
-
pe && /* @__PURE__ */ m(
|
|
6601
|
+
pe && /* @__PURE__ */ m(nu, { id: "ga", className: "listenerside", gap: 20, plain: !0, children: [
|
|
6600
6602
|
!re.sidePanel && j,
|
|
6601
6603
|
!re.sidePanel && us,
|
|
6602
|
-
!re.sidePanel && Xt.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i(
|
|
6604
|
+
!re.sidePanel && Xt.length > 0 && /* @__PURE__ */ i("div", { "data-panel-grid": "", className: "listenerside__panels", children: /* @__PURE__ */ i(eu, { col: io, order: ["summary", "export"], onPick: g, grip: { summary: 40, export: 28 }, render: (Re) => /* @__PURE__ */ i(vi, { panel: !0, children: es(Re) }) }) }),
|
|
6603
6605
|
re.sidePanel
|
|
6604
6606
|
] })
|
|
6605
6607
|
] }),
|
|
@@ -6614,7 +6616,7 @@ function md(t) {
|
|
|
6614
6616
|
M !== "none" && es(M)
|
|
6615
6617
|
] }) });
|
|
6616
6618
|
return /* @__PURE__ */ m(xe, { children: [
|
|
6617
|
-
/* @__PURE__ */ i(
|
|
6619
|
+
/* @__PURE__ */ i(Qu, { dark: a, title: n ? qe : "", subline: n ? zs : "", onOptions: () => I(!0), optionsActive: V }),
|
|
6618
6620
|
yr,
|
|
6619
6621
|
Ls,
|
|
6620
6622
|
!r && co,
|
|
@@ -6625,7 +6627,7 @@ function md(t) {
|
|
|
6625
6627
|
p && /* @__PURE__ */ i("div", { className: "txflash", children: p })
|
|
6626
6628
|
] }),
|
|
6627
6629
|
!r && /* @__PURE__ */ m("div", { className: "gbottom", "data-transport": "1", children: [
|
|
6628
|
-
zt && !
|
|
6630
|
+
zt && !Ht && /* @__PURE__ */ i("div", { className: "pubctl", children: Is(!1) }),
|
|
6629
6631
|
/* @__PURE__ */ m("div", { className: "gbottom__bar", children: [
|
|
6630
6632
|
Ue.can && /* @__PURE__ */ i("div", { style: { flex: "none" }, children: or({ width: 87 }, void 0) }),
|
|
6631
6633
|
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: Xr })
|
|
@@ -6637,7 +6639,7 @@ function md(t) {
|
|
|
6637
6639
|
Nr
|
|
6638
6640
|
] });
|
|
6639
6641
|
}
|
|
6640
|
-
function
|
|
6642
|
+
function yd(t) {
|
|
6641
6643
|
const [e, n] = z(null);
|
|
6642
6644
|
return x(() => {
|
|
6643
6645
|
if (!t || (e == null ? void 0 : e.url) === t && e.ok) return;
|
|
@@ -6652,64 +6654,64 @@ function pd(t) {
|
|
|
6652
6654
|
};
|
|
6653
6655
|
}, [t, (e == null ? void 0 : e.url) === t && (e == null ? void 0 : e.ok)]), !t || (e == null ? void 0 : e.url) !== t ? "unknown" : e.ok ? "yes" : "no";
|
|
6654
6656
|
}
|
|
6655
|
-
function
|
|
6657
|
+
function xd({ site: t, size: e = 16, tinted: n = !1, style: r, className: s }) {
|
|
6656
6658
|
return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: e, height: e, "aria-hidden": "true", className: s, style: { flex: "none", display: "block", color: n ? t.color : void 0, ...r }, children: /* @__PURE__ */ i("path", { d: t.glyph, fill: "currentColor", fillRule: "evenodd" }) });
|
|
6657
6659
|
}
|
|
6658
6660
|
export {
|
|
6659
|
-
|
|
6661
|
+
Wc as ExportPanel,
|
|
6660
6662
|
ba as FullVideo,
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6663
|
+
Ru as MiniPlayer,
|
|
6664
|
+
mu as MuteButton,
|
|
6665
|
+
ju as NO_SEEK,
|
|
6666
|
+
Mu as PAUSE_D,
|
|
6667
|
+
gu as PLAY_D,
|
|
6668
|
+
Iu as PUB_SIDE,
|
|
6669
|
+
bd as PanelSeek,
|
|
6670
|
+
rc as PlayerApiProvider,
|
|
6669
6671
|
Hn as REMOVE_BG_LABEL,
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
+
Tl as REMOVE_BG_NOTE,
|
|
6673
|
+
bc as ReplayScrub,
|
|
6672
6674
|
ia as SITES,
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6675
|
+
xd as SiteIcon,
|
|
6676
|
+
_c as SpeakerCast,
|
|
6677
|
+
Gc as SummaryPanel,
|
|
6678
|
+
Id as Transport,
|
|
6679
|
+
xu as TxFind,
|
|
6680
|
+
Ou as TxLines,
|
|
6681
|
+
Od as VocalStackPlayer,
|
|
6682
|
+
Yc as VoiceSheetBody,
|
|
6683
|
+
fu as YtFollow,
|
|
6684
|
+
wl as bedNote,
|
|
6683
6685
|
dn as browserFull,
|
|
6684
|
-
|
|
6686
|
+
Jo as hasEmbed,
|
|
6685
6687
|
Wo as hostOfUrl,
|
|
6686
|
-
|
|
6688
|
+
Zt as lineEnd,
|
|
6687
6689
|
La as lineWords,
|
|
6688
6690
|
bt as pictureT,
|
|
6689
6691
|
Rn as placePosition,
|
|
6690
6692
|
Pn as realFull,
|
|
6691
|
-
|
|
6693
|
+
jd as setErrorReporter,
|
|
6692
6694
|
Ri as setFullTarget,
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6695
|
+
zd as siteById,
|
|
6696
|
+
Yt as siteOf,
|
|
6697
|
+
lu as snapPosition,
|
|
6698
|
+
el as sourceVideoUrl,
|
|
6697
6699
|
Ui as spokenWordOf,
|
|
6698
|
-
|
|
6700
|
+
kl as trackPlan,
|
|
6699
6701
|
fa as useApi,
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6702
|
+
Qc as useArchiveVoice,
|
|
6703
|
+
Sl as useBackgroundBed,
|
|
6704
|
+
vu as useDuck,
|
|
6705
|
+
Cu as useFindPull,
|
|
6706
|
+
pu as useFlash,
|
|
6705
6707
|
Gt as usePlayerApi,
|
|
6706
6708
|
la as useSeparatedTrack,
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6709
|
+
Fc as useSummaryIn,
|
|
6710
|
+
Mc as useTranscript,
|
|
6711
|
+
ku as useTxPlayer,
|
|
6712
|
+
bu as useTxVoice,
|
|
6713
|
+
Sc as useViewportTranslation,
|
|
6714
|
+
Rc as useVoiceCatalogue,
|
|
6715
|
+
wu as useYtLead
|
|
6714
6716
|
};
|
|
6715
6717
|
//# sourceMappingURL=index.js.map
|