@pie-players/pie-section-tools-toolbar 0.2.8 → 0.2.9
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.
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Ui = Object.defineProperty;
|
|
2
|
+
var an = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var k = (e, t, r) =>
|
|
7
|
-
var
|
|
5
|
+
var Yi = (e, t, r) => t in e ? Ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
6
|
+
var k = (e, t, r) => Yi(e, typeof t != "symbol" ? t + "" : t, r), wr = (e, t, r) => t.has(e) || an("Cannot " + r);
|
|
7
|
+
var f = (e, t, r) => (wr(e, t, "read from private field"), r ? r.call(e) : t.get(e)), w = (e, t, r) => t.has(e) ? an("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), b = (e, t, r, n) => (wr(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r), H = (e, t, r) => (wr(e, t, "access private method"), r);
|
|
8
8
|
var $n;
|
|
9
9
|
typeof window < "u" && (($n = window.__svelte ?? (window.__svelte = {})).v ?? ($n.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
-
const
|
|
11
|
-
var En = Array.isArray,
|
|
12
|
-
const
|
|
10
|
+
const zi = 1, Gi = 2, Ki = 16, Wi = 1, Xi = 2, Ir = "[", cr = "[!", Vr = "]", ht = {}, P = /* @__PURE__ */ Symbol(), xn = "http://www.w3.org/1999/xhtml", xr = !1;
|
|
11
|
+
var En = Array.isArray, Ji = Array.prototype.indexOf, At = Array.prototype.includes, dr = Array.from, or = Object.keys, lr = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, Qi = Object.getOwnPropertyDescriptors, es = Object.prototype, ts = Array.prototype, Tn = Object.getPrototypeOf, fn = Object.isExtensible;
|
|
12
|
+
const rs = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function ns(e) {
|
|
15
15
|
for (var t = 0; t < e.length; t++)
|
|
16
16
|
e[t]();
|
|
17
17
|
}
|
|
@@ -21,56 +21,56 @@ function An() {
|
|
|
21
21
|
});
|
|
22
22
|
return { promise: r, resolve: e, reject: t };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const D = 2, Zt = 4, hr = 8, Sn = 1 << 24, Ze = 16, ye = 32, Je = 64, Er = 128, le = 512, O = 1024, F = 2048, we = 4096, te = 8192, Be = 16384, Mt = 32768, St = 65536, un = 1 << 17, Rn = 1 << 18, _t = 1 << 19, is = 1 << 20, ze = 1 << 25, vt = 65536, Tr = 1 << 21, Br = 1 << 22, Ge = 1 << 23, rr = /* @__PURE__ */ Symbol("$state"), ss = /* @__PURE__ */ Symbol("legacy props"), os = /* @__PURE__ */ Symbol(""), tt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
k(this, "name", "StaleReactionError");
|
|
28
28
|
k(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
30
|
+
}(), ls = (
|
|
31
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
32
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
|
-
), vr = 3,
|
|
34
|
-
function
|
|
33
|
+
), vr = 3, Ot = 8;
|
|
34
|
+
function Cn(e) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function as() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
39
39
|
}
|
|
40
40
|
function fs(e, t, r) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function us(e) {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function cs() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ds(e) {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function hs() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function vs() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ps() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function _s() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function gs() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function bs() {
|
|
68
68
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
69
69
|
}
|
|
70
70
|
function Kt(e) {
|
|
71
71
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ms() {
|
|
74
74
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
75
|
}
|
|
76
76
|
let x = !1;
|
|
@@ -80,20 +80,20 @@ function _e(e) {
|
|
|
80
80
|
let E;
|
|
81
81
|
function Z(e) {
|
|
82
82
|
if (e === null)
|
|
83
|
-
throw Kt(),
|
|
83
|
+
throw Kt(), ht;
|
|
84
84
|
return E = e;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Rt() {
|
|
87
87
|
return Z(/* @__PURE__ */ $e(E));
|
|
88
88
|
}
|
|
89
89
|
function Jt(e) {
|
|
90
90
|
if (x) {
|
|
91
91
|
if (/* @__PURE__ */ $e(E) !== null)
|
|
92
|
-
throw Kt(),
|
|
92
|
+
throw Kt(), ht;
|
|
93
93
|
E = e;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function ws(e = 1) {
|
|
97
97
|
if (x) {
|
|
98
98
|
for (var t = e, r = E; t--; )
|
|
99
99
|
r = /** @type {TemplateNode} */
|
|
@@ -101,9 +101,9 @@ function ms(e = 1) {
|
|
|
101
101
|
E = r;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function ar(e = !0) {
|
|
105
105
|
for (var t = 0, r = E; ; ) {
|
|
106
|
-
if (r.nodeType ===
|
|
106
|
+
if (r.nodeType === Ot) {
|
|
107
107
|
var n = (
|
|
108
108
|
/** @type {Comment} */
|
|
109
109
|
r.data
|
|
@@ -122,8 +122,8 @@ function fr(e = !0) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function kn(e) {
|
|
125
|
-
if (!e || e.nodeType !==
|
|
126
|
-
throw Kt(),
|
|
125
|
+
if (!e || e.nodeType !== Ot)
|
|
126
|
+
throw Kt(), ht;
|
|
127
127
|
return (
|
|
128
128
|
/** @type {Comment} */
|
|
129
129
|
e.data
|
|
@@ -132,19 +132,19 @@ function kn(e) {
|
|
|
132
132
|
function Nn(e) {
|
|
133
133
|
return e === this.v;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function ys(e, t) {
|
|
136
136
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
137
137
|
}
|
|
138
138
|
function Ln(e) {
|
|
139
|
-
return !
|
|
139
|
+
return !ys(e, this.v);
|
|
140
140
|
}
|
|
141
|
-
let
|
|
141
|
+
let $s = !1, G = null;
|
|
142
142
|
function Ct(e) {
|
|
143
|
-
|
|
143
|
+
G = e;
|
|
144
144
|
}
|
|
145
145
|
function Mn(e, t = !1, r) {
|
|
146
|
-
|
|
147
|
-
p:
|
|
146
|
+
G = {
|
|
147
|
+
p: G,
|
|
148
148
|
i: !1,
|
|
149
149
|
c: null,
|
|
150
150
|
e: null,
|
|
@@ -156,49 +156,49 @@ function Mn(e, t = !1, r) {
|
|
|
156
156
|
function On(e) {
|
|
157
157
|
var t = (
|
|
158
158
|
/** @type {ComponentContext} */
|
|
159
|
-
|
|
159
|
+
G
|
|
160
160
|
), r = t.e;
|
|
161
161
|
if (r !== null) {
|
|
162
162
|
t.e = null;
|
|
163
163
|
for (var n of r)
|
|
164
164
|
si(n);
|
|
165
165
|
}
|
|
166
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
166
|
+
return e !== void 0 && (t.x = e), t.i = !0, G = t.p, e ?? /** @type {T} */
|
|
167
167
|
{};
|
|
168
168
|
}
|
|
169
169
|
function Pn() {
|
|
170
170
|
return !0;
|
|
171
171
|
}
|
|
172
|
-
let
|
|
172
|
+
let rt = [];
|
|
173
173
|
function Dn() {
|
|
174
|
-
var e =
|
|
175
|
-
|
|
174
|
+
var e = rt;
|
|
175
|
+
rt = [], ns(e);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
if (
|
|
179
|
-
var t =
|
|
177
|
+
function ut(e) {
|
|
178
|
+
if (rt.length === 0 && !Bt) {
|
|
179
|
+
var t = rt;
|
|
180
180
|
queueMicrotask(() => {
|
|
181
|
-
t ===
|
|
181
|
+
t === rt && Dn();
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
rt.push(e);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
for (;
|
|
186
|
+
function xs() {
|
|
187
|
+
for (; rt.length > 0; )
|
|
188
188
|
Dn();
|
|
189
189
|
}
|
|
190
190
|
function Fn(e) {
|
|
191
191
|
var t = $;
|
|
192
192
|
if (t === null)
|
|
193
|
-
return y.f |=
|
|
194
|
-
if ((t.f &
|
|
193
|
+
return y.f |= Ge, e;
|
|
194
|
+
if ((t.f & Mt) === 0 && (t.f & Zt) === 0)
|
|
195
195
|
throw e;
|
|
196
|
-
|
|
196
|
+
kt(e, t);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function kt(e, t) {
|
|
199
199
|
for (; t !== null; ) {
|
|
200
200
|
if ((t.f & Er) !== 0) {
|
|
201
|
-
if ((t.f &
|
|
201
|
+
if ((t.f & Mt) === 0)
|
|
202
202
|
throw e;
|
|
203
203
|
try {
|
|
204
204
|
t.b.error(e);
|
|
@@ -211,30 +211,30 @@ function Rt(e, t) {
|
|
|
211
211
|
}
|
|
212
212
|
throw e;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Es = -7169;
|
|
215
215
|
function L(e, t) {
|
|
216
|
-
e.f = e.f &
|
|
216
|
+
e.f = e.f & Es | t;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
(e.f &
|
|
218
|
+
function Hr(e) {
|
|
219
|
+
(e.f & le) !== 0 || e.deps === null ? L(e, O) : L(e, we);
|
|
220
220
|
}
|
|
221
221
|
function In(e) {
|
|
222
222
|
if (e !== null)
|
|
223
223
|
for (const t of e)
|
|
224
|
-
(t.f &
|
|
224
|
+
(t.f & D) === 0 || (t.f & vt) === 0 || (t.f ^= vt, In(
|
|
225
225
|
/** @type {Derived} */
|
|
226
226
|
t.deps
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
229
|
function Vn(e, t, r) {
|
|
230
|
-
(e.f &
|
|
230
|
+
(e.f & F) !== 0 ? t.add(e) : (e.f & we) !== 0 && r.add(e), In(e.deps), L(e, O);
|
|
231
231
|
}
|
|
232
232
|
const Qt = /* @__PURE__ */ new Set();
|
|
233
|
-
let S = null, pe = null,
|
|
234
|
-
var
|
|
233
|
+
let S = null, pe = null, Y = [], pr = null, Ar = !1, Bt = !1;
|
|
234
|
+
var mt, wt, st, yt, qt, Ut, ot, Pe, $t, Re, Sr, Rr, Bn;
|
|
235
235
|
const Wr = class Wr {
|
|
236
236
|
constructor() {
|
|
237
|
-
w(this,
|
|
237
|
+
w(this, Re);
|
|
238
238
|
k(this, "committed", !1);
|
|
239
239
|
/**
|
|
240
240
|
* The current values of any sources that are updated in this batch
|
|
@@ -253,20 +253,20 @@ const Wr = class Wr {
|
|
|
253
253
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
254
254
|
* @type {Set<() => void>}
|
|
255
255
|
*/
|
|
256
|
-
w(this,
|
|
256
|
+
w(this, mt, /* @__PURE__ */ new Set());
|
|
257
257
|
/**
|
|
258
258
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
259
259
|
* @type {Set<(batch: Batch) => void>}
|
|
260
260
|
*/
|
|
261
|
-
w(this,
|
|
261
|
+
w(this, wt, /* @__PURE__ */ new Set());
|
|
262
262
|
/**
|
|
263
263
|
* The number of async effects that are currently in flight
|
|
264
264
|
*/
|
|
265
|
-
w(this,
|
|
265
|
+
w(this, st, 0);
|
|
266
266
|
/**
|
|
267
267
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
268
268
|
*/
|
|
269
|
-
w(this,
|
|
269
|
+
w(this, yt, 0);
|
|
270
270
|
/**
|
|
271
271
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
272
272
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
@@ -282,7 +282,7 @@ const Wr = class Wr {
|
|
|
282
282
|
* Deferred effects that are MAYBE_DIRTY
|
|
283
283
|
* @type {Set<Effect>}
|
|
284
284
|
*/
|
|
285
|
-
w(this,
|
|
285
|
+
w(this, ot, /* @__PURE__ */ new Set());
|
|
286
286
|
/**
|
|
287
287
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
288
288
|
* is committed — we skip over these during `process`.
|
|
@@ -290,19 +290,19 @@ const Wr = class Wr {
|
|
|
290
290
|
* so they can be rescheduled if the branch survives.
|
|
291
291
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
292
292
|
*/
|
|
293
|
-
w(this,
|
|
293
|
+
w(this, Pe, /* @__PURE__ */ new Map());
|
|
294
294
|
k(this, "is_fork", !1);
|
|
295
|
-
w(this,
|
|
295
|
+
w(this, $t, !1);
|
|
296
296
|
}
|
|
297
297
|
is_deferred() {
|
|
298
|
-
return this.is_fork ||
|
|
298
|
+
return this.is_fork || f(this, yt) > 0;
|
|
299
299
|
}
|
|
300
300
|
/**
|
|
301
301
|
* Add an effect to the #skipped_branches map and reset its children
|
|
302
302
|
* @param {Effect} effect
|
|
303
303
|
*/
|
|
304
304
|
skip_effect(t) {
|
|
305
|
-
|
|
305
|
+
f(this, Pe).has(t) || f(this, Pe).set(t, { d: [], m: [] });
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
308
308
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -310,11 +310,11 @@ const Wr = class Wr {
|
|
|
310
310
|
* @param {Effect} effect
|
|
311
311
|
*/
|
|
312
312
|
unskip_effect(t) {
|
|
313
|
-
var r =
|
|
313
|
+
var r = f(this, Pe).get(t);
|
|
314
314
|
if (r) {
|
|
315
|
-
|
|
315
|
+
f(this, Pe).delete(t);
|
|
316
316
|
for (var n of r.d)
|
|
317
|
-
L(n,
|
|
317
|
+
L(n, F), ge(n);
|
|
318
318
|
for (n of r.m)
|
|
319
319
|
L(n, we), ge(n);
|
|
320
320
|
}
|
|
@@ -324,17 +324,17 @@ const Wr = class Wr {
|
|
|
324
324
|
* @param {Effect[]} root_effects
|
|
325
325
|
*/
|
|
326
326
|
process(t) {
|
|
327
|
-
|
|
327
|
+
Y = [], this.apply();
|
|
328
328
|
var r = [], n = [];
|
|
329
329
|
for (const i of t)
|
|
330
|
-
|
|
330
|
+
H(this, Re, Sr).call(this, i, r, n);
|
|
331
331
|
if (this.is_deferred()) {
|
|
332
|
-
|
|
333
|
-
for (const [i, s] of
|
|
332
|
+
H(this, Re, Rr).call(this, n), H(this, Re, Rr).call(this, r);
|
|
333
|
+
for (const [i, s] of f(this, Pe))
|
|
334
334
|
qn(i, s);
|
|
335
335
|
} else {
|
|
336
|
-
for (const i of
|
|
337
|
-
|
|
336
|
+
for (const i of f(this, mt)) i();
|
|
337
|
+
f(this, mt).clear(), f(this, st) === 0 && H(this, Re, Bn).call(this), S = null, cn(n), cn(r), f(this, qt)?.resolve();
|
|
338
338
|
}
|
|
339
339
|
pe = null;
|
|
340
340
|
}
|
|
@@ -345,7 +345,7 @@ const Wr = class Wr {
|
|
|
345
345
|
* @param {any} value
|
|
346
346
|
*/
|
|
347
347
|
capture(t, r) {
|
|
348
|
-
r !==
|
|
348
|
+
r !== P && !this.previous.has(t) && this.previous.set(t, r), (t.f & Ge) === 0 && (this.current.set(t, t.v), pe?.set(t, t.v));
|
|
349
349
|
}
|
|
350
350
|
activate() {
|
|
351
351
|
S = this, this.apply();
|
|
@@ -354,54 +354,54 @@ const Wr = class Wr {
|
|
|
354
354
|
S === this && (S = null, pe = null);
|
|
355
355
|
}
|
|
356
356
|
flush() {
|
|
357
|
-
if (this.activate(),
|
|
358
|
-
if (
|
|
357
|
+
if (this.activate(), Y.length > 0) {
|
|
358
|
+
if (Hn(), S !== null && S !== this)
|
|
359
359
|
return;
|
|
360
|
-
} else
|
|
360
|
+
} else f(this, st) === 0 && this.process([]);
|
|
361
361
|
this.deactivate();
|
|
362
362
|
}
|
|
363
363
|
discard() {
|
|
364
|
-
for (const t of
|
|
365
|
-
|
|
364
|
+
for (const t of f(this, wt)) t(this);
|
|
365
|
+
f(this, wt).clear();
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
368
368
|
*
|
|
369
369
|
* @param {boolean} blocking
|
|
370
370
|
*/
|
|
371
371
|
increment(t) {
|
|
372
|
-
b(this,
|
|
372
|
+
b(this, st, f(this, st) + 1), t && b(this, yt, f(this, yt) + 1);
|
|
373
373
|
}
|
|
374
374
|
/**
|
|
375
375
|
*
|
|
376
376
|
* @param {boolean} blocking
|
|
377
377
|
*/
|
|
378
378
|
decrement(t) {
|
|
379
|
-
b(this,
|
|
380
|
-
b(this,
|
|
379
|
+
b(this, st, f(this, st) - 1), t && b(this, yt, f(this, yt) - 1), !f(this, $t) && (b(this, $t, !0), ut(() => {
|
|
380
|
+
b(this, $t, !1), this.is_deferred() ? Y.length > 0 && this.flush() : this.revive();
|
|
381
381
|
}));
|
|
382
382
|
}
|
|
383
383
|
revive() {
|
|
384
|
-
for (const t of
|
|
385
|
-
|
|
386
|
-
for (const t of
|
|
384
|
+
for (const t of f(this, Ut))
|
|
385
|
+
f(this, ot).delete(t), L(t, F), ge(t);
|
|
386
|
+
for (const t of f(this, ot))
|
|
387
387
|
L(t, we), ge(t);
|
|
388
388
|
this.flush();
|
|
389
389
|
}
|
|
390
390
|
/** @param {() => void} fn */
|
|
391
391
|
oncommit(t) {
|
|
392
|
-
|
|
392
|
+
f(this, mt).add(t);
|
|
393
393
|
}
|
|
394
394
|
/** @param {(batch: Batch) => void} fn */
|
|
395
395
|
ondiscard(t) {
|
|
396
|
-
|
|
396
|
+
f(this, wt).add(t);
|
|
397
397
|
}
|
|
398
398
|
settled() {
|
|
399
|
-
return (
|
|
399
|
+
return (f(this, qt) ?? b(this, qt, An())).promise;
|
|
400
400
|
}
|
|
401
401
|
static ensure() {
|
|
402
402
|
if (S === null) {
|
|
403
403
|
const t = S = new Wr();
|
|
404
|
-
Qt.add(S),
|
|
404
|
+
Qt.add(S), Bt || ut(() => {
|
|
405
405
|
S === t && t.flush();
|
|
406
406
|
});
|
|
407
407
|
}
|
|
@@ -410,7 +410,7 @@ const Wr = class Wr {
|
|
|
410
410
|
apply() {
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
|
-
|
|
413
|
+
mt = new WeakMap(), wt = new WeakMap(), st = new WeakMap(), yt = new WeakMap(), qt = new WeakMap(), Ut = new WeakMap(), ot = new WeakMap(), Pe = new WeakMap(), $t = new WeakMap(), Re = new WeakSet(), /**
|
|
414
414
|
* Traverse the effect tree, executing effects or stashing
|
|
415
415
|
* them for later execution as appropriate
|
|
416
416
|
* @param {Effect} root
|
|
@@ -420,9 +420,9 @@ bt = new WeakMap(), mt = new WeakMap(), it = new WeakMap(), wt = new WeakMap(),
|
|
|
420
420
|
Sr = function(t, r, n) {
|
|
421
421
|
t.f ^= O;
|
|
422
422
|
for (var i = t.first, s = null; i !== null; ) {
|
|
423
|
-
var o = i.f, l = (o & (ye |
|
|
423
|
+
var o = i.f, l = (o & (ye | Je)) !== 0, a = l && (o & O) !== 0, u = a || (o & te) !== 0 || f(this, Pe).has(i);
|
|
424
424
|
if (!u && i.fn !== null) {
|
|
425
|
-
l ? i.f ^= O : s !== null && (o & (Zt | hr | Sn)) !== 0 ? s.b.defer_effect(i) : (o & Zt) !== 0 ? r.push(i) : Wt(i) && ((o &
|
|
425
|
+
l ? i.f ^= O : s !== null && (o & (Zt | hr | Sn)) !== 0 ? s.b.defer_effect(i) : (o & Zt) !== 0 ? r.push(i) : Wt(i) && ((o & Ze) !== 0 && f(this, ot).add(i), Lt(i));
|
|
426
426
|
var c = i.first;
|
|
427
427
|
if (c !== null) {
|
|
428
428
|
i = c;
|
|
@@ -431,9 +431,9 @@ Sr = function(t, r, n) {
|
|
|
431
431
|
}
|
|
432
432
|
for (; i !== null; ) {
|
|
433
433
|
i === s && (s = null);
|
|
434
|
-
var
|
|
435
|
-
if (
|
|
436
|
-
i =
|
|
434
|
+
var p = i.next;
|
|
435
|
+
if (p !== null) {
|
|
436
|
+
i = p;
|
|
437
437
|
break;
|
|
438
438
|
}
|
|
439
439
|
i = i.parent;
|
|
@@ -442,10 +442,10 @@ Sr = function(t, r, n) {
|
|
|
442
442
|
}, /**
|
|
443
443
|
* @param {Effect[]} effects
|
|
444
444
|
*/
|
|
445
|
-
|
|
445
|
+
Rr = function(t) {
|
|
446
446
|
for (var r = 0; r < t.length; r += 1)
|
|
447
|
-
Vn(t[r],
|
|
448
|
-
},
|
|
447
|
+
Vn(t[r], f(this, Ut), f(this, ot));
|
|
448
|
+
}, Bn = function() {
|
|
449
449
|
var i;
|
|
450
450
|
if (Qt.size > 1) {
|
|
451
451
|
this.previous.clear();
|
|
@@ -456,110 +456,110 @@ Cr = function(t) {
|
|
|
456
456
|
continue;
|
|
457
457
|
}
|
|
458
458
|
const o = [];
|
|
459
|
-
for (const [
|
|
460
|
-
if (s.current.has(
|
|
461
|
-
if (r && u !== s.current.get(
|
|
462
|
-
s.current.set(
|
|
459
|
+
for (const [a, u] of this.current) {
|
|
460
|
+
if (s.current.has(a))
|
|
461
|
+
if (r && u !== s.current.get(a))
|
|
462
|
+
s.current.set(a, u);
|
|
463
463
|
else
|
|
464
464
|
continue;
|
|
465
|
-
o.push(
|
|
465
|
+
o.push(a);
|
|
466
466
|
}
|
|
467
467
|
if (o.length === 0)
|
|
468
468
|
continue;
|
|
469
|
-
const l = [...s.current.keys()].filter((
|
|
469
|
+
const l = [...s.current.keys()].filter((a) => !this.current.has(a));
|
|
470
470
|
if (l.length > 0) {
|
|
471
|
-
var n =
|
|
472
|
-
|
|
473
|
-
const
|
|
471
|
+
var n = Y;
|
|
472
|
+
Y = [];
|
|
473
|
+
const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
474
474
|
for (const c of o)
|
|
475
|
-
Zn(c, l,
|
|
476
|
-
if (
|
|
475
|
+
Zn(c, l, a, u);
|
|
476
|
+
if (Y.length > 0) {
|
|
477
477
|
S = s, s.apply();
|
|
478
|
-
for (const c of
|
|
479
|
-
|
|
478
|
+
for (const c of Y)
|
|
479
|
+
H(i = s, Re, Sr).call(i, c, [], []);
|
|
480
480
|
s.deactivate();
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
Y = n;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
S = null, pe = t;
|
|
486
486
|
}
|
|
487
487
|
this.committed = !0, Qt.delete(this);
|
|
488
488
|
};
|
|
489
|
-
let
|
|
489
|
+
let He = Wr;
|
|
490
490
|
function Dt(e) {
|
|
491
|
-
var t =
|
|
492
|
-
|
|
491
|
+
var t = Bt;
|
|
492
|
+
Bt = !0;
|
|
493
493
|
try {
|
|
494
494
|
for (var r; ; ) {
|
|
495
|
-
if (
|
|
495
|
+
if (xs(), Y.length === 0 && (S?.flush(), Y.length === 0))
|
|
496
496
|
return pr = null, /** @type {T} */
|
|
497
497
|
r;
|
|
498
|
-
|
|
498
|
+
Hn();
|
|
499
499
|
}
|
|
500
500
|
} finally {
|
|
501
|
-
|
|
501
|
+
Bt = t;
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Hn() {
|
|
505
505
|
Ar = !0;
|
|
506
506
|
var e = null;
|
|
507
507
|
try {
|
|
508
|
-
for (var t = 0;
|
|
509
|
-
var r =
|
|
508
|
+
for (var t = 0; Y.length > 0; ) {
|
|
509
|
+
var r = He.ensure();
|
|
510
510
|
if (t++ > 1e3) {
|
|
511
511
|
var n, i;
|
|
512
|
-
|
|
512
|
+
Ts();
|
|
513
513
|
}
|
|
514
|
-
r.process(
|
|
514
|
+
r.process(Y), Ke.clear();
|
|
515
515
|
}
|
|
516
516
|
} finally {
|
|
517
|
-
|
|
517
|
+
Y = [], Ar = !1, pr = null;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Ts() {
|
|
521
521
|
try {
|
|
522
|
-
|
|
522
|
+
hs();
|
|
523
523
|
} catch (e) {
|
|
524
|
-
|
|
524
|
+
kt(e, pr);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
let
|
|
527
|
+
let Oe = null;
|
|
528
528
|
function cn(e) {
|
|
529
529
|
var t = e.length;
|
|
530
530
|
if (t !== 0) {
|
|
531
531
|
for (var r = 0; r < t; ) {
|
|
532
532
|
var n = e[r++];
|
|
533
|
-
if ((n.f & (
|
|
534
|
-
|
|
535
|
-
for (const i of
|
|
536
|
-
if ((i.f & (
|
|
533
|
+
if ((n.f & (Be | te)) === 0 && Wt(n) && (Oe = /* @__PURE__ */ new Set(), Lt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && fi(n), Oe?.size > 0)) {
|
|
534
|
+
Ke.clear();
|
|
535
|
+
for (const i of Oe) {
|
|
536
|
+
if ((i.f & (Be | te)) !== 0) continue;
|
|
537
537
|
const s = [i];
|
|
538
538
|
let o = i.parent;
|
|
539
539
|
for (; o !== null; )
|
|
540
|
-
|
|
540
|
+
Oe.has(o) && (Oe.delete(o), s.push(o)), o = o.parent;
|
|
541
541
|
for (let l = s.length - 1; l >= 0; l--) {
|
|
542
|
-
const
|
|
543
|
-
(
|
|
542
|
+
const a = s[l];
|
|
543
|
+
(a.f & (Be | te)) === 0 && Lt(a);
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
|
|
546
|
+
Oe.clear();
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
|
|
549
|
+
Oe = null;
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
function Zn(e, t, r, n) {
|
|
553
553
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
554
554
|
for (const i of e.reactions) {
|
|
555
555
|
const s = i.f;
|
|
556
|
-
(s &
|
|
556
|
+
(s & D) !== 0 ? Zn(
|
|
557
557
|
/** @type {Derived} */
|
|
558
558
|
i,
|
|
559
559
|
t,
|
|
560
560
|
r,
|
|
561
561
|
n
|
|
562
|
-
) : (s & (
|
|
562
|
+
) : (s & (Br | Ze)) !== 0 && (s & F) === 0 && jn(i, t, n) && (L(i, F), ge(
|
|
563
563
|
/** @type {Effect} */
|
|
564
564
|
i
|
|
565
565
|
));
|
|
@@ -570,9 +570,9 @@ function jn(e, t, r) {
|
|
|
570
570
|
if (n !== void 0) return n;
|
|
571
571
|
if (e.deps !== null)
|
|
572
572
|
for (const i of e.deps) {
|
|
573
|
-
if (
|
|
573
|
+
if (At.call(t, i))
|
|
574
574
|
return !0;
|
|
575
|
-
if ((i.f &
|
|
575
|
+
if ((i.f & D) !== 0 && jn(
|
|
576
576
|
/** @type {Derived} */
|
|
577
577
|
i,
|
|
578
578
|
t,
|
|
@@ -590,37 +590,37 @@ function ge(e) {
|
|
|
590
590
|
for (var t = pr = e; t.parent !== null; ) {
|
|
591
591
|
t = t.parent;
|
|
592
592
|
var r = t.f;
|
|
593
|
-
if (Ar && t === $ && (r &
|
|
593
|
+
if (Ar && t === $ && (r & Ze) !== 0 && (r & Rn) === 0)
|
|
594
594
|
return;
|
|
595
|
-
if ((r & (
|
|
595
|
+
if ((r & (Je | ye)) !== 0) {
|
|
596
596
|
if ((r & O) === 0) return;
|
|
597
597
|
t.f ^= O;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
|
|
600
|
+
Y.push(t);
|
|
601
601
|
}
|
|
602
602
|
function qn(e, t) {
|
|
603
603
|
if (!((e.f & ye) !== 0 && (e.f & O) !== 0)) {
|
|
604
|
-
(e.f &
|
|
604
|
+
(e.f & F) !== 0 ? t.d.push(e) : (e.f & we) !== 0 && t.m.push(e), L(e, O);
|
|
605
605
|
for (var r = e.first; r !== null; )
|
|
606
606
|
qn(r, t), r = r.next;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
let t = 0, r =
|
|
609
|
+
function As(e) {
|
|
610
|
+
let t = 0, r = pt(0), n;
|
|
611
611
|
return () => {
|
|
612
|
-
Ur() && (
|
|
613
|
-
|
|
614
|
-
t -= 1, t === 0 && (n?.(), n = void 0,
|
|
612
|
+
Ur() && (v(r), Yr(() => (t === 0 && (n = gr(() => e(() => Ht(r)))), t += 1, () => {
|
|
613
|
+
ut(() => {
|
|
614
|
+
t -= 1, t === 0 && (n?.(), n = void 0, Ht(r));
|
|
615
615
|
});
|
|
616
616
|
})));
|
|
617
617
|
};
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
function
|
|
619
|
+
var Ss = St | _t;
|
|
620
|
+
function Rs(e, t, r) {
|
|
621
621
|
new Cs(e, t, r);
|
|
622
622
|
}
|
|
623
|
-
var
|
|
623
|
+
var se, Yt, De, lt, Ee, Te, Q, Ae, Fe, at, Ye, xt, Et, Tt, Ie, fr, B, Un, Yn, Cr, nr, kr;
|
|
624
624
|
class Cs {
|
|
625
625
|
/**
|
|
626
626
|
* @param {TemplateNode} node
|
|
@@ -628,35 +628,35 @@ class Cs {
|
|
|
628
628
|
* @param {((anchor: Node) => void)} children
|
|
629
629
|
*/
|
|
630
630
|
constructor(t, r, n) {
|
|
631
|
-
w(this,
|
|
631
|
+
w(this, B);
|
|
632
632
|
/** @type {Boundary | null} */
|
|
633
633
|
k(this, "parent");
|
|
634
634
|
k(this, "is_pending", !1);
|
|
635
635
|
/** @type {TemplateNode} */
|
|
636
|
-
w(this,
|
|
636
|
+
w(this, se);
|
|
637
637
|
/** @type {TemplateNode | null} */
|
|
638
638
|
w(this, Yt, x ? E : null);
|
|
639
639
|
/** @type {BoundaryProps} */
|
|
640
|
-
w(this,
|
|
640
|
+
w(this, De);
|
|
641
641
|
/** @type {((anchor: Node) => void)} */
|
|
642
|
-
w(this,
|
|
642
|
+
w(this, lt);
|
|
643
643
|
/** @type {Effect} */
|
|
644
644
|
w(this, Ee);
|
|
645
645
|
/** @type {Effect | null} */
|
|
646
646
|
w(this, Te, null);
|
|
647
647
|
/** @type {Effect | null} */
|
|
648
|
-
w(this,
|
|
648
|
+
w(this, Q, null);
|
|
649
649
|
/** @type {Effect | null} */
|
|
650
650
|
w(this, Ae, null);
|
|
651
651
|
/** @type {DocumentFragment | null} */
|
|
652
|
-
w(this,
|
|
653
|
-
w(this,
|
|
654
|
-
w(this,
|
|
655
|
-
w(this,
|
|
656
|
-
/** @type {Set<Effect>} */
|
|
657
|
-
w(this, xt, /* @__PURE__ */ new Set());
|
|
652
|
+
w(this, Fe, null);
|
|
653
|
+
w(this, at, 0);
|
|
654
|
+
w(this, Ye, 0);
|
|
655
|
+
w(this, xt, !1);
|
|
658
656
|
/** @type {Set<Effect>} */
|
|
659
657
|
w(this, Et, /* @__PURE__ */ new Set());
|
|
658
|
+
/** @type {Set<Effect>} */
|
|
659
|
+
w(this, Tt, /* @__PURE__ */ new Set());
|
|
660
660
|
/**
|
|
661
661
|
* A source containing the number of pending async deriveds/expressions.
|
|
662
662
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -664,11 +664,11 @@ class Cs {
|
|
|
664
664
|
* calls followed by no-op flushes
|
|
665
665
|
* @type {Source<number> | null}
|
|
666
666
|
*/
|
|
667
|
-
w(this,
|
|
668
|
-
w(this,
|
|
669
|
-
b(this,
|
|
667
|
+
w(this, Ie, null);
|
|
668
|
+
w(this, fr, As(() => (b(this, Ie, pt(f(this, at))), () => {
|
|
669
|
+
b(this, Ie, null);
|
|
670
670
|
})));
|
|
671
|
-
b(this,
|
|
671
|
+
b(this, se, t), b(this, De, r), b(this, lt, (i) => {
|
|
672
672
|
var s = (
|
|
673
673
|
/** @type {Effect} */
|
|
674
674
|
$
|
|
@@ -679,19 +679,19 @@ class Cs {
|
|
|
679
679
|
if (x) {
|
|
680
680
|
const i = (
|
|
681
681
|
/** @type {Comment} */
|
|
682
|
-
|
|
682
|
+
f(this, Yt)
|
|
683
683
|
);
|
|
684
|
-
|
|
684
|
+
Rt(), i.data === cr ? H(this, B, Yn).call(this) : H(this, B, Un).call(this);
|
|
685
685
|
} else
|
|
686
|
-
|
|
687
|
-
},
|
|
686
|
+
H(this, B, Cr).call(this);
|
|
687
|
+
}, Ss)), x && b(this, se, E);
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
691
691
|
* @param {Effect} effect
|
|
692
692
|
*/
|
|
693
693
|
defer_effect(t) {
|
|
694
|
-
Vn(t,
|
|
694
|
+
Vn(t, f(this, Et), f(this, Tt));
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
697
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -701,7 +701,7 @@ class Cs {
|
|
|
701
701
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
702
702
|
}
|
|
703
703
|
has_pending_snippet() {
|
|
704
|
-
return !!
|
|
704
|
+
return !!f(this, De).pending;
|
|
705
705
|
}
|
|
706
706
|
/**
|
|
707
707
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -710,46 +710,46 @@ class Cs {
|
|
|
710
710
|
* @param {1 | -1} d
|
|
711
711
|
*/
|
|
712
712
|
update_pending_count(t) {
|
|
713
|
-
|
|
714
|
-
b(this,
|
|
713
|
+
H(this, B, kr).call(this, t), b(this, at, f(this, at) + t), !(!f(this, Ie) || f(this, xt)) && (b(this, xt, !0), ut(() => {
|
|
714
|
+
b(this, xt, !1), f(this, Ie) && Nt(f(this, Ie), f(this, at));
|
|
715
715
|
}));
|
|
716
716
|
}
|
|
717
717
|
get_effect_pending() {
|
|
718
|
-
return
|
|
718
|
+
return f(this, fr).call(this), v(
|
|
719
719
|
/** @type {Source<number>} */
|
|
720
|
-
|
|
720
|
+
f(this, Ie)
|
|
721
721
|
);
|
|
722
722
|
}
|
|
723
723
|
/** @param {unknown} error */
|
|
724
724
|
error(t) {
|
|
725
|
-
var r =
|
|
726
|
-
let n =
|
|
725
|
+
var r = f(this, De).onerror;
|
|
726
|
+
let n = f(this, De).failed;
|
|
727
727
|
if (!r && !n)
|
|
728
728
|
throw t;
|
|
729
|
-
|
|
729
|
+
f(this, Te) && (j(f(this, Te)), b(this, Te, null)), f(this, Q) && (j(f(this, Q)), b(this, Q, null)), f(this, Ae) && (j(f(this, Ae)), b(this, Ae, null)), x && (Z(
|
|
730
730
|
/** @type {TemplateNode} */
|
|
731
|
-
|
|
732
|
-
),
|
|
731
|
+
f(this, Yt)
|
|
732
|
+
), ws(), Z(ar()));
|
|
733
733
|
var i = !1, s = !1;
|
|
734
734
|
const o = () => {
|
|
735
735
|
if (i) {
|
|
736
|
-
|
|
736
|
+
ms();
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
i = !0, s &&
|
|
739
|
+
i = !0, s && bs(), f(this, Ae) !== null && ct(f(this, Ae), () => {
|
|
740
740
|
b(this, Ae, null);
|
|
741
|
-
}),
|
|
742
|
-
|
|
741
|
+
}), H(this, B, nr).call(this, () => {
|
|
742
|
+
He.ensure(), H(this, B, Cr).call(this);
|
|
743
743
|
});
|
|
744
744
|
};
|
|
745
|
-
|
|
745
|
+
ut(() => {
|
|
746
746
|
try {
|
|
747
747
|
s = !0, r?.(t, o), s = !1;
|
|
748
748
|
} catch (l) {
|
|
749
|
-
|
|
749
|
+
kt(l, f(this, Ee) && f(this, Ee).parent);
|
|
750
750
|
}
|
|
751
|
-
n && b(this, Ae,
|
|
752
|
-
|
|
751
|
+
n && b(this, Ae, H(this, B, nr).call(this, () => {
|
|
752
|
+
He.ensure();
|
|
753
753
|
try {
|
|
754
754
|
return ve(() => {
|
|
755
755
|
var l = (
|
|
@@ -757,52 +757,52 @@ class Cs {
|
|
|
757
757
|
$
|
|
758
758
|
);
|
|
759
759
|
l.b = this, l.f |= Er, n(
|
|
760
|
-
|
|
760
|
+
f(this, se),
|
|
761
761
|
() => t,
|
|
762
762
|
() => o
|
|
763
763
|
);
|
|
764
764
|
});
|
|
765
765
|
} catch (l) {
|
|
766
|
-
return
|
|
766
|
+
return kt(
|
|
767
767
|
l,
|
|
768
768
|
/** @type {Effect} */
|
|
769
|
-
|
|
769
|
+
f(this, Ee).parent
|
|
770
770
|
), null;
|
|
771
771
|
}
|
|
772
772
|
}));
|
|
773
773
|
});
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
|
-
|
|
776
|
+
se = new WeakMap(), Yt = new WeakMap(), De = new WeakMap(), lt = new WeakMap(), Ee = new WeakMap(), Te = new WeakMap(), Q = new WeakMap(), Ae = new WeakMap(), Fe = new WeakMap(), at = new WeakMap(), Ye = new WeakMap(), xt = new WeakMap(), Et = new WeakMap(), Tt = new WeakMap(), Ie = new WeakMap(), fr = new WeakMap(), B = new WeakSet(), Un = function() {
|
|
777
777
|
try {
|
|
778
|
-
b(this, Te, ve(() =>
|
|
778
|
+
b(this, Te, ve(() => f(this, lt).call(this, f(this, se))));
|
|
779
779
|
} catch (t) {
|
|
780
780
|
this.error(t);
|
|
781
781
|
}
|
|
782
782
|
}, Yn = function() {
|
|
783
|
-
const t =
|
|
784
|
-
t && (this.is_pending = !0, b(this,
|
|
785
|
-
var r = b(this,
|
|
786
|
-
r.append(n), b(this, Te,
|
|
783
|
+
const t = f(this, De).pending;
|
|
784
|
+
t && (this.is_pending = !0, b(this, Q, ve(() => t(f(this, se)))), ut(() => {
|
|
785
|
+
var r = b(this, Fe, document.createDocumentFragment()), n = ae();
|
|
786
|
+
r.append(n), b(this, Te, H(this, B, nr).call(this, () => (He.ensure(), ve(() => f(this, lt).call(this, n))))), f(this, Ye) === 0 && (f(this, se).before(r), b(this, Fe, null), ct(
|
|
787
787
|
/** @type {Effect} */
|
|
788
|
-
|
|
788
|
+
f(this, Q),
|
|
789
789
|
() => {
|
|
790
|
-
b(this,
|
|
790
|
+
b(this, Q, null);
|
|
791
791
|
}
|
|
792
792
|
), this.is_pending = !1);
|
|
793
793
|
}));
|
|
794
|
-
},
|
|
794
|
+
}, Cr = function() {
|
|
795
795
|
try {
|
|
796
|
-
if (this.is_pending = this.has_pending_snippet(), b(this,
|
|
797
|
-
|
|
798
|
-
})),
|
|
799
|
-
var t = b(this,
|
|
800
|
-
di(
|
|
796
|
+
if (this.is_pending = this.has_pending_snippet(), b(this, Ye, 0), b(this, at, 0), b(this, Te, ve(() => {
|
|
797
|
+
f(this, lt).call(this, f(this, se));
|
|
798
|
+
})), f(this, Ye) > 0) {
|
|
799
|
+
var t = b(this, Fe, document.createDocumentFragment());
|
|
800
|
+
di(f(this, Te), t);
|
|
801
801
|
const r = (
|
|
802
802
|
/** @type {(anchor: Node) => void} */
|
|
803
|
-
|
|
803
|
+
f(this, De).pending
|
|
804
804
|
);
|
|
805
|
-
b(this,
|
|
805
|
+
b(this, Q, ve(() => r(f(this, se))));
|
|
806
806
|
} else
|
|
807
807
|
this.is_pending = !1;
|
|
808
808
|
} catch (r) {
|
|
@@ -813,14 +813,14 @@ ie = new WeakMap(), Yt = new WeakMap(), Oe = new WeakMap(), ot = new WeakMap(),
|
|
|
813
813
|
* @param {() => T} fn
|
|
814
814
|
*/
|
|
815
815
|
nr = function(t) {
|
|
816
|
-
var r = $, n = y, i =
|
|
817
|
-
|
|
816
|
+
var r = $, n = y, i = G;
|
|
817
|
+
ue(f(this, Ee)), K(f(this, Ee)), Ct(f(this, Ee).ctx);
|
|
818
818
|
try {
|
|
819
819
|
return t();
|
|
820
820
|
} catch (s) {
|
|
821
821
|
return Fn(s), null;
|
|
822
822
|
} finally {
|
|
823
|
-
|
|
823
|
+
ue(r), K(n), Ct(i);
|
|
824
824
|
}
|
|
825
825
|
}, /**
|
|
826
826
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -830,21 +830,21 @@ nr = function(t) {
|
|
|
830
830
|
kr = function(t) {
|
|
831
831
|
var r;
|
|
832
832
|
if (!this.has_pending_snippet()) {
|
|
833
|
-
this.parent &&
|
|
833
|
+
this.parent && H(r = this.parent, B, kr).call(r, t);
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
|
-
if (b(this,
|
|
836
|
+
if (b(this, Ye, f(this, Ye) + t), f(this, Ye) === 0) {
|
|
837
837
|
this.is_pending = !1;
|
|
838
|
-
for (const n of
|
|
839
|
-
L(n,
|
|
840
|
-
for (const n of
|
|
838
|
+
for (const n of f(this, Et))
|
|
839
|
+
L(n, F), ge(n);
|
|
840
|
+
for (const n of f(this, Tt))
|
|
841
841
|
L(n, we), ge(n);
|
|
842
|
-
|
|
843
|
-
b(this,
|
|
844
|
-
}),
|
|
842
|
+
f(this, Et).clear(), f(this, Tt).clear(), f(this, Q) && ct(f(this, Q), () => {
|
|
843
|
+
b(this, Q, null);
|
|
844
|
+
}), f(this, Fe) && (f(this, se).before(f(this, Fe)), b(this, Fe, null));
|
|
845
845
|
}
|
|
846
846
|
};
|
|
847
|
-
function
|
|
847
|
+
function ks(e, t, r, n) {
|
|
848
848
|
const i = _r;
|
|
849
849
|
var s = e.filter((h) => !h.settled);
|
|
850
850
|
if (r.length === 0 && s.length === 0) {
|
|
@@ -854,13 +854,13 @@ function Rs(e, t, r, n) {
|
|
|
854
854
|
var o = S, l = (
|
|
855
855
|
/** @type {Effect} */
|
|
856
856
|
$
|
|
857
|
-
),
|
|
857
|
+
), a = Ns(), u = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((h) => h.promise)) : null;
|
|
858
858
|
function c(h) {
|
|
859
|
-
|
|
859
|
+
a();
|
|
860
860
|
try {
|
|
861
861
|
n(h);
|
|
862
862
|
} catch (_) {
|
|
863
|
-
(l.f &
|
|
863
|
+
(l.f & Be) === 0 && kt(_, l);
|
|
864
864
|
}
|
|
865
865
|
o?.deactivate(), Nr();
|
|
866
866
|
}
|
|
@@ -868,28 +868,28 @@ function Rs(e, t, r, n) {
|
|
|
868
868
|
u.then(() => c(t.map(i)));
|
|
869
869
|
return;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
|
|
871
|
+
function p() {
|
|
872
|
+
a(), Promise.all(r.map((h) => /* @__PURE__ */ Ls(h))).then((h) => c([...t.map(i), ...h])).catch((h) => kt(h, l));
|
|
873
873
|
}
|
|
874
|
-
u ? u.then(
|
|
874
|
+
u ? u.then(p) : p();
|
|
875
875
|
}
|
|
876
|
-
function
|
|
877
|
-
var e = $, t = y, r =
|
|
876
|
+
function Ns() {
|
|
877
|
+
var e = $, t = y, r = G, n = S;
|
|
878
878
|
return function(s = !0) {
|
|
879
|
-
|
|
879
|
+
ue(e), K(t), Ct(r), s && n?.activate();
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
882
|
function Nr() {
|
|
883
|
-
|
|
883
|
+
ue(null), K(null), Ct(null);
|
|
884
884
|
}
|
|
885
885
|
// @__NO_SIDE_EFFECTS__
|
|
886
886
|
function _r(e) {
|
|
887
|
-
var t =
|
|
887
|
+
var t = D | F, r = y !== null && (y.f & D) !== 0 ? (
|
|
888
888
|
/** @type {Derived} */
|
|
889
889
|
y
|
|
890
890
|
) : null;
|
|
891
|
-
return $ !== null && ($.f |=
|
|
892
|
-
ctx:
|
|
891
|
+
return $ !== null && ($.f |= _t), {
|
|
892
|
+
ctx: G,
|
|
893
893
|
deps: null,
|
|
894
894
|
effects: null,
|
|
895
895
|
equals: Nn,
|
|
@@ -899,7 +899,7 @@ function _r(e) {
|
|
|
899
899
|
rv: 0,
|
|
900
900
|
v: (
|
|
901
901
|
/** @type {V} */
|
|
902
|
-
|
|
902
|
+
P
|
|
903
903
|
),
|
|
904
904
|
wv: 0,
|
|
905
905
|
parent: r ?? $,
|
|
@@ -907,12 +907,12 @@ function _r(e) {
|
|
|
907
907
|
};
|
|
908
908
|
}
|
|
909
909
|
// @__NO_SIDE_EFFECTS__
|
|
910
|
-
function
|
|
910
|
+
function Ls(e, t, r) {
|
|
911
911
|
let n = (
|
|
912
912
|
/** @type {Effect | null} */
|
|
913
913
|
$
|
|
914
914
|
);
|
|
915
|
-
n === null &&
|
|
915
|
+
n === null && as();
|
|
916
916
|
var i = (
|
|
917
917
|
/** @type {Boundary} */
|
|
918
918
|
n.b
|
|
@@ -920,11 +920,11 @@ function Ns(e, t, r) {
|
|
|
920
920
|
/** @type {Promise<V>} */
|
|
921
921
|
/** @type {unknown} */
|
|
922
922
|
void 0
|
|
923
|
-
), o =
|
|
923
|
+
), o = pt(
|
|
924
924
|
/** @type {V} */
|
|
925
|
-
|
|
926
|
-
), l = !y,
|
|
927
|
-
return
|
|
925
|
+
P
|
|
926
|
+
), l = !y, a = /* @__PURE__ */ new Map();
|
|
927
|
+
return js(() => {
|
|
928
928
|
var u = An();
|
|
929
929
|
s = u.promise;
|
|
930
930
|
try {
|
|
@@ -939,46 +939,46 @@ function Ns(e, t, r) {
|
|
|
939
939
|
S
|
|
940
940
|
);
|
|
941
941
|
if (l) {
|
|
942
|
-
var
|
|
943
|
-
i.update_pending_count(1), c.increment(
|
|
942
|
+
var p = i.is_rendered();
|
|
943
|
+
i.update_pending_count(1), c.increment(p), a.get(c)?.reject(tt), a.delete(c), a.set(c, u);
|
|
944
944
|
}
|
|
945
945
|
const h = (_, d = void 0) => {
|
|
946
946
|
if (c.activate(), d)
|
|
947
|
-
d !==
|
|
947
|
+
d !== tt && (o.f |= Ge, Nt(o, d));
|
|
948
948
|
else {
|
|
949
|
-
(o.f &
|
|
950
|
-
for (const [T, g] of
|
|
951
|
-
if (
|
|
952
|
-
g.reject(
|
|
949
|
+
(o.f & Ge) !== 0 && (o.f ^= Ge), Nt(o, _);
|
|
950
|
+
for (const [T, g] of a) {
|
|
951
|
+
if (a.delete(T), T === c) break;
|
|
952
|
+
g.reject(tt);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
l && (i.update_pending_count(-1), c.decrement(
|
|
955
|
+
l && (i.update_pending_count(-1), c.decrement(p));
|
|
956
956
|
};
|
|
957
957
|
u.promise.then(h, (_) => h(null, _ || "unknown"));
|
|
958
|
-
}),
|
|
959
|
-
for (const u of
|
|
960
|
-
u.reject(
|
|
958
|
+
}), Bs(() => {
|
|
959
|
+
for (const u of a.values())
|
|
960
|
+
u.reject(tt);
|
|
961
961
|
}), new Promise((u) => {
|
|
962
|
-
function c(
|
|
962
|
+
function c(p) {
|
|
963
963
|
function h() {
|
|
964
|
-
|
|
964
|
+
p === s ? u(o) : c(s);
|
|
965
965
|
}
|
|
966
|
-
|
|
966
|
+
p.then(h, h);
|
|
967
967
|
}
|
|
968
968
|
c(s);
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
// @__NO_SIDE_EFFECTS__
|
|
972
|
-
function
|
|
972
|
+
function Le(e) {
|
|
973
973
|
const t = /* @__PURE__ */ _r(e);
|
|
974
974
|
return hi(t), t;
|
|
975
975
|
}
|
|
976
976
|
// @__NO_SIDE_EFFECTS__
|
|
977
|
-
function
|
|
977
|
+
function Ms(e) {
|
|
978
978
|
const t = /* @__PURE__ */ _r(e);
|
|
979
979
|
return t.equals = Ln, t;
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Os(e) {
|
|
982
982
|
var t = e.effects;
|
|
983
983
|
if (t !== null) {
|
|
984
984
|
e.effects = null;
|
|
@@ -989,10 +989,10 @@ function Ms(e) {
|
|
|
989
989
|
);
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Ps(e) {
|
|
993
993
|
for (var t = e.parent; t !== null; ) {
|
|
994
|
-
if ((t.f &
|
|
995
|
-
return (t.f &
|
|
994
|
+
if ((t.f & D) === 0)
|
|
995
|
+
return (t.f & Be) === 0 ? (
|
|
996
996
|
/** @type {Effect} */
|
|
997
997
|
t
|
|
998
998
|
) : null;
|
|
@@ -1002,11 +1002,11 @@ function Os(e) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
function Zr(e) {
|
|
1004
1004
|
var t, r = $;
|
|
1005
|
-
|
|
1005
|
+
ue(Ps(e));
|
|
1006
1006
|
try {
|
|
1007
|
-
e.f &= ~
|
|
1007
|
+
e.f &= ~vt, Os(e), t = gi(e);
|
|
1008
1008
|
} finally {
|
|
1009
|
-
|
|
1009
|
+
ue(r);
|
|
1010
1010
|
}
|
|
1011
1011
|
return t;
|
|
1012
1012
|
}
|
|
@@ -1016,22 +1016,22 @@ function zn(e) {
|
|
|
1016
1016
|
L(e, O);
|
|
1017
1017
|
return;
|
|
1018
1018
|
}
|
|
1019
|
-
|
|
1019
|
+
Xe || (pe !== null ? (Ur() || S?.is_fork) && pe.set(e, t) : Hr(e));
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function Ds(e) {
|
|
1022
1022
|
if (e.effects !== null)
|
|
1023
1023
|
for (const t of e.effects)
|
|
1024
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
1024
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(tt), t.teardown = rs, t.ac = null, jt(t, 0), Gr(t));
|
|
1025
1025
|
}
|
|
1026
1026
|
function Gn(e) {
|
|
1027
1027
|
if (e.effects !== null)
|
|
1028
1028
|
for (const t of e.effects)
|
|
1029
|
-
t.teardown &&
|
|
1029
|
+
t.teardown && Lt(t);
|
|
1030
1030
|
}
|
|
1031
1031
|
let Lr = /* @__PURE__ */ new Set();
|
|
1032
|
-
const
|
|
1032
|
+
const Ke = /* @__PURE__ */ new Map();
|
|
1033
1033
|
let Kn = !1;
|
|
1034
|
-
function
|
|
1034
|
+
function pt(e, t) {
|
|
1035
1035
|
var r = {
|
|
1036
1036
|
f: 0,
|
|
1037
1037
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
@@ -1045,58 +1045,58 @@ function vt(e, t) {
|
|
|
1045
1045
|
}
|
|
1046
1046
|
// @__NO_SIDE_EFFECTS__
|
|
1047
1047
|
function N(e, t) {
|
|
1048
|
-
const r =
|
|
1048
|
+
const r = pt(e);
|
|
1049
1049
|
return hi(r), r;
|
|
1050
1050
|
}
|
|
1051
1051
|
// @__NO_SIDE_EFFECTS__
|
|
1052
1052
|
function Wn(e, t = !1, r = !0) {
|
|
1053
|
-
const n =
|
|
1053
|
+
const n = pt(e);
|
|
1054
1054
|
return t || (n.equals = Ln), n;
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function R(e, t, r = !1) {
|
|
1057
1057
|
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1058
1058
|
// to ensure we error if state is set inside an inspect effect
|
|
1059
|
-
(!me || (y.f & un) !== 0) && Pn() && (y.f & (
|
|
1059
|
+
(!me || (y.f & un) !== 0) && Pn() && (y.f & (D | Ze | Br | un)) !== 0 && (fe === null || !At.call(fe, e)) && gs();
|
|
1060
1060
|
let n = r ? Ft(t) : t;
|
|
1061
|
-
return
|
|
1061
|
+
return Nt(e, n);
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Nt(e, t) {
|
|
1064
1064
|
if (!e.equals(t)) {
|
|
1065
1065
|
var r = e.v;
|
|
1066
|
-
|
|
1067
|
-
var n =
|
|
1068
|
-
if (n.capture(e, r), (e.f &
|
|
1066
|
+
Xe ? Ke.set(e, t) : Ke.set(e, r), e.v = t;
|
|
1067
|
+
var n = He.ensure();
|
|
1068
|
+
if (n.capture(e, r), (e.f & D) !== 0) {
|
|
1069
1069
|
const i = (
|
|
1070
1070
|
/** @type {Derived} */
|
|
1071
1071
|
e
|
|
1072
1072
|
);
|
|
1073
|
-
(e.f &
|
|
1073
|
+
(e.f & F) !== 0 && Zr(i), Hr(i);
|
|
1074
1074
|
}
|
|
1075
|
-
e.wv = pi(), Xn(e,
|
|
1075
|
+
e.wv = pi(), Xn(e, F), $ !== null && ($.f & O) !== 0 && ($.f & (ye | Je)) === 0 && (ie === null ? Us([e]) : ie.push(e)), !n.is_fork && Lr.size > 0 && !Kn && Fs();
|
|
1076
1076
|
}
|
|
1077
1077
|
return t;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function Fs() {
|
|
1080
1080
|
Kn = !1;
|
|
1081
1081
|
for (const e of Lr)
|
|
1082
|
-
(e.f & O) !== 0 && L(e, we), Wt(e) &&
|
|
1082
|
+
(e.f & O) !== 0 && L(e, we), Wt(e) && Lt(e);
|
|
1083
1083
|
Lr.clear();
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
|
|
1085
|
+
function Ht(e) {
|
|
1086
|
+
R(e, e.v + 1);
|
|
1087
1087
|
}
|
|
1088
1088
|
function Xn(e, t) {
|
|
1089
1089
|
var r = e.reactions;
|
|
1090
1090
|
if (r !== null)
|
|
1091
1091
|
for (var n = r.length, i = 0; i < n; i++) {
|
|
1092
|
-
var s = r[i], o = s.f, l = (o &
|
|
1093
|
-
if (l && L(s, t), (o &
|
|
1094
|
-
var
|
|
1092
|
+
var s = r[i], o = s.f, l = (o & F) === 0;
|
|
1093
|
+
if (l && L(s, t), (o & D) !== 0) {
|
|
1094
|
+
var a = (
|
|
1095
1095
|
/** @type {Derived} */
|
|
1096
1096
|
s
|
|
1097
1097
|
);
|
|
1098
|
-
pe?.delete(
|
|
1099
|
-
} else l && ((o &
|
|
1098
|
+
pe?.delete(a), (o & vt) === 0 && (o & le && (s.f |= vt), Xn(a, we));
|
|
1099
|
+
} else l && ((o & Ze) !== 0 && Oe !== null && Oe.add(
|
|
1100
1100
|
/** @type {Effect} */
|
|
1101
1101
|
s
|
|
1102
1102
|
), ge(
|
|
@@ -1109,15 +1109,15 @@ function Ft(e) {
|
|
|
1109
1109
|
if (typeof e != "object" || e === null || rr in e)
|
|
1110
1110
|
return e;
|
|
1111
1111
|
const t = Tn(e);
|
|
1112
|
-
if (t !==
|
|
1112
|
+
if (t !== es && t !== ts)
|
|
1113
1113
|
return e;
|
|
1114
|
-
var r = /* @__PURE__ */ new Map(), n = En(e), i = /* @__PURE__ */ N(0), s =
|
|
1115
|
-
if (
|
|
1114
|
+
var r = /* @__PURE__ */ new Map(), n = En(e), i = /* @__PURE__ */ N(0), s = dt, o = (l) => {
|
|
1115
|
+
if (dt === s)
|
|
1116
1116
|
return l();
|
|
1117
|
-
var
|
|
1118
|
-
|
|
1117
|
+
var a = y, u = dt;
|
|
1118
|
+
K(null), vn(s);
|
|
1119
1119
|
var c = l();
|
|
1120
|
-
return
|
|
1120
|
+
return K(a), vn(u), c;
|
|
1121
1121
|
};
|
|
1122
1122
|
return n && r.set("length", /* @__PURE__ */ N(
|
|
1123
1123
|
/** @type {any[]} */
|
|
@@ -1126,46 +1126,46 @@ function Ft(e) {
|
|
|
1126
1126
|
/** @type {any} */
|
|
1127
1127
|
e,
|
|
1128
1128
|
{
|
|
1129
|
-
defineProperty(l,
|
|
1130
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
1131
|
-
var c = r.get(
|
|
1129
|
+
defineProperty(l, a, u) {
|
|
1130
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && ps();
|
|
1131
|
+
var c = r.get(a);
|
|
1132
1132
|
return c === void 0 ? o(() => {
|
|
1133
|
-
var
|
|
1134
|
-
return r.set(
|
|
1135
|
-
}) :
|
|
1133
|
+
var p = /* @__PURE__ */ N(u.value);
|
|
1134
|
+
return r.set(a, p), p;
|
|
1135
|
+
}) : R(c, u.value, !0), !0;
|
|
1136
1136
|
},
|
|
1137
|
-
deleteProperty(l,
|
|
1138
|
-
var u = r.get(
|
|
1137
|
+
deleteProperty(l, a) {
|
|
1138
|
+
var u = r.get(a);
|
|
1139
1139
|
if (u === void 0) {
|
|
1140
|
-
if (
|
|
1141
|
-
const c = o(() => /* @__PURE__ */ N(
|
|
1142
|
-
r.set(
|
|
1140
|
+
if (a in l) {
|
|
1141
|
+
const c = o(() => /* @__PURE__ */ N(P));
|
|
1142
|
+
r.set(a, c), Ht(i);
|
|
1143
1143
|
}
|
|
1144
1144
|
} else
|
|
1145
|
-
|
|
1145
|
+
R(u, P), Ht(i);
|
|
1146
1146
|
return !0;
|
|
1147
1147
|
},
|
|
1148
|
-
get(l,
|
|
1149
|
-
if (
|
|
1148
|
+
get(l, a, u) {
|
|
1149
|
+
if (a === rr)
|
|
1150
1150
|
return e;
|
|
1151
|
-
var c = r.get(
|
|
1152
|
-
if (c === void 0 && (!
|
|
1153
|
-
var _ = Ft(
|
|
1151
|
+
var c = r.get(a), p = a in l;
|
|
1152
|
+
if (c === void 0 && (!p || bt(l, a)?.writable) && (c = o(() => {
|
|
1153
|
+
var _ = Ft(p ? l[a] : P), d = /* @__PURE__ */ N(_);
|
|
1154
1154
|
return d;
|
|
1155
|
-
}), r.set(
|
|
1156
|
-
var h =
|
|
1157
|
-
return h ===
|
|
1155
|
+
}), r.set(a, c)), c !== void 0) {
|
|
1156
|
+
var h = v(c);
|
|
1157
|
+
return h === P ? void 0 : h;
|
|
1158
1158
|
}
|
|
1159
|
-
return Reflect.get(l,
|
|
1159
|
+
return Reflect.get(l, a, u);
|
|
1160
1160
|
},
|
|
1161
|
-
getOwnPropertyDescriptor(l,
|
|
1162
|
-
var u = Reflect.getOwnPropertyDescriptor(l,
|
|
1161
|
+
getOwnPropertyDescriptor(l, a) {
|
|
1162
|
+
var u = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1163
1163
|
if (u && "value" in u) {
|
|
1164
|
-
var c = r.get(
|
|
1165
|
-
c && (u.value =
|
|
1164
|
+
var c = r.get(a);
|
|
1165
|
+
c && (u.value = v(c));
|
|
1166
1166
|
} else if (u === void 0) {
|
|
1167
|
-
var
|
|
1168
|
-
if (
|
|
1167
|
+
var p = r.get(a), h = p?.v;
|
|
1168
|
+
if (p !== void 0 && h !== P)
|
|
1169
1169
|
return {
|
|
1170
1170
|
enumerable: !0,
|
|
1171
1171
|
configurable: !0,
|
|
@@ -1175,61 +1175,61 @@ function Ft(e) {
|
|
|
1175
1175
|
}
|
|
1176
1176
|
return u;
|
|
1177
1177
|
},
|
|
1178
|
-
has(l,
|
|
1179
|
-
if (
|
|
1178
|
+
has(l, a) {
|
|
1179
|
+
if (a === rr)
|
|
1180
1180
|
return !0;
|
|
1181
|
-
var u = r.get(
|
|
1182
|
-
if (u !== void 0 || $ !== null && (!c ||
|
|
1181
|
+
var u = r.get(a), c = u !== void 0 && u.v !== P || Reflect.has(l, a);
|
|
1182
|
+
if (u !== void 0 || $ !== null && (!c || bt(l, a)?.writable)) {
|
|
1183
1183
|
u === void 0 && (u = o(() => {
|
|
1184
|
-
var h = c ? Ft(l[
|
|
1184
|
+
var h = c ? Ft(l[a]) : P, _ = /* @__PURE__ */ N(h);
|
|
1185
1185
|
return _;
|
|
1186
|
-
}), r.set(
|
|
1187
|
-
var
|
|
1188
|
-
if (
|
|
1186
|
+
}), r.set(a, u));
|
|
1187
|
+
var p = v(u);
|
|
1188
|
+
if (p === P)
|
|
1189
1189
|
return !1;
|
|
1190
1190
|
}
|
|
1191
1191
|
return c;
|
|
1192
1192
|
},
|
|
1193
|
-
set(l,
|
|
1194
|
-
var
|
|
1195
|
-
if (n &&
|
|
1193
|
+
set(l, a, u, c) {
|
|
1194
|
+
var p = r.get(a), h = a in l;
|
|
1195
|
+
if (n && a === "length")
|
|
1196
1196
|
for (var _ = u; _ < /** @type {Source<number>} */
|
|
1197
|
-
|
|
1197
|
+
p.v; _ += 1) {
|
|
1198
1198
|
var d = r.get(_ + "");
|
|
1199
|
-
d !== void 0 ?
|
|
1199
|
+
d !== void 0 ? R(d, P) : _ in l && (d = o(() => /* @__PURE__ */ N(P)), r.set(_ + "", d));
|
|
1200
1200
|
}
|
|
1201
|
-
if (
|
|
1202
|
-
(!h ||
|
|
1201
|
+
if (p === void 0)
|
|
1202
|
+
(!h || bt(l, a)?.writable) && (p = o(() => /* @__PURE__ */ N(void 0)), R(p, Ft(u)), r.set(a, p));
|
|
1203
1203
|
else {
|
|
1204
|
-
h =
|
|
1204
|
+
h = p.v !== P;
|
|
1205
1205
|
var T = o(() => Ft(u));
|
|
1206
|
-
|
|
1206
|
+
R(p, T);
|
|
1207
1207
|
}
|
|
1208
|
-
var g = Reflect.getOwnPropertyDescriptor(l,
|
|
1208
|
+
var g = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1209
1209
|
if (g?.set && g.set.call(c, u), !h) {
|
|
1210
|
-
if (n && typeof
|
|
1211
|
-
var
|
|
1210
|
+
if (n && typeof a == "string") {
|
|
1211
|
+
var I = (
|
|
1212
1212
|
/** @type {Source<number>} */
|
|
1213
1213
|
r.get("length")
|
|
1214
|
-
),
|
|
1215
|
-
Number.isInteger(
|
|
1214
|
+
), C = Number(a);
|
|
1215
|
+
Number.isInteger(C) && C >= I.v && R(I, C + 1);
|
|
1216
1216
|
}
|
|
1217
|
-
|
|
1217
|
+
Ht(i);
|
|
1218
1218
|
}
|
|
1219
1219
|
return !0;
|
|
1220
1220
|
},
|
|
1221
1221
|
ownKeys(l) {
|
|
1222
|
-
|
|
1223
|
-
var
|
|
1224
|
-
var h = r.get(
|
|
1225
|
-
return h === void 0 || h.v !==
|
|
1222
|
+
v(i);
|
|
1223
|
+
var a = Reflect.ownKeys(l).filter((p) => {
|
|
1224
|
+
var h = r.get(p);
|
|
1225
|
+
return h === void 0 || h.v !== P;
|
|
1226
1226
|
});
|
|
1227
1227
|
for (var [u, c] of r)
|
|
1228
|
-
c.v !==
|
|
1229
|
-
return
|
|
1228
|
+
c.v !== P && !(u in l) && a.push(u);
|
|
1229
|
+
return a;
|
|
1230
1230
|
},
|
|
1231
1231
|
setPrototypeOf() {
|
|
1232
|
-
|
|
1232
|
+
_s();
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
1235
|
);
|
|
@@ -1239,10 +1239,10 @@ function Mr() {
|
|
|
1239
1239
|
if (dn === void 0) {
|
|
1240
1240
|
dn = window, Jn = /Firefox/.test(navigator.userAgent);
|
|
1241
1241
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
1242
|
-
Qn =
|
|
1242
|
+
Qn = bt(t, "firstChild").get, ei = bt(t, "nextSibling").get, fn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), fn(r) && (r.__t = void 0);
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
|
-
function
|
|
1245
|
+
function ae(e = "") {
|
|
1246
1246
|
return document.createTextNode(e);
|
|
1247
1247
|
}
|
|
1248
1248
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1264,9 +1264,9 @@ function yr(e, t) {
|
|
|
1264
1264
|
return /* @__PURE__ */ be(e);
|
|
1265
1265
|
var r = /* @__PURE__ */ be(E);
|
|
1266
1266
|
if (r === null)
|
|
1267
|
-
r = E.appendChild(
|
|
1267
|
+
r = E.appendChild(ae());
|
|
1268
1268
|
else if (t && r.nodeType !== vr) {
|
|
1269
|
-
var n =
|
|
1269
|
+
var n = ae();
|
|
1270
1270
|
return r?.before(n), Z(n), n;
|
|
1271
1271
|
}
|
|
1272
1272
|
return t && qr(
|
|
@@ -1281,7 +1281,7 @@ function $r(e, t = !1) {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
if (t) {
|
|
1283
1283
|
if (E?.nodeType !== vr) {
|
|
1284
|
-
var n =
|
|
1284
|
+
var n = ae();
|
|
1285
1285
|
return E?.before(n), Z(n), n;
|
|
1286
1286
|
}
|
|
1287
1287
|
qr(
|
|
@@ -1291,7 +1291,7 @@ function $r(e, t = !1) {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
return E;
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function et(e, t = 1, r = !1) {
|
|
1295
1295
|
let n = x ? E : e;
|
|
1296
1296
|
for (var i; t--; )
|
|
1297
1297
|
i = n, n = /** @type {TemplateNode} */
|
|
@@ -1300,7 +1300,7 @@ function Qe(e, t = 1, r = !1) {
|
|
|
1300
1300
|
return n;
|
|
1301
1301
|
if (r) {
|
|
1302
1302
|
if (n?.nodeType !== vr) {
|
|
1303
|
-
var s =
|
|
1303
|
+
var s = ae();
|
|
1304
1304
|
return n === null ? i?.after(s) : n.before(s), Z(s), s;
|
|
1305
1305
|
}
|
|
1306
1306
|
qr(
|
|
@@ -1335,28 +1335,28 @@ function qr(e) {
|
|
|
1335
1335
|
}
|
|
1336
1336
|
function ni(e) {
|
|
1337
1337
|
var t = y, r = $;
|
|
1338
|
-
|
|
1338
|
+
K(null), ue(null);
|
|
1339
1339
|
try {
|
|
1340
1340
|
return e();
|
|
1341
1341
|
} finally {
|
|
1342
|
-
|
|
1342
|
+
K(t), ue(r);
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1346
|
-
$ === null && (y === null &&
|
|
1345
|
+
function Is(e) {
|
|
1346
|
+
$ === null && (y === null && ds(), cs()), Xe && us();
|
|
1347
1347
|
}
|
|
1348
|
-
function
|
|
1348
|
+
function Vs(e, t) {
|
|
1349
1349
|
var r = t.last;
|
|
1350
1350
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1352
|
+
function Ce(e, t, r) {
|
|
1353
1353
|
var n = $;
|
|
1354
|
-
n !== null && (n.f &
|
|
1354
|
+
n !== null && (n.f & te) !== 0 && (e |= te);
|
|
1355
1355
|
var i = {
|
|
1356
|
-
ctx:
|
|
1356
|
+
ctx: G,
|
|
1357
1357
|
deps: null,
|
|
1358
1358
|
nodes: null,
|
|
1359
|
-
f: e |
|
|
1359
|
+
f: e | F | le,
|
|
1360
1360
|
first: null,
|
|
1361
1361
|
fn: t,
|
|
1362
1362
|
last: null,
|
|
@@ -1370,14 +1370,14 @@ function Re(e, t, r) {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
if (r)
|
|
1372
1372
|
try {
|
|
1373
|
-
|
|
1373
|
+
Lt(i);
|
|
1374
1374
|
} catch (l) {
|
|
1375
1375
|
throw j(i), l;
|
|
1376
1376
|
}
|
|
1377
1377
|
else t !== null && ge(i);
|
|
1378
1378
|
var s = i;
|
|
1379
1379
|
if (r && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1380
|
-
(s.f &
|
|
1380
|
+
(s.f & _t) === 0 && (s = s.first, (e & Ze) !== 0 && (e & St) !== 0 && s !== null && (s.f |= St)), s !== null && (s.parent = n, n !== null && Vs(s, n), y !== null && (y.f & D) !== 0 && (e & Je) === 0)) {
|
|
1381
1381
|
var o = (
|
|
1382
1382
|
/** @type {Derived} */
|
|
1383
1383
|
y
|
|
@@ -1389,74 +1389,74 @@ function Re(e, t, r) {
|
|
|
1389
1389
|
function Ur() {
|
|
1390
1390
|
return y !== null && !me;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1393
|
-
const t =
|
|
1392
|
+
function Bs(e) {
|
|
1393
|
+
const t = Ce(hr, null, !1);
|
|
1394
1394
|
return L(t, O), t.teardown = e, t;
|
|
1395
1395
|
}
|
|
1396
1396
|
function ii(e) {
|
|
1397
|
-
|
|
1397
|
+
Is();
|
|
1398
1398
|
var t = (
|
|
1399
1399
|
/** @type {Effect} */
|
|
1400
1400
|
$.f
|
|
1401
|
-
), r = !y && (t & ye) !== 0 && (t &
|
|
1401
|
+
), r = !y && (t & ye) !== 0 && (t & Mt) === 0;
|
|
1402
1402
|
if (r) {
|
|
1403
1403
|
var n = (
|
|
1404
1404
|
/** @type {ComponentContext} */
|
|
1405
|
-
|
|
1405
|
+
G
|
|
1406
1406
|
);
|
|
1407
1407
|
(n.e ?? (n.e = [])).push(e);
|
|
1408
1408
|
} else
|
|
1409
1409
|
return si(e);
|
|
1410
1410
|
}
|
|
1411
1411
|
function si(e) {
|
|
1412
|
-
return
|
|
1412
|
+
return Ce(Zt | is, e, !1);
|
|
1413
1413
|
}
|
|
1414
1414
|
function Hs(e) {
|
|
1415
|
-
|
|
1416
|
-
const t =
|
|
1415
|
+
He.ensure();
|
|
1416
|
+
const t = Ce(Je | _t, e, !0);
|
|
1417
1417
|
return () => {
|
|
1418
1418
|
j(t);
|
|
1419
1419
|
};
|
|
1420
1420
|
}
|
|
1421
|
-
function
|
|
1422
|
-
|
|
1423
|
-
const t =
|
|
1421
|
+
function Zs(e) {
|
|
1422
|
+
He.ensure();
|
|
1423
|
+
const t = Ce(Je | _t, e, !0);
|
|
1424
1424
|
return (r = {}) => new Promise((n) => {
|
|
1425
|
-
r.outro ?
|
|
1425
|
+
r.outro ? ct(t, () => {
|
|
1426
1426
|
j(t), n(void 0);
|
|
1427
1427
|
}) : (j(t), n(void 0));
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
function oi(e) {
|
|
1431
|
-
return
|
|
1431
|
+
return Ce(Zt, e, !1);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
return
|
|
1433
|
+
function js(e) {
|
|
1434
|
+
return Ce(Br | _t, e, !0);
|
|
1435
1435
|
}
|
|
1436
1436
|
function Yr(e, t = 0) {
|
|
1437
|
-
return
|
|
1437
|
+
return Ce(hr | t, e, !0);
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
|
|
1441
|
-
|
|
1439
|
+
function Me(e, t = [], r = [], n = []) {
|
|
1440
|
+
ks(n, t, r, (i) => {
|
|
1441
|
+
Ce(hr, () => e(...i.map(v)), !0);
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
1444
|
function zr(e, t = 0) {
|
|
1445
|
-
var r =
|
|
1445
|
+
var r = Ce(Ze | t, e, !0);
|
|
1446
1446
|
return r;
|
|
1447
1447
|
}
|
|
1448
1448
|
function ve(e) {
|
|
1449
|
-
return
|
|
1449
|
+
return Ce(ye | _t, e, !0);
|
|
1450
1450
|
}
|
|
1451
1451
|
function li(e) {
|
|
1452
1452
|
var t = e.teardown;
|
|
1453
1453
|
if (t !== null) {
|
|
1454
|
-
const r =
|
|
1455
|
-
hn(!0),
|
|
1454
|
+
const r = Xe, n = y;
|
|
1455
|
+
hn(!0), K(null);
|
|
1456
1456
|
try {
|
|
1457
1457
|
t.call(null);
|
|
1458
1458
|
} finally {
|
|
1459
|
-
hn(r),
|
|
1459
|
+
hn(r), K(n);
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
@@ -1465,13 +1465,13 @@ function Gr(e, t = !1) {
|
|
|
1465
1465
|
for (e.first = e.last = null; r !== null; ) {
|
|
1466
1466
|
const i = r.ac;
|
|
1467
1467
|
i !== null && ni(() => {
|
|
1468
|
-
i.abort(
|
|
1468
|
+
i.abort(tt);
|
|
1469
1469
|
});
|
|
1470
1470
|
var n = r.next;
|
|
1471
|
-
(r.f &
|
|
1471
|
+
(r.f & Je) !== 0 ? r.parent = null : j(r, t), r = n;
|
|
1472
1472
|
}
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function qs(e) {
|
|
1475
1475
|
for (var t = e.first; t !== null; ) {
|
|
1476
1476
|
var r = t.next;
|
|
1477
1477
|
(t.f & ye) === 0 && j(t), t = r;
|
|
@@ -1479,30 +1479,30 @@ function js(e) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
function j(e, t = !0) {
|
|
1481
1481
|
var r = !1;
|
|
1482
|
-
(t || (e.f &
|
|
1482
|
+
(t || (e.f & Rn) !== 0) && e.nodes !== null && e.nodes.end !== null && (ai(
|
|
1483
1483
|
e.nodes.start,
|
|
1484
1484
|
/** @type {TemplateNode} */
|
|
1485
1485
|
e.nodes.end
|
|
1486
|
-
), r = !0), Gr(e, t && !r), jt(e, 0), L(e,
|
|
1486
|
+
), r = !0), Gr(e, t && !r), jt(e, 0), L(e, Be);
|
|
1487
1487
|
var n = e.nodes && e.nodes.t;
|
|
1488
1488
|
if (n !== null)
|
|
1489
1489
|
for (const s of n)
|
|
1490
1490
|
s.stop();
|
|
1491
1491
|
li(e);
|
|
1492
1492
|
var i = e.parent;
|
|
1493
|
-
i !== null && i.first !== null &&
|
|
1493
|
+
i !== null && i.first !== null && fi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function ai(e, t) {
|
|
1496
1496
|
for (; e !== null; ) {
|
|
1497
1497
|
var r = e === t ? null : /* @__PURE__ */ $e(e);
|
|
1498
1498
|
e.remove(), e = r;
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function fi(e) {
|
|
1502
1502
|
var t = e.parent, r = e.prev, n = e.next;
|
|
1503
1503
|
r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function ct(e, t, r = !0) {
|
|
1506
1506
|
var n = [];
|
|
1507
1507
|
ui(e, n, !0);
|
|
1508
1508
|
var i = () => {
|
|
@@ -1516,17 +1516,17 @@ function ut(e, t, r = !0) {
|
|
|
1516
1516
|
i();
|
|
1517
1517
|
}
|
|
1518
1518
|
function ui(e, t, r) {
|
|
1519
|
-
if ((e.f &
|
|
1520
|
-
e.f ^=
|
|
1519
|
+
if ((e.f & te) === 0) {
|
|
1520
|
+
e.f ^= te;
|
|
1521
1521
|
var n = e.nodes && e.nodes.t;
|
|
1522
1522
|
if (n !== null)
|
|
1523
1523
|
for (const l of n)
|
|
1524
1524
|
(l.is_global || r) && t.push(l);
|
|
1525
1525
|
for (var i = e.first; i !== null; ) {
|
|
1526
|
-
var s = i.next, o = (i.f &
|
|
1526
|
+
var s = i.next, o = (i.f & St) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1527
1527
|
// it means the parent block effect was pruned. In that case,
|
|
1528
1528
|
// transparency information was transferred to the branch effect.
|
|
1529
|
-
(i.f & ye) !== 0 && (e.f &
|
|
1529
|
+
(i.f & ye) !== 0 && (e.f & Ze) !== 0;
|
|
1530
1530
|
ui(i, t, o ? r : !1), i = s;
|
|
1531
1531
|
}
|
|
1532
1532
|
}
|
|
@@ -1535,10 +1535,10 @@ function Kr(e) {
|
|
|
1535
1535
|
ci(e, !0);
|
|
1536
1536
|
}
|
|
1537
1537
|
function ci(e, t) {
|
|
1538
|
-
if ((e.f &
|
|
1539
|
-
e.f ^=
|
|
1538
|
+
if ((e.f & te) !== 0) {
|
|
1539
|
+
e.f ^= te, (e.f & O) === 0 && (L(e, F), ge(e));
|
|
1540
1540
|
for (var r = e.first; r !== null; ) {
|
|
1541
|
-
var n = r.next, i = (r.f &
|
|
1541
|
+
var n = r.next, i = (r.f & St) !== 0 || (r.f & ye) !== 0;
|
|
1542
1542
|
ci(r, i ? t : !1), r = n;
|
|
1543
1543
|
}
|
|
1544
1544
|
var s = e.nodes && e.nodes.t;
|
|
@@ -1554,38 +1554,38 @@ function di(e, t) {
|
|
|
1554
1554
|
t.append(r), r = i;
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
|
-
let ir = !1,
|
|
1557
|
+
let ir = !1, Xe = !1;
|
|
1558
1558
|
function hn(e) {
|
|
1559
|
-
|
|
1559
|
+
Xe = e;
|
|
1560
1560
|
}
|
|
1561
1561
|
let y = null, me = !1;
|
|
1562
|
-
function
|
|
1562
|
+
function K(e) {
|
|
1563
1563
|
y = e;
|
|
1564
1564
|
}
|
|
1565
1565
|
let $ = null;
|
|
1566
|
-
function
|
|
1566
|
+
function ue(e) {
|
|
1567
1567
|
$ = e;
|
|
1568
1568
|
}
|
|
1569
1569
|
let fe = null;
|
|
1570
1570
|
function hi(e) {
|
|
1571
1571
|
y !== null && (fe === null ? fe = [e] : fe.push(e));
|
|
1572
1572
|
}
|
|
1573
|
-
let
|
|
1574
|
-
function
|
|
1575
|
-
|
|
1573
|
+
let z = null, J = 0, ie = null;
|
|
1574
|
+
function Us(e) {
|
|
1575
|
+
ie = e;
|
|
1576
1576
|
}
|
|
1577
|
-
let vi = 1,
|
|
1577
|
+
let vi = 1, nt = 0, dt = nt;
|
|
1578
1578
|
function vn(e) {
|
|
1579
|
-
|
|
1579
|
+
dt = e;
|
|
1580
1580
|
}
|
|
1581
1581
|
function pi() {
|
|
1582
1582
|
return ++vi;
|
|
1583
1583
|
}
|
|
1584
1584
|
function Wt(e) {
|
|
1585
1585
|
var t = e.f;
|
|
1586
|
-
if ((t &
|
|
1586
|
+
if ((t & F) !== 0)
|
|
1587
1587
|
return !0;
|
|
1588
|
-
if (t &
|
|
1588
|
+
if (t & D && (e.f &= ~vt), (t & we) !== 0) {
|
|
1589
1589
|
for (var r = (
|
|
1590
1590
|
/** @type {Value[]} */
|
|
1591
1591
|
e.deps
|
|
@@ -1600,7 +1600,7 @@ function Wt(e) {
|
|
|
1600
1600
|
), s.wv > e.wv)
|
|
1601
1601
|
return !0;
|
|
1602
1602
|
}
|
|
1603
|
-
(t &
|
|
1603
|
+
(t & le) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1604
1604
|
// traversal of the graph in the other batches still happens
|
|
1605
1605
|
pe === null && L(e, O);
|
|
1606
1606
|
}
|
|
@@ -1608,15 +1608,15 @@ function Wt(e) {
|
|
|
1608
1608
|
}
|
|
1609
1609
|
function _i(e, t, r = !0) {
|
|
1610
1610
|
var n = e.reactions;
|
|
1611
|
-
if (n !== null && !(fe !== null &&
|
|
1611
|
+
if (n !== null && !(fe !== null && At.call(fe, e)))
|
|
1612
1612
|
for (var i = 0; i < n.length; i++) {
|
|
1613
1613
|
var s = n[i];
|
|
1614
|
-
(s.f &
|
|
1614
|
+
(s.f & D) !== 0 ? _i(
|
|
1615
1615
|
/** @type {Derived} */
|
|
1616
1616
|
s,
|
|
1617
1617
|
t,
|
|
1618
1618
|
!1
|
|
1619
|
-
) : t === s && (r ? L(s,
|
|
1619
|
+
) : t === s && (r ? L(s, F) : (s.f & O) !== 0 && L(s, we), ge(
|
|
1620
1620
|
/** @type {Effect} */
|
|
1621
1621
|
s
|
|
1622
1622
|
));
|
|
@@ -1624,137 +1624,137 @@ function _i(e, t, r = !0) {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
function gi(e) {
|
|
1626
1626
|
var T;
|
|
1627
|
-
var t =
|
|
1628
|
-
|
|
1629
|
-
null,
|
|
1630
|
-
e.ac.abort(
|
|
1627
|
+
var t = z, r = J, n = ie, i = y, s = fe, o = G, l = me, a = dt, u = e.f;
|
|
1628
|
+
z = /** @type {null | Value[]} */
|
|
1629
|
+
null, J = 0, ie = null, y = (u & (ye | Je)) === 0 ? e : null, fe = null, Ct(e.ctx), me = !1, dt = ++nt, e.ac !== null && (ni(() => {
|
|
1630
|
+
e.ac.abort(tt);
|
|
1631
1631
|
}), e.ac = null);
|
|
1632
1632
|
try {
|
|
1633
1633
|
e.f |= Tr;
|
|
1634
1634
|
var c = (
|
|
1635
1635
|
/** @type {Function} */
|
|
1636
1636
|
e.fn
|
|
1637
|
-
),
|
|
1638
|
-
e.f |=
|
|
1637
|
+
), p = c();
|
|
1638
|
+
e.f |= Mt;
|
|
1639
1639
|
var h = e.deps, _ = S?.is_fork;
|
|
1640
|
-
if (
|
|
1640
|
+
if (z !== null) {
|
|
1641
1641
|
var d;
|
|
1642
|
-
if (_ || jt(e,
|
|
1643
|
-
for (h.length =
|
|
1644
|
-
h[
|
|
1642
|
+
if (_ || jt(e, J), h !== null && J > 0)
|
|
1643
|
+
for (h.length = J + z.length, d = 0; d < z.length; d++)
|
|
1644
|
+
h[J + d] = z[d];
|
|
1645
1645
|
else
|
|
1646
|
-
e.deps = h =
|
|
1647
|
-
if (Ur() && (e.f &
|
|
1648
|
-
for (d =
|
|
1646
|
+
e.deps = h = z;
|
|
1647
|
+
if (Ur() && (e.f & le) !== 0)
|
|
1648
|
+
for (d = J; d < h.length; d++)
|
|
1649
1649
|
((T = h[d]).reactions ?? (T.reactions = [])).push(e);
|
|
1650
|
-
} else !_ && h !== null &&
|
|
1651
|
-
if (Pn() &&
|
|
1650
|
+
} else !_ && h !== null && J < h.length && (jt(e, J), h.length = J);
|
|
1651
|
+
if (Pn() && ie !== null && !me && h !== null && (e.f & (D | we | F)) === 0)
|
|
1652
1652
|
for (d = 0; d < /** @type {Source[]} */
|
|
1653
|
-
|
|
1653
|
+
ie.length; d++)
|
|
1654
1654
|
_i(
|
|
1655
|
-
|
|
1655
|
+
ie[d],
|
|
1656
1656
|
/** @type {Effect} */
|
|
1657
1657
|
e
|
|
1658
1658
|
);
|
|
1659
1659
|
if (i !== null && i !== e) {
|
|
1660
|
-
if (
|
|
1660
|
+
if (nt++, i.deps !== null)
|
|
1661
1661
|
for (let g = 0; g < r; g += 1)
|
|
1662
|
-
i.deps[g].rv =
|
|
1662
|
+
i.deps[g].rv = nt;
|
|
1663
1663
|
if (t !== null)
|
|
1664
1664
|
for (const g of t)
|
|
1665
|
-
g.rv =
|
|
1666
|
-
|
|
1667
|
-
|
|
1665
|
+
g.rv = nt;
|
|
1666
|
+
ie !== null && (n === null ? n = ie : n.push(.../** @type {Source[]} */
|
|
1667
|
+
ie));
|
|
1668
1668
|
}
|
|
1669
|
-
return (e.f &
|
|
1669
|
+
return (e.f & Ge) !== 0 && (e.f ^= Ge), p;
|
|
1670
1670
|
} catch (g) {
|
|
1671
1671
|
return Fn(g);
|
|
1672
1672
|
} finally {
|
|
1673
|
-
e.f ^= Tr,
|
|
1673
|
+
e.f ^= Tr, z = t, J = r, ie = n, y = i, fe = s, Ct(o), me = l, dt = a;
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function Ys(e, t) {
|
|
1677
1677
|
let r = t.reactions;
|
|
1678
1678
|
if (r !== null) {
|
|
1679
|
-
var n =
|
|
1679
|
+
var n = Ji.call(r, e);
|
|
1680
1680
|
if (n !== -1) {
|
|
1681
1681
|
var i = r.length - 1;
|
|
1682
1682
|
i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
|
|
1683
1683
|
}
|
|
1684
1684
|
}
|
|
1685
|
-
if (r === null && (t.f &
|
|
1685
|
+
if (r === null && (t.f & D) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1686
1686
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1687
1687
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1688
|
-
(
|
|
1688
|
+
(z === null || !At.call(z, t))) {
|
|
1689
1689
|
var s = (
|
|
1690
1690
|
/** @type {Derived} */
|
|
1691
1691
|
t
|
|
1692
1692
|
);
|
|
1693
|
-
(s.f &
|
|
1693
|
+
(s.f & le) !== 0 && (s.f ^= le, s.f &= ~vt), Hr(s), Ds(s), jt(s, 0);
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
1696
|
function jt(e, t) {
|
|
1697
1697
|
var r = e.deps;
|
|
1698
1698
|
if (r !== null)
|
|
1699
1699
|
for (var n = t; n < r.length; n++)
|
|
1700
|
-
|
|
1700
|
+
Ys(e, r[n]);
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function Lt(e) {
|
|
1703
1703
|
var t = e.f;
|
|
1704
|
-
if ((t &
|
|
1704
|
+
if ((t & Be) === 0) {
|
|
1705
1705
|
L(e, O);
|
|
1706
1706
|
var r = $, n = ir;
|
|
1707
1707
|
$ = e, ir = !0;
|
|
1708
1708
|
try {
|
|
1709
|
-
(t & (
|
|
1709
|
+
(t & (Ze | Sn)) !== 0 ? qs(e) : Gr(e), li(e);
|
|
1710
1710
|
var i = gi(e);
|
|
1711
1711
|
e.teardown = typeof i == "function" ? i : null, e.wv = vi;
|
|
1712
1712
|
var s;
|
|
1713
|
-
xr &&
|
|
1713
|
+
xr && $s && (e.f & F) !== 0 && e.deps;
|
|
1714
1714
|
} finally {
|
|
1715
1715
|
ir = n, $ = r;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
|
-
function
|
|
1720
|
-
var t = e.f, r = (t &
|
|
1719
|
+
function v(e) {
|
|
1720
|
+
var t = e.f, r = (t & D) !== 0;
|
|
1721
1721
|
if (y !== null && !me) {
|
|
1722
|
-
var n = $ !== null && ($.f &
|
|
1723
|
-
if (!n && (fe === null || !
|
|
1722
|
+
var n = $ !== null && ($.f & Be) !== 0;
|
|
1723
|
+
if (!n && (fe === null || !At.call(fe, e))) {
|
|
1724
1724
|
var i = y.deps;
|
|
1725
1725
|
if ((y.f & Tr) !== 0)
|
|
1726
|
-
e.rv <
|
|
1726
|
+
e.rv < nt && (e.rv = nt, z === null && i !== null && i[J] === e ? J++ : z === null ? z = [e] : z.push(e));
|
|
1727
1727
|
else {
|
|
1728
1728
|
(y.deps ?? (y.deps = [])).push(e);
|
|
1729
1729
|
var s = e.reactions;
|
|
1730
|
-
s === null ? e.reactions = [y] :
|
|
1730
|
+
s === null ? e.reactions = [y] : At.call(s, y) || s.push(y);
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
if (
|
|
1735
|
-
return
|
|
1734
|
+
if (Xe && Ke.has(e))
|
|
1735
|
+
return Ke.get(e);
|
|
1736
1736
|
if (r) {
|
|
1737
1737
|
var o = (
|
|
1738
1738
|
/** @type {Derived} */
|
|
1739
1739
|
e
|
|
1740
1740
|
);
|
|
1741
|
-
if (
|
|
1741
|
+
if (Xe) {
|
|
1742
1742
|
var l = o.v;
|
|
1743
|
-
return ((o.f & O) === 0 && o.reactions !== null || mi(o)) && (l = Zr(o)),
|
|
1743
|
+
return ((o.f & O) === 0 && o.reactions !== null || mi(o)) && (l = Zr(o)), Ke.set(o, l), l;
|
|
1744
1744
|
}
|
|
1745
|
-
var
|
|
1746
|
-
Wt(o) && (
|
|
1745
|
+
var a = (o.f & le) === 0 && !me && y !== null && (ir || (y.f & le) !== 0), u = (o.f & Mt) === 0;
|
|
1746
|
+
Wt(o) && (a && (o.f |= le), zn(o)), a && !u && (Gn(o), bi(o));
|
|
1747
1747
|
}
|
|
1748
1748
|
if (pe?.has(e))
|
|
1749
1749
|
return pe.get(e);
|
|
1750
|
-
if ((e.f &
|
|
1750
|
+
if ((e.f & Ge) !== 0)
|
|
1751
1751
|
throw e.v;
|
|
1752
1752
|
return e.v;
|
|
1753
1753
|
}
|
|
1754
1754
|
function bi(e) {
|
|
1755
|
-
if (e.f |=
|
|
1755
|
+
if (e.f |= le, e.deps !== null)
|
|
1756
1756
|
for (const t of e.deps)
|
|
1757
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f &
|
|
1757
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & D) !== 0 && (t.f & le) === 0 && (Gn(
|
|
1758
1758
|
/** @type {Derived} */
|
|
1759
1759
|
t
|
|
1760
1760
|
), bi(
|
|
@@ -1763,10 +1763,10 @@ function bi(e) {
|
|
|
1763
1763
|
));
|
|
1764
1764
|
}
|
|
1765
1765
|
function mi(e) {
|
|
1766
|
-
if (e.v ===
|
|
1766
|
+
if (e.v === P) return !0;
|
|
1767
1767
|
if (e.deps === null) return !1;
|
|
1768
1768
|
for (const t of e.deps)
|
|
1769
|
-
if (
|
|
1769
|
+
if (Ke.has(t) || (t.f & D) !== 0 && mi(
|
|
1770
1770
|
/** @type {Derived} */
|
|
1771
1771
|
t
|
|
1772
1772
|
))
|
|
@@ -1781,11 +1781,11 @@ function gr(e) {
|
|
|
1781
1781
|
me = t;
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
|
-
const
|
|
1785
|
-
function
|
|
1786
|
-
(t[
|
|
1784
|
+
const it = /* @__PURE__ */ Symbol("events"), wi = /* @__PURE__ */ new Set(), Or = /* @__PURE__ */ new Set();
|
|
1785
|
+
function zs(e, t, r) {
|
|
1786
|
+
(t[it] ?? (t[it] = {}))[e] = r;
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Gs(e) {
|
|
1789
1789
|
for (var t = 0; t < e.length; t++)
|
|
1790
1790
|
wi.add(e[t]);
|
|
1791
1791
|
for (var r of Or)
|
|
@@ -1801,18 +1801,18 @@ function _n(e) {
|
|
|
1801
1801
|
i[0] || e.target
|
|
1802
1802
|
);
|
|
1803
1803
|
pn = e;
|
|
1804
|
-
var o = 0, l = pn === e && e[
|
|
1804
|
+
var o = 0, l = pn === e && e[it];
|
|
1805
1805
|
if (l) {
|
|
1806
|
-
var
|
|
1807
|
-
if (
|
|
1806
|
+
var a = i.indexOf(l);
|
|
1807
|
+
if (a !== -1 && (t === document || t === /** @type {any} */
|
|
1808
1808
|
window)) {
|
|
1809
|
-
e[
|
|
1809
|
+
e[it] = t;
|
|
1810
1810
|
return;
|
|
1811
1811
|
}
|
|
1812
1812
|
var u = i.indexOf(t);
|
|
1813
1813
|
if (u === -1)
|
|
1814
1814
|
return;
|
|
1815
|
-
|
|
1815
|
+
a <= u && (o = a);
|
|
1816
1816
|
}
|
|
1817
1817
|
if (s = /** @type {Element} */
|
|
1818
1818
|
i[o] || e.target, s !== t) {
|
|
@@ -1822,14 +1822,14 @@ function _n(e) {
|
|
|
1822
1822
|
return s || r;
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
|
-
var c = y,
|
|
1826
|
-
|
|
1825
|
+
var c = y, p = $;
|
|
1826
|
+
K(null), ue(null);
|
|
1827
1827
|
try {
|
|
1828
1828
|
for (var h, _ = []; s !== null; ) {
|
|
1829
1829
|
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1830
1830
|
s.host || null;
|
|
1831
1831
|
try {
|
|
1832
|
-
var T = s[
|
|
1832
|
+
var T = s[it]?.[n];
|
|
1833
1833
|
T != null && (!/** @type {any} */
|
|
1834
1834
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1835
1835
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
@@ -1849,28 +1849,28 @@ function _n(e) {
|
|
|
1849
1849
|
throw h;
|
|
1850
1850
|
}
|
|
1851
1851
|
} finally {
|
|
1852
|
-
e[
|
|
1852
|
+
e[it] = t, delete e.currentTarget, K(c), ue(p);
|
|
1853
1853
|
}
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
|
-
const
|
|
1856
|
+
const Ks = (
|
|
1857
1857
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1858
1858
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1859
1859
|
/** @param {string} html */
|
|
1860
1860
|
createHTML: (e) => e
|
|
1861
1861
|
})
|
|
1862
1862
|
);
|
|
1863
|
-
function
|
|
1863
|
+
function Ws(e) {
|
|
1864
1864
|
return (
|
|
1865
1865
|
/** @type {string} */
|
|
1866
|
-
|
|
1866
|
+
Ks?.createHTML(e) ?? e
|
|
1867
1867
|
);
|
|
1868
1868
|
}
|
|
1869
1869
|
function yi(e, t = !1) {
|
|
1870
1870
|
var r = jr("template");
|
|
1871
|
-
return e = e.replaceAll("<!>", "<!---->"), r.innerHTML = t ?
|
|
1871
|
+
return e = e.replaceAll("<!>", "<!---->"), r.innerHTML = t ? Ws(e) : e, r.content;
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1873
|
+
function We(e, t) {
|
|
1874
1874
|
var r = (
|
|
1875
1875
|
/** @type {Effect} */
|
|
1876
1876
|
$
|
|
@@ -1878,11 +1878,11 @@ function Ke(e, t) {
|
|
|
1878
1878
|
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1879
1879
|
}
|
|
1880
1880
|
// @__NO_SIDE_EFFECTS__
|
|
1881
|
-
function
|
|
1882
|
-
var r = (t &
|
|
1881
|
+
function Qe(e, t) {
|
|
1882
|
+
var r = (t & Wi) !== 0, n = (t & Xi) !== 0, i, s = !e.startsWith("<!>");
|
|
1883
1883
|
return () => {
|
|
1884
1884
|
if (x)
|
|
1885
|
-
return
|
|
1885
|
+
return We(E, null), E;
|
|
1886
1886
|
i === void 0 && (i = yi(s ? e : "<!>" + e, !0), r || (i = /** @type {TemplateNode} */
|
|
1887
1887
|
/* @__PURE__ */ be(i)));
|
|
1888
1888
|
var o = (
|
|
@@ -1893,21 +1893,21 @@ function Je(e, t) {
|
|
|
1893
1893
|
var l = (
|
|
1894
1894
|
/** @type {TemplateNode} */
|
|
1895
1895
|
/* @__PURE__ */ be(o)
|
|
1896
|
-
),
|
|
1896
|
+
), a = (
|
|
1897
1897
|
/** @type {TemplateNode} */
|
|
1898
1898
|
o.lastChild
|
|
1899
1899
|
);
|
|
1900
|
-
|
|
1900
|
+
We(l, a);
|
|
1901
1901
|
} else
|
|
1902
|
-
|
|
1902
|
+
We(o, o);
|
|
1903
1903
|
return o;
|
|
1904
1904
|
};
|
|
1905
1905
|
}
|
|
1906
1906
|
function gn() {
|
|
1907
1907
|
if (x)
|
|
1908
|
-
return
|
|
1909
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), r =
|
|
1910
|
-
return e.append(t, r),
|
|
1908
|
+
return We(E, null), E;
|
|
1909
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), r = ae();
|
|
1910
|
+
return e.append(t, r), We(t, r), e;
|
|
1911
1911
|
}
|
|
1912
1912
|
function de(e, t) {
|
|
1913
1913
|
if (x) {
|
|
@@ -1915,7 +1915,7 @@ function de(e, t) {
|
|
|
1915
1915
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1916
1916
|
$
|
|
1917
1917
|
);
|
|
1918
|
-
((r.f &
|
|
1918
|
+
((r.f & Mt) === 0 || r.nodes.end === null) && (r.nodes.end = E), Rt();
|
|
1919
1919
|
return;
|
|
1920
1920
|
}
|
|
1921
1921
|
e !== null && e.before(
|
|
@@ -1923,26 +1923,26 @@ function de(e, t) {
|
|
|
1923
1923
|
t
|
|
1924
1924
|
);
|
|
1925
1925
|
}
|
|
1926
|
-
const
|
|
1927
|
-
function
|
|
1928
|
-
return
|
|
1926
|
+
const Xs = ["touchstart", "touchmove"];
|
|
1927
|
+
function Js(e) {
|
|
1928
|
+
return Xs.includes(e);
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function Qs(e, t) {
|
|
1931
1931
|
var r = t == null ? "" : typeof t == "object" ? t + "" : t;
|
|
1932
1932
|
r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = r + "");
|
|
1933
1933
|
}
|
|
1934
1934
|
function $i(e, t) {
|
|
1935
1935
|
return xi(e, t);
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1937
|
+
function eo(e, t) {
|
|
1938
1938
|
Mr(), t.intro = t.intro ?? !1;
|
|
1939
1939
|
const r = t.target, n = x, i = E;
|
|
1940
1940
|
try {
|
|
1941
|
-
for (var s = /* @__PURE__ */ be(r); s && (s.nodeType !==
|
|
1941
|
+
for (var s = /* @__PURE__ */ be(r); s && (s.nodeType !== Ot || /** @type {Comment} */
|
|
1942
1942
|
s.data !== Ir); )
|
|
1943
1943
|
s = /* @__PURE__ */ $e(s);
|
|
1944
1944
|
if (!s)
|
|
1945
|
-
throw
|
|
1945
|
+
throw ht;
|
|
1946
1946
|
_e(!0), Z(
|
|
1947
1947
|
/** @type {Comment} */
|
|
1948
1948
|
s
|
|
@@ -1954,7 +1954,7 @@ function Qs(e, t) {
|
|
|
1954
1954
|
if (o instanceof Error && o.message.split(`
|
|
1955
1955
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1956
1956
|
throw o;
|
|
1957
|
-
return o !==
|
|
1957
|
+
return o !== ht && console.warn("Failed to hydrate: ", o), t.recover === !1 && vs(), Mr(), ti(r), _e(!1), $i(e, t);
|
|
1958
1958
|
} finally {
|
|
1959
1959
|
_e(n), Z(i);
|
|
1960
1960
|
}
|
|
@@ -1962,9 +1962,9 @@ function Qs(e, t) {
|
|
|
1962
1962
|
const er = /* @__PURE__ */ new Map();
|
|
1963
1963
|
function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: o = !0 }) {
|
|
1964
1964
|
Mr();
|
|
1965
|
-
var l = void 0,
|
|
1966
|
-
var u = r ?? t.appendChild(
|
|
1967
|
-
|
|
1965
|
+
var l = void 0, a = Zs(() => {
|
|
1966
|
+
var u = r ?? t.appendChild(ae());
|
|
1967
|
+
Rs(
|
|
1968
1968
|
/** @type {TemplateNode} */
|
|
1969
1969
|
u,
|
|
1970
1970
|
{
|
|
@@ -1975,34 +1975,34 @@ function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
1975
1975
|
Mn({});
|
|
1976
1976
|
var _ = (
|
|
1977
1977
|
/** @type {ComponentContext} */
|
|
1978
|
-
|
|
1978
|
+
G
|
|
1979
1979
|
);
|
|
1980
|
-
if (s && (_.c = s), i && (n.$$events = i), x &&
|
|
1980
|
+
if (s && (_.c = s), i && (n.$$events = i), x && We(
|
|
1981
1981
|
/** @type {TemplateNode} */
|
|
1982
1982
|
h,
|
|
1983
1983
|
null
|
|
1984
|
-
), l = e(h, n) || {}, x && ($.nodes.end = E, E === null || E.nodeType !==
|
|
1984
|
+
), l = e(h, n) || {}, x && ($.nodes.end = E, E === null || E.nodeType !== Ot || /** @type {Comment} */
|
|
1985
1985
|
E.data !== Vr))
|
|
1986
|
-
throw Kt(),
|
|
1986
|
+
throw Kt(), ht;
|
|
1987
1987
|
On();
|
|
1988
1988
|
}
|
|
1989
1989
|
);
|
|
1990
|
-
var c = /* @__PURE__ */ new Set(),
|
|
1990
|
+
var c = /* @__PURE__ */ new Set(), p = (h) => {
|
|
1991
1991
|
for (var _ = 0; _ < h.length; _++) {
|
|
1992
1992
|
var d = h[_];
|
|
1993
1993
|
if (!c.has(d)) {
|
|
1994
1994
|
c.add(d);
|
|
1995
|
-
var T =
|
|
1996
|
-
for (const
|
|
1997
|
-
var g = er.get(
|
|
1998
|
-
g === void 0 && (g = /* @__PURE__ */ new Map(), er.set(
|
|
1999
|
-
var
|
|
2000
|
-
|
|
1995
|
+
var T = Js(d);
|
|
1996
|
+
for (const C of [t, document]) {
|
|
1997
|
+
var g = er.get(C);
|
|
1998
|
+
g === void 0 && (g = /* @__PURE__ */ new Map(), er.set(C, g));
|
|
1999
|
+
var I = g.get(d);
|
|
2000
|
+
I === void 0 ? (C.addEventListener(d, _n, { passive: T }), g.set(d, 1)) : g.set(d, I + 1);
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
2004
|
};
|
|
2005
|
-
return
|
|
2005
|
+
return p(dr(wi)), Or.add(p), () => {
|
|
2006
2006
|
for (var h of c)
|
|
2007
2007
|
for (const T of [t, document]) {
|
|
2008
2008
|
var _ = (
|
|
@@ -2014,18 +2014,18 @@ function xi(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
2014
2014
|
);
|
|
2015
2015
|
--d == 0 ? (T.removeEventListener(h, _n), _.delete(h), _.size === 0 && er.delete(T)) : _.set(h, d);
|
|
2016
2016
|
}
|
|
2017
|
-
Or.delete(
|
|
2017
|
+
Or.delete(p), u !== r && u.parentNode?.removeChild(u);
|
|
2018
2018
|
};
|
|
2019
2019
|
});
|
|
2020
|
-
return Pr.set(l,
|
|
2020
|
+
return Pr.set(l, a), l;
|
|
2021
2021
|
}
|
|
2022
2022
|
let Pr = /* @__PURE__ */ new WeakMap();
|
|
2023
|
-
function
|
|
2023
|
+
function to(e, t) {
|
|
2024
2024
|
const r = Pr.get(e);
|
|
2025
2025
|
return r ? (Pr.delete(e), r(t)) : Promise.resolve();
|
|
2026
2026
|
}
|
|
2027
|
-
var he, Se,
|
|
2028
|
-
class
|
|
2027
|
+
var he, Se, ee, ft, zt, Gt, ur;
|
|
2028
|
+
class ro {
|
|
2029
2029
|
/**
|
|
2030
2030
|
* @param {TemplateNode} anchor
|
|
2031
2031
|
* @param {boolean} transition
|
|
@@ -2055,7 +2055,7 @@ class to {
|
|
|
2055
2055
|
* in the DOM, because their insertion is deferred.
|
|
2056
2056
|
* @type {Map<Key, Branch>}
|
|
2057
2057
|
*/
|
|
2058
|
-
w(this,
|
|
2058
|
+
w(this, ee, /* @__PURE__ */ new Map());
|
|
2059
2059
|
/**
|
|
2060
2060
|
* Keys of effects that are currently outroing
|
|
2061
2061
|
* @type {Set<Key>}
|
|
@@ -2071,34 +2071,34 @@ class to {
|
|
|
2071
2071
|
/** @type {Batch} */
|
|
2072
2072
|
S
|
|
2073
2073
|
);
|
|
2074
|
-
if (
|
|
2074
|
+
if (f(this, he).has(t)) {
|
|
2075
2075
|
var r = (
|
|
2076
2076
|
/** @type {Key} */
|
|
2077
|
-
|
|
2078
|
-
), n =
|
|
2077
|
+
f(this, he).get(t)
|
|
2078
|
+
), n = f(this, Se).get(r);
|
|
2079
2079
|
if (n)
|
|
2080
|
-
Kr(n),
|
|
2080
|
+
Kr(n), f(this, ft).delete(r);
|
|
2081
2081
|
else {
|
|
2082
|
-
var i =
|
|
2083
|
-
i && (
|
|
2082
|
+
var i = f(this, ee).get(r);
|
|
2083
|
+
i && (f(this, Se).set(r, i.effect), f(this, ee).delete(r), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), n = i.effect);
|
|
2084
2084
|
}
|
|
2085
|
-
for (const [s, o] of
|
|
2086
|
-
if (
|
|
2085
|
+
for (const [s, o] of f(this, he)) {
|
|
2086
|
+
if (f(this, he).delete(s), s === t)
|
|
2087
2087
|
break;
|
|
2088
|
-
const l =
|
|
2089
|
-
l && (j(l.effect),
|
|
2088
|
+
const l = f(this, ee).get(o);
|
|
2089
|
+
l && (j(l.effect), f(this, ee).delete(o));
|
|
2090
2090
|
}
|
|
2091
|
-
for (const [s, o] of
|
|
2092
|
-
if (s === r ||
|
|
2091
|
+
for (const [s, o] of f(this, Se)) {
|
|
2092
|
+
if (s === r || f(this, ft).has(s)) continue;
|
|
2093
2093
|
const l = () => {
|
|
2094
|
-
if (Array.from(
|
|
2094
|
+
if (Array.from(f(this, he).values()).includes(s)) {
|
|
2095
2095
|
var u = document.createDocumentFragment();
|
|
2096
|
-
di(o, u), u.append(
|
|
2096
|
+
di(o, u), u.append(ae()), f(this, ee).set(s, { effect: o, fragment: u });
|
|
2097
2097
|
} else
|
|
2098
2098
|
j(o);
|
|
2099
|
-
|
|
2099
|
+
f(this, ft).delete(s), f(this, Se).delete(s);
|
|
2100
2100
|
};
|
|
2101
|
-
|
|
2101
|
+
f(this, zt) || !n ? (f(this, ft).add(s), ct(o, l, !1)) : l();
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
2104
|
});
|
|
@@ -2106,10 +2106,10 @@ class to {
|
|
|
2106
2106
|
* @param {Batch} batch
|
|
2107
2107
|
*/
|
|
2108
2108
|
w(this, ur, (t) => {
|
|
2109
|
-
|
|
2110
|
-
const r = Array.from(
|
|
2111
|
-
for (const [n, i] of
|
|
2112
|
-
r.includes(n) || (j(i.effect),
|
|
2109
|
+
f(this, he).delete(t);
|
|
2110
|
+
const r = Array.from(f(this, he).values());
|
|
2111
|
+
for (const [n, i] of f(this, ee))
|
|
2112
|
+
r.includes(n) || (j(i.effect), f(this, ee).delete(n));
|
|
2113
2113
|
});
|
|
2114
2114
|
this.anchor = t, b(this, zt, r);
|
|
2115
2115
|
}
|
|
@@ -2123,31 +2123,31 @@ class to {
|
|
|
2123
2123
|
/** @type {Batch} */
|
|
2124
2124
|
S
|
|
2125
2125
|
), i = ri();
|
|
2126
|
-
if (r && !
|
|
2126
|
+
if (r && !f(this, Se).has(t) && !f(this, ee).has(t))
|
|
2127
2127
|
if (i) {
|
|
2128
|
-
var s = document.createDocumentFragment(), o =
|
|
2129
|
-
s.append(o),
|
|
2128
|
+
var s = document.createDocumentFragment(), o = ae();
|
|
2129
|
+
s.append(o), f(this, ee).set(t, {
|
|
2130
2130
|
effect: ve(() => r(o)),
|
|
2131
2131
|
fragment: s
|
|
2132
2132
|
});
|
|
2133
2133
|
} else
|
|
2134
|
-
|
|
2134
|
+
f(this, Se).set(
|
|
2135
2135
|
t,
|
|
2136
2136
|
ve(() => r(this.anchor))
|
|
2137
2137
|
);
|
|
2138
|
-
if (
|
|
2139
|
-
for (const [l,
|
|
2140
|
-
l === t ? n.unskip_effect(
|
|
2141
|
-
for (const [l,
|
|
2142
|
-
l === t ? n.unskip_effect(
|
|
2143
|
-
n.oncommit(
|
|
2138
|
+
if (f(this, he).set(n, t), i) {
|
|
2139
|
+
for (const [l, a] of f(this, Se))
|
|
2140
|
+
l === t ? n.unskip_effect(a) : n.skip_effect(a);
|
|
2141
|
+
for (const [l, a] of f(this, ee))
|
|
2142
|
+
l === t ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
|
|
2143
|
+
n.oncommit(f(this, Gt)), n.ondiscard(f(this, ur));
|
|
2144
2144
|
} else
|
|
2145
|
-
x && (this.anchor = E),
|
|
2145
|
+
x && (this.anchor = E), f(this, Gt).call(this);
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
-
he = new WeakMap(), Se = new WeakMap(),
|
|
2148
|
+
he = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ft = new WeakMap(), zt = new WeakMap(), Gt = new WeakMap(), ur = new WeakMap();
|
|
2149
2149
|
function Ei(e) {
|
|
2150
|
-
|
|
2150
|
+
G === null && Cn(), ii(() => {
|
|
2151
2151
|
const t = gr(e);
|
|
2152
2152
|
if (typeof t == "function") return (
|
|
2153
2153
|
/** @type {() => void} */
|
|
@@ -2155,18 +2155,18 @@ function Ei(e) {
|
|
|
2155
2155
|
);
|
|
2156
2156
|
});
|
|
2157
2157
|
}
|
|
2158
|
-
function
|
|
2159
|
-
|
|
2158
|
+
function no(e) {
|
|
2159
|
+
G === null && Cn(), Ei(() => () => gr(e));
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2162
|
-
x &&
|
|
2163
|
-
var n = new
|
|
2161
|
+
function qe(e, t, r = !1) {
|
|
2162
|
+
x && Rt();
|
|
2163
|
+
var n = new ro(e), i = r ? St : 0;
|
|
2164
2164
|
function s(o, l) {
|
|
2165
2165
|
if (x) {
|
|
2166
2166
|
const c = kn(e);
|
|
2167
|
-
var
|
|
2168
|
-
if (c === Ir ?
|
|
2169
|
-
var u =
|
|
2167
|
+
var a;
|
|
2168
|
+
if (c === Ir ? a = 0 : c === cr ? a = !1 : a = parseInt(c.substring(1)), o !== a) {
|
|
2169
|
+
var u = ar();
|
|
2170
2170
|
Z(u), n.anchor = u, _e(!1), n.ensure(o, l), _e(!0);
|
|
2171
2171
|
return;
|
|
2172
2172
|
}
|
|
@@ -2175,19 +2175,19 @@ function je(e, t, r = !1) {
|
|
|
2175
2175
|
}
|
|
2176
2176
|
zr(() => {
|
|
2177
2177
|
var o = !1;
|
|
2178
|
-
t((l,
|
|
2179
|
-
o = !0, s(
|
|
2178
|
+
t((l, a = 0) => {
|
|
2179
|
+
o = !0, s(a, l);
|
|
2180
2180
|
}), o || s(!1, null);
|
|
2181
2181
|
}, i);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2183
|
+
function io(e, t, r) {
|
|
2184
2184
|
for (var n = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
|
|
2185
|
-
let
|
|
2186
|
-
|
|
2187
|
-
|
|
2185
|
+
let p = t[l];
|
|
2186
|
+
ct(
|
|
2187
|
+
p,
|
|
2188
2188
|
() => {
|
|
2189
2189
|
if (s) {
|
|
2190
|
-
if (s.pending.delete(
|
|
2190
|
+
if (s.pending.delete(p), s.done.add(p), s.pending.size === 0) {
|
|
2191
2191
|
var h = (
|
|
2192
2192
|
/** @type {Set<EachOutroGroup>} */
|
|
2193
2193
|
e.outrogroups
|
|
@@ -2201,8 +2201,8 @@ function no(e, t, r) {
|
|
|
2201
2201
|
);
|
|
2202
2202
|
}
|
|
2203
2203
|
if (o === 0) {
|
|
2204
|
-
var
|
|
2205
|
-
if (
|
|
2204
|
+
var a = n.length === 0 && r !== null;
|
|
2205
|
+
if (a) {
|
|
2206
2206
|
var u = (
|
|
2207
2207
|
/** @type {Element} */
|
|
2208
2208
|
r
|
|
@@ -2212,7 +2212,7 @@ function no(e, t, r) {
|
|
|
2212
2212
|
);
|
|
2213
2213
|
ti(c), c.append(u), e.items.clear();
|
|
2214
2214
|
}
|
|
2215
|
-
Dr(t, !
|
|
2215
|
+
Dr(t, !a);
|
|
2216
2216
|
} else
|
|
2217
2217
|
s = {
|
|
2218
2218
|
pending: new Set(t),
|
|
@@ -2224,62 +2224,62 @@ function Dr(e, t = !0) {
|
|
|
2224
2224
|
j(e[r], t);
|
|
2225
2225
|
}
|
|
2226
2226
|
var bn;
|
|
2227
|
-
function
|
|
2227
|
+
function so(e, t, r, n, i, s = null) {
|
|
2228
2228
|
var o = e, l = /* @__PURE__ */ new Map();
|
|
2229
2229
|
{
|
|
2230
|
-
var
|
|
2230
|
+
var a = (
|
|
2231
2231
|
/** @type {Element} */
|
|
2232
2232
|
e
|
|
2233
2233
|
);
|
|
2234
|
-
o = x ? Z(/* @__PURE__ */ be(
|
|
2234
|
+
o = x ? Z(/* @__PURE__ */ be(a)) : a.appendChild(ae());
|
|
2235
2235
|
}
|
|
2236
|
-
x &&
|
|
2237
|
-
var u = null, c = /* @__PURE__ */
|
|
2236
|
+
x && Rt();
|
|
2237
|
+
var u = null, c = /* @__PURE__ */ Ms(() => {
|
|
2238
2238
|
var g = r();
|
|
2239
2239
|
return En(g) ? g : g == null ? [] : dr(g);
|
|
2240
|
-
}),
|
|
2240
|
+
}), p, h = !0;
|
|
2241
2241
|
function _() {
|
|
2242
|
-
T.fallback = u,
|
|
2242
|
+
T.fallback = u, oo(T, p, o, t, n), u !== null && (p.length === 0 ? (u.f & ze) === 0 ? Kr(u) : (u.f ^= ze, It(u, null, o)) : ct(u, () => {
|
|
2243
2243
|
u = null;
|
|
2244
2244
|
}));
|
|
2245
2245
|
}
|
|
2246
2246
|
var d = zr(() => {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
var g =
|
|
2250
|
-
let
|
|
2247
|
+
p = /** @type {V[]} */
|
|
2248
|
+
v(c);
|
|
2249
|
+
var g = p.length;
|
|
2250
|
+
let I = !1;
|
|
2251
2251
|
if (x) {
|
|
2252
|
-
var
|
|
2253
|
-
|
|
2252
|
+
var C = kn(o) === cr;
|
|
2253
|
+
C !== (g === 0) && (o = ar(), Z(o), _e(!1), I = !0);
|
|
2254
2254
|
}
|
|
2255
|
-
for (var
|
|
2255
|
+
for (var ke = /* @__PURE__ */ new Set(), W = (
|
|
2256
2256
|
/** @type {Batch} */
|
|
2257
2257
|
S
|
|
2258
|
-
),
|
|
2259
|
-
x && E.nodeType ===
|
|
2258
|
+
), re = ri(), X = 0; X < g; X += 1) {
|
|
2259
|
+
x && E.nodeType === Ot && /** @type {Comment} */
|
|
2260
2260
|
E.data === Vr && (o = /** @type {Comment} */
|
|
2261
|
-
E,
|
|
2262
|
-
var xe =
|
|
2263
|
-
|
|
2261
|
+
E, I = !0, _e(!1));
|
|
2262
|
+
var xe = p[X], V = n(xe, X), q = h ? null : l.get(V);
|
|
2263
|
+
q ? (q.v && Nt(q.v, xe), q.i && Nt(q.i, X), re && W.unskip_effect(q.e)) : (q = lo(
|
|
2264
2264
|
l,
|
|
2265
|
-
h ? o : bn ?? (bn =
|
|
2265
|
+
h ? o : bn ?? (bn = ae()),
|
|
2266
2266
|
xe,
|
|
2267
2267
|
V,
|
|
2268
|
-
|
|
2268
|
+
X,
|
|
2269
2269
|
i,
|
|
2270
2270
|
t,
|
|
2271
2271
|
r
|
|
2272
|
-
), h || (
|
|
2272
|
+
), h || (q.e.f |= ze), l.set(V, q)), ke.add(V);
|
|
2273
2273
|
}
|
|
2274
|
-
if (g === 0 && s && !u && (h ? u = ve(() => s(o)) : (u = ve(() => s(bn ?? (bn =
|
|
2275
|
-
if (
|
|
2276
|
-
for (const [
|
|
2277
|
-
|
|
2278
|
-
|
|
2274
|
+
if (g === 0 && s && !u && (h ? u = ve(() => s(o)) : (u = ve(() => s(bn ?? (bn = ae()))), u.f |= ze)), g > ke.size && fs(), x && g > 0 && Z(ar()), !h)
|
|
2275
|
+
if (re) {
|
|
2276
|
+
for (const [br, Xt] of l)
|
|
2277
|
+
ke.has(br) || W.skip_effect(Xt.e);
|
|
2278
|
+
W.oncommit(_), W.ondiscard(() => {
|
|
2279
2279
|
});
|
|
2280
2280
|
} else
|
|
2281
2281
|
_();
|
|
2282
|
-
|
|
2282
|
+
I && _e(!0), v(c);
|
|
2283
2283
|
}), T = { effect: d, items: l, outrogroups: null, fallback: u };
|
|
2284
2284
|
h = !1, x && (o = E);
|
|
2285
2285
|
}
|
|
@@ -2288,75 +2288,75 @@ function Pt(e) {
|
|
|
2288
2288
|
e = e.next;
|
|
2289
2289
|
return e;
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2292
|
-
var s = t.length, o = e.items, l = Pt(e.effect.first),
|
|
2291
|
+
function oo(e, t, r, n, i) {
|
|
2292
|
+
var s = t.length, o = e.items, l = Pt(e.effect.first), a, u = null, c = [], p = [], h, _, d, T;
|
|
2293
2293
|
for (T = 0; T < s; T += 1) {
|
|
2294
2294
|
if (h = t[T], _ = i(h, T), d = /** @type {EachItem} */
|
|
2295
2295
|
o.get(_).e, e.outrogroups !== null)
|
|
2296
2296
|
for (const V of e.outrogroups)
|
|
2297
2297
|
V.pending.delete(d), V.done.delete(d);
|
|
2298
|
-
if ((d.f &
|
|
2299
|
-
if (d.f ^=
|
|
2298
|
+
if ((d.f & ze) !== 0)
|
|
2299
|
+
if (d.f ^= ze, d === l)
|
|
2300
2300
|
It(d, null, r);
|
|
2301
2301
|
else {
|
|
2302
2302
|
var g = u ? u.next : l;
|
|
2303
|
-
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev),
|
|
2303
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), Ue(e, u, d), Ue(e, d, g), It(d, g, r), u = d, c = [], p = [], l = Pt(u.next);
|
|
2304
2304
|
continue;
|
|
2305
2305
|
}
|
|
2306
|
-
if ((d.f &
|
|
2307
|
-
if (
|
|
2308
|
-
if (c.length <
|
|
2309
|
-
var
|
|
2310
|
-
u =
|
|
2311
|
-
var
|
|
2312
|
-
for (
|
|
2313
|
-
It(c[
|
|
2314
|
-
for (
|
|
2315
|
-
|
|
2316
|
-
|
|
2306
|
+
if ((d.f & te) !== 0 && Kr(d), d !== l) {
|
|
2307
|
+
if (a !== void 0 && a.has(d)) {
|
|
2308
|
+
if (c.length < p.length) {
|
|
2309
|
+
var I = p[0], C;
|
|
2310
|
+
u = I.prev;
|
|
2311
|
+
var ke = c[0], W = c[c.length - 1];
|
|
2312
|
+
for (C = 0; C < c.length; C += 1)
|
|
2313
|
+
It(c[C], I, r);
|
|
2314
|
+
for (C = 0; C < p.length; C += 1)
|
|
2315
|
+
a.delete(p[C]);
|
|
2316
|
+
Ue(e, ke.prev, W.next), Ue(e, u, ke), Ue(e, W, I), l = I, u = W, T -= 1, c = [], p = [];
|
|
2317
2317
|
} else
|
|
2318
|
-
|
|
2318
|
+
a.delete(d), It(d, l, r), Ue(e, d.prev, d.next), Ue(e, d, u === null ? e.effect.first : u.next), Ue(e, u, d), u = d;
|
|
2319
2319
|
continue;
|
|
2320
2320
|
}
|
|
2321
|
-
for (c = [],
|
|
2322
|
-
(
|
|
2321
|
+
for (c = [], p = []; l !== null && l !== d; )
|
|
2322
|
+
(a ?? (a = /* @__PURE__ */ new Set())).add(l), p.push(l), l = Pt(l.next);
|
|
2323
2323
|
if (l === null)
|
|
2324
2324
|
continue;
|
|
2325
2325
|
}
|
|
2326
|
-
(d.f &
|
|
2326
|
+
(d.f & ze) === 0 && c.push(d), u = d, l = Pt(d.next);
|
|
2327
2327
|
}
|
|
2328
2328
|
if (e.outrogroups !== null) {
|
|
2329
2329
|
for (const V of e.outrogroups)
|
|
2330
2330
|
V.pending.size === 0 && (Dr(dr(V.done)), e.outrogroups?.delete(V));
|
|
2331
2331
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
2332
2332
|
}
|
|
2333
|
-
if (l !== null ||
|
|
2334
|
-
var
|
|
2335
|
-
if (
|
|
2336
|
-
for (d of
|
|
2337
|
-
(d.f &
|
|
2333
|
+
if (l !== null || a !== void 0) {
|
|
2334
|
+
var re = [];
|
|
2335
|
+
if (a !== void 0)
|
|
2336
|
+
for (d of a)
|
|
2337
|
+
(d.f & te) === 0 && re.push(d);
|
|
2338
2338
|
for (; l !== null; )
|
|
2339
|
-
(l.f &
|
|
2340
|
-
var
|
|
2341
|
-
if (
|
|
2339
|
+
(l.f & te) === 0 && l !== e.fallback && re.push(l), l = Pt(l.next);
|
|
2340
|
+
var X = re.length;
|
|
2341
|
+
if (X > 0) {
|
|
2342
2342
|
var xe = s === 0 ? r : null;
|
|
2343
|
-
|
|
2343
|
+
io(e, re, xe);
|
|
2344
2344
|
}
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2348
|
-
var
|
|
2347
|
+
function lo(e, t, r, n, i, s, o, l) {
|
|
2348
|
+
var a = (o & zi) !== 0 ? (o & Ki) === 0 ? /* @__PURE__ */ Wn(r, !1, !1) : pt(r) : null, u = (o & Gi) !== 0 ? pt(i) : null;
|
|
2349
2349
|
return {
|
|
2350
|
-
v:
|
|
2350
|
+
v: a,
|
|
2351
2351
|
i: u,
|
|
2352
|
-
e: ve(() => (s(t,
|
|
2352
|
+
e: ve(() => (s(t, a ?? r, u ?? i, l), () => {
|
|
2353
2353
|
e.delete(n);
|
|
2354
2354
|
}))
|
|
2355
2355
|
};
|
|
2356
2356
|
}
|
|
2357
2357
|
function It(e, t, r) {
|
|
2358
2358
|
if (e.nodes)
|
|
2359
|
-
for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f &
|
|
2359
|
+
for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f & ze) === 0 ? (
|
|
2360
2360
|
/** @type {EffectNodes} */
|
|
2361
2361
|
t.nodes.start
|
|
2362
2362
|
) : r; n !== null; ) {
|
|
@@ -2369,52 +2369,52 @@ function It(e, t, r) {
|
|
|
2369
2369
|
n = o;
|
|
2370
2370
|
}
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2372
|
+
function Ue(e, t, r) {
|
|
2373
2373
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2375
|
+
function ao(e, t, r = !1, n = !1, i = !1) {
|
|
2376
2376
|
var s = e, o = "";
|
|
2377
|
-
|
|
2377
|
+
Me(() => {
|
|
2378
2378
|
var l = (
|
|
2379
2379
|
/** @type {Effect} */
|
|
2380
2380
|
$
|
|
2381
2381
|
);
|
|
2382
2382
|
if (o === (o = t() ?? "")) {
|
|
2383
|
-
x &&
|
|
2383
|
+
x && Rt();
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
|
-
if (l.nodes !== null && (
|
|
2386
|
+
if (l.nodes !== null && (ai(
|
|
2387
2387
|
l.nodes.start,
|
|
2388
2388
|
/** @type {TemplateNode} */
|
|
2389
2389
|
l.nodes.end
|
|
2390
2390
|
), l.nodes = null), o !== "") {
|
|
2391
2391
|
if (x) {
|
|
2392
2392
|
E.data;
|
|
2393
|
-
for (var
|
|
2394
|
-
|
|
2395
|
-
u =
|
|
2396
|
-
if (
|
|
2397
|
-
throw Kt(),
|
|
2398
|
-
|
|
2393
|
+
for (var a = Rt(), u = a; a !== null && (a.nodeType !== Ot || /** @type {Comment} */
|
|
2394
|
+
a.data !== ""); )
|
|
2395
|
+
u = a, a = /* @__PURE__ */ $e(a);
|
|
2396
|
+
if (a === null)
|
|
2397
|
+
throw Kt(), ht;
|
|
2398
|
+
We(E, u), s = Z(a);
|
|
2399
2399
|
return;
|
|
2400
2400
|
}
|
|
2401
2401
|
var c = o + "";
|
|
2402
2402
|
r ? c = `<svg>${c}</svg>` : n && (c = `<math>${c}</math>`);
|
|
2403
|
-
var
|
|
2404
|
-
if ((r || n) && (
|
|
2405
|
-
/* @__PURE__ */ be(
|
|
2403
|
+
var p = yi(c);
|
|
2404
|
+
if ((r || n) && (p = /** @type {Element} */
|
|
2405
|
+
/* @__PURE__ */ be(p)), We(
|
|
2406
2406
|
/** @type {TemplateNode} */
|
|
2407
|
-
/* @__PURE__ */ be(
|
|
2407
|
+
/* @__PURE__ */ be(p),
|
|
2408
2408
|
/** @type {TemplateNode} */
|
|
2409
|
-
|
|
2409
|
+
p.lastChild
|
|
2410
2410
|
), r || n)
|
|
2411
|
-
for (; /* @__PURE__ */ be(
|
|
2411
|
+
for (; /* @__PURE__ */ be(p); )
|
|
2412
2412
|
s.before(
|
|
2413
2413
|
/** @type {TemplateNode} */
|
|
2414
|
-
/* @__PURE__ */ be(
|
|
2414
|
+
/* @__PURE__ */ be(p)
|
|
2415
2415
|
);
|
|
2416
2416
|
else
|
|
2417
|
-
s.before(
|
|
2417
|
+
s.before(p);
|
|
2418
2418
|
}
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
@@ -2439,7 +2439,7 @@ function fo(e, t) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
const mn = [...`
|
|
2441
2441
|
\r\f \v\uFEFF`];
|
|
2442
|
-
function
|
|
2442
|
+
function uo(e, t, r) {
|
|
2443
2443
|
var n = e == null ? "" : "" + e;
|
|
2444
2444
|
if (t && (n = n ? n + " " + t : t), r) {
|
|
2445
2445
|
for (var i in r)
|
|
@@ -2456,24 +2456,24 @@ function ao(e, t, r) {
|
|
|
2456
2456
|
function wn(e, t, r, n, i, s) {
|
|
2457
2457
|
var o = e.__className;
|
|
2458
2458
|
if (x || o !== r || o === void 0) {
|
|
2459
|
-
var l =
|
|
2459
|
+
var l = uo(r, n, s);
|
|
2460
2460
|
(!x || l !== e.getAttribute("class")) && (l == null ? e.removeAttribute("class") : e.className = l), e.__className = r;
|
|
2461
2461
|
} else if (s && i !== s)
|
|
2462
|
-
for (var
|
|
2463
|
-
var u = !!s[
|
|
2464
|
-
(i == null || u !== !!i[
|
|
2462
|
+
for (var a in s) {
|
|
2463
|
+
var u = !!s[a];
|
|
2464
|
+
(i == null || u !== !!i[a]) && e.classList.toggle(a, u);
|
|
2465
2465
|
}
|
|
2466
2466
|
return s;
|
|
2467
2467
|
}
|
|
2468
|
-
const
|
|
2468
|
+
const co = /* @__PURE__ */ Symbol("is custom element"), ho = /* @__PURE__ */ Symbol("is html"), vo = ls ? "link" : "LINK";
|
|
2469
2469
|
function Vt(e, t, r, n) {
|
|
2470
|
-
var i =
|
|
2471
|
-
x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName ===
|
|
2470
|
+
var i = po(e);
|
|
2471
|
+
x && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === vo) || i[t] !== (i[t] = r) && (t === "loading" && (e[os] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ti(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2473
|
+
function ne(e, t, r) {
|
|
2474
2474
|
var n = y, i = $;
|
|
2475
2475
|
let s = x;
|
|
2476
|
-
x && _e(!1),
|
|
2476
|
+
x && _e(!1), K(null), ue(null);
|
|
2477
2477
|
try {
|
|
2478
2478
|
// `style` should use `set_attribute` rather than the setter
|
|
2479
2479
|
t !== "style" && // Don't compute setters for custom elements while they aren't registered yet,
|
|
@@ -2482,16 +2482,16 @@ function re(e, t, r) {
|
|
|
2482
2482
|
(Fr.has(e.getAttribute("is") || e.nodeName) || // customElements may not be available in browser extension contexts
|
|
2483
2483
|
!customElements || customElements.get(e.getAttribute("is") || e.nodeName.toLowerCase()) ? Ti(e).includes(t) : r && typeof r == "object") ? e[t] = r : Vt(e, t, r == null ? r : String(r));
|
|
2484
2484
|
} finally {
|
|
2485
|
-
|
|
2485
|
+
K(n), ue(i), s && _e(!0);
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function po(e) {
|
|
2489
2489
|
return (
|
|
2490
2490
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2491
2491
|
// @ts-expect-error
|
|
2492
2492
|
e.__attributes ?? (e.__attributes = {
|
|
2493
|
-
[
|
|
2494
|
-
[
|
|
2493
|
+
[co]: e.nodeName.includes("-"),
|
|
2494
|
+
[ho]: e.namespaceURI === xn
|
|
2495
2495
|
})
|
|
2496
2496
|
);
|
|
2497
2497
|
}
|
|
@@ -2501,7 +2501,7 @@ function Ti(e) {
|
|
|
2501
2501
|
if (r) return r;
|
|
2502
2502
|
Fr.set(t, r = []);
|
|
2503
2503
|
for (var n, i = e, s = Element.prototype; s !== i; ) {
|
|
2504
|
-
n =
|
|
2504
|
+
n = Qi(i);
|
|
2505
2505
|
for (var o in n)
|
|
2506
2506
|
n[o].set && r.push(o);
|
|
2507
2507
|
i = Tn(i);
|
|
@@ -2511,7 +2511,7 @@ function Ti(e) {
|
|
|
2511
2511
|
function yn(e, t) {
|
|
2512
2512
|
return e === t || e?.[rr] === t;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2514
|
+
function gt(e = {}, t, r, n) {
|
|
2515
2515
|
return oi(() => {
|
|
2516
2516
|
var i, s;
|
|
2517
2517
|
return Yr(() => {
|
|
@@ -2519,7 +2519,7 @@ function _t(e = {}, t, r, n) {
|
|
|
2519
2519
|
e !== r(...s) && (t(e, ...s), i && yn(r(...i), e) && t(null, ...i));
|
|
2520
2520
|
});
|
|
2521
2521
|
}), () => {
|
|
2522
|
-
|
|
2522
|
+
ut(() => {
|
|
2523
2523
|
s && yn(r(...s), e) && t(null, ...s);
|
|
2524
2524
|
});
|
|
2525
2525
|
};
|
|
@@ -2533,15 +2533,15 @@ function tr(e, t, r, n) {
|
|
|
2533
2533
|
n), i), l;
|
|
2534
2534
|
l = /** @type {V} */
|
|
2535
2535
|
e[t], l === void 0 && n !== void 0 && (l = o());
|
|
2536
|
-
var
|
|
2537
|
-
|
|
2536
|
+
var a;
|
|
2537
|
+
a = () => {
|
|
2538
2538
|
var h = (
|
|
2539
2539
|
/** @type {V} */
|
|
2540
2540
|
e[t]
|
|
2541
2541
|
);
|
|
2542
2542
|
return h === void 0 ? o() : (s = !0, h);
|
|
2543
2543
|
};
|
|
2544
|
-
var u = !1, c = /* @__PURE__ */ _r(() => (u = !1,
|
|
2544
|
+
var u = !1, c = /* @__PURE__ */ _r(() => (u = !1, a())), p = (
|
|
2545
2545
|
/** @type {Effect} */
|
|
2546
2546
|
$
|
|
2547
2547
|
);
|
|
@@ -2549,18 +2549,18 @@ function tr(e, t, r, n) {
|
|
|
2549
2549
|
/** @type {() => V} */
|
|
2550
2550
|
(function(h, _) {
|
|
2551
2551
|
if (arguments.length > 0) {
|
|
2552
|
-
const d = _ ?
|
|
2553
|
-
return
|
|
2552
|
+
const d = _ ? v(c) : h;
|
|
2553
|
+
return R(c, d), u = !0, i !== void 0 && (i = d), h;
|
|
2554
2554
|
}
|
|
2555
|
-
return
|
|
2555
|
+
return Xe && u || (p.f & Be) !== 0 ? c.v : v(c);
|
|
2556
2556
|
})
|
|
2557
2557
|
);
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return new
|
|
2559
|
+
function _o(e) {
|
|
2560
|
+
return new go(e);
|
|
2561
2561
|
}
|
|
2562
|
-
var
|
|
2563
|
-
class
|
|
2562
|
+
var Ve, oe;
|
|
2563
|
+
class go {
|
|
2564
2564
|
/**
|
|
2565
2565
|
* @param {ComponentConstructorOptions & {
|
|
2566
2566
|
* component: any;
|
|
@@ -2568,9 +2568,9 @@ class _o {
|
|
|
2568
2568
|
*/
|
|
2569
2569
|
constructor(t) {
|
|
2570
2570
|
/** @type {any} */
|
|
2571
|
-
w(this,
|
|
2571
|
+
w(this, Ve);
|
|
2572
2572
|
/** @type {Record<string, any>} */
|
|
2573
|
-
w(this,
|
|
2573
|
+
w(this, oe);
|
|
2574
2574
|
var r = /* @__PURE__ */ new Map(), n = (s, o) => {
|
|
2575
2575
|
var l = /* @__PURE__ */ Wn(o, !1, !1);
|
|
2576
2576
|
return r.set(s, l), l;
|
|
@@ -2579,45 +2579,45 @@ class _o {
|
|
|
2579
2579
|
{ ...t.props || {}, $$events: {} },
|
|
2580
2580
|
{
|
|
2581
2581
|
get(s, o) {
|
|
2582
|
-
return
|
|
2582
|
+
return v(r.get(o) ?? n(o, Reflect.get(s, o)));
|
|
2583
2583
|
},
|
|
2584
2584
|
has(s, o) {
|
|
2585
|
-
return o ===
|
|
2585
|
+
return o === ss ? !0 : (v(r.get(o) ?? n(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
2586
2586
|
},
|
|
2587
2587
|
set(s, o, l) {
|
|
2588
|
-
return
|
|
2588
|
+
return R(r.get(o) ?? n(o, l), l), Reflect.set(s, o, l);
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
);
|
|
2592
|
-
b(this,
|
|
2592
|
+
b(this, oe, (t.hydrate ? eo : $i)(t.component, {
|
|
2593
2593
|
target: t.target,
|
|
2594
2594
|
anchor: t.anchor,
|
|
2595
2595
|
props: i,
|
|
2596
2596
|
context: t.context,
|
|
2597
2597
|
intro: t.intro ?? !1,
|
|
2598
2598
|
recover: t.recover
|
|
2599
|
-
})), (!t?.props?.$$host || t.sync === !1) && Dt(), b(this,
|
|
2600
|
-
for (const s of Object.keys(
|
|
2599
|
+
})), (!t?.props?.$$host || t.sync === !1) && Dt(), b(this, Ve, i.$$events);
|
|
2600
|
+
for (const s of Object.keys(f(this, oe)))
|
|
2601
2601
|
s === "$set" || s === "$destroy" || s === "$on" || lr(this, s, {
|
|
2602
2602
|
get() {
|
|
2603
|
-
return
|
|
2603
|
+
return f(this, oe)[s];
|
|
2604
2604
|
},
|
|
2605
2605
|
/** @param {any} value */
|
|
2606
2606
|
set(o) {
|
|
2607
|
-
|
|
2607
|
+
f(this, oe)[s] = o;
|
|
2608
2608
|
},
|
|
2609
2609
|
enumerable: !0
|
|
2610
2610
|
});
|
|
2611
|
-
|
|
2611
|
+
f(this, oe).$set = /** @param {Record<string, any>} next */
|
|
2612
2612
|
(s) => {
|
|
2613
2613
|
Object.assign(i, s);
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2614
|
+
}, f(this, oe).$destroy = () => {
|
|
2615
|
+
to(f(this, oe));
|
|
2616
2616
|
};
|
|
2617
2617
|
}
|
|
2618
2618
|
/** @param {Record<string, any>} props */
|
|
2619
2619
|
$set(t) {
|
|
2620
|
-
|
|
2620
|
+
f(this, oe).$set(t);
|
|
2621
2621
|
}
|
|
2622
2622
|
/**
|
|
2623
2623
|
* @param {string} event
|
|
@@ -2625,20 +2625,20 @@ class _o {
|
|
|
2625
2625
|
* @returns {any}
|
|
2626
2626
|
*/
|
|
2627
2627
|
$on(t, r) {
|
|
2628
|
-
|
|
2628
|
+
f(this, Ve)[t] = f(this, Ve)[t] || [];
|
|
2629
2629
|
const n = (...i) => r.call(this, ...i);
|
|
2630
|
-
return
|
|
2631
|
-
|
|
2630
|
+
return f(this, Ve)[t].push(n), () => {
|
|
2631
|
+
f(this, Ve)[t] = f(this, Ve)[t].filter(
|
|
2632
2632
|
/** @param {any} fn */
|
|
2633
2633
|
(i) => i !== n
|
|
2634
2634
|
);
|
|
2635
2635
|
};
|
|
2636
2636
|
}
|
|
2637
2637
|
$destroy() {
|
|
2638
|
-
|
|
2638
|
+
f(this, oe).$destroy();
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
|
|
2641
|
+
Ve = new WeakMap(), oe = new WeakMap();
|
|
2642
2642
|
let Ai;
|
|
2643
2643
|
typeof HTMLElement == "function" && (Ai = class extends HTMLElement {
|
|
2644
2644
|
/**
|
|
@@ -2705,7 +2705,7 @@ typeof HTMLElement == "function" && (Ai = class extends HTMLElement {
|
|
|
2705
2705
|
};
|
|
2706
2706
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2707
2707
|
return;
|
|
2708
|
-
const r = {}, n =
|
|
2708
|
+
const r = {}, n = bo(this);
|
|
2709
2709
|
for (const i of this.$$s)
|
|
2710
2710
|
i in n && (i === "default" && !this.$$d.children ? (this.$$d.children = t(i), r.default = !0) : r[i] = t(i));
|
|
2711
2711
|
for (const i of this.attributes) {
|
|
@@ -2714,7 +2714,7 @@ typeof HTMLElement == "function" && (Ai = class extends HTMLElement {
|
|
|
2714
2714
|
}
|
|
2715
2715
|
for (const i in this.$$p_d)
|
|
2716
2716
|
!(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
2717
|
-
this.$$c =
|
|
2717
|
+
this.$$c = _o({
|
|
2718
2718
|
component: this.$$ctor,
|
|
2719
2719
|
target: this.$$shadowRoot || this,
|
|
2720
2720
|
props: {
|
|
@@ -2801,7 +2801,7 @@ function sr(e, t, r, n) {
|
|
|
2801
2801
|
return t;
|
|
2802
2802
|
}
|
|
2803
2803
|
}
|
|
2804
|
-
function
|
|
2804
|
+
function bo(e) {
|
|
2805
2805
|
const t = {};
|
|
2806
2806
|
return e.childNodes.forEach((r) => {
|
|
2807
2807
|
t[
|
|
@@ -2810,7 +2810,7 @@ function go(e) {
|
|
|
2810
2810
|
] = !0;
|
|
2811
2811
|
}), t;
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function mo(e, t, r, n, i, s) {
|
|
2814
2814
|
let o = class extends Ai {
|
|
2815
2815
|
constructor() {
|
|
2816
2816
|
super(e, r, i), this.$$p_d = t;
|
|
@@ -2826,12 +2826,12 @@ function bo(e, t, r, n, i, s) {
|
|
|
2826
2826
|
get() {
|
|
2827
2827
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
2828
2828
|
},
|
|
2829
|
-
set(
|
|
2830
|
-
|
|
2829
|
+
set(a) {
|
|
2830
|
+
a = sr(l, a, t), this.$$d[l] = a;
|
|
2831
2831
|
var u = this.$$c;
|
|
2832
2832
|
if (u) {
|
|
2833
|
-
var c =
|
|
2834
|
-
c ? u[l] =
|
|
2833
|
+
var c = bt(u, l)?.get;
|
|
2834
|
+
c ? u[l] = a : u.$set({ [l]: a });
|
|
2835
2835
|
}
|
|
2836
2836
|
}
|
|
2837
2837
|
});
|
|
@@ -2844,8 +2844,8 @@ function bo(e, t, r, n, i, s) {
|
|
|
2844
2844
|
}), e.element = /** @type {any} */
|
|
2845
2845
|
o, o;
|
|
2846
2846
|
}
|
|
2847
|
-
var
|
|
2848
|
-
const
|
|
2847
|
+
var wo = /* @__PURE__ */ Qe('<button type="button"><!></button>'), yo = /* @__PURE__ */ Qe("<pie-tool-graph></pie-tool-graph>", 2), $o = /* @__PURE__ */ Qe("<pie-tool-periodic-table></pie-tool-periodic-table>", 2), xo = /* @__PURE__ */ Qe("<pie-tool-protractor></pie-tool-protractor>", 2), Eo = /* @__PURE__ */ Qe("<pie-tool-line-reader></pie-tool-line-reader>", 2), To = /* @__PURE__ */ Qe("<pie-tool-magnifier></pie-tool-magnifier>", 2), Ao = /* @__PURE__ */ Qe("<pie-tool-ruler></pie-tool-ruler>", 2), So = /* @__PURE__ */ Qe('<div role="toolbar" aria-label="Assessment tools"><div class="tools-buttons svelte-x5tssx"></div></div> <!> <!> <!> <!> <!> <!> <div role="status" aria-live="polite" aria-atomic="true" class="sr-only svelte-x5tssx"> </div>', 1);
|
|
2848
|
+
const Ro = {
|
|
2849
2849
|
hash: "svelte-x5tssx",
|
|
2850
2850
|
code: `
|
|
2851
2851
|
/* Base toolbar styles */.section-tools-toolbar.svelte-x5tssx {display:flex;align-items:center;padding:0.75rem 1rem;background-color:var(--pie-background, #ffffff);gap:1rem;flex-shrink:0;}
|
|
@@ -2873,88 +2873,92 @@ const So = {
|
|
|
2873
2873
|
/* Screen reader only content */.sr-only.svelte-x5tssx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}`
|
|
2874
2874
|
};
|
|
2875
2875
|
function Co(e, t) {
|
|
2876
|
-
Mn(t, !0), fo(e,
|
|
2876
|
+
Mn(t, !0), fo(e, Ro);
|
|
2877
2877
|
const r = typeof window < "u";
|
|
2878
|
-
let n = tr(t, "enabledTools", 7, "graph,periodicTable,protractor,lineReader,magnifier,ruler"), i = tr(t, "position", 7, "bottom"), s = tr(t, "toolCoordinator"), o = tr(t, "toolProviderRegistry"), l = /* @__PURE__ */
|
|
2879
|
-
function
|
|
2880
|
-
s() && (
|
|
2878
|
+
let n = tr(t, "enabledTools", 7, "graph,periodicTable,protractor,lineReader,magnifier,ruler"), i = tr(t, "position", 7, "bottom"), s = tr(t, "toolCoordinator"), o = tr(t, "toolProviderRegistry"), l = /* @__PURE__ */ Le(() => n().split(",").map((M) => M.trim()).filter(Boolean)), a = /* @__PURE__ */ Le(() => v(l).length > 0), u = /* @__PURE__ */ N(!1), c = /* @__PURE__ */ N(!1), p = /* @__PURE__ */ N(!1), h = /* @__PURE__ */ N(!1), _ = /* @__PURE__ */ N(!1), d = /* @__PURE__ */ N(!1), T = /* @__PURE__ */ N("");
|
|
2879
|
+
function g() {
|
|
2880
|
+
s() && (R(u, s().isToolVisible("graph"), !0), R(c, s().isToolVisible("periodicTable"), !0), R(p, s().isToolVisible("protractor"), !0), R(h, s().isToolVisible("lineReader"), !0), R(_, s().isToolVisible("magnifier"), !0), R(d, s().isToolVisible("ruler"), !0));
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function I(M) {
|
|
2883
2883
|
if (!s()) return;
|
|
2884
|
-
s().toggleTool(M),
|
|
2885
|
-
const
|
|
2886
|
-
if (
|
|
2887
|
-
const
|
|
2888
|
-
|
|
2884
|
+
s().toggleTool(M), g();
|
|
2885
|
+
const ce = v(ke).find((Ne) => Ne.id === M);
|
|
2886
|
+
if (ce) {
|
|
2887
|
+
const Ne = s().isToolVisible(M);
|
|
2888
|
+
R(T, `${ce.label} ${Ne ? "opened" : "closed"}`);
|
|
2889
2889
|
}
|
|
2890
2890
|
}
|
|
2891
|
-
let
|
|
2891
|
+
let C = null;
|
|
2892
2892
|
Ei(() => {
|
|
2893
|
-
r &&
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2893
|
+
if (r && v(a)) {
|
|
2894
|
+
const M = {
|
|
2895
|
+
calculator: "@pie-players/pie-tool-calculator",
|
|
2896
|
+
graph: "@pie-players/pie-tool-graph",
|
|
2897
|
+
periodicTable: "@pie-players/pie-tool-periodic-table",
|
|
2898
|
+
protractor: "@pie-players/pie-tool-protractor",
|
|
2899
|
+
lineReader: "@pie-players/pie-tool-line-reader",
|
|
2900
|
+
magnifier: "@pie-players/pie-tool-magnifier",
|
|
2901
|
+
ruler: "@pie-players/pie-tool-ruler"
|
|
2902
|
+
};
|
|
2903
|
+
Promise.all(v(l).map((ce) => M[ce]).filter(Boolean).map((ce) => import(ce))).catch((ce) => {
|
|
2904
|
+
console.error("[SectionToolsToolbar] Failed to load tool web components:", ce);
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
s() && (g(), C = s().subscribe(() => {
|
|
2908
|
+
g();
|
|
2905
2909
|
}));
|
|
2906
|
-
}),
|
|
2907
|
-
|
|
2910
|
+
}), no(() => {
|
|
2911
|
+
C?.();
|
|
2908
2912
|
});
|
|
2909
|
-
const
|
|
2913
|
+
const ke = /* @__PURE__ */ Le(() => [
|
|
2910
2914
|
{
|
|
2911
2915
|
id: "graph",
|
|
2912
2916
|
ariaLabel: "Graphing tool",
|
|
2913
|
-
visible:
|
|
2914
|
-
enabled:
|
|
2917
|
+
visible: v(u),
|
|
2918
|
+
enabled: v(l).includes("graph"),
|
|
2915
2919
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z" fill="currentColor"/></svg>'
|
|
2916
2920
|
},
|
|
2917
2921
|
{
|
|
2918
2922
|
id: "periodicTable",
|
|
2919
2923
|
ariaLabel: "Periodic table of elements",
|
|
2920
|
-
visible:
|
|
2921
|
-
enabled:
|
|
2924
|
+
visible: v(c),
|
|
2925
|
+
enabled: v(l).includes("periodicTable"),
|
|
2922
2926
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z" fill="currentColor"/></svg>'
|
|
2923
2927
|
},
|
|
2924
2928
|
{
|
|
2925
2929
|
id: "protractor",
|
|
2926
2930
|
ariaLabel: "Angle measurement tool",
|
|
2927
|
-
visible: p
|
|
2928
|
-
enabled:
|
|
2931
|
+
visible: v(p),
|
|
2932
|
+
enabled: v(l).includes("protractor"),
|
|
2929
2933
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z" fill="currentColor"/></svg>'
|
|
2930
2934
|
},
|
|
2931
2935
|
{
|
|
2932
2936
|
id: "lineReader",
|
|
2933
2937
|
ariaLabel: "Line reading guide",
|
|
2934
|
-
visible:
|
|
2935
|
-
enabled:
|
|
2938
|
+
visible: v(h),
|
|
2939
|
+
enabled: v(l).includes("lineReader"),
|
|
2936
2940
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z" fill="currentColor"/></svg>'
|
|
2937
2941
|
},
|
|
2938
2942
|
{
|
|
2939
2943
|
id: "magnifier",
|
|
2940
2944
|
ariaLabel: "Text magnification tool",
|
|
2941
|
-
visible:
|
|
2942
|
-
enabled:
|
|
2945
|
+
visible: v(_),
|
|
2946
|
+
enabled: v(l).includes("magnifier"),
|
|
2943
2947
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10.5 5.5c-1.813 0-3.438.969-4.344 2.5a4.937 4.937 0 0 0 0 5 4.974 4.974 0 0 0 4.344 2.5 4.96 4.96 0 0 0 4.313-2.5 4.937 4.937 0 0 0 0-5c-.908-1.531-2.533-2.5-4.313-2.5Zm0 11.5A6.495 6.495 0 0 1 4 10.5C4 6.937 6.906 4 10.5 4c3.563 0 6.5 2.938 6.5 6.5a6.597 6.597 0 0 1-1.406 4.063l4.156 4.187a.685.685 0 0 1 0 1.031.685.685 0 0 1-1.031 0l-4.188-4.156A6.548 6.548 0 0 1 10.5 17Zm-.75-3.75v-2h-2A.723.723 0 0 1 7 10.5a.74.74 0 0 1 .75-.75h2v-2A.74.74 0 0 1 10.5 7a.76.76 0 0 1 .75.75v2h2a.76.76 0 0 1 .696 1.039.741.741 0 0 1-.696.461h-2v2a.74.74 0 0 1-.75.75.723.723 0 0 1-.75-.75Z" fill="currentColor"/></svg>'
|
|
2944
2948
|
},
|
|
2945
2949
|
{
|
|
2946
2950
|
id: "ruler",
|
|
2947
2951
|
ariaLabel: "Measurement ruler",
|
|
2948
|
-
visible:
|
|
2949
|
-
enabled:
|
|
2952
|
+
visible: v(d),
|
|
2953
|
+
enabled: v(l).includes("ruler"),
|
|
2950
2954
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z" fill="currentColor"/></svg>'
|
|
2951
2955
|
}
|
|
2952
2956
|
]);
|
|
2953
|
-
let
|
|
2957
|
+
let W = /* @__PURE__ */ N(null), re = /* @__PURE__ */ N(null), X = /* @__PURE__ */ N(null), xe = /* @__PURE__ */ N(null), V = /* @__PURE__ */ N(null), q = /* @__PURE__ */ N(null);
|
|
2954
2958
|
ii(() => {
|
|
2955
|
-
s() && (
|
|
2959
|
+
s() && (v(W) && (v(W).coordinator = s()), v(re) && (v(re).coordinator = s()), v(X) && (v(X).coordinator = s()), v(xe) && (v(xe).coordinator = s()), v(V) && (v(V).coordinator = s()), v(q) && (v(q).coordinator = s()));
|
|
2956
2960
|
});
|
|
2957
|
-
var
|
|
2961
|
+
var br = {
|
|
2958
2962
|
get enabledTools() {
|
|
2959
2963
|
return n();
|
|
2960
2964
|
},
|
|
@@ -2979,107 +2983,107 @@ function Co(e, t) {
|
|
|
2979
2983
|
set toolProviderRegistry(M) {
|
|
2980
2984
|
o(M), Dt();
|
|
2981
2985
|
}
|
|
2982
|
-
}, Xt = gn(),
|
|
2986
|
+
}, Xt = gn(), Si = $r(Xt);
|
|
2983
2987
|
{
|
|
2984
|
-
var
|
|
2985
|
-
var
|
|
2988
|
+
var Ri = (M) => {
|
|
2989
|
+
var ce = So(), Ne = $r(ce);
|
|
2986
2990
|
let Xr;
|
|
2987
|
-
var Jr = yr(
|
|
2988
|
-
|
|
2989
|
-
var
|
|
2991
|
+
var Jr = yr(Ne);
|
|
2992
|
+
so(Jr, 21, () => v(ke), (A) => A.id, (A, m) => {
|
|
2993
|
+
var U = gn(), Zi = $r(U);
|
|
2990
2994
|
{
|
|
2991
|
-
var
|
|
2992
|
-
var
|
|
2995
|
+
var ji = (mr) => {
|
|
2996
|
+
var je = wo();
|
|
2993
2997
|
let ln;
|
|
2994
|
-
var
|
|
2995
|
-
|
|
2996
|
-
ln = wn(
|
|
2997
|
-
}),
|
|
2998
|
+
var qi = yr(je);
|
|
2999
|
+
ao(qi, () => v(m).svg), Jt(je), Me(() => {
|
|
3000
|
+
ln = wn(je, 1, "tool-button svelte-x5tssx", null, ln, { active: v(m).visible }), Vt(je, "title", v(m).ariaLabel), Vt(je, "aria-label", v(m).ariaLabel), Vt(je, "aria-pressed", v(m).visible);
|
|
3001
|
+
}), zs("click", je, () => I(v(m).id)), de(mr, je);
|
|
2998
3002
|
};
|
|
2999
|
-
|
|
3000
|
-
|
|
3003
|
+
qe(Zi, (mr) => {
|
|
3004
|
+
v(m).enabled && mr(ji);
|
|
3001
3005
|
});
|
|
3002
3006
|
}
|
|
3003
|
-
de(A,
|
|
3004
|
-
}), Jt(Jr), Jt(
|
|
3005
|
-
var Qr =
|
|
3007
|
+
de(A, U);
|
|
3008
|
+
}), Jt(Jr), Jt(Ne);
|
|
3009
|
+
var Qr = et(Ne, 2);
|
|
3006
3010
|
{
|
|
3007
3011
|
var Ci = (A) => {
|
|
3008
|
-
var m = wo();
|
|
3009
|
-
Ne(() => re(m, "visible", p(f))), re(m, "tool-id", "graph"), _t(m, (q) => C(ue, q), () => p(ue)), de(A, m);
|
|
3010
|
-
}, Ri = /* @__PURE__ */ Ze(() => p(l).includes("graph"));
|
|
3011
|
-
je(Qr, (A) => {
|
|
3012
|
-
p(Ri) && A(Ci);
|
|
3013
|
-
});
|
|
3014
|
-
}
|
|
3015
|
-
var en = Qe(Qr, 2);
|
|
3016
|
-
{
|
|
3017
|
-
var ki = (A) => {
|
|
3018
3012
|
var m = yo();
|
|
3019
|
-
|
|
3020
|
-
},
|
|
3021
|
-
|
|
3022
|
-
|
|
3013
|
+
Me(() => ne(m, "visible", v(u))), ne(m, "tool-id", "graph"), gt(m, (U) => R(W, U), () => v(W)), de(A, m);
|
|
3014
|
+
}, ki = /* @__PURE__ */ Le(() => v(l).includes("graph"));
|
|
3015
|
+
qe(Qr, (A) => {
|
|
3016
|
+
v(ki) && A(Ci);
|
|
3023
3017
|
});
|
|
3024
3018
|
}
|
|
3025
|
-
var
|
|
3019
|
+
var en = et(Qr, 2);
|
|
3026
3020
|
{
|
|
3027
|
-
var
|
|
3021
|
+
var Ni = (A) => {
|
|
3028
3022
|
var m = $o();
|
|
3029
|
-
|
|
3030
|
-
},
|
|
3031
|
-
|
|
3032
|
-
|
|
3023
|
+
Me(() => ne(m, "visible", v(c))), ne(m, "tool-id", "periodicTable"), gt(m, (U) => R(re, U), () => v(re)), de(A, m);
|
|
3024
|
+
}, Li = /* @__PURE__ */ Le(() => v(l).includes("periodicTable"));
|
|
3025
|
+
qe(en, (A) => {
|
|
3026
|
+
v(Li) && A(Ni);
|
|
3033
3027
|
});
|
|
3034
3028
|
}
|
|
3035
|
-
var
|
|
3029
|
+
var tn = et(en, 2);
|
|
3036
3030
|
{
|
|
3037
|
-
var
|
|
3031
|
+
var Mi = (A) => {
|
|
3038
3032
|
var m = xo();
|
|
3039
|
-
|
|
3040
|
-
},
|
|
3041
|
-
|
|
3042
|
-
|
|
3033
|
+
Me(() => ne(m, "visible", v(p))), ne(m, "tool-id", "protractor"), gt(m, (U) => R(X, U), () => v(X)), de(A, m);
|
|
3034
|
+
}, Oi = /* @__PURE__ */ Le(() => v(l).includes("protractor"));
|
|
3035
|
+
qe(tn, (A) => {
|
|
3036
|
+
v(Oi) && A(Mi);
|
|
3043
3037
|
});
|
|
3044
3038
|
}
|
|
3045
|
-
var
|
|
3039
|
+
var rn = et(tn, 2);
|
|
3046
3040
|
{
|
|
3047
|
-
var
|
|
3041
|
+
var Pi = (A) => {
|
|
3048
3042
|
var m = Eo();
|
|
3049
|
-
|
|
3050
|
-
},
|
|
3051
|
-
|
|
3052
|
-
|
|
3043
|
+
Me(() => ne(m, "visible", v(h))), ne(m, "tool-id", "lineReader"), gt(m, (U) => R(xe, U), () => v(xe)), de(A, m);
|
|
3044
|
+
}, Di = /* @__PURE__ */ Le(() => v(l).includes("lineReader"));
|
|
3045
|
+
qe(rn, (A) => {
|
|
3046
|
+
v(Di) && A(Pi);
|
|
3053
3047
|
});
|
|
3054
3048
|
}
|
|
3055
|
-
var
|
|
3049
|
+
var nn = et(rn, 2);
|
|
3056
3050
|
{
|
|
3057
|
-
var
|
|
3051
|
+
var Fi = (A) => {
|
|
3058
3052
|
var m = To();
|
|
3059
|
-
|
|
3060
|
-
},
|
|
3061
|
-
|
|
3062
|
-
|
|
3053
|
+
Me(() => ne(m, "visible", v(_))), ne(m, "tool-id", "magnifier"), gt(m, (U) => R(V, U), () => v(V)), de(A, m);
|
|
3054
|
+
}, Ii = /* @__PURE__ */ Le(() => v(l).includes("magnifier"));
|
|
3055
|
+
qe(nn, (A) => {
|
|
3056
|
+
v(Ii) && A(Fi);
|
|
3057
|
+
});
|
|
3058
|
+
}
|
|
3059
|
+
var sn = et(nn, 2);
|
|
3060
|
+
{
|
|
3061
|
+
var Vi = (A) => {
|
|
3062
|
+
var m = Ao();
|
|
3063
|
+
Me(() => ne(m, "visible", v(d))), ne(m, "tool-id", "ruler"), gt(m, (U) => R(q, U), () => v(q)), de(A, m);
|
|
3064
|
+
}, Bi = /* @__PURE__ */ Le(() => v(l).includes("ruler"));
|
|
3065
|
+
qe(sn, (A) => {
|
|
3066
|
+
v(Bi) && A(Vi);
|
|
3063
3067
|
});
|
|
3064
3068
|
}
|
|
3065
|
-
var on =
|
|
3066
|
-
Jt(on),
|
|
3067
|
-
Xr = wn(
|
|
3069
|
+
var on = et(sn, 2), Hi = yr(on, !0);
|
|
3070
|
+
Jt(on), Me(() => {
|
|
3071
|
+
Xr = wn(Ne, 1, `section-tools-toolbar section-tools-toolbar--${i() ?? ""}`, "svelte-x5tssx", Xr, {
|
|
3068
3072
|
"section-tools-toolbar--top": i() === "top",
|
|
3069
3073
|
"section-tools-toolbar--right": i() === "right",
|
|
3070
3074
|
"section-tools-toolbar--bottom": i() === "bottom",
|
|
3071
3075
|
"section-tools-toolbar--left": i() === "left"
|
|
3072
|
-
}), Vt(
|
|
3073
|
-
}), de(M,
|
|
3076
|
+
}), Vt(Ne, "data-position", i()), Qs(Hi, v(T));
|
|
3077
|
+
}), de(M, ce);
|
|
3074
3078
|
};
|
|
3075
|
-
|
|
3076
|
-
r && M(
|
|
3079
|
+
qe(Si, (M) => {
|
|
3080
|
+
r && i() !== "none" && v(a) && M(Ri);
|
|
3077
3081
|
});
|
|
3078
3082
|
}
|
|
3079
|
-
return de(e, Xt), On(
|
|
3083
|
+
return de(e, Xt), On(br);
|
|
3080
3084
|
}
|
|
3081
|
-
|
|
3082
|
-
customElements.define("pie-section-tools-toolbar",
|
|
3085
|
+
Gs(["click"]);
|
|
3086
|
+
customElements.define("pie-section-tools-toolbar", mo(
|
|
3083
3087
|
Co,
|
|
3084
3088
|
{
|
|
3085
3089
|
enabledTools: { attribute: "enabled-tools", type: "String" },
|