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