@pie-players/pie-tool-tts-inline 0.3.7 → 0.3.8
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/README.md +22 -10
- package/dist/tool-tts-inline.js +1504 -1147
- package/package.json +3 -3
package/dist/tool-tts-inline.js
CHANGED
|
@@ -1,135 +1,141 @@
|
|
|
1
|
-
import { connectToolRuntimeContext as
|
|
2
|
-
const
|
|
3
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
4
|
-
const
|
|
5
|
-
var
|
|
6
|
-
const
|
|
1
|
+
import { connectToolRuntimeContext as Jr, connectToolShellContext as Xr, connectToolRegionScopeContext as Zr } from "@pie-players/pie-assessment-toolkit";
|
|
2
|
+
const Qr = "5";
|
|
3
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Qr);
|
|
4
|
+
const ei = 1, ti = 2, ni = 16, ri = 1, ii = 4, si = 8, oi = 16, li = 2, In = "[", Wt = "[!", bn = "[?", Gt = "]", Ye = {}, M = /* @__PURE__ */ Symbol(), Pn = "http://www.w3.org/1999/xhtml", Dt = !1;
|
|
5
|
+
var Ln = Array.isArray, ai = Array.prototype.indexOf, Ke = Array.prototype.includes, At = Array.from, St = Object.keys, xt = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, fi = Object.getOwnPropertyDescriptors, ui = Object.prototype, ci = Array.prototype, Dn = Object.getPrototypeOf, yn = Object.isExtensible;
|
|
6
|
+
const di = () => {
|
|
7
7
|
};
|
|
8
|
-
function
|
|
8
|
+
function hi(e) {
|
|
9
9
|
for (var t = 0; t < e.length; t++)
|
|
10
10
|
e[t]();
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function Fn() {
|
|
13
13
|
var e, t, n = new Promise((r, i) => {
|
|
14
14
|
e = r, t = i;
|
|
15
15
|
});
|
|
16
16
|
return { promise: n, resolve: e, reject: t };
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const L = 2, et = 4, We = 8, Jt = 1 << 24, Se = 16, se = 32, xe = 64, Ft = 128, G = 512, I = 1024, P = 2048, re = 4096, B = 8192, fe = 16384, Be = 32768, Ge = 65536, $n = 1 << 17, vi = 1 << 18, He = 1 << 19, _i = 1 << 20, _e = 1 << 25, Pe = 65536, Bt = 1 << 21, Xt = 1 << 22, ye = 1 << 23, dt = /* @__PURE__ */ Symbol("$state"), Bn = /* @__PURE__ */ Symbol("legacy props"), pi = /* @__PURE__ */ Symbol(""), Re = new class extends Error {
|
|
19
19
|
name = "StaleReactionError";
|
|
20
20
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
21
|
-
}(),
|
|
21
|
+
}(), gi = (
|
|
22
22
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
23
23
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
24
|
-
),
|
|
25
|
-
function
|
|
24
|
+
), zt = 3, pt = 8;
|
|
25
|
+
function mi() {
|
|
26
26
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function wi(e, t, n) {
|
|
29
|
+
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
30
|
+
}
|
|
31
|
+
function bi(e) {
|
|
29
32
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
30
33
|
}
|
|
31
|
-
function
|
|
34
|
+
function yi() {
|
|
32
35
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
33
36
|
}
|
|
34
|
-
function
|
|
37
|
+
function $i(e) {
|
|
35
38
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
36
39
|
}
|
|
37
|
-
function
|
|
40
|
+
function Ei() {
|
|
38
41
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
39
42
|
}
|
|
40
|
-
function
|
|
43
|
+
function Ti() {
|
|
41
44
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
42
45
|
}
|
|
43
|
-
function
|
|
46
|
+
function Si(e) {
|
|
47
|
+
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
48
|
+
}
|
|
49
|
+
function xi() {
|
|
44
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
45
51
|
}
|
|
46
|
-
function
|
|
52
|
+
function ki() {
|
|
47
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
48
54
|
}
|
|
49
|
-
function
|
|
55
|
+
function Ai() {
|
|
50
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
51
57
|
}
|
|
52
|
-
function
|
|
58
|
+
function zi() {
|
|
53
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
54
60
|
}
|
|
55
|
-
function
|
|
61
|
+
function Rt(e) {
|
|
56
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
57
63
|
}
|
|
58
|
-
function
|
|
64
|
+
function Ri() {
|
|
59
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
60
66
|
}
|
|
61
|
-
let
|
|
62
|
-
function
|
|
63
|
-
|
|
67
|
+
let x = !1;
|
|
68
|
+
function pe(e) {
|
|
69
|
+
x = e;
|
|
64
70
|
}
|
|
65
|
-
let
|
|
66
|
-
function
|
|
71
|
+
let T;
|
|
72
|
+
function Y(e) {
|
|
67
73
|
if (e === null)
|
|
68
|
-
throw
|
|
69
|
-
return
|
|
74
|
+
throw Rt(), Ye;
|
|
75
|
+
return T = e;
|
|
70
76
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
77
|
+
function Ct() {
|
|
78
|
+
return Y(/* @__PURE__ */ ce(T));
|
|
73
79
|
}
|
|
74
|
-
function
|
|
75
|
-
if (
|
|
76
|
-
if (/* @__PURE__ */
|
|
77
|
-
throw
|
|
78
|
-
|
|
80
|
+
function je(e) {
|
|
81
|
+
if (x) {
|
|
82
|
+
if (/* @__PURE__ */ ce(T) !== null)
|
|
83
|
+
throw Rt(), Ye;
|
|
84
|
+
T = e;
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
for (var t = e, n =
|
|
87
|
+
function Ci(e = 1) {
|
|
88
|
+
if (x) {
|
|
89
|
+
for (var t = e, n = T; t--; )
|
|
84
90
|
n = /** @type {TemplateNode} */
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
91
|
+
/* @__PURE__ */ ce(n);
|
|
92
|
+
T = n;
|
|
87
93
|
}
|
|
88
94
|
}
|
|
89
|
-
function
|
|
90
|
-
for (var t = 0, n =
|
|
91
|
-
if (n.nodeType ===
|
|
95
|
+
function kt(e = !0) {
|
|
96
|
+
for (var t = 0, n = T; ; ) {
|
|
97
|
+
if (n.nodeType === pt) {
|
|
92
98
|
var r = (
|
|
93
99
|
/** @type {Comment} */
|
|
94
100
|
n.data
|
|
95
101
|
);
|
|
96
|
-
if (r ===
|
|
102
|
+
if (r === Gt) {
|
|
97
103
|
if (t === 0) return n;
|
|
98
104
|
t -= 1;
|
|
99
|
-
} else (r ===
|
|
105
|
+
} else (r === In || r === Wt || // "[1", "[2", etc. for if blocks
|
|
100
106
|
r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
|
|
101
107
|
}
|
|
102
108
|
var i = (
|
|
103
109
|
/** @type {TemplateNode} */
|
|
104
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ ce(n)
|
|
105
111
|
);
|
|
106
112
|
e && n.remove(), n = i;
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
|
-
function
|
|
110
|
-
if (!e || e.nodeType !==
|
|
111
|
-
throw
|
|
115
|
+
function Hn(e) {
|
|
116
|
+
if (!e || e.nodeType !== pt)
|
|
117
|
+
throw Rt(), Ye;
|
|
112
118
|
return (
|
|
113
119
|
/** @type {Comment} */
|
|
114
120
|
e.data
|
|
115
121
|
);
|
|
116
122
|
}
|
|
117
|
-
function
|
|
123
|
+
function jn(e) {
|
|
118
124
|
return e === this.v;
|
|
119
125
|
}
|
|
120
|
-
function
|
|
126
|
+
function Ni(e, t) {
|
|
121
127
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
122
128
|
}
|
|
123
|
-
function
|
|
124
|
-
return !
|
|
129
|
+
function Un(e) {
|
|
130
|
+
return !Ni(e, this.v);
|
|
125
131
|
}
|
|
126
|
-
let
|
|
127
|
-
function
|
|
128
|
-
|
|
132
|
+
let Oi = !1, X = null;
|
|
133
|
+
function Je(e) {
|
|
134
|
+
X = e;
|
|
129
135
|
}
|
|
130
|
-
function
|
|
131
|
-
|
|
132
|
-
p:
|
|
136
|
+
function Vn(e, t = !1, n) {
|
|
137
|
+
X = {
|
|
138
|
+
p: X,
|
|
133
139
|
i: !1,
|
|
134
140
|
c: null,
|
|
135
141
|
e: null,
|
|
@@ -138,52 +144,52 @@ function sn(e, t = !1, n) {
|
|
|
138
144
|
l: null
|
|
139
145
|
};
|
|
140
146
|
}
|
|
141
|
-
function
|
|
147
|
+
function qn(e) {
|
|
142
148
|
var t = (
|
|
143
149
|
/** @type {ComponentContext} */
|
|
144
|
-
|
|
150
|
+
X
|
|
145
151
|
), n = t.e;
|
|
146
152
|
if (n !== null) {
|
|
147
153
|
t.e = null;
|
|
148
154
|
for (var r of n)
|
|
149
|
-
|
|
155
|
+
hr(r);
|
|
150
156
|
}
|
|
151
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
157
|
+
return e !== void 0 && (t.x = e), t.i = !0, X = t.p, e ?? /** @type {T} */
|
|
152
158
|
{};
|
|
153
159
|
}
|
|
154
|
-
function
|
|
160
|
+
function Yn() {
|
|
155
161
|
return !0;
|
|
156
162
|
}
|
|
157
|
-
let
|
|
158
|
-
function
|
|
159
|
-
var e =
|
|
160
|
-
|
|
163
|
+
let Ce = [];
|
|
164
|
+
function Kn() {
|
|
165
|
+
var e = Ce;
|
|
166
|
+
Ce = [], hi(e);
|
|
161
167
|
}
|
|
162
|
-
function
|
|
163
|
-
if (
|
|
164
|
-
var t =
|
|
168
|
+
function $e(e) {
|
|
169
|
+
if (Ce.length === 0 && !ht) {
|
|
170
|
+
var t = Ce;
|
|
165
171
|
queueMicrotask(() => {
|
|
166
|
-
t ===
|
|
172
|
+
t === Ce && Kn();
|
|
167
173
|
});
|
|
168
174
|
}
|
|
169
|
-
|
|
175
|
+
Ce.push(e);
|
|
170
176
|
}
|
|
171
|
-
function
|
|
172
|
-
for (;
|
|
173
|
-
|
|
177
|
+
function Mi() {
|
|
178
|
+
for (; Ce.length > 0; )
|
|
179
|
+
Kn();
|
|
174
180
|
}
|
|
175
|
-
function
|
|
176
|
-
var t =
|
|
181
|
+
function Wn(e) {
|
|
182
|
+
var t = S;
|
|
177
183
|
if (t === null)
|
|
178
|
-
return
|
|
179
|
-
if ((t.f &
|
|
184
|
+
return E.f |= ye, e;
|
|
185
|
+
if ((t.f & Be) === 0 && (t.f & et) === 0)
|
|
180
186
|
throw e;
|
|
181
|
-
|
|
187
|
+
be(e, t);
|
|
182
188
|
}
|
|
183
|
-
function
|
|
189
|
+
function be(e, t) {
|
|
184
190
|
for (; t !== null; ) {
|
|
185
|
-
if ((t.f &
|
|
186
|
-
if ((t.f &
|
|
191
|
+
if ((t.f & Ft) !== 0) {
|
|
192
|
+
if ((t.f & Be) === 0)
|
|
187
193
|
throw e;
|
|
188
194
|
try {
|
|
189
195
|
t.b.error(e);
|
|
@@ -196,29 +202,29 @@ function ae(e, t) {
|
|
|
196
202
|
}
|
|
197
203
|
throw e;
|
|
198
204
|
}
|
|
199
|
-
const
|
|
200
|
-
function
|
|
201
|
-
e.f = e.f &
|
|
205
|
+
const Ii = -7169;
|
|
206
|
+
function C(e, t) {
|
|
207
|
+
e.f = e.f & Ii | t;
|
|
202
208
|
}
|
|
203
|
-
function
|
|
204
|
-
(e.f &
|
|
209
|
+
function Zt(e) {
|
|
210
|
+
(e.f & G) !== 0 || e.deps === null ? C(e, I) : C(e, re);
|
|
205
211
|
}
|
|
206
|
-
function
|
|
212
|
+
function Gn(e) {
|
|
207
213
|
if (e !== null)
|
|
208
214
|
for (const t of e)
|
|
209
|
-
(t.f &
|
|
215
|
+
(t.f & L) === 0 || (t.f & Pe) === 0 || (t.f ^= Pe, Gn(
|
|
210
216
|
/** @type {Derived} */
|
|
211
217
|
t.deps
|
|
212
218
|
));
|
|
213
219
|
}
|
|
214
|
-
function
|
|
215
|
-
(e.f &
|
|
220
|
+
function Jn(e, t, n) {
|
|
221
|
+
(e.f & P) !== 0 ? t.add(e) : (e.f & re) !== 0 && n.add(e), Gn(e.deps), C(e, I);
|
|
216
222
|
}
|
|
217
|
-
const
|
|
218
|
-
let
|
|
219
|
-
class
|
|
223
|
+
const mt = /* @__PURE__ */ new Set();
|
|
224
|
+
let z = null, te = null, j = [], Nt = null, ht = !1, Xe = null, Pi = 1;
|
|
225
|
+
class ge {
|
|
220
226
|
// for debugging. TODO remove once async is stable
|
|
221
|
-
id =
|
|
227
|
+
id = Pi++;
|
|
222
228
|
/**
|
|
223
229
|
* The current values of any sources that are updated in this batch
|
|
224
230
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -249,7 +255,7 @@ class se {
|
|
|
249
255
|
/**
|
|
250
256
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
251
257
|
*/
|
|
252
|
-
#
|
|
258
|
+
#l = 0;
|
|
253
259
|
/**
|
|
254
260
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
255
261
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
@@ -260,7 +266,7 @@ class se {
|
|
|
260
266
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
261
267
|
* @type {Set<Effect>}
|
|
262
268
|
*/
|
|
263
|
-
#
|
|
269
|
+
#o = /* @__PURE__ */ new Set();
|
|
264
270
|
/**
|
|
265
271
|
* Deferred effects that are MAYBE_DIRTY
|
|
266
272
|
* @type {Set<Effect>}
|
|
@@ -277,7 +283,7 @@ class se {
|
|
|
277
283
|
is_fork = !1;
|
|
278
284
|
#a = !1;
|
|
279
285
|
#u() {
|
|
280
|
-
return this.is_fork || this.#
|
|
286
|
+
return this.is_fork || this.#l > 0;
|
|
281
287
|
}
|
|
282
288
|
/**
|
|
283
289
|
* Add an effect to the #skipped_branches map and reset its children
|
|
@@ -296,9 +302,9 @@ class se {
|
|
|
296
302
|
if (n) {
|
|
297
303
|
this.#s.delete(t);
|
|
298
304
|
for (var r of n.d)
|
|
299
|
-
|
|
305
|
+
C(r, P), ae(r);
|
|
300
306
|
for (r of n.m)
|
|
301
|
-
|
|
307
|
+
C(r, re), ae(r);
|
|
302
308
|
}
|
|
303
309
|
}
|
|
304
310
|
/**
|
|
@@ -306,20 +312,20 @@ class se {
|
|
|
306
312
|
* @param {Effect[]} root_effects
|
|
307
313
|
*/
|
|
308
314
|
process(t) {
|
|
309
|
-
|
|
310
|
-
var n =
|
|
315
|
+
j = [], this.apply();
|
|
316
|
+
var n = Xe = [], r = [];
|
|
311
317
|
for (const i of t)
|
|
312
318
|
this.#f(i, n, r);
|
|
313
|
-
if (
|
|
319
|
+
if (Xe = null, this.#u()) {
|
|
314
320
|
this.#c(r), this.#c(n);
|
|
315
321
|
for (const [i, s] of this.#s)
|
|
316
|
-
|
|
322
|
+
er(i, s);
|
|
317
323
|
} else {
|
|
318
|
-
|
|
324
|
+
z = null;
|
|
319
325
|
for (const i of this.#e) i(this);
|
|
320
|
-
this.#e.clear(), this.#n === 0 && this.#
|
|
326
|
+
this.#e.clear(), this.#n === 0 && this.#d(), En(r), En(n), this.#o.clear(), this.#i.clear(), this.#r?.resolve();
|
|
321
327
|
}
|
|
322
|
-
|
|
328
|
+
te = null;
|
|
323
329
|
}
|
|
324
330
|
/**
|
|
325
331
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -329,21 +335,21 @@ class se {
|
|
|
329
335
|
* @param {Effect[]} render_effects
|
|
330
336
|
*/
|
|
331
337
|
#f(t, n, r) {
|
|
332
|
-
t.f ^=
|
|
338
|
+
t.f ^= I;
|
|
333
339
|
for (var i = t.first; i !== null; ) {
|
|
334
|
-
var s = i.f,
|
|
340
|
+
var s = i.f, o = (s & (se | xe)) !== 0, l = o && (s & I) !== 0, a = (s & B) !== 0, f = l || this.#s.has(i);
|
|
335
341
|
if (!f && i.fn !== null) {
|
|
336
|
-
|
|
337
|
-
var
|
|
338
|
-
if (
|
|
339
|
-
i =
|
|
342
|
+
o ? a || (i.f ^= I) : (s & et) !== 0 ? n.push(i) : (s & (We | Jt)) !== 0 && a ? r.push(i) : gt(i) && (Qe(i), (s & Se) !== 0 && (this.#i.add(i), a && C(i, P)));
|
|
343
|
+
var h = i.first;
|
|
344
|
+
if (h !== null) {
|
|
345
|
+
i = h;
|
|
340
346
|
continue;
|
|
341
347
|
}
|
|
342
348
|
}
|
|
343
349
|
for (; i !== null; ) {
|
|
344
|
-
var
|
|
345
|
-
if (
|
|
346
|
-
i =
|
|
350
|
+
var v = i.next;
|
|
351
|
+
if (v !== null) {
|
|
352
|
+
i = v;
|
|
347
353
|
break;
|
|
348
354
|
}
|
|
349
355
|
i = i.parent;
|
|
@@ -355,7 +361,7 @@ class se {
|
|
|
355
361
|
*/
|
|
356
362
|
#c(t) {
|
|
357
363
|
for (var n = 0; n < t.length; n += 1)
|
|
358
|
-
|
|
364
|
+
Jn(t[n], this.#o, this.#i);
|
|
359
365
|
}
|
|
360
366
|
/**
|
|
361
367
|
* Associate a change to a given source with the current
|
|
@@ -364,20 +370,20 @@ class se {
|
|
|
364
370
|
* @param {any} value
|
|
365
371
|
*/
|
|
366
372
|
capture(t, n) {
|
|
367
|
-
n !==
|
|
373
|
+
n !== M && !this.previous.has(t) && this.previous.set(t, n), (t.f & ye) === 0 && (this.current.set(t, t.v), te?.set(t, t.v));
|
|
368
374
|
}
|
|
369
375
|
activate() {
|
|
370
|
-
|
|
376
|
+
z = this, this.apply();
|
|
371
377
|
}
|
|
372
378
|
deactivate() {
|
|
373
|
-
|
|
379
|
+
z === this && (z = null, te = null);
|
|
374
380
|
}
|
|
375
381
|
flush() {
|
|
376
|
-
if (
|
|
377
|
-
|
|
382
|
+
if (j.length > 0)
|
|
383
|
+
z = this, Xn();
|
|
378
384
|
else if (this.#n === 0 && !this.is_fork) {
|
|
379
385
|
for (const t of this.#e) t(this);
|
|
380
|
-
this.#e.clear(), this.#
|
|
386
|
+
this.#e.clear(), this.#d(), this.#r?.resolve();
|
|
381
387
|
}
|
|
382
388
|
this.deactivate();
|
|
383
389
|
}
|
|
@@ -385,67 +391,67 @@ class se {
|
|
|
385
391
|
for (const t of this.#t) t(this);
|
|
386
392
|
this.#t.clear();
|
|
387
393
|
}
|
|
388
|
-
#
|
|
389
|
-
if (
|
|
394
|
+
#d() {
|
|
395
|
+
if (mt.size > 1) {
|
|
390
396
|
this.previous.clear();
|
|
391
|
-
var t =
|
|
392
|
-
for (const s of
|
|
397
|
+
var t = z, n = te, r = !0;
|
|
398
|
+
for (const s of mt) {
|
|
393
399
|
if (s === this) {
|
|
394
400
|
r = !1;
|
|
395
401
|
continue;
|
|
396
402
|
}
|
|
397
|
-
const
|
|
403
|
+
const o = [];
|
|
398
404
|
for (const [a, f] of this.current) {
|
|
399
405
|
if (s.current.has(a))
|
|
400
406
|
if (r && f !== s.current.get(a))
|
|
401
407
|
s.current.set(a, f);
|
|
402
408
|
else
|
|
403
409
|
continue;
|
|
404
|
-
|
|
410
|
+
o.push(a);
|
|
405
411
|
}
|
|
406
|
-
if (
|
|
412
|
+
if (o.length === 0)
|
|
407
413
|
continue;
|
|
408
|
-
const
|
|
409
|
-
if (
|
|
410
|
-
var i =
|
|
411
|
-
|
|
414
|
+
const l = [...s.current.keys()].filter((a) => !this.current.has(a));
|
|
415
|
+
if (l.length > 0) {
|
|
416
|
+
var i = j;
|
|
417
|
+
j = [];
|
|
412
418
|
const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
413
|
-
for (const
|
|
414
|
-
|
|
415
|
-
if (
|
|
416
|
-
|
|
417
|
-
for (const
|
|
418
|
-
s.#f(
|
|
419
|
+
for (const h of o)
|
|
420
|
+
Zn(h, l, a, f);
|
|
421
|
+
if (j.length > 0) {
|
|
422
|
+
z = s, s.apply();
|
|
423
|
+
for (const h of j)
|
|
424
|
+
s.#f(h, [], []);
|
|
419
425
|
s.deactivate();
|
|
420
426
|
}
|
|
421
|
-
|
|
427
|
+
j = i;
|
|
422
428
|
}
|
|
423
429
|
}
|
|
424
|
-
|
|
430
|
+
z = t, te = n;
|
|
425
431
|
}
|
|
426
|
-
this.#s.clear(),
|
|
432
|
+
this.#s.clear(), mt.delete(this);
|
|
427
433
|
}
|
|
428
434
|
/**
|
|
429
435
|
*
|
|
430
436
|
* @param {boolean} blocking
|
|
431
437
|
*/
|
|
432
438
|
increment(t) {
|
|
433
|
-
this.#n += 1, t && (this.#
|
|
439
|
+
this.#n += 1, t && (this.#l += 1);
|
|
434
440
|
}
|
|
435
441
|
/**
|
|
436
442
|
*
|
|
437
443
|
* @param {boolean} blocking
|
|
438
444
|
*/
|
|
439
445
|
decrement(t) {
|
|
440
|
-
this.#n -= 1, t && (this.#
|
|
441
|
-
this.#a = !1, this.#u() ?
|
|
446
|
+
this.#n -= 1, t && (this.#l -= 1), !this.#a && (this.#a = !0, $e(() => {
|
|
447
|
+
this.#a = !1, this.#u() ? j.length > 0 && this.flush() : this.revive();
|
|
442
448
|
}));
|
|
443
449
|
}
|
|
444
450
|
revive() {
|
|
445
|
-
for (const t of this.#
|
|
446
|
-
this.#i.delete(t),
|
|
451
|
+
for (const t of this.#o)
|
|
452
|
+
this.#i.delete(t), C(t, P), ae(t);
|
|
447
453
|
for (const t of this.#i)
|
|
448
|
-
|
|
454
|
+
C(t, re), ae(t);
|
|
449
455
|
this.flush();
|
|
450
456
|
}
|
|
451
457
|
/** @param {(batch: Batch) => void} fn */
|
|
@@ -457,105 +463,105 @@ class se {
|
|
|
457
463
|
this.#t.add(t);
|
|
458
464
|
}
|
|
459
465
|
settled() {
|
|
460
|
-
return (this.#r ??=
|
|
466
|
+
return (this.#r ??= Fn()).promise;
|
|
461
467
|
}
|
|
462
468
|
static ensure() {
|
|
463
|
-
if (
|
|
464
|
-
const t =
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
if (z === null) {
|
|
470
|
+
const t = z = new ge();
|
|
471
|
+
mt.add(z), ht || $e(() => {
|
|
472
|
+
z === t && t.flush();
|
|
467
473
|
});
|
|
468
474
|
}
|
|
469
|
-
return
|
|
475
|
+
return z;
|
|
470
476
|
}
|
|
471
477
|
apply() {
|
|
472
478
|
}
|
|
473
479
|
}
|
|
474
|
-
function
|
|
475
|
-
var t =
|
|
476
|
-
|
|
480
|
+
function ft(e) {
|
|
481
|
+
var t = ht;
|
|
482
|
+
ht = !0;
|
|
477
483
|
try {
|
|
478
484
|
for (var n; ; ) {
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
485
|
+
if (Mi(), j.length === 0 && (z?.flush(), j.length === 0))
|
|
486
|
+
return Nt = null, /** @type {T} */
|
|
481
487
|
n;
|
|
482
|
-
|
|
488
|
+
Xn();
|
|
483
489
|
}
|
|
484
490
|
} finally {
|
|
485
|
-
|
|
491
|
+
ht = t;
|
|
486
492
|
}
|
|
487
493
|
}
|
|
488
|
-
function
|
|
494
|
+
function Xn() {
|
|
489
495
|
var e = null;
|
|
490
496
|
try {
|
|
491
|
-
for (var t = 0;
|
|
492
|
-
var n =
|
|
497
|
+
for (var t = 0; j.length > 0; ) {
|
|
498
|
+
var n = ge.ensure();
|
|
493
499
|
if (t++ > 1e3) {
|
|
494
500
|
var r, i;
|
|
495
|
-
|
|
501
|
+
Li();
|
|
496
502
|
}
|
|
497
|
-
n.process(
|
|
503
|
+
n.process(j), Ee.clear();
|
|
498
504
|
}
|
|
499
505
|
} finally {
|
|
500
|
-
|
|
506
|
+
j = [], Nt = null, Xe = null;
|
|
501
507
|
}
|
|
502
508
|
}
|
|
503
|
-
function
|
|
509
|
+
function Li() {
|
|
504
510
|
try {
|
|
505
|
-
|
|
511
|
+
Ei();
|
|
506
512
|
} catch (e) {
|
|
507
|
-
|
|
513
|
+
be(e, Nt);
|
|
508
514
|
}
|
|
509
515
|
}
|
|
510
|
-
let
|
|
511
|
-
function
|
|
516
|
+
let ve = null;
|
|
517
|
+
function En(e) {
|
|
512
518
|
var t = e.length;
|
|
513
519
|
if (t !== 0) {
|
|
514
520
|
for (var n = 0; n < t; ) {
|
|
515
521
|
var r = e[n++];
|
|
516
|
-
if ((r.f & (
|
|
517
|
-
|
|
518
|
-
for (const i of
|
|
519
|
-
if ((i.f & (
|
|
522
|
+
if ((r.f & (fe | B)) === 0 && gt(r) && (ve = /* @__PURE__ */ new Set(), Qe(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && pr(r), ve?.size > 0)) {
|
|
523
|
+
Ee.clear();
|
|
524
|
+
for (const i of ve) {
|
|
525
|
+
if ((i.f & (fe | B)) !== 0) continue;
|
|
520
526
|
const s = [i];
|
|
521
|
-
let
|
|
522
|
-
for (;
|
|
523
|
-
|
|
524
|
-
for (let
|
|
525
|
-
const a = s[
|
|
526
|
-
(a.f & (
|
|
527
|
+
let o = i.parent;
|
|
528
|
+
for (; o !== null; )
|
|
529
|
+
ve.has(o) && (ve.delete(o), s.push(o)), o = o.parent;
|
|
530
|
+
for (let l = s.length - 1; l >= 0; l--) {
|
|
531
|
+
const a = s[l];
|
|
532
|
+
(a.f & (fe | B)) === 0 && Qe(a);
|
|
527
533
|
}
|
|
528
534
|
}
|
|
529
|
-
|
|
535
|
+
ve.clear();
|
|
530
536
|
}
|
|
531
537
|
}
|
|
532
|
-
|
|
538
|
+
ve = null;
|
|
533
539
|
}
|
|
534
540
|
}
|
|
535
|
-
function
|
|
541
|
+
function Zn(e, t, n, r) {
|
|
536
542
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
537
543
|
for (const i of e.reactions) {
|
|
538
544
|
const s = i.f;
|
|
539
|
-
(s &
|
|
545
|
+
(s & L) !== 0 ? Zn(
|
|
540
546
|
/** @type {Derived} */
|
|
541
547
|
i,
|
|
542
548
|
t,
|
|
543
549
|
n,
|
|
544
550
|
r
|
|
545
|
-
) : (s & (
|
|
551
|
+
) : (s & (Xt | Se)) !== 0 && (s & P) === 0 && Qn(i, t, r) && (C(i, P), ae(
|
|
546
552
|
/** @type {Effect} */
|
|
547
553
|
i
|
|
548
554
|
));
|
|
549
555
|
}
|
|
550
556
|
}
|
|
551
|
-
function
|
|
557
|
+
function Qn(e, t, n) {
|
|
552
558
|
const r = n.get(e);
|
|
553
559
|
if (r !== void 0) return r;
|
|
554
560
|
if (e.deps !== null)
|
|
555
561
|
for (const i of e.deps) {
|
|
556
|
-
if (
|
|
562
|
+
if (Ke.call(t, i))
|
|
557
563
|
return !0;
|
|
558
|
-
if ((i.f &
|
|
564
|
+
if ((i.f & L) !== 0 && Qn(
|
|
559
565
|
/** @type {Derived} */
|
|
560
566
|
i,
|
|
561
567
|
t,
|
|
@@ -569,47 +575,47 @@ function vn(e, t, n) {
|
|
|
569
575
|
}
|
|
570
576
|
return n.set(e, !1), !1;
|
|
571
577
|
}
|
|
572
|
-
function
|
|
573
|
-
var t =
|
|
574
|
-
if (n?.is_pending && (e.f & (
|
|
578
|
+
function ae(e) {
|
|
579
|
+
var t = Nt = e, n = t.b;
|
|
580
|
+
if (n?.is_pending && (e.f & (et | We | Jt)) !== 0 && (e.f & Be) === 0) {
|
|
575
581
|
n.defer_effect(e);
|
|
576
582
|
return;
|
|
577
583
|
}
|
|
578
584
|
for (; t.parent !== null; ) {
|
|
579
585
|
t = t.parent;
|
|
580
586
|
var r = t.f;
|
|
581
|
-
if (
|
|
587
|
+
if (Xe !== null && t === S && (e.f & We) === 0)
|
|
582
588
|
return;
|
|
583
|
-
if ((r & (
|
|
584
|
-
if ((r &
|
|
589
|
+
if ((r & (xe | se)) !== 0) {
|
|
590
|
+
if ((r & I) === 0)
|
|
585
591
|
return;
|
|
586
|
-
t.f ^=
|
|
592
|
+
t.f ^= I;
|
|
587
593
|
}
|
|
588
594
|
}
|
|
589
|
-
|
|
595
|
+
j.push(t);
|
|
590
596
|
}
|
|
591
|
-
function
|
|
592
|
-
if (!((e.f &
|
|
593
|
-
(e.f &
|
|
597
|
+
function er(e, t) {
|
|
598
|
+
if (!((e.f & se) !== 0 && (e.f & I) !== 0)) {
|
|
599
|
+
(e.f & P) !== 0 ? t.d.push(e) : (e.f & re) !== 0 && t.m.push(e), C(e, I);
|
|
594
600
|
for (var n = e.first; n !== null; )
|
|
595
|
-
|
|
601
|
+
er(n, t), n = n.next;
|
|
596
602
|
}
|
|
597
603
|
}
|
|
598
|
-
function
|
|
599
|
-
let t = 0, n =
|
|
604
|
+
function Di(e) {
|
|
605
|
+
let t = 0, n = Le(0), r;
|
|
600
606
|
return () => {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
t -= 1, t === 0 && (r?.(), r = void 0,
|
|
607
|
+
rn() && (u(n), sn(() => (t === 0 && (r = un(() => e(() => vt(n)))), t += 1, () => {
|
|
608
|
+
$e(() => {
|
|
609
|
+
t -= 1, t === 0 && (r?.(), r = void 0, vt(n));
|
|
604
610
|
});
|
|
605
611
|
})));
|
|
606
612
|
};
|
|
607
613
|
}
|
|
608
|
-
var
|
|
609
|
-
function
|
|
610
|
-
new
|
|
614
|
+
var Fi = Ge | He;
|
|
615
|
+
function Bi(e, t, n, r) {
|
|
616
|
+
new Hi(e, t, n, r);
|
|
611
617
|
}
|
|
612
|
-
class
|
|
618
|
+
class Hi {
|
|
613
619
|
/** @type {Boundary | null} */
|
|
614
620
|
parent;
|
|
615
621
|
is_pending = !1;
|
|
@@ -622,15 +628,15 @@ class qr {
|
|
|
622
628
|
/** @type {TemplateNode} */
|
|
623
629
|
#e;
|
|
624
630
|
/** @type {TemplateNode | null} */
|
|
625
|
-
#t =
|
|
631
|
+
#t = x ? T : null;
|
|
626
632
|
/** @type {BoundaryProps} */
|
|
627
633
|
#n;
|
|
628
634
|
/** @type {((anchor: Node) => void)} */
|
|
629
|
-
#
|
|
635
|
+
#l;
|
|
630
636
|
/** @type {Effect} */
|
|
631
637
|
#r;
|
|
632
638
|
/** @type {Effect | null} */
|
|
633
|
-
#
|
|
639
|
+
#o = null;
|
|
634
640
|
/** @type {Effect | null} */
|
|
635
641
|
#i = null;
|
|
636
642
|
/** @type {Effect | null} */
|
|
@@ -641,7 +647,7 @@ class qr {
|
|
|
641
647
|
#f = 0;
|
|
642
648
|
#c = !1;
|
|
643
649
|
/** @type {Set<Effect>} */
|
|
644
|
-
#
|
|
650
|
+
#d = /* @__PURE__ */ new Set();
|
|
645
651
|
/** @type {Set<Effect>} */
|
|
646
652
|
#v = /* @__PURE__ */ new Set();
|
|
647
653
|
/**
|
|
@@ -651,9 +657,9 @@ class qr {
|
|
|
651
657
|
* calls followed by no-op flushes
|
|
652
658
|
* @type {Source<number> | null}
|
|
653
659
|
*/
|
|
654
|
-
#
|
|
655
|
-
#w =
|
|
656
|
-
this.#
|
|
660
|
+
#h = null;
|
|
661
|
+
#w = Di(() => (this.#h = Le(this.#u), () => {
|
|
662
|
+
this.#h = null;
|
|
657
663
|
}));
|
|
658
664
|
/**
|
|
659
665
|
* @param {TemplateNode} node
|
|
@@ -662,32 +668,32 @@ class qr {
|
|
|
662
668
|
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
663
669
|
*/
|
|
664
670
|
constructor(t, n, r, i) {
|
|
665
|
-
this.#e = t, this.#n = n, this.#
|
|
666
|
-
var
|
|
671
|
+
this.#e = t, this.#n = n, this.#l = (s) => {
|
|
672
|
+
var o = (
|
|
667
673
|
/** @type {Effect} */
|
|
668
|
-
|
|
674
|
+
S
|
|
669
675
|
);
|
|
670
|
-
|
|
676
|
+
o.b = this, o.f |= Ft, r(s);
|
|
671
677
|
}, this.parent = /** @type {Effect} */
|
|
672
|
-
|
|
673
|
-
if (
|
|
678
|
+
S.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#r = on(() => {
|
|
679
|
+
if (x) {
|
|
674
680
|
const s = (
|
|
675
681
|
/** @type {Comment} */
|
|
676
682
|
this.#t
|
|
677
683
|
);
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
if (s.data.startsWith(
|
|
681
|
-
const a = JSON.parse(s.data.slice(
|
|
684
|
+
Ct();
|
|
685
|
+
const o = s.data === Wt;
|
|
686
|
+
if (s.data.startsWith(bn)) {
|
|
687
|
+
const a = JSON.parse(s.data.slice(bn.length));
|
|
682
688
|
this.#y(a);
|
|
683
|
-
} else
|
|
689
|
+
} else o ? this.#$() : this.#b();
|
|
684
690
|
} else
|
|
685
691
|
this.#g();
|
|
686
|
-
},
|
|
692
|
+
}, Fi), x && (this.#e = T);
|
|
687
693
|
}
|
|
688
694
|
#b() {
|
|
689
695
|
try {
|
|
690
|
-
this.#
|
|
696
|
+
this.#o = W(() => this.#l(this.#e));
|
|
691
697
|
} catch (t) {
|
|
692
698
|
this.error(t);
|
|
693
699
|
}
|
|
@@ -697,7 +703,7 @@ class qr {
|
|
|
697
703
|
*/
|
|
698
704
|
#y(t) {
|
|
699
705
|
const n = this.#n.failed;
|
|
700
|
-
n && (this.#s =
|
|
706
|
+
n && (this.#s = W(() => {
|
|
701
707
|
n(
|
|
702
708
|
this.#e,
|
|
703
709
|
() => t,
|
|
@@ -708,9 +714,9 @@ class qr {
|
|
|
708
714
|
}
|
|
709
715
|
#$() {
|
|
710
716
|
const t = this.#n.pending;
|
|
711
|
-
t && (this.is_pending = !0, this.#i =
|
|
712
|
-
var n = this.#a = document.createDocumentFragment(), r =
|
|
713
|
-
n.append(r), this.#
|
|
717
|
+
t && (this.is_pending = !0, this.#i = W(() => t(this.#e)), $e(() => {
|
|
718
|
+
var n = this.#a = document.createDocumentFragment(), r = ie();
|
|
719
|
+
n.append(r), this.#o = this.#p(() => (ge.ensure(), W(() => this.#l(r)))), this.#f === 0 && (this.#e.before(n), this.#a = null, Me(
|
|
714
720
|
/** @type {Effect} */
|
|
715
721
|
this.#i,
|
|
716
722
|
() => {
|
|
@@ -721,16 +727,16 @@ class qr {
|
|
|
721
727
|
}
|
|
722
728
|
#g() {
|
|
723
729
|
try {
|
|
724
|
-
if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#u = 0, this.#
|
|
725
|
-
this.#
|
|
730
|
+
if (this.is_pending = this.has_pending_snippet(), this.#f = 0, this.#u = 0, this.#o = W(() => {
|
|
731
|
+
this.#l(this.#e);
|
|
726
732
|
}), this.#f > 0) {
|
|
727
733
|
var t = this.#a = document.createDocumentFragment();
|
|
728
|
-
|
|
734
|
+
fn(this.#o, t);
|
|
729
735
|
const n = (
|
|
730
736
|
/** @type {(anchor: Node) => void} */
|
|
731
737
|
this.#n.pending
|
|
732
738
|
);
|
|
733
|
-
this.#i =
|
|
739
|
+
this.#i = W(() => n(this.#e));
|
|
734
740
|
} else
|
|
735
741
|
this.#_();
|
|
736
742
|
} catch (n) {
|
|
@@ -739,18 +745,18 @@ class qr {
|
|
|
739
745
|
}
|
|
740
746
|
#_() {
|
|
741
747
|
this.is_pending = !1;
|
|
742
|
-
for (const t of this.#
|
|
743
|
-
|
|
748
|
+
for (const t of this.#d)
|
|
749
|
+
C(t, P), ae(t);
|
|
744
750
|
for (const t of this.#v)
|
|
745
|
-
|
|
746
|
-
this.#
|
|
751
|
+
C(t, re), ae(t);
|
|
752
|
+
this.#d.clear(), this.#v.clear();
|
|
747
753
|
}
|
|
748
754
|
/**
|
|
749
755
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
750
756
|
* @param {Effect} effect
|
|
751
757
|
*/
|
|
752
758
|
defer_effect(t) {
|
|
753
|
-
|
|
759
|
+
Jn(t, this.#d, this.#v);
|
|
754
760
|
}
|
|
755
761
|
/**
|
|
756
762
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -767,14 +773,14 @@ class qr {
|
|
|
767
773
|
* @param {() => T} fn
|
|
768
774
|
*/
|
|
769
775
|
#p(t) {
|
|
770
|
-
var n =
|
|
771
|
-
|
|
776
|
+
var n = S, r = E, i = X;
|
|
777
|
+
ue(this.#r), Z(this.#r), Je(this.#r.ctx);
|
|
772
778
|
try {
|
|
773
779
|
return t();
|
|
774
780
|
} catch (s) {
|
|
775
|
-
return
|
|
781
|
+
return Wn(s), null;
|
|
776
782
|
} finally {
|
|
777
|
-
|
|
783
|
+
ue(n), Z(r), Je(i);
|
|
778
784
|
}
|
|
779
785
|
}
|
|
780
786
|
/**
|
|
@@ -787,7 +793,7 @@ class qr {
|
|
|
787
793
|
this.parent && this.parent.#m(t);
|
|
788
794
|
return;
|
|
789
795
|
}
|
|
790
|
-
this.#f += t, this.#f === 0 && (this.#_(), this.#i &&
|
|
796
|
+
this.#f += t, this.#f === 0 && (this.#_(), this.#i && Me(this.#i, () => {
|
|
791
797
|
this.#i = null;
|
|
792
798
|
}), this.#a && (this.#e.before(this.#a), this.#a = null));
|
|
793
799
|
}
|
|
@@ -798,14 +804,14 @@ class qr {
|
|
|
798
804
|
* @param {1 | -1} d
|
|
799
805
|
*/
|
|
800
806
|
update_pending_count(t) {
|
|
801
|
-
this.#m(t), this.#u += t, !(!this.#
|
|
802
|
-
this.#c = !1, this.#
|
|
807
|
+
this.#m(t), this.#u += t, !(!this.#h || this.#c) && (this.#c = !0, $e(() => {
|
|
808
|
+
this.#c = !1, this.#h && Ze(this.#h, this.#u);
|
|
803
809
|
}));
|
|
804
810
|
}
|
|
805
811
|
get_effect_pending() {
|
|
806
812
|
return this.#w(), u(
|
|
807
813
|
/** @type {Source<number>} */
|
|
808
|
-
this.#
|
|
814
|
+
this.#h
|
|
809
815
|
);
|
|
810
816
|
}
|
|
811
817
|
/** @param {unknown} error */
|
|
@@ -814,43 +820,43 @@ class qr {
|
|
|
814
820
|
let r = this.#n.failed;
|
|
815
821
|
if (!n && !r)
|
|
816
822
|
throw t;
|
|
817
|
-
this.#
|
|
823
|
+
this.#o && (H(this.#o), this.#o = null), this.#i && (H(this.#i), this.#i = null), this.#s && (H(this.#s), this.#s = null), x && (Y(
|
|
818
824
|
/** @type {TemplateNode} */
|
|
819
825
|
this.#t
|
|
820
|
-
),
|
|
826
|
+
), Ci(), Y(kt()));
|
|
821
827
|
var i = !1, s = !1;
|
|
822
|
-
const
|
|
828
|
+
const o = () => {
|
|
823
829
|
if (i) {
|
|
824
|
-
|
|
830
|
+
Ri();
|
|
825
831
|
return;
|
|
826
832
|
}
|
|
827
|
-
i = !0, s &&
|
|
833
|
+
i = !0, s && zi(), this.#s !== null && Me(this.#s, () => {
|
|
828
834
|
this.#s = null;
|
|
829
835
|
}), this.#p(() => {
|
|
830
|
-
|
|
836
|
+
ge.ensure(), this.#g();
|
|
831
837
|
});
|
|
832
|
-
},
|
|
838
|
+
}, l = (a) => {
|
|
833
839
|
try {
|
|
834
|
-
s = !0, n?.(a,
|
|
840
|
+
s = !0, n?.(a, o), s = !1;
|
|
835
841
|
} catch (f) {
|
|
836
|
-
|
|
842
|
+
be(f, this.#r && this.#r.parent);
|
|
837
843
|
}
|
|
838
844
|
r && (this.#s = this.#p(() => {
|
|
839
|
-
|
|
845
|
+
ge.ensure();
|
|
840
846
|
try {
|
|
841
|
-
return
|
|
847
|
+
return W(() => {
|
|
842
848
|
var f = (
|
|
843
849
|
/** @type {Effect} */
|
|
844
|
-
|
|
850
|
+
S
|
|
845
851
|
);
|
|
846
|
-
f.b = this, f.f |=
|
|
852
|
+
f.b = this, f.f |= Ft, r(
|
|
847
853
|
this.#e,
|
|
848
854
|
() => a,
|
|
849
|
-
() =>
|
|
855
|
+
() => o
|
|
850
856
|
);
|
|
851
857
|
});
|
|
852
858
|
} catch (f) {
|
|
853
|
-
return
|
|
859
|
+
return be(
|
|
854
860
|
f,
|
|
855
861
|
/** @type {Effect} */
|
|
856
862
|
this.#r.parent
|
|
@@ -858,172 +864,177 @@ class qr {
|
|
|
858
864
|
}
|
|
859
865
|
}));
|
|
860
866
|
};
|
|
861
|
-
|
|
867
|
+
$e(() => {
|
|
862
868
|
var a;
|
|
863
869
|
try {
|
|
864
870
|
a = this.transform_error(t);
|
|
865
871
|
} catch (f) {
|
|
866
|
-
|
|
872
|
+
be(f, this.#r && this.#r.parent);
|
|
867
873
|
return;
|
|
868
874
|
}
|
|
869
875
|
a !== null && typeof a == "object" && typeof /** @type {any} */
|
|
870
876
|
a.then == "function" ? a.then(
|
|
871
|
-
|
|
877
|
+
l,
|
|
872
878
|
/** @param {unknown} e */
|
|
873
|
-
(f) =>
|
|
874
|
-
) :
|
|
879
|
+
(f) => be(f, this.#r && this.#r.parent)
|
|
880
|
+
) : l(a);
|
|
875
881
|
});
|
|
876
882
|
}
|
|
877
883
|
}
|
|
878
|
-
function
|
|
879
|
-
const i =
|
|
880
|
-
var s = e.filter((
|
|
884
|
+
function ji(e, t, n, r) {
|
|
885
|
+
const i = Ot;
|
|
886
|
+
var s = e.filter((v) => !v.settled);
|
|
881
887
|
if (n.length === 0 && s.length === 0) {
|
|
882
888
|
r(t.map(i));
|
|
883
889
|
return;
|
|
884
890
|
}
|
|
885
|
-
var
|
|
891
|
+
var o = (
|
|
886
892
|
/** @type {Effect} */
|
|
887
|
-
|
|
888
|
-
),
|
|
889
|
-
function f(
|
|
890
|
-
|
|
893
|
+
S
|
|
894
|
+
), l = Ui(), a = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((v) => v.promise)) : null;
|
|
895
|
+
function f(v) {
|
|
896
|
+
l();
|
|
891
897
|
try {
|
|
892
|
-
r(
|
|
893
|
-
} catch (
|
|
894
|
-
(
|
|
898
|
+
r(v);
|
|
899
|
+
} catch (c) {
|
|
900
|
+
(o.f & fe) === 0 && be(c, o);
|
|
895
901
|
}
|
|
896
|
-
|
|
902
|
+
Ht();
|
|
897
903
|
}
|
|
898
904
|
if (n.length === 0) {
|
|
899
905
|
a.then(() => f(t.map(i)));
|
|
900
906
|
return;
|
|
901
907
|
}
|
|
902
|
-
function
|
|
903
|
-
|
|
908
|
+
function h() {
|
|
909
|
+
l(), Promise.all(n.map((v) => /* @__PURE__ */ qi(v))).then((v) => f([...t.map(i), ...v])).catch((v) => be(v, o));
|
|
904
910
|
}
|
|
905
|
-
a ? a.then(
|
|
911
|
+
a ? a.then(h) : h();
|
|
906
912
|
}
|
|
907
|
-
function
|
|
908
|
-
var e =
|
|
913
|
+
function Ui() {
|
|
914
|
+
var e = S, t = E, n = X, r = z;
|
|
909
915
|
return function(s = !0) {
|
|
910
|
-
|
|
916
|
+
ue(e), Z(t), Je(n), s && r?.activate();
|
|
911
917
|
};
|
|
912
918
|
}
|
|
913
|
-
function
|
|
914
|
-
|
|
919
|
+
function Ht(e = !0) {
|
|
920
|
+
ue(null), Z(null), Je(null), e && z?.deactivate();
|
|
915
921
|
}
|
|
916
|
-
function
|
|
922
|
+
function Vi() {
|
|
917
923
|
var e = (
|
|
918
924
|
/** @type {Boundary} */
|
|
919
925
|
/** @type {Effect} */
|
|
920
|
-
|
|
926
|
+
S.b
|
|
921
927
|
), t = (
|
|
922
928
|
/** @type {Batch} */
|
|
923
|
-
|
|
929
|
+
z
|
|
924
930
|
), n = e.is_rendered();
|
|
925
931
|
return e.update_pending_count(1), t.increment(n), () => {
|
|
926
932
|
e.update_pending_count(-1), t.decrement(n);
|
|
927
933
|
};
|
|
928
934
|
}
|
|
929
935
|
// @__NO_SIDE_EFFECTS__
|
|
930
|
-
function
|
|
931
|
-
var t =
|
|
936
|
+
function Ot(e) {
|
|
937
|
+
var t = L | P, n = E !== null && (E.f & L) !== 0 ? (
|
|
932
938
|
/** @type {Derived} */
|
|
933
|
-
|
|
939
|
+
E
|
|
934
940
|
) : null;
|
|
935
|
-
return
|
|
936
|
-
ctx:
|
|
941
|
+
return S !== null && (S.f |= He), {
|
|
942
|
+
ctx: X,
|
|
937
943
|
deps: null,
|
|
938
944
|
effects: null,
|
|
939
|
-
equals:
|
|
945
|
+
equals: jn,
|
|
940
946
|
f: t,
|
|
941
947
|
fn: e,
|
|
942
948
|
reactions: null,
|
|
943
949
|
rv: 0,
|
|
944
950
|
v: (
|
|
945
951
|
/** @type {V} */
|
|
946
|
-
|
|
952
|
+
M
|
|
947
953
|
),
|
|
948
954
|
wv: 0,
|
|
949
|
-
parent: n ??
|
|
955
|
+
parent: n ?? S,
|
|
950
956
|
ac: null
|
|
951
957
|
};
|
|
952
958
|
}
|
|
953
959
|
// @__NO_SIDE_EFFECTS__
|
|
954
|
-
function
|
|
960
|
+
function qi(e, t, n) {
|
|
955
961
|
/** @type {Effect | null} */
|
|
956
|
-
|
|
962
|
+
S === null && mi();
|
|
957
963
|
var i = (
|
|
958
964
|
/** @type {Promise<V>} */
|
|
959
965
|
/** @type {unknown} */
|
|
960
966
|
void 0
|
|
961
|
-
), s =
|
|
967
|
+
), s = Le(
|
|
962
968
|
/** @type {V} */
|
|
963
|
-
|
|
964
|
-
),
|
|
965
|
-
return
|
|
966
|
-
var a =
|
|
969
|
+
M
|
|
970
|
+
), o = !E, l = /* @__PURE__ */ new Map();
|
|
971
|
+
return ts(() => {
|
|
972
|
+
var a = Fn();
|
|
967
973
|
i = a.promise;
|
|
968
974
|
try {
|
|
969
|
-
Promise.resolve(e()).then(a.resolve, a.reject).finally(
|
|
970
|
-
} catch (
|
|
971
|
-
a.reject(
|
|
975
|
+
Promise.resolve(e()).then(a.resolve, a.reject).finally(Ht);
|
|
976
|
+
} catch (c) {
|
|
977
|
+
a.reject(c), Ht();
|
|
972
978
|
}
|
|
973
979
|
var f = (
|
|
974
980
|
/** @type {Batch} */
|
|
975
|
-
|
|
981
|
+
z
|
|
976
982
|
);
|
|
977
|
-
if (
|
|
978
|
-
var
|
|
979
|
-
|
|
983
|
+
if (o) {
|
|
984
|
+
var h = Vi();
|
|
985
|
+
l.get(f)?.reject(Re), l.delete(f), l.set(f, a);
|
|
980
986
|
}
|
|
981
|
-
const
|
|
982
|
-
if (f.activate(),
|
|
983
|
-
|
|
987
|
+
const v = (c, p = void 0) => {
|
|
988
|
+
if (f.activate(), p)
|
|
989
|
+
p !== Re && (s.f |= ye, Ze(s, p));
|
|
984
990
|
else {
|
|
985
|
-
(s.f &
|
|
986
|
-
for (const [
|
|
987
|
-
if (
|
|
988
|
-
|
|
991
|
+
(s.f & ye) !== 0 && (s.f ^= ye), Ze(s, c);
|
|
992
|
+
for (const [d, g] of l) {
|
|
993
|
+
if (l.delete(d), d === f) break;
|
|
994
|
+
g.reject(Re);
|
|
989
995
|
}
|
|
990
996
|
}
|
|
991
|
-
|
|
997
|
+
h && h();
|
|
992
998
|
};
|
|
993
|
-
a.promise.then(
|
|
994
|
-
}),
|
|
995
|
-
for (const a of
|
|
996
|
-
a.reject(
|
|
999
|
+
a.promise.then(v, (c) => v(null, c || "unknown"));
|
|
1000
|
+
}), dr(() => {
|
|
1001
|
+
for (const a of l.values())
|
|
1002
|
+
a.reject(Re);
|
|
997
1003
|
}), new Promise((a) => {
|
|
998
|
-
function f(
|
|
999
|
-
function
|
|
1000
|
-
|
|
1004
|
+
function f(h) {
|
|
1005
|
+
function v() {
|
|
1006
|
+
h === i ? a(s) : f(i);
|
|
1001
1007
|
}
|
|
1002
|
-
|
|
1008
|
+
h.then(v, v);
|
|
1003
1009
|
}
|
|
1004
1010
|
f(i);
|
|
1005
1011
|
});
|
|
1006
1012
|
}
|
|
1007
1013
|
// @__NO_SIDE_EFFECTS__
|
|
1008
|
-
function
|
|
1009
|
-
const t = /* @__PURE__ */
|
|
1010
|
-
return
|
|
1014
|
+
function ot(e) {
|
|
1015
|
+
const t = /* @__PURE__ */ Ot(e);
|
|
1016
|
+
return wr(t), t;
|
|
1017
|
+
}
|
|
1018
|
+
// @__NO_SIDE_EFFECTS__
|
|
1019
|
+
function tr(e) {
|
|
1020
|
+
const t = /* @__PURE__ */ Ot(e);
|
|
1021
|
+
return t.equals = Un, t;
|
|
1011
1022
|
}
|
|
1012
|
-
function
|
|
1023
|
+
function Yi(e) {
|
|
1013
1024
|
var t = e.effects;
|
|
1014
1025
|
if (t !== null) {
|
|
1015
1026
|
e.effects = null;
|
|
1016
1027
|
for (var n = 0; n < t.length; n += 1)
|
|
1017
|
-
|
|
1028
|
+
H(
|
|
1018
1029
|
/** @type {Effect} */
|
|
1019
1030
|
t[n]
|
|
1020
1031
|
);
|
|
1021
1032
|
}
|
|
1022
1033
|
}
|
|
1023
|
-
function
|
|
1034
|
+
function Ki(e) {
|
|
1024
1035
|
for (var t = e.parent; t !== null; ) {
|
|
1025
|
-
if ((t.f &
|
|
1026
|
-
return (t.f &
|
|
1036
|
+
if ((t.f & L) === 0)
|
|
1037
|
+
return (t.f & fe) === 0 ? (
|
|
1027
1038
|
/** @type {Effect} */
|
|
1028
1039
|
t
|
|
1029
1040
|
) : null;
|
|
@@ -1031,44 +1042,44 @@ function Xr(e) {
|
|
|
1031
1042
|
}
|
|
1032
1043
|
return null;
|
|
1033
1044
|
}
|
|
1034
|
-
function
|
|
1035
|
-
var t, n =
|
|
1036
|
-
|
|
1045
|
+
function Qt(e) {
|
|
1046
|
+
var t, n = S;
|
|
1047
|
+
ue(Ki(e));
|
|
1037
1048
|
try {
|
|
1038
|
-
e.f &= ~
|
|
1049
|
+
e.f &= ~Pe, Yi(e), t = Er(e);
|
|
1039
1050
|
} finally {
|
|
1040
|
-
|
|
1051
|
+
ue(n);
|
|
1041
1052
|
}
|
|
1042
1053
|
return t;
|
|
1043
1054
|
}
|
|
1044
|
-
function
|
|
1045
|
-
var t =
|
|
1046
|
-
if (!e.equals(t) && (e.wv =
|
|
1047
|
-
|
|
1055
|
+
function nr(e) {
|
|
1056
|
+
var t = Qt(e);
|
|
1057
|
+
if (!e.equals(t) && (e.wv = yr(), (!z?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
1058
|
+
C(e, I);
|
|
1048
1059
|
return;
|
|
1049
1060
|
}
|
|
1050
|
-
|
|
1061
|
+
Te || (te !== null ? (rn() || z?.is_fork) && te.set(e, t) : Zt(e));
|
|
1051
1062
|
}
|
|
1052
|
-
function
|
|
1063
|
+
function Wi(e) {
|
|
1053
1064
|
if (e.effects !== null)
|
|
1054
1065
|
for (const t of e.effects)
|
|
1055
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
1066
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Re), t.teardown = di, t.ac = null, _t(t, 0), ln(t));
|
|
1056
1067
|
}
|
|
1057
|
-
function
|
|
1068
|
+
function rr(e) {
|
|
1058
1069
|
if (e.effects !== null)
|
|
1059
1070
|
for (const t of e.effects)
|
|
1060
|
-
t.teardown &&
|
|
1071
|
+
t.teardown && Qe(t);
|
|
1061
1072
|
}
|
|
1062
|
-
let
|
|
1063
|
-
const
|
|
1064
|
-
let
|
|
1065
|
-
function
|
|
1073
|
+
let jt = /* @__PURE__ */ new Set();
|
|
1074
|
+
const Ee = /* @__PURE__ */ new Map();
|
|
1075
|
+
let ir = !1;
|
|
1076
|
+
function Le(e, t) {
|
|
1066
1077
|
var n = {
|
|
1067
1078
|
f: 0,
|
|
1068
1079
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1069
1080
|
v: e,
|
|
1070
1081
|
reactions: null,
|
|
1071
|
-
equals:
|
|
1082
|
+
equals: jn,
|
|
1072
1083
|
rv: 0,
|
|
1073
1084
|
wv: 0
|
|
1074
1085
|
};
|
|
@@ -1076,79 +1087,79 @@ function Ve(e, t) {
|
|
|
1076
1087
|
}
|
|
1077
1088
|
// @__NO_SIDE_EFFECTS__
|
|
1078
1089
|
function N(e, t) {
|
|
1079
|
-
const n =
|
|
1080
|
-
return
|
|
1090
|
+
const n = Le(e);
|
|
1091
|
+
return wr(n), n;
|
|
1081
1092
|
}
|
|
1082
1093
|
// @__NO_SIDE_EFFECTS__
|
|
1083
|
-
function
|
|
1084
|
-
const r =
|
|
1085
|
-
return t || (r.equals =
|
|
1094
|
+
function sr(e, t = !1, n = !0) {
|
|
1095
|
+
const r = Le(e);
|
|
1096
|
+
return t || (r.equals = Un), r;
|
|
1086
1097
|
}
|
|
1087
|
-
function
|
|
1088
|
-
|
|
1098
|
+
function w(e, t, n = !1) {
|
|
1099
|
+
E !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1089
1100
|
// to ensure we error if state is set inside an inspect effect
|
|
1090
|
-
(!
|
|
1091
|
-
let r = n ?
|
|
1092
|
-
return
|
|
1101
|
+
(!ne || (E.f & $n) !== 0) && Yn() && (E.f & (L | Se | Xt | $n)) !== 0 && (J === null || !Ke.call(J, e)) && Ai();
|
|
1102
|
+
let r = n ? qe(t) : t;
|
|
1103
|
+
return Ze(e, r);
|
|
1093
1104
|
}
|
|
1094
|
-
function
|
|
1105
|
+
function Ze(e, t) {
|
|
1095
1106
|
if (!e.equals(t)) {
|
|
1096
1107
|
var n = e.v;
|
|
1097
|
-
|
|
1098
|
-
var r =
|
|
1099
|
-
if (r.capture(e, n), (e.f &
|
|
1108
|
+
Te ? Ee.set(e, t) : Ee.set(e, n), e.v = t;
|
|
1109
|
+
var r = ge.ensure();
|
|
1110
|
+
if (r.capture(e, n), (e.f & L) !== 0) {
|
|
1100
1111
|
const i = (
|
|
1101
1112
|
/** @type {Derived} */
|
|
1102
1113
|
e
|
|
1103
1114
|
);
|
|
1104
|
-
(e.f &
|
|
1115
|
+
(e.f & P) !== 0 && Qt(i), Zt(i);
|
|
1105
1116
|
}
|
|
1106
|
-
e.wv =
|
|
1117
|
+
e.wv = yr(), or(e, P), S !== null && (S.f & I) !== 0 && (S.f & (se | xe)) === 0 && (K === null ? is([e]) : K.push(e)), !r.is_fork && jt.size > 0 && !ir && Gi();
|
|
1107
1118
|
}
|
|
1108
1119
|
return t;
|
|
1109
1120
|
}
|
|
1110
|
-
function
|
|
1111
|
-
|
|
1112
|
-
for (const e of
|
|
1113
|
-
(e.f &
|
|
1114
|
-
|
|
1121
|
+
function Gi() {
|
|
1122
|
+
ir = !1;
|
|
1123
|
+
for (const e of jt)
|
|
1124
|
+
(e.f & I) !== 0 && C(e, re), gt(e) && Qe(e);
|
|
1125
|
+
jt.clear();
|
|
1115
1126
|
}
|
|
1116
|
-
function
|
|
1117
|
-
|
|
1127
|
+
function vt(e) {
|
|
1128
|
+
w(e, e.v + 1);
|
|
1118
1129
|
}
|
|
1119
|
-
function
|
|
1130
|
+
function or(e, t) {
|
|
1120
1131
|
var n = e.reactions;
|
|
1121
1132
|
if (n !== null)
|
|
1122
1133
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1123
|
-
var s = n[i],
|
|
1124
|
-
if (
|
|
1134
|
+
var s = n[i], o = s.f, l = (o & P) === 0;
|
|
1135
|
+
if (l && C(s, t), (o & L) !== 0) {
|
|
1125
1136
|
var a = (
|
|
1126
1137
|
/** @type {Derived} */
|
|
1127
1138
|
s
|
|
1128
1139
|
);
|
|
1129
|
-
|
|
1130
|
-
} else
|
|
1140
|
+
te?.delete(a), (o & Pe) === 0 && (o & G && (s.f |= Pe), or(a, re));
|
|
1141
|
+
} else l && ((o & Se) !== 0 && ve !== null && ve.add(
|
|
1131
1142
|
/** @type {Effect} */
|
|
1132
1143
|
s
|
|
1133
|
-
),
|
|
1144
|
+
), ae(
|
|
1134
1145
|
/** @type {Effect} */
|
|
1135
1146
|
s
|
|
1136
1147
|
));
|
|
1137
1148
|
}
|
|
1138
1149
|
}
|
|
1139
|
-
function
|
|
1140
|
-
if (typeof e != "object" || e === null ||
|
|
1150
|
+
function qe(e) {
|
|
1151
|
+
if (typeof e != "object" || e === null || dt in e)
|
|
1141
1152
|
return e;
|
|
1142
|
-
const t =
|
|
1143
|
-
if (t !==
|
|
1153
|
+
const t = Dn(e);
|
|
1154
|
+
if (t !== ui && t !== ci)
|
|
1144
1155
|
return e;
|
|
1145
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1146
|
-
if (
|
|
1147
|
-
return
|
|
1148
|
-
var a =
|
|
1149
|
-
|
|
1150
|
-
var
|
|
1151
|
-
return
|
|
1156
|
+
var n = /* @__PURE__ */ new Map(), r = Ln(e), i = /* @__PURE__ */ N(0), s = Ie, o = (l) => {
|
|
1157
|
+
if (Ie === s)
|
|
1158
|
+
return l();
|
|
1159
|
+
var a = E, f = Ie;
|
|
1160
|
+
Z(null), xn(s);
|
|
1161
|
+
var h = l();
|
|
1162
|
+
return Z(a), xn(f), h;
|
|
1152
1163
|
};
|
|
1153
1164
|
return r && n.set("length", /* @__PURE__ */ N(
|
|
1154
1165
|
/** @type {any[]} */
|
|
@@ -1157,237 +1168,237 @@ function Le(e) {
|
|
|
1157
1168
|
/** @type {any} */
|
|
1158
1169
|
e,
|
|
1159
1170
|
{
|
|
1160
|
-
defineProperty(
|
|
1161
|
-
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) &&
|
|
1162
|
-
var
|
|
1163
|
-
return
|
|
1164
|
-
var
|
|
1165
|
-
return n.set(a,
|
|
1166
|
-
}) :
|
|
1171
|
+
defineProperty(l, a, f) {
|
|
1172
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && xi();
|
|
1173
|
+
var h = n.get(a);
|
|
1174
|
+
return h === void 0 ? o(() => {
|
|
1175
|
+
var v = /* @__PURE__ */ N(f.value);
|
|
1176
|
+
return n.set(a, v), v;
|
|
1177
|
+
}) : w(h, f.value, !0), !0;
|
|
1167
1178
|
},
|
|
1168
|
-
deleteProperty(
|
|
1179
|
+
deleteProperty(l, a) {
|
|
1169
1180
|
var f = n.get(a);
|
|
1170
1181
|
if (f === void 0) {
|
|
1171
|
-
if (a in
|
|
1172
|
-
const
|
|
1173
|
-
n.set(a,
|
|
1182
|
+
if (a in l) {
|
|
1183
|
+
const h = o(() => /* @__PURE__ */ N(M));
|
|
1184
|
+
n.set(a, h), vt(i);
|
|
1174
1185
|
}
|
|
1175
1186
|
} else
|
|
1176
|
-
|
|
1187
|
+
w(f, M), vt(i);
|
|
1177
1188
|
return !0;
|
|
1178
1189
|
},
|
|
1179
|
-
get(
|
|
1180
|
-
if (a ===
|
|
1190
|
+
get(l, a, f) {
|
|
1191
|
+
if (a === dt)
|
|
1181
1192
|
return e;
|
|
1182
|
-
var
|
|
1183
|
-
if (
|
|
1184
|
-
var
|
|
1185
|
-
return
|
|
1186
|
-
}), n.set(a,
|
|
1187
|
-
var
|
|
1188
|
-
return
|
|
1193
|
+
var h = n.get(a), v = a in l;
|
|
1194
|
+
if (h === void 0 && (!v || Oe(l, a)?.writable) && (h = o(() => {
|
|
1195
|
+
var p = qe(v ? l[a] : M), d = /* @__PURE__ */ N(p);
|
|
1196
|
+
return d;
|
|
1197
|
+
}), n.set(a, h)), h !== void 0) {
|
|
1198
|
+
var c = u(h);
|
|
1199
|
+
return c === M ? void 0 : c;
|
|
1189
1200
|
}
|
|
1190
|
-
return Reflect.get(
|
|
1201
|
+
return Reflect.get(l, a, f);
|
|
1191
1202
|
},
|
|
1192
|
-
getOwnPropertyDescriptor(
|
|
1193
|
-
var f = Reflect.getOwnPropertyDescriptor(
|
|
1203
|
+
getOwnPropertyDescriptor(l, a) {
|
|
1204
|
+
var f = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1194
1205
|
if (f && "value" in f) {
|
|
1195
|
-
var
|
|
1196
|
-
|
|
1206
|
+
var h = n.get(a);
|
|
1207
|
+
h && (f.value = u(h));
|
|
1197
1208
|
} else if (f === void 0) {
|
|
1198
|
-
var
|
|
1199
|
-
if (
|
|
1209
|
+
var v = n.get(a), c = v?.v;
|
|
1210
|
+
if (v !== void 0 && c !== M)
|
|
1200
1211
|
return {
|
|
1201
1212
|
enumerable: !0,
|
|
1202
1213
|
configurable: !0,
|
|
1203
|
-
value:
|
|
1214
|
+
value: c,
|
|
1204
1215
|
writable: !0
|
|
1205
1216
|
};
|
|
1206
1217
|
}
|
|
1207
1218
|
return f;
|
|
1208
1219
|
},
|
|
1209
|
-
has(
|
|
1210
|
-
if (a ===
|
|
1220
|
+
has(l, a) {
|
|
1221
|
+
if (a === dt)
|
|
1211
1222
|
return !0;
|
|
1212
|
-
var f = n.get(a),
|
|
1213
|
-
if (f !== void 0 ||
|
|
1214
|
-
f === void 0 && (f =
|
|
1215
|
-
var
|
|
1216
|
-
return
|
|
1223
|
+
var f = n.get(a), h = f !== void 0 && f.v !== M || Reflect.has(l, a);
|
|
1224
|
+
if (f !== void 0 || S !== null && (!h || Oe(l, a)?.writable)) {
|
|
1225
|
+
f === void 0 && (f = o(() => {
|
|
1226
|
+
var c = h ? qe(l[a]) : M, p = /* @__PURE__ */ N(c);
|
|
1227
|
+
return p;
|
|
1217
1228
|
}), n.set(a, f));
|
|
1218
|
-
var
|
|
1219
|
-
if (
|
|
1229
|
+
var v = u(f);
|
|
1230
|
+
if (v === M)
|
|
1220
1231
|
return !1;
|
|
1221
1232
|
}
|
|
1222
|
-
return
|
|
1233
|
+
return h;
|
|
1223
1234
|
},
|
|
1224
|
-
set(
|
|
1225
|
-
var
|
|
1235
|
+
set(l, a, f, h) {
|
|
1236
|
+
var v = n.get(a), c = a in l;
|
|
1226
1237
|
if (r && a === "length")
|
|
1227
|
-
for (var
|
|
1228
|
-
|
|
1229
|
-
var
|
|
1230
|
-
|
|
1238
|
+
for (var p = f; p < /** @type {Source<number>} */
|
|
1239
|
+
v.v; p += 1) {
|
|
1240
|
+
var d = n.get(p + "");
|
|
1241
|
+
d !== void 0 ? w(d, M) : p in l && (d = o(() => /* @__PURE__ */ N(M)), n.set(p + "", d));
|
|
1231
1242
|
}
|
|
1232
|
-
if (
|
|
1233
|
-
(!
|
|
1243
|
+
if (v === void 0)
|
|
1244
|
+
(!c || Oe(l, a)?.writable) && (v = o(() => /* @__PURE__ */ N(void 0)), w(v, qe(f)), n.set(a, v));
|
|
1234
1245
|
else {
|
|
1235
|
-
|
|
1236
|
-
var
|
|
1237
|
-
|
|
1246
|
+
c = v.v !== M;
|
|
1247
|
+
var g = o(() => qe(f));
|
|
1248
|
+
w(v, g);
|
|
1238
1249
|
}
|
|
1239
|
-
var
|
|
1240
|
-
if (
|
|
1250
|
+
var b = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1251
|
+
if (b?.set && b.set.call(h, f), !c) {
|
|
1241
1252
|
if (r && typeof a == "string") {
|
|
1242
|
-
var
|
|
1253
|
+
var y = (
|
|
1243
1254
|
/** @type {Source<number>} */
|
|
1244
1255
|
n.get("length")
|
|
1245
|
-
),
|
|
1246
|
-
Number.isInteger(
|
|
1256
|
+
), m = Number(a);
|
|
1257
|
+
Number.isInteger(m) && m >= y.v && w(y, m + 1);
|
|
1247
1258
|
}
|
|
1248
|
-
|
|
1259
|
+
vt(i);
|
|
1249
1260
|
}
|
|
1250
1261
|
return !0;
|
|
1251
1262
|
},
|
|
1252
|
-
ownKeys(
|
|
1263
|
+
ownKeys(l) {
|
|
1253
1264
|
u(i);
|
|
1254
|
-
var a = Reflect.ownKeys(
|
|
1255
|
-
var
|
|
1256
|
-
return
|
|
1265
|
+
var a = Reflect.ownKeys(l).filter((v) => {
|
|
1266
|
+
var c = n.get(v);
|
|
1267
|
+
return c === void 0 || c.v !== M;
|
|
1257
1268
|
});
|
|
1258
|
-
for (var [f,
|
|
1259
|
-
|
|
1269
|
+
for (var [f, h] of n)
|
|
1270
|
+
h.v !== M && !(f in l) && a.push(f);
|
|
1260
1271
|
return a;
|
|
1261
1272
|
},
|
|
1262
1273
|
setPrototypeOf() {
|
|
1263
|
-
|
|
1274
|
+
ki();
|
|
1264
1275
|
}
|
|
1265
1276
|
}
|
|
1266
1277
|
);
|
|
1267
1278
|
}
|
|
1268
|
-
var
|
|
1269
|
-
function
|
|
1270
|
-
if (
|
|
1271
|
-
|
|
1279
|
+
var Tn, lr, ar, fr;
|
|
1280
|
+
function Ut() {
|
|
1281
|
+
if (Tn === void 0) {
|
|
1282
|
+
Tn = window, lr = /Firefox/.test(navigator.userAgent);
|
|
1272
1283
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1273
|
-
|
|
1284
|
+
ar = Oe(t, "firstChild").get, fr = Oe(t, "nextSibling").get, yn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), yn(n) && (n.__t = void 0);
|
|
1274
1285
|
}
|
|
1275
1286
|
}
|
|
1276
|
-
function
|
|
1287
|
+
function ie(e = "") {
|
|
1277
1288
|
return document.createTextNode(e);
|
|
1278
1289
|
}
|
|
1279
1290
|
// @__NO_SIDE_EFFECTS__
|
|
1280
|
-
function
|
|
1291
|
+
function De(e) {
|
|
1281
1292
|
return (
|
|
1282
1293
|
/** @type {TemplateNode | null} */
|
|
1283
|
-
|
|
1294
|
+
ar.call(e)
|
|
1284
1295
|
);
|
|
1285
1296
|
}
|
|
1286
1297
|
// @__NO_SIDE_EFFECTS__
|
|
1287
|
-
function
|
|
1298
|
+
function ce(e) {
|
|
1288
1299
|
return (
|
|
1289
1300
|
/** @type {TemplateNode | null} */
|
|
1290
|
-
|
|
1301
|
+
fr.call(e)
|
|
1291
1302
|
);
|
|
1292
1303
|
}
|
|
1293
|
-
function
|
|
1294
|
-
if (!
|
|
1295
|
-
return /* @__PURE__ */
|
|
1296
|
-
var n = /* @__PURE__ */
|
|
1304
|
+
function Ue(e, t) {
|
|
1305
|
+
if (!x)
|
|
1306
|
+
return /* @__PURE__ */ De(e);
|
|
1307
|
+
var n = /* @__PURE__ */ De(T);
|
|
1297
1308
|
if (n === null)
|
|
1298
|
-
n =
|
|
1299
|
-
else if (t && n.nodeType !==
|
|
1300
|
-
var r =
|
|
1301
|
-
return n?.before(r),
|
|
1309
|
+
n = T.appendChild(ie());
|
|
1310
|
+
else if (t && n.nodeType !== zt) {
|
|
1311
|
+
var r = ie();
|
|
1312
|
+
return n?.before(r), Y(r), r;
|
|
1302
1313
|
}
|
|
1303
|
-
return t &&
|
|
1314
|
+
return t && tn(
|
|
1304
1315
|
/** @type {Text} */
|
|
1305
1316
|
n
|
|
1306
|
-
),
|
|
1317
|
+
), Y(n), n;
|
|
1307
1318
|
}
|
|
1308
|
-
function
|
|
1309
|
-
if (!
|
|
1310
|
-
var n = /* @__PURE__ */
|
|
1311
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
1319
|
+
function Ji(e, t = !1) {
|
|
1320
|
+
if (!x) {
|
|
1321
|
+
var n = /* @__PURE__ */ De(e);
|
|
1322
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ ce(n) : n;
|
|
1312
1323
|
}
|
|
1313
1324
|
if (t) {
|
|
1314
|
-
if (
|
|
1315
|
-
var r =
|
|
1316
|
-
return
|
|
1325
|
+
if (T?.nodeType !== zt) {
|
|
1326
|
+
var r = ie();
|
|
1327
|
+
return T?.before(r), Y(r), r;
|
|
1317
1328
|
}
|
|
1318
|
-
|
|
1329
|
+
tn(
|
|
1319
1330
|
/** @type {Text} */
|
|
1320
|
-
|
|
1331
|
+
T
|
|
1321
1332
|
);
|
|
1322
1333
|
}
|
|
1323
|
-
return
|
|
1334
|
+
return T;
|
|
1324
1335
|
}
|
|
1325
|
-
function
|
|
1326
|
-
let r =
|
|
1336
|
+
function Ve(e, t = 1, n = !1) {
|
|
1337
|
+
let r = x ? T : e;
|
|
1327
1338
|
for (var i; t--; )
|
|
1328
1339
|
i = r, r = /** @type {TemplateNode} */
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
if (!
|
|
1340
|
+
/* @__PURE__ */ ce(r);
|
|
1341
|
+
if (!x)
|
|
1331
1342
|
return r;
|
|
1332
1343
|
if (n) {
|
|
1333
|
-
if (r?.nodeType !==
|
|
1334
|
-
var s =
|
|
1335
|
-
return r === null ? i?.after(s) : r.before(s),
|
|
1344
|
+
if (r?.nodeType !== zt) {
|
|
1345
|
+
var s = ie();
|
|
1346
|
+
return r === null ? i?.after(s) : r.before(s), Y(s), s;
|
|
1336
1347
|
}
|
|
1337
|
-
|
|
1348
|
+
tn(
|
|
1338
1349
|
/** @type {Text} */
|
|
1339
1350
|
r
|
|
1340
1351
|
);
|
|
1341
1352
|
}
|
|
1342
|
-
return
|
|
1353
|
+
return Y(r), r;
|
|
1343
1354
|
}
|
|
1344
|
-
function
|
|
1355
|
+
function ur(e) {
|
|
1345
1356
|
e.textContent = "";
|
|
1346
1357
|
}
|
|
1347
|
-
function
|
|
1358
|
+
function cr() {
|
|
1348
1359
|
return !1;
|
|
1349
1360
|
}
|
|
1350
|
-
function
|
|
1361
|
+
function en(e, t, n) {
|
|
1351
1362
|
return (
|
|
1352
1363
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1353
|
-
document.createElementNS(
|
|
1364
|
+
document.createElementNS(Pn, e, void 0)
|
|
1354
1365
|
);
|
|
1355
1366
|
}
|
|
1356
|
-
function
|
|
1367
|
+
function tn(e) {
|
|
1357
1368
|
if (
|
|
1358
1369
|
/** @type {string} */
|
|
1359
1370
|
e.nodeValue.length < 65536
|
|
1360
1371
|
)
|
|
1361
1372
|
return;
|
|
1362
1373
|
let t = e.nextSibling;
|
|
1363
|
-
for (; t !== null && t.nodeType ===
|
|
1374
|
+
for (; t !== null && t.nodeType === zt; )
|
|
1364
1375
|
t.remove(), e.nodeValue += /** @type {string} */
|
|
1365
1376
|
t.nodeValue, t = e.nextSibling;
|
|
1366
1377
|
}
|
|
1367
|
-
function
|
|
1368
|
-
var t =
|
|
1369
|
-
|
|
1378
|
+
function nn(e) {
|
|
1379
|
+
var t = E, n = S;
|
|
1380
|
+
Z(null), ue(null);
|
|
1370
1381
|
try {
|
|
1371
1382
|
return e();
|
|
1372
1383
|
} finally {
|
|
1373
|
-
|
|
1384
|
+
Z(t), ue(n);
|
|
1374
1385
|
}
|
|
1375
1386
|
}
|
|
1376
|
-
function
|
|
1377
|
-
|
|
1387
|
+
function Xi(e) {
|
|
1388
|
+
S === null && (E === null && $i(), yi()), Te && bi();
|
|
1378
1389
|
}
|
|
1379
|
-
function
|
|
1390
|
+
function Zi(e, t) {
|
|
1380
1391
|
var n = t.last;
|
|
1381
1392
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
1382
1393
|
}
|
|
1383
|
-
function
|
|
1384
|
-
var n =
|
|
1385
|
-
n !== null && (n.f &
|
|
1394
|
+
function de(e, t) {
|
|
1395
|
+
var n = S;
|
|
1396
|
+
n !== null && (n.f & B) !== 0 && (e |= B);
|
|
1386
1397
|
var r = {
|
|
1387
|
-
ctx:
|
|
1398
|
+
ctx: X,
|
|
1388
1399
|
deps: null,
|
|
1389
1400
|
nodes: null,
|
|
1390
|
-
f: e |
|
|
1401
|
+
f: e | P | G,
|
|
1391
1402
|
first: null,
|
|
1392
1403
|
fn: t,
|
|
1393
1404
|
last: null,
|
|
@@ -1399,432 +1410,450 @@ function Q(e, t) {
|
|
|
1399
1410
|
wv: 0,
|
|
1400
1411
|
ac: null
|
|
1401
1412
|
}, i = r;
|
|
1402
|
-
if ((e &
|
|
1403
|
-
|
|
1413
|
+
if ((e & et) !== 0)
|
|
1414
|
+
Xe !== null ? Xe.push(r) : ae(r);
|
|
1404
1415
|
else if (t !== null) {
|
|
1405
1416
|
try {
|
|
1406
|
-
|
|
1407
|
-
} catch (
|
|
1408
|
-
throw
|
|
1417
|
+
Qe(r);
|
|
1418
|
+
} catch (o) {
|
|
1419
|
+
throw H(r), o;
|
|
1409
1420
|
}
|
|
1410
1421
|
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1411
|
-
(i.f &
|
|
1422
|
+
(i.f & He) === 0 && (i = i.first, (e & Se) !== 0 && (e & Ge) !== 0 && i !== null && (i.f |= Ge));
|
|
1412
1423
|
}
|
|
1413
|
-
if (i !== null && (i.parent = n, n !== null &&
|
|
1424
|
+
if (i !== null && (i.parent = n, n !== null && Zi(i, n), E !== null && (E.f & L) !== 0 && (e & xe) === 0)) {
|
|
1414
1425
|
var s = (
|
|
1415
1426
|
/** @type {Derived} */
|
|
1416
|
-
|
|
1427
|
+
E
|
|
1417
1428
|
);
|
|
1418
1429
|
(s.effects ??= []).push(i);
|
|
1419
1430
|
}
|
|
1420
1431
|
return r;
|
|
1421
1432
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return
|
|
1433
|
+
function rn() {
|
|
1434
|
+
return E !== null && !ne;
|
|
1424
1435
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const t =
|
|
1427
|
-
return
|
|
1436
|
+
function dr(e) {
|
|
1437
|
+
const t = de(We, null);
|
|
1438
|
+
return C(t, I), t.teardown = e, t;
|
|
1428
1439
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1440
|
+
function wt(e) {
|
|
1441
|
+
Xi();
|
|
1431
1442
|
var t = (
|
|
1432
1443
|
/** @type {Effect} */
|
|
1433
|
-
|
|
1434
|
-
), n = !
|
|
1444
|
+
S.f
|
|
1445
|
+
), n = !E && (t & se) !== 0 && (t & Be) === 0;
|
|
1435
1446
|
if (n) {
|
|
1436
1447
|
var r = (
|
|
1437
1448
|
/** @type {ComponentContext} */
|
|
1438
|
-
|
|
1449
|
+
X
|
|
1439
1450
|
);
|
|
1440
1451
|
(r.e ??= []).push(e);
|
|
1441
1452
|
} else
|
|
1442
|
-
return
|
|
1453
|
+
return hr(e);
|
|
1443
1454
|
}
|
|
1444
|
-
function
|
|
1445
|
-
return
|
|
1455
|
+
function hr(e) {
|
|
1456
|
+
return de(et | _i, e);
|
|
1446
1457
|
}
|
|
1447
|
-
function
|
|
1448
|
-
|
|
1449
|
-
const t =
|
|
1458
|
+
function Qi(e) {
|
|
1459
|
+
ge.ensure();
|
|
1460
|
+
const t = de(xe | He, e);
|
|
1450
1461
|
return () => {
|
|
1451
|
-
|
|
1462
|
+
H(t);
|
|
1452
1463
|
};
|
|
1453
1464
|
}
|
|
1454
|
-
function
|
|
1455
|
-
|
|
1456
|
-
const t =
|
|
1465
|
+
function es(e) {
|
|
1466
|
+
ge.ensure();
|
|
1467
|
+
const t = de(xe | He, e);
|
|
1457
1468
|
return (n = {}) => new Promise((r) => {
|
|
1458
|
-
n.outro ?
|
|
1459
|
-
|
|
1460
|
-
}) : (
|
|
1469
|
+
n.outro ? Me(t, () => {
|
|
1470
|
+
H(t), r(void 0);
|
|
1471
|
+
}) : (H(t), r(void 0));
|
|
1461
1472
|
});
|
|
1462
1473
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1474
|
+
function vr(e) {
|
|
1475
|
+
return de(et, e);
|
|
1465
1476
|
}
|
|
1466
|
-
function
|
|
1467
|
-
return
|
|
1477
|
+
function ts(e) {
|
|
1478
|
+
return de(Xt | He, e);
|
|
1468
1479
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1480
|
+
function sn(e, t = 0) {
|
|
1481
|
+
return de(We | t, e);
|
|
1471
1482
|
}
|
|
1472
|
-
function
|
|
1473
|
-
|
|
1474
|
-
|
|
1483
|
+
function Pt(e, t = [], n = [], r = []) {
|
|
1484
|
+
ji(r, t, n, (i) => {
|
|
1485
|
+
de(We, () => e(...i.map(u)));
|
|
1475
1486
|
});
|
|
1476
1487
|
}
|
|
1477
|
-
function
|
|
1478
|
-
var n =
|
|
1488
|
+
function on(e, t = 0) {
|
|
1489
|
+
var n = de(Se | t, e);
|
|
1479
1490
|
return n;
|
|
1480
1491
|
}
|
|
1481
|
-
function
|
|
1482
|
-
return
|
|
1492
|
+
function W(e) {
|
|
1493
|
+
return de(se | He, e);
|
|
1483
1494
|
}
|
|
1484
|
-
function
|
|
1495
|
+
function _r(e) {
|
|
1485
1496
|
var t = e.teardown;
|
|
1486
1497
|
if (t !== null) {
|
|
1487
|
-
const n =
|
|
1488
|
-
|
|
1498
|
+
const n = Te, r = E;
|
|
1499
|
+
Sn(!0), Z(null);
|
|
1489
1500
|
try {
|
|
1490
1501
|
t.call(null);
|
|
1491
1502
|
} finally {
|
|
1492
|
-
|
|
1503
|
+
Sn(n), Z(r);
|
|
1493
1504
|
}
|
|
1494
1505
|
}
|
|
1495
1506
|
}
|
|
1496
|
-
function
|
|
1507
|
+
function ln(e, t = !1) {
|
|
1497
1508
|
var n = e.first;
|
|
1498
1509
|
for (e.first = e.last = null; n !== null; ) {
|
|
1499
1510
|
const i = n.ac;
|
|
1500
|
-
i !== null &&
|
|
1501
|
-
i.abort(
|
|
1511
|
+
i !== null && nn(() => {
|
|
1512
|
+
i.abort(Re);
|
|
1502
1513
|
});
|
|
1503
1514
|
var r = n.next;
|
|
1504
|
-
(n.f &
|
|
1515
|
+
(n.f & xe) !== 0 ? n.parent = null : H(n, t), n = r;
|
|
1505
1516
|
}
|
|
1506
1517
|
}
|
|
1507
|
-
function
|
|
1518
|
+
function ns(e) {
|
|
1508
1519
|
for (var t = e.first; t !== null; ) {
|
|
1509
1520
|
var n = t.next;
|
|
1510
|
-
(t.f &
|
|
1521
|
+
(t.f & se) === 0 && H(t), t = n;
|
|
1511
1522
|
}
|
|
1512
1523
|
}
|
|
1513
|
-
function
|
|
1524
|
+
function H(e, t = !0) {
|
|
1514
1525
|
var n = !1;
|
|
1515
|
-
(t || (e.f &
|
|
1526
|
+
(t || (e.f & vi) !== 0) && e.nodes !== null && e.nodes.end !== null && (rs(
|
|
1516
1527
|
e.nodes.start,
|
|
1517
1528
|
/** @type {TemplateNode} */
|
|
1518
1529
|
e.nodes.end
|
|
1519
|
-
), n = !0),
|
|
1530
|
+
), n = !0), ln(e, t && !n), _t(e, 0), C(e, fe);
|
|
1520
1531
|
var r = e.nodes && e.nodes.t;
|
|
1521
1532
|
if (r !== null)
|
|
1522
1533
|
for (const s of r)
|
|
1523
1534
|
s.stop();
|
|
1524
|
-
|
|
1535
|
+
_r(e);
|
|
1525
1536
|
var i = e.parent;
|
|
1526
|
-
i !== null && i.first !== null &&
|
|
1537
|
+
i !== null && i.first !== null && pr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1527
1538
|
}
|
|
1528
|
-
function
|
|
1539
|
+
function rs(e, t) {
|
|
1529
1540
|
for (; e !== null; ) {
|
|
1530
|
-
var n = e === t ? null : /* @__PURE__ */
|
|
1541
|
+
var n = e === t ? null : /* @__PURE__ */ ce(e);
|
|
1531
1542
|
e.remove(), e = n;
|
|
1532
1543
|
}
|
|
1533
1544
|
}
|
|
1534
|
-
function
|
|
1545
|
+
function pr(e) {
|
|
1535
1546
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1536
1547
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1537
1548
|
}
|
|
1538
|
-
function
|
|
1549
|
+
function Me(e, t, n = !0) {
|
|
1539
1550
|
var r = [];
|
|
1540
|
-
|
|
1551
|
+
gr(e, r, !0);
|
|
1541
1552
|
var i = () => {
|
|
1542
|
-
n &&
|
|
1553
|
+
n && H(e), t && t();
|
|
1543
1554
|
}, s = r.length;
|
|
1544
1555
|
if (s > 0) {
|
|
1545
|
-
var
|
|
1546
|
-
for (var
|
|
1547
|
-
|
|
1556
|
+
var o = () => --s || i();
|
|
1557
|
+
for (var l of r)
|
|
1558
|
+
l.out(o);
|
|
1548
1559
|
} else
|
|
1549
1560
|
i();
|
|
1550
1561
|
}
|
|
1551
|
-
function
|
|
1552
|
-
if ((e.f &
|
|
1553
|
-
e.f ^=
|
|
1562
|
+
function gr(e, t, n) {
|
|
1563
|
+
if ((e.f & B) === 0) {
|
|
1564
|
+
e.f ^= B;
|
|
1554
1565
|
var r = e.nodes && e.nodes.t;
|
|
1555
1566
|
if (r !== null)
|
|
1556
|
-
for (const
|
|
1557
|
-
(
|
|
1567
|
+
for (const l of r)
|
|
1568
|
+
(l.is_global || n) && t.push(l);
|
|
1558
1569
|
for (var i = e.first; i !== null; ) {
|
|
1559
|
-
var s = i.next,
|
|
1570
|
+
var s = i.next, o = (i.f & Ge) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1560
1571
|
// it means the parent block effect was pruned. In that case,
|
|
1561
1572
|
// transparency information was transferred to the branch effect.
|
|
1562
|
-
(i.f &
|
|
1563
|
-
|
|
1573
|
+
(i.f & se) !== 0 && (e.f & Se) !== 0;
|
|
1574
|
+
gr(i, t, o ? n : !1), i = s;
|
|
1564
1575
|
}
|
|
1565
1576
|
}
|
|
1566
1577
|
}
|
|
1567
|
-
function
|
|
1568
|
-
|
|
1578
|
+
function an(e) {
|
|
1579
|
+
mr(e, !0);
|
|
1569
1580
|
}
|
|
1570
|
-
function
|
|
1571
|
-
if ((e.f &
|
|
1572
|
-
e.f ^=
|
|
1581
|
+
function mr(e, t) {
|
|
1582
|
+
if ((e.f & B) !== 0) {
|
|
1583
|
+
e.f ^= B;
|
|
1573
1584
|
for (var n = e.first; n !== null; ) {
|
|
1574
|
-
var r = n.next, i = (n.f &
|
|
1575
|
-
|
|
1585
|
+
var r = n.next, i = (n.f & Ge) !== 0 || (n.f & se) !== 0;
|
|
1586
|
+
mr(n, i ? t : !1), n = r;
|
|
1576
1587
|
}
|
|
1577
1588
|
var s = e.nodes && e.nodes.t;
|
|
1578
1589
|
if (s !== null)
|
|
1579
|
-
for (const
|
|
1580
|
-
(
|
|
1590
|
+
for (const o of s)
|
|
1591
|
+
(o.is_global || t) && o.in();
|
|
1581
1592
|
}
|
|
1582
1593
|
}
|
|
1583
|
-
function
|
|
1594
|
+
function fn(e, t) {
|
|
1584
1595
|
if (e.nodes)
|
|
1585
1596
|
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1586
|
-
var i = n === r ? null : /* @__PURE__ */
|
|
1597
|
+
var i = n === r ? null : /* @__PURE__ */ ce(n);
|
|
1587
1598
|
t.append(n), n = i;
|
|
1588
1599
|
}
|
|
1589
1600
|
}
|
|
1590
|
-
let
|
|
1591
|
-
function
|
|
1592
|
-
|
|
1601
|
+
let Et = !1, Te = !1;
|
|
1602
|
+
function Sn(e) {
|
|
1603
|
+
Te = e;
|
|
1593
1604
|
}
|
|
1594
|
-
let
|
|
1595
|
-
function
|
|
1596
|
-
|
|
1605
|
+
let E = null, ne = !1;
|
|
1606
|
+
function Z(e) {
|
|
1607
|
+
E = e;
|
|
1597
1608
|
}
|
|
1598
|
-
let
|
|
1599
|
-
function
|
|
1600
|
-
|
|
1609
|
+
let S = null;
|
|
1610
|
+
function ue(e) {
|
|
1611
|
+
S = e;
|
|
1601
1612
|
}
|
|
1602
|
-
let
|
|
1603
|
-
function
|
|
1604
|
-
|
|
1613
|
+
let J = null;
|
|
1614
|
+
function wr(e) {
|
|
1615
|
+
E !== null && (J === null ? J = [e] : J.push(e));
|
|
1605
1616
|
}
|
|
1606
|
-
let
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1617
|
+
let U = null, q = 0, K = null;
|
|
1618
|
+
function is(e) {
|
|
1619
|
+
K = e;
|
|
1609
1620
|
}
|
|
1610
|
-
let
|
|
1611
|
-
function
|
|
1612
|
-
|
|
1621
|
+
let br = 1, Ne = 0, Ie = Ne;
|
|
1622
|
+
function xn(e) {
|
|
1623
|
+
Ie = e;
|
|
1613
1624
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return ++
|
|
1625
|
+
function yr() {
|
|
1626
|
+
return ++br;
|
|
1616
1627
|
}
|
|
1617
|
-
function
|
|
1628
|
+
function gt(e) {
|
|
1618
1629
|
var t = e.f;
|
|
1619
|
-
if ((t &
|
|
1630
|
+
if ((t & P) !== 0)
|
|
1620
1631
|
return !0;
|
|
1621
|
-
if (t &
|
|
1632
|
+
if (t & L && (e.f &= ~Pe), (t & re) !== 0) {
|
|
1622
1633
|
for (var n = (
|
|
1623
1634
|
/** @type {Value[]} */
|
|
1624
1635
|
e.deps
|
|
1625
1636
|
), r = n.length, i = 0; i < r; i++) {
|
|
1626
1637
|
var s = n[i];
|
|
1627
|
-
if (
|
|
1638
|
+
if (gt(
|
|
1628
1639
|
/** @type {Derived} */
|
|
1629
1640
|
s
|
|
1630
|
-
) &&
|
|
1641
|
+
) && nr(
|
|
1631
1642
|
/** @type {Derived} */
|
|
1632
1643
|
s
|
|
1633
1644
|
), s.wv > e.wv)
|
|
1634
1645
|
return !0;
|
|
1635
1646
|
}
|
|
1636
|
-
(t &
|
|
1647
|
+
(t & G) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1637
1648
|
// traversal of the graph in the other batches still happens
|
|
1638
|
-
|
|
1649
|
+
te === null && C(e, I);
|
|
1639
1650
|
}
|
|
1640
1651
|
return !1;
|
|
1641
1652
|
}
|
|
1642
|
-
function
|
|
1653
|
+
function $r(e, t, n = !0) {
|
|
1643
1654
|
var r = e.reactions;
|
|
1644
|
-
if (r !== null && !(
|
|
1655
|
+
if (r !== null && !(J !== null && Ke.call(J, e)))
|
|
1645
1656
|
for (var i = 0; i < r.length; i++) {
|
|
1646
1657
|
var s = r[i];
|
|
1647
|
-
(s.f &
|
|
1658
|
+
(s.f & L) !== 0 ? $r(
|
|
1648
1659
|
/** @type {Derived} */
|
|
1649
1660
|
s,
|
|
1650
1661
|
t,
|
|
1651
1662
|
!1
|
|
1652
|
-
) : t === s && (n ?
|
|
1663
|
+
) : t === s && (n ? C(s, P) : (s.f & I) !== 0 && C(s, re), ae(
|
|
1653
1664
|
/** @type {Effect} */
|
|
1654
1665
|
s
|
|
1655
1666
|
));
|
|
1656
1667
|
}
|
|
1657
1668
|
}
|
|
1658
|
-
function
|
|
1659
|
-
var t =
|
|
1660
|
-
|
|
1661
|
-
null,
|
|
1662
|
-
e.ac.abort(
|
|
1669
|
+
function Er(e) {
|
|
1670
|
+
var t = U, n = q, r = K, i = E, s = J, o = X, l = ne, a = Ie, f = e.f;
|
|
1671
|
+
U = /** @type {null | Value[]} */
|
|
1672
|
+
null, q = 0, K = null, E = (f & (se | xe)) === 0 ? e : null, J = null, Je(e.ctx), ne = !1, Ie = ++Ne, e.ac !== null && (nn(() => {
|
|
1673
|
+
e.ac.abort(Re);
|
|
1663
1674
|
}), e.ac = null);
|
|
1664
1675
|
try {
|
|
1665
|
-
e.f |=
|
|
1666
|
-
var
|
|
1676
|
+
e.f |= Bt;
|
|
1677
|
+
var h = (
|
|
1667
1678
|
/** @type {Function} */
|
|
1668
1679
|
e.fn
|
|
1669
|
-
),
|
|
1670
|
-
e.f |=
|
|
1671
|
-
var
|
|
1672
|
-
if (
|
|
1673
|
-
var
|
|
1674
|
-
if (
|
|
1675
|
-
for (
|
|
1676
|
-
|
|
1680
|
+
), v = h();
|
|
1681
|
+
e.f |= Be;
|
|
1682
|
+
var c = e.deps, p = z?.is_fork;
|
|
1683
|
+
if (U !== null) {
|
|
1684
|
+
var d;
|
|
1685
|
+
if (p || _t(e, q), c !== null && q > 0)
|
|
1686
|
+
for (c.length = q + U.length, d = 0; d < U.length; d++)
|
|
1687
|
+
c[q + d] = U[d];
|
|
1677
1688
|
else
|
|
1678
|
-
e.deps =
|
|
1679
|
-
if (
|
|
1680
|
-
for (
|
|
1681
|
-
(
|
|
1682
|
-
} else !
|
|
1683
|
-
if (
|
|
1684
|
-
for (
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1689
|
+
e.deps = c = U;
|
|
1690
|
+
if (rn() && (e.f & G) !== 0)
|
|
1691
|
+
for (d = q; d < c.length; d++)
|
|
1692
|
+
(c[d].reactions ??= []).push(e);
|
|
1693
|
+
} else !p && c !== null && q < c.length && (_t(e, q), c.length = q);
|
|
1694
|
+
if (Yn() && K !== null && !ne && c !== null && (e.f & (L | re | P)) === 0)
|
|
1695
|
+
for (d = 0; d < /** @type {Source[]} */
|
|
1696
|
+
K.length; d++)
|
|
1697
|
+
$r(
|
|
1698
|
+
K[d],
|
|
1688
1699
|
/** @type {Effect} */
|
|
1689
1700
|
e
|
|
1690
1701
|
);
|
|
1691
1702
|
if (i !== null && i !== e) {
|
|
1692
|
-
if (
|
|
1693
|
-
for (let
|
|
1694
|
-
i.deps[
|
|
1703
|
+
if (Ne++, i.deps !== null)
|
|
1704
|
+
for (let g = 0; g < n; g += 1)
|
|
1705
|
+
i.deps[g].rv = Ne;
|
|
1695
1706
|
if (t !== null)
|
|
1696
|
-
for (const
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
}
|
|
1701
|
-
return (e.f &
|
|
1702
|
-
} catch (
|
|
1703
|
-
return
|
|
1707
|
+
for (const g of t)
|
|
1708
|
+
g.rv = Ne;
|
|
1709
|
+
K !== null && (r === null ? r = K : r.push(.../** @type {Source[]} */
|
|
1710
|
+
K));
|
|
1711
|
+
}
|
|
1712
|
+
return (e.f & ye) !== 0 && (e.f ^= ye), v;
|
|
1713
|
+
} catch (g) {
|
|
1714
|
+
return Wn(g);
|
|
1704
1715
|
} finally {
|
|
1705
|
-
e.f ^=
|
|
1716
|
+
e.f ^= Bt, U = t, q = n, K = r, E = i, J = s, Je(o), ne = l, Ie = a;
|
|
1706
1717
|
}
|
|
1707
1718
|
}
|
|
1708
|
-
function
|
|
1719
|
+
function ss(e, t) {
|
|
1709
1720
|
let n = t.reactions;
|
|
1710
1721
|
if (n !== null) {
|
|
1711
|
-
var r =
|
|
1722
|
+
var r = ai.call(n, e);
|
|
1712
1723
|
if (r !== -1) {
|
|
1713
1724
|
var i = n.length - 1;
|
|
1714
1725
|
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1715
1726
|
}
|
|
1716
1727
|
}
|
|
1717
|
-
if (n === null && (t.f &
|
|
1728
|
+
if (n === null && (t.f & L) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1718
1729
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1719
1730
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1720
|
-
(
|
|
1731
|
+
(U === null || !Ke.call(U, t))) {
|
|
1721
1732
|
var s = (
|
|
1722
1733
|
/** @type {Derived} */
|
|
1723
1734
|
t
|
|
1724
1735
|
);
|
|
1725
|
-
(s.f &
|
|
1736
|
+
(s.f & G) !== 0 && (s.f ^= G, s.f &= ~Pe), Zt(s), Wi(s), _t(s, 0);
|
|
1726
1737
|
}
|
|
1727
1738
|
}
|
|
1728
|
-
function
|
|
1739
|
+
function _t(e, t) {
|
|
1729
1740
|
var n = e.deps;
|
|
1730
1741
|
if (n !== null)
|
|
1731
1742
|
for (var r = t; r < n.length; r++)
|
|
1732
|
-
|
|
1743
|
+
ss(e, n[r]);
|
|
1733
1744
|
}
|
|
1734
|
-
function
|
|
1745
|
+
function Qe(e) {
|
|
1735
1746
|
var t = e.f;
|
|
1736
|
-
if ((t &
|
|
1737
|
-
|
|
1738
|
-
var n =
|
|
1739
|
-
|
|
1747
|
+
if ((t & fe) === 0) {
|
|
1748
|
+
C(e, I);
|
|
1749
|
+
var n = S, r = Et;
|
|
1750
|
+
S = e, Et = !0;
|
|
1740
1751
|
try {
|
|
1741
|
-
(t & (
|
|
1742
|
-
var i =
|
|
1743
|
-
e.teardown = typeof i == "function" ? i : null, e.wv =
|
|
1752
|
+
(t & (Se | Jt)) !== 0 ? ns(e) : ln(e), _r(e);
|
|
1753
|
+
var i = Er(e);
|
|
1754
|
+
e.teardown = typeof i == "function" ? i : null, e.wv = br;
|
|
1744
1755
|
var s;
|
|
1745
|
-
|
|
1756
|
+
Dt && Oi && (e.f & P) !== 0 && e.deps;
|
|
1746
1757
|
} finally {
|
|
1747
|
-
|
|
1758
|
+
Et = r, S = n;
|
|
1748
1759
|
}
|
|
1749
1760
|
}
|
|
1750
1761
|
}
|
|
1751
1762
|
function u(e) {
|
|
1752
|
-
var t = e.f, n = (t &
|
|
1753
|
-
if (
|
|
1754
|
-
var r =
|
|
1755
|
-
if (!r && (
|
|
1756
|
-
var i =
|
|
1757
|
-
if ((
|
|
1758
|
-
e.rv <
|
|
1763
|
+
var t = e.f, n = (t & L) !== 0;
|
|
1764
|
+
if (E !== null && !ne) {
|
|
1765
|
+
var r = S !== null && (S.f & fe) !== 0;
|
|
1766
|
+
if (!r && (J === null || !Ke.call(J, e))) {
|
|
1767
|
+
var i = E.deps;
|
|
1768
|
+
if ((E.f & Bt) !== 0)
|
|
1769
|
+
e.rv < Ne && (e.rv = Ne, U === null && i !== null && i[q] === e ? q++ : U === null ? U = [e] : U.push(e));
|
|
1759
1770
|
else {
|
|
1760
|
-
(
|
|
1771
|
+
(E.deps ??= []).push(e);
|
|
1761
1772
|
var s = e.reactions;
|
|
1762
|
-
s === null ? e.reactions = [
|
|
1773
|
+
s === null ? e.reactions = [E] : Ke.call(s, E) || s.push(E);
|
|
1763
1774
|
}
|
|
1764
1775
|
}
|
|
1765
1776
|
}
|
|
1766
|
-
if (
|
|
1767
|
-
return
|
|
1777
|
+
if (Te && Ee.has(e))
|
|
1778
|
+
return Ee.get(e);
|
|
1768
1779
|
if (n) {
|
|
1769
|
-
var
|
|
1780
|
+
var o = (
|
|
1770
1781
|
/** @type {Derived} */
|
|
1771
1782
|
e
|
|
1772
1783
|
);
|
|
1773
|
-
if (
|
|
1774
|
-
var
|
|
1775
|
-
return ((
|
|
1784
|
+
if (Te) {
|
|
1785
|
+
var l = o.v;
|
|
1786
|
+
return ((o.f & I) === 0 && o.reactions !== null || Sr(o)) && (l = Qt(o)), Ee.set(o, l), l;
|
|
1776
1787
|
}
|
|
1777
|
-
var a = (
|
|
1778
|
-
|
|
1788
|
+
var a = (o.f & G) === 0 && !ne && E !== null && (Et || (E.f & G) !== 0), f = (o.f & Be) === 0;
|
|
1789
|
+
gt(o) && (a && (o.f |= G), nr(o)), a && !f && (rr(o), Tr(o));
|
|
1779
1790
|
}
|
|
1780
|
-
if (
|
|
1781
|
-
return
|
|
1782
|
-
if ((e.f &
|
|
1791
|
+
if (te?.has(e))
|
|
1792
|
+
return te.get(e);
|
|
1793
|
+
if ((e.f & ye) !== 0)
|
|
1783
1794
|
throw e.v;
|
|
1784
1795
|
return e.v;
|
|
1785
1796
|
}
|
|
1786
|
-
function
|
|
1787
|
-
if (e.f |=
|
|
1797
|
+
function Tr(e) {
|
|
1798
|
+
if (e.f |= G, e.deps !== null)
|
|
1788
1799
|
for (const t of e.deps)
|
|
1789
|
-
(t.reactions ??= []).push(e), (t.f &
|
|
1800
|
+
(t.reactions ??= []).push(e), (t.f & L) !== 0 && (t.f & G) === 0 && (rr(
|
|
1790
1801
|
/** @type {Derived} */
|
|
1791
1802
|
t
|
|
1792
|
-
),
|
|
1803
|
+
), Tr(
|
|
1793
1804
|
/** @type {Derived} */
|
|
1794
1805
|
t
|
|
1795
1806
|
));
|
|
1796
1807
|
}
|
|
1797
|
-
function
|
|
1798
|
-
if (e.v ===
|
|
1808
|
+
function Sr(e) {
|
|
1809
|
+
if (e.v === M) return !0;
|
|
1799
1810
|
if (e.deps === null) return !1;
|
|
1800
1811
|
for (const t of e.deps)
|
|
1801
|
-
if (
|
|
1812
|
+
if (Ee.has(t) || (t.f & L) !== 0 && Sr(
|
|
1802
1813
|
/** @type {Derived} */
|
|
1803
1814
|
t
|
|
1804
1815
|
))
|
|
1805
1816
|
return !0;
|
|
1806
1817
|
return !1;
|
|
1807
1818
|
}
|
|
1808
|
-
function
|
|
1809
|
-
var t =
|
|
1819
|
+
function un(e) {
|
|
1820
|
+
var t = ne;
|
|
1810
1821
|
try {
|
|
1811
|
-
return
|
|
1822
|
+
return ne = !0, e();
|
|
1812
1823
|
} finally {
|
|
1813
|
-
|
|
1814
|
-
}
|
|
1824
|
+
ne = t;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
const ut = /* @__PURE__ */ Symbol("events"), xr = /* @__PURE__ */ new Set(), Vt = /* @__PURE__ */ new Set();
|
|
1828
|
+
function os(e, t, n, r = {}) {
|
|
1829
|
+
function i(s) {
|
|
1830
|
+
if (r.capture || qt.call(t, s), !s.cancelBubble)
|
|
1831
|
+
return nn(() => n?.call(this, s));
|
|
1832
|
+
}
|
|
1833
|
+
return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? $e(() => {
|
|
1834
|
+
t.addEventListener(e, i, r);
|
|
1835
|
+
}) : t.addEventListener(e, i, r), i;
|
|
1836
|
+
}
|
|
1837
|
+
function lt(e, t, n, r, i) {
|
|
1838
|
+
var s = { capture: r, passive: i }, o = os(e, t, n, s);
|
|
1839
|
+
(t === document.body || // @ts-ignore
|
|
1840
|
+
t === window || // @ts-ignore
|
|
1841
|
+
t === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
|
|
1842
|
+
t instanceof HTMLMediaElement) && dr(() => {
|
|
1843
|
+
t.removeEventListener(e, o, s);
|
|
1844
|
+
});
|
|
1815
1845
|
}
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
(t[Pe] ??= {})[e] = n;
|
|
1846
|
+
function ze(e, t, n) {
|
|
1847
|
+
(t[ut] ??= {})[e] = n;
|
|
1819
1848
|
}
|
|
1820
|
-
function
|
|
1849
|
+
function ls(e) {
|
|
1821
1850
|
for (var t = 0; t < e.length; t++)
|
|
1822
|
-
|
|
1823
|
-
for (var n of
|
|
1851
|
+
xr.add(e[t]);
|
|
1852
|
+
for (var n of Vt)
|
|
1824
1853
|
n(e);
|
|
1825
1854
|
}
|
|
1826
|
-
let
|
|
1827
|
-
function
|
|
1855
|
+
let kn = null;
|
|
1856
|
+
function qt(e) {
|
|
1828
1857
|
var t = this, n = (
|
|
1829
1858
|
/** @type {Node} */
|
|
1830
1859
|
t.ownerDocument
|
|
@@ -1832,139 +1861,139 @@ function Yt(e) {
|
|
|
1832
1861
|
/** @type {null | Element} */
|
|
1833
1862
|
i[0] || e.target
|
|
1834
1863
|
);
|
|
1835
|
-
|
|
1836
|
-
var
|
|
1837
|
-
if (
|
|
1838
|
-
var a = i.indexOf(
|
|
1864
|
+
kn = e;
|
|
1865
|
+
var o = 0, l = kn === e && e[ut];
|
|
1866
|
+
if (l) {
|
|
1867
|
+
var a = i.indexOf(l);
|
|
1839
1868
|
if (a !== -1 && (t === document || t === /** @type {any} */
|
|
1840
1869
|
window)) {
|
|
1841
|
-
e[
|
|
1870
|
+
e[ut] = t;
|
|
1842
1871
|
return;
|
|
1843
1872
|
}
|
|
1844
1873
|
var f = i.indexOf(t);
|
|
1845
1874
|
if (f === -1)
|
|
1846
1875
|
return;
|
|
1847
|
-
a <= f && (
|
|
1876
|
+
a <= f && (o = a);
|
|
1848
1877
|
}
|
|
1849
1878
|
if (s = /** @type {Element} */
|
|
1850
|
-
i[
|
|
1851
|
-
|
|
1879
|
+
i[o] || e.target, s !== t) {
|
|
1880
|
+
xt(e, "currentTarget", {
|
|
1852
1881
|
configurable: !0,
|
|
1853
1882
|
get() {
|
|
1854
1883
|
return s || n;
|
|
1855
1884
|
}
|
|
1856
1885
|
});
|
|
1857
|
-
var
|
|
1858
|
-
|
|
1886
|
+
var h = E, v = S;
|
|
1887
|
+
Z(null), ue(null);
|
|
1859
1888
|
try {
|
|
1860
|
-
for (var
|
|
1861
|
-
var
|
|
1889
|
+
for (var c, p = []; s !== null; ) {
|
|
1890
|
+
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1862
1891
|
s.host || null;
|
|
1863
1892
|
try {
|
|
1864
|
-
var
|
|
1865
|
-
|
|
1893
|
+
var g = s[ut]?.[r];
|
|
1894
|
+
g != null && (!/** @type {any} */
|
|
1866
1895
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1867
1896
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1868
|
-
e.target === s) &&
|
|
1869
|
-
} catch (
|
|
1870
|
-
|
|
1897
|
+
e.target === s) && g.call(s, e);
|
|
1898
|
+
} catch (b) {
|
|
1899
|
+
c ? p.push(b) : c = b;
|
|
1871
1900
|
}
|
|
1872
|
-
if (e.cancelBubble ||
|
|
1901
|
+
if (e.cancelBubble || d === t || d === null)
|
|
1873
1902
|
break;
|
|
1874
|
-
s =
|
|
1903
|
+
s = d;
|
|
1875
1904
|
}
|
|
1876
|
-
if (
|
|
1877
|
-
for (let
|
|
1905
|
+
if (c) {
|
|
1906
|
+
for (let b of p)
|
|
1878
1907
|
queueMicrotask(() => {
|
|
1879
|
-
throw
|
|
1908
|
+
throw b;
|
|
1880
1909
|
});
|
|
1881
|
-
throw
|
|
1910
|
+
throw c;
|
|
1882
1911
|
}
|
|
1883
1912
|
} finally {
|
|
1884
|
-
e[
|
|
1913
|
+
e[ut] = t, delete e.currentTarget, Z(h), ue(v);
|
|
1885
1914
|
}
|
|
1886
1915
|
}
|
|
1887
1916
|
}
|
|
1888
|
-
const
|
|
1917
|
+
const as = (
|
|
1889
1918
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1890
1919
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1891
1920
|
/** @param {string} html */
|
|
1892
1921
|
createHTML: (e) => e
|
|
1893
1922
|
})
|
|
1894
1923
|
);
|
|
1895
|
-
function
|
|
1924
|
+
function fs(e) {
|
|
1896
1925
|
return (
|
|
1897
1926
|
/** @type {string} */
|
|
1898
|
-
|
|
1927
|
+
as?.createHTML(e) ?? e
|
|
1899
1928
|
);
|
|
1900
1929
|
}
|
|
1901
|
-
function
|
|
1902
|
-
var t =
|
|
1903
|
-
return t.innerHTML =
|
|
1930
|
+
function kr(e) {
|
|
1931
|
+
var t = en("template");
|
|
1932
|
+
return t.innerHTML = fs(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1904
1933
|
}
|
|
1905
|
-
function
|
|
1934
|
+
function Fe(e, t) {
|
|
1906
1935
|
var n = (
|
|
1907
1936
|
/** @type {Effect} */
|
|
1908
|
-
|
|
1937
|
+
S
|
|
1909
1938
|
);
|
|
1910
1939
|
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1911
1940
|
}
|
|
1912
1941
|
// @__NO_SIDE_EFFECTS__
|
|
1913
|
-
function
|
|
1914
|
-
var n = (t &
|
|
1942
|
+
function cn(e, t) {
|
|
1943
|
+
var n = (t & li) !== 0, r, i = !e.startsWith("<!>");
|
|
1915
1944
|
return () => {
|
|
1916
|
-
if (
|
|
1917
|
-
return
|
|
1918
|
-
r === void 0 && (r =
|
|
1919
|
-
/* @__PURE__ */
|
|
1945
|
+
if (x)
|
|
1946
|
+
return Fe(T, null), T;
|
|
1947
|
+
r === void 0 && (r = kr(i ? e : "<!>" + e), r = /** @type {TemplateNode} */
|
|
1948
|
+
/* @__PURE__ */ De(r));
|
|
1920
1949
|
var s = (
|
|
1921
1950
|
/** @type {TemplateNode} */
|
|
1922
|
-
n ||
|
|
1951
|
+
n || lr ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1923
1952
|
);
|
|
1924
|
-
return
|
|
1953
|
+
return Fe(s, s), s;
|
|
1925
1954
|
};
|
|
1926
1955
|
}
|
|
1927
1956
|
// @__NO_SIDE_EFFECTS__
|
|
1928
|
-
function
|
|
1957
|
+
function us(e, t, n = "svg") {
|
|
1929
1958
|
var r = !e.startsWith("<!>"), i = `<${n}>${r ? e : "<!>" + e}</${n}>`, s;
|
|
1930
1959
|
return () => {
|
|
1931
|
-
if (
|
|
1932
|
-
return
|
|
1960
|
+
if (x)
|
|
1961
|
+
return Fe(T, null), T;
|
|
1933
1962
|
if (!s) {
|
|
1934
|
-
var
|
|
1963
|
+
var o = (
|
|
1935
1964
|
/** @type {DocumentFragment} */
|
|
1936
|
-
|
|
1937
|
-
),
|
|
1965
|
+
kr(i)
|
|
1966
|
+
), l = (
|
|
1938
1967
|
/** @type {Element} */
|
|
1939
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ De(o)
|
|
1940
1969
|
);
|
|
1941
1970
|
s = /** @type {Element} */
|
|
1942
|
-
/* @__PURE__ */
|
|
1971
|
+
/* @__PURE__ */ De(l);
|
|
1943
1972
|
}
|
|
1944
1973
|
var a = (
|
|
1945
1974
|
/** @type {TemplateNode} */
|
|
1946
1975
|
s.cloneNode(!0)
|
|
1947
1976
|
);
|
|
1948
|
-
return
|
|
1977
|
+
return Fe(a, a), a;
|
|
1949
1978
|
};
|
|
1950
1979
|
}
|
|
1951
1980
|
// @__NO_SIDE_EFFECTS__
|
|
1952
|
-
function
|
|
1953
|
-
return /* @__PURE__ */
|
|
1981
|
+
function dn(e, t) {
|
|
1982
|
+
return /* @__PURE__ */ us(e, t, "svg");
|
|
1954
1983
|
}
|
|
1955
|
-
function
|
|
1956
|
-
if (
|
|
1957
|
-
return
|
|
1958
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n =
|
|
1959
|
-
return e.append(t, n),
|
|
1984
|
+
function cs() {
|
|
1985
|
+
if (x)
|
|
1986
|
+
return Fe(T, null), T;
|
|
1987
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = ie();
|
|
1988
|
+
return e.append(t, n), Fe(t, n), e;
|
|
1960
1989
|
}
|
|
1961
|
-
function
|
|
1962
|
-
if (
|
|
1990
|
+
function we(e, t) {
|
|
1991
|
+
if (x) {
|
|
1963
1992
|
var n = (
|
|
1964
1993
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1965
|
-
|
|
1994
|
+
S
|
|
1966
1995
|
);
|
|
1967
|
-
((n.f &
|
|
1996
|
+
((n.f & Be) === 0 || n.nodes.end === null) && (n.nodes.end = T), Ct();
|
|
1968
1997
|
return;
|
|
1969
1998
|
}
|
|
1970
1999
|
e !== null && e.before(
|
|
@@ -1972,109 +2001,109 @@ function ve(e, t) {
|
|
|
1972
2001
|
t
|
|
1973
2002
|
);
|
|
1974
2003
|
}
|
|
1975
|
-
const
|
|
1976
|
-
function
|
|
1977
|
-
return
|
|
2004
|
+
const ds = ["touchstart", "touchmove"];
|
|
2005
|
+
function hs(e) {
|
|
2006
|
+
return ds.includes(e);
|
|
1978
2007
|
}
|
|
1979
|
-
function
|
|
2008
|
+
function An(e, t) {
|
|
1980
2009
|
var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1981
2010
|
n !== (e.__t ??= e.nodeValue) && (e.__t = n, e.nodeValue = `${n}`);
|
|
1982
2011
|
}
|
|
1983
|
-
function
|
|
1984
|
-
return
|
|
2012
|
+
function Ar(e, t) {
|
|
2013
|
+
return zr(e, t);
|
|
1985
2014
|
}
|
|
1986
|
-
function
|
|
1987
|
-
|
|
1988
|
-
const n = t.target, r =
|
|
2015
|
+
function vs(e, t) {
|
|
2016
|
+
Ut(), t.intro = t.intro ?? !1;
|
|
2017
|
+
const n = t.target, r = x, i = T;
|
|
1989
2018
|
try {
|
|
1990
|
-
for (var s = /* @__PURE__ */
|
|
1991
|
-
s.data !==
|
|
1992
|
-
s = /* @__PURE__ */
|
|
2019
|
+
for (var s = /* @__PURE__ */ De(n); s && (s.nodeType !== pt || /** @type {Comment} */
|
|
2020
|
+
s.data !== In); )
|
|
2021
|
+
s = /* @__PURE__ */ ce(s);
|
|
1993
2022
|
if (!s)
|
|
1994
|
-
throw
|
|
1995
|
-
|
|
2023
|
+
throw Ye;
|
|
2024
|
+
pe(!0), Y(
|
|
1996
2025
|
/** @type {Comment} */
|
|
1997
2026
|
s
|
|
1998
2027
|
);
|
|
1999
|
-
const
|
|
2000
|
-
return
|
|
2001
|
-
|
|
2002
|
-
} catch (
|
|
2003
|
-
if (
|
|
2004
|
-
`).some((
|
|
2005
|
-
throw
|
|
2006
|
-
return
|
|
2028
|
+
const o = zr(e, { ...t, anchor: s });
|
|
2029
|
+
return pe(!1), /** @type {Exports} */
|
|
2030
|
+
o;
|
|
2031
|
+
} catch (o) {
|
|
2032
|
+
if (o instanceof Error && o.message.split(`
|
|
2033
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
2034
|
+
throw o;
|
|
2035
|
+
return o !== Ye && console.warn("Failed to hydrate: ", o), t.recover === !1 && Ti(), Ut(), ur(n), pe(!1), Ar(e, t);
|
|
2007
2036
|
} finally {
|
|
2008
|
-
|
|
2037
|
+
pe(r), Y(i);
|
|
2009
2038
|
}
|
|
2010
2039
|
}
|
|
2011
|
-
const
|
|
2012
|
-
function
|
|
2013
|
-
|
|
2014
|
-
var a = void 0, f =
|
|
2015
|
-
var
|
|
2016
|
-
|
|
2040
|
+
const bt = /* @__PURE__ */ new Map();
|
|
2041
|
+
function zr(e, { target: t, anchor: n, props: r = {}, events: i, context: s, intro: o = !0, transformError: l }) {
|
|
2042
|
+
Ut();
|
|
2043
|
+
var a = void 0, f = es(() => {
|
|
2044
|
+
var h = n ?? t.appendChild(ie());
|
|
2045
|
+
Bi(
|
|
2017
2046
|
/** @type {TemplateNode} */
|
|
2018
|
-
|
|
2047
|
+
h,
|
|
2019
2048
|
{
|
|
2020
2049
|
pending: () => {
|
|
2021
2050
|
}
|
|
2022
2051
|
},
|
|
2023
|
-
(
|
|
2024
|
-
|
|
2025
|
-
var
|
|
2052
|
+
(p) => {
|
|
2053
|
+
Vn({});
|
|
2054
|
+
var d = (
|
|
2026
2055
|
/** @type {ComponentContext} */
|
|
2027
|
-
|
|
2056
|
+
X
|
|
2028
2057
|
);
|
|
2029
|
-
if (s && (
|
|
2058
|
+
if (s && (d.c = s), i && (r.$$events = i), x && Fe(
|
|
2030
2059
|
/** @type {TemplateNode} */
|
|
2031
|
-
|
|
2060
|
+
p,
|
|
2032
2061
|
null
|
|
2033
|
-
), a = e(
|
|
2034
|
-
|
|
2035
|
-
throw
|
|
2036
|
-
|
|
2062
|
+
), a = e(p, r) || {}, x && (S.nodes.end = T, T === null || T.nodeType !== pt || /** @type {Comment} */
|
|
2063
|
+
T.data !== Gt))
|
|
2064
|
+
throw Rt(), Ye;
|
|
2065
|
+
qn();
|
|
2037
2066
|
},
|
|
2038
|
-
|
|
2067
|
+
l
|
|
2039
2068
|
);
|
|
2040
|
-
var
|
|
2041
|
-
for (var
|
|
2042
|
-
var
|
|
2043
|
-
if (!
|
|
2044
|
-
|
|
2045
|
-
var
|
|
2046
|
-
for (const
|
|
2047
|
-
var
|
|
2048
|
-
|
|
2049
|
-
var
|
|
2050
|
-
|
|
2069
|
+
var v = /* @__PURE__ */ new Set(), c = (p) => {
|
|
2070
|
+
for (var d = 0; d < p.length; d++) {
|
|
2071
|
+
var g = p[d];
|
|
2072
|
+
if (!v.has(g)) {
|
|
2073
|
+
v.add(g);
|
|
2074
|
+
var b = hs(g);
|
|
2075
|
+
for (const O of [t, document]) {
|
|
2076
|
+
var y = bt.get(O);
|
|
2077
|
+
y === void 0 && (y = /* @__PURE__ */ new Map(), bt.set(O, y));
|
|
2078
|
+
var m = y.get(g);
|
|
2079
|
+
m === void 0 ? (O.addEventListener(g, qt, { passive: b }), y.set(g, 1)) : y.set(g, m + 1);
|
|
2051
2080
|
}
|
|
2052
2081
|
}
|
|
2053
2082
|
}
|
|
2054
2083
|
};
|
|
2055
|
-
return
|
|
2056
|
-
for (var
|
|
2057
|
-
for (const
|
|
2058
|
-
var
|
|
2084
|
+
return c(At(xr)), Vt.add(c), () => {
|
|
2085
|
+
for (var p of v)
|
|
2086
|
+
for (const b of [t, document]) {
|
|
2087
|
+
var d = (
|
|
2059
2088
|
/** @type {Map<string, number>} */
|
|
2060
|
-
|
|
2061
|
-
),
|
|
2089
|
+
bt.get(b)
|
|
2090
|
+
), g = (
|
|
2062
2091
|
/** @type {number} */
|
|
2063
|
-
|
|
2092
|
+
d.get(p)
|
|
2064
2093
|
);
|
|
2065
|
-
--
|
|
2094
|
+
--g == 0 ? (b.removeEventListener(p, qt), d.delete(p), d.size === 0 && bt.delete(b)) : d.set(p, g);
|
|
2066
2095
|
}
|
|
2067
|
-
|
|
2096
|
+
Vt.delete(c), h !== n && h.parentNode?.removeChild(h);
|
|
2068
2097
|
};
|
|
2069
2098
|
});
|
|
2070
|
-
return
|
|
2099
|
+
return Yt.set(a, f), a;
|
|
2071
2100
|
}
|
|
2072
|
-
let
|
|
2073
|
-
function
|
|
2074
|
-
const n =
|
|
2075
|
-
return n ? (
|
|
2101
|
+
let Yt = /* @__PURE__ */ new WeakMap();
|
|
2102
|
+
function _s(e, t) {
|
|
2103
|
+
const n = Yt.get(e);
|
|
2104
|
+
return n ? (Yt.delete(e), n(t)) : Promise.resolve();
|
|
2076
2105
|
}
|
|
2077
|
-
class
|
|
2106
|
+
class ps {
|
|
2078
2107
|
/** @type {TemplateNode} */
|
|
2079
2108
|
anchor;
|
|
2080
2109
|
/** @type {Map<Batch, Key>} */
|
|
@@ -2104,7 +2133,7 @@ class xi {
|
|
|
2104
2133
|
* Keys of effects that are currently outroing
|
|
2105
2134
|
* @type {Set<Key>}
|
|
2106
2135
|
*/
|
|
2107
|
-
#
|
|
2136
|
+
#l = /* @__PURE__ */ new Set();
|
|
2108
2137
|
/**
|
|
2109
2138
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2110
2139
|
* This is necessary for `<svelte:element>`
|
|
@@ -2120,35 +2149,35 @@ class xi {
|
|
|
2120
2149
|
/**
|
|
2121
2150
|
* @param {Batch} batch
|
|
2122
2151
|
*/
|
|
2123
|
-
#
|
|
2152
|
+
#o = (t) => {
|
|
2124
2153
|
if (this.#e.has(t)) {
|
|
2125
2154
|
var n = (
|
|
2126
2155
|
/** @type {Key} */
|
|
2127
2156
|
this.#e.get(t)
|
|
2128
2157
|
), r = this.#t.get(n);
|
|
2129
2158
|
if (r)
|
|
2130
|
-
|
|
2159
|
+
an(r), this.#l.delete(n);
|
|
2131
2160
|
else {
|
|
2132
2161
|
var i = this.#n.get(n);
|
|
2133
|
-
i && (i.effect.f &
|
|
2162
|
+
i && (i.effect.f & B) === 0 && (this.#t.set(n, i.effect), this.#n.delete(n), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), r = i.effect);
|
|
2134
2163
|
}
|
|
2135
|
-
for (const [s,
|
|
2164
|
+
for (const [s, o] of this.#e) {
|
|
2136
2165
|
if (this.#e.delete(s), s === t)
|
|
2137
2166
|
break;
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2167
|
+
const l = this.#n.get(o);
|
|
2168
|
+
l && (H(l.effect), this.#n.delete(o));
|
|
2140
2169
|
}
|
|
2141
|
-
for (const [s,
|
|
2142
|
-
if (s === n || this.#
|
|
2143
|
-
const
|
|
2170
|
+
for (const [s, o] of this.#t) {
|
|
2171
|
+
if (s === n || this.#l.has(s) || (o.f & B) !== 0) continue;
|
|
2172
|
+
const l = () => {
|
|
2144
2173
|
if (Array.from(this.#e.values()).includes(s)) {
|
|
2145
2174
|
var f = document.createDocumentFragment();
|
|
2146
|
-
|
|
2175
|
+
fn(o, f), f.append(ie()), this.#n.set(s, { effect: o, fragment: f });
|
|
2147
2176
|
} else
|
|
2148
|
-
|
|
2149
|
-
this.#
|
|
2177
|
+
H(o);
|
|
2178
|
+
this.#l.delete(s), this.#t.delete(s);
|
|
2150
2179
|
};
|
|
2151
|
-
this.#r || !r ? (this.#
|
|
2180
|
+
this.#r || !r ? (this.#l.add(s), Me(o, l, !1)) : l();
|
|
2152
2181
|
}
|
|
2153
2182
|
}
|
|
2154
2183
|
};
|
|
@@ -2159,7 +2188,7 @@ class xi {
|
|
|
2159
2188
|
this.#e.delete(t);
|
|
2160
2189
|
const n = Array.from(this.#e.values());
|
|
2161
2190
|
for (const [r, i] of this.#n)
|
|
2162
|
-
n.includes(r) || (
|
|
2191
|
+
n.includes(r) || (H(i.effect), this.#n.delete(r));
|
|
2163
2192
|
};
|
|
2164
2193
|
/**
|
|
2165
2194
|
*
|
|
@@ -2169,57 +2198,261 @@ class xi {
|
|
|
2169
2198
|
ensure(t, n) {
|
|
2170
2199
|
var r = (
|
|
2171
2200
|
/** @type {Batch} */
|
|
2172
|
-
|
|
2173
|
-
), i =
|
|
2201
|
+
z
|
|
2202
|
+
), i = cr();
|
|
2174
2203
|
if (n && !this.#t.has(t) && !this.#n.has(t))
|
|
2175
2204
|
if (i) {
|
|
2176
|
-
var s = document.createDocumentFragment(),
|
|
2177
|
-
s.append(
|
|
2178
|
-
effect:
|
|
2205
|
+
var s = document.createDocumentFragment(), o = ie();
|
|
2206
|
+
s.append(o), this.#n.set(t, {
|
|
2207
|
+
effect: W(() => n(o)),
|
|
2179
2208
|
fragment: s
|
|
2180
2209
|
});
|
|
2181
2210
|
} else
|
|
2182
2211
|
this.#t.set(
|
|
2183
2212
|
t,
|
|
2184
|
-
|
|
2213
|
+
W(() => n(this.anchor))
|
|
2185
2214
|
);
|
|
2186
2215
|
if (this.#e.set(r, t), i) {
|
|
2187
|
-
for (const [
|
|
2188
|
-
|
|
2189
|
-
for (const [
|
|
2190
|
-
|
|
2191
|
-
r.oncommit(this.#
|
|
2216
|
+
for (const [l, a] of this.#t)
|
|
2217
|
+
l === t ? r.unskip_effect(a) : r.skip_effect(a);
|
|
2218
|
+
for (const [l, a] of this.#n)
|
|
2219
|
+
l === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
2220
|
+
r.oncommit(this.#o), r.ondiscard(this.#i);
|
|
2192
2221
|
} else
|
|
2193
|
-
|
|
2222
|
+
x && (this.anchor = T), this.#o(r);
|
|
2194
2223
|
}
|
|
2195
2224
|
}
|
|
2196
|
-
function
|
|
2225
|
+
function Lt(e, t, n = !1) {
|
|
2197
2226
|
var r;
|
|
2198
|
-
|
|
2199
|
-
var i = new
|
|
2200
|
-
function l
|
|
2201
|
-
if (
|
|
2202
|
-
var f =
|
|
2227
|
+
x && (r = T, Ct());
|
|
2228
|
+
var i = new ps(e), s = n ? Ge : 0;
|
|
2229
|
+
function o(l, a) {
|
|
2230
|
+
if (x) {
|
|
2231
|
+
var f = Hn(
|
|
2203
2232
|
/** @type {TemplateNode} */
|
|
2204
2233
|
r
|
|
2205
2234
|
);
|
|
2206
|
-
if (
|
|
2207
|
-
var
|
|
2208
|
-
|
|
2235
|
+
if (l !== parseInt(f.substring(1))) {
|
|
2236
|
+
var h = kt();
|
|
2237
|
+
Y(h), i.anchor = h, pe(!1), i.ensure(l, a), pe(!0);
|
|
2209
2238
|
return;
|
|
2210
2239
|
}
|
|
2211
2240
|
}
|
|
2212
|
-
i.ensure(
|
|
2241
|
+
i.ensure(l, a);
|
|
2213
2242
|
}
|
|
2214
|
-
|
|
2215
|
-
var
|
|
2243
|
+
on(() => {
|
|
2244
|
+
var l = !1;
|
|
2216
2245
|
t((a, f = 0) => {
|
|
2217
|
-
|
|
2218
|
-
}),
|
|
2246
|
+
l = !0, o(f, a);
|
|
2247
|
+
}), l || o(-1, null);
|
|
2219
2248
|
}, s);
|
|
2220
2249
|
}
|
|
2221
|
-
function
|
|
2222
|
-
|
|
2250
|
+
function gs(e, t, n) {
|
|
2251
|
+
for (var r = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
|
|
2252
|
+
let v = t[l];
|
|
2253
|
+
Me(
|
|
2254
|
+
v,
|
|
2255
|
+
() => {
|
|
2256
|
+
if (s) {
|
|
2257
|
+
if (s.pending.delete(v), s.done.add(v), s.pending.size === 0) {
|
|
2258
|
+
var c = (
|
|
2259
|
+
/** @type {Set<EachOutroGroup>} */
|
|
2260
|
+
e.outrogroups
|
|
2261
|
+
);
|
|
2262
|
+
Kt(e, At(s.done)), c.delete(s), c.size === 0 && (e.outrogroups = null);
|
|
2263
|
+
}
|
|
2264
|
+
} else
|
|
2265
|
+
o -= 1;
|
|
2266
|
+
},
|
|
2267
|
+
!1
|
|
2268
|
+
);
|
|
2269
|
+
}
|
|
2270
|
+
if (o === 0) {
|
|
2271
|
+
var a = r.length === 0 && n !== null;
|
|
2272
|
+
if (a) {
|
|
2273
|
+
var f = (
|
|
2274
|
+
/** @type {Element} */
|
|
2275
|
+
n
|
|
2276
|
+
), h = (
|
|
2277
|
+
/** @type {Element} */
|
|
2278
|
+
f.parentNode
|
|
2279
|
+
);
|
|
2280
|
+
ur(h), h.append(f), e.items.clear();
|
|
2281
|
+
}
|
|
2282
|
+
Kt(e, t, !a);
|
|
2283
|
+
} else
|
|
2284
|
+
s = {
|
|
2285
|
+
pending: new Set(t),
|
|
2286
|
+
done: /* @__PURE__ */ new Set()
|
|
2287
|
+
}, (e.outrogroups ??= /* @__PURE__ */ new Set()).add(s);
|
|
2288
|
+
}
|
|
2289
|
+
function Kt(e, t, n = !0) {
|
|
2290
|
+
var r;
|
|
2291
|
+
if (e.pending.size > 0) {
|
|
2292
|
+
r = /* @__PURE__ */ new Set();
|
|
2293
|
+
for (const o of e.pending.values())
|
|
2294
|
+
for (const l of o)
|
|
2295
|
+
r.add(
|
|
2296
|
+
/** @type {EachItem} */
|
|
2297
|
+
e.items.get(l).e
|
|
2298
|
+
);
|
|
2299
|
+
}
|
|
2300
|
+
for (var i = 0; i < t.length; i++) {
|
|
2301
|
+
var s = t[i];
|
|
2302
|
+
if (r?.has(s)) {
|
|
2303
|
+
s.f |= _e;
|
|
2304
|
+
const o = document.createDocumentFragment();
|
|
2305
|
+
fn(s, o);
|
|
2306
|
+
} else
|
|
2307
|
+
H(t[i], n);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
var zn;
|
|
2311
|
+
function ms(e, t, n, r, i, s = null) {
|
|
2312
|
+
var o = e, l = /* @__PURE__ */ new Map();
|
|
2313
|
+
x && Ct();
|
|
2314
|
+
var a = null, f = /* @__PURE__ */ tr(() => {
|
|
2315
|
+
var y = n();
|
|
2316
|
+
return Ln(y) ? y : y == null ? [] : At(y);
|
|
2317
|
+
}), h, v = /* @__PURE__ */ new Map(), c = !0;
|
|
2318
|
+
function p(y) {
|
|
2319
|
+
(b.effect.f & fe) === 0 && (b.pending.delete(y), b.fallback = a, ws(b, h, o, t, r), a !== null && (h.length === 0 ? (a.f & _e) === 0 ? an(a) : (a.f ^= _e, ct(a, null, o)) : Me(a, () => {
|
|
2320
|
+
a = null;
|
|
2321
|
+
})));
|
|
2322
|
+
}
|
|
2323
|
+
function d(y) {
|
|
2324
|
+
b.pending.delete(y);
|
|
2325
|
+
}
|
|
2326
|
+
var g = on(() => {
|
|
2327
|
+
h = /** @type {V[]} */
|
|
2328
|
+
u(f);
|
|
2329
|
+
var y = h.length;
|
|
2330
|
+
let m = !1;
|
|
2331
|
+
if (x) {
|
|
2332
|
+
var O = Hn(o) === Wt;
|
|
2333
|
+
O !== (y === 0) && (o = kt(), Y(o), pe(!1), m = !0);
|
|
2334
|
+
}
|
|
2335
|
+
for (var k = /* @__PURE__ */ new Set(), R = (
|
|
2336
|
+
/** @type {Batch} */
|
|
2337
|
+
z
|
|
2338
|
+
), ke = cr(), oe = 0; oe < y; oe += 1) {
|
|
2339
|
+
x && T.nodeType === pt && /** @type {Comment} */
|
|
2340
|
+
T.data === Gt && (o = /** @type {Comment} */
|
|
2341
|
+
T, m = !0, pe(!1));
|
|
2342
|
+
var V = h[oe], Ae = r(V, oe), D = c ? null : l.get(Ae);
|
|
2343
|
+
D ? (D.v && Ze(D.v, V), D.i && Ze(D.i, oe), ke && R.unskip_effect(D.e)) : (D = bs(
|
|
2344
|
+
l,
|
|
2345
|
+
c ? o : zn ??= ie(),
|
|
2346
|
+
V,
|
|
2347
|
+
Ae,
|
|
2348
|
+
oe,
|
|
2349
|
+
i,
|
|
2350
|
+
t,
|
|
2351
|
+
n
|
|
2352
|
+
), c || (D.e.f |= _e), l.set(Ae, D)), k.add(Ae);
|
|
2353
|
+
}
|
|
2354
|
+
if (y === 0 && s && !a && (c ? a = W(() => s(o)) : (a = W(() => s(zn ??= ie())), a.f |= _e)), y > k.size && wi(), x && y > 0 && Y(kt()), !c)
|
|
2355
|
+
if (v.set(R, k), ke) {
|
|
2356
|
+
for (const [Mt, It] of l)
|
|
2357
|
+
k.has(Mt) || R.skip_effect(It.e);
|
|
2358
|
+
R.oncommit(p), R.ondiscard(d);
|
|
2359
|
+
} else
|
|
2360
|
+
p(R);
|
|
2361
|
+
m && pe(!0), u(f);
|
|
2362
|
+
}), b = { effect: g, items: l, pending: v, outrogroups: null, fallback: a };
|
|
2363
|
+
c = !1, x && (o = T);
|
|
2364
|
+
}
|
|
2365
|
+
function at(e) {
|
|
2366
|
+
for (; e !== null && (e.f & se) === 0; )
|
|
2367
|
+
e = e.next;
|
|
2368
|
+
return e;
|
|
2369
|
+
}
|
|
2370
|
+
function ws(e, t, n, r, i) {
|
|
2371
|
+
var s = t.length, o = e.items, l = at(e.effect.first), a, f = null, h = [], v = [], c, p, d, g;
|
|
2372
|
+
for (g = 0; g < s; g += 1) {
|
|
2373
|
+
if (c = t[g], p = i(c, g), d = /** @type {EachItem} */
|
|
2374
|
+
o.get(p).e, e.outrogroups !== null)
|
|
2375
|
+
for (const V of e.outrogroups)
|
|
2376
|
+
V.pending.delete(d), V.done.delete(d);
|
|
2377
|
+
if ((d.f & _e) !== 0)
|
|
2378
|
+
if (d.f ^= _e, d === l)
|
|
2379
|
+
ct(d, null, n);
|
|
2380
|
+
else {
|
|
2381
|
+
var b = f ? f.next : l;
|
|
2382
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), me(e, f, d), me(e, d, b), ct(d, b, n), f = d, h = [], v = [], l = at(f.next);
|
|
2383
|
+
continue;
|
|
2384
|
+
}
|
|
2385
|
+
if ((d.f & B) !== 0 && an(d), d !== l) {
|
|
2386
|
+
if (a !== void 0 && a.has(d)) {
|
|
2387
|
+
if (h.length < v.length) {
|
|
2388
|
+
var y = v[0], m;
|
|
2389
|
+
f = y.prev;
|
|
2390
|
+
var O = h[0], k = h[h.length - 1];
|
|
2391
|
+
for (m = 0; m < h.length; m += 1)
|
|
2392
|
+
ct(h[m], y, n);
|
|
2393
|
+
for (m = 0; m < v.length; m += 1)
|
|
2394
|
+
a.delete(v[m]);
|
|
2395
|
+
me(e, O.prev, k.next), me(e, f, O), me(e, k, y), l = y, f = k, g -= 1, h = [], v = [];
|
|
2396
|
+
} else
|
|
2397
|
+
a.delete(d), ct(d, l, n), me(e, d.prev, d.next), me(e, d, f === null ? e.effect.first : f.next), me(e, f, d), f = d;
|
|
2398
|
+
continue;
|
|
2399
|
+
}
|
|
2400
|
+
for (h = [], v = []; l !== null && l !== d; )
|
|
2401
|
+
(a ??= /* @__PURE__ */ new Set()).add(l), v.push(l), l = at(l.next);
|
|
2402
|
+
if (l === null)
|
|
2403
|
+
continue;
|
|
2404
|
+
}
|
|
2405
|
+
(d.f & _e) === 0 && h.push(d), f = d, l = at(d.next);
|
|
2406
|
+
}
|
|
2407
|
+
if (e.outrogroups !== null) {
|
|
2408
|
+
for (const V of e.outrogroups)
|
|
2409
|
+
V.pending.size === 0 && (Kt(e, At(V.done)), e.outrogroups?.delete(V));
|
|
2410
|
+
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2411
|
+
}
|
|
2412
|
+
if (l !== null || a !== void 0) {
|
|
2413
|
+
var R = [];
|
|
2414
|
+
if (a !== void 0)
|
|
2415
|
+
for (d of a)
|
|
2416
|
+
(d.f & B) === 0 && R.push(d);
|
|
2417
|
+
for (; l !== null; )
|
|
2418
|
+
(l.f & B) === 0 && l !== e.fallback && R.push(l), l = at(l.next);
|
|
2419
|
+
var ke = R.length;
|
|
2420
|
+
if (ke > 0) {
|
|
2421
|
+
var oe = null;
|
|
2422
|
+
gs(e, R, oe);
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
function bs(e, t, n, r, i, s, o, l) {
|
|
2427
|
+
var a = (o & ei) !== 0 ? (o & ni) === 0 ? /* @__PURE__ */ sr(n, !1, !1) : Le(n) : null, f = (o & ti) !== 0 ? Le(i) : null;
|
|
2428
|
+
return {
|
|
2429
|
+
v: a,
|
|
2430
|
+
i: f,
|
|
2431
|
+
e: W(() => (s(t, a ?? n, f ?? i, l), () => {
|
|
2432
|
+
e.delete(r);
|
|
2433
|
+
}))
|
|
2434
|
+
};
|
|
2435
|
+
}
|
|
2436
|
+
function ct(e, t, n) {
|
|
2437
|
+
if (e.nodes)
|
|
2438
|
+
for (var r = e.nodes.start, i = e.nodes.end, s = t && (t.f & _e) === 0 ? (
|
|
2439
|
+
/** @type {EffectNodes} */
|
|
2440
|
+
t.nodes.start
|
|
2441
|
+
) : n; r !== null; ) {
|
|
2442
|
+
var o = (
|
|
2443
|
+
/** @type {TemplateNode} */
|
|
2444
|
+
/* @__PURE__ */ ce(r)
|
|
2445
|
+
);
|
|
2446
|
+
if (s.before(r), r === i)
|
|
2447
|
+
return;
|
|
2448
|
+
r = o;
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
function me(e, t, n) {
|
|
2452
|
+
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
2453
|
+
}
|
|
2454
|
+
function ys(e, t) {
|
|
2455
|
+
vr(() => {
|
|
2223
2456
|
var n = e.getRootNode(), r = (
|
|
2224
2457
|
/** @type {ShadowRoot} */
|
|
2225
2458
|
n.host ? (
|
|
@@ -2232,32 +2465,32 @@ function Si(e, t) {
|
|
|
2232
2465
|
)
|
|
2233
2466
|
);
|
|
2234
2467
|
if (!r.querySelector("#" + t.hash)) {
|
|
2235
|
-
const i =
|
|
2468
|
+
const i = en("style");
|
|
2236
2469
|
i.id = t.hash, i.textContent = t.code, r.appendChild(i);
|
|
2237
2470
|
}
|
|
2238
2471
|
});
|
|
2239
2472
|
}
|
|
2240
|
-
const
|
|
2473
|
+
const Rn = [...`
|
|
2241
2474
|
\r\f \v\uFEFF`];
|
|
2242
|
-
function
|
|
2475
|
+
function $s(e, t, n) {
|
|
2243
2476
|
var r = e == null ? "" : "" + e;
|
|
2244
|
-
if (r = r ? r + " " + t : t, n) {
|
|
2477
|
+
if (t && (r = r ? r + " " + t : t), n) {
|
|
2245
2478
|
for (var i of Object.keys(n))
|
|
2246
2479
|
if (n[i])
|
|
2247
2480
|
r = r ? r + " " + i : i;
|
|
2248
2481
|
else if (r.length)
|
|
2249
|
-
for (var s = i.length,
|
|
2250
|
-
var
|
|
2251
|
-
(
|
|
2482
|
+
for (var s = i.length, o = 0; (o = r.indexOf(i, o)) >= 0; ) {
|
|
2483
|
+
var l = o + s;
|
|
2484
|
+
(o === 0 || Rn.includes(r[o - 1])) && (l === r.length || Rn.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
|
|
2252
2485
|
}
|
|
2253
2486
|
}
|
|
2254
2487
|
return r === "" ? null : r;
|
|
2255
2488
|
}
|
|
2256
|
-
function
|
|
2257
|
-
var
|
|
2258
|
-
if (
|
|
2259
|
-
var
|
|
2260
|
-
(!
|
|
2489
|
+
function Cn(e, t, n, r, i, s) {
|
|
2490
|
+
var o = e.__className;
|
|
2491
|
+
if (x || o !== n || o === void 0) {
|
|
2492
|
+
var l = $s(n, r, s);
|
|
2493
|
+
(!x || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = n;
|
|
2261
2494
|
} else if (s && i !== s)
|
|
2262
2495
|
for (var a in s) {
|
|
2263
2496
|
var f = !!s[a];
|
|
@@ -2265,86 +2498,120 @@ function Ut(e, t, n, r, i, s) {
|
|
|
2265
2498
|
}
|
|
2266
2499
|
return s;
|
|
2267
2500
|
}
|
|
2268
|
-
const
|
|
2269
|
-
function
|
|
2270
|
-
var i =
|
|
2271
|
-
|
|
2501
|
+
const Es = /* @__PURE__ */ Symbol("is custom element"), Ts = /* @__PURE__ */ Symbol("is html"), Ss = gi ? "link" : "LINK";
|
|
2502
|
+
function ee(e, t, n, r) {
|
|
2503
|
+
var i = xs(e);
|
|
2504
|
+
x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ss) || i[t] !== (i[t] = n) && (t === "loading" && (e[pi] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ks(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
2272
2505
|
}
|
|
2273
|
-
function
|
|
2506
|
+
function xs(e) {
|
|
2274
2507
|
return (
|
|
2275
2508
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2276
2509
|
// @ts-expect-error
|
|
2277
2510
|
e.__attributes ??= {
|
|
2278
|
-
[
|
|
2279
|
-
[
|
|
2511
|
+
[Es]: e.nodeName.includes("-"),
|
|
2512
|
+
[Ts]: e.namespaceURI === Pn
|
|
2280
2513
|
}
|
|
2281
2514
|
);
|
|
2282
2515
|
}
|
|
2283
|
-
var
|
|
2284
|
-
function
|
|
2285
|
-
var t = e.getAttribute("is") || e.nodeName, n =
|
|
2516
|
+
var Nn = /* @__PURE__ */ new Map();
|
|
2517
|
+
function ks(e) {
|
|
2518
|
+
var t = e.getAttribute("is") || e.nodeName, n = Nn.get(t);
|
|
2286
2519
|
if (n) return n;
|
|
2287
|
-
|
|
2520
|
+
Nn.set(t, n = []);
|
|
2288
2521
|
for (var r, i = e, s = Element.prototype; s !== i; ) {
|
|
2289
|
-
r =
|
|
2290
|
-
for (var
|
|
2291
|
-
r[
|
|
2292
|
-
i =
|
|
2522
|
+
r = fi(i);
|
|
2523
|
+
for (var o in r)
|
|
2524
|
+
r[o].set && n.push(o);
|
|
2525
|
+
i = Dn(i);
|
|
2293
2526
|
}
|
|
2294
2527
|
return n;
|
|
2295
2528
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return e === t || e?.[
|
|
2529
|
+
function On(e, t) {
|
|
2530
|
+
return e === t || e?.[dt] === t;
|
|
2298
2531
|
}
|
|
2299
|
-
function
|
|
2300
|
-
return
|
|
2532
|
+
function Mn(e = {}, t, n, r) {
|
|
2533
|
+
return vr(() => {
|
|
2301
2534
|
var i, s;
|
|
2302
|
-
return
|
|
2303
|
-
i = s, s = [],
|
|
2304
|
-
e !== n(...s) && (t(e, ...s), i &&
|
|
2535
|
+
return sn(() => {
|
|
2536
|
+
i = s, s = [], un(() => {
|
|
2537
|
+
e !== n(...s) && (t(e, ...s), i && On(n(...i), e) && t(null, ...i));
|
|
2305
2538
|
});
|
|
2306
2539
|
}), () => {
|
|
2307
|
-
|
|
2308
|
-
s &&
|
|
2540
|
+
$e(() => {
|
|
2541
|
+
s && On(n(...s), e) && t(null, ...s);
|
|
2309
2542
|
});
|
|
2310
2543
|
};
|
|
2311
2544
|
}), e;
|
|
2312
2545
|
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2546
|
+
let yt = !1;
|
|
2547
|
+
function As(e) {
|
|
2548
|
+
var t = yt;
|
|
2549
|
+
try {
|
|
2550
|
+
return yt = !1, [e(), yt];
|
|
2551
|
+
} finally {
|
|
2552
|
+
yt = t;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
function $t(e, t, n, r) {
|
|
2556
|
+
var i = (n & si) !== 0, s = (n & oi) !== 0, o = (
|
|
2315
2557
|
/** @type {V} */
|
|
2316
2558
|
r
|
|
2317
|
-
),
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2559
|
+
), l = !0, a = () => (l && (l = !1, o = s ? un(
|
|
2560
|
+
/** @type {() => V} */
|
|
2561
|
+
r
|
|
2562
|
+
) : (
|
|
2563
|
+
/** @type {V} */
|
|
2564
|
+
r
|
|
2565
|
+
)), o), f;
|
|
2566
|
+
if (i) {
|
|
2567
|
+
var h = dt in e || Bn in e;
|
|
2568
|
+
f = Oe(e, t)?.set ?? (h && t in e ? (m) => e[t] = m : void 0);
|
|
2569
|
+
}
|
|
2570
|
+
var v, c = !1;
|
|
2571
|
+
i ? [v, c] = As(() => (
|
|
2572
|
+
/** @type {V} */
|
|
2573
|
+
e[t]
|
|
2574
|
+
)) : v = /** @type {V} */
|
|
2575
|
+
e[t], v === void 0 && r !== void 0 && (v = a(), f && (Si(), f(v)));
|
|
2576
|
+
var p;
|
|
2577
|
+
if (p = () => {
|
|
2578
|
+
var m = (
|
|
2324
2579
|
/** @type {V} */
|
|
2325
2580
|
e[t]
|
|
2326
2581
|
);
|
|
2327
|
-
return
|
|
2328
|
-
}
|
|
2329
|
-
|
|
2582
|
+
return m === void 0 ? a() : (l = !0, m);
|
|
2583
|
+
}, (n & ii) === 0)
|
|
2584
|
+
return p;
|
|
2585
|
+
if (f) {
|
|
2586
|
+
var d = e.$$legacy;
|
|
2587
|
+
return (
|
|
2588
|
+
/** @type {() => V} */
|
|
2589
|
+
(function(m, O) {
|
|
2590
|
+
return arguments.length > 0 ? ((!O || d || c) && f(O ? p() : m), m) : p();
|
|
2591
|
+
})
|
|
2592
|
+
);
|
|
2593
|
+
}
|
|
2594
|
+
var g = !1, b = ((n & ri) !== 0 ? Ot : tr)(() => (g = !1, p()));
|
|
2595
|
+
i && u(b);
|
|
2596
|
+
var y = (
|
|
2330
2597
|
/** @type {Effect} */
|
|
2331
|
-
|
|
2598
|
+
S
|
|
2332
2599
|
);
|
|
2333
2600
|
return (
|
|
2334
2601
|
/** @type {() => V} */
|
|
2335
|
-
(function(
|
|
2602
|
+
(function(m, O) {
|
|
2336
2603
|
if (arguments.length > 0) {
|
|
2337
|
-
const
|
|
2338
|
-
return
|
|
2604
|
+
const k = O ? u(b) : i ? qe(m) : m;
|
|
2605
|
+
return w(b, k), g = !0, o !== void 0 && (o = k), m;
|
|
2339
2606
|
}
|
|
2340
|
-
return
|
|
2607
|
+
return Te && g || (y.f & fe) !== 0 ? b.v : u(b);
|
|
2341
2608
|
})
|
|
2342
2609
|
);
|
|
2343
2610
|
}
|
|
2344
|
-
function
|
|
2345
|
-
return new
|
|
2611
|
+
function zs(e) {
|
|
2612
|
+
return new Rs(e);
|
|
2346
2613
|
}
|
|
2347
|
-
class
|
|
2614
|
+
class Rs {
|
|
2348
2615
|
/** @type {any} */
|
|
2349
2616
|
#e;
|
|
2350
2617
|
/** @type {Record<string, any>} */
|
|
@@ -2355,25 +2622,25 @@ class Mi {
|
|
|
2355
2622
|
* }} options
|
|
2356
2623
|
*/
|
|
2357
2624
|
constructor(t) {
|
|
2358
|
-
var n = /* @__PURE__ */ new Map(), r = (s,
|
|
2359
|
-
var
|
|
2360
|
-
return n.set(s,
|
|
2625
|
+
var n = /* @__PURE__ */ new Map(), r = (s, o) => {
|
|
2626
|
+
var l = /* @__PURE__ */ sr(o, !1, !1);
|
|
2627
|
+
return n.set(s, l), l;
|
|
2361
2628
|
};
|
|
2362
2629
|
const i = new Proxy(
|
|
2363
2630
|
{ ...t.props || {}, $$events: {} },
|
|
2364
2631
|
{
|
|
2365
|
-
get(s,
|
|
2366
|
-
return u(n.get(
|
|
2632
|
+
get(s, o) {
|
|
2633
|
+
return u(n.get(o) ?? r(o, Reflect.get(s, o)));
|
|
2367
2634
|
},
|
|
2368
|
-
has(s,
|
|
2369
|
-
return
|
|
2635
|
+
has(s, o) {
|
|
2636
|
+
return o === Bn ? !0 : (u(n.get(o) ?? r(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
2370
2637
|
},
|
|
2371
|
-
set(s,
|
|
2372
|
-
return
|
|
2638
|
+
set(s, o, l) {
|
|
2639
|
+
return w(n.get(o) ?? r(o, l), l), Reflect.set(s, o, l);
|
|
2373
2640
|
}
|
|
2374
2641
|
}
|
|
2375
2642
|
);
|
|
2376
|
-
this.#t = (t.hydrate ?
|
|
2643
|
+
this.#t = (t.hydrate ? vs : Ar)(t.component, {
|
|
2377
2644
|
target: t.target,
|
|
2378
2645
|
anchor: t.anchor,
|
|
2379
2646
|
props: i,
|
|
@@ -2381,15 +2648,15 @@ class Mi {
|
|
|
2381
2648
|
intro: t.intro ?? !1,
|
|
2382
2649
|
recover: t.recover,
|
|
2383
2650
|
transformError: t.transformError
|
|
2384
|
-
}), (!t?.props?.$$host || t.sync === !1) &&
|
|
2651
|
+
}), (!t?.props?.$$host || t.sync === !1) && ft(), this.#e = i.$$events;
|
|
2385
2652
|
for (const s of Object.keys(this.#t))
|
|
2386
|
-
s === "$set" || s === "$destroy" || s === "$on" ||
|
|
2653
|
+
s === "$set" || s === "$destroy" || s === "$on" || xt(this, s, {
|
|
2387
2654
|
get() {
|
|
2388
2655
|
return this.#t[s];
|
|
2389
2656
|
},
|
|
2390
2657
|
/** @param {any} value */
|
|
2391
|
-
set(
|
|
2392
|
-
this.#t[s] =
|
|
2658
|
+
set(o) {
|
|
2659
|
+
this.#t[s] = o;
|
|
2393
2660
|
},
|
|
2394
2661
|
enumerable: !0
|
|
2395
2662
|
});
|
|
@@ -2397,7 +2664,7 @@ class Mi {
|
|
|
2397
2664
|
(s) => {
|
|
2398
2665
|
Object.assign(i, s);
|
|
2399
2666
|
}, this.#t.$destroy = () => {
|
|
2400
|
-
|
|
2667
|
+
_s(this.#t);
|
|
2401
2668
|
};
|
|
2402
2669
|
}
|
|
2403
2670
|
/** @param {Record<string, any>} props */
|
|
@@ -2423,8 +2690,8 @@ class Mi {
|
|
|
2423
2690
|
this.#t.$destroy();
|
|
2424
2691
|
}
|
|
2425
2692
|
}
|
|
2426
|
-
let
|
|
2427
|
-
typeof HTMLElement == "function" && (
|
|
2693
|
+
let Rr;
|
|
2694
|
+
typeof HTMLElement == "function" && (Rr = class extends HTMLElement {
|
|
2428
2695
|
/** The Svelte component constructor */
|
|
2429
2696
|
$$ctor;
|
|
2430
2697
|
/** Slots */
|
|
@@ -2482,22 +2749,22 @@ typeof HTMLElement == "function" && (qn = class extends HTMLElement {
|
|
|
2482
2749
|
if (this.$$cn = !0, !this.$$c) {
|
|
2483
2750
|
let e = function(r) {
|
|
2484
2751
|
return (i) => {
|
|
2485
|
-
const s =
|
|
2486
|
-
r !== "default" && (s.name = r),
|
|
2752
|
+
const s = en("slot");
|
|
2753
|
+
r !== "default" && (s.name = r), we(i, s);
|
|
2487
2754
|
};
|
|
2488
2755
|
};
|
|
2489
2756
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2490
2757
|
return;
|
|
2491
|
-
const t = {}, n =
|
|
2758
|
+
const t = {}, n = Cs(this);
|
|
2492
2759
|
for (const r of this.$$s)
|
|
2493
2760
|
r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
|
|
2494
2761
|
for (const r of this.attributes) {
|
|
2495
2762
|
const i = this.$$g_p(r.name);
|
|
2496
|
-
i in this.$$d || (this.$$d[i] =
|
|
2763
|
+
i in this.$$d || (this.$$d[i] = Tt(i, r.value, this.$$p_d, "toProp"));
|
|
2497
2764
|
}
|
|
2498
2765
|
for (const r in this.$$p_d)
|
|
2499
2766
|
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2500
|
-
this.$$c =
|
|
2767
|
+
this.$$c = zs({
|
|
2501
2768
|
component: this.$$ctor,
|
|
2502
2769
|
target: this.$$shadowRoot || this,
|
|
2503
2770
|
props: {
|
|
@@ -2505,13 +2772,13 @@ typeof HTMLElement == "function" && (qn = class extends HTMLElement {
|
|
|
2505
2772
|
$$slots: t,
|
|
2506
2773
|
$$host: this
|
|
2507
2774
|
}
|
|
2508
|
-
}), this.$$me =
|
|
2509
|
-
|
|
2775
|
+
}), this.$$me = Qi(() => {
|
|
2776
|
+
sn(() => {
|
|
2510
2777
|
this.$$r = !0;
|
|
2511
|
-
for (const r of
|
|
2778
|
+
for (const r of St(this.$$c)) {
|
|
2512
2779
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
2513
2780
|
this.$$d[r] = this.$$c[r];
|
|
2514
|
-
const i =
|
|
2781
|
+
const i = Tt(
|
|
2515
2782
|
r,
|
|
2516
2783
|
this.$$d[r],
|
|
2517
2784
|
this.$$p_d,
|
|
@@ -2538,7 +2805,7 @@ typeof HTMLElement == "function" && (qn = class extends HTMLElement {
|
|
|
2538
2805
|
* @param {string} newValue
|
|
2539
2806
|
*/
|
|
2540
2807
|
attributeChangedCallback(e, t, n) {
|
|
2541
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2808
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Tt(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2542
2809
|
}
|
|
2543
2810
|
disconnectedCallback() {
|
|
2544
2811
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2549,12 +2816,12 @@ typeof HTMLElement == "function" && (qn = class extends HTMLElement {
|
|
|
2549
2816
|
* @param {string} attribute_name
|
|
2550
2817
|
*/
|
|
2551
2818
|
$$g_p(e) {
|
|
2552
|
-
return
|
|
2819
|
+
return St(this.$$p_d).find(
|
|
2553
2820
|
(t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
|
|
2554
2821
|
) || e;
|
|
2555
2822
|
}
|
|
2556
2823
|
});
|
|
2557
|
-
function
|
|
2824
|
+
function Tt(e, t, n, r) {
|
|
2558
2825
|
const i = n[e]?.type;
|
|
2559
2826
|
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
|
|
2560
2827
|
return t;
|
|
@@ -2584,7 +2851,7 @@ function Xe(e, t, n, r) {
|
|
|
2584
2851
|
return t;
|
|
2585
2852
|
}
|
|
2586
2853
|
}
|
|
2587
|
-
function
|
|
2854
|
+
function Cs(e) {
|
|
2588
2855
|
const t = {};
|
|
2589
2856
|
return e.childNodes.forEach((n) => {
|
|
2590
2857
|
t[
|
|
@@ -2593,230 +2860,320 @@ function Di(e) {
|
|
|
2593
2860
|
] = !0;
|
|
2594
2861
|
}), t;
|
|
2595
2862
|
}
|
|
2596
|
-
function
|
|
2597
|
-
let
|
|
2863
|
+
function Ns(e, t, n, r, i, s) {
|
|
2864
|
+
let o = class extends Rr {
|
|
2598
2865
|
constructor() {
|
|
2599
2866
|
super(e, n, i), this.$$p_d = t;
|
|
2600
2867
|
}
|
|
2601
2868
|
static get observedAttributes() {
|
|
2602
|
-
return
|
|
2603
|
-
(
|
|
2869
|
+
return St(t).map(
|
|
2870
|
+
(l) => (t[l].attribute || l).toLowerCase()
|
|
2604
2871
|
);
|
|
2605
2872
|
}
|
|
2606
2873
|
};
|
|
2607
|
-
return
|
|
2608
|
-
|
|
2874
|
+
return St(t).forEach((l) => {
|
|
2875
|
+
xt(o.prototype, l, {
|
|
2609
2876
|
get() {
|
|
2610
|
-
return this.$$c &&
|
|
2877
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2611
2878
|
},
|
|
2612
2879
|
set(a) {
|
|
2613
|
-
a =
|
|
2880
|
+
a = Tt(l, a, t), this.$$d[l] = a;
|
|
2614
2881
|
var f = this.$$c;
|
|
2615
2882
|
if (f) {
|
|
2616
|
-
var
|
|
2617
|
-
|
|
2883
|
+
var h = Oe(f, l)?.get;
|
|
2884
|
+
h ? f[l] = a : f.$set({ [l]: a });
|
|
2618
2885
|
}
|
|
2619
2886
|
}
|
|
2620
2887
|
});
|
|
2621
|
-
}), r.forEach((
|
|
2622
|
-
|
|
2888
|
+
}), r.forEach((l) => {
|
|
2889
|
+
xt(o.prototype, l, {
|
|
2623
2890
|
get() {
|
|
2624
|
-
return this.$$c?.[
|
|
2891
|
+
return this.$$c?.[l];
|
|
2625
2892
|
}
|
|
2626
2893
|
});
|
|
2627
2894
|
}), e.element = /** @type {any} */
|
|
2628
|
-
|
|
2895
|
+
o, o;
|
|
2629
2896
|
}
|
|
2630
|
-
var
|
|
2631
|
-
const
|
|
2897
|
+
var Os = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M8 5v14l11-7z"></path></svg>'), Ms = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"></path></svg>'), Is = /* @__PURE__ */ dn('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M8 5v14l11-7z"></path></svg>'), Ps = /* @__PURE__ */ cn('<button type="button" data-pie-tts-control=""><span aria-hidden="true"> </span></button>'), Ls = /* @__PURE__ */ cn('<div class="pie-tool-tts-inline__panel svelte-18mzc0g" role="toolbar" aria-label="Reading controls" tabindex="-1"><button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control pie-tool-tts-inline__control--primary svelte-18mzc0g"><!></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Stop reading"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M6 6h12v12H6z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Fast-forward"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M4 18l8.5-6L4 6v12zm9.5 0L22 12l-8.5-6v12z"></path></svg></button> <button type="button" data-pie-tts-control="" class="pie-tool-tts-inline__control svelte-18mzc0g" aria-label="Rewind"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M20 18V6l-8.5 6L20 18zM10.5 18V6L2 12l8.5 6z"></path></svg></button> <!></div>'), Ds = /* @__PURE__ */ cn('<div class="pie-tool-tts-inline svelte-18mzc0g"><button type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="pie-tool-tts-inline__icon svelte-18mzc0g" aria-hidden="true"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"></path></svg></button> <!> <div class="pie-sr-only svelte-18mzc0g" role="status" aria-live="polite" aria-atomic="true"> </div></div>');
|
|
2898
|
+
const Fs = {
|
|
2632
2899
|
hash: "svelte-18mzc0g",
|
|
2633
|
-
code: `.pie-tool-tts-inline.svelte-18mzc0g {display:inline-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
animation: svelte-18mzc0g-pulse 1.5s ease-in-out infinite;}.pie-tool-tts-inline__button--paused.svelte-18mzc0g {background-color:color-mix(in srgb, var(--pie-missing, #ff9800) 18%, transparent);}.pie-tool-tts-inline__button--stop.svelte-18mzc0g {background-color:transparent;}.pie-tool-tts-inline__button--stop.svelte-18mzc0g:hover:not(:disabled) {background-color:color-mix(in srgb, var(--pie-incorrect, #f44336) 12%, transparent);}.pie-tool-tts-inline__button--stop.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {color:var(--pie-incorrect-icon, #c62828);}.pie-tool-tts-inline__button.svelte-18mzc0g:disabled {cursor:not-allowed;opacity:0.6;}
|
|
2639
|
-
|
|
2640
|
-
/* Size variants */.pie-tool-tts-inline__button--sm.svelte-18mzc0g {width:1.5rem;height:1.5rem;
|
|
2641
|
-
/* Increase padding to meet 44px touch target - WCAG 2.5.2 */padding:0.625rem;}.pie-tool-tts-inline__button--sm.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1rem;height:1rem;}.pie-tool-tts-inline__button--md.svelte-18mzc0g {width:2rem;height:2rem;}.pie-tool-tts-inline__button--md.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.25rem;height:1.25rem;}.pie-tool-tts-inline__button--lg.svelte-18mzc0g {width:2.5rem;height:2.5rem;}.pie-tool-tts-inline__button--lg.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.5rem;height:1.5rem;}.pie-tool-tts-inline__icon.svelte-18mzc0g {fill:currentColor;color:var(--pie-button-color, var(--pie-text, #555));}.pie-tool-tts-inline__button.svelte-18mzc0g:hover:not(:disabled) .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {color:var(--pie-primary, #667eea);}.pie-tool-tts-inline__button--speaking.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {color:var(--pie-white, #fff);}
|
|
2642
|
-
|
|
2643
|
-
@keyframes svelte-18mzc0g-pulse {
|
|
2644
|
-
0%,
|
|
2645
|
-
100% {
|
|
2646
|
-
opacity: 1;
|
|
2647
|
-
}
|
|
2648
|
-
50% {
|
|
2649
|
-
opacity: 0.7;
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
|
|
2653
|
-
/* Screen reader only content */.pie-sr-only.svelte-18mzc0g {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
|
|
2900
|
+
code: `.pie-tool-tts-inline.svelte-18mzc0g {position:relative;display:inline-block;}.pie-tool-tts-inline__trigger.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));background-color:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #333));border-radius:0.25rem;cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:hover:not(:disabled),
|
|
2901
|
+
.pie-tool-tts-inline__control.svelte-18mzc0g:hover:not(:disabled) {background-color:var(--pie-button-hover-background-color, var(--pie-secondary-background, #f2f4f8));transform:translateY(-1px);box-shadow:0 2px 6px color-mix(in srgb, var(--pie-shadow, #000) 14%, transparent);}.pie-tool-tts-inline__trigger.svelte-18mzc0g:active:not(:disabled),
|
|
2902
|
+
.pie-tool-tts-inline__control.svelte-18mzc0g:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:focus-visible,
|
|
2903
|
+
.pie-tool-tts-inline__control.svelte-18mzc0g:focus-visible {outline:2px solid var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-primary, #0066cc)));outline-offset:2px;box-shadow:0 0 0 4px color-mix(in srgb, var(--pie-primary, #0066cc) 22%, transparent);}.pie-tool-tts-inline__trigger--active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background-color:color-mix(in srgb, var(--pie-primary, #1565c0) 10%, var(--pie-background, #fff));}.pie-tool-tts-inline__panel.svelte-18mzc0g {position:absolute;z-index:2;top:calc(100% + 0.5rem);right:0;left:auto;transform-origin:top right;display:grid;grid-auto-flow:row;justify-items:center;gap:0.25rem;padding:0.5rem;min-width:3rem;background:var(--pie-surface, var(--pie-background, #fff));border:1px solid var(--pie-border, #d0d0d0);border-radius:0.75rem;box-shadow:0 6px 18px color-mix(in srgb, var(--pie-shadow, #000) 18%, transparent);}.pie-tool-tts-inline__control.svelte-18mzc0g {display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--pie-button-border-color, var(--pie-border, #c6c6c6));border-radius:0.25rem;background:var(--pie-button-background-color, var(--pie-background, #fff));color:var(--pie-button-color, var(--pie-text, #222));cursor:pointer;transition:background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;}.pie-tool-tts-inline__control--speed.svelte-18mzc0g {font-size:0.6875rem;font-weight:400;letter-spacing:0;white-space:nowrap;}.pie-tool-tts-inline__control--speed-active.svelte-18mzc0g {border-color:var(--pie-primary, #1565c0);background:color-mix(in srgb, var(--pie-primary, #1565c0) 14%, var(--pie-background, #fff));color:var(--pie-primary, #1565c0);font-weight:600;}.pie-tool-tts-inline__trigger.svelte-18mzc0g:disabled,
|
|
2904
|
+
.pie-tool-tts-inline__control.svelte-18mzc0g:disabled {cursor:not-allowed;opacity:0.6;}.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g {width:1.75rem;height:1.75rem;}.pie-tool-tts-inline__trigger--sm.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1rem;height:1rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g {width:2rem;height:2rem;}.pie-tool-tts-inline__trigger--md.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.25rem;height:1.25rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g {width:2.5rem;height:2.5rem;}.pie-tool-tts-inline__trigger--lg.svelte-18mzc0g .pie-tool-tts-inline__icon:where(.svelte-18mzc0g) {width:1.5rem;height:1.5rem;}.pie-tool-tts-inline__icon.svelte-18mzc0g {fill:currentColor;color:currentColor;}.pie-sr-only.svelte-18mzc0g {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
|
|
2654
2905
|
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
.pie-tool-tts-inline__button--speaking.svelte-18mzc0g {
|
|
2658
|
-
animation: none !important;transition:none !important;}
|
|
2906
|
+
@media (prefers-reduced-motion: reduce) {.pie-tool-tts-inline__trigger.svelte-18mzc0g,
|
|
2907
|
+
.pie-tool-tts-inline__control.svelte-18mzc0g {transition:none !important;}
|
|
2659
2908
|
}`
|
|
2660
2909
|
};
|
|
2661
|
-
function
|
|
2662
|
-
|
|
2663
|
-
let n =
|
|
2910
|
+
function Bs(e, t) {
|
|
2911
|
+
Vn(t, !0), ys(e, Fs);
|
|
2912
|
+
let n = $t(
|
|
2664
2913
|
t,
|
|
2665
2914
|
"catalogId",
|
|
2666
2915
|
7,
|
|
2667
2916
|
""
|
|
2668
2917
|
// Explicit catalog ID
|
|
2669
|
-
),
|
|
2670
|
-
const
|
|
2671
|
-
let
|
|
2672
|
-
const
|
|
2673
|
-
let
|
|
2674
|
-
|
|
2675
|
-
if (
|
|
2676
|
-
|
|
2677
|
-
|
|
2918
|
+
), r = $t(t, "language", 7, "en-US"), i = $t(t, "size", 7, "md"), s = $t(t, "speedOptions", 23, () => [1.5, 2]);
|
|
2919
|
+
const o = typeof window < "u";
|
|
2920
|
+
let l = /* @__PURE__ */ N(void 0), a = /* @__PURE__ */ N(void 0), f = /* @__PURE__ */ N(null), h = /* @__PURE__ */ N(null), v = /* @__PURE__ */ N(null);
|
|
2921
|
+
const c = /* @__PURE__ */ ot(() => u(f)?.ttsService), p = /* @__PURE__ */ ot(() => u(f)?.highlightCoordinator), d = /* @__PURE__ */ ot(() => u(v)?.scopeElement || u(h)?.scopeElement || null);
|
|
2922
|
+
let g = /* @__PURE__ */ N(!1), b = /* @__PURE__ */ N(!1), y = /* @__PURE__ */ N(!1), m = /* @__PURE__ */ N(""), O = /* @__PURE__ */ N(1), k = /* @__PURE__ */ N(0), R = /* @__PURE__ */ N(!1);
|
|
2923
|
+
const ke = 4, oe = /* @__PURE__ */ ot(() => {
|
|
2924
|
+
if (!Array.isArray(s())) return [1.5, 2];
|
|
2925
|
+
const _ = /* @__PURE__ */ new Set();
|
|
2926
|
+
for (const $ of s()) {
|
|
2927
|
+
if (typeof $ != "number" || !Number.isFinite($) || $ <= 0) continue;
|
|
2928
|
+
const A = Math.round($ * 100) / 100;
|
|
2929
|
+
A !== 1 && _.add(A);
|
|
2930
|
+
}
|
|
2931
|
+
return _.size ? Array.from(_) : [1.5, 2];
|
|
2932
|
+
}), V = `pie-tts-inline-${Math.random().toString(36).slice(2)}`;
|
|
2933
|
+
wt(() => {
|
|
2934
|
+
if (u(l))
|
|
2935
|
+
return Jr(u(l), (_) => {
|
|
2936
|
+
w(f, _, !0);
|
|
2678
2937
|
});
|
|
2679
|
-
}),
|
|
2680
|
-
if (!u(
|
|
2681
|
-
const
|
|
2682
|
-
|
|
2683
|
-
}),
|
|
2684
|
-
|
|
2938
|
+
}), wt(() => {
|
|
2939
|
+
if (!u(l)) return;
|
|
2940
|
+
const _ = Xr(u(l), (A) => {
|
|
2941
|
+
w(h, A, !0);
|
|
2942
|
+
}), $ = Zr(u(l), (A) => {
|
|
2943
|
+
w(v, A, !0);
|
|
2685
2944
|
});
|
|
2686
2945
|
return () => {
|
|
2687
|
-
|
|
2946
|
+
$(), _();
|
|
2947
|
+
};
|
|
2948
|
+
}), wt(() => {
|
|
2949
|
+
if (!u(c)) return;
|
|
2950
|
+
const _ = (A) => {
|
|
2951
|
+
w(b, A === "playing" || A === "paused", !0), w(y, A === "paused");
|
|
2952
|
+
}, $ = (A) => {
|
|
2953
|
+
_(A);
|
|
2954
|
+
};
|
|
2955
|
+
return u(c).onStateChange(V, $), _(u(c).getState()), () => {
|
|
2956
|
+
u(c).offStateChange(V, $);
|
|
2957
|
+
};
|
|
2958
|
+
}), wt(() => {
|
|
2959
|
+
let _ = !1;
|
|
2960
|
+
return (async () => {
|
|
2961
|
+
if (!u(f)?.toolkitCoordinator?.ensureTTSReady) {
|
|
2962
|
+
w(R, !!u(c));
|
|
2963
|
+
return;
|
|
2964
|
+
}
|
|
2965
|
+
try {
|
|
2966
|
+
await u(f).toolkitCoordinator.ensureTTSReady(), _ || w(R, !0);
|
|
2967
|
+
} catch (A) {
|
|
2968
|
+
_ || (w(R, !1), console.error("[TTS Inline] Failed to initialize TTS:", A));
|
|
2969
|
+
}
|
|
2970
|
+
})(), () => {
|
|
2971
|
+
_ = !0;
|
|
2688
2972
|
};
|
|
2689
|
-
}), Ue(() => {
|
|
2690
|
-
!u(d) || !n() || !u(o) || (u($) && u(p) && (u($) !== u(d) || u(p) !== n()) && (u($).unregisterTool(u(p)), g($, null), g(p, null)), u(p) || (u(d).registerTool(n(), "TTS Inline", u(o), lr.TOOL), g($, u(d), !0), g(p, n())));
|
|
2691
|
-
}), Ue(() => () => {
|
|
2692
|
-
u($) && u(p) && (u($).unregisterTool(u(p)), g($, null), g(p, null));
|
|
2693
2973
|
});
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2974
|
+
function Ae() {
|
|
2975
|
+
return u(a) ? Array.from(u(a).querySelectorAll("[data-pie-tts-control]")) : [];
|
|
2976
|
+
}
|
|
2977
|
+
function D(_) {
|
|
2978
|
+
const $ = Ae();
|
|
2979
|
+
if (!$.length) return;
|
|
2980
|
+
const A = (_ + $.length) % $.length;
|
|
2981
|
+
w(k, A), $[A].focus();
|
|
2982
|
+
}
|
|
2983
|
+
function Mt(_) {
|
|
2984
|
+
const $ = Ae();
|
|
2985
|
+
if ($.length)
|
|
2986
|
+
switch (_.key) {
|
|
2987
|
+
case "ArrowDown":
|
|
2988
|
+
case "ArrowRight":
|
|
2989
|
+
_.preventDefault(), D(u(k) + 1);
|
|
2990
|
+
break;
|
|
2991
|
+
case "ArrowUp":
|
|
2992
|
+
case "ArrowLeft":
|
|
2993
|
+
_.preventDefault(), D(u(k) - 1);
|
|
2994
|
+
break;
|
|
2995
|
+
case "Home":
|
|
2996
|
+
_.preventDefault(), D(0);
|
|
2997
|
+
break;
|
|
2998
|
+
case "End":
|
|
2999
|
+
_.preventDefault(), D($.length - 1);
|
|
3000
|
+
break;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
function It() {
|
|
3004
|
+
w(g, !u(g)), u(g) && queueMicrotask(() => D(u(k)));
|
|
3005
|
+
}
|
|
3006
|
+
function Cr() {
|
|
3007
|
+
if (!u(d)) return null;
|
|
3008
|
+
const _ = u(d);
|
|
3009
|
+
if (_.getAttribute?.("data-region") === "content")
|
|
3010
|
+
return _;
|
|
3011
|
+
const $ = _.querySelector?.("[data-region='content']");
|
|
3012
|
+
return $ instanceof Element ? $ : _;
|
|
3013
|
+
}
|
|
3014
|
+
async function Nr() {
|
|
3015
|
+
if (!u(c)) return;
|
|
3016
|
+
if (!u(R)) {
|
|
3017
|
+
w(m, "Text-to-speech is still initializing");
|
|
3018
|
+
return;
|
|
3019
|
+
}
|
|
3020
|
+
const _ = Cr();
|
|
3021
|
+
if (!_) {
|
|
3022
|
+
console.warn("[TTS Inline] No target container found from shell scope context");
|
|
3023
|
+
return;
|
|
3024
|
+
}
|
|
3025
|
+
try {
|
|
3026
|
+
w(g, !0);
|
|
3027
|
+
const $ = _.textContent || "";
|
|
3028
|
+
if (!$) {
|
|
3029
|
+
console.warn("[TTS Inline] No text content found");
|
|
2698
3030
|
return;
|
|
2699
3031
|
}
|
|
2700
|
-
|
|
2701
|
-
|
|
3032
|
+
u(p) && u(c).setHighlightCoordinator && u(c).setHighlightCoordinator(u(p)), u(c).setRootElement?.(_);
|
|
3033
|
+
const A = !!_.closest("pie-passage-shell");
|
|
3034
|
+
w(m, "Reading started"), await u(c).speak($, {
|
|
3035
|
+
catalogId: A ? void 0 : n() || void 0,
|
|
3036
|
+
language: r(),
|
|
3037
|
+
contentElement: _
|
|
3038
|
+
});
|
|
3039
|
+
} catch ($) {
|
|
3040
|
+
console.error("[TTS Inline] Error:", $), w(m, "Unable to start reading"), u(p) && u(p).clearTTS();
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
async function Or() {
|
|
3044
|
+
if (u(c)) {
|
|
3045
|
+
if (u(y)) {
|
|
3046
|
+
u(c).resume(), w(m, "Reading resumed");
|
|
2702
3047
|
return;
|
|
2703
3048
|
}
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
return;
|
|
2708
|
-
}
|
|
2709
|
-
const k = document.createRange();
|
|
2710
|
-
k.selectNodeContents(u(v));
|
|
2711
|
-
const te = k.toString(), z = te.trim().replace(/\s+/g, " ");
|
|
2712
|
-
if (console.log("[TTS Inline] Text extraction:", {
|
|
2713
|
-
rawLength: te.length,
|
|
2714
|
-
normalizedLength: z.length,
|
|
2715
|
-
preview: z.substring(0, 100)
|
|
2716
|
-
}), !z) {
|
|
2717
|
-
console.warn("[TTS Inline] No text content found"), g(E, !1);
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
u(_) && u(h).setHighlightCoordinator && u(h).setHighlightCoordinator(u(_)), await u(h).speak(z, {
|
|
2721
|
-
catalogId: r() || void 0,
|
|
2722
|
-
language: i(),
|
|
2723
|
-
contentElement: u(v)
|
|
2724
|
-
}), g(E, !1), g(S, !1), u(_) && u(_).clearTTS();
|
|
2725
|
-
} catch (k) {
|
|
2726
|
-
console.error("[TTS Inline] Error:", k), g(E, !1), g(S, !1), u(_) && u(_).clearTTS();
|
|
3049
|
+
if (u(b) && !u(y)) {
|
|
3050
|
+
u(c).pause(), w(m, "Reading paused");
|
|
3051
|
+
return;
|
|
2727
3052
|
}
|
|
3053
|
+
await Nr();
|
|
2728
3054
|
}
|
|
2729
3055
|
}
|
|
2730
|
-
function
|
|
2731
|
-
u(
|
|
3056
|
+
function Mr() {
|
|
3057
|
+
u(c) && (u(c).stop(), w(g, !1), w(m, "Reading stopped"), u(p) && u(p).clearTTS());
|
|
2732
3058
|
}
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
3059
|
+
async function Ir() {
|
|
3060
|
+
if (!(!u(c) || !u(b)))
|
|
3061
|
+
try {
|
|
3062
|
+
await u(c).seekForward?.(1), w(m, "Skipped forward");
|
|
3063
|
+
} catch (_) {
|
|
3064
|
+
console.error("[TTS Inline] Seek forward failed:", _), w(m, "Unable to skip forward");
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
async function Pr() {
|
|
3068
|
+
if (!(!u(c) || !u(b)))
|
|
3069
|
+
try {
|
|
3070
|
+
await u(c).seekBackward?.(1), w(m, "Skipped backward");
|
|
3071
|
+
} catch (_) {
|
|
3072
|
+
console.error("[TTS Inline] Seek backward failed:", _), w(m, "Unable to skip backward");
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
async function Lr(_) {
|
|
3076
|
+
if (!u(c)) return;
|
|
3077
|
+
const $ = u(O) === _ ? 1 : _;
|
|
3078
|
+
w(O, $, !0), await u(c).updateSettings({ rate: $ }), w(
|
|
3079
|
+
m,
|
|
3080
|
+
$ === 1 ? "Playback speed reset to 1x" : `Playback speed ${$}x`,
|
|
3081
|
+
!0
|
|
3082
|
+
);
|
|
3083
|
+
}
|
|
3084
|
+
const Dr = /* @__PURE__ */ ot(() => i() === "sm" ? "pie-tool-tts-inline__trigger--sm" : i() === "lg" ? "pie-tool-tts-inline__trigger--lg" : "pie-tool-tts-inline__trigger--md");
|
|
3085
|
+
var Fr = {
|
|
3086
|
+
get catalogId() {
|
|
2736
3087
|
return n();
|
|
2737
3088
|
},
|
|
2738
|
-
set
|
|
2739
|
-
n(
|
|
3089
|
+
set catalogId(_ = "") {
|
|
3090
|
+
n(_), ft();
|
|
2740
3091
|
},
|
|
2741
|
-
get
|
|
3092
|
+
get language() {
|
|
2742
3093
|
return r();
|
|
2743
3094
|
},
|
|
2744
|
-
set
|
|
2745
|
-
r(
|
|
3095
|
+
set language(_ = "en-US") {
|
|
3096
|
+
r(_), ft();
|
|
2746
3097
|
},
|
|
2747
|
-
get
|
|
3098
|
+
get size() {
|
|
2748
3099
|
return i();
|
|
2749
3100
|
},
|
|
2750
|
-
set
|
|
2751
|
-
i(
|
|
3101
|
+
set size(_ = "md") {
|
|
3102
|
+
i(_), ft();
|
|
2752
3103
|
},
|
|
2753
|
-
get
|
|
3104
|
+
get speedOptions() {
|
|
2754
3105
|
return s();
|
|
2755
3106
|
},
|
|
2756
|
-
set
|
|
2757
|
-
s(
|
|
3107
|
+
set speedOptions(_ = [1.5, 2]) {
|
|
3108
|
+
s(_), ft();
|
|
2758
3109
|
}
|
|
2759
|
-
},
|
|
3110
|
+
}, hn = cs(), Br = Ji(hn);
|
|
2760
3111
|
{
|
|
2761
|
-
var
|
|
2762
|
-
var
|
|
2763
|
-
let
|
|
2764
|
-
var
|
|
3112
|
+
var Hr = (_) => {
|
|
3113
|
+
var $ = Ds(), A = Ue($);
|
|
3114
|
+
let vn;
|
|
3115
|
+
var _n = Ve(A, 2);
|
|
2765
3116
|
{
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
var
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
3117
|
+
var jr = (tt) => {
|
|
3118
|
+
var nt = Ls(), he = Ue(nt), Vr = Ue(he);
|
|
3119
|
+
{
|
|
3120
|
+
var qr = (F) => {
|
|
3121
|
+
var Q = Os();
|
|
3122
|
+
we(F, Q);
|
|
3123
|
+
}, Yr = (F) => {
|
|
3124
|
+
var Q = Ms();
|
|
3125
|
+
we(F, Q);
|
|
3126
|
+
}, Kr = (F) => {
|
|
3127
|
+
var Q = Is();
|
|
3128
|
+
we(F, Q);
|
|
3129
|
+
};
|
|
3130
|
+
Lt(Vr, (F) => {
|
|
3131
|
+
u(y) ? F(qr) : u(b) ? F(Yr, 1) : F(Kr, -1);
|
|
3132
|
+
});
|
|
3133
|
+
}
|
|
3134
|
+
je(he);
|
|
3135
|
+
var rt = Ve(he, 2), it = Ve(rt, 2), st = Ve(it, 2), Wr = Ve(st, 2);
|
|
3136
|
+
ms(Wr, 18, () => u(oe), (F) => F, (F, Q, gn) => {
|
|
3137
|
+
var le = Ps();
|
|
3138
|
+
let mn;
|
|
3139
|
+
var wn = Ue(le), Gr = Ue(wn);
|
|
3140
|
+
je(wn), je(le), Pt(() => {
|
|
3141
|
+
mn = Cn(le, 1, "pie-tool-tts-inline__control pie-tool-tts-inline__control--speed svelte-18mzc0g", null, mn, {
|
|
3142
|
+
"pie-tool-tts-inline__control--speed-active": u(O) === Q
|
|
3143
|
+
}), ee(le, "tabindex", u(k) === ke + u(gn) ? 0 : -1), ee(le, "aria-label", `Speed ${Q}x`), ee(le, "aria-pressed", u(O) === Q), le.disabled = !u(c) || !u(R), An(Gr, `${Q ?? ""} x`);
|
|
3144
|
+
}), ze("click", le, () => Lr(Q)), lt("focus", le, () => w(k, ke + u(gn))), we(F, le);
|
|
3145
|
+
}), je(nt), Mn(nt, (F) => w(a, F), () => u(a)), Pt(() => {
|
|
3146
|
+
ee(he, "tabindex", u(k) === 0 ? 0 : -1), ee(he, "aria-label", u(y) ? "Resume reading" : u(b) ? "Pause reading" : "Read aloud"), ee(he, "aria-pressed", u(b)), he.disabled = !u(c) || !u(R), ee(rt, "tabindex", u(k) === 1 ? 0 : -1), rt.disabled = !u(c) || !u(R) || !u(b) && !u(y), ee(it, "tabindex", u(k) === 2 ? 0 : -1), it.disabled = !u(c) || !u(R) || !u(b), ee(st, "tabindex", u(k) === 3 ? 0 : -1), st.disabled = !u(c) || !u(R) || !u(b);
|
|
3147
|
+
}), ze("keydown", nt, Mt), ze("click", he, Or), lt("focus", he, () => w(k, 0)), ze("click", rt, Mr), lt("focus", rt, () => w(k, 1)), ze("click", it, Ir), lt("focus", it, () => w(k, 2)), ze("click", st, Pr), lt("focus", st, () => w(k, 3)), we(tt, nt);
|
|
2788
3148
|
};
|
|
2789
|
-
|
|
2790
|
-
|
|
3149
|
+
Lt(_n, (tt) => {
|
|
3150
|
+
u(g) && tt(jr);
|
|
2791
3151
|
});
|
|
2792
3152
|
}
|
|
2793
|
-
var
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
"pie-tool-tts-inline__button--paused": u(S)
|
|
2798
|
-
}), Gt(z, "aria-label", u(S) ? "Resume reading" : u(E) ? "Pause reading" : "Read aloud"), Gt(z, "aria-pressed", u(E) || u(S)), z.disabled = !u(h), $i(nr, u(ee));
|
|
2799
|
-
}), Bt("click", z, Un), ve(k, te);
|
|
3153
|
+
var pn = Ve(_n, 2), Ur = Ue(pn, !0);
|
|
3154
|
+
je(pn), je($), Mn($, (tt) => w(l, tt), () => u(l)), Pt(() => {
|
|
3155
|
+
vn = Cn(A, 1, `pie-tool-tts-inline__trigger ${u(Dr) ?? ""}`, "svelte-18mzc0g", vn, { "pie-tool-tts-inline__trigger--active": u(g) }), ee(A, "aria-label", u(g) ? "Close reading controls" : "Open reading controls"), ee(A, "aria-expanded", u(g)), A.disabled = !u(c) || !u(R), An(Ur, u(m));
|
|
3156
|
+
}), ze("click", A, It), we(_, $);
|
|
2800
3157
|
};
|
|
2801
|
-
|
|
2802
|
-
|
|
3158
|
+
Lt(Br, (_) => {
|
|
3159
|
+
o && _(Hr);
|
|
2803
3160
|
});
|
|
2804
3161
|
}
|
|
2805
|
-
return
|
|
3162
|
+
return we(e, hn), qn(Fr);
|
|
2806
3163
|
}
|
|
2807
|
-
|
|
2808
|
-
customElements.define("pie-tool-tts-inline",
|
|
2809
|
-
|
|
3164
|
+
ls(["click", "keydown"]);
|
|
3165
|
+
customElements.define("pie-tool-tts-inline", Ns(
|
|
3166
|
+
Bs,
|
|
2810
3167
|
{
|
|
2811
|
-
toolId: { attribute: "tool-id", type: "String" },
|
|
2812
3168
|
catalogId: { attribute: "catalog-id", type: "String" },
|
|
2813
3169
|
language: { attribute: "language", type: "String" },
|
|
2814
|
-
size: { attribute: "size", type: "String" }
|
|
3170
|
+
size: { attribute: "size", type: "String" },
|
|
3171
|
+
speedOptions: { attribute: "speed-options", type: "Array" }
|
|
2815
3172
|
},
|
|
2816
3173
|
[],
|
|
2817
3174
|
[],
|
|
2818
3175
|
{ mode: "open" }
|
|
2819
3176
|
));
|
|
2820
3177
|
export {
|
|
2821
|
-
|
|
3178
|
+
Bs as default
|
|
2822
3179
|
};
|