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