@44-audio/components 0.1.0-dev.20 → 0.1.0-dev.21
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/player.es.js +977 -980
- package/package.json +5 -1
package/dist/player.es.js
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { b as Ke, E as
|
|
2
|
-
function Ae(g,
|
|
3
|
-
var
|
|
1
|
+
import { b as Ke, E as ot, a as Xe, d as wt, n as xt, h as qe, c as Ze, e as at, i as kt, f as _t, s as zt, g as nt, j as Fe, k as it, U as Pt, p as lt, l as ue, m as ge, o as d, u as de, q as e, r as S, t as Lt, v as se, w as te, x as k, y as ye, z as m, A as et, B as q, C as v, D as J, F as X, G as Pe, H as M, I as W, J as he, K as we, L as K, M as D, N as tt, O as Ee, P as Se, Q as me, R as We, S as pe, T as He, V as ie, W as Et, X as Le, Y as It, Z as st, _ as Be, $ as ut, a0 as Ne, a1 as Ce, a2 as Re, a3 as Z } from "./index-DCaqXYMO.js";
|
|
2
|
+
function Ae(g, t, ...u) {
|
|
3
|
+
var a = g, n = xt, o;
|
|
4
4
|
Ke(() => {
|
|
5
|
-
|
|
5
|
+
n !== (n = t()) && (o && (wt(o), o = null), o = Xe(() => (
|
|
6
6
|
/** @type {SnippetFn} */
|
|
7
|
-
a
|
|
7
|
+
n(a, ...u)
|
|
8
8
|
)));
|
|
9
|
-
},
|
|
9
|
+
}, ot), qe && (a = Ze);
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
-
var
|
|
11
|
+
function Ct(g, t, u) {
|
|
12
|
+
qe && at();
|
|
13
|
+
var a = g, n = Pt, o, l, s = null, y = kt() ? _t : zt;
|
|
14
14
|
function h() {
|
|
15
|
-
o &&
|
|
15
|
+
o && lt(o), s !== null && (s.lastChild.remove(), a.before(s), s = null), o = l;
|
|
16
16
|
}
|
|
17
17
|
Ke(() => {
|
|
18
|
-
if (y(
|
|
19
|
-
var
|
|
20
|
-
x && (
|
|
18
|
+
if (y(n, n = t())) {
|
|
19
|
+
var c = a, x = it();
|
|
20
|
+
x && (s = document.createDocumentFragment(), s.append(c = nt())), l = Xe(() => u(c)), x ? Fe.add_callback(h) : h();
|
|
21
21
|
}
|
|
22
|
-
}),
|
|
22
|
+
}), qe && (a = Ze);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
var
|
|
24
|
+
function Rt(g, t, u) {
|
|
25
|
+
qe && at();
|
|
26
|
+
var a = g, n, o, l = null, s = null;
|
|
27
27
|
function y() {
|
|
28
|
-
o && (
|
|
28
|
+
o && (lt(o), o = null), l && (l.lastChild.remove(), a.before(l), l = null), o = s, s = null;
|
|
29
29
|
}
|
|
30
30
|
Ke(() => {
|
|
31
|
-
if (
|
|
32
|
-
var h =
|
|
33
|
-
if (
|
|
34
|
-
var
|
|
35
|
-
h && (
|
|
31
|
+
if (n !== (n = t())) {
|
|
32
|
+
var h = it();
|
|
33
|
+
if (n) {
|
|
34
|
+
var c = a;
|
|
35
|
+
h && (l = document.createDocumentFragment(), l.append(c = nt()), o && Fe.skipped_effects.add(o)), s = Xe(() => u(c, n));
|
|
36
36
|
}
|
|
37
37
|
h ? Fe.add_callback(y) : y();
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, ot), qe && (a = Ze);
|
|
40
40
|
}
|
|
41
41
|
const Oe = {
|
|
42
42
|
delay: 0
|
|
43
43
|
};
|
|
44
44
|
typeof window < "u" && (window.__44_dev = Oe);
|
|
45
|
-
function
|
|
46
|
-
return new Promise((
|
|
45
|
+
function Tt(g) {
|
|
46
|
+
return new Promise((t) => setTimeout(t, g));
|
|
47
47
|
}
|
|
48
|
-
async function
|
|
49
|
-
const
|
|
50
|
-
Oe.delay > 0 && await
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
53
|
-
throw
|
|
54
|
-
const o = await
|
|
48
|
+
async function Mt(g, t, u) {
|
|
49
|
+
const a = `https://${t}/v1/recordings/${u}/player`;
|
|
50
|
+
Oe.delay > 0 && await Tt(Oe.delay);
|
|
51
|
+
const n = await fetch(a, { signal: g });
|
|
52
|
+
if (!n.ok)
|
|
53
|
+
throw n.status === 404 ? new Error(`Recording not found: ${u}`) : new Error(`Failed to fetch recording (${n.status})`);
|
|
54
|
+
const o = await n.json();
|
|
55
55
|
if (o.status !== "ready")
|
|
56
|
-
throw new Error(`Recording not ready: ${
|
|
56
|
+
throw new Error(`Recording not ready: ${u}`);
|
|
57
57
|
return o;
|
|
58
58
|
}
|
|
59
|
-
var
|
|
60
|
-
function
|
|
61
|
-
ge(
|
|
62
|
-
const
|
|
63
|
-
let
|
|
64
|
-
const
|
|
65
|
-
waveform: e(
|
|
66
|
-
transcription: e(
|
|
67
|
-
translation: e(
|
|
68
|
-
words: e(
|
|
59
|
+
var Ht = X("<audio hidden></audio>");
|
|
60
|
+
function jt(g, t) {
|
|
61
|
+
ge(t, !0);
|
|
62
|
+
const u = t.$$host;
|
|
63
|
+
let a = d(t, "recordingId", 7), n = d(t, "apiHost", 7, "api.44.audio"), o = d(t, "preload", 7, "none"), l = S(null), s = S(null), y = S(0), h = S(0), c = S("idle"), x = null, f = null;
|
|
64
|
+
const i = q(() => ({
|
|
65
|
+
waveform: e(l)?.waveform ?? [],
|
|
66
|
+
transcription: e(l)?.transcription ?? null,
|
|
67
|
+
translation: e(l)?.translation ?? null,
|
|
68
|
+
words: e(l)?.words ?? null
|
|
69
69
|
}));
|
|
70
|
-
function
|
|
71
|
-
|
|
70
|
+
function _() {
|
|
71
|
+
u.duration = e(h), u.currentTime = e(y), u.state = e(c), u.metadata = e(i), u.setAttribute("data-state", e(c));
|
|
72
72
|
}
|
|
73
73
|
function p(b) {
|
|
74
|
-
|
|
74
|
+
_(), u.dispatchEvent(new CustomEvent(b, { bubbles: !0, composed: !0 }));
|
|
75
75
|
}
|
|
76
76
|
function w() {
|
|
77
|
-
if (!e(
|
|
78
|
-
|
|
77
|
+
if (!e(s)) {
|
|
78
|
+
f = null;
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
m(y, Math.floor(e(
|
|
81
|
+
m(y, Math.floor(e(s).currentTime * 1e3), !0), p("timeupdate"), f = requestAnimationFrame(w);
|
|
82
82
|
}
|
|
83
83
|
async function C() {
|
|
84
|
-
if (e(
|
|
85
|
-
if (!
|
|
84
|
+
if (e(c) === "idle") {
|
|
85
|
+
if (!a()) {
|
|
86
86
|
console.warn("fortyfour-recording: recording-id attribute is required");
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
x = new AbortController(), m(
|
|
89
|
+
x = new AbortController(), m(c, "loading"), p("loading");
|
|
90
90
|
try {
|
|
91
|
-
const b = await
|
|
92
|
-
m(
|
|
91
|
+
const b = await Mt(x.signal, n(), a());
|
|
92
|
+
m(l, b, !0), m(h, b.duration, !0), m(c, "ready"), p("loadedmetadata");
|
|
93
93
|
} catch (b) {
|
|
94
94
|
if (b.name === "AbortError")
|
|
95
95
|
return;
|
|
96
|
-
console.warn(`fortyfour-recording: ${b.message}`), m(
|
|
96
|
+
console.warn(`fortyfour-recording: ${b.message}`), m(c, "error"), p("error");
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
async function U() {
|
|
101
|
-
if (!e(
|
|
101
|
+
if (!e(s)) {
|
|
102
102
|
console.warn("fortyfour-recording: play() called but audio element not ready");
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
105
|
try {
|
|
106
|
-
await e(
|
|
106
|
+
await e(s).play(), m(c, "playing"), p("play"), f || w();
|
|
107
107
|
} catch (b) {
|
|
108
|
-
console.warn(`fortyfour-recording: ${b.message}`), m(
|
|
108
|
+
console.warn(`fortyfour-recording: ${b.message}`), m(c, "error"), p("error");
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (!e(
|
|
111
|
+
function G() {
|
|
112
|
+
if (!e(s)) {
|
|
113
113
|
console.warn("fortyfour-recording: pause() called but audio element not ready");
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
e(
|
|
116
|
+
e(s).pause(), m(c, "paused"), cancelAnimationFrame(f), f = null, p("pause");
|
|
117
117
|
}
|
|
118
118
|
async function F() {
|
|
119
|
-
if (e(
|
|
119
|
+
if (e(c) === "error") {
|
|
120
120
|
console.warn("fortyfour-recording: togglePlay() called while in error state");
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
e(
|
|
123
|
+
e(c) !== "loading" && (e(c) === "playing" ? G() : e(c) === "idle" ? (await C(), await et(), e(c) === "ready" && await U()) : await U());
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
if (!e(
|
|
125
|
+
function re(b) {
|
|
126
|
+
if (!e(s)) {
|
|
127
127
|
console.warn("fortyfour-recording: seek() called but audio element not ready");
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
@@ -135,35 +135,35 @@ function jr(g, r) {
|
|
|
135
135
|
console.warn("fortyfour-recording: seek() time out of range:", b, "duration:", e(h));
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
e(
|
|
138
|
+
e(s).currentTime = b / 1e3, m(y, Math.floor(b), !0), p("timeupdate");
|
|
139
139
|
}
|
|
140
140
|
async function V() {
|
|
141
|
-
cancelAnimationFrame(
|
|
141
|
+
cancelAnimationFrame(f), f = null, m(y, e(h), !0), p("timeupdate"), await et(), m(y, 0), e(s).currentTime = 0, p("timeupdate"), m(c, "ready"), p("ended");
|
|
142
142
|
}
|
|
143
143
|
function H(b) {
|
|
144
|
-
console.warn("fortyfour-recording: audio error", b.target.error), m(
|
|
144
|
+
console.warn("fortyfour-recording: audio error", b.target.error), m(c, "error"), p("error");
|
|
145
145
|
}
|
|
146
146
|
function be() {
|
|
147
|
-
x?.abort(), cancelAnimationFrame(
|
|
147
|
+
x?.abort(), cancelAnimationFrame(f), f = null, e(s)?.pause(), m(l, null), m(y, 0), m(h, 0), m(c, "idle"), I = a(), p("timeupdate");
|
|
148
148
|
}
|
|
149
|
-
let I =
|
|
149
|
+
let I = a();
|
|
150
150
|
de(() => {
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
x?.abort(), e(
|
|
151
|
+
a() !== I && be(), e(c) === "idle" && (o() === "auto" || o() === "metadata") && C();
|
|
152
|
+
}), u.togglePlay = F, u.pause = G, u.seek = re, _(), Lt(() => {
|
|
153
|
+
x?.abort(), e(s)?.pause(), cancelAnimationFrame(f);
|
|
154
154
|
});
|
|
155
155
|
var j = {
|
|
156
156
|
get recordingId() {
|
|
157
|
-
return
|
|
157
|
+
return a();
|
|
158
158
|
},
|
|
159
159
|
set recordingId(b) {
|
|
160
|
-
|
|
160
|
+
a(b), v();
|
|
161
161
|
},
|
|
162
162
|
get apiHost() {
|
|
163
|
-
return
|
|
163
|
+
return n();
|
|
164
164
|
},
|
|
165
165
|
set apiHost(b = "api.44.audio") {
|
|
166
|
-
|
|
166
|
+
n(b), v();
|
|
167
167
|
},
|
|
168
168
|
get preload() {
|
|
169
169
|
return o();
|
|
@@ -171,25 +171,25 @@ function jr(g, r) {
|
|
|
171
171
|
set preload(b = "none") {
|
|
172
172
|
o(b), v();
|
|
173
173
|
}
|
|
174
|
-
}, B = se(), ee =
|
|
175
|
-
return
|
|
176
|
-
var L = se(), Q =
|
|
174
|
+
}, B = se(), ee = te(B);
|
|
175
|
+
return Ct(ee, a, (b) => {
|
|
176
|
+
var L = se(), Q = te(L);
|
|
177
177
|
{
|
|
178
178
|
var ve = (E) => {
|
|
179
|
-
var R =
|
|
180
|
-
Pe(R, (
|
|
181
|
-
W(R, "src", e(
|
|
182
|
-
}), he("ended", R, V), he("error", R, H),
|
|
179
|
+
var R = Ht();
|
|
180
|
+
Pe(R, (r) => m(s, r), () => e(s)), M(() => {
|
|
181
|
+
W(R, "src", e(l).audioUrl), W(R, "preload", o() === "auto" ? "auto" : "none");
|
|
182
|
+
}), he("ended", R, V), he("error", R, H), k(E, R);
|
|
183
183
|
};
|
|
184
184
|
J(Q, (E) => {
|
|
185
|
-
e(
|
|
185
|
+
e(l)?.audioUrl && E(ve);
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
}),
|
|
188
|
+
k(b, L);
|
|
189
|
+
}), k(g, B), ye(j);
|
|
190
190
|
}
|
|
191
191
|
customElements.define("fortyfour-recording", ue(
|
|
192
|
-
|
|
192
|
+
jt,
|
|
193
193
|
{
|
|
194
194
|
apiHost: { attribute: "api-host", reflect: !0 },
|
|
195
195
|
recordingId: { attribute: "recording-id", reflect: !0 },
|
|
@@ -202,73 +202,73 @@ customElements.define("fortyfour-recording", ue(
|
|
|
202
202
|
function Ie(g) {
|
|
203
203
|
if (isNaN(g) || g < 0)
|
|
204
204
|
return "-:--";
|
|
205
|
-
const
|
|
206
|
-
return
|
|
205
|
+
const t = Math.floor(g / 3600), u = Math.floor(g % 3600 / 60), a = g % 60;
|
|
206
|
+
return t > 0 ? `${t}:${u.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}` : `${u}:${a.toString().padStart(2, "0")}`;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function rt(g) {
|
|
209
209
|
if (isNaN(g) || g < 0)
|
|
210
210
|
return "--";
|
|
211
|
-
const
|
|
212
|
-
return
|
|
211
|
+
const t = Math.floor(g / 1e3), u = Math.floor(t / 60), a = t % 60;
|
|
212
|
+
return u > 0 ? `${u}m ${a}s` : `${a}s`;
|
|
213
213
|
}
|
|
214
214
|
function Me(g) {
|
|
215
215
|
if (isNaN(g) || g < 0)
|
|
216
216
|
return "0 seconds";
|
|
217
|
-
const
|
|
218
|
-
return
|
|
217
|
+
const t = Math.floor(g / 1e3), u = Math.floor(t / 60), a = t % 60;
|
|
218
|
+
return u > 0 && a > 0 ? `${u} ${u === 1 ? "minute" : "minutes"} ${a} ${a === 1 ? "second" : "seconds"}` : u > 0 ? `${u} ${u === 1 ? "minute" : "minutes"}` : `${a} ${a === 1 ? "second" : "seconds"}`;
|
|
219
219
|
}
|
|
220
|
-
function Ye(g,
|
|
221
|
-
let
|
|
220
|
+
function Ye(g, t = 200) {
|
|
221
|
+
let u = S(!1);
|
|
222
222
|
return de(() => {
|
|
223
223
|
if (g()) {
|
|
224
|
-
const
|
|
225
|
-
return () => clearTimeout(
|
|
224
|
+
const a = setTimeout(() => m(u, !0), t);
|
|
225
|
+
return () => clearTimeout(a);
|
|
226
226
|
} else
|
|
227
|
-
m(
|
|
228
|
-
}), () => e(
|
|
227
|
+
m(u, !1);
|
|
228
|
+
}), () => e(u);
|
|
229
229
|
}
|
|
230
|
-
function Te(g,
|
|
230
|
+
function Te(g, t, u) {
|
|
231
231
|
de(() => {
|
|
232
|
-
|
|
232
|
+
u() ? g.setAttribute(t, "") : g.removeAttribute(t);
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
const
|
|
235
|
+
var St = X("<span><!></span>");
|
|
236
|
+
const qt = {
|
|
237
237
|
hash: "svelte-hrw77x",
|
|
238
238
|
code: `:host {--fortyfour-duration-font-family: system-ui, sans-serif;--fortyfour-duration-font-size: 14px;--fortyfour-duration-color: #1f2937;display:flex;align-items:center;justify-content:center;font-family:var(--fortyfour-duration-font-family);font-size:var(--fortyfour-duration-font-size);font-variant-numeric:tabular-nums;color:var(--fortyfour-duration-color);min-height:1lh;white-space:nowrap;}
|
|
239
239
|
|
|
240
240
|
@media (prefers-color-scheme: dark) {:host {--fortyfour-duration-color: #f3f4f6;}
|
|
241
241
|
}`
|
|
242
242
|
};
|
|
243
|
-
function
|
|
244
|
-
ge(
|
|
245
|
-
const
|
|
246
|
-
let
|
|
247
|
-
function
|
|
248
|
-
const C = Math.floor(
|
|
243
|
+
function At(g, t) {
|
|
244
|
+
ge(t, !0), we(g, qt);
|
|
245
|
+
const u = t.$$host;
|
|
246
|
+
let a = d(t, "for", 7, ""), n = d(t, "format", 7, "elapsed/total"), o = S(0), l = S(0);
|
|
247
|
+
function s(_, p, w) {
|
|
248
|
+
const C = Math.floor(_ / 1e3), U = Math.floor(p / 1e3), G = Math.max(0, U - C);
|
|
249
249
|
switch (w) {
|
|
250
250
|
case "-remaining":
|
|
251
|
-
return "-" + Ie(
|
|
251
|
+
return "-" + Ie(G);
|
|
252
252
|
case "remaining":
|
|
253
|
-
return Ie(
|
|
253
|
+
return Ie(G);
|
|
254
254
|
case "elapsed":
|
|
255
255
|
return Ie(C);
|
|
256
256
|
case "elapsed-text":
|
|
257
|
-
return
|
|
257
|
+
return rt(_);
|
|
258
258
|
case "total":
|
|
259
259
|
return Ie(U);
|
|
260
260
|
case "elapsed/total":
|
|
261
261
|
return Ie(C) + " / " + Ie(U);
|
|
262
262
|
case "remaining-text":
|
|
263
|
-
return
|
|
263
|
+
return rt(Math.max(0, p - _));
|
|
264
264
|
case "%":
|
|
265
|
-
return Math.min(100, Math.ceil(
|
|
265
|
+
return Math.min(100, Math.ceil(_ / p * 100)) + "%";
|
|
266
266
|
default:
|
|
267
267
|
return console.warn(`fortyfour-duration: invalid format "${w}"`), null;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function y(
|
|
271
|
-
switch (
|
|
270
|
+
function y(_) {
|
|
271
|
+
switch (_) {
|
|
272
272
|
case "-remaining":
|
|
273
273
|
return "-0:00";
|
|
274
274
|
case "remaining":
|
|
@@ -283,19 +283,19 @@ function Ar(g, r) {
|
|
|
283
283
|
return "0";
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
Te(
|
|
287
|
-
if (!
|
|
286
|
+
Te(u, "data-placeholder", () => e(l) === 0), de(() => {
|
|
287
|
+
if (!a()) {
|
|
288
288
|
console.warn("fortyfour-duration: for attribute is required");
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
const p =
|
|
291
|
+
const p = u.getRootNode().getElementById(a());
|
|
292
292
|
if (!p) {
|
|
293
|
-
console.warn(`fortyfour-duration: element with id "${
|
|
293
|
+
console.warn(`fortyfour-duration: element with id "${a()}" not found`);
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
m(
|
|
296
|
+
m(l, p.duration || 0, !0), m(o, p.currentTime || 0, !0);
|
|
297
297
|
function w() {
|
|
298
|
-
m(o, p.currentTime, !0), m(
|
|
298
|
+
m(o, p.currentTime, !0), m(l, p.duration, !0);
|
|
299
299
|
}
|
|
300
300
|
return p.addEventListener("loadedmetadata", w), p.addEventListener("timeupdate", w), () => {
|
|
301
301
|
p.removeEventListener("loadedmetadata", w), p.removeEventListener("timeupdate", w);
|
|
@@ -303,39 +303,39 @@ function Ar(g, r) {
|
|
|
303
303
|
});
|
|
304
304
|
var h = {
|
|
305
305
|
get for() {
|
|
306
|
-
return
|
|
306
|
+
return a();
|
|
307
307
|
},
|
|
308
|
-
set for(
|
|
309
|
-
|
|
308
|
+
set for(_ = "") {
|
|
309
|
+
a(_), v();
|
|
310
310
|
},
|
|
311
311
|
get format() {
|
|
312
|
-
return
|
|
312
|
+
return n();
|
|
313
313
|
},
|
|
314
|
-
set format(
|
|
315
|
-
|
|
314
|
+
set format(_ = "elapsed/total") {
|
|
315
|
+
n(_), v();
|
|
316
316
|
}
|
|
317
|
-
},
|
|
317
|
+
}, c = St(), x = K(c);
|
|
318
318
|
{
|
|
319
|
-
var
|
|
320
|
-
var p =
|
|
319
|
+
var f = (_) => {
|
|
320
|
+
var p = tt();
|
|
321
321
|
M((w) => Ee(p, w), [
|
|
322
|
-
() =>
|
|
323
|
-
]),
|
|
324
|
-
},
|
|
325
|
-
var p = se(), w =
|
|
326
|
-
|
|
327
|
-
var U =
|
|
328
|
-
M((
|
|
329
|
-
}),
|
|
322
|
+
() => s(e(o), e(l), n())
|
|
323
|
+
]), k(_, p);
|
|
324
|
+
}, i = (_) => {
|
|
325
|
+
var p = se(), w = te(p);
|
|
326
|
+
Se(w, t, "placeholder", {}, (C) => {
|
|
327
|
+
var U = tt();
|
|
328
|
+
M((G) => Ee(U, G), [() => y(n())]), k(C, U);
|
|
329
|
+
}), k(_, p);
|
|
330
330
|
};
|
|
331
|
-
J(x, (
|
|
332
|
-
e(
|
|
331
|
+
J(x, (_) => {
|
|
332
|
+
e(l) !== 0 ? _(f) : _(i, !1);
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
|
-
return D(
|
|
335
|
+
return D(c), k(g, c), ye(h);
|
|
336
336
|
}
|
|
337
337
|
customElements.define("fortyfour-duration", ue(
|
|
338
|
-
|
|
338
|
+
At,
|
|
339
339
|
{
|
|
340
340
|
for: { attribute: "for", reflect: !0 },
|
|
341
341
|
format: { attribute: "format", reflect: !0 }
|
|
@@ -344,8 +344,8 @@ customElements.define("fortyfour-duration", ue(
|
|
|
344
344
|
[],
|
|
345
345
|
!0
|
|
346
346
|
));
|
|
347
|
-
var
|
|
348
|
-
const
|
|
347
|
+
var Bt = X('<div part="ring" class="ring-progress svelte-qaqt0h"><div class="ring-inner svelte-qaqt0h"></div></div>');
|
|
348
|
+
const Nt = {
|
|
349
349
|
hash: "svelte-qaqt0h",
|
|
350
350
|
code: `.ring-progress.svelte-qaqt0h {position:absolute;inset:0;z-index:0;border-radius:inherit;pointer-events:none;background:conic-gradient(
|
|
351
351
|
from 0deg,
|
|
@@ -353,23 +353,23 @@ const Nr = {
|
|
|
353
353
|
var(--fortyfour-play-button-ring-track-color) var(--progress-deg)
|
|
354
354
|
);}.ring-inner.svelte-qaqt0h {position:absolute;inset:var(--fortyfour-play-button-ring-width);border-radius:inherit;background:var(--fortyfour-play-button-background-color);}`
|
|
355
355
|
};
|
|
356
|
-
function Ve(g,
|
|
357
|
-
ge(
|
|
358
|
-
let
|
|
359
|
-
const
|
|
360
|
-
var
|
|
356
|
+
function Ve(g, t) {
|
|
357
|
+
ge(t, !0), we(g, Nt);
|
|
358
|
+
let u = d(t, "progress", 7, 0);
|
|
359
|
+
const a = q(() => u() * 360);
|
|
360
|
+
var n = {
|
|
361
361
|
get progress() {
|
|
362
|
-
return
|
|
362
|
+
return u();
|
|
363
363
|
},
|
|
364
|
-
set progress(
|
|
365
|
-
|
|
364
|
+
set progress(l = 0) {
|
|
365
|
+
u(l), v();
|
|
366
366
|
}
|
|
367
|
-
}, o =
|
|
368
|
-
return M(() => me(o, `--progress-deg: ${e(
|
|
367
|
+
}, o = Bt();
|
|
368
|
+
return M(() => me(o, `--progress-deg: ${e(a) ?? ""}deg`)), k(g, o), ye(n);
|
|
369
369
|
}
|
|
370
370
|
ue(Ve, { progress: {} }, [], [], !0);
|
|
371
|
-
var
|
|
372
|
-
const
|
|
371
|
+
var Wt = X('<div part="ripple" class="ripple ripple-small svelte-lgp3pt"></div>'), Dt = X('<div part="ripple" class="ripple ripple-medium svelte-lgp3pt"></div>'), Ut = X('<div part="ripple" class="ripple ripple-large svelte-lgp3pt"></div>'), Ft = X("<!> <!> <!>", 1);
|
|
372
|
+
const Ot = {
|
|
373
373
|
hash: "svelte-lgp3pt",
|
|
374
374
|
code: `.ripple.svelte-lgp3pt {position:absolute;inset:0;border-radius:inherit;border:2px solid var(--fortyfour-play-button-background-color);pointer-events:none;
|
|
375
375
|
animation: ripple 1.5s ease-out infinite;}.ripple-small.svelte-lgp3pt {
|
|
@@ -414,104 +414,104 @@ const Or = {
|
|
|
414
414
|
animation: none;}
|
|
415
415
|
}`
|
|
416
416
|
};
|
|
417
|
-
function Je(g,
|
|
418
|
-
ge(
|
|
419
|
-
let
|
|
420
|
-
function
|
|
417
|
+
function Je(g, t) {
|
|
418
|
+
ge(t, !0), we(g, Ot);
|
|
419
|
+
let u = d(t, "isPlaying", 7, !1), a = d(t, "amplitude", 7, 0), n = d(t, "intensity", 7, 1), o = S(We({ small: !1, medium: !1, large: !1 }));
|
|
420
|
+
function l(w) {
|
|
421
421
|
return w < 33 ? "small" : w < 66 ? "medium" : "large";
|
|
422
422
|
}
|
|
423
423
|
de(() => {
|
|
424
|
-
if (!
|
|
424
|
+
if (!u()) {
|
|
425
425
|
m(o, { small: !1, medium: !1, large: !1 }, !0);
|
|
426
426
|
return;
|
|
427
427
|
}
|
|
428
|
-
const w =
|
|
428
|
+
const w = l(a());
|
|
429
429
|
e(o)[w] || (e(o)[w] = !0);
|
|
430
430
|
});
|
|
431
|
-
function
|
|
431
|
+
function s(w) {
|
|
432
432
|
e(o)[w] = !1;
|
|
433
433
|
}
|
|
434
434
|
var y = {
|
|
435
435
|
get isPlaying() {
|
|
436
|
-
return
|
|
436
|
+
return u();
|
|
437
437
|
},
|
|
438
438
|
set isPlaying(w = !1) {
|
|
439
|
-
|
|
439
|
+
u(w), v();
|
|
440
440
|
},
|
|
441
441
|
get amplitude() {
|
|
442
|
-
return
|
|
442
|
+
return a();
|
|
443
443
|
},
|
|
444
444
|
set amplitude(w = 0) {
|
|
445
|
-
|
|
445
|
+
a(w), v();
|
|
446
446
|
},
|
|
447
447
|
get intensity() {
|
|
448
|
-
return
|
|
448
|
+
return n();
|
|
449
449
|
},
|
|
450
450
|
set intensity(w = 1) {
|
|
451
|
-
|
|
451
|
+
n(w), v();
|
|
452
452
|
}
|
|
453
|
-
}, h =
|
|
453
|
+
}, h = Ft(), c = te(h);
|
|
454
454
|
{
|
|
455
455
|
var x = (w) => {
|
|
456
|
-
var C =
|
|
457
|
-
M(() => me(C, `--intensity: ${
|
|
456
|
+
var C = Wt();
|
|
457
|
+
M(() => me(C, `--intensity: ${n() ?? ""};`)), he("animationend", C, () => s("small")), k(w, C);
|
|
458
458
|
};
|
|
459
|
-
J(
|
|
459
|
+
J(c, (w) => {
|
|
460
460
|
e(o).small && w(x);
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
var
|
|
463
|
+
var f = pe(c, 2);
|
|
464
464
|
{
|
|
465
|
-
var
|
|
466
|
-
var C =
|
|
467
|
-
M(() => me(C, `--intensity: ${
|
|
465
|
+
var i = (w) => {
|
|
466
|
+
var C = Dt();
|
|
467
|
+
M(() => me(C, `--intensity: ${n() ?? ""};`)), he("animationend", C, () => s("medium")), k(w, C);
|
|
468
468
|
};
|
|
469
|
-
J(
|
|
470
|
-
e(o).medium && w(
|
|
469
|
+
J(f, (w) => {
|
|
470
|
+
e(o).medium && w(i);
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
var
|
|
473
|
+
var _ = pe(f, 2);
|
|
474
474
|
{
|
|
475
475
|
var p = (w) => {
|
|
476
|
-
var C =
|
|
477
|
-
M(() => me(C, `--intensity: ${
|
|
476
|
+
var C = Ut();
|
|
477
|
+
M(() => me(C, `--intensity: ${n() ?? ""};`)), he("animationend", C, () => s("large")), k(w, C);
|
|
478
478
|
};
|
|
479
|
-
J(
|
|
479
|
+
J(_, (w) => {
|
|
480
480
|
e(o).large && w(p);
|
|
481
481
|
});
|
|
482
482
|
}
|
|
483
|
-
return
|
|
483
|
+
return k(g, h), ye(y);
|
|
484
484
|
}
|
|
485
485
|
ue(Je, { isPlaying: {}, amplitude: {}, intensity: {} }, [], [], !0);
|
|
486
|
-
var
|
|
487
|
-
g.currentTarget.focus({ preventScroll: !0 }),
|
|
488
|
-
},
|
|
489
|
-
const
|
|
486
|
+
var Gt = (g, t) => {
|
|
487
|
+
g.currentTarget.focus({ preventScroll: !0 }), t()?.(g);
|
|
488
|
+
}, Kt = X('<div class="shape-wrapper svelte-103okfy"><!> <button part="button"><!> <span part="icon" class="icon svelte-103okfy"><!></span></button></div>');
|
|
489
|
+
const Xt = {
|
|
490
490
|
hash: "svelte-103okfy",
|
|
491
491
|
code: `.shape-wrapper.svelte-103okfy {position:relative;width:var(--fortyfour-play-button-size, 48px);height:var(--fortyfour-play-button-size, 48px);font-size:var(--fortyfour-play-button-size, 48px);}.play-button.svelte-103okfy {position:relative;width:100%;height:100%;border:var(--fortyfour-play-button-border-width) solid
|
|
492
492
|
var(--fortyfour-play-button-border-color);cursor:pointer;display:flex;align-items:center;justify-content:center;background:var(--fortyfour-play-button-background-color);color:var(--fortyfour-play-button-icon-color);}.play-button.svelte-103okfy:focus-visible {outline:var(--fortyfour-play-button-focus-width) solid var(--fortyfour-play-button-focus-color);outline-offset:var(--fortyfour-play-button-focus-offset);}.play-button.svelte-103okfy:disabled {opacity:0.5;cursor:not-allowed;}.play-button.has-ring-progress.svelte-103okfy {border:none;}.icon.svelte-103okfy {position:relative;z-index:1;width:1em;height:1em;display:flex;align-items:center;justify-content:center;}.icon.svelte-103okfy svg {width:100%;height:100%;fill:currentColor;}`
|
|
493
493
|
};
|
|
494
|
-
function De(g,
|
|
495
|
-
ge(
|
|
496
|
-
let
|
|
497
|
-
var
|
|
494
|
+
function De(g, t) {
|
|
495
|
+
ge(t, !0), we(g, Xt);
|
|
496
|
+
let u = d(t, "onclick", 7), a = d(t, "disabled", 7, !1), n = d(t, "loading", 7, !1), o = d(t, "visualization", 7, "none"), l = d(t, "progressPercent", 7, 0), s = d(t, "isPlaying", 7, !1), y = d(t, "amplitude", 7, 0), h = d(t, "rippleIntensity", 7, 1), c = d(t, "ariaLabel", 7, "Play"), x = d(t, "borderRadius", 7, "50%"), f = d(t, "children", 7);
|
|
497
|
+
var i = {
|
|
498
498
|
get onclick() {
|
|
499
|
-
return
|
|
499
|
+
return u();
|
|
500
500
|
},
|
|
501
501
|
set onclick(H) {
|
|
502
|
-
|
|
502
|
+
u(H), v();
|
|
503
503
|
},
|
|
504
504
|
get disabled() {
|
|
505
|
-
return
|
|
505
|
+
return a();
|
|
506
506
|
},
|
|
507
507
|
set disabled(H = !1) {
|
|
508
|
-
|
|
508
|
+
a(H), v();
|
|
509
509
|
},
|
|
510
510
|
get loading() {
|
|
511
|
-
return
|
|
511
|
+
return n();
|
|
512
512
|
},
|
|
513
513
|
set loading(H = !1) {
|
|
514
|
-
|
|
514
|
+
n(H), v();
|
|
515
515
|
},
|
|
516
516
|
get visualization() {
|
|
517
517
|
return o();
|
|
@@ -520,16 +520,16 @@ function De(g, r) {
|
|
|
520
520
|
o(H), v();
|
|
521
521
|
},
|
|
522
522
|
get progressPercent() {
|
|
523
|
-
return
|
|
523
|
+
return l();
|
|
524
524
|
},
|
|
525
525
|
set progressPercent(H = 0) {
|
|
526
|
-
|
|
526
|
+
l(H), v();
|
|
527
527
|
},
|
|
528
528
|
get isPlaying() {
|
|
529
|
-
return
|
|
529
|
+
return s();
|
|
530
530
|
},
|
|
531
531
|
set isPlaying(H = !1) {
|
|
532
|
-
|
|
532
|
+
s(H), v();
|
|
533
533
|
},
|
|
534
534
|
get amplitude() {
|
|
535
535
|
return y();
|
|
@@ -544,10 +544,10 @@ function De(g, r) {
|
|
|
544
544
|
h(H), v();
|
|
545
545
|
},
|
|
546
546
|
get ariaLabel() {
|
|
547
|
-
return
|
|
547
|
+
return c();
|
|
548
548
|
},
|
|
549
549
|
set ariaLabel(H = "Play") {
|
|
550
|
-
|
|
550
|
+
c(H), v();
|
|
551
551
|
},
|
|
552
552
|
get borderRadius() {
|
|
553
553
|
return x();
|
|
@@ -556,17 +556,17 @@ function De(g, r) {
|
|
|
556
556
|
x(H), v();
|
|
557
557
|
},
|
|
558
558
|
get children() {
|
|
559
|
-
return
|
|
559
|
+
return f();
|
|
560
560
|
},
|
|
561
561
|
set children(H) {
|
|
562
|
-
|
|
562
|
+
f(H), v();
|
|
563
563
|
}
|
|
564
|
-
},
|
|
564
|
+
}, _ = Kt(), p = K(_);
|
|
565
565
|
{
|
|
566
566
|
var w = (H) => {
|
|
567
567
|
Je(H, {
|
|
568
568
|
get isPlaying() {
|
|
569
|
-
return
|
|
569
|
+
return s();
|
|
570
570
|
},
|
|
571
571
|
get amplitude() {
|
|
572
572
|
return y();
|
|
@@ -582,27 +582,27 @@ function De(g, r) {
|
|
|
582
582
|
}
|
|
583
583
|
var C = pe(p, 2);
|
|
584
584
|
let U;
|
|
585
|
-
C.__click = [
|
|
586
|
-
var
|
|
585
|
+
C.__click = [Gt, u];
|
|
586
|
+
var G = K(C);
|
|
587
587
|
{
|
|
588
588
|
var F = (H) => {
|
|
589
589
|
Ve(H, {
|
|
590
590
|
get progress() {
|
|
591
|
-
return
|
|
591
|
+
return l();
|
|
592
592
|
}
|
|
593
593
|
});
|
|
594
594
|
};
|
|
595
|
-
J(
|
|
595
|
+
J(G, (H) => {
|
|
596
596
|
o() === "ring" && H(F);
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
|
-
var
|
|
600
|
-
return Ae(V,
|
|
599
|
+
var re = pe(G, 2), V = K(re);
|
|
600
|
+
return Ae(V, f), D(re), D(C), D(_), M(
|
|
601
601
|
(H) => {
|
|
602
|
-
me(
|
|
602
|
+
me(_, `border-radius: ${x() ?? ""}`), U = ie(C, 1, "play-button svelte-103okfy", null, U, H), C.disabled = a(), W(C, "aria-label", c()), W(C, "aria-busy", n()), me(C, `border-radius: ${x() ?? ""}`);
|
|
603
603
|
},
|
|
604
604
|
[() => ({ "has-ring-progress": o() === "ring" })]
|
|
605
|
-
),
|
|
605
|
+
), k(g, _), ye(i);
|
|
606
606
|
}
|
|
607
607
|
He(["click"]);
|
|
608
608
|
ue(
|
|
@@ -624,89 +624,89 @@ ue(
|
|
|
624
624
|
[],
|
|
625
625
|
!0
|
|
626
626
|
);
|
|
627
|
-
function Ge(g,
|
|
628
|
-
ge(
|
|
629
|
-
let
|
|
630
|
-
var
|
|
627
|
+
function Ge(g, t) {
|
|
628
|
+
ge(t, !0);
|
|
629
|
+
let u = d(t, "onclick", 7), a = d(t, "disabled", 7, !1), n = d(t, "loading", 7, !1), o = d(t, "visualization", 7, "none"), l = d(t, "progressPercent", 7, 0), s = d(t, "isPlaying", 7, !1), y = d(t, "amplitude", 7, 0), h = d(t, "rippleIntensity", 7, 1), c = d(t, "ariaLabel", 7, "Play"), x = d(t, "children", 7);
|
|
630
|
+
var f = {
|
|
631
631
|
get onclick() {
|
|
632
|
-
return
|
|
632
|
+
return u();
|
|
633
633
|
},
|
|
634
|
-
set onclick(
|
|
635
|
-
|
|
634
|
+
set onclick(i) {
|
|
635
|
+
u(i), v();
|
|
636
636
|
},
|
|
637
637
|
get disabled() {
|
|
638
|
-
return
|
|
638
|
+
return a();
|
|
639
639
|
},
|
|
640
|
-
set disabled(
|
|
641
|
-
|
|
640
|
+
set disabled(i = !1) {
|
|
641
|
+
a(i), v();
|
|
642
642
|
},
|
|
643
643
|
get loading() {
|
|
644
|
-
return
|
|
644
|
+
return n();
|
|
645
645
|
},
|
|
646
|
-
set loading(
|
|
647
|
-
|
|
646
|
+
set loading(i = !1) {
|
|
647
|
+
n(i), v();
|
|
648
648
|
},
|
|
649
649
|
get visualization() {
|
|
650
650
|
return o();
|
|
651
651
|
},
|
|
652
|
-
set visualization(
|
|
653
|
-
o(
|
|
652
|
+
set visualization(i = "none") {
|
|
653
|
+
o(i), v();
|
|
654
654
|
},
|
|
655
655
|
get progressPercent() {
|
|
656
|
-
return
|
|
656
|
+
return l();
|
|
657
657
|
},
|
|
658
|
-
set progressPercent(
|
|
659
|
-
i
|
|
658
|
+
set progressPercent(i = 0) {
|
|
659
|
+
l(i), v();
|
|
660
660
|
},
|
|
661
661
|
get isPlaying() {
|
|
662
|
-
return
|
|
662
|
+
return s();
|
|
663
663
|
},
|
|
664
|
-
set isPlaying(
|
|
665
|
-
|
|
664
|
+
set isPlaying(i = !1) {
|
|
665
|
+
s(i), v();
|
|
666
666
|
},
|
|
667
667
|
get amplitude() {
|
|
668
668
|
return y();
|
|
669
669
|
},
|
|
670
|
-
set amplitude(
|
|
671
|
-
y(
|
|
670
|
+
set amplitude(i = 0) {
|
|
671
|
+
y(i), v();
|
|
672
672
|
},
|
|
673
673
|
get rippleIntensity() {
|
|
674
674
|
return h();
|
|
675
675
|
},
|
|
676
|
-
set rippleIntensity(
|
|
677
|
-
h(
|
|
676
|
+
set rippleIntensity(i = 1) {
|
|
677
|
+
h(i), v();
|
|
678
678
|
},
|
|
679
679
|
get ariaLabel() {
|
|
680
|
-
return
|
|
680
|
+
return c();
|
|
681
681
|
},
|
|
682
|
-
set ariaLabel(
|
|
683
|
-
|
|
682
|
+
set ariaLabel(i = "Play") {
|
|
683
|
+
c(i), v();
|
|
684
684
|
},
|
|
685
685
|
get children() {
|
|
686
686
|
return x();
|
|
687
687
|
},
|
|
688
|
-
set children(
|
|
689
|
-
x(
|
|
688
|
+
set children(i) {
|
|
689
|
+
x(i), v();
|
|
690
690
|
}
|
|
691
691
|
};
|
|
692
692
|
return De(g, {
|
|
693
693
|
get onclick() {
|
|
694
|
-
return
|
|
694
|
+
return u();
|
|
695
695
|
},
|
|
696
696
|
get disabled() {
|
|
697
|
-
return
|
|
697
|
+
return a();
|
|
698
698
|
},
|
|
699
699
|
get loading() {
|
|
700
|
-
return
|
|
700
|
+
return n();
|
|
701
701
|
},
|
|
702
702
|
get visualization() {
|
|
703
703
|
return o();
|
|
704
704
|
},
|
|
705
705
|
get progressPercent() {
|
|
706
|
-
return
|
|
706
|
+
return l();
|
|
707
707
|
},
|
|
708
708
|
get isPlaying() {
|
|
709
|
-
return
|
|
709
|
+
return s();
|
|
710
710
|
},
|
|
711
711
|
get amplitude() {
|
|
712
712
|
return y();
|
|
@@ -715,15 +715,15 @@ function Ge(g, r) {
|
|
|
715
715
|
return h();
|
|
716
716
|
},
|
|
717
717
|
get ariaLabel() {
|
|
718
|
-
return
|
|
718
|
+
return c();
|
|
719
719
|
},
|
|
720
720
|
borderRadius: "50%",
|
|
721
|
-
children: (
|
|
722
|
-
var p = se(), w =
|
|
723
|
-
Ae(w, x),
|
|
721
|
+
children: (i, _) => {
|
|
722
|
+
var p = se(), w = te(p);
|
|
723
|
+
Ae(w, x), k(i, p);
|
|
724
724
|
},
|
|
725
725
|
$$slots: { default: !0 }
|
|
726
|
-
}), ye(
|
|
726
|
+
}), ye(f);
|
|
727
727
|
}
|
|
728
728
|
ue(
|
|
729
729
|
Ge,
|
|
@@ -743,89 +743,89 @@ ue(
|
|
|
743
743
|
[],
|
|
744
744
|
!0
|
|
745
745
|
);
|
|
746
|
-
function
|
|
747
|
-
ge(
|
|
748
|
-
let
|
|
749
|
-
var
|
|
746
|
+
function ft(g, t) {
|
|
747
|
+
ge(t, !0);
|
|
748
|
+
let u = d(t, "onclick", 7), a = d(t, "disabled", 7, !1), n = d(t, "loading", 7, !1), o = d(t, "visualization", 7, "none"), l = d(t, "progressPercent", 7, 0), s = d(t, "isPlaying", 7, !1), y = d(t, "amplitude", 7, 0), h = d(t, "rippleIntensity", 7, 1), c = d(t, "ariaLabel", 7, "Play"), x = d(t, "children", 7);
|
|
749
|
+
var f = {
|
|
750
750
|
get onclick() {
|
|
751
|
-
return
|
|
751
|
+
return u();
|
|
752
752
|
},
|
|
753
|
-
set onclick(
|
|
754
|
-
|
|
753
|
+
set onclick(i) {
|
|
754
|
+
u(i), v();
|
|
755
755
|
},
|
|
756
756
|
get disabled() {
|
|
757
|
-
return
|
|
757
|
+
return a();
|
|
758
758
|
},
|
|
759
|
-
set disabled(
|
|
760
|
-
|
|
759
|
+
set disabled(i = !1) {
|
|
760
|
+
a(i), v();
|
|
761
761
|
},
|
|
762
762
|
get loading() {
|
|
763
|
-
return
|
|
763
|
+
return n();
|
|
764
764
|
},
|
|
765
|
-
set loading(
|
|
766
|
-
|
|
765
|
+
set loading(i = !1) {
|
|
766
|
+
n(i), v();
|
|
767
767
|
},
|
|
768
768
|
get visualization() {
|
|
769
769
|
return o();
|
|
770
770
|
},
|
|
771
|
-
set visualization(
|
|
772
|
-
o(
|
|
771
|
+
set visualization(i = "none") {
|
|
772
|
+
o(i), v();
|
|
773
773
|
},
|
|
774
774
|
get progressPercent() {
|
|
775
|
-
return
|
|
775
|
+
return l();
|
|
776
776
|
},
|
|
777
|
-
set progressPercent(
|
|
778
|
-
i
|
|
777
|
+
set progressPercent(i = 0) {
|
|
778
|
+
l(i), v();
|
|
779
779
|
},
|
|
780
780
|
get isPlaying() {
|
|
781
|
-
return
|
|
781
|
+
return s();
|
|
782
782
|
},
|
|
783
|
-
set isPlaying(
|
|
784
|
-
|
|
783
|
+
set isPlaying(i = !1) {
|
|
784
|
+
s(i), v();
|
|
785
785
|
},
|
|
786
786
|
get amplitude() {
|
|
787
787
|
return y();
|
|
788
788
|
},
|
|
789
|
-
set amplitude(
|
|
790
|
-
y(
|
|
789
|
+
set amplitude(i = 0) {
|
|
790
|
+
y(i), v();
|
|
791
791
|
},
|
|
792
792
|
get rippleIntensity() {
|
|
793
793
|
return h();
|
|
794
794
|
},
|
|
795
|
-
set rippleIntensity(
|
|
796
|
-
h(
|
|
795
|
+
set rippleIntensity(i = 1) {
|
|
796
|
+
h(i), v();
|
|
797
797
|
},
|
|
798
798
|
get ariaLabel() {
|
|
799
|
-
return
|
|
799
|
+
return c();
|
|
800
800
|
},
|
|
801
|
-
set ariaLabel(
|
|
802
|
-
|
|
801
|
+
set ariaLabel(i = "Play") {
|
|
802
|
+
c(i), v();
|
|
803
803
|
},
|
|
804
804
|
get children() {
|
|
805
805
|
return x();
|
|
806
806
|
},
|
|
807
|
-
set children(
|
|
808
|
-
x(
|
|
807
|
+
set children(i) {
|
|
808
|
+
x(i), v();
|
|
809
809
|
}
|
|
810
810
|
};
|
|
811
811
|
return De(g, {
|
|
812
812
|
get onclick() {
|
|
813
|
-
return
|
|
813
|
+
return u();
|
|
814
814
|
},
|
|
815
815
|
get disabled() {
|
|
816
|
-
return
|
|
816
|
+
return a();
|
|
817
817
|
},
|
|
818
818
|
get loading() {
|
|
819
|
-
return
|
|
819
|
+
return n();
|
|
820
820
|
},
|
|
821
821
|
get visualization() {
|
|
822
822
|
return o();
|
|
823
823
|
},
|
|
824
824
|
get progressPercent() {
|
|
825
|
-
return
|
|
825
|
+
return l();
|
|
826
826
|
},
|
|
827
827
|
get isPlaying() {
|
|
828
|
-
return
|
|
828
|
+
return s();
|
|
829
829
|
},
|
|
830
830
|
get amplitude() {
|
|
831
831
|
return y();
|
|
@@ -834,18 +834,18 @@ function fr(g, r) {
|
|
|
834
834
|
return h();
|
|
835
835
|
},
|
|
836
836
|
get ariaLabel() {
|
|
837
|
-
return
|
|
837
|
+
return c();
|
|
838
838
|
},
|
|
839
839
|
borderRadius: "0",
|
|
840
|
-
children: (
|
|
841
|
-
var p = se(), w =
|
|
842
|
-
Ae(w, x),
|
|
840
|
+
children: (i, _) => {
|
|
841
|
+
var p = se(), w = te(p);
|
|
842
|
+
Ae(w, x), k(i, p);
|
|
843
843
|
},
|
|
844
844
|
$$slots: { default: !0 }
|
|
845
|
-
}), ye(
|
|
845
|
+
}), ye(f);
|
|
846
846
|
}
|
|
847
847
|
ue(
|
|
848
|
-
|
|
848
|
+
ft,
|
|
849
849
|
{
|
|
850
850
|
onclick: {},
|
|
851
851
|
disabled: {},
|
|
@@ -862,89 +862,89 @@ ue(
|
|
|
862
862
|
[],
|
|
863
863
|
!0
|
|
864
864
|
);
|
|
865
|
-
function
|
|
866
|
-
ge(
|
|
867
|
-
let
|
|
868
|
-
var
|
|
865
|
+
function ct(g, t) {
|
|
866
|
+
ge(t, !0);
|
|
867
|
+
let u = d(t, "onclick", 7), a = d(t, "disabled", 7, !1), n = d(t, "loading", 7, !1), o = d(t, "visualization", 7, "none"), l = d(t, "progressPercent", 7, 0), s = d(t, "isPlaying", 7, !1), y = d(t, "amplitude", 7, 0), h = d(t, "rippleIntensity", 7, 1), c = d(t, "ariaLabel", 7, "Play"), x = d(t, "children", 7);
|
|
868
|
+
var f = {
|
|
869
869
|
get onclick() {
|
|
870
|
-
return
|
|
870
|
+
return u();
|
|
871
871
|
},
|
|
872
|
-
set onclick(
|
|
873
|
-
|
|
872
|
+
set onclick(i) {
|
|
873
|
+
u(i), v();
|
|
874
874
|
},
|
|
875
875
|
get disabled() {
|
|
876
|
-
return
|
|
876
|
+
return a();
|
|
877
877
|
},
|
|
878
|
-
set disabled(
|
|
879
|
-
|
|
878
|
+
set disabled(i = !1) {
|
|
879
|
+
a(i), v();
|
|
880
880
|
},
|
|
881
881
|
get loading() {
|
|
882
|
-
return
|
|
882
|
+
return n();
|
|
883
883
|
},
|
|
884
|
-
set loading(
|
|
885
|
-
|
|
884
|
+
set loading(i = !1) {
|
|
885
|
+
n(i), v();
|
|
886
886
|
},
|
|
887
887
|
get visualization() {
|
|
888
888
|
return o();
|
|
889
889
|
},
|
|
890
|
-
set visualization(
|
|
891
|
-
o(
|
|
890
|
+
set visualization(i = "none") {
|
|
891
|
+
o(i), v();
|
|
892
892
|
},
|
|
893
893
|
get progressPercent() {
|
|
894
|
-
return
|
|
894
|
+
return l();
|
|
895
895
|
},
|
|
896
|
-
set progressPercent(
|
|
897
|
-
i
|
|
896
|
+
set progressPercent(i = 0) {
|
|
897
|
+
l(i), v();
|
|
898
898
|
},
|
|
899
899
|
get isPlaying() {
|
|
900
|
-
return
|
|
900
|
+
return s();
|
|
901
901
|
},
|
|
902
|
-
set isPlaying(
|
|
903
|
-
|
|
902
|
+
set isPlaying(i = !1) {
|
|
903
|
+
s(i), v();
|
|
904
904
|
},
|
|
905
905
|
get amplitude() {
|
|
906
906
|
return y();
|
|
907
907
|
},
|
|
908
|
-
set amplitude(
|
|
909
|
-
y(
|
|
908
|
+
set amplitude(i = 0) {
|
|
909
|
+
y(i), v();
|
|
910
910
|
},
|
|
911
911
|
get rippleIntensity() {
|
|
912
912
|
return h();
|
|
913
913
|
},
|
|
914
|
-
set rippleIntensity(
|
|
915
|
-
h(
|
|
914
|
+
set rippleIntensity(i = 1) {
|
|
915
|
+
h(i), v();
|
|
916
916
|
},
|
|
917
917
|
get ariaLabel() {
|
|
918
|
-
return
|
|
918
|
+
return c();
|
|
919
919
|
},
|
|
920
|
-
set ariaLabel(
|
|
921
|
-
|
|
920
|
+
set ariaLabel(i = "Play") {
|
|
921
|
+
c(i), v();
|
|
922
922
|
},
|
|
923
923
|
get children() {
|
|
924
924
|
return x();
|
|
925
925
|
},
|
|
926
|
-
set children(
|
|
927
|
-
x(
|
|
926
|
+
set children(i) {
|
|
927
|
+
x(i), v();
|
|
928
928
|
}
|
|
929
929
|
};
|
|
930
930
|
return De(g, {
|
|
931
931
|
get onclick() {
|
|
932
|
-
return
|
|
932
|
+
return u();
|
|
933
933
|
},
|
|
934
934
|
get disabled() {
|
|
935
|
-
return
|
|
935
|
+
return a();
|
|
936
936
|
},
|
|
937
937
|
get loading() {
|
|
938
|
-
return
|
|
938
|
+
return n();
|
|
939
939
|
},
|
|
940
940
|
get visualization() {
|
|
941
941
|
return o();
|
|
942
942
|
},
|
|
943
943
|
get progressPercent() {
|
|
944
|
-
return
|
|
944
|
+
return l();
|
|
945
945
|
},
|
|
946
946
|
get isPlaying() {
|
|
947
|
-
return
|
|
947
|
+
return s();
|
|
948
948
|
},
|
|
949
949
|
get amplitude() {
|
|
950
950
|
return y();
|
|
@@ -953,18 +953,18 @@ function cr(g, r) {
|
|
|
953
953
|
return h();
|
|
954
954
|
},
|
|
955
955
|
get ariaLabel() {
|
|
956
|
-
return
|
|
956
|
+
return c();
|
|
957
957
|
},
|
|
958
958
|
borderRadius: "var(--fortyfour-play-button-border-radius)",
|
|
959
|
-
children: (
|
|
960
|
-
var p = se(), w =
|
|
961
|
-
Ae(w, x),
|
|
959
|
+
children: (i, _) => {
|
|
960
|
+
var p = se(), w = te(p);
|
|
961
|
+
Ae(w, x), k(i, p);
|
|
962
962
|
},
|
|
963
963
|
$$slots: { default: !0 }
|
|
964
|
-
}), ye(
|
|
964
|
+
}), ye(f);
|
|
965
965
|
}
|
|
966
966
|
ue(
|
|
967
|
-
|
|
967
|
+
ct,
|
|
968
968
|
{
|
|
969
969
|
onclick: {},
|
|
970
970
|
disabled: {},
|
|
@@ -981,26 +981,26 @@ ue(
|
|
|
981
981
|
[],
|
|
982
982
|
!0
|
|
983
983
|
);
|
|
984
|
-
var
|
|
985
|
-
const
|
|
984
|
+
var Zt = X('<div class="shape-wrapper svelte-19ptej3"><!> <button part="button" class="play-button svelte-19ptej3"><div aria-hidden="true"><!></div> <span part="icon" class="icon svelte-19ptej3"><!></span></button></div>');
|
|
985
|
+
const Yt = {
|
|
986
986
|
hash: "svelte-19ptej3",
|
|
987
987
|
code: `.shape-wrapper.svelte-19ptej3 {position:relative;width:var(--fortyfour-play-button-size, 48px);height:var(--fortyfour-play-button-size, 48px);font-size:var(--fortyfour-play-button-size, 48px);}.play-button.svelte-19ptej3 {position:relative;width:100%;height:100%;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;background:transparent;color:var(--fortyfour-play-button-icon-color);padding:0;}.play-button.svelte-19ptej3:focus-visible {outline:var(--fortyfour-play-button-focus-width) solid var(--fortyfour-play-button-focus-color);outline-offset:var(--fortyfour-play-button-focus-offset);}.play-button.svelte-19ptej3:disabled {opacity:0.5;cursor:not-allowed;}.blob-background.svelte-19ptej3 {position:absolute;inset:0;background:var(--fortyfour-play-button-background-color);border:var(--fortyfour-play-button-border-width) solid
|
|
988
988
|
var(--fortyfour-play-button-border-color);overflow:hidden;}.blob-background.has-ring.svelte-19ptej3 {border:none;}.icon.svelte-19ptej3 {position:relative;z-index:1;width:1em;height:1em;display:flex;align-items:center;justify-content:center;}.icon.svelte-19ptej3 svg {width:100%;height:100%;fill:currentColor;}`
|
|
989
989
|
};
|
|
990
|
-
function
|
|
991
|
-
ge(
|
|
992
|
-
let
|
|
993
|
-
function
|
|
994
|
-
return Math.floor(
|
|
990
|
+
function dt(g, t) {
|
|
991
|
+
ge(t, !0), we(g, Yt);
|
|
992
|
+
let u = d(t, "onclick", 7), a = d(t, "disabled", 7, !1), n = d(t, "loading", 7, !1), o = d(t, "visualization", 7, "none"), l = d(t, "progressPercent", 7, 0), s = d(t, "isPlaying", 7, !1), y = d(t, "amplitude", 7, 0), h = d(t, "rippleIntensity", 7, 1), c = d(t, "ariaLabel", 7, "Play"), x = d(t, "animate", 7, !1), f = d(t, "speed", 7, 20), i = d(t, "children", 7);
|
|
993
|
+
function _(r, T) {
|
|
994
|
+
return Math.floor(r + Math.random() * (T - r));
|
|
995
995
|
}
|
|
996
996
|
function p() {
|
|
997
997
|
const T = (A) => 100 - A;
|
|
998
|
-
let
|
|
998
|
+
let P = [];
|
|
999
999
|
for (let A = 0; A < 4; A++) {
|
|
1000
|
-
let N =
|
|
1001
|
-
|
|
1000
|
+
let N = _(25, T(25));
|
|
1001
|
+
P.push(N), P.push(T(N));
|
|
1002
1002
|
}
|
|
1003
|
-
return `${
|
|
1003
|
+
return `${P[0]}% ${P[1]}% ${P[2]}% ${P[3]}% / ${P[4]}% ${P[6]}% ${P[7]}% ${P[5]}%`;
|
|
1004
1004
|
}
|
|
1005
1005
|
const w = p(), C = [
|
|
1006
1006
|
{ borderRadius: w, offset: 0 },
|
|
@@ -1012,10 +1012,10 @@ function dr(g, r) {
|
|
|
1012
1012
|
{ borderRadius: p(), offset: 0.9 },
|
|
1013
1013
|
{ borderRadius: w, offset: 1 }
|
|
1014
1014
|
], U = w;
|
|
1015
|
-
let
|
|
1016
|
-
const
|
|
1017
|
-
de(() => (e(
|
|
1018
|
-
duration:
|
|
1015
|
+
let G = S(null), F = null;
|
|
1016
|
+
const re = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1017
|
+
de(() => (e(G) && x() && !re && (F = e(G).animate(C, {
|
|
1018
|
+
duration: f() * 1e3,
|
|
1019
1019
|
iterations: 1 / 0,
|
|
1020
1020
|
easing: "ease"
|
|
1021
1021
|
})), () => {
|
|
@@ -1023,85 +1023,85 @@ function dr(g, r) {
|
|
|
1023
1023
|
}));
|
|
1024
1024
|
var V = {
|
|
1025
1025
|
get onclick() {
|
|
1026
|
-
return
|
|
1026
|
+
return u();
|
|
1027
1027
|
},
|
|
1028
|
-
set onclick(
|
|
1029
|
-
|
|
1028
|
+
set onclick(r) {
|
|
1029
|
+
u(r), v();
|
|
1030
1030
|
},
|
|
1031
1031
|
get disabled() {
|
|
1032
|
-
return
|
|
1032
|
+
return a();
|
|
1033
1033
|
},
|
|
1034
|
-
set disabled(
|
|
1035
|
-
|
|
1034
|
+
set disabled(r = !1) {
|
|
1035
|
+
a(r), v();
|
|
1036
1036
|
},
|
|
1037
1037
|
get loading() {
|
|
1038
|
-
return
|
|
1038
|
+
return n();
|
|
1039
1039
|
},
|
|
1040
|
-
set loading(
|
|
1041
|
-
|
|
1040
|
+
set loading(r = !1) {
|
|
1041
|
+
n(r), v();
|
|
1042
1042
|
},
|
|
1043
1043
|
get visualization() {
|
|
1044
1044
|
return o();
|
|
1045
1045
|
},
|
|
1046
|
-
set visualization(
|
|
1047
|
-
o(
|
|
1046
|
+
set visualization(r = "none") {
|
|
1047
|
+
o(r), v();
|
|
1048
1048
|
},
|
|
1049
1049
|
get progressPercent() {
|
|
1050
|
-
return
|
|
1050
|
+
return l();
|
|
1051
1051
|
},
|
|
1052
|
-
set progressPercent(
|
|
1053
|
-
|
|
1052
|
+
set progressPercent(r = 0) {
|
|
1053
|
+
l(r), v();
|
|
1054
1054
|
},
|
|
1055
1055
|
get isPlaying() {
|
|
1056
|
-
return
|
|
1056
|
+
return s();
|
|
1057
1057
|
},
|
|
1058
|
-
set isPlaying(
|
|
1059
|
-
|
|
1058
|
+
set isPlaying(r = !1) {
|
|
1059
|
+
s(r), v();
|
|
1060
1060
|
},
|
|
1061
1061
|
get amplitude() {
|
|
1062
1062
|
return y();
|
|
1063
1063
|
},
|
|
1064
|
-
set amplitude(
|
|
1065
|
-
y(
|
|
1064
|
+
set amplitude(r = 0) {
|
|
1065
|
+
y(r), v();
|
|
1066
1066
|
},
|
|
1067
1067
|
get rippleIntensity() {
|
|
1068
1068
|
return h();
|
|
1069
1069
|
},
|
|
1070
|
-
set rippleIntensity(
|
|
1071
|
-
h(
|
|
1070
|
+
set rippleIntensity(r = 1) {
|
|
1071
|
+
h(r), v();
|
|
1072
1072
|
},
|
|
1073
1073
|
get ariaLabel() {
|
|
1074
|
-
return
|
|
1074
|
+
return c();
|
|
1075
1075
|
},
|
|
1076
|
-
set ariaLabel(
|
|
1077
|
-
|
|
1076
|
+
set ariaLabel(r = "Play") {
|
|
1077
|
+
c(r), v();
|
|
1078
1078
|
},
|
|
1079
1079
|
get animate() {
|
|
1080
1080
|
return x();
|
|
1081
1081
|
},
|
|
1082
|
-
set animate(
|
|
1083
|
-
x(
|
|
1082
|
+
set animate(r = !1) {
|
|
1083
|
+
x(r), v();
|
|
1084
1084
|
},
|
|
1085
1085
|
get speed() {
|
|
1086
|
-
return
|
|
1086
|
+
return f();
|
|
1087
1087
|
},
|
|
1088
|
-
set speed(
|
|
1089
|
-
|
|
1088
|
+
set speed(r = 20) {
|
|
1089
|
+
f(r), v();
|
|
1090
1090
|
},
|
|
1091
1091
|
get children() {
|
|
1092
|
-
return
|
|
1092
|
+
return i();
|
|
1093
1093
|
},
|
|
1094
|
-
set children(
|
|
1095
|
-
|
|
1094
|
+
set children(r) {
|
|
1095
|
+
i(r), v();
|
|
1096
1096
|
}
|
|
1097
|
-
}, H =
|
|
1097
|
+
}, H = Zt();
|
|
1098
1098
|
let be;
|
|
1099
|
-
var I =
|
|
1099
|
+
var I = K(H);
|
|
1100
1100
|
{
|
|
1101
|
-
var j = (
|
|
1102
|
-
Je(
|
|
1101
|
+
var j = (r) => {
|
|
1102
|
+
Je(r, {
|
|
1103
1103
|
get isPlaying() {
|
|
1104
|
-
return
|
|
1104
|
+
return s();
|
|
1105
1105
|
},
|
|
1106
1106
|
get amplitude() {
|
|
1107
1107
|
return y();
|
|
@@ -1111,45 +1111,45 @@ function dr(g, r) {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
});
|
|
1113
1113
|
};
|
|
1114
|
-
J(I, (
|
|
1115
|
-
o() === "ripple" &&
|
|
1114
|
+
J(I, (r) => {
|
|
1115
|
+
o() === "ripple" && r(j);
|
|
1116
1116
|
});
|
|
1117
1117
|
}
|
|
1118
1118
|
var B = pe(I, 2);
|
|
1119
|
-
B.__click = function(...
|
|
1120
|
-
|
|
1119
|
+
B.__click = function(...r) {
|
|
1120
|
+
u()?.apply(this, r);
|
|
1121
1121
|
};
|
|
1122
|
-
var ee =
|
|
1122
|
+
var ee = K(B);
|
|
1123
1123
|
let b, L;
|
|
1124
|
-
var Q =
|
|
1124
|
+
var Q = K(ee);
|
|
1125
1125
|
{
|
|
1126
|
-
var ve = (
|
|
1127
|
-
Ve(
|
|
1126
|
+
var ve = (r) => {
|
|
1127
|
+
Ve(r, {
|
|
1128
1128
|
get progress() {
|
|
1129
|
-
return
|
|
1129
|
+
return l();
|
|
1130
1130
|
}
|
|
1131
1131
|
});
|
|
1132
1132
|
};
|
|
1133
|
-
J(Q, (
|
|
1134
|
-
o() === "ring" &&
|
|
1133
|
+
J(Q, (r) => {
|
|
1134
|
+
o() === "ring" && r(ve);
|
|
1135
1135
|
});
|
|
1136
1136
|
}
|
|
1137
|
-
D(ee), Pe(ee, (
|
|
1138
|
-
var E = pe(ee, 2), R =
|
|
1139
|
-
return Ae(R,
|
|
1140
|
-
(
|
|
1141
|
-
be = me(H, "", be,
|
|
1137
|
+
D(ee), Pe(ee, (r) => m(G, r), () => e(G));
|
|
1138
|
+
var E = pe(ee, 2), R = K(E);
|
|
1139
|
+
return Ae(R, i), D(E), D(B), D(H), M(
|
|
1140
|
+
(r, T, P) => {
|
|
1141
|
+
be = me(H, "", be, r), B.disabled = a(), W(B, "aria-label", c()), W(B, "aria-busy", n()), b = ie(ee, 1, "blob-background svelte-19ptej3", null, b, T), L = me(ee, "", L, P);
|
|
1142
1142
|
},
|
|
1143
1143
|
[
|
|
1144
1144
|
() => ({ "border-radius": U }),
|
|
1145
1145
|
() => ({ "has-ring": o() === "ring" }),
|
|
1146
1146
|
() => ({ "border-radius": U })
|
|
1147
1147
|
]
|
|
1148
|
-
),
|
|
1148
|
+
), k(g, H), ye(V);
|
|
1149
1149
|
}
|
|
1150
1150
|
He(["click"]);
|
|
1151
1151
|
ue(
|
|
1152
|
-
|
|
1152
|
+
dt,
|
|
1153
1153
|
{
|
|
1154
1154
|
onclick: {},
|
|
1155
1155
|
disabled: {},
|
|
@@ -1168,20 +1168,20 @@ ue(
|
|
|
1168
1168
|
[],
|
|
1169
1169
|
!0
|
|
1170
1170
|
);
|
|
1171
|
-
|
|
1172
|
-
var
|
|
1173
|
-
function
|
|
1174
|
-
var
|
|
1175
|
-
|
|
1171
|
+
Et();
|
|
1172
|
+
var Vt = Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-hidden="true"><path d="M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z" fill="currentColor"></path></svg>');
|
|
1173
|
+
function vt(g) {
|
|
1174
|
+
var t = Vt();
|
|
1175
|
+
k(g, t);
|
|
1176
1176
|
}
|
|
1177
|
-
ue(
|
|
1178
|
-
var
|
|
1179
|
-
function
|
|
1180
|
-
var
|
|
1181
|
-
|
|
1177
|
+
ue(vt, {}, [], [], !0);
|
|
1178
|
+
var Jt = Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-hidden="true"><path d="M176 96C149.5 96 128 117.5 128 144L128 496C128 522.5 149.5 544 176 544L240 544C266.5 544 288 522.5 288 496L288 144C288 117.5 266.5 96 240 96L176 96zM400 96C373.5 96 352 117.5 352 144L352 496C352 522.5 373.5 544 400 544L464 544C490.5 544 512 522.5 512 496L512 144C512 117.5 490.5 96 464 96L400 96z" fill="currentColor"></path></svg>');
|
|
1179
|
+
function pt(g) {
|
|
1180
|
+
var t = Jt();
|
|
1181
|
+
k(g, t);
|
|
1182
1182
|
}
|
|
1183
|
-
ue(
|
|
1184
|
-
var
|
|
1183
|
+
ue(pt, {}, [], [], !0);
|
|
1184
|
+
var Qt = Le(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-hidden="true"><style>circle {
|
|
1185
1185
|
animation: fade 1s ease-in-out infinite;
|
|
1186
1186
|
}
|
|
1187
1187
|
circle:nth-child(2) {
|
|
@@ -1205,19 +1205,19 @@ var Qr = Le(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-
|
|
|
1205
1205
|
opacity: 0.6;
|
|
1206
1206
|
}
|
|
1207
1207
|
}</style><circle cx="160" cy="320" r="56"></circle><circle cx="320" cy="320" r="56"></circle><circle cx="480" cy="320" r="56"></circle></svg>`);
|
|
1208
|
-
function
|
|
1209
|
-
var
|
|
1210
|
-
|
|
1208
|
+
function gt(g) {
|
|
1209
|
+
var t = Qt();
|
|
1210
|
+
k(g, t);
|
|
1211
1211
|
}
|
|
1212
|
-
ue(
|
|
1213
|
-
var $
|
|
1214
|
-
function
|
|
1215
|
-
var
|
|
1216
|
-
|
|
1212
|
+
ue(gt, {}, [], [], !0);
|
|
1213
|
+
var $t = Le('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" aria-hidden="true"><path d="M320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64zM288 192C288 174.3 302.3 160 320 160C337.7 160 352 174.3 352 192L352 352C352 369.7 337.7 384 320 384C302.3 384 288 369.7 288 352L288 192zM320 480C302.3 480 288 465.7 288 448C288 430.3 302.3 416 320 416C337.7 416 352 430.3 352 448C352 465.7 337.7 480 320 480z"></path></svg>');
|
|
1214
|
+
function yt(g) {
|
|
1215
|
+
var t = $t();
|
|
1216
|
+
k(g, t);
|
|
1217
1217
|
}
|
|
1218
|
-
ue(
|
|
1219
|
-
var
|
|
1220
|
-
const
|
|
1218
|
+
ue(yt, {}, [], [], !0);
|
|
1219
|
+
var er = X('<div class="wrapper svelte-1a44wbi"><!></div>');
|
|
1220
|
+
const tr = {
|
|
1221
1221
|
hash: "svelte-1a44wbi",
|
|
1222
1222
|
code: `.wrapper.svelte-1a44wbi {display:contents;}:host {--fortyfour-play-button-size: 48px;--fortyfour-play-button-background-color: #3b82f6;--fortyfour-play-button-icon-color: #ffffff;--fortyfour-play-button-border-width: 2px;--fortyfour-play-button-border-color: #ffffff;--fortyfour-play-button-border-radius: 12px;--fortyfour-play-button-ring-width: var(--fortyfour-play-button-border-width);--fortyfour-play-button-ring-fill-color: #ffffff;--fortyfour-play-button-ring-track-color: transparent;--fortyfour-play-button-hover-scale: 1.04;--fortyfour-play-button-hover-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);--fortyfour-play-button-focus-color: var(--fortyfour-play-button-background-color);--fortyfour-play-button-focus-width: 2px;--fortyfour-play-button-focus-offset: 2px;display:inline-block;font-size:var(--fortyfour-play-button-size);}:host([hover="scale"]) {transition:transform 0.15s ease-out;}:host([hover="scale"]:hover:not([disabled])) {transform:scale(var(--fortyfour-play-button-hover-scale));}:host([hover="glow"]) {transition:filter 0.15s ease-out;}:host([hover="glow"]:hover:not([disabled])) {filter:drop-shadow(var(--fortyfour-play-button-hover-shadow));}:host([hover="lift"]) {transition:transform 0.15s ease-out,
|
|
1223
1223
|
filter 0.15s ease-out;}:host([hover="lift"]:hover:not([disabled])) {transform:scale(var(--fortyfour-play-button-hover-scale));filter:drop-shadow(var(--fortyfour-play-button-hover-shadow));}
|
|
@@ -1227,116 +1227,116 @@ const rt = {
|
|
|
1227
1227
|
:host([hover="lift"]) {transition:none;}
|
|
1228
1228
|
}`
|
|
1229
1229
|
};
|
|
1230
|
-
function
|
|
1231
|
-
ge(
|
|
1232
|
-
const
|
|
1233
|
-
var L = se(), Q =
|
|
1230
|
+
function rr(g, t) {
|
|
1231
|
+
ge(t, !0), we(g, tr);
|
|
1232
|
+
const u = (b) => {
|
|
1233
|
+
var L = se(), Q = te(L);
|
|
1234
1234
|
{
|
|
1235
1235
|
var ve = (R) => {
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
}),
|
|
1236
|
+
var r = se(), T = te(r);
|
|
1237
|
+
Se(T, t, "icon-error", {}, (P) => {
|
|
1238
|
+
yt(P);
|
|
1239
|
+
}), k(R, r);
|
|
1240
1240
|
}, E = (R) => {
|
|
1241
|
-
var
|
|
1241
|
+
var r = se(), T = te(r);
|
|
1242
1242
|
{
|
|
1243
|
-
var
|
|
1244
|
-
var Y = se(),
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
}),
|
|
1243
|
+
var P = (N) => {
|
|
1244
|
+
var Y = se(), z = te(Y);
|
|
1245
|
+
Se(z, t, "icon-loading", {}, (O) => {
|
|
1246
|
+
gt(O);
|
|
1247
|
+
}), k(N, Y);
|
|
1248
1248
|
}, A = (N) => {
|
|
1249
|
-
var Y = se(),
|
|
1249
|
+
var Y = se(), z = te(Y);
|
|
1250
1250
|
{
|
|
1251
1251
|
var O = (ae) => {
|
|
1252
|
-
var ce = se(), le =
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
}),
|
|
1252
|
+
var ce = se(), le = te(ce);
|
|
1253
|
+
Se(le, t, "icon-playing", {}, ($) => {
|
|
1254
|
+
pt($);
|
|
1255
|
+
}), k(ae, ce);
|
|
1256
1256
|
}, oe = (ae) => {
|
|
1257
|
-
var ce = se(), le =
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
}),
|
|
1257
|
+
var ce = se(), le = te(ce);
|
|
1258
|
+
Se(le, t, "icon-paused", {}, ($) => {
|
|
1259
|
+
vt($);
|
|
1260
|
+
}), k(ae, ce);
|
|
1261
1261
|
};
|
|
1262
1262
|
J(
|
|
1263
|
-
|
|
1263
|
+
z,
|
|
1264
1264
|
(ae) => {
|
|
1265
1265
|
e(U) ? ae(O) : ae(oe, !1);
|
|
1266
1266
|
},
|
|
1267
1267
|
!0
|
|
1268
1268
|
);
|
|
1269
1269
|
}
|
|
1270
|
-
|
|
1270
|
+
k(N, Y);
|
|
1271
1271
|
};
|
|
1272
1272
|
J(
|
|
1273
1273
|
T,
|
|
1274
1274
|
(N) => {
|
|
1275
|
-
V() ? N(
|
|
1275
|
+
V() ? N(P) : N(A, !1);
|
|
1276
1276
|
},
|
|
1277
1277
|
!0
|
|
1278
1278
|
);
|
|
1279
1279
|
}
|
|
1280
|
-
|
|
1280
|
+
k(R, r);
|
|
1281
1281
|
};
|
|
1282
1282
|
J(Q, (R) => {
|
|
1283
1283
|
e(F) ? R(ve) : R(E, !1);
|
|
1284
1284
|
});
|
|
1285
1285
|
}
|
|
1286
|
-
|
|
1287
|
-
},
|
|
1288
|
-
let
|
|
1286
|
+
k(b, L);
|
|
1287
|
+
}, a = t.$$host;
|
|
1288
|
+
let n = d(t, "for", 7, ""), o = d(t, "shape", 7, "circle"), l = d(t, "visualization", 7, "none"), s = d(t, "hover", 7, "none"), y = d(t, "rippleIntensity", 7, 1), h = d(t, "blobAnimate", 7, !1), c = d(t, "blobSpeed", 7, 20);
|
|
1289
1289
|
const x = {
|
|
1290
1290
|
circle: Ge,
|
|
1291
|
-
square:
|
|
1292
|
-
"rounded-square":
|
|
1293
|
-
blob:
|
|
1291
|
+
square: ft,
|
|
1292
|
+
"rounded-square": ct,
|
|
1293
|
+
blob: dt
|
|
1294
1294
|
};
|
|
1295
|
-
let
|
|
1296
|
-
const C =
|
|
1295
|
+
let f = S(null), i = S("idle"), _ = S(0), p = S(0), w = S(We([]));
|
|
1296
|
+
const C = q(() => x[o()] ?? Ge), U = q(() => e(i) === "playing"), G = q(() => e(i) === "loading"), F = q(() => e(i) === "error"), re = q(() => e(p) > 0 ? e(_) / e(p) : 0), V = Ye(() => e(G), 200), H = q(() => {
|
|
1297
1297
|
if (!e(w).length || e(p) === 0)
|
|
1298
1298
|
return 0;
|
|
1299
|
-
const b = Math.floor(e(
|
|
1299
|
+
const b = Math.floor(e(_) / e(p) * e(w).length), L = 3, Q = Math.max(0, b - Math.floor(L / 2)), ve = Math.min(e(w).length, Q + L), E = e(w).slice(Q, ve), R = E.reduce((r, T) => r + T * T, 0);
|
|
1300
1300
|
return Math.sqrt(R / E.length);
|
|
1301
|
-
}), be =
|
|
1301
|
+
}), be = q(() => ({
|
|
1302
1302
|
onclick: I,
|
|
1303
|
-
disabled: !
|
|
1304
|
-
loading: e(
|
|
1305
|
-
visualization:
|
|
1306
|
-
progressPercent: e(
|
|
1303
|
+
disabled: !n() || e(F),
|
|
1304
|
+
loading: e(G),
|
|
1305
|
+
visualization: l(),
|
|
1306
|
+
progressPercent: e(re),
|
|
1307
1307
|
isPlaying: e(U),
|
|
1308
1308
|
amplitude: e(H),
|
|
1309
1309
|
rippleIntensity: y(),
|
|
1310
1310
|
ariaLabel: e(U) ? "Pause" : "Play",
|
|
1311
|
-
...o() === "blob" ? { animate: h(), speed:
|
|
1311
|
+
...o() === "blob" ? { animate: h(), speed: c() } : {}
|
|
1312
1312
|
}));
|
|
1313
1313
|
de(() => {
|
|
1314
|
-
if (!
|
|
1314
|
+
if (!n()) {
|
|
1315
1315
|
console.warn("fortyfour-play-button: 'for' attribute is required");
|
|
1316
1316
|
return;
|
|
1317
1317
|
}
|
|
1318
|
-
const b =
|
|
1319
|
-
if (m(
|
|
1320
|
-
console.warn(`fortyfour-play-button: element with id "${
|
|
1318
|
+
const b = a.getRootNode();
|
|
1319
|
+
if (m(f, b.getElementById(n()), !0), !e(f)) {
|
|
1320
|
+
console.warn(`fortyfour-play-button: element with id "${n()}" not found`);
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
function L() {
|
|
1324
|
-
m(
|
|
1324
|
+
m(i, e(f).state, !0), m(_, e(f).currentTime, !0), m(p, e(f).duration, !0), m(w, e(f).metadata?.waveform ?? [], !0);
|
|
1325
1325
|
}
|
|
1326
|
-
return L(), e(
|
|
1327
|
-
e(
|
|
1326
|
+
return L(), e(f).addEventListener("loading", L), e(f).addEventListener("loadedmetadata", L), e(f).addEventListener("play", L), e(f).addEventListener("pause", L), e(f).addEventListener("ended", L), e(f).addEventListener("error", L), e(f).addEventListener("timeupdate", L), () => {
|
|
1327
|
+
e(f).removeEventListener("loading", L), e(f).removeEventListener("loadedmetadata", L), e(f).removeEventListener("play", L), e(f).removeEventListener("pause", L), e(f).removeEventListener("ended", L), e(f).removeEventListener("error", L), e(f).removeEventListener("timeupdate", L);
|
|
1328
1328
|
};
|
|
1329
1329
|
});
|
|
1330
1330
|
function I() {
|
|
1331
|
-
e(
|
|
1331
|
+
e(f)?.togglePlay();
|
|
1332
1332
|
}
|
|
1333
|
-
Te(
|
|
1333
|
+
Te(a, "data-playing", () => e(U)), Te(a, "data-loading", V), Te(a, "data-error", () => e(F));
|
|
1334
1334
|
var j = {
|
|
1335
1335
|
get for() {
|
|
1336
|
-
return
|
|
1336
|
+
return n();
|
|
1337
1337
|
},
|
|
1338
1338
|
set for(b = "") {
|
|
1339
|
-
|
|
1339
|
+
n(b), v();
|
|
1340
1340
|
},
|
|
1341
1341
|
get shape() {
|
|
1342
1342
|
return o();
|
|
@@ -1345,16 +1345,16 @@ function tt(g, r) {
|
|
|
1345
1345
|
o(b), v();
|
|
1346
1346
|
},
|
|
1347
1347
|
get visualization() {
|
|
1348
|
-
return
|
|
1348
|
+
return l();
|
|
1349
1349
|
},
|
|
1350
1350
|
set visualization(b = "none") {
|
|
1351
|
-
|
|
1351
|
+
l(b), v();
|
|
1352
1352
|
},
|
|
1353
1353
|
get hover() {
|
|
1354
|
-
return
|
|
1354
|
+
return s();
|
|
1355
1355
|
},
|
|
1356
1356
|
set hover(b = "none") {
|
|
1357
|
-
|
|
1357
|
+
s(b), v();
|
|
1358
1358
|
},
|
|
1359
1359
|
get rippleIntensity() {
|
|
1360
1360
|
return y();
|
|
@@ -1369,23 +1369,23 @@ function tt(g, r) {
|
|
|
1369
1369
|
h(b), v();
|
|
1370
1370
|
},
|
|
1371
1371
|
get blobSpeed() {
|
|
1372
|
-
return
|
|
1372
|
+
return c();
|
|
1373
1373
|
},
|
|
1374
1374
|
set blobSpeed(b = 20) {
|
|
1375
|
-
|
|
1375
|
+
c(b), v();
|
|
1376
1376
|
}
|
|
1377
|
-
}, B =
|
|
1378
|
-
return
|
|
1379
|
-
L(b,
|
|
1377
|
+
}, B = er(), ee = K(B);
|
|
1378
|
+
return Rt(ee, () => e(C), (b, L) => {
|
|
1379
|
+
L(b, It(() => e(be), {
|
|
1380
1380
|
children: (Q, ve) => {
|
|
1381
|
-
|
|
1381
|
+
u(Q);
|
|
1382
1382
|
},
|
|
1383
1383
|
$$slots: { default: !0 }
|
|
1384
1384
|
}));
|
|
1385
|
-
}), D(B),
|
|
1385
|
+
}), D(B), k(g, B), ye(j);
|
|
1386
1386
|
}
|
|
1387
1387
|
customElements.define("fortyfour-play-button", ue(
|
|
1388
|
-
|
|
1388
|
+
rr,
|
|
1389
1389
|
{
|
|
1390
1390
|
for: { attribute: "for", reflect: !0 },
|
|
1391
1391
|
shape: { attribute: "shape", reflect: !0 },
|
|
@@ -1399,92 +1399,92 @@ customElements.define("fortyfour-play-button", ue(
|
|
|
1399
1399
|
[],
|
|
1400
1400
|
!0
|
|
1401
1401
|
));
|
|
1402
|
-
function
|
|
1403
|
-
if (!g.length ||
|
|
1402
|
+
function bt(g, t) {
|
|
1403
|
+
if (!g.length || t <= 0)
|
|
1404
1404
|
return [];
|
|
1405
|
-
const
|
|
1406
|
-
for (let
|
|
1407
|
-
const o = Math.floor(
|
|
1408
|
-
|
|
1405
|
+
const u = g.length / t, a = [];
|
|
1406
|
+
for (let n = 0; n < t; n++) {
|
|
1407
|
+
const o = Math.floor(n * u), l = Math.floor((n + 1) * u), s = g.slice(o, Math.max(o + 1, l)), y = s.reduce((c, x) => c + x * x, 0), h = Math.sqrt(y / s.length);
|
|
1408
|
+
a.push(h);
|
|
1409
1409
|
}
|
|
1410
|
-
return
|
|
1410
|
+
return a;
|
|
1411
1411
|
}
|
|
1412
|
-
function Qe(g,
|
|
1413
|
-
return function(
|
|
1414
|
-
const o = g(),
|
|
1415
|
-
if (!o || !
|
|
1412
|
+
function Qe(g, t, u) {
|
|
1413
|
+
return function(n) {
|
|
1414
|
+
const o = g(), l = t(), s = u();
|
|
1415
|
+
if (!o || !s || l <= 0)
|
|
1416
1416
|
return;
|
|
1417
|
-
const y =
|
|
1418
|
-
o.seek(
|
|
1417
|
+
const y = n.clientX - s.left, c = Math.max(0, Math.min(1, y / s.width)) * l;
|
|
1418
|
+
o.seek(c);
|
|
1419
1419
|
};
|
|
1420
1420
|
}
|
|
1421
|
-
function $e(g,
|
|
1422
|
-
return function(
|
|
1423
|
-
const o = g(),
|
|
1424
|
-
if (!o ||
|
|
1421
|
+
function $e(g, t, u) {
|
|
1422
|
+
return function(n) {
|
|
1423
|
+
const o = g(), l = t(), s = u();
|
|
1424
|
+
if (!o || l <= 0)
|
|
1425
1425
|
return;
|
|
1426
|
-
const y =
|
|
1427
|
-
|
|
1426
|
+
const y = l * 0.05;
|
|
1427
|
+
n.key === "ArrowRight" ? o.seek(Math.min(l, s + y)) : n.key === "ArrowLeft" && o.seek(Math.max(0, s - y));
|
|
1428
1428
|
};
|
|
1429
1429
|
}
|
|
1430
|
-
var
|
|
1431
|
-
const
|
|
1430
|
+
var or = Le("<rect></rect>"), ar = X('<div class="waveform svelte-kt0w9q" role="slider" tabindex="0" aria-valuemin="0" aria-label="Audio playback position"><svg width="100%" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" class="svelte-kt0w9q"><!></svg></div>');
|
|
1431
|
+
const nr = {
|
|
1432
1432
|
hash: "svelte-kt0w9q",
|
|
1433
1433
|
code: ":host {display:flex;flex:1;--waveform-progress-color: #3b82f6;--waveform-track-color: #e5e7eb;--waveform-focus-color: #3b82f6;--waveform-focus-width: 2px;--waveform-focus-offset: 2px;--waveform-focus-radius: 4px;}.waveform.svelte-kt0w9q {flex:1;height:100%;display:flex;align-items:center;cursor:pointer;border-radius:var(--waveform-focus-radius);}.waveform.svelte-kt0w9q:focus-visible {outline:var(--waveform-focus-width) solid var(--waveform-focus-color);outline-offset:var(--waveform-focus-offset);}svg.svelte-kt0w9q {display:block;}.bar.svelte-kt0w9q {transition:fill 0.15s;}.progress.svelte-kt0w9q {fill:var(--waveform-progress-color);}.track.svelte-kt0w9q {fill:var(--waveform-track-color);}"
|
|
1434
1434
|
};
|
|
1435
|
-
function
|
|
1436
|
-
ge(
|
|
1437
|
-
const
|
|
1438
|
-
let
|
|
1439
|
-
|
|
1435
|
+
function ir(g, t) {
|
|
1436
|
+
ge(t, !0), we(g, nr);
|
|
1437
|
+
const u = t.$$host;
|
|
1438
|
+
let a = d(t, "for", 7, ""), n = d(t, "barWidth", 7, 3), o = d(t, "barGap", 7, 1), l = d(t, "barRadius", 7, 1), s = d(t, "minBarHeight", 7, 3), y = d(t, "height", 7, 56), h = S(We([])), c = S(0), x = S(0), f = S(null), i = S(0), _ = S(!1), p = S(null);
|
|
1439
|
+
u.style.height = `${y()}px`, st(() => {
|
|
1440
1440
|
const b = new ResizeObserver((L) => {
|
|
1441
1441
|
for (let Q of L)
|
|
1442
|
-
m(
|
|
1442
|
+
m(i, Q.contentRect.width || 0, !0), m(_, !0);
|
|
1443
1443
|
});
|
|
1444
1444
|
return e(p) && b.observe(e(p)), () => {
|
|
1445
1445
|
b.disconnect();
|
|
1446
1446
|
};
|
|
1447
1447
|
}), de(() => {
|
|
1448
|
-
if (!
|
|
1448
|
+
if (!a()) {
|
|
1449
1449
|
console.warn("fortyfour-bar-waveform: 'for' attribute is required");
|
|
1450
1450
|
return;
|
|
1451
1451
|
}
|
|
1452
|
-
const b =
|
|
1453
|
-
if (m(
|
|
1454
|
-
console.warn(`fortyfour-bar-waveform: element with id "${
|
|
1452
|
+
const b = u.getRootNode();
|
|
1453
|
+
if (m(f, b.getElementById(a()), !0), !e(f)) {
|
|
1454
|
+
console.warn(`fortyfour-bar-waveform: element with id "${a()}" not found`);
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
|
-
e(
|
|
1457
|
+
e(f).metadata?.waveform && m(h, e(f).metadata.waveform, !0), e(f).duration && m(x, e(f).duration, !0), e(f).currentTime && m(c, e(f).currentTime, !0);
|
|
1458
1458
|
function L() {
|
|
1459
|
-
m(h, e(
|
|
1459
|
+
m(h, e(f).metadata?.waveform || [], !0), m(x, e(f).duration, !0);
|
|
1460
1460
|
}
|
|
1461
1461
|
function Q() {
|
|
1462
|
-
m(
|
|
1462
|
+
m(c, e(f).currentTime, !0);
|
|
1463
1463
|
}
|
|
1464
|
-
return e(
|
|
1465
|
-
e(
|
|
1464
|
+
return e(f).addEventListener("loadedmetadata", L), e(f).addEventListener("timeupdate", Q), () => {
|
|
1465
|
+
e(f).removeEventListener("loadedmetadata", L), e(f).removeEventListener("timeupdate", Q);
|
|
1466
1466
|
};
|
|
1467
1467
|
});
|
|
1468
|
-
const w =
|
|
1469
|
-
const L = Math.max(
|
|
1468
|
+
const w = q(() => Math.max(1, Math.floor(e(i) / (n() + o())))), C = q(() => e(h).length > 0), U = q(() => e(C) ? bt(e(h), e(w)) : Array(e(w)).fill(0)), G = q(() => e(x) > 0 ? e(c) / e(x) : 0), F = q(() => `${Me(e(c))} of ${Me(e(x))}`), re = q(() => e(U).map((b) => {
|
|
1469
|
+
const L = Math.max(s(), Math.round(b / 100 * (y() - s()) + s()));
|
|
1470
1470
|
return L % 2 === 0 ? L + 1 : L;
|
|
1471
1471
|
}));
|
|
1472
1472
|
de(() => {
|
|
1473
|
-
e(C) ?
|
|
1473
|
+
e(C) ? u.removeAttribute("data-placeholder") : u.setAttribute("data-placeholder", "");
|
|
1474
1474
|
});
|
|
1475
|
-
const V = Qe(() => e(
|
|
1475
|
+
const V = Qe(() => e(f), () => e(x), () => u.getBoundingClientRect()), H = $e(() => e(f), () => e(x), () => e(c));
|
|
1476
1476
|
var be = {
|
|
1477
1477
|
get for() {
|
|
1478
|
-
return
|
|
1478
|
+
return a();
|
|
1479
1479
|
},
|
|
1480
1480
|
set for(b = "") {
|
|
1481
|
-
|
|
1481
|
+
a(b), v();
|
|
1482
1482
|
},
|
|
1483
1483
|
get barWidth() {
|
|
1484
|
-
return
|
|
1484
|
+
return n();
|
|
1485
1485
|
},
|
|
1486
1486
|
set barWidth(b = 3) {
|
|
1487
|
-
|
|
1487
|
+
n(b), v();
|
|
1488
1488
|
},
|
|
1489
1489
|
get barGap() {
|
|
1490
1490
|
return o();
|
|
@@ -1493,16 +1493,16 @@ function it(g, r) {
|
|
|
1493
1493
|
o(b), v();
|
|
1494
1494
|
},
|
|
1495
1495
|
get barRadius() {
|
|
1496
|
-
return
|
|
1496
|
+
return l();
|
|
1497
1497
|
},
|
|
1498
1498
|
set barRadius(b = 1) {
|
|
1499
|
-
|
|
1499
|
+
l(b), v();
|
|
1500
1500
|
},
|
|
1501
1501
|
get minBarHeight() {
|
|
1502
|
-
return
|
|
1502
|
+
return s();
|
|
1503
1503
|
},
|
|
1504
1504
|
set minBarHeight(b = 3) {
|
|
1505
|
-
|
|
1505
|
+
s(b), v();
|
|
1506
1506
|
},
|
|
1507
1507
|
get height() {
|
|
1508
1508
|
return y();
|
|
@@ -1510,34 +1510,34 @@ function it(g, r) {
|
|
|
1510
1510
|
set height(b = 56) {
|
|
1511
1511
|
y(b), v();
|
|
1512
1512
|
}
|
|
1513
|
-
}, I =
|
|
1513
|
+
}, I = ar();
|
|
1514
1514
|
I.__click = V, I.__keydown = H;
|
|
1515
|
-
var j =
|
|
1515
|
+
var j = K(I), B = K(j);
|
|
1516
1516
|
{
|
|
1517
1517
|
var ee = (b) => {
|
|
1518
|
-
var L = se(), Q =
|
|
1519
|
-
Be(Q, 17, () => e(
|
|
1520
|
-
const
|
|
1521
|
-
var
|
|
1518
|
+
var L = se(), Q = te(L);
|
|
1519
|
+
Be(Q, 17, () => e(re), Ne, (ve, E, R) => {
|
|
1520
|
+
const r = q(() => (R + 1) / e(re).length), T = q(() => e(r) <= e(G));
|
|
1521
|
+
var P = or();
|
|
1522
1522
|
M(
|
|
1523
1523
|
(A) => {
|
|
1524
|
-
ie(
|
|
1524
|
+
ie(P, 0, ut(["bar", e(T) ? "progress" : "track"]), "svelte-kt0w9q"), W(P, "x", R * (n() + o())), W(P, "y", y() / 4 - e(E) / 2), W(P, "width", A), W(P, "height", e(E)), W(P, "rx", l());
|
|
1525
1525
|
},
|
|
1526
|
-
[() => Math.max(1,
|
|
1527
|
-
),
|
|
1528
|
-
}),
|
|
1526
|
+
[() => Math.max(1, n() - 1)]
|
|
1527
|
+
), k(ve, P);
|
|
1528
|
+
}), k(b, L);
|
|
1529
1529
|
};
|
|
1530
1530
|
J(B, (b) => {
|
|
1531
|
-
e(
|
|
1531
|
+
e(_) && b(ee);
|
|
1532
1532
|
});
|
|
1533
1533
|
}
|
|
1534
1534
|
return D(j), D(I), Pe(I, (b) => m(p, b), () => e(p)), M(() => {
|
|
1535
|
-
W(I, "aria-valuemax", e(x)), W(I, "aria-valuenow", e(
|
|
1536
|
-
}),
|
|
1535
|
+
W(I, "aria-valuemax", e(x)), W(I, "aria-valuenow", e(c)), W(I, "aria-valuetext", e(F)), W(j, "height", y()), W(j, "viewBox", `0 0 ${e(i)} ${y() / 2}`);
|
|
1536
|
+
}), k(g, I), ye(be);
|
|
1537
1537
|
}
|
|
1538
1538
|
He(["click", "keydown"]);
|
|
1539
1539
|
customElements.define("fortyfour-bar-waveform", ue(
|
|
1540
|
-
|
|
1540
|
+
ir,
|
|
1541
1541
|
{
|
|
1542
1542
|
for: { attribute: "for", reflect: !0 },
|
|
1543
1543
|
barWidth: { attribute: "bar-width", reflect: !0, type: "Number" },
|
|
@@ -1550,8 +1550,8 @@ customElements.define("fortyfour-bar-waveform", ue(
|
|
|
1550
1550
|
[],
|
|
1551
1551
|
!0
|
|
1552
1552
|
));
|
|
1553
|
-
var
|
|
1554
|
-
const
|
|
1553
|
+
var lr = Le("<path></path>"), sr = Le("<path></path><!>", 1), ur = Le('<line class="line track svelte-r3200f" stroke-linecap="round"></line>'), fr = X('<div class="waveform svelte-r3200f" role="slider" tabindex="0" aria-valuemin="0" aria-label="Audio playback position"><svg width="100%" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" preserveAspectRatio="none" class="svelte-r3200f"><!></svg></div>');
|
|
1554
|
+
const cr = {
|
|
1555
1555
|
hash: "svelte-r3200f",
|
|
1556
1556
|
code: `:host {--fortyfour-line-waveform-track-color: #d1d5db;--fortyfour-line-waveform-progress-color: #3b82f6;--fortyfour-line-waveform-focus-color: #3b82f6;--fortyfour-line-waveform-focus-width: 2px;--fortyfour-line-waveform-focus-offset: 2px;--fortyfour-line-waveform-focus-radius: 4px;display:flex;flex:1;}
|
|
1557
1557
|
|
|
@@ -1559,176 +1559,176 @@ const ct = {
|
|
|
1559
1559
|
}.waveform.svelte-r3200f {flex:1;height:100%;display:flex;align-items:center;cursor:pointer;border-radius:var(--fortyfour-line-waveform-focus-radius);}.waveform.svelte-r3200f:focus-visible {outline:var(--fortyfour-line-waveform-focus-width) solid
|
|
1560
1560
|
var(--fortyfour-line-waveform-focus-color);outline-offset:var(--fortyfour-line-waveform-focus-offset);}svg.svelte-r3200f {display:block;}.line.svelte-r3200f {fill:none;stroke-linecap:round;stroke-linejoin:round;}.line.sharp.svelte-r3200f {stroke-linecap:square;stroke-linejoin:miter;}.track.svelte-r3200f {stroke:var(--fortyfour-line-waveform-track-color);}.progress.svelte-r3200f {stroke:var(--fortyfour-line-waveform-progress-color);}`
|
|
1561
1561
|
};
|
|
1562
|
-
function
|
|
1563
|
-
ge(
|
|
1564
|
-
const
|
|
1565
|
-
let
|
|
1566
|
-
|
|
1567
|
-
const
|
|
1568
|
-
for (let
|
|
1569
|
-
m(x,
|
|
1562
|
+
function dr(g, t) {
|
|
1563
|
+
ge(t, !0), we(g, cr);
|
|
1564
|
+
const u = t.$$host;
|
|
1565
|
+
let a = d(t, "for", 7, ""), n = d(t, "lineWidth", 7, 2), o = d(t, "height", 7, 56), l = d(t, "sharp", 7, !1), s = S(We([])), y = S(0), h = S(0), c = S(null), x = S(0), f = S(!1), i = S(null);
|
|
1566
|
+
u.style.height = `${o()}px`, st(() => {
|
|
1567
|
+
const r = new ResizeObserver((T) => {
|
|
1568
|
+
for (let P of T)
|
|
1569
|
+
m(x, P.contentRect.width || 0, !0), m(f, !0);
|
|
1570
1570
|
});
|
|
1571
|
-
return e(
|
|
1572
|
-
|
|
1571
|
+
return e(i) && r.observe(e(i)), () => {
|
|
1572
|
+
r.disconnect();
|
|
1573
1573
|
};
|
|
1574
1574
|
}), de(() => {
|
|
1575
|
-
if (!
|
|
1575
|
+
if (!a()) {
|
|
1576
1576
|
console.warn("fortyfour-line-waveform: 'for' attribute is required");
|
|
1577
1577
|
return;
|
|
1578
1578
|
}
|
|
1579
|
-
const
|
|
1580
|
-
if (m(
|
|
1581
|
-
console.warn(`fortyfour-line-waveform: element with id "${
|
|
1579
|
+
const r = u.getRootNode();
|
|
1580
|
+
if (m(c, r.getElementById(a()), !0), !e(c)) {
|
|
1581
|
+
console.warn(`fortyfour-line-waveform: element with id "${a()}" not found`);
|
|
1582
1582
|
return;
|
|
1583
1583
|
}
|
|
1584
|
-
e(
|
|
1584
|
+
e(c).metadata?.waveform && m(s, e(c).metadata.waveform, !0), e(c).duration && m(h, e(c).duration, !0), e(c).currentTime && m(y, e(c).currentTime, !0);
|
|
1585
1585
|
function T() {
|
|
1586
|
-
m(
|
|
1586
|
+
m(s, e(c).metadata?.waveform || [], !0), m(h, e(c).duration, !0);
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1589
|
-
m(y, e(
|
|
1588
|
+
function P() {
|
|
1589
|
+
m(y, e(c).currentTime, !0);
|
|
1590
1590
|
}
|
|
1591
|
-
return e(
|
|
1592
|
-
e(
|
|
1591
|
+
return e(c).addEventListener("loadedmetadata", T), e(c).addEventListener("timeupdate", P), () => {
|
|
1592
|
+
e(c).removeEventListener("loadedmetadata", T), e(c).removeEventListener("timeupdate", P);
|
|
1593
1593
|
};
|
|
1594
1594
|
});
|
|
1595
|
-
const
|
|
1595
|
+
const _ = 0.15, p = q(() => Math.max(2, Math.floor(e(x) * _))), w = q(() => e(s).length > 0), C = q(() => e(w) ? bt(e(s), e(p)) : []), U = q(() => e(h) > 0 ? e(y) / e(h) : 0), G = q(() => `${Me(e(y))} of ${Me(e(h))}`), F = q(() => o() / 2), re = q(() => o() / 2 * 0.8), V = q(() => {
|
|
1596
1596
|
if (!e(C).length || e(x) === 0)
|
|
1597
1597
|
return [];
|
|
1598
|
-
const
|
|
1599
|
-
return e(C).map((
|
|
1600
|
-
const N =
|
|
1598
|
+
const r = n() / 2, T = e(x) - r * 2;
|
|
1599
|
+
return e(C).map((P, A) => {
|
|
1600
|
+
const N = r + A / (e(C).length - 1) * T, Y = Math.max(0.05, P / 100), z = A % 2 === 0 ? -1 : 1, O = e(F) + z * Y * e(re);
|
|
1601
1601
|
return { x: N, y: O };
|
|
1602
1602
|
});
|
|
1603
1603
|
});
|
|
1604
|
-
function H(
|
|
1605
|
-
if (
|
|
1604
|
+
function H(r, T) {
|
|
1605
|
+
if (r.length === 0)
|
|
1606
1606
|
return "";
|
|
1607
|
-
let
|
|
1608
|
-
for (let A = 1; A <
|
|
1609
|
-
const N =
|
|
1607
|
+
let P = `M ${r[0].x} ${r[0].y}`;
|
|
1608
|
+
for (let A = 1; A < r.length; A++) {
|
|
1609
|
+
const N = r[A - 1], Y = r[A];
|
|
1610
1610
|
if (T) {
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1611
|
+
const z = N.x + (Y.x - N.x) / 3, O = N.y, oe = N.x + (Y.x - N.x) * 2 / 3, ae = Y.y;
|
|
1612
|
+
P += ` C ${z} ${O}, ${oe} ${ae}, ${Y.x} ${Y.y}`;
|
|
1613
1613
|
} else
|
|
1614
|
-
|
|
1614
|
+
P += ` L ${Y.x} ${Y.y}`;
|
|
1615
1615
|
}
|
|
1616
|
-
return
|
|
1616
|
+
return P;
|
|
1617
1617
|
}
|
|
1618
|
-
const be =
|
|
1618
|
+
const be = q(() => H(e(V), !l())), I = q(() => {
|
|
1619
1619
|
if (e(U) <= 0 || e(x) === 0)
|
|
1620
1620
|
return 0;
|
|
1621
|
-
const
|
|
1622
|
-
return
|
|
1623
|
-
}), j =
|
|
1621
|
+
const r = n() / 2, T = e(x) - r * 2;
|
|
1622
|
+
return r + e(U) * T;
|
|
1623
|
+
}), j = q(() => {
|
|
1624
1624
|
if (e(V).length === 0 || e(I) <= 0)
|
|
1625
1625
|
return "";
|
|
1626
|
-
const
|
|
1626
|
+
const r = [];
|
|
1627
1627
|
let T = null;
|
|
1628
1628
|
for (let A = 0; A < e(V).length; A++)
|
|
1629
1629
|
if (e(V)[A].x <= e(I))
|
|
1630
|
-
|
|
1630
|
+
r.push(e(V)[A]);
|
|
1631
1631
|
else {
|
|
1632
1632
|
T = e(V)[A];
|
|
1633
1633
|
break;
|
|
1634
1634
|
}
|
|
1635
|
-
if (
|
|
1635
|
+
if (r.length === 0)
|
|
1636
1636
|
return "";
|
|
1637
|
-
const
|
|
1638
|
-
if (T &&
|
|
1639
|
-
const A = (e(I) -
|
|
1640
|
-
|
|
1637
|
+
const P = r[r.length - 1];
|
|
1638
|
+
if (T && P.x < e(I)) {
|
|
1639
|
+
const A = (e(I) - P.x) / (T.x - P.x), N = P.y + A * (T.y - P.y);
|
|
1640
|
+
r.push({ x: e(I), y: N });
|
|
1641
1641
|
}
|
|
1642
|
-
return H(
|
|
1642
|
+
return H(r, !l());
|
|
1643
1643
|
});
|
|
1644
1644
|
de(() => {
|
|
1645
|
-
e(w) ?
|
|
1645
|
+
e(w) ? u.removeAttribute("data-placeholder") : u.setAttribute("data-placeholder", "");
|
|
1646
1646
|
});
|
|
1647
|
-
const B = Qe(() => e(
|
|
1647
|
+
const B = Qe(() => e(c), () => e(h), () => e(i).getBoundingClientRect()), ee = $e(() => e(c), () => e(h), () => e(y));
|
|
1648
1648
|
var b = {
|
|
1649
1649
|
get for() {
|
|
1650
|
-
return
|
|
1650
|
+
return a();
|
|
1651
1651
|
},
|
|
1652
|
-
set for(
|
|
1653
|
-
|
|
1652
|
+
set for(r = "") {
|
|
1653
|
+
a(r), v();
|
|
1654
1654
|
},
|
|
1655
1655
|
get lineWidth() {
|
|
1656
|
-
return
|
|
1656
|
+
return n();
|
|
1657
1657
|
},
|
|
1658
|
-
set lineWidth(
|
|
1659
|
-
|
|
1658
|
+
set lineWidth(r = 2) {
|
|
1659
|
+
n(r), v();
|
|
1660
1660
|
},
|
|
1661
1661
|
get height() {
|
|
1662
1662
|
return o();
|
|
1663
1663
|
},
|
|
1664
|
-
set height(
|
|
1665
|
-
o(
|
|
1664
|
+
set height(r = 56) {
|
|
1665
|
+
o(r), v();
|
|
1666
1666
|
},
|
|
1667
1667
|
get sharp() {
|
|
1668
|
-
return
|
|
1668
|
+
return l();
|
|
1669
1669
|
},
|
|
1670
|
-
set sharp(
|
|
1671
|
-
|
|
1670
|
+
set sharp(r = !1) {
|
|
1671
|
+
l(r), v();
|
|
1672
1672
|
}
|
|
1673
|
-
}, L =
|
|
1673
|
+
}, L = fr();
|
|
1674
1674
|
L.__click = B, L.__keydown = ee;
|
|
1675
|
-
var Q =
|
|
1675
|
+
var Q = K(L), ve = K(Q);
|
|
1676
1676
|
{
|
|
1677
|
-
var E = (
|
|
1678
|
-
var T =
|
|
1677
|
+
var E = (r) => {
|
|
1678
|
+
var T = sr(), P = te(T);
|
|
1679
1679
|
let A;
|
|
1680
|
-
var N = pe(
|
|
1680
|
+
var N = pe(P);
|
|
1681
1681
|
{
|
|
1682
|
-
var Y = (
|
|
1683
|
-
var O =
|
|
1682
|
+
var Y = (z) => {
|
|
1683
|
+
var O = lr();
|
|
1684
1684
|
let oe;
|
|
1685
1685
|
M(
|
|
1686
1686
|
(ae) => {
|
|
1687
|
-
oe = ie(O, 0, "line progress svelte-r3200f", null, oe, ae), W(O, "d", e(j)), W(O, "stroke-width",
|
|
1687
|
+
oe = ie(O, 0, "line progress svelte-r3200f", null, oe, ae), W(O, "d", e(j)), W(O, "stroke-width", n());
|
|
1688
1688
|
},
|
|
1689
|
-
[() => ({ sharp:
|
|
1690
|
-
), z
|
|
1689
|
+
[() => ({ sharp: l() })]
|
|
1690
|
+
), k(z, O);
|
|
1691
1691
|
};
|
|
1692
|
-
J(N, (
|
|
1693
|
-
e(j) &&
|
|
1692
|
+
J(N, (z) => {
|
|
1693
|
+
e(j) && z(Y);
|
|
1694
1694
|
});
|
|
1695
1695
|
}
|
|
1696
1696
|
M(
|
|
1697
|
-
(
|
|
1698
|
-
A = ie(
|
|
1697
|
+
(z) => {
|
|
1698
|
+
A = ie(P, 0, "line track svelte-r3200f", null, A, z), W(P, "d", e(be)), W(P, "stroke-width", n());
|
|
1699
1699
|
},
|
|
1700
|
-
[() => ({ sharp:
|
|
1701
|
-
),
|
|
1702
|
-
}, R = (
|
|
1703
|
-
var T = se(),
|
|
1700
|
+
[() => ({ sharp: l() })]
|
|
1701
|
+
), k(r, T);
|
|
1702
|
+
}, R = (r) => {
|
|
1703
|
+
var T = se(), P = te(T);
|
|
1704
1704
|
{
|
|
1705
1705
|
var A = (N) => {
|
|
1706
|
-
var Y =
|
|
1706
|
+
var Y = ur();
|
|
1707
1707
|
M(() => {
|
|
1708
|
-
W(Y, "x1",
|
|
1709
|
-
}),
|
|
1708
|
+
W(Y, "x1", n() / 2), W(Y, "y1", o() / 2), W(Y, "x2", e(x) - n() / 2), W(Y, "y2", o() / 2), W(Y, "stroke-width", n());
|
|
1709
|
+
}), k(N, Y);
|
|
1710
1710
|
};
|
|
1711
1711
|
J(
|
|
1712
|
-
|
|
1712
|
+
P,
|
|
1713
1713
|
(N) => {
|
|
1714
|
-
e(
|
|
1714
|
+
e(f) && N(A);
|
|
1715
1715
|
},
|
|
1716
1716
|
!0
|
|
1717
1717
|
);
|
|
1718
1718
|
}
|
|
1719
|
-
|
|
1719
|
+
k(r, T);
|
|
1720
1720
|
};
|
|
1721
|
-
J(ve, (
|
|
1722
|
-
e(
|
|
1721
|
+
J(ve, (r) => {
|
|
1722
|
+
e(f) && e(be) ? r(E) : r(R, !1);
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
|
-
return D(Q), D(L), Pe(L, (
|
|
1726
|
-
W(L, "aria-valuemax", e(h)), W(L, "aria-valuenow", e(y)), W(L, "aria-valuetext", e(
|
|
1727
|
-
}),
|
|
1725
|
+
return D(Q), D(L), Pe(L, (r) => m(i, r), () => e(i)), M(() => {
|
|
1726
|
+
W(L, "aria-valuemax", e(h)), W(L, "aria-valuenow", e(y)), W(L, "aria-valuetext", e(G)), W(Q, "height", o()), W(Q, "viewBox", `0 0 ${e(x)} ${o()}`);
|
|
1727
|
+
}), k(g, L), ye(b);
|
|
1728
1728
|
}
|
|
1729
1729
|
He(["click", "keydown"]);
|
|
1730
1730
|
customElements.define("fortyfour-line-waveform", ue(
|
|
1731
|
-
|
|
1731
|
+
dr,
|
|
1732
1732
|
{
|
|
1733
1733
|
for: { attribute: "for", reflect: !0 },
|
|
1734
1734
|
lineWidth: { attribute: "line-width", reflect: !0, type: "Number" },
|
|
@@ -1739,8 +1739,8 @@ customElements.define("fortyfour-line-waveform", ue(
|
|
|
1739
1739
|
[],
|
|
1740
1740
|
!0
|
|
1741
1741
|
));
|
|
1742
|
-
var
|
|
1743
|
-
const
|
|
1742
|
+
var vr = X('<div class="container svelte-16bcl3p" role="slider" tabindex="0" aria-valuemin="0" aria-label="Audio playback position"><div class="track svelte-16bcl3p"><div class="progress svelte-16bcl3p"></div></div></div>');
|
|
1743
|
+
const pr = {
|
|
1744
1744
|
hash: "svelte-16bcl3p",
|
|
1745
1745
|
code: `:host {--fortyfour-progress-bar-track-color: #e5e7eb;--fortyfour-progress-bar-progress-color: #3b82f6;--fortyfour-progress-bar-focus-color: #3b82f6;--fortyfour-progress-bar-focus-width: 2px;--fortyfour-progress-bar-focus-offset: 2px;display:flex;flex:1;}
|
|
1746
1746
|
|
|
@@ -1748,44 +1748,44 @@ const pt = {
|
|
|
1748
1748
|
}.container.svelte-16bcl3p {flex:1;display:flex;align-items:center;cursor:pointer;border-radius:4px;}.container.svelte-16bcl3p:focus-visible {outline:var(--fortyfour-progress-bar-focus-width) solid
|
|
1749
1749
|
var(--fortyfour-progress-bar-focus-color);outline-offset:var(--fortyfour-progress-bar-focus-offset);}.track.svelte-16bcl3p {width:100%;background:var(--fortyfour-progress-bar-track-color);overflow:hidden;}.progress.svelte-16bcl3p {height:100%;background:var(--fortyfour-progress-bar-progress-color);transition:width 0.1s linear;}`
|
|
1750
1750
|
};
|
|
1751
|
-
function
|
|
1752
|
-
ge(
|
|
1753
|
-
const
|
|
1754
|
-
let
|
|
1751
|
+
function gr(g, t) {
|
|
1752
|
+
ge(t, !0), we(g, pr);
|
|
1753
|
+
const u = t.$$host;
|
|
1754
|
+
let a = d(t, "for", 7, ""), n = d(t, "barHeight", 7, 4), o = d(t, "barRadius", 7, 2), l = S(0), s = S(0), y = S(null), h = S(null);
|
|
1755
1755
|
de(() => {
|
|
1756
|
-
if (!
|
|
1756
|
+
if (!a()) {
|
|
1757
1757
|
console.warn("fortyfour-progress-bar: 'for' attribute is required");
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
1760
|
-
const F =
|
|
1761
|
-
if (m(y, F.getElementById(
|
|
1762
|
-
console.warn(`fortyfour-progress-bar: element with id "${
|
|
1760
|
+
const F = u.getRootNode();
|
|
1761
|
+
if (m(y, F.getElementById(a()), !0), !e(y)) {
|
|
1762
|
+
console.warn(`fortyfour-progress-bar: element with id "${a()}" not found`);
|
|
1763
1763
|
return;
|
|
1764
1764
|
}
|
|
1765
|
-
e(y).duration && m(
|
|
1766
|
-
function
|
|
1767
|
-
m(
|
|
1765
|
+
e(y).duration && m(s, e(y).duration, !0), e(y).currentTime && m(l, e(y).currentTime, !0);
|
|
1766
|
+
function re() {
|
|
1767
|
+
m(s, e(y).duration, !0);
|
|
1768
1768
|
}
|
|
1769
1769
|
function V() {
|
|
1770
|
-
m(
|
|
1770
|
+
m(l, e(y).currentTime, !0);
|
|
1771
1771
|
}
|
|
1772
|
-
return e(y).addEventListener("loadedmetadata",
|
|
1773
|
-
e(y).removeEventListener("loadedmetadata",
|
|
1772
|
+
return e(y).addEventListener("loadedmetadata", re), e(y).addEventListener("timeupdate", V), () => {
|
|
1773
|
+
e(y).removeEventListener("loadedmetadata", re), e(y).removeEventListener("timeupdate", V);
|
|
1774
1774
|
};
|
|
1775
1775
|
});
|
|
1776
|
-
const
|
|
1777
|
-
var
|
|
1776
|
+
const c = q(() => e(s) > 0 ? e(l) / e(s) * 100 : 0), x = q(() => `${Me(e(l))} of ${Me(e(s))}`), f = Qe(() => e(y), () => e(s), () => e(h)?.getBoundingClientRect()), i = $e(() => e(y), () => e(s), () => e(l));
|
|
1777
|
+
var _ = {
|
|
1778
1778
|
get for() {
|
|
1779
|
-
return
|
|
1779
|
+
return a();
|
|
1780
1780
|
},
|
|
1781
1781
|
set for(F = "") {
|
|
1782
|
-
|
|
1782
|
+
a(F), v();
|
|
1783
1783
|
},
|
|
1784
1784
|
get barHeight() {
|
|
1785
|
-
return
|
|
1785
|
+
return n();
|
|
1786
1786
|
},
|
|
1787
1787
|
set barHeight(F = 4) {
|
|
1788
|
-
|
|
1788
|
+
n(F), v();
|
|
1789
1789
|
},
|
|
1790
1790
|
get barRadius() {
|
|
1791
1791
|
return o();
|
|
@@ -1793,31 +1793,31 @@ function gt(g, r) {
|
|
|
1793
1793
|
set barRadius(F = 2) {
|
|
1794
1794
|
o(F), v();
|
|
1795
1795
|
}
|
|
1796
|
-
}, p =
|
|
1797
|
-
p.__click =
|
|
1798
|
-
var w =
|
|
1796
|
+
}, p = vr();
|
|
1797
|
+
p.__click = f, p.__keydown = i;
|
|
1798
|
+
var w = K(p);
|
|
1799
1799
|
let C;
|
|
1800
|
-
var U =
|
|
1801
|
-
let
|
|
1800
|
+
var U = K(w);
|
|
1801
|
+
let G;
|
|
1802
1802
|
return D(w), Pe(w, (F) => m(h, F), () => e(h)), D(p), M(
|
|
1803
|
-
(F,
|
|
1804
|
-
W(p, "aria-valuemax", e(
|
|
1803
|
+
(F, re) => {
|
|
1804
|
+
W(p, "aria-valuemax", e(s)), W(p, "aria-valuenow", e(l)), W(p, "aria-valuetext", e(x)), C = me(w, "", C, F), G = me(U, "", G, re);
|
|
1805
1805
|
},
|
|
1806
1806
|
[
|
|
1807
1807
|
() => ({
|
|
1808
|
-
height: `${
|
|
1808
|
+
height: `${n() ?? ""}px`,
|
|
1809
1809
|
"border-radius": `${o() ?? ""}px`
|
|
1810
1810
|
}),
|
|
1811
1811
|
() => ({
|
|
1812
|
-
width: `${e(
|
|
1812
|
+
width: `${e(c) ?? ""}%`,
|
|
1813
1813
|
"border-radius": `${o() ?? ""}px`
|
|
1814
1814
|
})
|
|
1815
1815
|
]
|
|
1816
|
-
),
|
|
1816
|
+
), k(g, p), ye(_);
|
|
1817
1817
|
}
|
|
1818
1818
|
He(["click", "keydown"]);
|
|
1819
1819
|
customElements.define("fortyfour-progress-bar", ue(
|
|
1820
|
-
|
|
1820
|
+
gr,
|
|
1821
1821
|
{
|
|
1822
1822
|
for: { attribute: "for", reflect: !0 },
|
|
1823
1823
|
barHeight: { attribute: "bar-height", reflect: !0, type: "Number" },
|
|
@@ -1827,8 +1827,8 @@ customElements.define("fortyfour-progress-bar", ue(
|
|
|
1827
1827
|
[],
|
|
1828
1828
|
!0
|
|
1829
1829
|
));
|
|
1830
|
-
var
|
|
1831
|
-
const
|
|
1830
|
+
var yr = X("<span> </span>"), br = X('<div class="content svelte-1lixazt"><div class="text caption-text svelte-1lixazt"></div></div>'), hr = X("<span> </span>"), mr = X('<div class="text caption-text subtitle svelte-1lixazt"></div>'), wr = X('<div class="content subtitle-content svelte-1lixazt"><!></div>'), xr = X("<span> </span>"), kr = X('<div class="content svelte-1lixazt"><div class="text caption-text svelte-1lixazt"></div></div>'), _r = X('<div class="content svelte-1lixazt"><div class="text svelte-1lixazt"> </div></div>'), zr = X('<div class="placeholder-lines svelte-1lixazt"><span class="placeholder-line svelte-1lixazt"></span> <span class="placeholder-line short svelte-1lixazt"></span></div>'), Pr = X("<div><div><!></div></div>");
|
|
1831
|
+
const Lr = {
|
|
1832
1832
|
hash: "svelte-1lixazt",
|
|
1833
1833
|
code: `:host {--fortyfour-transcription-font-family: system-ui, sans-serif;--fortyfour-transcription-font-size: 14px;--fortyfour-transcription-color: #64748b;--fortyfour-transcription-active-color: #1e293b;--fortyfour-transcription-active-bg: #fef08a;--fortyfour-transcription-past-color: #1e293b;--fortyfour-transcription-placeholder-color: #e5e7eb;--fortyfour-transcription-fade-color: white;--fortyfour-transcription-scrollbar-thumb: #d1d5db;--fortyfour-transcription-scrollbar-thumb-hover: #9ca3af;--fortyfour-transcription-focus-color: #3b82f6;display:flex;font-family:var(--fortyfour-transcription-font-family);font-size:var(--fortyfour-transcription-font-size);}
|
|
1834
1834
|
|
|
@@ -1837,97 +1837,97 @@ const Lt = {
|
|
|
1837
1837
|
.wrapper.scrollable.svelte-1lixazt::after {content:"";position:absolute;left:0;right:0;height:24px;pointer-events:none;opacity:0;transition:opacity 0.15s ease;}.wrapper.scrollable.svelte-1lixazt::before {top:0;background:linear-gradient(to top, transparent, var(--fortyfour-transcription-fade-color));z-index:1;}.wrapper.scrollable.svelte-1lixazt::after {bottom:0;background:linear-gradient(to bottom, transparent, var(--fortyfour-transcription-fade-color));}.wrapper.can-scroll-up.svelte-1lixazt::before {opacity:1;}.wrapper.can-scroll-down.svelte-1lixazt::after {opacity:1;}.container.svelte-1lixazt {width:100%;}.container.scrollable.svelte-1lixazt {overflow-y:auto;scroll-behavior:smooth;padding-bottom:24px;scrollbar-width:thin;scrollbar-color:var(--fortyfour-transcription-scrollbar-thumb) transparent;}.container.scrollable.svelte-1lixazt::-webkit-scrollbar {width:6px;}.container.scrollable.svelte-1lixazt::-webkit-scrollbar-track {background:transparent;}.container.scrollable.svelte-1lixazt::-webkit-scrollbar-thumb {background-color:var(--fortyfour-transcription-scrollbar-thumb);border-radius:3px;}.container.scrollable.svelte-1lixazt::-webkit-scrollbar-thumb:hover {background-color:var(--fortyfour-transcription-scrollbar-thumb-hover);}.container.scrollable.svelte-1lixazt:focus-visible {outline:2px solid var(--fortyfour-transcription-focus-color);outline-offset:2px;}.content.svelte-1lixazt {width:100%;}.text.svelte-1lixazt {white-space:pre-wrap;word-wrap:break-word;}.caption-text.svelte-1lixazt {white-space:normal;color:var(--fortyfour-transcription-color);}.word.svelte-1lixazt {transition:color 0.15s ease,
|
|
1838
1838
|
background-color 0.15s ease;border-radius:2px;padding:0 1px;margin:0 -1px;}.word.active[data-type="word"].svelte-1lixazt {color:var(--fortyfour-transcription-active-color);background-color:var(--fortyfour-transcription-active-bg);}.word.past[data-type="word"].svelte-1lixazt {color:var(--fortyfour-transcription-past-color);}.subtitle-content.svelte-1lixazt {min-height:2em;display:flex;align-items:center;justify-content:center;}.subtitle.svelte-1lixazt {text-align:center;}.placeholder-lines.svelte-1lixazt {display:flex;flex-direction:column;gap:0.5em;}.placeholder-line.svelte-1lixazt {display:block;height:1em;background-color:var(--fortyfour-transcription-placeholder-color);border-radius:4px;}.placeholder-line.short.svelte-1lixazt {width:60%;}`
|
|
1839
1839
|
};
|
|
1840
|
-
function
|
|
1841
|
-
ge(
|
|
1842
|
-
const
|
|
1843
|
-
let
|
|
1844
|
-
const
|
|
1845
|
-
let y =
|
|
1846
|
-
function
|
|
1847
|
-
if (!e(
|
|
1840
|
+
function Er(g, t) {
|
|
1841
|
+
ge(t, !0), we(g, Lr);
|
|
1842
|
+
const u = t.$$host;
|
|
1843
|
+
let a = d(t, "for", 7, ""), n = d(t, "mode", 7, "static"), o = d(t, "maxHeight", 7, 0), l = S(null);
|
|
1844
|
+
const s = q(() => o() > 0);
|
|
1845
|
+
let y = S(!1), h = S(!1);
|
|
1846
|
+
function c() {
|
|
1847
|
+
if (!e(l) || !e(s)) {
|
|
1848
1848
|
m(y, !1), m(h, !1);
|
|
1849
1849
|
return;
|
|
1850
1850
|
}
|
|
1851
|
-
const { scrollTop: E, scrollHeight: R, clientHeight:
|
|
1852
|
-
m(y, E > 1), m(h, E +
|
|
1851
|
+
const { scrollTop: E, scrollHeight: R, clientHeight: r } = e(l);
|
|
1852
|
+
m(y, E > 1), m(h, E + r < R - 1);
|
|
1853
1853
|
}
|
|
1854
|
-
let x =
|
|
1855
|
-
const p = Ye(() => e(x) === null, 200), w =
|
|
1856
|
-
function
|
|
1854
|
+
let x = S(null), f = S(null), i = S("none"), _ = S(0);
|
|
1855
|
+
const p = Ye(() => e(x) === null, 200), w = q(() => e(x) !== null ? !1 : e(i) === "none" ? !0 : p()), C = q(() => e(f) !== null && e(f).length > 0), U = q(() => !e(C) || n() === "static" ? -1 : e(f).findIndex((E) => e(_) >= E.start && e(_) <= E.end));
|
|
1856
|
+
function G(E) {
|
|
1857
1857
|
const R = [];
|
|
1858
|
-
let
|
|
1858
|
+
let r = { words: [], start: 0, end: 0 };
|
|
1859
1859
|
for (const T of E) {
|
|
1860
|
-
|
|
1861
|
-
const
|
|
1862
|
-
(
|
|
1860
|
+
r.words.length === 0 && (r.start = T.start), r.words.push(T), r.end = T.end;
|
|
1861
|
+
const P = T.text.trim();
|
|
1862
|
+
(P.endsWith(".") || P.endsWith("?") || P.endsWith("!")) && (R.push(r), r = { words: [], start: 0, end: 0 });
|
|
1863
1863
|
}
|
|
1864
|
-
return
|
|
1864
|
+
return r.words.length > 0 && R.push(r), R;
|
|
1865
1865
|
}
|
|
1866
|
-
const F =
|
|
1866
|
+
const F = q(() => e(C) ? G(e(f)) : []), re = q(() => n() !== "subtitle" || e(F).length === 0 ? null : e(F).find((E) => e(_) >= E.start && e(_) <= E.end) ?? null);
|
|
1867
1867
|
function V(E) {
|
|
1868
|
-
return e(
|
|
1868
|
+
return e(_) >= E.start && e(_) <= E.end;
|
|
1869
1869
|
}
|
|
1870
1870
|
function H(E) {
|
|
1871
|
-
return e(
|
|
1871
|
+
return e(_) > E.end;
|
|
1872
1872
|
}
|
|
1873
1873
|
de(() => {
|
|
1874
|
-
if (!
|
|
1874
|
+
if (!a()) {
|
|
1875
1875
|
console.warn("fortyfour-transcription: 'for' attribute is required");
|
|
1876
1876
|
return;
|
|
1877
1877
|
}
|
|
1878
|
-
const R =
|
|
1878
|
+
const R = u.getRootNode().getElementById(a());
|
|
1879
1879
|
if (!R) {
|
|
1880
|
-
console.warn(`fortyfour-transcription: element with id "${
|
|
1880
|
+
console.warn(`fortyfour-transcription: element with id "${a()}" not found`);
|
|
1881
1881
|
return;
|
|
1882
1882
|
}
|
|
1883
|
-
m(
|
|
1884
|
-
const
|
|
1885
|
-
|
|
1883
|
+
m(i, R.getAttribute("preload") || "none", !0);
|
|
1884
|
+
const r = R.metadata;
|
|
1885
|
+
r && (m(x, r.transcription ?? null, !0), m(f, r.words ?? null, !0)), R.currentTime && m(_, R.currentTime, !0);
|
|
1886
1886
|
function T() {
|
|
1887
1887
|
const A = R.metadata;
|
|
1888
|
-
m(x, A?.transcription ?? null, !0), m(
|
|
1888
|
+
m(x, A?.transcription ?? null, !0), m(f, A?.words ?? null, !0);
|
|
1889
1889
|
}
|
|
1890
|
-
function
|
|
1891
|
-
m(
|
|
1890
|
+
function P() {
|
|
1891
|
+
m(_, R.currentTime, !0);
|
|
1892
1892
|
}
|
|
1893
|
-
return R.addEventListener("loadedmetadata", T), R.addEventListener("timeupdate",
|
|
1894
|
-
R.removeEventListener("loadedmetadata", T), R.removeEventListener("timeupdate",
|
|
1893
|
+
return R.addEventListener("loadedmetadata", T), R.addEventListener("timeupdate", P), () => {
|
|
1894
|
+
R.removeEventListener("loadedmetadata", T), R.removeEventListener("timeupdate", P);
|
|
1895
1895
|
};
|
|
1896
|
-
}), Te(
|
|
1897
|
-
if (!e(
|
|
1896
|
+
}), Te(u, "data-placeholder", () => e(w)), de(() => {
|
|
1897
|
+
if (!e(l) || !e(s))
|
|
1898
1898
|
return;
|
|
1899
|
-
|
|
1900
|
-
const E = new ResizeObserver(
|
|
1901
|
-
return E.observe(e(
|
|
1902
|
-
e(
|
|
1899
|
+
c(), e(l).addEventListener("scroll", c);
|
|
1900
|
+
const E = new ResizeObserver(c);
|
|
1901
|
+
return E.observe(e(l)), () => {
|
|
1902
|
+
e(l).removeEventListener("scroll", c), E.disconnect();
|
|
1903
1903
|
};
|
|
1904
1904
|
}), de(() => {
|
|
1905
|
-
if (!e(
|
|
1905
|
+
if (!e(s) || n() !== "karaoke")
|
|
1906
1906
|
return;
|
|
1907
|
-
if (e(
|
|
1908
|
-
e(
|
|
1907
|
+
if (e(_) < 0.1) {
|
|
1908
|
+
e(l)?.scrollTo({ top: 0, behavior: "smooth" });
|
|
1909
1909
|
return;
|
|
1910
1910
|
}
|
|
1911
1911
|
if (e(U) < 0)
|
|
1912
1912
|
return;
|
|
1913
|
-
const E = e(
|
|
1913
|
+
const E = e(l)?.querySelector(".word.active");
|
|
1914
1914
|
if (E) {
|
|
1915
|
-
const R = e(
|
|
1916
|
-
e(
|
|
1915
|
+
const R = e(l).getBoundingClientRect(), r = E.getBoundingClientRect(), T = e(l).scrollTop + (r.top - R.top) - R.height / 2 + r.height / 2;
|
|
1916
|
+
e(l).scrollTo({ top: T, behavior: "smooth" });
|
|
1917
1917
|
}
|
|
1918
1918
|
});
|
|
1919
1919
|
var be = {
|
|
1920
1920
|
get for() {
|
|
1921
|
-
return
|
|
1921
|
+
return a();
|
|
1922
1922
|
},
|
|
1923
1923
|
set for(E = "") {
|
|
1924
|
-
|
|
1924
|
+
a(E), v();
|
|
1925
1925
|
},
|
|
1926
1926
|
get mode() {
|
|
1927
|
-
return
|
|
1927
|
+
return n();
|
|
1928
1928
|
},
|
|
1929
1929
|
set mode(E = "static") {
|
|
1930
|
-
|
|
1930
|
+
n(E), v();
|
|
1931
1931
|
},
|
|
1932
1932
|
get maxHeight() {
|
|
1933
1933
|
return o();
|
|
@@ -1935,21 +1935,21 @@ function Et(g, r) {
|
|
|
1935
1935
|
set maxHeight(E = 0) {
|
|
1936
1936
|
o(E), v();
|
|
1937
1937
|
}
|
|
1938
|
-
}, I =
|
|
1938
|
+
}, I = Pr();
|
|
1939
1939
|
let j;
|
|
1940
|
-
var B =
|
|
1940
|
+
var B = K(I);
|
|
1941
1941
|
let ee, b;
|
|
1942
|
-
var L =
|
|
1942
|
+
var L = K(B);
|
|
1943
1943
|
{
|
|
1944
1944
|
var Q = (E) => {
|
|
1945
|
-
var R =
|
|
1946
|
-
Be(
|
|
1947
|
-
var N =
|
|
1945
|
+
var R = br(), r = K(R);
|
|
1946
|
+
Be(r, 21, () => e(f), Ne, (T, P, A) => {
|
|
1947
|
+
var N = yr();
|
|
1948
1948
|
let Y;
|
|
1949
|
-
var
|
|
1949
|
+
var z = K(N, !0);
|
|
1950
1950
|
D(N), M(
|
|
1951
1951
|
(O) => {
|
|
1952
|
-
Y = ie(N, 1, "word svelte-1lixazt", null, Y, O), W(N, "data-type", e(
|
|
1952
|
+
Y = ie(N, 1, "word svelte-1lixazt", null, Y, O), W(N, "data-type", e(P).type), Ee(z, e(P).text);
|
|
1953
1953
|
},
|
|
1954
1954
|
[
|
|
1955
1955
|
() => ({
|
|
@@ -1957,20 +1957,20 @@ function Et(g, r) {
|
|
|
1957
1957
|
past: A < e(U)
|
|
1958
1958
|
})
|
|
1959
1959
|
]
|
|
1960
|
-
),
|
|
1961
|
-
}), D(
|
|
1960
|
+
), k(T, N);
|
|
1961
|
+
}), D(r), D(R), Ce(1, R, () => Re, () => ({ duration: 400 })), k(E, R);
|
|
1962
1962
|
}, ve = (E) => {
|
|
1963
|
-
var R = se(),
|
|
1963
|
+
var R = se(), r = te(R);
|
|
1964
1964
|
{
|
|
1965
1965
|
var T = (A) => {
|
|
1966
|
-
var N =
|
|
1966
|
+
var N = wr(), Y = K(N);
|
|
1967
1967
|
{
|
|
1968
|
-
var
|
|
1969
|
-
var oe =
|
|
1970
|
-
Be(oe, 21, () => e(
|
|
1971
|
-
var le =
|
|
1968
|
+
var z = (O) => {
|
|
1969
|
+
var oe = mr();
|
|
1970
|
+
Be(oe, 21, () => e(re).words, Ne, (ae, ce) => {
|
|
1971
|
+
var le = hr();
|
|
1972
1972
|
let $;
|
|
1973
|
-
var xe =
|
|
1973
|
+
var xe = K(le, !0);
|
|
1974
1974
|
D(le), M(
|
|
1975
1975
|
(ne) => {
|
|
1976
1976
|
$ = ie(le, 1, "word svelte-1lixazt", null, $, ne), W(le, "data-type", e(ce).type), Ee(xe, e(ce).text);
|
|
@@ -1981,64 +1981,64 @@ function Et(g, r) {
|
|
|
1981
1981
|
past: H(e(ce))
|
|
1982
1982
|
})
|
|
1983
1983
|
]
|
|
1984
|
-
),
|
|
1985
|
-
}), D(oe), Ce(1, oe, () => Re, () => ({ duration: 200 })),
|
|
1984
|
+
), k(ae, le);
|
|
1985
|
+
}), D(oe), Ce(1, oe, () => Re, () => ({ duration: 200 })), k(O, oe);
|
|
1986
1986
|
};
|
|
1987
1987
|
J(Y, (O) => {
|
|
1988
|
-
e(
|
|
1988
|
+
e(re) && O(z);
|
|
1989
1989
|
});
|
|
1990
1990
|
}
|
|
1991
|
-
D(N),
|
|
1992
|
-
},
|
|
1993
|
-
var N = se(), Y =
|
|
1991
|
+
D(N), k(A, N);
|
|
1992
|
+
}, P = (A) => {
|
|
1993
|
+
var N = se(), Y = te(N);
|
|
1994
1994
|
{
|
|
1995
|
-
var
|
|
1996
|
-
var ae =
|
|
1997
|
-
Be(ce, 21, () => e(
|
|
1998
|
-
var ne = se(), fe =
|
|
1995
|
+
var z = (oe) => {
|
|
1996
|
+
var ae = kr(), ce = K(ae);
|
|
1997
|
+
Be(ce, 21, () => e(f), Ne, (le, $, xe) => {
|
|
1998
|
+
var ne = se(), fe = te(ne);
|
|
1999
1999
|
{
|
|
2000
|
-
var
|
|
2001
|
-
var
|
|
2000
|
+
var ke = (_e) => {
|
|
2001
|
+
var ze = xr();
|
|
2002
2002
|
let je;
|
|
2003
|
-
var Ue =
|
|
2004
|
-
D(
|
|
2005
|
-
(
|
|
2006
|
-
je = ie(
|
|
2003
|
+
var Ue = K(ze, !0);
|
|
2004
|
+
D(ze), M(
|
|
2005
|
+
(mt) => {
|
|
2006
|
+
je = ie(ze, 1, "word svelte-1lixazt", null, je, mt), W(ze, "data-type", e($).type), Ee(Ue, e($).text);
|
|
2007
2007
|
},
|
|
2008
2008
|
[() => ({ active: xe === e(U) })]
|
|
2009
|
-
), Ce(1,
|
|
2009
|
+
), Ce(1, ze, () => Re, () => ({ duration: 150 })), k(_e, ze);
|
|
2010
2010
|
};
|
|
2011
|
-
J(fe, (
|
|
2012
|
-
e(
|
|
2011
|
+
J(fe, (_e) => {
|
|
2012
|
+
e(_) >= e($).start && _e(ke);
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
|
-
|
|
2016
|
-
}), D(ce), D(ae), Ce(1, ae, () => Re, () => ({ duration: 400 })),
|
|
2015
|
+
k(le, ne);
|
|
2016
|
+
}), D(ce), D(ae), Ce(1, ae, () => Re, () => ({ duration: 400 })), k(oe, ae);
|
|
2017
2017
|
}, O = (oe) => {
|
|
2018
|
-
var ae = se(), ce =
|
|
2018
|
+
var ae = se(), ce = te(ae);
|
|
2019
2019
|
{
|
|
2020
2020
|
var le = (xe) => {
|
|
2021
|
-
var ne =
|
|
2022
|
-
D(fe), D(ne), M(() => Ee(
|
|
2021
|
+
var ne = _r(), fe = K(ne), ke = K(fe, !0);
|
|
2022
|
+
D(fe), D(ne), M(() => Ee(ke, e(x))), Ce(1, ne, () => Re, () => ({ duration: 400 })), k(xe, ne);
|
|
2023
2023
|
}, $ = (xe) => {
|
|
2024
|
-
var ne = se(), fe =
|
|
2024
|
+
var ne = se(), fe = te(ne);
|
|
2025
2025
|
{
|
|
2026
|
-
var
|
|
2027
|
-
var
|
|
2026
|
+
var ke = (_e) => {
|
|
2027
|
+
var ze = zr();
|
|
2028
2028
|
let je;
|
|
2029
|
-
M((Ue) => je = me(
|
|
2030
|
-
() => ({ height: e(
|
|
2031
|
-
]),
|
|
2029
|
+
M((Ue) => je = me(ze, "", je, Ue), [
|
|
2030
|
+
() => ({ height: e(s) ? `${o()}px` : void 0 })
|
|
2031
|
+
]), k(_e, ze);
|
|
2032
2032
|
};
|
|
2033
2033
|
J(
|
|
2034
2034
|
fe,
|
|
2035
|
-
(
|
|
2036
|
-
e(w) && ke
|
|
2035
|
+
(_e) => {
|
|
2036
|
+
e(w) && _e(ke);
|
|
2037
2037
|
},
|
|
2038
2038
|
!0
|
|
2039
2039
|
);
|
|
2040
2040
|
}
|
|
2041
|
-
|
|
2041
|
+
k(xe, ne);
|
|
2042
2042
|
};
|
|
2043
2043
|
J(
|
|
2044
2044
|
ce,
|
|
@@ -2048,51 +2048,51 @@ function Et(g, r) {
|
|
|
2048
2048
|
!0
|
|
2049
2049
|
);
|
|
2050
2050
|
}
|
|
2051
|
-
|
|
2051
|
+
k(oe, ae);
|
|
2052
2052
|
};
|
|
2053
2053
|
J(
|
|
2054
2054
|
Y,
|
|
2055
2055
|
(oe) => {
|
|
2056
|
-
|
|
2056
|
+
n() === "progressive" && e(C) ? oe(z) : oe(O, !1);
|
|
2057
2057
|
},
|
|
2058
2058
|
!0
|
|
2059
2059
|
);
|
|
2060
2060
|
}
|
|
2061
|
-
|
|
2061
|
+
k(A, N);
|
|
2062
2062
|
};
|
|
2063
2063
|
J(
|
|
2064
|
-
|
|
2064
|
+
r,
|
|
2065
2065
|
(A) => {
|
|
2066
|
-
|
|
2066
|
+
n() === "subtitle" && e(C) ? A(T) : A(P, !1);
|
|
2067
2067
|
},
|
|
2068
2068
|
!0
|
|
2069
2069
|
);
|
|
2070
2070
|
}
|
|
2071
|
-
|
|
2071
|
+
k(E, R);
|
|
2072
2072
|
};
|
|
2073
2073
|
J(L, (E) => {
|
|
2074
|
-
|
|
2074
|
+
n() === "karaoke" && e(C) ? E(Q) : E(ve, !1);
|
|
2075
2075
|
});
|
|
2076
2076
|
}
|
|
2077
|
-
return D(B), Pe(B, (E) => m(
|
|
2078
|
-
(E, R,
|
|
2079
|
-
j = ie(I, 1, "wrapper svelte-1lixazt", null, j, E), ee = ie(B, 1, "container svelte-1lixazt", null, ee, R), b = me(B, "", b,
|
|
2077
|
+
return D(B), Pe(B, (E) => m(l, E), () => e(l)), D(I), M(
|
|
2078
|
+
(E, R, r) => {
|
|
2079
|
+
j = ie(I, 1, "wrapper svelte-1lixazt", null, j, E), ee = ie(B, 1, "container svelte-1lixazt", null, ee, R), b = me(B, "", b, r);
|
|
2080
2080
|
},
|
|
2081
2081
|
[
|
|
2082
2082
|
() => ({
|
|
2083
|
-
scrollable: e(
|
|
2083
|
+
scrollable: e(s),
|
|
2084
2084
|
"can-scroll-up": e(y),
|
|
2085
2085
|
"can-scroll-down": e(h)
|
|
2086
2086
|
}),
|
|
2087
|
-
() => ({ scrollable: e(
|
|
2087
|
+
() => ({ scrollable: e(s) }),
|
|
2088
2088
|
() => ({
|
|
2089
|
-
"max-height": e(
|
|
2089
|
+
"max-height": e(s) ? `${o()}px` : void 0
|
|
2090
2090
|
})
|
|
2091
2091
|
]
|
|
2092
|
-
),
|
|
2092
|
+
), k(g, I), ye(be);
|
|
2093
2093
|
}
|
|
2094
2094
|
customElements.define("fortyfour-transcription", ue(
|
|
2095
|
-
|
|
2095
|
+
Er,
|
|
2096
2096
|
{
|
|
2097
2097
|
for: { attribute: "for", reflect: !0 },
|
|
2098
2098
|
mode: { attribute: "mode", reflect: !0 },
|
|
@@ -2102,8 +2102,8 @@ customElements.define("fortyfour-transcription", ue(
|
|
|
2102
2102
|
[],
|
|
2103
2103
|
!0
|
|
2104
2104
|
));
|
|
2105
|
-
var
|
|
2106
|
-
const
|
|
2105
|
+
var Ir = X('<div class="content svelte-z1j7sg"><div class="text svelte-z1j7sg"> </div></div>'), Cr = X('<div class="placeholder-lines svelte-z1j7sg"><span class="placeholder-line svelte-z1j7sg"></span> <span class="placeholder-line short svelte-z1j7sg"></span></div>'), Rr = X("<div><div><!></div></div>");
|
|
2106
|
+
const Tr = {
|
|
2107
2107
|
hash: "svelte-z1j7sg",
|
|
2108
2108
|
code: `:host {--fortyfour-translation-font-family: system-ui, sans-serif;--fortyfour-translation-font-size: 14px;--fortyfour-translation-placeholder-color: #e5e7eb;--fortyfour-translation-fade-color: white;--fortyfour-translation-scrollbar-thumb: #d1d5db;--fortyfour-translation-scrollbar-thumb-hover: #9ca3af;--fortyfour-translation-focus-color: #3b82f6;display:flex;font-family:var(--fortyfour-translation-font-family);font-size:var(--fortyfour-translation-font-size);}
|
|
2109
2109
|
|
|
@@ -2111,50 +2111,50 @@ const Tt = {
|
|
|
2111
2111
|
}.wrapper.svelte-z1j7sg {position:relative;width:100%;}.wrapper.scrollable.svelte-z1j7sg::before,
|
|
2112
2112
|
.wrapper.scrollable.svelte-z1j7sg::after {content:"";position:absolute;left:0;right:0;height:24px;pointer-events:none;opacity:0;transition:opacity 0.15s ease;}.wrapper.scrollable.svelte-z1j7sg::before {top:0;background:linear-gradient(to top, transparent, var(--fortyfour-translation-fade-color));z-index:1;}.wrapper.scrollable.svelte-z1j7sg::after {bottom:0;background:linear-gradient(to bottom, transparent, var(--fortyfour-translation-fade-color));}.wrapper.can-scroll-up.svelte-z1j7sg::before {opacity:1;}.wrapper.can-scroll-down.svelte-z1j7sg::after {opacity:1;}.container.svelte-z1j7sg {width:100%;}.container.scrollable.svelte-z1j7sg {overflow-y:auto;scroll-behavior:smooth;padding-bottom:24px;scrollbar-width:thin;scrollbar-color:var(--fortyfour-translation-scrollbar-thumb) transparent;}.container.scrollable.svelte-z1j7sg::-webkit-scrollbar {width:6px;}.container.scrollable.svelte-z1j7sg::-webkit-scrollbar-track {background:transparent;}.container.scrollable.svelte-z1j7sg::-webkit-scrollbar-thumb {background-color:var(--fortyfour-translation-scrollbar-thumb);border-radius:3px;}.container.scrollable.svelte-z1j7sg::-webkit-scrollbar-thumb:hover {background-color:var(--fortyfour-translation-scrollbar-thumb-hover);}.container.scrollable.svelte-z1j7sg:focus-visible {outline:2px solid var(--fortyfour-translation-focus-color);outline-offset:2px;}.content.svelte-z1j7sg {width:100%;}.text.svelte-z1j7sg {white-space:pre-wrap;word-wrap:break-word;}.placeholder-lines.svelte-z1j7sg {display:flex;flex-direction:column;gap:0.5em;}.placeholder-line.svelte-z1j7sg {display:block;height:1em;background-color:var(--fortyfour-translation-placeholder-color);border-radius:4px;}.placeholder-line.short.svelte-z1j7sg {width:60%;}`
|
|
2113
2113
|
};
|
|
2114
|
-
function
|
|
2115
|
-
ge(
|
|
2116
|
-
const
|
|
2117
|
-
let
|
|
2118
|
-
const
|
|
2119
|
-
let
|
|
2114
|
+
function Mr(g, t) {
|
|
2115
|
+
ge(t, !0), we(g, Tr);
|
|
2116
|
+
const u = t.$$host;
|
|
2117
|
+
let a = d(t, "for", 7, ""), n = d(t, "maxHeight", 7, 0), o = S(null);
|
|
2118
|
+
const l = q(() => n() > 0);
|
|
2119
|
+
let s = S(!1), y = S(!1);
|
|
2120
2120
|
function h() {
|
|
2121
|
-
if (!e(o) || !e(
|
|
2122
|
-
m(
|
|
2121
|
+
if (!e(o) || !e(l)) {
|
|
2122
|
+
m(s, !1), m(y, !1);
|
|
2123
2123
|
return;
|
|
2124
2124
|
}
|
|
2125
2125
|
const { scrollTop: I, scrollHeight: j, clientHeight: B } = e(o);
|
|
2126
|
-
m(
|
|
2126
|
+
m(s, I > 1), m(y, I + B < j - 1);
|
|
2127
2127
|
}
|
|
2128
|
-
let
|
|
2129
|
-
function
|
|
2128
|
+
let c = S(null), x = S("none");
|
|
2129
|
+
function f(I) {
|
|
2130
2130
|
if (!I)
|
|
2131
2131
|
return I;
|
|
2132
2132
|
const j = document.createElement("textarea");
|
|
2133
2133
|
return j.innerHTML = I, j.value;
|
|
2134
2134
|
}
|
|
2135
|
-
const
|
|
2135
|
+
const i = q(() => f(e(c))), _ = Ye(() => e(c) === null, 200), p = q(() => e(c) !== null ? !1 : e(x) === "none" ? !0 : _());
|
|
2136
2136
|
de(() => {
|
|
2137
|
-
if (!
|
|
2137
|
+
if (!a()) {
|
|
2138
2138
|
console.warn("fortyfour-translation: 'for' attribute is required");
|
|
2139
2139
|
return;
|
|
2140
2140
|
}
|
|
2141
|
-
const j =
|
|
2141
|
+
const j = u.getRootNode().getElementById(a());
|
|
2142
2142
|
if (!j) {
|
|
2143
|
-
console.warn(`fortyfour-translation: element with id "${
|
|
2143
|
+
console.warn(`fortyfour-translation: element with id "${a()}" not found`);
|
|
2144
2144
|
return;
|
|
2145
2145
|
}
|
|
2146
2146
|
m(x, j.getAttribute("preload") || "none", !0);
|
|
2147
2147
|
const B = j.metadata;
|
|
2148
|
-
B && m(
|
|
2148
|
+
B && m(c, B.translation ?? null, !0);
|
|
2149
2149
|
function ee() {
|
|
2150
2150
|
const b = j.metadata;
|
|
2151
|
-
m(
|
|
2151
|
+
m(c, b?.translation ?? null, !0);
|
|
2152
2152
|
}
|
|
2153
2153
|
return j.addEventListener("loadedmetadata", ee), () => {
|
|
2154
2154
|
j.removeEventListener("loadedmetadata", ee);
|
|
2155
2155
|
};
|
|
2156
|
-
}), Te(
|
|
2157
|
-
if (!e(o) || !e(
|
|
2156
|
+
}), Te(u, "data-placeholder", () => e(p)), de(() => {
|
|
2157
|
+
if (!e(o) || !e(l))
|
|
2158
2158
|
return;
|
|
2159
2159
|
h(), e(o).addEventListener("scroll", h);
|
|
2160
2160
|
const I = new ResizeObserver(h);
|
|
@@ -2164,35 +2164,35 @@ function Mt(g, r) {
|
|
|
2164
2164
|
});
|
|
2165
2165
|
var w = {
|
|
2166
2166
|
get for() {
|
|
2167
|
-
return
|
|
2167
|
+
return a();
|
|
2168
2168
|
},
|
|
2169
2169
|
set for(I = "") {
|
|
2170
|
-
|
|
2170
|
+
a(I), v();
|
|
2171
2171
|
},
|
|
2172
2172
|
get maxHeight() {
|
|
2173
|
-
return
|
|
2173
|
+
return n();
|
|
2174
2174
|
},
|
|
2175
2175
|
set maxHeight(I = 0) {
|
|
2176
|
-
|
|
2176
|
+
n(I), v();
|
|
2177
2177
|
}
|
|
2178
|
-
}, C =
|
|
2178
|
+
}, C = Rr();
|
|
2179
2179
|
let U;
|
|
2180
|
-
var
|
|
2181
|
-
let F,
|
|
2182
|
-
var V = G
|
|
2180
|
+
var G = K(C);
|
|
2181
|
+
let F, re;
|
|
2182
|
+
var V = K(G);
|
|
2183
2183
|
{
|
|
2184
2184
|
var H = (I) => {
|
|
2185
|
-
var j =
|
|
2186
|
-
D(B), D(j), M(() => Ee(ee, e(
|
|
2185
|
+
var j = Ir(), B = K(j), ee = K(B, !0);
|
|
2186
|
+
D(B), D(j), M(() => Ee(ee, e(i))), Ce(1, j, () => Re, () => ({ duration: 400 })), k(I, j);
|
|
2187
2187
|
}, be = (I) => {
|
|
2188
|
-
var j = se(), B =
|
|
2188
|
+
var j = se(), B = te(j);
|
|
2189
2189
|
{
|
|
2190
2190
|
var ee = (b) => {
|
|
2191
|
-
var L =
|
|
2191
|
+
var L = Cr();
|
|
2192
2192
|
let Q;
|
|
2193
2193
|
M((ve) => Q = me(L, "", Q, ve), [
|
|
2194
|
-
() => ({ height: e(
|
|
2195
|
-
]),
|
|
2194
|
+
() => ({ height: e(l) ? `${n()}px` : void 0 })
|
|
2195
|
+
]), k(b, L);
|
|
2196
2196
|
};
|
|
2197
2197
|
J(
|
|
2198
2198
|
B,
|
|
@@ -2202,31 +2202,31 @@ function Mt(g, r) {
|
|
|
2202
2202
|
!0
|
|
2203
2203
|
);
|
|
2204
2204
|
}
|
|
2205
|
-
|
|
2205
|
+
k(I, j);
|
|
2206
2206
|
};
|
|
2207
2207
|
J(V, (I) => {
|
|
2208
|
-
e(
|
|
2208
|
+
e(i) ? I(H) : I(be, !1);
|
|
2209
2209
|
});
|
|
2210
2210
|
}
|
|
2211
|
-
return D(
|
|
2211
|
+
return D(G), Pe(G, (I) => m(o, I), () => e(o)), D(C), M(
|
|
2212
2212
|
(I, j, B) => {
|
|
2213
|
-
U = ie(C, 1, "wrapper svelte-z1j7sg", null, U, I), F = ie(
|
|
2213
|
+
U = ie(C, 1, "wrapper svelte-z1j7sg", null, U, I), F = ie(G, 1, "container svelte-z1j7sg", null, F, j), re = me(G, "", re, B);
|
|
2214
2214
|
},
|
|
2215
2215
|
[
|
|
2216
2216
|
() => ({
|
|
2217
|
-
scrollable: e(
|
|
2218
|
-
"can-scroll-up": e(
|
|
2217
|
+
scrollable: e(l),
|
|
2218
|
+
"can-scroll-up": e(s),
|
|
2219
2219
|
"can-scroll-down": e(y)
|
|
2220
2220
|
}),
|
|
2221
|
-
() => ({ scrollable: e(
|
|
2221
|
+
() => ({ scrollable: e(l) }),
|
|
2222
2222
|
() => ({
|
|
2223
|
-
"max-height": e(
|
|
2223
|
+
"max-height": e(l) ? `${n()}px` : void 0
|
|
2224
2224
|
})
|
|
2225
2225
|
]
|
|
2226
|
-
),
|
|
2226
|
+
), k(g, C), ye(w);
|
|
2227
2227
|
}
|
|
2228
2228
|
customElements.define("fortyfour-translation", ue(
|
|
2229
|
-
|
|
2229
|
+
Mr,
|
|
2230
2230
|
{
|
|
2231
2231
|
for: { attribute: "for", reflect: !0 },
|
|
2232
2232
|
maxHeight: { attribute: "max-height", reflect: !0, type: "Number" }
|
|
@@ -2235,219 +2235,216 @@ customElements.define("fortyfour-translation", ue(
|
|
|
2235
2235
|
[],
|
|
2236
2236
|
!0
|
|
2237
2237
|
));
|
|
2238
|
-
var
|
|
2239
|
-
function
|
|
2240
|
-
ge(
|
|
2241
|
-
let
|
|
2238
|
+
var Hr = Le('<svg viewBox="0 0 359 254" aria-label="44" fill="currentColor"><path d="M92,300 C92.2666667,290.933333 92.8,280.533333 93.6,268.8 C93.8666667,262.666667 94,258.4 94,256 L6,256 L6,161.2 C7.33333333,159.333333 9.2,156.533333 11.6,152.8 C27.0666667,129.866667 39.3333333,110.733333 48.4,95.4 C57.4666667,80.0666667 65.2,63.8666667 71.6,46.8 L186,46.8 C128.4,122.533333 85.8666667,187.066667 58.4,240.4 L94,240.4 C94,240.133333 94,239.6 94,238.8 C93.4666667,228.666667 92.8,219.6 92,211.6 L185.2,72.4 C181.733333,91.0666667 180,127.333333 180,181.2 C180,235.066667 181.733333,274.666667 185.2,300 L92,300 Z" transform="translate(-6, -46)"></path><path d="M271,300 C271.266667,290.933333 271.8,280.533333 272.6,268.8 C272.866667,262.666667 273,258.4 273,256 L185,256 L185,161.2 C186.333333,159.333333 188.2,156.533333 190.6,152.8 C206.066667,129.866667 218.333333,110.733333 227.4,95.4 C236.466667,80.0666667 244.2,63.8666667 250.6,46.8 L365,46.8 C307.4,122.533333 264.866667,187.066667 237.4,240.4 L273,240.4 C273,240.133333 273,239.6 273,238.8 C272.466667,228.666667 271.8,219.6 271,211.6 L364.2,72.4 C360.733333,91.0666667 359,127.333333 359,181.2 C359,235.066667 360.733333,274.666667 364.2,300 L271,300 Z" transform="translate(-6, -46)"></path></svg>');
|
|
2239
|
+
function ht(g, t) {
|
|
2240
|
+
ge(t, !0);
|
|
2241
|
+
let u = d(t, "class", 7, ""), a = d(t, "height", 7, "1em"), n = d(t, "width", 7, "auto");
|
|
2242
2242
|
var o = {
|
|
2243
2243
|
get class() {
|
|
2244
|
-
return
|
|
2244
|
+
return u();
|
|
2245
2245
|
},
|
|
2246
|
-
set class(
|
|
2247
|
-
|
|
2246
|
+
set class(s = "") {
|
|
2247
|
+
u(s), v();
|
|
2248
2248
|
},
|
|
2249
2249
|
get height() {
|
|
2250
|
-
return
|
|
2250
|
+
return a();
|
|
2251
2251
|
},
|
|
2252
|
-
set height(
|
|
2253
|
-
|
|
2252
|
+
set height(s = "1em") {
|
|
2253
|
+
a(s), v();
|
|
2254
2254
|
},
|
|
2255
2255
|
get width() {
|
|
2256
|
-
return
|
|
2256
|
+
return n();
|
|
2257
2257
|
},
|
|
2258
|
-
set width(
|
|
2259
|
-
|
|
2258
|
+
set width(s = "auto") {
|
|
2259
|
+
n(s), v();
|
|
2260
2260
|
}
|
|
2261
|
-
},
|
|
2261
|
+
}, l = Hr();
|
|
2262
2262
|
return M(() => {
|
|
2263
|
-
ie(
|
|
2264
|
-
}),
|
|
2263
|
+
ie(l, 0, ut(u())), W(l, "height", a()), W(l, "width", n());
|
|
2264
|
+
}), k(g, l), ye(o);
|
|
2265
2265
|
}
|
|
2266
|
-
ue(
|
|
2267
|
-
var
|
|
2268
|
-
const
|
|
2269
|
-
hash: "svelte-
|
|
2270
|
-
code: `:host {--fortyfour-player-font-family: system-ui, sans-serif;--fortyfour-player-font-size: 14px;--fortyfour-player-accent: #c4956a;--fortyfour-player-background: #faf8f5;--fortyfour-player-surface: #f0ede8;--fortyfour-player-text: #2c2620;--fortyfour-player-muted: #8c8279;--fortyfour-player-border: #d9d4cc;display:block;font-family:var(--fortyfour-player-font-family);font-size:var(--fortyfour-player-font-size);}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
fortyfour-line-waveform.svelte-cwarz9,
|
|
2275
|
-
fortyfour-progress-bar.svelte-cwarz9 {height:100%;flex:1;}fortyfour-bar-waveform.svelte-cwarz9 {--waveform-progress-color: var(--fortyfour-player-accent);--waveform-track-color: var(--fortyfour-player-border);--waveform-focus-color: var(--fortyfour-player-accent);}fortyfour-line-waveform.svelte-cwarz9 {--fortyfour-line-waveform-progress-color: var(--fortyfour-player-accent);--fortyfour-line-waveform-track-color: var(--fortyfour-player-border);--fortyfour-line-waveform-focus-color: var(--fortyfour-player-accent);}fortyfour-progress-bar.svelte-cwarz9 {--fortyfour-progress-bar-progress-color: var(--fortyfour-player-accent);--fortyfour-progress-bar-track-color: var(--fortyfour-player-border);--fortyfour-progress-bar-focus-color: var(--fortyfour-player-accent);}.duration.svelte-cwarz9 {display:flex;align-items:center;gap:0.25rem;flex-shrink:0;}.elapsed.svelte-cwarz9 {--fortyfour-duration-font-family: var(--fortyfour-player-font-family);--fortyfour-duration-font-size: 1em;--fortyfour-duration-color: var(--fortyfour-player-text);font-weight:500;}.separator.svelte-cwarz9 {font-size:1em;color:var(--fortyfour-player-muted);}.total.svelte-cwarz9 {--fortyfour-duration-font-family: var(--fortyfour-player-font-family);--fortyfour-duration-font-size: 1em;--fortyfour-duration-color: var(--fortyfour-player-muted);}.transcription-box.svelte-cwarz9 {background:var(--fortyfour-player-surface);padding:0.75rem 1rem;border-top:1px solid var(--fortyfour-player-border);}.transcription-header.svelte-cwarz9 {display:flex;align-items:center;gap:0.5em;margin-bottom:0.5rem;}.transcription-label.svelte-cwarz9 {font-size:0.7em;font-weight:600;letter-spacing:0.05em;color:var(--fortyfour-player-muted);}.label-separator.svelte-cwarz9 {font-size:0.7em;color:var(--fortyfour-player-muted);}.translation-toggle.svelte-cwarz9 {font-size:0.7em;font-weight:600;letter-spacing:0.05em;color:var(--fortyfour-player-accent);background:none;border:none;padding:0;cursor:pointer;}.translation-toggle.svelte-cwarz9:hover {text-decoration:underline;}.translation-toggle.svelte-cwarz9:focus-visible {outline:2px solid var(--fortyfour-player-accent);outline-offset:2px;border-radius:2px;}fortyfour-transcription.svelte-cwarz9,
|
|
2276
|
-
fortyfour-translation.svelte-cwarz9 {display:block;line-height:1.5;color:var(--fortyfour-player-text);--fortyfour-transcription-font-family: var(--fortyfour-player-font-family);--fortyfour-transcription-font-size: 1em;--fortyfour-translation-font-family: var(--fortyfour-player-font-family);--fortyfour-translation-font-size: 1em;--fortyfour-transcription-color: var(--fortyfour-player-muted);--fortyfour-transcription-active-color: var(--fortyfour-player-background);--fortyfour-transcription-active-bg: var(--fortyfour-player-accent);--fortyfour-transcription-past-color: var(--fortyfour-player-text);--fortyfour-transcription-fade-color: var(--fortyfour-player-surface);--fortyfour-transcription-placeholder-color: var(--fortyfour-player-border);--fortyfour-transcription-scrollbar-thumb: var(--fortyfour-player-border);--fortyfour-transcription-scrollbar-thumb-hover: var(--fortyfour-player-muted);--fortyfour-transcription-focus-color: var(--fortyfour-player-accent);--fortyfour-translation-fade-color: var(--fortyfour-player-surface);--fortyfour-translation-placeholder-color: var(--fortyfour-player-border);--fortyfour-translation-scrollbar-thumb: var(--fortyfour-player-border);--fortyfour-translation-scrollbar-thumb-hover: var(--fortyfour-player-muted);--fortyfour-translation-focus-color: var(--fortyfour-player-accent);}.branding.svelte-cwarz9 {display:flex;align-items:center;gap:0.3em;width:fit-content;margin-left:auto;margin-top:0.5rem;margin-right:1rem;text-decoration:none;color:var(--fortyfour-player-muted);border-radius:4px;white-space:nowrap;}.branding.svelte-cwarz9:focus-visible {outline:2px solid var(--fortyfour-player-accent);outline-offset:2px;}.branding-text.svelte-cwarz9 {font-size:0.7em;font-weight:400;letter-spacing:0.01em;}`
|
|
2266
|
+
ue(ht, { class: {}, height: {}, width: {} }, [], [], !0);
|
|
2267
|
+
var jr = X("<fortyfour-progress-bar></fortyfour-progress-bar>", 2), Sr = X("<fortyfour-line-waveform></fortyfour-line-waveform>", 2), qr = X("<fortyfour-bar-waveform></fortyfour-bar-waveform>", 2), Ar = (g, t) => m(t, !e(t)), Br = X('<span class="label-separator svelte-14nd1et">•</span> <button class="translation-toggle svelte-14nd1et"> </button>', 1), Nr = X("<fortyfour-translation></fortyfour-translation>", 2), Wr = X("<fortyfour-transcription></fortyfour-transcription>", 2), Dr = X('<div class="transcription-box svelte-14nd1et"><div class="transcription-header svelte-14nd1et"><span class="transcription-label svelte-14nd1et">TRANSCRIPT</span> <!></div> <!></div>'), Ur = X('<a class="branding svelte-14nd1et" href="https://44.audio" target="_blank" rel="noopener noreferrer"><span class="branding-text svelte-14nd1et">powered by</span> <!></a>'), Fr = X('<fortyfour-recording></fortyfour-recording> <div><div class="player svelte-14nd1et"><fortyfour-play-button></fortyfour-play-button> <!> <div class="duration svelte-14nd1et"><fortyfour-duration><span slot="placeholder">0:00</span></fortyfour-duration> <span class="separator svelte-14nd1et">/</span> <fortyfour-duration><span slot="placeholder">0:00</span></fortyfour-duration></div></div> <!></div> <!>', 3);
|
|
2268
|
+
const Or = {
|
|
2269
|
+
hash: "svelte-14nd1et",
|
|
2270
|
+
code: `:host {--fortyfour-player-font-family: system-ui, sans-serif;--fortyfour-player-font-size: 14px;--fortyfour-player-accent: #c4956a;--fortyfour-player-background: #faf8f5;--fortyfour-player-surface: #f0ede8;--fortyfour-player-text: #2c2620;--fortyfour-player-muted: #8c8279;--fortyfour-player-border: #d9d4cc;display:block;font-family:var(--fortyfour-player-font-family);font-size:var(--fortyfour-player-font-size);}.container.svelte-14nd1et {border:1px solid var(--fortyfour-player-border);border-radius:12px;background:var(--fortyfour-player-background);overflow:hidden;}.container.square.svelte-14nd1et {border-radius:0;}.container.compact.svelte-14nd1et .player:where(.svelte-14nd1et) {height:44px;padding:0.5rem 0.75rem;gap:0.75rem;}.container.compact.svelte-14nd1et .transcription-box:where(.svelte-14nd1et) {padding:0.5rem 0.75rem;}.container.compact.svelte-14nd1et fortyfour-play-button:where(.svelte-14nd1et) {--fortyfour-play-button-size: 40px;}.container.comfortable.svelte-14nd1et .player:where(.svelte-14nd1et) {height:68px;padding:1rem 1.25rem;gap:1.25rem;}.container.comfortable.svelte-14nd1et .transcription-box:where(.svelte-14nd1et) {padding:1rem 1.25rem;}.container.comfortable.svelte-14nd1et fortyfour-play-button:where(.svelte-14nd1et) {--fortyfour-play-button-size: 56px;}.player.svelte-14nd1et {display:flex;align-items:center;gap:1rem;height:56px;padding:0.75rem 1rem;}fortyfour-play-button.svelte-14nd1et {--fortyfour-play-button-size: 48px;--fortyfour-play-button-background-color: var(--fortyfour-player-accent);--fortyfour-play-button-icon-color: var(--fortyfour-player-background);--fortyfour-play-button-border-width: 0;--fortyfour-play-button-focus-color: var(--fortyfour-player-accent);flex-shrink:0;}fortyfour-bar-waveform.svelte-14nd1et,
|
|
2271
|
+
fortyfour-line-waveform.svelte-14nd1et,
|
|
2272
|
+
fortyfour-progress-bar.svelte-14nd1et {height:100%;flex:1;}fortyfour-bar-waveform.svelte-14nd1et {--waveform-progress-color: var(--fortyfour-player-accent);--waveform-track-color: var(--fortyfour-player-border);--waveform-focus-color: var(--fortyfour-player-accent);}fortyfour-line-waveform.svelte-14nd1et {--fortyfour-line-waveform-progress-color: var(--fortyfour-player-accent);--fortyfour-line-waveform-track-color: var(--fortyfour-player-border);--fortyfour-line-waveform-focus-color: var(--fortyfour-player-accent);}fortyfour-progress-bar.svelte-14nd1et {--fortyfour-progress-bar-progress-color: var(--fortyfour-player-accent);--fortyfour-progress-bar-track-color: var(--fortyfour-player-border);--fortyfour-progress-bar-focus-color: var(--fortyfour-player-accent);}.duration.svelte-14nd1et {display:flex;align-items:center;gap:0.25rem;flex-shrink:0;}.elapsed.svelte-14nd1et {--fortyfour-duration-font-family: var(--fortyfour-player-font-family);--fortyfour-duration-font-size: 1em;--fortyfour-duration-color: var(--fortyfour-player-text);font-weight:500;}.separator.svelte-14nd1et {font-size:1em;color:var(--fortyfour-player-muted);}.total.svelte-14nd1et {--fortyfour-duration-font-family: var(--fortyfour-player-font-family);--fortyfour-duration-font-size: 1em;--fortyfour-duration-color: var(--fortyfour-player-muted);}.transcription-box.svelte-14nd1et {background:var(--fortyfour-player-surface);padding:0.75rem 1rem;border-top:1px solid var(--fortyfour-player-border);}.transcription-header.svelte-14nd1et {display:flex;align-items:center;gap:0.5em;margin-bottom:0.5rem;}.transcription-label.svelte-14nd1et {font-size:0.7em;font-weight:600;letter-spacing:0.05em;color:var(--fortyfour-player-muted);}.label-separator.svelte-14nd1et {font-size:0.7em;color:var(--fortyfour-player-muted);}.translation-toggle.svelte-14nd1et {font-size:0.7em;font-weight:600;letter-spacing:0.05em;color:var(--fortyfour-player-accent);background:none;border:none;padding:0;cursor:pointer;}.translation-toggle.svelte-14nd1et:hover {text-decoration:underline;}.translation-toggle.svelte-14nd1et:focus-visible {outline:2px solid var(--fortyfour-player-accent);outline-offset:2px;border-radius:2px;}fortyfour-transcription.svelte-14nd1et,
|
|
2273
|
+
fortyfour-translation.svelte-14nd1et {display:block;line-height:1.5;color:var(--fortyfour-player-text);--fortyfour-transcription-font-family: var(--fortyfour-player-font-family);--fortyfour-transcription-font-size: 1em;--fortyfour-translation-font-family: var(--fortyfour-player-font-family);--fortyfour-translation-font-size: 1em;--fortyfour-transcription-color: var(--fortyfour-player-muted);--fortyfour-transcription-active-color: var(--fortyfour-player-background);--fortyfour-transcription-active-bg: var(--fortyfour-player-accent);--fortyfour-transcription-past-color: var(--fortyfour-player-text);--fortyfour-transcription-fade-color: var(--fortyfour-player-surface);--fortyfour-transcription-placeholder-color: var(--fortyfour-player-border);--fortyfour-transcription-scrollbar-thumb: var(--fortyfour-player-border);--fortyfour-transcription-scrollbar-thumb-hover: var(--fortyfour-player-muted);--fortyfour-transcription-focus-color: var(--fortyfour-player-accent);--fortyfour-translation-fade-color: var(--fortyfour-player-surface);--fortyfour-translation-placeholder-color: var(--fortyfour-player-border);--fortyfour-translation-scrollbar-thumb: var(--fortyfour-player-border);--fortyfour-translation-scrollbar-thumb-hover: var(--fortyfour-player-muted);--fortyfour-translation-focus-color: var(--fortyfour-player-accent);}.branding.svelte-14nd1et {display:flex;align-items:center;gap:0.3em;width:fit-content;margin-left:auto;margin-top:0.5rem;margin-right:1rem;text-decoration:none;color:var(--fortyfour-player-muted);border-radius:4px;white-space:nowrap;}.branding.svelte-14nd1et:focus-visible {outline:2px solid var(--fortyfour-player-accent);outline-offset:2px;}.branding-text.svelte-14nd1et {font-size:0.7em;font-weight:400;letter-spacing:0.01em;}`
|
|
2277
2274
|
};
|
|
2278
|
-
function
|
|
2279
|
-
ge(
|
|
2280
|
-
const
|
|
2281
|
-
let
|
|
2282
|
-
const
|
|
2283
|
-
let
|
|
2284
|
-
const w =
|
|
2275
|
+
function Gr(g, t) {
|
|
2276
|
+
ge(t, !0), we(g, Or);
|
|
2277
|
+
const u = t.$$host;
|
|
2278
|
+
let a = d(t, "recordingId", 7), n = d(t, "apiHost", 7, "api.44.audio"), o = d(t, "shape", 7, "rounded"), l = d(t, "preload", 7, "none"), s = d(t, "spacing", 7, "default"), y = d(t, "progress", 7, "bar-waveform"), h = d(t, "hideTranscript", 7, !1), c = d(t, "hideTranslation", 7, !1), x = d(t, "hideBranding", 7, !1);
|
|
2279
|
+
const f = `fortyfour-player-${crypto.randomUUID().slice(0, 8)}`;
|
|
2280
|
+
let i = S(null), _ = S(!1), p = S(!1);
|
|
2281
|
+
const w = q(() => o() === "square"), C = q(() => e(w) ? "square" : "circle"), U = q(() => e(w) ? "0" : "2"), G = q(() => y() || "bar-waveform"), F = q(() => s() === "compact" ? 28 : s() === "comfortable" ? 48 : 40), re = q(() => s() === "compact" ? 4 : s() === "comfortable" ? 8 : 6);
|
|
2285
2282
|
function V() {
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2283
|
+
const z = e(i)?.state ?? "idle";
|
|
2284
|
+
u.setAttribute("data-state", z);
|
|
2288
2285
|
}
|
|
2289
2286
|
function H() {
|
|
2290
|
-
const
|
|
2291
|
-
m(
|
|
2287
|
+
const z = e(i)?.metadata?.translation;
|
|
2288
|
+
m(_, z != null && z !== "", !0);
|
|
2292
2289
|
}
|
|
2293
2290
|
de(() => {
|
|
2294
|
-
e(
|
|
2295
|
-
});
|
|
2291
|
+
e(i) && (V(), H());
|
|
2292
|
+
}), u.pause = () => e(i)?.pause(), u.togglePlay = () => e(i)?.togglePlay(), u.seek = (z) => e(i)?.seek(z);
|
|
2296
2293
|
var be = {
|
|
2297
2294
|
get recordingId() {
|
|
2298
|
-
return
|
|
2295
|
+
return a();
|
|
2299
2296
|
},
|
|
2300
|
-
set recordingId(
|
|
2301
|
-
|
|
2297
|
+
set recordingId(z) {
|
|
2298
|
+
a(z), v();
|
|
2302
2299
|
},
|
|
2303
2300
|
get apiHost() {
|
|
2304
|
-
return
|
|
2301
|
+
return n();
|
|
2305
2302
|
},
|
|
2306
|
-
set apiHost(
|
|
2307
|
-
|
|
2303
|
+
set apiHost(z = "api.44.audio") {
|
|
2304
|
+
n(z), v();
|
|
2308
2305
|
},
|
|
2309
2306
|
get shape() {
|
|
2310
2307
|
return o();
|
|
2311
2308
|
},
|
|
2312
|
-
set shape(
|
|
2313
|
-
o(
|
|
2309
|
+
set shape(z = "rounded") {
|
|
2310
|
+
o(z), v();
|
|
2314
2311
|
},
|
|
2315
2312
|
get preload() {
|
|
2316
|
-
return
|
|
2313
|
+
return l();
|
|
2317
2314
|
},
|
|
2318
|
-
set preload(
|
|
2319
|
-
|
|
2315
|
+
set preload(z = "none") {
|
|
2316
|
+
l(z), v();
|
|
2320
2317
|
},
|
|
2321
2318
|
get spacing() {
|
|
2322
|
-
return
|
|
2319
|
+
return s();
|
|
2323
2320
|
},
|
|
2324
|
-
set spacing(
|
|
2325
|
-
|
|
2321
|
+
set spacing(z = "default") {
|
|
2322
|
+
s(z), v();
|
|
2326
2323
|
},
|
|
2327
2324
|
get progress() {
|
|
2328
2325
|
return y();
|
|
2329
2326
|
},
|
|
2330
|
-
set progress(
|
|
2331
|
-
y(
|
|
2327
|
+
set progress(z = "bar-waveform") {
|
|
2328
|
+
y(z), v();
|
|
2332
2329
|
},
|
|
2333
2330
|
get hideTranscript() {
|
|
2334
2331
|
return h();
|
|
2335
2332
|
},
|
|
2336
|
-
set hideTranscript(
|
|
2337
|
-
h(
|
|
2333
|
+
set hideTranscript(z = !1) {
|
|
2334
|
+
h(z), v();
|
|
2338
2335
|
},
|
|
2339
2336
|
get hideTranslation() {
|
|
2340
|
-
return
|
|
2337
|
+
return c();
|
|
2341
2338
|
},
|
|
2342
|
-
set hideTranslation(
|
|
2343
|
-
|
|
2339
|
+
set hideTranslation(z = !1) {
|
|
2340
|
+
c(z), v();
|
|
2344
2341
|
},
|
|
2345
2342
|
get hideBranding() {
|
|
2346
2343
|
return x();
|
|
2347
2344
|
},
|
|
2348
|
-
set hideBranding(
|
|
2349
|
-
x(
|
|
2345
|
+
set hideBranding(z = !1) {
|
|
2346
|
+
x(z), v();
|
|
2350
2347
|
}
|
|
2351
|
-
}, I =
|
|
2352
|
-
M(() => Z(j, "id",
|
|
2348
|
+
}, I = Fr(), j = te(I);
|
|
2349
|
+
M(() => Z(j, "id", f)), M(() => Z(j, "api-host", n())), M(() => Z(j, "recording-id", a())), M(() => Z(j, "preload", l())), Pe(j, (z) => m(i, z), () => e(i));
|
|
2353
2350
|
var B = pe(j, 2);
|
|
2354
2351
|
let ee;
|
|
2355
|
-
var b =
|
|
2356
|
-
M(() => Z(L, "for",
|
|
2352
|
+
var b = K(B), L = K(b);
|
|
2353
|
+
M(() => Z(L, "for", f)), M(() => Z(L, "shape", e(C))), ie(L, 1, "svelte-14nd1et");
|
|
2357
2354
|
var Q = pe(L, 2);
|
|
2358
2355
|
{
|
|
2359
|
-
var ve = (
|
|
2360
|
-
var O =
|
|
2361
|
-
M(() => Z(O, "for",
|
|
2362
|
-
}, E = (
|
|
2363
|
-
var O = se(), oe =
|
|
2356
|
+
var ve = (z) => {
|
|
2357
|
+
var O = jr();
|
|
2358
|
+
M(() => Z(O, "for", f)), M(() => Z(O, "bar-height", e(re))), M(() => Z(O, "bar-radius", e(U))), ie(O, 1, "svelte-14nd1et"), k(z, O);
|
|
2359
|
+
}, E = (z) => {
|
|
2360
|
+
var O = se(), oe = te(O);
|
|
2364
2361
|
{
|
|
2365
2362
|
var ae = (le) => {
|
|
2366
|
-
var $ =
|
|
2367
|
-
M(() => Z($, "for",
|
|
2363
|
+
var $ = Sr();
|
|
2364
|
+
M(() => Z($, "for", f)), Z($, "line-width", "2"), M(() => Z($, "height", e(F))), M(() => Z($, "sharp", e(w))), ie($, 1, "svelte-14nd1et"), k(le, $);
|
|
2368
2365
|
}, ce = (le) => {
|
|
2369
|
-
var $ =
|
|
2370
|
-
M(() => Z($, "for",
|
|
2366
|
+
var $ = qr();
|
|
2367
|
+
M(() => Z($, "for", f)), Z($, "bar-width", "4"), Z($, "bar-gap", "2"), M(() => Z($, "bar-radius", e(U))), M(() => Z($, "height", e(F))), ie($, 1, "svelte-14nd1et"), k(le, $);
|
|
2371
2368
|
};
|
|
2372
2369
|
J(
|
|
2373
2370
|
oe,
|
|
2374
2371
|
(le) => {
|
|
2375
|
-
e(
|
|
2372
|
+
e(G) === "line-waveform" ? le(ae) : le(ce, !1);
|
|
2376
2373
|
},
|
|
2377
2374
|
!0
|
|
2378
2375
|
);
|
|
2379
2376
|
}
|
|
2380
|
-
z
|
|
2377
|
+
k(z, O);
|
|
2381
2378
|
};
|
|
2382
|
-
J(Q, (
|
|
2383
|
-
e(
|
|
2379
|
+
J(Q, (z) => {
|
|
2380
|
+
e(G) === "progress-bar" ? z(ve) : z(E, !1);
|
|
2384
2381
|
});
|
|
2385
2382
|
}
|
|
2386
|
-
var R = pe(Q, 2),
|
|
2387
|
-
ie(
|
|
2388
|
-
var T = pe(
|
|
2389
|
-
ie(T, 1, "total svelte-
|
|
2390
|
-
var
|
|
2383
|
+
var R = pe(Q, 2), r = K(R);
|
|
2384
|
+
ie(r, 1, "elapsed svelte-14nd1et"), M(() => Z(r, "for", f)), Z(r, "format", "elapsed");
|
|
2385
|
+
var T = pe(r, 4);
|
|
2386
|
+
ie(T, 1, "total svelte-14nd1et"), M(() => Z(T, "for", f)), Z(T, "format", "total"), D(R), D(b);
|
|
2387
|
+
var P = pe(b, 2);
|
|
2391
2388
|
{
|
|
2392
|
-
var A = (
|
|
2393
|
-
var O =
|
|
2389
|
+
var A = (z) => {
|
|
2390
|
+
var O = Dr(), oe = K(O), ae = pe(K(oe), 2);
|
|
2394
2391
|
{
|
|
2395
2392
|
var ce = (ne) => {
|
|
2396
|
-
var fe =
|
|
2397
|
-
|
|
2398
|
-
var
|
|
2399
|
-
D(
|
|
2400
|
-
W(
|
|
2401
|
-
}),
|
|
2393
|
+
var fe = Br(), ke = pe(te(fe), 2);
|
|
2394
|
+
ke.__click = [Ar, p];
|
|
2395
|
+
var _e = K(ke, !0);
|
|
2396
|
+
D(ke), M(() => {
|
|
2397
|
+
W(ke, "aria-pressed", e(p)), Ee(_e, e(p) ? "ORIGINAL" : "TRANSLATION");
|
|
2398
|
+
}), k(ne, fe);
|
|
2402
2399
|
};
|
|
2403
2400
|
J(ae, (ne) => {
|
|
2404
|
-
e(
|
|
2401
|
+
e(_) && !c() && ne(ce);
|
|
2405
2402
|
});
|
|
2406
2403
|
}
|
|
2407
2404
|
D(oe);
|
|
2408
2405
|
var le = pe(oe, 2);
|
|
2409
2406
|
{
|
|
2410
2407
|
var $ = (ne) => {
|
|
2411
|
-
var fe =
|
|
2412
|
-
M(() => Z(fe, "for",
|
|
2408
|
+
var fe = Nr();
|
|
2409
|
+
M(() => Z(fe, "for", f)), Z(fe, "max-height", "96"), ie(fe, 1, "svelte-14nd1et"), k(ne, fe);
|
|
2413
2410
|
}, xe = (ne) => {
|
|
2414
|
-
var fe =
|
|
2415
|
-
M(() => Z(fe, "for",
|
|
2411
|
+
var fe = Wr();
|
|
2412
|
+
M(() => Z(fe, "for", f)), Z(fe, "mode", "karaoke"), Z(fe, "max-height", "96"), ie(fe, 1, "svelte-14nd1et"), k(ne, fe);
|
|
2416
2413
|
};
|
|
2417
2414
|
J(le, (ne) => {
|
|
2418
|
-
e(p) && !
|
|
2415
|
+
e(p) && !c() ? ne($) : ne(xe, !1);
|
|
2419
2416
|
});
|
|
2420
2417
|
}
|
|
2421
|
-
D(O), z
|
|
2418
|
+
D(O), k(z, O);
|
|
2422
2419
|
};
|
|
2423
|
-
J(
|
|
2424
|
-
h() ||
|
|
2420
|
+
J(P, (z) => {
|
|
2421
|
+
h() || z(A);
|
|
2425
2422
|
});
|
|
2426
2423
|
}
|
|
2427
2424
|
D(B);
|
|
2428
2425
|
var N = pe(B, 2);
|
|
2429
2426
|
{
|
|
2430
|
-
var Y = (
|
|
2431
|
-
var O =
|
|
2432
|
-
|
|
2427
|
+
var Y = (z) => {
|
|
2428
|
+
var O = Ur(), oe = pe(K(O), 2);
|
|
2429
|
+
ht(oe, { class: "branding-logo", height: "0.65em" }), D(O), k(z, O);
|
|
2433
2430
|
};
|
|
2434
|
-
J(N, (
|
|
2435
|
-
x() ||
|
|
2431
|
+
J(N, (z) => {
|
|
2432
|
+
x() || z(Y);
|
|
2436
2433
|
});
|
|
2437
2434
|
}
|
|
2438
|
-
return M((
|
|
2435
|
+
return M((z) => ee = ie(B, 1, "container svelte-14nd1et", null, ee, z), [
|
|
2439
2436
|
() => ({
|
|
2440
2437
|
square: e(w),
|
|
2441
|
-
compact:
|
|
2442
|
-
comfortable:
|
|
2438
|
+
compact: s() === "compact",
|
|
2439
|
+
comfortable: s() === "comfortable"
|
|
2443
2440
|
})
|
|
2444
2441
|
]), he("loadedmetadata", j, () => {
|
|
2445
2442
|
V(), H();
|
|
2446
|
-
}), he("play", j, V), he("pause", j, V), he("error", j, V), he("ended", j, V),
|
|
2443
|
+
}), he("play", j, V), he("pause", j, V), he("error", j, V), he("ended", j, V), k(g, I), ye(be);
|
|
2447
2444
|
}
|
|
2448
2445
|
He(["click"]);
|
|
2449
2446
|
customElements.define("fortyfour-player", ue(
|
|
2450
|
-
|
|
2447
|
+
Gr,
|
|
2451
2448
|
{
|
|
2452
2449
|
apiHost: { attribute: "api-host", reflect: !0 },
|
|
2453
2450
|
recordingId: { attribute: "recording-id", reflect: !0 },
|
|
@@ -2467,39 +2464,39 @@ customElements.define("fortyfour-player", ue(
|
|
|
2467
2464
|
[],
|
|
2468
2465
|
!0
|
|
2469
2466
|
));
|
|
2470
|
-
var
|
|
2471
|
-
const
|
|
2467
|
+
var Kr = X("<fortyfour-recording></fortyfour-recording> <fortyfour-play-button></fortyfour-play-button>", 3);
|
|
2468
|
+
const Xr = {
|
|
2472
2469
|
hash: "svelte-1i43bu9",
|
|
2473
2470
|
code: `:host {--fortyfour-mini-player-accent: #c4956a;--fortyfour-mini-player-background: #faf8f5;display:inline-block;}
|
|
2474
2471
|
|
|
2475
2472
|
@media (prefers-color-scheme: dark) {:host {--fortyfour-mini-player-accent: #d4a574;--fortyfour-mini-player-background: #1c1917;}
|
|
2476
2473
|
}fortyfour-play-button.svelte-1i43bu9 {--fortyfour-play-button-size: 48px;--fortyfour-play-button-background-color: var(--fortyfour-mini-player-background);--fortyfour-play-button-icon-color: var(--fortyfour-mini-player-accent);--fortyfour-play-button-border-width: 0;--fortyfour-play-button-ring-width: 3px;--fortyfour-play-button-ring-fill-color: var(--fortyfour-mini-player-accent);--fortyfour-play-button-ring-track-color: var(--fortyfour-mini-player-background);--fortyfour-play-button-focus-color: var(--fortyfour-mini-player-accent);}fortyfour-play-button.small.svelte-1i43bu9 {--fortyfour-play-button-size: 32px;--fortyfour-play-button-ring-width: 2px;}fortyfour-play-button.large.svelte-1i43bu9 {--fortyfour-play-button-size: 64px;--fortyfour-play-button-ring-width: 4px;}`
|
|
2477
2474
|
};
|
|
2478
|
-
function
|
|
2479
|
-
ge(
|
|
2480
|
-
const
|
|
2481
|
-
let
|
|
2482
|
-
const
|
|
2483
|
-
let y =
|
|
2475
|
+
function Zr(g, t) {
|
|
2476
|
+
ge(t, !0), we(g, Xr);
|
|
2477
|
+
const u = t.$$host;
|
|
2478
|
+
let a = d(t, "recordingId", 7), n = d(t, "apiHost", 7, "api.44.audio"), o = d(t, "size", 7, "medium"), l = d(t, "preload", 7, "none");
|
|
2479
|
+
const s = `fortyfour-mini-player-${crypto.randomUUID().slice(0, 8)}`;
|
|
2480
|
+
let y = S(null);
|
|
2484
2481
|
function h() {
|
|
2485
2482
|
const p = e(y)?.state ?? "idle";
|
|
2486
|
-
|
|
2483
|
+
u.setAttribute("data-state", p);
|
|
2487
2484
|
}
|
|
2488
2485
|
de(() => {
|
|
2489
2486
|
e(y) && h();
|
|
2490
2487
|
});
|
|
2491
|
-
var
|
|
2488
|
+
var c = {
|
|
2492
2489
|
get recordingId() {
|
|
2493
|
-
return
|
|
2490
|
+
return a();
|
|
2494
2491
|
},
|
|
2495
2492
|
set recordingId(p) {
|
|
2496
|
-
|
|
2493
|
+
a(p), v();
|
|
2497
2494
|
},
|
|
2498
2495
|
get apiHost() {
|
|
2499
|
-
return
|
|
2496
|
+
return n();
|
|
2500
2497
|
},
|
|
2501
2498
|
set apiHost(p = "api.44.audio") {
|
|
2502
|
-
|
|
2499
|
+
n(p), v();
|
|
2503
2500
|
},
|
|
2504
2501
|
get size() {
|
|
2505
2502
|
return o();
|
|
@@ -2508,21 +2505,21 @@ function Zt(g, r) {
|
|
|
2508
2505
|
o(p), v();
|
|
2509
2506
|
},
|
|
2510
2507
|
get preload() {
|
|
2511
|
-
return
|
|
2508
|
+
return l();
|
|
2512
2509
|
},
|
|
2513
2510
|
set preload(p = "none") {
|
|
2514
|
-
|
|
2511
|
+
l(p), v();
|
|
2515
2512
|
}
|
|
2516
|
-
}, x =
|
|
2517
|
-
M(() => Z(
|
|
2518
|
-
var
|
|
2519
|
-
let
|
|
2520
|
-
return M(() => Z(
|
|
2513
|
+
}, x = Kr(), f = te(x);
|
|
2514
|
+
M(() => Z(f, "id", s)), M(() => Z(f, "api-host", n())), M(() => Z(f, "recording-id", a())), M(() => Z(f, "preload", l())), Pe(f, (p) => m(y, p), () => e(y));
|
|
2515
|
+
var i = pe(f, 2);
|
|
2516
|
+
let _;
|
|
2517
|
+
return M(() => Z(i, "for", s)), Z(i, "shape", "circle"), Z(i, "visualization", "ring"), M((p) => _ = ie(i, 1, "button svelte-1i43bu9", null, _, p), [
|
|
2521
2518
|
() => ({ small: o() === "small", large: o() === "large" })
|
|
2522
|
-
]), he("loadedmetadata",
|
|
2519
|
+
]), he("loadedmetadata", f, h), he("play", f, h), he("pause", f, h), he("error", f, h), he("ended", f, h), k(g, x), ye(c);
|
|
2523
2520
|
}
|
|
2524
2521
|
customElements.define("fortyfour-mini-player", ue(
|
|
2525
|
-
|
|
2522
|
+
Zr,
|
|
2526
2523
|
{
|
|
2527
2524
|
apiHost: { attribute: "api-host", reflect: !0 },
|
|
2528
2525
|
recordingId: { attribute: "recording-id", reflect: !0 },
|