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