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