@pie-players/pie-tool-theme 0.3.4 → 0.3.7
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/README.md +38 -0
- package/dist/tool-color-scheme.js +560 -598
- package/package.json +5 -5
- package/tool-color-scheme.svelte +10 -85
|
@@ -3,29 +3,29 @@ var Mi = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var En = (t, e, r) => e in t ? An(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
-
var
|
|
7
|
-
var u = (t, e, r) => (Dr(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
6
|
+
var p = (t, e, r) => En(t, typeof e != "symbol" ? e + "" : e, r), Dr = (t, e, r) => e.has(t) || Mi("Cannot " + r);
|
|
7
|
+
var u = (t, e, r) => (Dr(t, e, "read from private field"), r ? r.call(t) : e.get(t)), S = (t, e, r) => e.has(t) ? Mi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), k = (t, e, r, i) => (Dr(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r), C = (t, e, r) => (Dr(t, e, "access private method"), r);
|
|
8
8
|
var ao;
|
|
9
9
|
typeof window < "u" && ((ao = window.__svelte ?? (window.__svelte = {})).v ?? (ao.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
-
const $n = 1, Rn = 2, On = 16, Ln = 2, co = "[", ci = "[!",
|
|
11
|
-
var fo = Array.isArray, Cn = Array.prototype.indexOf, Mt = Array.prototype.includes, yr = Array.from,
|
|
12
|
-
const
|
|
10
|
+
const $n = 1, Rn = 2, On = 16, Ln = 2, co = "[", ci = "[!", Ni = "[?", ui = "]", Pt = {}, q = /* @__PURE__ */ Symbol(), uo = "http://www.w3.org/1999/xhtml", Br = !1;
|
|
11
|
+
var fo = Array.isArray, Cn = Array.prototype.indexOf, Mt = Array.prototype.includes, yr = Array.from, pr = Object.keys, vr = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Pn = Object.getOwnPropertyDescriptors, Mn = Object.prototype, Nn = Array.prototype, ho = Object.getPrototypeOf, xi = Object.isExtensible;
|
|
12
|
+
const xn = () => {
|
|
13
13
|
};
|
|
14
14
|
function Dn(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function po() {
|
|
19
19
|
var t, e, r = new Promise((i, o) => {
|
|
20
20
|
t = i, e = o;
|
|
21
21
|
});
|
|
22
22
|
return { promise: r, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const B = 2, Ht = 4,
|
|
24
|
+
const B = 2, Ht = 4, Nt = 8, fi = 1 << 24, Ze = 16, _e = 32, et = 64, jr = 128, ue = 512, F = 1024, H = 2048, ye = 4096, U = 8192, $e = 16384, gt = 32768, xt = 65536, Di = 1 << 17, Vn = 1 << 18, mt = 1 << 19, qn = 1 << 20, qe = 1 << 25, ht = 65536, zr = 1 << 21, di = 1 << 22, Ye = 1 << 23, lr = /* @__PURE__ */ Symbol("$state"), Fn = /* @__PURE__ */ Symbol("legacy props"), Hn = /* @__PURE__ */ Symbol(""), rt = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
p(this, "name", "StaleReactionError");
|
|
28
|
+
p(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
30
|
}(), Bn = (
|
|
31
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
@@ -73,36 +73,36 @@ function wr(t) {
|
|
|
73
73
|
function ts() {
|
|
74
74
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
75
75
|
}
|
|
76
|
-
let
|
|
76
|
+
let R = !1;
|
|
77
77
|
function Fe(t) {
|
|
78
|
-
|
|
78
|
+
R = t;
|
|
79
79
|
}
|
|
80
|
-
let
|
|
80
|
+
let E;
|
|
81
81
|
function Q(t) {
|
|
82
82
|
if (t === null)
|
|
83
83
|
throw wr(), Pt;
|
|
84
|
-
return
|
|
84
|
+
return E = t;
|
|
85
85
|
}
|
|
86
86
|
function kr() {
|
|
87
|
-
return Q(/* @__PURE__ */ Oe(
|
|
87
|
+
return Q(/* @__PURE__ */ Oe(E));
|
|
88
88
|
}
|
|
89
89
|
function j(t) {
|
|
90
|
-
if (
|
|
91
|
-
if (/* @__PURE__ */ Oe(
|
|
90
|
+
if (R) {
|
|
91
|
+
if (/* @__PURE__ */ Oe(E) !== null)
|
|
92
92
|
throw wr(), Pt;
|
|
93
|
-
|
|
93
|
+
E = t;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
function vo(t = 1) {
|
|
97
|
-
if (
|
|
98
|
-
for (var e = t, r =
|
|
97
|
+
if (R) {
|
|
98
|
+
for (var e = t, r = E; e--; )
|
|
99
99
|
r = /** @type {TemplateNode} */
|
|
100
100
|
/* @__PURE__ */ Oe(r);
|
|
101
|
-
|
|
101
|
+
E = r;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function gr(t = !0) {
|
|
105
|
-
for (var e = 0, r =
|
|
105
|
+
for (var e = 0, r = E; ; ) {
|
|
106
106
|
if (r.nodeType === tr) {
|
|
107
107
|
var i = (
|
|
108
108
|
/** @type {Comment} */
|
|
@@ -188,9 +188,9 @@ function os() {
|
|
|
188
188
|
ko();
|
|
189
189
|
}
|
|
190
190
|
function To(t) {
|
|
191
|
-
var e =
|
|
191
|
+
var e = $;
|
|
192
192
|
if (e === null)
|
|
193
|
-
return
|
|
193
|
+
return A.f |= Ye, t;
|
|
194
194
|
if ((e.f & gt) === 0 && (e.f & Ht) === 0)
|
|
195
195
|
throw t;
|
|
196
196
|
Ke(t, e);
|
|
@@ -212,78 +212,78 @@ function Ke(t, e) {
|
|
|
212
212
|
throw t;
|
|
213
213
|
}
|
|
214
214
|
const ns = -7169;
|
|
215
|
-
function
|
|
215
|
+
function M(t, e) {
|
|
216
216
|
t.f = t.f & ns | e;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
219
|
-
(t.f & ue) !== 0 || t.deps === null ?
|
|
218
|
+
function hi(t) {
|
|
219
|
+
(t.f & ue) !== 0 || t.deps === null ? M(t, F) : M(t, ye);
|
|
220
220
|
}
|
|
221
221
|
function Io(t) {
|
|
222
222
|
if (t !== null)
|
|
223
223
|
for (const e of t)
|
|
224
|
-
(e.f & B) === 0 || (e.f &
|
|
224
|
+
(e.f & B) === 0 || (e.f & ht) === 0 || (e.f ^= ht, Io(
|
|
225
225
|
/** @type {Derived} */
|
|
226
226
|
e.deps
|
|
227
227
|
));
|
|
228
228
|
}
|
|
229
229
|
function So(t, e, r) {
|
|
230
|
-
(t.f & H) !== 0 ? e.add(t) : (t.f & ye) !== 0 && r.add(t), Io(t.deps),
|
|
230
|
+
(t.f & H) !== 0 ? e.add(t) : (t.f & ye) !== 0 && r.add(t), Io(t.deps), M(t, F);
|
|
231
231
|
}
|
|
232
232
|
const ir = /* @__PURE__ */ new Set();
|
|
233
|
-
let
|
|
233
|
+
let L = null, me = null, K = [], Tr = null, Yt = !1, Vt = null, ss = 1;
|
|
234
234
|
var Ue, St, st, At, Et, $t, Ge, Te, Rt, J, Ur, Gr, Wr, Kr;
|
|
235
235
|
const Ei = class Ei {
|
|
236
236
|
constructor() {
|
|
237
|
-
|
|
237
|
+
S(this, J);
|
|
238
238
|
// for debugging. TODO remove once async is stable
|
|
239
|
-
|
|
239
|
+
p(this, "id", ss++);
|
|
240
240
|
/**
|
|
241
241
|
* The current values of any sources that are updated in this batch
|
|
242
242
|
* They keys of this map are identical to `this.#previous`
|
|
243
243
|
* @type {Map<Source, any>}
|
|
244
244
|
*/
|
|
245
|
-
|
|
245
|
+
p(this, "current", /* @__PURE__ */ new Map());
|
|
246
246
|
/**
|
|
247
247
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
248
248
|
* They keys of this map are identical to `this.#current`
|
|
249
249
|
* @type {Map<Source, any>}
|
|
250
250
|
*/
|
|
251
|
-
|
|
251
|
+
p(this, "previous", /* @__PURE__ */ new Map());
|
|
252
252
|
/**
|
|
253
253
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
254
254
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
255
255
|
* @type {Set<(batch: Batch) => void>}
|
|
256
256
|
*/
|
|
257
|
-
|
|
257
|
+
S(this, Ue, /* @__PURE__ */ new Set());
|
|
258
258
|
/**
|
|
259
259
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
260
260
|
* @type {Set<(batch: Batch) => void>}
|
|
261
261
|
*/
|
|
262
|
-
|
|
262
|
+
S(this, St, /* @__PURE__ */ new Set());
|
|
263
263
|
/**
|
|
264
264
|
* The number of async effects that are currently in flight
|
|
265
265
|
*/
|
|
266
|
-
|
|
266
|
+
S(this, st, 0);
|
|
267
267
|
/**
|
|
268
268
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
269
269
|
*/
|
|
270
|
-
|
|
270
|
+
S(this, At, 0);
|
|
271
271
|
/**
|
|
272
272
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
273
273
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
274
274
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
275
275
|
*/
|
|
276
|
-
|
|
276
|
+
S(this, Et, null);
|
|
277
277
|
/**
|
|
278
278
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
279
279
|
* @type {Set<Effect>}
|
|
280
280
|
*/
|
|
281
|
-
|
|
281
|
+
S(this, $t, /* @__PURE__ */ new Set());
|
|
282
282
|
/**
|
|
283
283
|
* Deferred effects that are MAYBE_DIRTY
|
|
284
284
|
* @type {Set<Effect>}
|
|
285
285
|
*/
|
|
286
|
-
|
|
286
|
+
S(this, Ge, /* @__PURE__ */ new Set());
|
|
287
287
|
/**
|
|
288
288
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
289
289
|
* is committed — we skip over these during `process`.
|
|
@@ -291,9 +291,9 @@ const Ei = class Ei {
|
|
|
291
291
|
* so they can be rescheduled if the branch survives.
|
|
292
292
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
293
293
|
*/
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
S(this, Te, /* @__PURE__ */ new Map());
|
|
295
|
+
p(this, "is_fork", !1);
|
|
296
|
+
S(this, Rt, !1);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
* Add an effect to the #skipped_branches map and reset its children
|
|
@@ -312,9 +312,9 @@ const Ei = class Ei {
|
|
|
312
312
|
if (r) {
|
|
313
313
|
u(this, Te).delete(e);
|
|
314
314
|
for (var i of r.d)
|
|
315
|
-
|
|
315
|
+
M(i, H), Ee(i);
|
|
316
316
|
for (i of r.m)
|
|
317
|
-
|
|
317
|
+
M(i, ye), Ee(i);
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
/**
|
|
@@ -325,15 +325,15 @@ const Ei = class Ei {
|
|
|
325
325
|
K = [], this.apply();
|
|
326
326
|
var r = Vt = [], i = [];
|
|
327
327
|
for (const o of e)
|
|
328
|
-
|
|
329
|
-
if (Vt = null,
|
|
330
|
-
|
|
328
|
+
C(this, J, Gr).call(this, o, r, i);
|
|
329
|
+
if (Vt = null, C(this, J, Ur).call(this)) {
|
|
330
|
+
C(this, J, Wr).call(this, i), C(this, J, Wr).call(this, r);
|
|
331
331
|
for (const [o, n] of u(this, Te))
|
|
332
332
|
Ro(o, n);
|
|
333
333
|
} else {
|
|
334
|
-
|
|
334
|
+
L = null;
|
|
335
335
|
for (const o of u(this, Ue)) o(this);
|
|
336
|
-
u(this, Ue).clear(), u(this, st) === 0 &&
|
|
336
|
+
u(this, Ue).clear(), u(this, st) === 0 && C(this, J, Kr).call(this), Vi(i), Vi(r), u(this, $t).clear(), u(this, Ge).clear(), u(this, Et)?.resolve();
|
|
337
337
|
}
|
|
338
338
|
me = null;
|
|
339
339
|
}
|
|
@@ -347,17 +347,17 @@ const Ei = class Ei {
|
|
|
347
347
|
r !== q && !this.previous.has(e) && this.previous.set(e, r), (e.f & Ye) === 0 && (this.current.set(e, e.v), me?.set(e, e.v));
|
|
348
348
|
}
|
|
349
349
|
activate() {
|
|
350
|
-
|
|
350
|
+
L = this, this.apply();
|
|
351
351
|
}
|
|
352
352
|
deactivate() {
|
|
353
|
-
|
|
353
|
+
L === this && (L = null, me = null);
|
|
354
354
|
}
|
|
355
355
|
flush() {
|
|
356
356
|
if (K.length > 0)
|
|
357
|
-
|
|
357
|
+
L = this, Ao();
|
|
358
358
|
else if (u(this, st) === 0 && !this.is_fork) {
|
|
359
359
|
for (const e of u(this, Ue)) e(this);
|
|
360
|
-
u(this, Ue).clear(),
|
|
360
|
+
u(this, Ue).clear(), C(this, J, Kr).call(this), u(this, Et)?.resolve();
|
|
361
361
|
}
|
|
362
362
|
this.deactivate();
|
|
363
363
|
}
|
|
@@ -378,14 +378,14 @@ const Ei = class Ei {
|
|
|
378
378
|
*/
|
|
379
379
|
decrement(e) {
|
|
380
380
|
k(this, st, u(this, st) - 1), e && k(this, At, u(this, At) - 1), !u(this, Rt) && (k(this, Rt, !0), ut(() => {
|
|
381
|
-
k(this, Rt, !1),
|
|
381
|
+
k(this, Rt, !1), C(this, J, Ur).call(this) ? K.length > 0 && this.flush() : this.revive();
|
|
382
382
|
}));
|
|
383
383
|
}
|
|
384
384
|
revive() {
|
|
385
385
|
for (const e of u(this, $t))
|
|
386
|
-
u(this, Ge).delete(e),
|
|
386
|
+
u(this, Ge).delete(e), M(e, H), Ee(e);
|
|
387
387
|
for (const e of u(this, Ge))
|
|
388
|
-
|
|
388
|
+
M(e, ye), Ee(e);
|
|
389
389
|
this.flush();
|
|
390
390
|
}
|
|
391
391
|
/** @param {(batch: Batch) => void} fn */
|
|
@@ -397,16 +397,16 @@ const Ei = class Ei {
|
|
|
397
397
|
u(this, St).add(e);
|
|
398
398
|
}
|
|
399
399
|
settled() {
|
|
400
|
-
return (u(this, Et) ?? k(this, Et,
|
|
400
|
+
return (u(this, Et) ?? k(this, Et, po())).promise;
|
|
401
401
|
}
|
|
402
402
|
static ensure() {
|
|
403
|
-
if (
|
|
404
|
-
const e =
|
|
405
|
-
ir.add(
|
|
406
|
-
|
|
403
|
+
if (L === null) {
|
|
404
|
+
const e = L = new Ei();
|
|
405
|
+
ir.add(L), Yt || ut(() => {
|
|
406
|
+
L === e && e.flush();
|
|
407
407
|
});
|
|
408
408
|
}
|
|
409
|
-
return
|
|
409
|
+
return L;
|
|
410
410
|
}
|
|
411
411
|
apply() {
|
|
412
412
|
}
|
|
@@ -425,7 +425,7 @@ Gr = function(e, r, i) {
|
|
|
425
425
|
for (var o = e.first; o !== null; ) {
|
|
426
426
|
var n = o.f, s = (n & (_e | et)) !== 0, l = s && (n & F) !== 0, a = (n & U) !== 0, c = l || u(this, Te).has(o);
|
|
427
427
|
if (!c && o.fn !== null) {
|
|
428
|
-
s ? a || (o.f ^= F) : (n & Ht) !== 0 ? r.push(o) : (n & (
|
|
428
|
+
s ? a || (o.f ^= F) : (n & Ht) !== 0 ? r.push(o) : (n & (Nt | fi)) !== 0 && a ? i.push(o) : rr(o) && (Ft(o), (n & Ze) !== 0 && (u(this, Ge).add(o), a && M(o, H)));
|
|
429
429
|
var f = o.first;
|
|
430
430
|
if (f !== null) {
|
|
431
431
|
o = f;
|
|
@@ -451,7 +451,7 @@ Wr = function(e) {
|
|
|
451
451
|
var n;
|
|
452
452
|
if (ir.size > 1) {
|
|
453
453
|
this.previous.clear();
|
|
454
|
-
var e =
|
|
454
|
+
var e = L, r = me, i = !0;
|
|
455
455
|
for (const s of ir) {
|
|
456
456
|
if (s === this) {
|
|
457
457
|
i = !1;
|
|
@@ -476,15 +476,15 @@ Wr = function(e) {
|
|
|
476
476
|
for (const d of l)
|
|
477
477
|
Eo(d, a, c, f);
|
|
478
478
|
if (K.length > 0) {
|
|
479
|
-
|
|
479
|
+
L = s, s.apply();
|
|
480
480
|
for (const d of K)
|
|
481
|
-
|
|
481
|
+
C(n = s, J, Gr).call(n, d, [], []);
|
|
482
482
|
s.deactivate();
|
|
483
483
|
}
|
|
484
484
|
K = o;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
L = e, me = r;
|
|
488
488
|
}
|
|
489
489
|
u(this, Te).clear(), ir.delete(this);
|
|
490
490
|
};
|
|
@@ -494,7 +494,7 @@ function Gt(t) {
|
|
|
494
494
|
Yt = !0;
|
|
495
495
|
try {
|
|
496
496
|
for (var r; ; ) {
|
|
497
|
-
if (os(), K.length === 0 && (
|
|
497
|
+
if (os(), K.length === 0 && (L?.flush(), K.length === 0))
|
|
498
498
|
return Tr = null, /** @type {T} */
|
|
499
499
|
r;
|
|
500
500
|
Ao();
|
|
@@ -525,29 +525,29 @@ function ls() {
|
|
|
525
525
|
Ke(t, Tr);
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let Ne = null;
|
|
529
529
|
function Vi(t) {
|
|
530
530
|
var e = t.length;
|
|
531
531
|
if (e !== 0) {
|
|
532
532
|
for (var r = 0; r < e; ) {
|
|
533
533
|
var i = t[r++];
|
|
534
|
-
if ((i.f & ($e | U)) === 0 && rr(i) && (
|
|
534
|
+
if ((i.f & ($e | U)) === 0 && rr(i) && (Ne = /* @__PURE__ */ new Set(), Ft(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Wo(i), Ne?.size > 0)) {
|
|
535
535
|
Qe.clear();
|
|
536
|
-
for (const o of
|
|
536
|
+
for (const o of Ne) {
|
|
537
537
|
if ((o.f & ($e | U)) !== 0) continue;
|
|
538
538
|
const n = [o];
|
|
539
539
|
let s = o.parent;
|
|
540
540
|
for (; s !== null; )
|
|
541
|
-
|
|
541
|
+
Ne.has(s) && (Ne.delete(s), n.push(s)), s = s.parent;
|
|
542
542
|
for (let l = n.length - 1; l >= 0; l--) {
|
|
543
543
|
const a = n[l];
|
|
544
544
|
(a.f & ($e | U)) === 0 && Ft(a);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
|
|
547
|
+
Ne.clear();
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
|
|
550
|
+
Ne = null;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
553
|
function Eo(t, e, r, i) {
|
|
@@ -560,7 +560,7 @@ function Eo(t, e, r, i) {
|
|
|
560
560
|
e,
|
|
561
561
|
r,
|
|
562
562
|
i
|
|
563
|
-
) : (n & (di | Ze)) !== 0 && (n & H) === 0 && $o(o, e, i) && (
|
|
563
|
+
) : (n & (di | Ze)) !== 0 && (n & H) === 0 && $o(o, e, i) && (M(o, H), Ee(
|
|
564
564
|
/** @type {Effect} */
|
|
565
565
|
o
|
|
566
566
|
));
|
|
@@ -589,14 +589,14 @@ function $o(t, e, r) {
|
|
|
589
589
|
}
|
|
590
590
|
function Ee(t) {
|
|
591
591
|
var e = Tr = t, r = e.b;
|
|
592
|
-
if (r?.is_pending && (t.f & (Ht |
|
|
592
|
+
if (r?.is_pending && (t.f & (Ht | Nt | fi)) !== 0 && (t.f & gt) === 0) {
|
|
593
593
|
r.defer_effect(t);
|
|
594
594
|
return;
|
|
595
595
|
}
|
|
596
596
|
for (; e.parent !== null; ) {
|
|
597
597
|
e = e.parent;
|
|
598
598
|
var i = e.f;
|
|
599
|
-
if (Vt !== null && e ===
|
|
599
|
+
if (Vt !== null && e === $ && (t.f & Nt) === 0)
|
|
600
600
|
return;
|
|
601
601
|
if ((i & (et | _e)) !== 0) {
|
|
602
602
|
if ((i & F) === 0)
|
|
@@ -608,13 +608,13 @@ function Ee(t) {
|
|
|
608
608
|
}
|
|
609
609
|
function Ro(t, e) {
|
|
610
610
|
if (!((t.f & _e) !== 0 && (t.f & F) !== 0)) {
|
|
611
|
-
(t.f & H) !== 0 ? e.d.push(t) : (t.f & ye) !== 0 && e.m.push(t),
|
|
611
|
+
(t.f & H) !== 0 ? e.d.push(t) : (t.f & ye) !== 0 && e.m.push(t), M(t, F);
|
|
612
612
|
for (var r = t.first; r !== null; )
|
|
613
613
|
Ro(r, e), r = r.next;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
function as(t) {
|
|
617
|
-
let e = 0, r =
|
|
617
|
+
let e = 0, r = pt(0), i;
|
|
618
618
|
return () => {
|
|
619
619
|
mi() && (m(r), bi(() => (e === 0 && (i = Ti(() => t(() => Qt(r)))), e += 1, () => {
|
|
620
620
|
ut(() => {
|
|
@@ -623,11 +623,11 @@ function as(t) {
|
|
|
623
623
|
})));
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
|
-
var cs =
|
|
626
|
+
var cs = xt | mt;
|
|
627
627
|
function us(t, e, r, i) {
|
|
628
628
|
new fs(t, e, r, i);
|
|
629
629
|
}
|
|
630
|
-
var Z, Xt, Ie, lt, W, Se, ee, ve,
|
|
630
|
+
var Z, Xt, Ie, lt, W, Se, ee, ve, xe, at, We, Ot, Lt, Ct, De, mr, P, Oo, Lo, Co, Yr, ar, cr, Qr;
|
|
631
631
|
class fs {
|
|
632
632
|
/**
|
|
633
633
|
* @param {TemplateNode} node
|
|
@@ -636,41 +636,41 @@ class fs {
|
|
|
636
636
|
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
637
637
|
*/
|
|
638
638
|
constructor(e, r, i, o) {
|
|
639
|
-
|
|
639
|
+
S(this, P);
|
|
640
640
|
/** @type {Boundary | null} */
|
|
641
|
-
|
|
642
|
-
|
|
641
|
+
p(this, "parent");
|
|
642
|
+
p(this, "is_pending", !1);
|
|
643
643
|
/**
|
|
644
644
|
* API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
|
|
645
645
|
* Inherited from parent boundary, or defaults to identity.
|
|
646
646
|
* @type {(error: unknown) => unknown}
|
|
647
647
|
*/
|
|
648
|
-
|
|
648
|
+
p(this, "transform_error");
|
|
649
649
|
/** @type {TemplateNode} */
|
|
650
|
-
|
|
650
|
+
S(this, Z);
|
|
651
651
|
/** @type {TemplateNode | null} */
|
|
652
|
-
|
|
652
|
+
S(this, Xt, R ? E : null);
|
|
653
653
|
/** @type {BoundaryProps} */
|
|
654
|
-
|
|
654
|
+
S(this, Ie);
|
|
655
655
|
/** @type {((anchor: Node) => void)} */
|
|
656
|
-
|
|
656
|
+
S(this, lt);
|
|
657
657
|
/** @type {Effect} */
|
|
658
|
-
|
|
658
|
+
S(this, W);
|
|
659
659
|
/** @type {Effect | null} */
|
|
660
|
-
|
|
660
|
+
S(this, Se, null);
|
|
661
661
|
/** @type {Effect | null} */
|
|
662
|
-
|
|
662
|
+
S(this, ee, null);
|
|
663
663
|
/** @type {Effect | null} */
|
|
664
|
-
|
|
664
|
+
S(this, ve, null);
|
|
665
665
|
/** @type {DocumentFragment | null} */
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
666
|
+
S(this, xe, null);
|
|
667
|
+
S(this, at, 0);
|
|
668
|
+
S(this, We, 0);
|
|
669
|
+
S(this, Ot, !1);
|
|
670
670
|
/** @type {Set<Effect>} */
|
|
671
|
-
|
|
671
|
+
S(this, Lt, /* @__PURE__ */ new Set());
|
|
672
672
|
/** @type {Set<Effect>} */
|
|
673
|
-
|
|
673
|
+
S(this, Ct, /* @__PURE__ */ new Set());
|
|
674
674
|
/**
|
|
675
675
|
* A source containing the number of pending async deriveds/expressions.
|
|
676
676
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -678,32 +678,32 @@ class fs {
|
|
|
678
678
|
* calls followed by no-op flushes
|
|
679
679
|
* @type {Source<number> | null}
|
|
680
680
|
*/
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
S(this, De, null);
|
|
682
|
+
S(this, mr, as(() => (k(this, De, pt(u(this, at))), () => {
|
|
683
683
|
k(this, De, null);
|
|
684
684
|
})));
|
|
685
685
|
k(this, Z, e), k(this, Ie, r), k(this, lt, (n) => {
|
|
686
686
|
var s = (
|
|
687
687
|
/** @type {Effect} */
|
|
688
|
-
|
|
688
|
+
$
|
|
689
689
|
);
|
|
690
690
|
s.b = this, s.f |= jr, i(n);
|
|
691
691
|
}), this.parent = /** @type {Effect} */
|
|
692
|
-
|
|
693
|
-
if (
|
|
692
|
+
$.b, this.transform_error = o ?? this.parent?.transform_error ?? ((n) => n), k(this, W, yi(() => {
|
|
693
|
+
if (R) {
|
|
694
694
|
const n = (
|
|
695
695
|
/** @type {Comment} */
|
|
696
696
|
u(this, Xt)
|
|
697
697
|
);
|
|
698
698
|
kr();
|
|
699
699
|
const s = n.data === ci;
|
|
700
|
-
if (n.data.startsWith(
|
|
701
|
-
const a = JSON.parse(n.data.slice(
|
|
702
|
-
|
|
703
|
-
} else s ?
|
|
700
|
+
if (n.data.startsWith(Ni)) {
|
|
701
|
+
const a = JSON.parse(n.data.slice(Ni.length));
|
|
702
|
+
C(this, P, Lo).call(this, a);
|
|
703
|
+
} else s ? C(this, P, Co).call(this) : C(this, P, Oo).call(this);
|
|
704
704
|
} else
|
|
705
|
-
|
|
706
|
-
}, cs)),
|
|
705
|
+
C(this, P, Yr).call(this);
|
|
706
|
+
}, cs)), R && k(this, Z, E);
|
|
707
707
|
}
|
|
708
708
|
/**
|
|
709
709
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
@@ -729,7 +729,7 @@ class fs {
|
|
|
729
729
|
* @param {1 | -1} d
|
|
730
730
|
*/
|
|
731
731
|
update_pending_count(e) {
|
|
732
|
-
|
|
732
|
+
C(this, P, Qr).call(this, e), k(this, at, u(this, at) + e), !(!u(this, De) || u(this, Ot)) && (k(this, Ot, !0), ut(() => {
|
|
733
733
|
k(this, Ot, !1), u(this, De) && qt(u(this, De), u(this, at));
|
|
734
734
|
}));
|
|
735
735
|
}
|
|
@@ -745,7 +745,7 @@ class fs {
|
|
|
745
745
|
let i = u(this, Ie).failed;
|
|
746
746
|
if (!r && !i)
|
|
747
747
|
throw e;
|
|
748
|
-
u(this, Se) && (G(u(this, Se)), k(this, Se, null)), u(this, ee) && (G(u(this, ee)), k(this, ee, null)), u(this, ve) && (G(u(this, ve)), k(this, ve, null)),
|
|
748
|
+
u(this, Se) && (G(u(this, Se)), k(this, Se, null)), u(this, ee) && (G(u(this, ee)), k(this, ee, null)), u(this, ve) && (G(u(this, ve)), k(this, ve, null)), R && (Q(
|
|
749
749
|
/** @type {TemplateNode} */
|
|
750
750
|
u(this, Xt)
|
|
751
751
|
), vo(), Q(gr()));
|
|
@@ -757,8 +757,8 @@ class fs {
|
|
|
757
757
|
}
|
|
758
758
|
o = !0, n && es(), u(this, ve) !== null && ft(u(this, ve), () => {
|
|
759
759
|
k(this, ve, null);
|
|
760
|
-
}),
|
|
761
|
-
He.ensure(),
|
|
760
|
+
}), C(this, P, cr).call(this, () => {
|
|
761
|
+
He.ensure(), C(this, P, Yr).call(this);
|
|
762
762
|
});
|
|
763
763
|
}, l = (a) => {
|
|
764
764
|
try {
|
|
@@ -766,13 +766,13 @@ class fs {
|
|
|
766
766
|
} catch (c) {
|
|
767
767
|
Ke(c, u(this, W) && u(this, W).parent);
|
|
768
768
|
}
|
|
769
|
-
i && k(this, ve,
|
|
769
|
+
i && k(this, ve, C(this, P, cr).call(this, () => {
|
|
770
770
|
He.ensure();
|
|
771
771
|
try {
|
|
772
772
|
return ce(() => {
|
|
773
773
|
var c = (
|
|
774
774
|
/** @type {Effect} */
|
|
775
|
-
|
|
775
|
+
$
|
|
776
776
|
);
|
|
777
777
|
c.b = this, c.f |= jr, i(
|
|
778
778
|
u(this, Z),
|
|
@@ -806,7 +806,7 @@ class fs {
|
|
|
806
806
|
});
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
Z = new WeakMap(), Xt = new WeakMap(), Ie = new WeakMap(), lt = new WeakMap(), W = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ve = new WeakMap(),
|
|
809
|
+
Z = new WeakMap(), Xt = new WeakMap(), Ie = new WeakMap(), lt = new WeakMap(), W = new WeakMap(), Se = new WeakMap(), ee = new WeakMap(), ve = new WeakMap(), xe = new WeakMap(), at = new WeakMap(), We = new WeakMap(), Ot = new WeakMap(), Lt = new WeakMap(), Ct = new WeakMap(), De = new WeakMap(), mr = new WeakMap(), P = new WeakSet(), Oo = function() {
|
|
810
810
|
try {
|
|
811
811
|
k(this, Se, ce(() => u(this, lt).call(this, u(this, Z))));
|
|
812
812
|
} catch (e) {
|
|
@@ -828,21 +828,21 @@ Lo = function(e) {
|
|
|
828
828
|
}, Co = function() {
|
|
829
829
|
const e = u(this, Ie).pending;
|
|
830
830
|
e && (this.is_pending = !0, k(this, ee, ce(() => e(u(this, Z)))), ut(() => {
|
|
831
|
-
var r = k(this,
|
|
832
|
-
r.append(i), k(this, Se,
|
|
831
|
+
var r = k(this, xe, document.createDocumentFragment()), i = fe();
|
|
832
|
+
r.append(i), k(this, Se, C(this, P, cr).call(this, () => (He.ensure(), ce(() => u(this, lt).call(this, i))))), u(this, We) === 0 && (u(this, Z).before(r), k(this, xe, null), ft(
|
|
833
833
|
/** @type {Effect} */
|
|
834
834
|
u(this, ee),
|
|
835
835
|
() => {
|
|
836
836
|
k(this, ee, null);
|
|
837
837
|
}
|
|
838
|
-
),
|
|
838
|
+
), C(this, P, ar).call(this));
|
|
839
839
|
}));
|
|
840
840
|
}, Yr = function() {
|
|
841
841
|
try {
|
|
842
842
|
if (this.is_pending = this.has_pending_snippet(), k(this, We, 0), k(this, at, 0), k(this, Se, ce(() => {
|
|
843
843
|
u(this, lt).call(this, u(this, Z));
|
|
844
844
|
})), u(this, We) > 0) {
|
|
845
|
-
var e = k(this,
|
|
845
|
+
var e = k(this, xe, document.createDocumentFragment());
|
|
846
846
|
ki(u(this, Se), e);
|
|
847
847
|
const r = (
|
|
848
848
|
/** @type {(anchor: Node) => void} */
|
|
@@ -850,30 +850,30 @@ Lo = function(e) {
|
|
|
850
850
|
);
|
|
851
851
|
k(this, ee, ce(() => r(u(this, Z))));
|
|
852
852
|
} else
|
|
853
|
-
|
|
853
|
+
C(this, P, ar).call(this);
|
|
854
854
|
} catch (r) {
|
|
855
855
|
this.error(r);
|
|
856
856
|
}
|
|
857
857
|
}, ar = function() {
|
|
858
858
|
this.is_pending = !1;
|
|
859
859
|
for (const e of u(this, Lt))
|
|
860
|
-
|
|
860
|
+
M(e, H), Ee(e);
|
|
861
861
|
for (const e of u(this, Ct))
|
|
862
|
-
|
|
862
|
+
M(e, ye), Ee(e);
|
|
863
863
|
u(this, Lt).clear(), u(this, Ct).clear();
|
|
864
864
|
}, /**
|
|
865
865
|
* @template T
|
|
866
866
|
* @param {() => T} fn
|
|
867
867
|
*/
|
|
868
868
|
cr = function(e) {
|
|
869
|
-
var r =
|
|
870
|
-
Re(u(this, W)),
|
|
869
|
+
var r = $, i = A, o = ie;
|
|
870
|
+
Re(u(this, W)), he(u(this, W)), Dt(u(this, W).ctx);
|
|
871
871
|
try {
|
|
872
872
|
return e();
|
|
873
873
|
} catch (n) {
|
|
874
874
|
return To(n), null;
|
|
875
875
|
} finally {
|
|
876
|
-
Re(r),
|
|
876
|
+
Re(r), he(i), Dt(o);
|
|
877
877
|
}
|
|
878
878
|
}, /**
|
|
879
879
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -883,12 +883,12 @@ cr = function(e) {
|
|
|
883
883
|
Qr = function(e) {
|
|
884
884
|
var r;
|
|
885
885
|
if (!this.has_pending_snippet()) {
|
|
886
|
-
this.parent &&
|
|
886
|
+
this.parent && C(r = this.parent, P, Qr).call(r, e);
|
|
887
887
|
return;
|
|
888
888
|
}
|
|
889
|
-
k(this, We, u(this, We) + e), u(this, We) === 0 && (
|
|
889
|
+
k(this, We, u(this, We) + e), u(this, We) === 0 && (C(this, P, ar).call(this), u(this, ee) && ft(u(this, ee), () => {
|
|
890
890
|
k(this, ee, null);
|
|
891
|
-
}), u(this,
|
|
891
|
+
}), u(this, xe) && (u(this, Z).before(u(this, xe)), k(this, xe, null)));
|
|
892
892
|
};
|
|
893
893
|
function ds(t, e, r, i) {
|
|
894
894
|
const o = Ir;
|
|
@@ -899,8 +899,8 @@ function ds(t, e, r, i) {
|
|
|
899
899
|
}
|
|
900
900
|
var s = (
|
|
901
901
|
/** @type {Effect} */
|
|
902
|
-
|
|
903
|
-
), l =
|
|
902
|
+
$
|
|
903
|
+
), l = hs(), a = n.length === 1 ? n[0].promise : n.length > 1 ? Promise.all(n.map((d) => d.promise)) : null;
|
|
904
904
|
function c(d) {
|
|
905
905
|
l();
|
|
906
906
|
try {
|
|
@@ -919,23 +919,23 @@ function ds(t, e, r, i) {
|
|
|
919
919
|
}
|
|
920
920
|
a ? a.then(f) : f();
|
|
921
921
|
}
|
|
922
|
-
function
|
|
923
|
-
var t =
|
|
922
|
+
function hs() {
|
|
923
|
+
var t = $, e = A, r = ie, i = L;
|
|
924
924
|
return function(n = !0) {
|
|
925
|
-
Re(t),
|
|
925
|
+
Re(t), he(e), Dt(r), n && i?.activate();
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
928
|
function Jr(t = !0) {
|
|
929
|
-
Re(null),
|
|
929
|
+
Re(null), he(null), Dt(null), t && L?.deactivate();
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function ps() {
|
|
932
932
|
var t = (
|
|
933
933
|
/** @type {Boundary} */
|
|
934
934
|
/** @type {Effect} */
|
|
935
|
-
|
|
935
|
+
$.b
|
|
936
936
|
), e = (
|
|
937
937
|
/** @type {Batch} */
|
|
938
|
-
|
|
938
|
+
L
|
|
939
939
|
), r = t.is_rendered();
|
|
940
940
|
return t.update_pending_count(1), e.increment(r), () => {
|
|
941
941
|
t.update_pending_count(-1), e.decrement(r);
|
|
@@ -943,11 +943,11 @@ function hs() {
|
|
|
943
943
|
}
|
|
944
944
|
// @__NO_SIDE_EFFECTS__
|
|
945
945
|
function Ir(t) {
|
|
946
|
-
var e = B | H, r =
|
|
946
|
+
var e = B | H, r = A !== null && (A.f & B) !== 0 ? (
|
|
947
947
|
/** @type {Derived} */
|
|
948
|
-
|
|
948
|
+
A
|
|
949
949
|
) : null;
|
|
950
|
-
return
|
|
950
|
+
return $ !== null && ($.f |= mt), {
|
|
951
951
|
ctx: ie,
|
|
952
952
|
deps: null,
|
|
953
953
|
effects: null,
|
|
@@ -961,24 +961,24 @@ function Ir(t) {
|
|
|
961
961
|
q
|
|
962
962
|
),
|
|
963
963
|
wv: 0,
|
|
964
|
-
parent: r ??
|
|
964
|
+
parent: r ?? $,
|
|
965
965
|
ac: null
|
|
966
966
|
};
|
|
967
967
|
}
|
|
968
968
|
// @__NO_SIDE_EFFECTS__
|
|
969
969
|
function vs(t, e, r) {
|
|
970
970
|
/** @type {Effect | null} */
|
|
971
|
-
|
|
971
|
+
$ === null && zn();
|
|
972
972
|
var o = (
|
|
973
973
|
/** @type {Promise<V>} */
|
|
974
974
|
/** @type {unknown} */
|
|
975
975
|
void 0
|
|
976
|
-
), n =
|
|
976
|
+
), n = pt(
|
|
977
977
|
/** @type {V} */
|
|
978
978
|
q
|
|
979
|
-
), s = !
|
|
979
|
+
), s = !A, l = /* @__PURE__ */ new Map();
|
|
980
980
|
return Es(() => {
|
|
981
|
-
var a =
|
|
981
|
+
var a = po();
|
|
982
982
|
o = a.promise;
|
|
983
983
|
try {
|
|
984
984
|
Promise.resolve(t()).then(a.resolve, a.reject).finally(Jr);
|
|
@@ -987,10 +987,10 @@ function vs(t, e, r) {
|
|
|
987
987
|
}
|
|
988
988
|
var c = (
|
|
989
989
|
/** @type {Batch} */
|
|
990
|
-
|
|
990
|
+
L
|
|
991
991
|
);
|
|
992
992
|
if (s) {
|
|
993
|
-
var f =
|
|
993
|
+
var f = ps();
|
|
994
994
|
l.get(c)?.reject(rt), l.delete(c), l.set(c, a);
|
|
995
995
|
}
|
|
996
996
|
const d = (v, g = void 0) => {
|
|
@@ -998,8 +998,8 @@ function vs(t, e, r) {
|
|
|
998
998
|
g !== rt && (n.f |= Ye, qt(n, g));
|
|
999
999
|
else {
|
|
1000
1000
|
(n.f & Ye) !== 0 && (n.f ^= Ye), qt(n, v);
|
|
1001
|
-
for (const [
|
|
1002
|
-
if (l.delete(
|
|
1001
|
+
for (const [h, w] of l) {
|
|
1002
|
+
if (l.delete(h), h === c) break;
|
|
1003
1003
|
w.reject(rt);
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
@@ -1051,28 +1051,28 @@ function bs(t) {
|
|
|
1051
1051
|
}
|
|
1052
1052
|
return null;
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1055
|
-
var e, r =
|
|
1054
|
+
function pi(t) {
|
|
1055
|
+
var e, r = $;
|
|
1056
1056
|
Re(bs(t));
|
|
1057
1057
|
try {
|
|
1058
|
-
t.f &= ~
|
|
1058
|
+
t.f &= ~ht, ms(t), e = en(t);
|
|
1059
1059
|
} finally {
|
|
1060
1060
|
Re(r);
|
|
1061
1061
|
}
|
|
1062
1062
|
return e;
|
|
1063
1063
|
}
|
|
1064
1064
|
function Po(t) {
|
|
1065
|
-
var e =
|
|
1066
|
-
if (!t.equals(e) && (t.wv = Xo(), (!
|
|
1067
|
-
|
|
1065
|
+
var e = pi(t);
|
|
1066
|
+
if (!t.equals(e) && (t.wv = Xo(), (!L?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1067
|
+
M(t, F);
|
|
1068
1068
|
return;
|
|
1069
1069
|
}
|
|
1070
|
-
Xe || (me !== null ? (mi() ||
|
|
1070
|
+
Xe || (me !== null ? (mi() || L?.is_fork) && me.set(t, e) : hi(t));
|
|
1071
1071
|
}
|
|
1072
1072
|
function ys(t) {
|
|
1073
1073
|
if (t.effects !== null)
|
|
1074
1074
|
for (const e of t.effects)
|
|
1075
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(rt), e.teardown =
|
|
1075
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(rt), e.teardown = xn, e.ac = null, Jt(e, 0), _i(e));
|
|
1076
1076
|
}
|
|
1077
1077
|
function Mo(t) {
|
|
1078
1078
|
if (t.effects !== null)
|
|
@@ -1081,8 +1081,8 @@ function Mo(t) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
let Xr = /* @__PURE__ */ new Set();
|
|
1083
1083
|
const Qe = /* @__PURE__ */ new Map();
|
|
1084
|
-
let
|
|
1085
|
-
function
|
|
1084
|
+
let No = !1;
|
|
1085
|
+
function pt(t, e) {
|
|
1086
1086
|
var r = {
|
|
1087
1087
|
f: 0,
|
|
1088
1088
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
@@ -1096,18 +1096,18 @@ function ht(t, e) {
|
|
|
1096
1096
|
}
|
|
1097
1097
|
// @__NO_SIDE_EFFECTS__
|
|
1098
1098
|
function re(t, e) {
|
|
1099
|
-
const r =
|
|
1099
|
+
const r = pt(t);
|
|
1100
1100
|
return Qo(r), r;
|
|
1101
1101
|
}
|
|
1102
1102
|
// @__NO_SIDE_EFFECTS__
|
|
1103
|
-
function
|
|
1104
|
-
const i =
|
|
1103
|
+
function xo(t, e = !1, r = !0) {
|
|
1104
|
+
const i = pt(t);
|
|
1105
1105
|
return e || (i.equals = bo), i;
|
|
1106
1106
|
}
|
|
1107
1107
|
function V(t, e, r = !1) {
|
|
1108
|
-
|
|
1108
|
+
A !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1109
1109
|
// to ensure we error if state is set inside an inspect effect
|
|
1110
|
-
(!be || (
|
|
1110
|
+
(!be || (A.f & Di) !== 0) && wo() && (A.f & (B | Ze | di | Di)) !== 0 && (de === null || !Mt.call(de, t)) && Zn();
|
|
1111
1111
|
let i = r ? Wt(e) : e;
|
|
1112
1112
|
return qt(t, i);
|
|
1113
1113
|
}
|
|
@@ -1121,16 +1121,16 @@ function qt(t, e) {
|
|
|
1121
1121
|
/** @type {Derived} */
|
|
1122
1122
|
t
|
|
1123
1123
|
);
|
|
1124
|
-
(t.f & H) !== 0 &&
|
|
1124
|
+
(t.f & H) !== 0 && pi(o), hi(o);
|
|
1125
1125
|
}
|
|
1126
|
-
t.wv = Xo(), Do(t, H),
|
|
1126
|
+
t.wv = Xo(), Do(t, H), $ !== null && ($.f & F) !== 0 && ($.f & (_e | et)) === 0 && (le === null ? Os([t]) : le.push(t)), !i.is_fork && Xr.size > 0 && !No && _s();
|
|
1127
1127
|
}
|
|
1128
1128
|
return e;
|
|
1129
1129
|
}
|
|
1130
1130
|
function _s() {
|
|
1131
|
-
|
|
1131
|
+
No = !1;
|
|
1132
1132
|
for (const t of Xr)
|
|
1133
|
-
(t.f & F) !== 0 &&
|
|
1133
|
+
(t.f & F) !== 0 && M(t, ye), rr(t) && Ft(t);
|
|
1134
1134
|
Xr.clear();
|
|
1135
1135
|
}
|
|
1136
1136
|
function Qt(t) {
|
|
@@ -1141,13 +1141,13 @@ function Do(t, e) {
|
|
|
1141
1141
|
if (r !== null)
|
|
1142
1142
|
for (var i = r.length, o = 0; o < i; o++) {
|
|
1143
1143
|
var n = r[o], s = n.f, l = (s & H) === 0;
|
|
1144
|
-
if (l &&
|
|
1144
|
+
if (l && M(n, e), (s & B) !== 0) {
|
|
1145
1145
|
var a = (
|
|
1146
1146
|
/** @type {Derived} */
|
|
1147
1147
|
n
|
|
1148
1148
|
);
|
|
1149
|
-
me?.delete(a), (s &
|
|
1150
|
-
} else l && ((s & Ze) !== 0 &&
|
|
1149
|
+
me?.delete(a), (s & ht) === 0 && (s & ue && (n.f |= ht), Do(a, ye));
|
|
1150
|
+
} else l && ((s & Ze) !== 0 && Ne !== null && Ne.add(
|
|
1151
1151
|
/** @type {Effect} */
|
|
1152
1152
|
n
|
|
1153
1153
|
), Ee(
|
|
@@ -1159,16 +1159,16 @@ function Do(t, e) {
|
|
|
1159
1159
|
function Wt(t) {
|
|
1160
1160
|
if (typeof t != "object" || t === null || lr in t)
|
|
1161
1161
|
return t;
|
|
1162
|
-
const e =
|
|
1163
|
-
if (e !== Mn && e !==
|
|
1162
|
+
const e = ho(t);
|
|
1163
|
+
if (e !== Mn && e !== Nn)
|
|
1164
1164
|
return t;
|
|
1165
1165
|
var r = /* @__PURE__ */ new Map(), i = fo(t), o = /* @__PURE__ */ re(0), n = dt, s = (l) => {
|
|
1166
1166
|
if (dt === n)
|
|
1167
1167
|
return l();
|
|
1168
|
-
var a =
|
|
1169
|
-
|
|
1168
|
+
var a = A, c = dt;
|
|
1169
|
+
he(null), Bi(n);
|
|
1170
1170
|
var f = l();
|
|
1171
|
-
return
|
|
1171
|
+
return he(a), Bi(c), f;
|
|
1172
1172
|
};
|
|
1173
1173
|
return i && r.set("length", /* @__PURE__ */ re(
|
|
1174
1174
|
/** @type {any[]} */
|
|
@@ -1201,8 +1201,8 @@ function Wt(t) {
|
|
|
1201
1201
|
return t;
|
|
1202
1202
|
var f = r.get(a), d = a in l;
|
|
1203
1203
|
if (f === void 0 && (!d || It(l, a)?.writable) && (f = s(() => {
|
|
1204
|
-
var g = Wt(d ? l[a] : q),
|
|
1205
|
-
return
|
|
1204
|
+
var g = Wt(d ? l[a] : q), h = /* @__PURE__ */ re(g);
|
|
1205
|
+
return h;
|
|
1206
1206
|
}), r.set(a, f)), f !== void 0) {
|
|
1207
1207
|
var v = m(f);
|
|
1208
1208
|
return v === q ? void 0 : v;
|
|
@@ -1230,7 +1230,7 @@ function Wt(t) {
|
|
|
1230
1230
|
if (a === lr)
|
|
1231
1231
|
return !0;
|
|
1232
1232
|
var c = r.get(a), f = c !== void 0 && c.v !== q || Reflect.has(l, a);
|
|
1233
|
-
if (c !== void 0 ||
|
|
1233
|
+
if (c !== void 0 || $ !== null && (!f || It(l, a)?.writable)) {
|
|
1234
1234
|
c === void 0 && (c = s(() => {
|
|
1235
1235
|
var v = f ? Wt(l[a]) : q, g = /* @__PURE__ */ re(v);
|
|
1236
1236
|
return g;
|
|
@@ -1246,8 +1246,8 @@ function Wt(t) {
|
|
|
1246
1246
|
if (i && a === "length")
|
|
1247
1247
|
for (var g = c; g < /** @type {Source<number>} */
|
|
1248
1248
|
d.v; g += 1) {
|
|
1249
|
-
var
|
|
1250
|
-
|
|
1249
|
+
var h = r.get(g + "");
|
|
1250
|
+
h !== void 0 ? V(h, q) : g in l && (h = s(() => /* @__PURE__ */ re(q)), r.set(g + "", h));
|
|
1251
1251
|
}
|
|
1252
1252
|
if (d === void 0)
|
|
1253
1253
|
(!v || It(l, a)?.writable) && (d = s(() => /* @__PURE__ */ re(void 0)), V(d, Wt(c)), r.set(a, d));
|
|
@@ -1256,14 +1256,14 @@ function Wt(t) {
|
|
|
1256
1256
|
var w = s(() => Wt(c));
|
|
1257
1257
|
V(d, w);
|
|
1258
1258
|
}
|
|
1259
|
-
var
|
|
1260
|
-
if (
|
|
1259
|
+
var T = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1260
|
+
if (T?.set && T.set.call(f, c), !v) {
|
|
1261
1261
|
if (i && typeof a == "string") {
|
|
1262
|
-
var
|
|
1262
|
+
var I = (
|
|
1263
1263
|
/** @type {Source<number>} */
|
|
1264
1264
|
r.get("length")
|
|
1265
|
-
),
|
|
1266
|
-
Number.isInteger(
|
|
1265
|
+
), _ = Number(a);
|
|
1266
|
+
Number.isInteger(_) && _ >= I.v && V(I, _ + 1);
|
|
1267
1267
|
}
|
|
1268
1268
|
Qt(o);
|
|
1269
1269
|
}
|
|
@@ -1290,7 +1290,7 @@ function Zr() {
|
|
|
1290
1290
|
if (qi === void 0) {
|
|
1291
1291
|
qi = window, Vo = /Firefox/.test(navigator.userAgent);
|
|
1292
1292
|
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
1293
|
-
qo = It(e, "firstChild").get, Fo = It(e, "nextSibling").get,
|
|
1293
|
+
qo = It(e, "firstChild").get, Fo = It(e, "nextSibling").get, xi(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), xi(r) && (r.__t = void 0);
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
function fe(t = "") {
|
|
@@ -1311,11 +1311,11 @@ function Oe(t) {
|
|
|
1311
1311
|
);
|
|
1312
1312
|
}
|
|
1313
1313
|
function z(t, e) {
|
|
1314
|
-
if (!
|
|
1314
|
+
if (!R)
|
|
1315
1315
|
return /* @__PURE__ */ Je(t);
|
|
1316
|
-
var r = /* @__PURE__ */ Je(
|
|
1316
|
+
var r = /* @__PURE__ */ Je(E);
|
|
1317
1317
|
if (r === null)
|
|
1318
|
-
r =
|
|
1318
|
+
r = E.appendChild(fe());
|
|
1319
1319
|
else if (e && r.nodeType !== _r) {
|
|
1320
1320
|
var i = fe();
|
|
1321
1321
|
return r?.before(i), Q(i), i;
|
|
@@ -1326,28 +1326,28 @@ function z(t, e) {
|
|
|
1326
1326
|
), Q(r), r;
|
|
1327
1327
|
}
|
|
1328
1328
|
function ws(t, e = !1) {
|
|
1329
|
-
if (!
|
|
1329
|
+
if (!R) {
|
|
1330
1330
|
var r = /* @__PURE__ */ Je(t);
|
|
1331
1331
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ Oe(r) : r;
|
|
1332
1332
|
}
|
|
1333
1333
|
if (e) {
|
|
1334
|
-
if (
|
|
1334
|
+
if (E?.nodeType !== _r) {
|
|
1335
1335
|
var i = fe();
|
|
1336
|
-
return
|
|
1336
|
+
return E?.before(i), Q(i), i;
|
|
1337
1337
|
}
|
|
1338
1338
|
gi(
|
|
1339
1339
|
/** @type {Text} */
|
|
1340
|
-
|
|
1340
|
+
E
|
|
1341
1341
|
);
|
|
1342
1342
|
}
|
|
1343
|
-
return
|
|
1343
|
+
return E;
|
|
1344
1344
|
}
|
|
1345
1345
|
function Pe(t, e = 1, r = !1) {
|
|
1346
|
-
let i =
|
|
1346
|
+
let i = R ? E : t;
|
|
1347
1347
|
for (var o; e--; )
|
|
1348
1348
|
o = i, i = /** @type {TemplateNode} */
|
|
1349
1349
|
/* @__PURE__ */ Oe(i);
|
|
1350
|
-
if (!
|
|
1350
|
+
if (!R)
|
|
1351
1351
|
return i;
|
|
1352
1352
|
if (r) {
|
|
1353
1353
|
if (i?.nodeType !== _r) {
|
|
@@ -1385,23 +1385,23 @@ function gi(t) {
|
|
|
1385
1385
|
e.nodeValue, e = t.nextSibling;
|
|
1386
1386
|
}
|
|
1387
1387
|
function jo(t) {
|
|
1388
|
-
var e =
|
|
1389
|
-
|
|
1388
|
+
var e = A, r = $;
|
|
1389
|
+
he(null), Re(null);
|
|
1390
1390
|
try {
|
|
1391
1391
|
return t();
|
|
1392
1392
|
} finally {
|
|
1393
|
-
|
|
1393
|
+
he(e), Re(r);
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
1396
|
function ks(t) {
|
|
1397
|
-
|
|
1397
|
+
$ === null && (A === null && Kn(), Wn()), Xe && Gn();
|
|
1398
1398
|
}
|
|
1399
1399
|
function Ts(t, e) {
|
|
1400
1400
|
var r = e.last;
|
|
1401
1401
|
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
1402
1402
|
}
|
|
1403
1403
|
function Le(t, e) {
|
|
1404
|
-
var r =
|
|
1404
|
+
var r = $;
|
|
1405
1405
|
r !== null && (r.f & U) !== 0 && (t |= U);
|
|
1406
1406
|
var i = {
|
|
1407
1407
|
ctx: ie,
|
|
@@ -1428,30 +1428,30 @@ function Le(t, e) {
|
|
|
1428
1428
|
throw G(i), s;
|
|
1429
1429
|
}
|
|
1430
1430
|
o.deps === null && o.teardown === null && o.nodes === null && o.first === o.last && // either `null`, or a singular child
|
|
1431
|
-
(o.f & mt) === 0 && (o = o.first, (t & Ze) !== 0 && (t &
|
|
1431
|
+
(o.f & mt) === 0 && (o = o.first, (t & Ze) !== 0 && (t & xt) !== 0 && o !== null && (o.f |= xt));
|
|
1432
1432
|
}
|
|
1433
|
-
if (o !== null && (o.parent = r, r !== null && Ts(o, r),
|
|
1433
|
+
if (o !== null && (o.parent = r, r !== null && Ts(o, r), A !== null && (A.f & B) !== 0 && (t & et) === 0)) {
|
|
1434
1434
|
var n = (
|
|
1435
1435
|
/** @type {Derived} */
|
|
1436
|
-
|
|
1436
|
+
A
|
|
1437
1437
|
);
|
|
1438
1438
|
(n.effects ?? (n.effects = [])).push(o);
|
|
1439
1439
|
}
|
|
1440
1440
|
return i;
|
|
1441
1441
|
}
|
|
1442
1442
|
function mi() {
|
|
1443
|
-
return
|
|
1443
|
+
return A !== null && !be;
|
|
1444
1444
|
}
|
|
1445
1445
|
function Is(t) {
|
|
1446
|
-
const e = Le(
|
|
1447
|
-
return
|
|
1446
|
+
const e = Le(Nt, null);
|
|
1447
|
+
return M(e, F), e.teardown = t, e;
|
|
1448
1448
|
}
|
|
1449
1449
|
function kt(t) {
|
|
1450
1450
|
ks();
|
|
1451
1451
|
var e = (
|
|
1452
1452
|
/** @type {Effect} */
|
|
1453
|
-
|
|
1454
|
-
), r = !
|
|
1453
|
+
$.f
|
|
1454
|
+
), r = !A && (e & _e) !== 0 && (e & gt) === 0;
|
|
1455
1455
|
if (r) {
|
|
1456
1456
|
var i = (
|
|
1457
1457
|
/** @type {ComponentContext} */
|
|
@@ -1487,11 +1487,11 @@ function Es(t) {
|
|
|
1487
1487
|
return Le(di | mt, t);
|
|
1488
1488
|
}
|
|
1489
1489
|
function bi(t, e = 0) {
|
|
1490
|
-
return Le(
|
|
1490
|
+
return Le(Nt | e, t);
|
|
1491
1491
|
}
|
|
1492
1492
|
function Fi(t, e = [], r = [], i = []) {
|
|
1493
1493
|
ds(i, e, r, (o) => {
|
|
1494
|
-
Le(
|
|
1494
|
+
Le(Nt, () => t(...o.map(m)));
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
1497
|
function yi(t, e = 0) {
|
|
@@ -1504,12 +1504,12 @@ function ce(t) {
|
|
|
1504
1504
|
function Go(t) {
|
|
1505
1505
|
var e = t.teardown;
|
|
1506
1506
|
if (e !== null) {
|
|
1507
|
-
const r = Xe, i =
|
|
1508
|
-
Hi(!0),
|
|
1507
|
+
const r = Xe, i = A;
|
|
1508
|
+
Hi(!0), he(null);
|
|
1509
1509
|
try {
|
|
1510
1510
|
e.call(null);
|
|
1511
1511
|
} finally {
|
|
1512
|
-
Hi(r),
|
|
1512
|
+
Hi(r), he(i);
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
@@ -1536,7 +1536,7 @@ function G(t, e = !0) {
|
|
|
1536
1536
|
t.nodes.start,
|
|
1537
1537
|
/** @type {TemplateNode} */
|
|
1538
1538
|
t.nodes.end
|
|
1539
|
-
), r = !0), _i(t, e && !r), Jt(t, 0),
|
|
1539
|
+
), r = !0), _i(t, e && !r), Jt(t, 0), M(t, $e);
|
|
1540
1540
|
var i = t.nodes && t.nodes.t;
|
|
1541
1541
|
if (i !== null)
|
|
1542
1542
|
for (const n of i)
|
|
@@ -1576,7 +1576,7 @@ function Ko(t, e, r) {
|
|
|
1576
1576
|
for (const l of i)
|
|
1577
1577
|
(l.is_global || r) && e.push(l);
|
|
1578
1578
|
for (var o = t.first; o !== null; ) {
|
|
1579
|
-
var n = o.next, s = (o.f &
|
|
1579
|
+
var n = o.next, s = (o.f & xt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1580
1580
|
// it means the parent block effect was pruned. In that case,
|
|
1581
1581
|
// transparency information was transferred to the branch effect.
|
|
1582
1582
|
(o.f & _e) !== 0 && (t.f & Ze) !== 0;
|
|
@@ -1591,7 +1591,7 @@ function Yo(t, e) {
|
|
|
1591
1591
|
if ((t.f & U) !== 0) {
|
|
1592
1592
|
t.f ^= U;
|
|
1593
1593
|
for (var r = t.first; r !== null; ) {
|
|
1594
|
-
var i = r.next, o = (r.f &
|
|
1594
|
+
var i = r.next, o = (r.f & xt) !== 0 || (r.f & _e) !== 0;
|
|
1595
1595
|
Yo(r, o ? e : !1), r = i;
|
|
1596
1596
|
}
|
|
1597
1597
|
var n = t.nodes && t.nodes.t;
|
|
@@ -1611,17 +1611,17 @@ let ur = !1, Xe = !1;
|
|
|
1611
1611
|
function Hi(t) {
|
|
1612
1612
|
Xe = t;
|
|
1613
1613
|
}
|
|
1614
|
-
let
|
|
1615
|
-
function
|
|
1616
|
-
|
|
1614
|
+
let A = null, be = !1;
|
|
1615
|
+
function he(t) {
|
|
1616
|
+
A = t;
|
|
1617
1617
|
}
|
|
1618
|
-
let
|
|
1618
|
+
let $ = null;
|
|
1619
1619
|
function Re(t) {
|
|
1620
|
-
|
|
1620
|
+
$ = t;
|
|
1621
1621
|
}
|
|
1622
1622
|
let de = null;
|
|
1623
1623
|
function Qo(t) {
|
|
1624
|
-
|
|
1624
|
+
A !== null && (de === null ? de = [t] : de.push(t));
|
|
1625
1625
|
}
|
|
1626
1626
|
let Y = null, X = 0, le = null;
|
|
1627
1627
|
function Os(t) {
|
|
@@ -1638,7 +1638,7 @@ function rr(t) {
|
|
|
1638
1638
|
var e = t.f;
|
|
1639
1639
|
if ((e & H) !== 0)
|
|
1640
1640
|
return !0;
|
|
1641
|
-
if (e & B && (t.f &= ~
|
|
1641
|
+
if (e & B && (t.f &= ~ht), (e & ye) !== 0) {
|
|
1642
1642
|
for (var r = (
|
|
1643
1643
|
/** @type {Value[]} */
|
|
1644
1644
|
t.deps
|
|
@@ -1655,7 +1655,7 @@ function rr(t) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
(e & ue) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1657
1657
|
// traversal of the graph in the other batches still happens
|
|
1658
|
-
me === null &&
|
|
1658
|
+
me === null && M(t, F);
|
|
1659
1659
|
}
|
|
1660
1660
|
return !1;
|
|
1661
1661
|
}
|
|
@@ -1669,7 +1669,7 @@ function Zo(t, e, r = !0) {
|
|
|
1669
1669
|
n,
|
|
1670
1670
|
e,
|
|
1671
1671
|
!1
|
|
1672
|
-
) : e === n && (r ?
|
|
1672
|
+
) : e === n && (r ? M(n, H) : (n.f & F) !== 0 && M(n, ye), Ee(
|
|
1673
1673
|
/** @type {Effect} */
|
|
1674
1674
|
n
|
|
1675
1675
|
));
|
|
@@ -1677,9 +1677,9 @@ function Zo(t, e, r = !0) {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
function en(t) {
|
|
1679
1679
|
var w;
|
|
1680
|
-
var e = Y, r = X, i = le, o =
|
|
1680
|
+
var e = Y, r = X, i = le, o = A, n = de, s = ie, l = be, a = dt, c = t.f;
|
|
1681
1681
|
Y = /** @type {null | Value[]} */
|
|
1682
|
-
null, X = 0, le = null,
|
|
1682
|
+
null, X = 0, le = null, A = (c & (_e | et)) === 0 ? t : null, de = null, Dt(t.ctx), be = !1, dt = ++ot, t.ac !== null && (jo(() => {
|
|
1683
1683
|
t.ac.abort(rt);
|
|
1684
1684
|
}), t.ac = null);
|
|
1685
1685
|
try {
|
|
@@ -1689,41 +1689,41 @@ function en(t) {
|
|
|
1689
1689
|
t.fn
|
|
1690
1690
|
), d = f();
|
|
1691
1691
|
t.f |= gt;
|
|
1692
|
-
var v = t.deps, g =
|
|
1692
|
+
var v = t.deps, g = L?.is_fork;
|
|
1693
1693
|
if (Y !== null) {
|
|
1694
|
-
var
|
|
1694
|
+
var h;
|
|
1695
1695
|
if (g || Jt(t, X), v !== null && X > 0)
|
|
1696
|
-
for (v.length = X + Y.length,
|
|
1697
|
-
v[X +
|
|
1696
|
+
for (v.length = X + Y.length, h = 0; h < Y.length; h++)
|
|
1697
|
+
v[X + h] = Y[h];
|
|
1698
1698
|
else
|
|
1699
1699
|
t.deps = v = Y;
|
|
1700
1700
|
if (mi() && (t.f & ue) !== 0)
|
|
1701
|
-
for (
|
|
1702
|
-
((w = v[
|
|
1701
|
+
for (h = X; h < v.length; h++)
|
|
1702
|
+
((w = v[h]).reactions ?? (w.reactions = [])).push(t);
|
|
1703
1703
|
} else !g && v !== null && X < v.length && (Jt(t, X), v.length = X);
|
|
1704
1704
|
if (wo() && le !== null && !be && v !== null && (t.f & (B | ye | H)) === 0)
|
|
1705
|
-
for (
|
|
1706
|
-
le.length;
|
|
1705
|
+
for (h = 0; h < /** @type {Source[]} */
|
|
1706
|
+
le.length; h++)
|
|
1707
1707
|
Zo(
|
|
1708
|
-
le[
|
|
1708
|
+
le[h],
|
|
1709
1709
|
/** @type {Effect} */
|
|
1710
1710
|
t
|
|
1711
1711
|
);
|
|
1712
1712
|
if (o !== null && o !== t) {
|
|
1713
1713
|
if (ot++, o.deps !== null)
|
|
1714
|
-
for (let
|
|
1715
|
-
o.deps[
|
|
1714
|
+
for (let T = 0; T < r; T += 1)
|
|
1715
|
+
o.deps[T].rv = ot;
|
|
1716
1716
|
if (e !== null)
|
|
1717
|
-
for (const
|
|
1718
|
-
|
|
1717
|
+
for (const T of e)
|
|
1718
|
+
T.rv = ot;
|
|
1719
1719
|
le !== null && (i === null ? i = le : i.push(.../** @type {Source[]} */
|
|
1720
1720
|
le));
|
|
1721
1721
|
}
|
|
1722
1722
|
return (t.f & Ye) !== 0 && (t.f ^= Ye), d;
|
|
1723
|
-
} catch (
|
|
1724
|
-
return To(
|
|
1723
|
+
} catch (T) {
|
|
1724
|
+
return To(T);
|
|
1725
1725
|
} finally {
|
|
1726
|
-
t.f ^= zr, Y = e, X = r, le = i,
|
|
1726
|
+
t.f ^= zr, Y = e, X = r, le = i, A = o, de = n, Dt(s), be = l, dt = a;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
function Ls(t, e) {
|
|
@@ -1743,7 +1743,7 @@ function Ls(t, e) {
|
|
|
1743
1743
|
/** @type {Derived} */
|
|
1744
1744
|
e
|
|
1745
1745
|
);
|
|
1746
|
-
(n.f & ue) !== 0 && (n.f ^= ue, n.f &= ~
|
|
1746
|
+
(n.f & ue) !== 0 && (n.f ^= ue, n.f &= ~ht), hi(n), ys(n), Jt(n, 0);
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
1749
|
function Jt(t, e) {
|
|
@@ -1755,9 +1755,9 @@ function Jt(t, e) {
|
|
|
1755
1755
|
function Ft(t) {
|
|
1756
1756
|
var e = t.f;
|
|
1757
1757
|
if ((e & $e) === 0) {
|
|
1758
|
-
|
|
1759
|
-
var r =
|
|
1760
|
-
|
|
1758
|
+
M(t, F);
|
|
1759
|
+
var r = $, i = ur;
|
|
1760
|
+
$ = t, ur = !0;
|
|
1761
1761
|
try {
|
|
1762
1762
|
(e & (Ze | fi)) !== 0 ? $s(t) : _i(t), Go(t);
|
|
1763
1763
|
var o = en(t);
|
|
@@ -1765,22 +1765,22 @@ function Ft(t) {
|
|
|
1765
1765
|
var n;
|
|
1766
1766
|
Br && is && (t.f & H) !== 0 && t.deps;
|
|
1767
1767
|
} finally {
|
|
1768
|
-
ur = i,
|
|
1768
|
+
ur = i, $ = r;
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
1772
|
function m(t) {
|
|
1773
1773
|
var e = t.f, r = (e & B) !== 0;
|
|
1774
|
-
if (
|
|
1775
|
-
var i =
|
|
1774
|
+
if (A !== null && !be) {
|
|
1775
|
+
var i = $ !== null && ($.f & $e) !== 0;
|
|
1776
1776
|
if (!i && (de === null || !Mt.call(de, t))) {
|
|
1777
|
-
var o =
|
|
1778
|
-
if ((
|
|
1777
|
+
var o = A.deps;
|
|
1778
|
+
if ((A.f & zr) !== 0)
|
|
1779
1779
|
t.rv < ot && (t.rv = ot, Y === null && o !== null && o[X] === t ? X++ : Y === null ? Y = [t] : Y.push(t));
|
|
1780
1780
|
else {
|
|
1781
|
-
(
|
|
1781
|
+
(A.deps ?? (A.deps = [])).push(t);
|
|
1782
1782
|
var n = t.reactions;
|
|
1783
|
-
n === null ? t.reactions = [
|
|
1783
|
+
n === null ? t.reactions = [A] : Mt.call(n, A) || n.push(A);
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
@@ -1793,9 +1793,9 @@ function m(t) {
|
|
|
1793
1793
|
);
|
|
1794
1794
|
if (Xe) {
|
|
1795
1795
|
var l = s.v;
|
|
1796
|
-
return ((s.f & F) === 0 && s.reactions !== null || rn(s)) && (l =
|
|
1796
|
+
return ((s.f & F) === 0 && s.reactions !== null || rn(s)) && (l = pi(s)), Qe.set(s, l), l;
|
|
1797
1797
|
}
|
|
1798
|
-
var a = (s.f & ue) === 0 && !be &&
|
|
1798
|
+
var a = (s.f & ue) === 0 && !be && A !== null && (ur || (A.f & ue) !== 0), c = (s.f & gt) === 0;
|
|
1799
1799
|
rr(s) && (a && (s.f |= ue), Po(s)), a && !c && (Mo(s), tn(s));
|
|
1800
1800
|
}
|
|
1801
1801
|
if (me?.has(t))
|
|
@@ -1875,11 +1875,11 @@ function zi(t) {
|
|
|
1875
1875
|
return n || r;
|
|
1876
1876
|
}
|
|
1877
1877
|
});
|
|
1878
|
-
var f =
|
|
1879
|
-
|
|
1878
|
+
var f = A, d = $;
|
|
1879
|
+
he(null), Re(null);
|
|
1880
1880
|
try {
|
|
1881
1881
|
for (var v, g = []; n !== null; ) {
|
|
1882
|
-
var
|
|
1882
|
+
var h = n.assignedSlot || n.parentNode || /** @type {any} */
|
|
1883
1883
|
n.host || null;
|
|
1884
1884
|
try {
|
|
1885
1885
|
var w = n[nt]?.[i];
|
|
@@ -1887,22 +1887,22 @@ function zi(t) {
|
|
|
1887
1887
|
n.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1888
1888
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1889
1889
|
t.target === n) && w.call(n, t);
|
|
1890
|
-
} catch (
|
|
1891
|
-
v ? g.push(
|
|
1890
|
+
} catch (T) {
|
|
1891
|
+
v ? g.push(T) : v = T;
|
|
1892
1892
|
}
|
|
1893
|
-
if (t.cancelBubble ||
|
|
1893
|
+
if (t.cancelBubble || h === e || h === null)
|
|
1894
1894
|
break;
|
|
1895
|
-
n =
|
|
1895
|
+
n = h;
|
|
1896
1896
|
}
|
|
1897
1897
|
if (v) {
|
|
1898
|
-
for (let
|
|
1898
|
+
for (let T of g)
|
|
1899
1899
|
queueMicrotask(() => {
|
|
1900
|
-
throw
|
|
1900
|
+
throw T;
|
|
1901
1901
|
});
|
|
1902
1902
|
throw v;
|
|
1903
1903
|
}
|
|
1904
1904
|
} finally {
|
|
1905
|
-
t[nt] = e, delete t.currentTarget,
|
|
1905
|
+
t[nt] = e, delete t.currentTarget, he(f), Re(d);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
@@ -1926,7 +1926,7 @@ function nn(t) {
|
|
|
1926
1926
|
function vt(t, e) {
|
|
1927
1927
|
var r = (
|
|
1928
1928
|
/** @type {Effect} */
|
|
1929
|
-
|
|
1929
|
+
$
|
|
1930
1930
|
);
|
|
1931
1931
|
r.nodes === null && (r.nodes = { start: t, end: e, a: null, t: null });
|
|
1932
1932
|
}
|
|
@@ -1934,8 +1934,8 @@ function vt(t, e) {
|
|
|
1934
1934
|
function Ii(t, e) {
|
|
1935
1935
|
var r = (e & Ln) !== 0, i, o = !t.startsWith("<!>");
|
|
1936
1936
|
return () => {
|
|
1937
|
-
if (
|
|
1938
|
-
return vt(
|
|
1937
|
+
if (R)
|
|
1938
|
+
return vt(E, null), E;
|
|
1939
1939
|
i === void 0 && (i = nn(o ? t : "<!>" + t), i = /** @type {TemplateNode} */
|
|
1940
1940
|
/* @__PURE__ */ Je(i));
|
|
1941
1941
|
var n = (
|
|
@@ -1946,11 +1946,11 @@ function Ii(t, e) {
|
|
|
1946
1946
|
};
|
|
1947
1947
|
}
|
|
1948
1948
|
// @__NO_SIDE_EFFECTS__
|
|
1949
|
-
function
|
|
1949
|
+
function Ns(t, e, r = "svg") {
|
|
1950
1950
|
var i = !t.startsWith("<!>"), o = `<${r}>${i ? t : "<!>" + t}</${r}>`, n;
|
|
1951
1951
|
return () => {
|
|
1952
|
-
if (
|
|
1953
|
-
return vt(
|
|
1952
|
+
if (R)
|
|
1953
|
+
return vt(E, null), E;
|
|
1954
1954
|
if (!n) {
|
|
1955
1955
|
var s = (
|
|
1956
1956
|
/** @type {DocumentFragment} */
|
|
@@ -1970,22 +1970,22 @@ function xs(t, e, r = "svg") {
|
|
|
1970
1970
|
};
|
|
1971
1971
|
}
|
|
1972
1972
|
// @__NO_SIDE_EFFECTS__
|
|
1973
|
-
function
|
|
1974
|
-
return /* @__PURE__ */
|
|
1973
|
+
function xs(t, e) {
|
|
1974
|
+
return /* @__PURE__ */ Ns(t, e, "svg");
|
|
1975
1975
|
}
|
|
1976
1976
|
function Ds() {
|
|
1977
|
-
if (
|
|
1978
|
-
return vt(
|
|
1977
|
+
if (R)
|
|
1978
|
+
return vt(E, null), E;
|
|
1979
1979
|
var t = document.createDocumentFragment(), e = document.createComment(""), r = fe();
|
|
1980
1980
|
return t.append(e, r), vt(e, r), t;
|
|
1981
1981
|
}
|
|
1982
1982
|
function Tt(t, e) {
|
|
1983
|
-
if (
|
|
1983
|
+
if (R) {
|
|
1984
1984
|
var r = (
|
|
1985
1985
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1986
|
-
|
|
1986
|
+
$
|
|
1987
1987
|
);
|
|
1988
|
-
((r.f & gt) === 0 || r.nodes.end === null) && (r.nodes.end =
|
|
1988
|
+
((r.f & gt) === 0 || r.nodes.end === null) && (r.nodes.end = E), kr();
|
|
1989
1989
|
return;
|
|
1990
1990
|
}
|
|
1991
1991
|
t !== null && t.before(
|
|
@@ -2006,7 +2006,7 @@ function sn(t, e) {
|
|
|
2006
2006
|
}
|
|
2007
2007
|
function Fs(t, e) {
|
|
2008
2008
|
Zr(), e.intro = e.intro ?? !1;
|
|
2009
|
-
const r = e.target, i =
|
|
2009
|
+
const r = e.target, i = R, o = E;
|
|
2010
2010
|
try {
|
|
2011
2011
|
for (var n = /* @__PURE__ */ Je(r); n && (n.nodeType !== tr || /** @type {Comment} */
|
|
2012
2012
|
n.data !== co); )
|
|
@@ -2043,47 +2043,47 @@ function ln(t, { target: e, anchor: r, props: i = {}, events: o, context: n, int
|
|
|
2043
2043
|
},
|
|
2044
2044
|
(g) => {
|
|
2045
2045
|
yo({});
|
|
2046
|
-
var
|
|
2046
|
+
var h = (
|
|
2047
2047
|
/** @type {ComponentContext} */
|
|
2048
2048
|
ie
|
|
2049
2049
|
);
|
|
2050
|
-
if (n && (
|
|
2050
|
+
if (n && (h.c = n), o && (i.$$events = o), R && vt(
|
|
2051
2051
|
/** @type {TemplateNode} */
|
|
2052
2052
|
g,
|
|
2053
2053
|
null
|
|
2054
|
-
), a = t(g, i) || {},
|
|
2055
|
-
|
|
2054
|
+
), a = t(g, i) || {}, R && ($.nodes.end = E, E === null || E.nodeType !== tr || /** @type {Comment} */
|
|
2055
|
+
E.data !== ui))
|
|
2056
2056
|
throw wr(), Pt;
|
|
2057
2057
|
_o();
|
|
2058
2058
|
},
|
|
2059
2059
|
l
|
|
2060
2060
|
);
|
|
2061
2061
|
var d = /* @__PURE__ */ new Set(), v = (g) => {
|
|
2062
|
-
for (var
|
|
2063
|
-
var w = g[
|
|
2062
|
+
for (var h = 0; h < g.length; h++) {
|
|
2063
|
+
var w = g[h];
|
|
2064
2064
|
if (!d.has(w)) {
|
|
2065
2065
|
d.add(w);
|
|
2066
|
-
var
|
|
2066
|
+
var T = qs(w);
|
|
2067
2067
|
for (const N of [e, document]) {
|
|
2068
|
-
var
|
|
2069
|
-
|
|
2070
|
-
var
|
|
2071
|
-
|
|
2068
|
+
var I = nr.get(N);
|
|
2069
|
+
I === void 0 && (I = /* @__PURE__ */ new Map(), nr.set(N, I));
|
|
2070
|
+
var _ = I.get(w);
|
|
2071
|
+
_ === void 0 ? (N.addEventListener(w, zi, { passive: T }), I.set(w, 1)) : I.set(w, _ + 1);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
2075
|
};
|
|
2076
2076
|
return v(yr(on)), ei.add(v), () => {
|
|
2077
2077
|
for (var g of d)
|
|
2078
|
-
for (const
|
|
2079
|
-
var
|
|
2078
|
+
for (const T of [e, document]) {
|
|
2079
|
+
var h = (
|
|
2080
2080
|
/** @type {Map<string, number>} */
|
|
2081
|
-
nr.get(
|
|
2081
|
+
nr.get(T)
|
|
2082
2082
|
), w = (
|
|
2083
2083
|
/** @type {number} */
|
|
2084
|
-
|
|
2084
|
+
h.get(g)
|
|
2085
2085
|
);
|
|
2086
|
-
--w == 0 ? (
|
|
2086
|
+
--w == 0 ? (T.removeEventListener(g, zi), h.delete(g), h.size === 0 && nr.delete(T)) : h.set(g, w);
|
|
2087
2087
|
}
|
|
2088
2088
|
ei.delete(v), f !== r && f.parentNode?.removeChild(f);
|
|
2089
2089
|
};
|
|
@@ -2103,9 +2103,9 @@ class Bs {
|
|
|
2103
2103
|
*/
|
|
2104
2104
|
constructor(e, r = !0) {
|
|
2105
2105
|
/** @type {TemplateNode} */
|
|
2106
|
-
|
|
2106
|
+
p(this, "anchor");
|
|
2107
2107
|
/** @type {Map<Batch, Key>} */
|
|
2108
|
-
|
|
2108
|
+
S(this, ge, /* @__PURE__ */ new Map());
|
|
2109
2109
|
/**
|
|
2110
2110
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
2111
2111
|
* These effects are visible and actively part of the document tree.
|
|
@@ -2120,27 +2120,27 @@ class Bs {
|
|
|
2120
2120
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
2121
2121
|
* @type {Map<Key, Effect>}
|
|
2122
2122
|
*/
|
|
2123
|
-
|
|
2123
|
+
S(this, Ae, /* @__PURE__ */ new Map());
|
|
2124
2124
|
/**
|
|
2125
2125
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
2126
2126
|
* in the DOM, because their insertion is deferred.
|
|
2127
2127
|
* @type {Map<Key, Branch>}
|
|
2128
2128
|
*/
|
|
2129
|
-
|
|
2129
|
+
S(this, te, /* @__PURE__ */ new Map());
|
|
2130
2130
|
/**
|
|
2131
2131
|
* Keys of effects that are currently outroing
|
|
2132
2132
|
* @type {Set<Key>}
|
|
2133
2133
|
*/
|
|
2134
|
-
|
|
2134
|
+
S(this, ct, /* @__PURE__ */ new Set());
|
|
2135
2135
|
/**
|
|
2136
2136
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2137
2137
|
* This is necessary for `<svelte:element>`
|
|
2138
2138
|
*/
|
|
2139
|
-
|
|
2139
|
+
S(this, Zt, !0);
|
|
2140
2140
|
/**
|
|
2141
2141
|
* @param {Batch} batch
|
|
2142
2142
|
*/
|
|
2143
|
-
|
|
2143
|
+
S(this, er, (e) => {
|
|
2144
2144
|
if (u(this, ge).has(e)) {
|
|
2145
2145
|
var r = (
|
|
2146
2146
|
/** @type {Key} */
|
|
@@ -2175,7 +2175,7 @@ class Bs {
|
|
|
2175
2175
|
/**
|
|
2176
2176
|
* @param {Batch} batch
|
|
2177
2177
|
*/
|
|
2178
|
-
|
|
2178
|
+
S(this, br, (e) => {
|
|
2179
2179
|
u(this, ge).delete(e);
|
|
2180
2180
|
const r = Array.from(u(this, ge).values());
|
|
2181
2181
|
for (const [i, o] of u(this, te))
|
|
@@ -2191,7 +2191,7 @@ class Bs {
|
|
|
2191
2191
|
ensure(e, r) {
|
|
2192
2192
|
var i = (
|
|
2193
2193
|
/** @type {Batch} */
|
|
2194
|
-
|
|
2194
|
+
L
|
|
2195
2195
|
), o = Bo();
|
|
2196
2196
|
if (r && !u(this, Ae).has(e) && !u(this, te).has(e))
|
|
2197
2197
|
if (o) {
|
|
@@ -2212,7 +2212,7 @@ class Bs {
|
|
|
2212
2212
|
l === e ? i.unskip_effect(a.effect) : i.skip_effect(a.effect);
|
|
2213
2213
|
i.oncommit(u(this, er)), i.ondiscard(u(this, br));
|
|
2214
2214
|
} else
|
|
2215
|
-
|
|
2215
|
+
R && (this.anchor = E), u(this, er).call(this, i);
|
|
2216
2216
|
}
|
|
2217
2217
|
}
|
|
2218
2218
|
ge = new WeakMap(), Ae = new WeakMap(), te = new WeakMap(), ct = new WeakMap(), Zt = new WeakMap(), er = new WeakMap(), br = new WeakMap();
|
|
@@ -2227,10 +2227,10 @@ function js(t) {
|
|
|
2227
2227
|
}
|
|
2228
2228
|
function Fr(t, e, r = !1) {
|
|
2229
2229
|
var i;
|
|
2230
|
-
|
|
2231
|
-
var o = new Bs(t), n = r ?
|
|
2230
|
+
R && (i = E, kr());
|
|
2231
|
+
var o = new Bs(t), n = r ? xt : 0;
|
|
2232
2232
|
function s(l, a) {
|
|
2233
|
-
if (
|
|
2233
|
+
if (R) {
|
|
2234
2234
|
var c = go(
|
|
2235
2235
|
/** @type {TemplateNode} */
|
|
2236
2236
|
i
|
|
@@ -2318,59 +2318,59 @@ function Us(t, e, r, i, o, n = null) {
|
|
|
2318
2318
|
/** @type {Element} */
|
|
2319
2319
|
t
|
|
2320
2320
|
);
|
|
2321
|
-
s =
|
|
2321
|
+
s = R ? Q(/* @__PURE__ */ Je(a)) : a.appendChild(fe());
|
|
2322
2322
|
}
|
|
2323
|
-
|
|
2323
|
+
R && kr();
|
|
2324
2324
|
var c = null, f = /* @__PURE__ */ gs(() => {
|
|
2325
|
-
var
|
|
2326
|
-
return fo(
|
|
2325
|
+
var _ = r();
|
|
2326
|
+
return fo(_) ? _ : _ == null ? [] : yr(_);
|
|
2327
2327
|
}), d, v = /* @__PURE__ */ new Map(), g = !0;
|
|
2328
|
-
function
|
|
2329
|
-
(
|
|
2328
|
+
function h(_) {
|
|
2329
|
+
(I.effect.f & $e) === 0 && (I.pending.delete(_), I.fallback = c, Gs(I, d, s, e, i), c !== null && (d.length === 0 ? (c.f & qe) === 0 ? wi(c) : (c.f ^= qe, Kt(c, null, s)) : ft(c, () => {
|
|
2330
2330
|
c = null;
|
|
2331
2331
|
})));
|
|
2332
2332
|
}
|
|
2333
|
-
function w(
|
|
2334
|
-
|
|
2333
|
+
function w(_) {
|
|
2334
|
+
I.pending.delete(_);
|
|
2335
2335
|
}
|
|
2336
|
-
var
|
|
2336
|
+
var T = yi(() => {
|
|
2337
2337
|
d = /** @type {V[]} */
|
|
2338
2338
|
m(f);
|
|
2339
|
-
var
|
|
2339
|
+
var _ = d.length;
|
|
2340
2340
|
let N = !1;
|
|
2341
|
-
if (
|
|
2342
|
-
var
|
|
2343
|
-
|
|
2341
|
+
if (R) {
|
|
2342
|
+
var pe = go(s) === ci;
|
|
2343
|
+
pe !== (_ === 0) && (s = gr(), Q(s), Fe(!1), N = !0);
|
|
2344
2344
|
}
|
|
2345
2345
|
for (var oe = /* @__PURE__ */ new Set(), we = (
|
|
2346
2346
|
/** @type {Batch} */
|
|
2347
|
-
|
|
2348
|
-
), bt = Bo(),
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
var Bt = d[
|
|
2353
|
-
ne ? (ne.v && qt(ne.v, Bt), ne.i && qt(ne.i,
|
|
2347
|
+
L
|
|
2348
|
+
), bt = Bo(), x = 0; x < _; x += 1) {
|
|
2349
|
+
R && E.nodeType === tr && /** @type {Comment} */
|
|
2350
|
+
E.data === ui && (s = /** @type {Comment} */
|
|
2351
|
+
E, N = !0, Fe(!1));
|
|
2352
|
+
var Bt = d[x], yt = i(Bt, x), ne = g ? null : l.get(yt);
|
|
2353
|
+
ne ? (ne.v && qt(ne.v, Bt), ne.i && qt(ne.i, x), bt && we.unskip_effect(ne.e)) : (ne = Ws(
|
|
2354
2354
|
l,
|
|
2355
2355
|
g ? s : Ui ?? (Ui = fe()),
|
|
2356
2356
|
Bt,
|
|
2357
2357
|
yt,
|
|
2358
|
-
|
|
2358
|
+
x,
|
|
2359
2359
|
o,
|
|
2360
2360
|
e,
|
|
2361
2361
|
r
|
|
2362
2362
|
), g || (ne.e.f |= qe), l.set(yt, ne)), oe.add(yt);
|
|
2363
2363
|
}
|
|
2364
|
-
if (
|
|
2364
|
+
if (_ === 0 && n && !c && (g ? c = ce(() => n(s)) : (c = ce(() => n(Ui ?? (Ui = fe()))), c.f |= qe)), _ > oe.size && Un(), R && _ > 0 && Q(gr()), !g)
|
|
2365
2365
|
if (v.set(we, oe), bt) {
|
|
2366
2366
|
for (const [Er, $r] of l)
|
|
2367
2367
|
oe.has(Er) || we.skip_effect($r.e);
|
|
2368
|
-
we.oncommit(
|
|
2368
|
+
we.oncommit(h), we.ondiscard(w);
|
|
2369
2369
|
} else
|
|
2370
|
-
|
|
2370
|
+
h(we);
|
|
2371
2371
|
N && Fe(!0), m(f);
|
|
2372
|
-
}),
|
|
2373
|
-
g = !1,
|
|
2372
|
+
}), I = { effect: T, items: l, pending: v, outrogroups: null, fallback: c };
|
|
2373
|
+
g = !1, R && (s = E);
|
|
2374
2374
|
}
|
|
2375
2375
|
function Ut(t) {
|
|
2376
2376
|
for (; t !== null && (t.f & _e) === 0; )
|
|
@@ -2378,52 +2378,52 @@ function Ut(t) {
|
|
|
2378
2378
|
return t;
|
|
2379
2379
|
}
|
|
2380
2380
|
function Gs(t, e, r, i, o) {
|
|
2381
|
-
var n = e.length, s = t.items, l = Ut(t.effect.first), a, c = null, f = [], d = [], v, g,
|
|
2381
|
+
var n = e.length, s = t.items, l = Ut(t.effect.first), a, c = null, f = [], d = [], v, g, h, w;
|
|
2382
2382
|
for (w = 0; w < n; w += 1) {
|
|
2383
|
-
if (v = e[w], g = o(v, w),
|
|
2383
|
+
if (v = e[w], g = o(v, w), h = /** @type {EachItem} */
|
|
2384
2384
|
s.get(g).e, t.outrogroups !== null)
|
|
2385
|
-
for (const
|
|
2386
|
-
|
|
2387
|
-
if ((
|
|
2388
|
-
if (
|
|
2389
|
-
Kt(
|
|
2385
|
+
for (const x of t.outrogroups)
|
|
2386
|
+
x.pending.delete(h), x.done.delete(h);
|
|
2387
|
+
if ((h.f & qe) !== 0)
|
|
2388
|
+
if (h.f ^= qe, h === l)
|
|
2389
|
+
Kt(h, null, r);
|
|
2390
2390
|
else {
|
|
2391
|
-
var
|
|
2392
|
-
|
|
2391
|
+
var T = c ? c.next : l;
|
|
2392
|
+
h === t.effect.last && (t.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), ze(t, c, h), ze(t, h, T), Kt(h, T, r), c = h, f = [], d = [], l = Ut(c.next);
|
|
2393
2393
|
continue;
|
|
2394
2394
|
}
|
|
2395
|
-
if ((
|
|
2396
|
-
if (a !== void 0 && a.has(
|
|
2395
|
+
if ((h.f & U) !== 0 && wi(h), h !== l) {
|
|
2396
|
+
if (a !== void 0 && a.has(h)) {
|
|
2397
2397
|
if (f.length < d.length) {
|
|
2398
|
-
var
|
|
2399
|
-
c =
|
|
2400
|
-
var N = f[0],
|
|
2401
|
-
for (
|
|
2402
|
-
Kt(f[
|
|
2403
|
-
for (
|
|
2404
|
-
a.delete(d[
|
|
2405
|
-
ze(t, N.prev,
|
|
2398
|
+
var I = d[0], _;
|
|
2399
|
+
c = I.prev;
|
|
2400
|
+
var N = f[0], pe = f[f.length - 1];
|
|
2401
|
+
for (_ = 0; _ < f.length; _ += 1)
|
|
2402
|
+
Kt(f[_], I, r);
|
|
2403
|
+
for (_ = 0; _ < d.length; _ += 1)
|
|
2404
|
+
a.delete(d[_]);
|
|
2405
|
+
ze(t, N.prev, pe.next), ze(t, c, N), ze(t, pe, I), l = I, c = pe, w -= 1, f = [], d = [];
|
|
2406
2406
|
} else
|
|
2407
|
-
a.delete(
|
|
2407
|
+
a.delete(h), Kt(h, l, r), ze(t, h.prev, h.next), ze(t, h, c === null ? t.effect.first : c.next), ze(t, c, h), c = h;
|
|
2408
2408
|
continue;
|
|
2409
2409
|
}
|
|
2410
|
-
for (f = [], d = []; l !== null && l !==
|
|
2410
|
+
for (f = [], d = []; l !== null && l !== h; )
|
|
2411
2411
|
(a ?? (a = /* @__PURE__ */ new Set())).add(l), d.push(l), l = Ut(l.next);
|
|
2412
2412
|
if (l === null)
|
|
2413
2413
|
continue;
|
|
2414
2414
|
}
|
|
2415
|
-
(
|
|
2415
|
+
(h.f & qe) === 0 && f.push(h), c = h, l = Ut(h.next);
|
|
2416
2416
|
}
|
|
2417
2417
|
if (t.outrogroups !== null) {
|
|
2418
|
-
for (const
|
|
2419
|
-
|
|
2418
|
+
for (const x of t.outrogroups)
|
|
2419
|
+
x.pending.size === 0 && (ri(t, yr(x.done)), t.outrogroups?.delete(x));
|
|
2420
2420
|
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
2421
2421
|
}
|
|
2422
2422
|
if (l !== null || a !== void 0) {
|
|
2423
2423
|
var oe = [];
|
|
2424
2424
|
if (a !== void 0)
|
|
2425
|
-
for (
|
|
2426
|
-
(
|
|
2425
|
+
for (h of a)
|
|
2426
|
+
(h.f & U) === 0 && oe.push(h);
|
|
2427
2427
|
for (; l !== null; )
|
|
2428
2428
|
(l.f & U) === 0 && l !== t.fallback && oe.push(l), l = Ut(l.next);
|
|
2429
2429
|
var we = oe.length;
|
|
@@ -2434,7 +2434,7 @@ function Gs(t, e, r, i, o) {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
2436
2436
|
function Ws(t, e, r, i, o, n, s, l) {
|
|
2437
|
-
var a = (s & $n) !== 0 ? (s & On) === 0 ? /* @__PURE__ */
|
|
2437
|
+
var a = (s & $n) !== 0 ? (s & On) === 0 ? /* @__PURE__ */ xo(r, !1, !1) : pt(r) : null, c = (s & Rn) !== 0 ? pt(o) : null;
|
|
2438
2438
|
return {
|
|
2439
2439
|
v: a,
|
|
2440
2440
|
i: c,
|
|
@@ -2501,9 +2501,9 @@ function Qs(t, e) {
|
|
|
2501
2501
|
}
|
|
2502
2502
|
function Js(t, e, r, i, o, n) {
|
|
2503
2503
|
var s = t.__className;
|
|
2504
|
-
if (
|
|
2504
|
+
if (R || s !== r || s === void 0) {
|
|
2505
2505
|
var l = Ys(r, i, n);
|
|
2506
|
-
(!
|
|
2506
|
+
(!R || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = r;
|
|
2507
2507
|
} else if (n && o !== n)
|
|
2508
2508
|
for (var a in n) {
|
|
2509
2509
|
var c = !!n[a];
|
|
@@ -2513,16 +2513,16 @@ function Js(t, e, r, i, o, n) {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
function wt(t, e, r, i) {
|
|
2515
2515
|
var o = t.__style;
|
|
2516
|
-
if (
|
|
2516
|
+
if (R || o !== e) {
|
|
2517
2517
|
var n = Qs(e);
|
|
2518
|
-
(!
|
|
2518
|
+
(!R || n !== t.getAttribute("style")) && (n == null ? t.removeAttribute("style") : t.style.cssText = n), t.__style = e;
|
|
2519
2519
|
}
|
|
2520
2520
|
return i;
|
|
2521
2521
|
}
|
|
2522
2522
|
const Xs = /* @__PURE__ */ Symbol("is custom element"), Zs = /* @__PURE__ */ Symbol("is html"), el = Bn ? "link" : "LINK";
|
|
2523
2523
|
function Hr(t, e, r, i) {
|
|
2524
2524
|
var o = tl(t);
|
|
2525
|
-
|
|
2525
|
+
R && (o[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === el) || o[e] !== (o[e] = r) && (e === "loading" && (t[Hn] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && rl(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
|
|
2526
2526
|
}
|
|
2527
2527
|
function tl(t) {
|
|
2528
2528
|
return (
|
|
@@ -2543,7 +2543,7 @@ function rl(t) {
|
|
|
2543
2543
|
i = Pn(o);
|
|
2544
2544
|
for (var s in i)
|
|
2545
2545
|
i[s].set && r.push(s);
|
|
2546
|
-
o =
|
|
2546
|
+
o = ho(o);
|
|
2547
2547
|
}
|
|
2548
2548
|
return r;
|
|
2549
2549
|
}
|
|
@@ -2582,14 +2582,14 @@ function sr(t, e, r, i) {
|
|
|
2582
2582
|
};
|
|
2583
2583
|
var c = !1, f = /* @__PURE__ */ Ir(() => (c = !1, a())), d = (
|
|
2584
2584
|
/** @type {Effect} */
|
|
2585
|
-
|
|
2585
|
+
$
|
|
2586
2586
|
);
|
|
2587
2587
|
return (
|
|
2588
2588
|
/** @type {() => V} */
|
|
2589
2589
|
(function(v, g) {
|
|
2590
2590
|
if (arguments.length > 0) {
|
|
2591
|
-
const
|
|
2592
|
-
return V(f,
|
|
2591
|
+
const h = g ? m(f) : v;
|
|
2592
|
+
return V(f, h), c = !0, o !== void 0 && (o = h), v;
|
|
2593
2593
|
}
|
|
2594
2594
|
return Xe && c || (d.f & $e) !== 0 ? f.v : m(f);
|
|
2595
2595
|
})
|
|
@@ -2607,11 +2607,11 @@ class nl {
|
|
|
2607
2607
|
*/
|
|
2608
2608
|
constructor(e) {
|
|
2609
2609
|
/** @type {any} */
|
|
2610
|
-
|
|
2610
|
+
S(this, Ve);
|
|
2611
2611
|
/** @type {Record<string, any>} */
|
|
2612
|
-
|
|
2612
|
+
S(this, ae);
|
|
2613
2613
|
var r = /* @__PURE__ */ new Map(), i = (n, s) => {
|
|
2614
|
-
var l = /* @__PURE__ */
|
|
2614
|
+
var l = /* @__PURE__ */ xo(s, !1, !1);
|
|
2615
2615
|
return r.set(n, l), l;
|
|
2616
2616
|
};
|
|
2617
2617
|
const o = new Proxy(
|
|
@@ -2689,27 +2689,27 @@ typeof HTMLElement == "function" && (an = class extends HTMLElement {
|
|
|
2689
2689
|
constructor(e, r, i) {
|
|
2690
2690
|
super();
|
|
2691
2691
|
/** The Svelte component constructor */
|
|
2692
|
-
|
|
2692
|
+
p(this, "$$ctor");
|
|
2693
2693
|
/** Slots */
|
|
2694
|
-
|
|
2694
|
+
p(this, "$$s");
|
|
2695
2695
|
/** @type {any} The Svelte component instance */
|
|
2696
|
-
|
|
2696
|
+
p(this, "$$c");
|
|
2697
2697
|
/** Whether or not the custom element is connected */
|
|
2698
|
-
|
|
2698
|
+
p(this, "$$cn", !1);
|
|
2699
2699
|
/** @type {Record<string, any>} Component props data */
|
|
2700
|
-
|
|
2700
|
+
p(this, "$$d", {});
|
|
2701
2701
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
2702
|
-
|
|
2702
|
+
p(this, "$$r", !1);
|
|
2703
2703
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
2704
|
-
|
|
2704
|
+
p(this, "$$p_d", {});
|
|
2705
2705
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
2706
|
-
|
|
2706
|
+
p(this, "$$l", {});
|
|
2707
2707
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
2708
|
-
|
|
2708
|
+
p(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
2709
2709
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
2710
|
-
|
|
2710
|
+
p(this, "$$me");
|
|
2711
2711
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
2712
|
-
|
|
2712
|
+
p(this, "$$shadowRoot", null);
|
|
2713
2713
|
this.$$ctor = e, this.$$s = r, i && (this.$$shadowRoot = this.attachShadow(i));
|
|
2714
2714
|
}
|
|
2715
2715
|
/**
|
|
@@ -2765,7 +2765,7 @@ typeof HTMLElement == "function" && (an = class extends HTMLElement {
|
|
|
2765
2765
|
}), this.$$me = Ss(() => {
|
|
2766
2766
|
bi(() => {
|
|
2767
2767
|
this.$$r = !0;
|
|
2768
|
-
for (const o of
|
|
2768
|
+
for (const o of pr(this.$$c)) {
|
|
2769
2769
|
if (!this.$$p_d[o]?.reflect) continue;
|
|
2770
2770
|
this.$$d[o] = this.$$c[o];
|
|
2771
2771
|
const n = fr(
|
|
@@ -2806,7 +2806,7 @@ typeof HTMLElement == "function" && (an = class extends HTMLElement {
|
|
|
2806
2806
|
* @param {string} attribute_name
|
|
2807
2807
|
*/
|
|
2808
2808
|
$$g_p(e) {
|
|
2809
|
-
return
|
|
2809
|
+
return pr(this.$$p_d).find(
|
|
2810
2810
|
(r) => this.$$p_d[r].attribute === e || !this.$$p_d[r].attribute && r.toLowerCase() === e
|
|
2811
2811
|
) || e;
|
|
2812
2812
|
}
|
|
@@ -2856,12 +2856,12 @@ function ll(t, e, r, i, o, n) {
|
|
|
2856
2856
|
super(t, r, o), this.$$p_d = e;
|
|
2857
2857
|
}
|
|
2858
2858
|
static get observedAttributes() {
|
|
2859
|
-
return
|
|
2859
|
+
return pr(e).map(
|
|
2860
2860
|
(l) => (e[l].attribute || l).toLowerCase()
|
|
2861
2861
|
);
|
|
2862
2862
|
}
|
|
2863
2863
|
};
|
|
2864
|
-
return
|
|
2864
|
+
return pr(e).forEach((l) => {
|
|
2865
2865
|
vr(s.prototype, l, {
|
|
2866
2866
|
get() {
|
|
2867
2867
|
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
@@ -2887,23 +2887,23 @@ function ll(t, e, r, i, o, n) {
|
|
|
2887
2887
|
class al extends Event {
|
|
2888
2888
|
constructor(r, i, o, n) {
|
|
2889
2889
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2890
|
+
p(this, "context");
|
|
2891
|
+
p(this, "contextTarget");
|
|
2892
|
+
p(this, "callback");
|
|
2893
|
+
p(this, "subscribe");
|
|
2894
2894
|
this.context = r, this.contextTarget = i, this.callback = o, this.subscribe = n ?? !1;
|
|
2895
2895
|
}
|
|
2896
2896
|
}
|
|
2897
2897
|
class cl {
|
|
2898
2898
|
constructor(e, r) {
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2899
|
+
p(this, "host");
|
|
2900
|
+
p(this, "context");
|
|
2901
|
+
p(this, "subscribe");
|
|
2902
|
+
p(this, "onValue");
|
|
2903
|
+
p(this, "isConnected", !1);
|
|
2904
|
+
p(this, "unsubscribe");
|
|
2905
|
+
p(this, "currentValue");
|
|
2906
|
+
p(this, "handleValue", (e, r) => {
|
|
2907
2907
|
r !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = r), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = e, this.onValue?.(e);
|
|
2908
2908
|
});
|
|
2909
2909
|
this.host = e, this.context = r.context, this.subscribe = r.subscribe ?? !0, this.onValue = r.onValue;
|
|
@@ -2948,11 +2948,11 @@ function dl(t, e, r) {
|
|
|
2948
2948
|
globalThis.clearInterval(a), t.removeEventListener("context-provider", n), o.disconnect();
|
|
2949
2949
|
};
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function hl(t, e) {
|
|
2952
2952
|
return dl(t, fl, e);
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2955
|
-
return
|
|
2954
|
+
function pl(t, e) {
|
|
2955
|
+
return hl(t, e);
|
|
2956
2956
|
}
|
|
2957
2957
|
var Yi;
|
|
2958
2958
|
(function(t) {
|
|
@@ -3005,13 +3005,13 @@ function Ji(t) {
|
|
|
3005
3005
|
}
|
|
3006
3006
|
class bl {
|
|
3007
3007
|
constructor() {
|
|
3008
|
-
|
|
3009
|
-
|
|
3008
|
+
p(this, "tools", /* @__PURE__ */ new Map());
|
|
3009
|
+
p(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
3010
3010
|
// pnpSupportId → Set<toolId>
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3011
|
+
p(this, "componentOverrides", {});
|
|
3012
|
+
p(this, "moduleLoaders", /* @__PURE__ */ new Map());
|
|
3013
|
+
p(this, "loadedToolModules", /* @__PURE__ */ new Set());
|
|
3014
|
+
p(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
3015
3015
|
}
|
|
3016
3016
|
/**
|
|
3017
3017
|
* Normalize a single tool alias to canonical toolId.
|
|
@@ -3443,13 +3443,13 @@ function Ai(t, e, r) {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
class Al {
|
|
3445
3445
|
constructor() {
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3446
|
+
p(this, "providerId", "desmos-calculator");
|
|
3447
|
+
p(this, "providerName", "Desmos Calculator");
|
|
3448
|
+
p(this, "category", "calculator");
|
|
3449
|
+
p(this, "version", "1.10");
|
|
3450
|
+
p(this, "requiresAuth", !0);
|
|
3451
|
+
p(this, "desmosProvider", null);
|
|
3452
|
+
p(this, "config", null);
|
|
3453
3453
|
}
|
|
3454
3454
|
/**
|
|
3455
3455
|
* Initialize Desmos calculator provider
|
|
@@ -3529,9 +3529,9 @@ class Al {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
class El {
|
|
3531
3531
|
constructor() {
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3532
|
+
p(this, "providerId", "browser");
|
|
3533
|
+
p(this, "providerName", "Browser Speech Synthesis");
|
|
3534
|
+
p(this, "version", "1.0.0");
|
|
3535
3535
|
}
|
|
3536
3536
|
async initialize(e) {
|
|
3537
3537
|
if (typeof window > "u")
|
|
@@ -3558,12 +3558,12 @@ class El {
|
|
|
3558
3558
|
}
|
|
3559
3559
|
class $l {
|
|
3560
3560
|
constructor(e) {
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3561
|
+
p(this, "utterance", null);
|
|
3562
|
+
p(this, "config", null);
|
|
3563
|
+
p(this, "_isPlaying", !1);
|
|
3564
|
+
p(this, "_isPaused", !1);
|
|
3565
|
+
p(this, "speakRunId", 0);
|
|
3566
|
+
p(this, "onWordBoundary");
|
|
3567
3567
|
this.config = e;
|
|
3568
3568
|
}
|
|
3569
3569
|
async speak(e) {
|
|
@@ -3728,13 +3728,13 @@ class Rl {
|
|
|
3728
3728
|
* @param backend TTS backend to use (default: 'browser')
|
|
3729
3729
|
*/
|
|
3730
3730
|
constructor(e = "browser") {
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3731
|
+
p(this, "providerId", "tts-service");
|
|
3732
|
+
p(this, "providerName", "Text-to-Speech");
|
|
3733
|
+
p(this, "category", "tts");
|
|
3734
|
+
p(this, "version", "1.0");
|
|
3735
|
+
p(this, "requiresAuth");
|
|
3736
|
+
p(this, "ttsProvider", null);
|
|
3737
|
+
p(this, "config", null);
|
|
3738
3738
|
this.requiresAuth = e !== "browser";
|
|
3739
3739
|
}
|
|
3740
3740
|
/**
|
|
@@ -3879,7 +3879,7 @@ const Ol = /* @__PURE__ */ new Set([
|
|
|
3879
3879
|
}, Ml = (t) => document.createElement(t), Ce = (t, e, r, i) => {
|
|
3880
3880
|
const o = Pl(t, i), s = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
|
|
3881
3881
|
return s ? s({ toolId: t, tagName: o, context: e, toolbarContext: r }) : Ml(o);
|
|
3882
|
-
},
|
|
3882
|
+
}, Nl = {
|
|
3883
3883
|
toolId: "calculator",
|
|
3884
3884
|
name: "Calculator",
|
|
3885
3885
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
@@ -3971,7 +3971,7 @@ const Ol = /* @__PURE__ */ new Set([
|
|
|
3971
3971
|
}, Xi = (t) => t && typeof t == "object" ? t : {}, Zi = (t) => {
|
|
3972
3972
|
const e = Xi(t), r = Xi(t?.settings);
|
|
3973
3973
|
return { ...e, ...r };
|
|
3974
|
-
},
|
|
3974
|
+
}, xl = {
|
|
3975
3975
|
toolId: "textToSpeech",
|
|
3976
3976
|
name: "Text to Speech",
|
|
3977
3977
|
description: "Read content aloud",
|
|
@@ -4056,20 +4056,20 @@ const Ol = /* @__PURE__ */ new Set([
|
|
|
4056
4056
|
const g = e.getScopeElement?.();
|
|
4057
4057
|
if (g)
|
|
4058
4058
|
return g;
|
|
4059
|
-
const
|
|
4059
|
+
const h = (I) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(I) : I.replace(/"/g, '\\"'), w = [
|
|
4060
4060
|
e.catalogId,
|
|
4061
4061
|
e.scope.itemId,
|
|
4062
4062
|
e.scope.canonicalItemId
|
|
4063
|
-
].filter((
|
|
4064
|
-
for (const
|
|
4065
|
-
const
|
|
4066
|
-
e.scope.level === "passage" &&
|
|
4063
|
+
].filter((I) => typeof I == "string" && I.length > 0), T = [];
|
|
4064
|
+
for (const I of w) {
|
|
4065
|
+
const _ = h(I);
|
|
4066
|
+
e.scope.level === "passage" && T.push(`pie-passage-shell[item-id="${_}"] [data-region="content"]`), T.push(`pie-item-shell[item-id="${_}"] [data-region="content"]`);
|
|
4067
4067
|
}
|
|
4068
|
-
|
|
4069
|
-
for (const
|
|
4070
|
-
const
|
|
4071
|
-
if (
|
|
4072
|
-
return
|
|
4068
|
+
T.push("[data-region='content']");
|
|
4069
|
+
for (const I of T) {
|
|
4070
|
+
const _ = document.querySelector(I);
|
|
4071
|
+
if (_ instanceof HTMLElement)
|
|
4072
|
+
return _;
|
|
4073
4073
|
}
|
|
4074
4074
|
return null;
|
|
4075
4075
|
}, v = async () => {
|
|
@@ -4082,10 +4082,10 @@ const Ol = /* @__PURE__ */ new Set([
|
|
|
4082
4082
|
const g = d();
|
|
4083
4083
|
if (!g)
|
|
4084
4084
|
return;
|
|
4085
|
-
const
|
|
4086
|
-
if (
|
|
4085
|
+
const h = g.textContent || "";
|
|
4086
|
+
if (h.trim())
|
|
4087
4087
|
try {
|
|
4088
|
-
n() || e.toggleTool(this.toolId), l(), await c(), i.setRootElement?.(g), i.speak(
|
|
4088
|
+
n() || e.toggleTool(this.toolId), l(), await c(), i.setRootElement?.(g), i.speak(h, {
|
|
4089
4089
|
// For passage-level TTS, use rendered DOM text as the source of truth.
|
|
4090
4090
|
// Catalog/SSML content can diverge from rendered text and break
|
|
4091
4091
|
// word-boundary-to-DOM mapping for progressive yellow highlighting.
|
|
@@ -4108,27 +4108,27 @@ const Ol = /* @__PURE__ */ new Set([
|
|
|
4108
4108
|
});
|
|
4109
4109
|
},
|
|
4110
4110
|
subscribeActive: (g) => {
|
|
4111
|
-
const
|
|
4111
|
+
const h = [];
|
|
4112
4112
|
if (e.subscribeVisibility) {
|
|
4113
4113
|
const w = e.subscribeVisibility(() => {
|
|
4114
|
-
const
|
|
4115
|
-
l(), g(
|
|
4114
|
+
const T = n();
|
|
4115
|
+
l(), g(T);
|
|
4116
4116
|
});
|
|
4117
|
-
|
|
4117
|
+
h.push(w);
|
|
4118
4118
|
}
|
|
4119
4119
|
if (e.ttsService) {
|
|
4120
|
-
const w = `tts-toolbar:${o}`,
|
|
4121
|
-
a(String(
|
|
4122
|
-
const
|
|
4123
|
-
l(), g(
|
|
4120
|
+
const w = `tts-toolbar:${o}`, T = (I) => {
|
|
4121
|
+
a(String(I || ""));
|
|
4122
|
+
const _ = n();
|
|
4123
|
+
l(), g(_);
|
|
4124
4124
|
};
|
|
4125
|
-
e.ttsService.onStateChange(w,
|
|
4126
|
-
e.ttsService?.offStateChange(w,
|
|
4125
|
+
e.ttsService.onStateChange(w, T), h.push(() => {
|
|
4126
|
+
e.ttsService?.offStateChange(w, T);
|
|
4127
4127
|
});
|
|
4128
4128
|
}
|
|
4129
|
-
return
|
|
4129
|
+
return h.length === 0 ? () => {
|
|
4130
4130
|
} : () => {
|
|
4131
|
-
for (const w of
|
|
4131
|
+
for (const w of h)
|
|
4132
4132
|
w();
|
|
4133
4133
|
};
|
|
4134
4134
|
}
|
|
@@ -4646,8 +4646,8 @@ const Dl = {
|
|
|
4646
4646
|
};
|
|
4647
4647
|
}
|
|
4648
4648
|
}, Wl = [
|
|
4649
|
-
xl,
|
|
4650
4649
|
Nl,
|
|
4650
|
+
xl,
|
|
4651
4651
|
Dl,
|
|
4652
4652
|
Vl,
|
|
4653
4653
|
ql,
|
|
@@ -5133,6 +5133,7 @@ const na = {
|
|
|
5133
5133
|
"--pie-blue-grey-300": "#c0c3cf",
|
|
5134
5134
|
"--pie-blue-grey-600": "#7e8494",
|
|
5135
5135
|
"--pie-blue-grey-900": "#152452",
|
|
5136
|
+
"--pie-font-scale": "1",
|
|
5136
5137
|
"--pie-button-bg": "#ffffff",
|
|
5137
5138
|
"--pie-button-border": "#d1d5db",
|
|
5138
5139
|
"--pie-button-color": "#374151",
|
|
@@ -5181,6 +5182,7 @@ const na = {
|
|
|
5181
5182
|
"--pie-blue-grey-300": "#555555",
|
|
5182
5183
|
"--pie-blue-grey-600": "#999999",
|
|
5183
5184
|
"--pie-blue-grey-900": "#ffffff",
|
|
5185
|
+
"--pie-font-scale": "1",
|
|
5184
5186
|
"--pie-button-bg": "#1f2937",
|
|
5185
5187
|
"--pie-button-border": "#4b5563",
|
|
5186
5188
|
"--pie-button-color": "#f9fafb",
|
|
@@ -5190,7 +5192,7 @@ const na = {
|
|
|
5190
5192
|
"--pie-button-active-bg": "#4b5563",
|
|
5191
5193
|
"--pie-button-focus-outline": "#93c5fd"
|
|
5192
5194
|
}, si = /* @__PURE__ */ new Map();
|
|
5193
|
-
function
|
|
5195
|
+
function hr(t) {
|
|
5194
5196
|
const e = t.trim();
|
|
5195
5197
|
return e || void 0;
|
|
5196
5198
|
}
|
|
@@ -5199,7 +5201,7 @@ function Me(t) {
|
|
|
5199
5201
|
return `color-mix(in srgb, ${t.left} ${t.leftWeight}, ${t.right})`;
|
|
5200
5202
|
}
|
|
5201
5203
|
function la(t) {
|
|
5202
|
-
const e = (r) =>
|
|
5204
|
+
const e = (r) => hr(t.getPropertyValue(r));
|
|
5203
5205
|
return oi({
|
|
5204
5206
|
"--pie-background": e("--color-base-100"),
|
|
5205
5207
|
"--pie-background-dark": e("--color-base-200"),
|
|
@@ -5290,7 +5292,7 @@ const to = {
|
|
|
5290
5292
|
id: "daisyui",
|
|
5291
5293
|
canRead(t) {
|
|
5292
5294
|
const e = getComputedStyle(t);
|
|
5293
|
-
return !!(
|
|
5295
|
+
return !!(hr(e.getPropertyValue("--color-base-100")) || hr(e.getPropertyValue("--color-base-content")) || hr(e.getPropertyValue("--color-primary")));
|
|
5294
5296
|
},
|
|
5295
5297
|
read(t) {
|
|
5296
5298
|
return la(getComputedStyle(t));
|
|
@@ -5331,10 +5333,10 @@ function li(t) {
|
|
|
5331
5333
|
class ua extends ca {
|
|
5332
5334
|
constructor() {
|
|
5333
5335
|
super(...arguments);
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5336
|
+
p(this, "mediaQuery", null);
|
|
5337
|
+
p(this, "onMediaChange", () => this.applyTheme());
|
|
5338
|
+
p(this, "previousKeys", /* @__PURE__ */ new Set());
|
|
5339
|
+
p(this, "variablesOverride", {});
|
|
5338
5340
|
}
|
|
5339
5341
|
static get observedAttributes() {
|
|
5340
5342
|
return ["theme", "scope", "provider", "scheme", "variables"];
|
|
@@ -5422,8 +5424,8 @@ function fa(t = "pie-theme") {
|
|
|
5422
5424
|
typeof customElements > "u" || customElements.get(t) || customElements.define(t, ua);
|
|
5423
5425
|
}
|
|
5424
5426
|
fa();
|
|
5425
|
-
const da = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 },
|
|
5426
|
-
function
|
|
5427
|
+
const da = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 }, hn = "https://proxy.pie-api.com", ha = `${hn}/bundles/`;
|
|
5428
|
+
function pn(t) {
|
|
5427
5429
|
try {
|
|
5428
5430
|
const e = da?.[t];
|
|
5429
5431
|
if (typeof e == "string" && e.length > 0)
|
|
@@ -5431,8 +5433,8 @@ function hn(t) {
|
|
|
5431
5433
|
} catch {
|
|
5432
5434
|
}
|
|
5433
5435
|
}
|
|
5434
|
-
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL ||
|
|
5435
|
-
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL ||
|
|
5436
|
+
typeof window < "u" && window.PIE_BUILDER_ORIGIN_URL || pn("PUBLIC_BUILDER_ORIGIN_URL");
|
|
5437
|
+
typeof window < "u" && window.PIE_BUILDER_BUNDLE_URL || pn("PUBLIC_BUILDER_BUNDLE_URL");
|
|
5436
5438
|
var ai;
|
|
5437
5439
|
(function(t) {
|
|
5438
5440
|
t.player = "player.js", t.clientPlayer = "client-player.js", t.editor = "editor.js";
|
|
@@ -5466,7 +5468,7 @@ var lo;
|
|
|
5466
5468
|
t[t.ROOT = 0] = "ROOT", t[t.SUBJECT = 1] = "SUBJECT", t[t.LEVEL = 2] = "LEVEL", t[t.STANDARD = 3] = "STANDARD";
|
|
5467
5469
|
})(lo || (lo = {}));
|
|
5468
5470
|
ai.player;
|
|
5469
|
-
function
|
|
5471
|
+
function pa(t) {
|
|
5470
5472
|
const e = typeof document < "u" ? document.activeElement : null;
|
|
5471
5473
|
return queueMicrotask(() => {
|
|
5472
5474
|
try {
|
|
@@ -5495,7 +5497,7 @@ function ga(t, e) {
|
|
|
5495
5497
|
} catch {
|
|
5496
5498
|
}
|
|
5497
5499
|
}
|
|
5498
|
-
var ma = /* @__PURE__ */
|
|
5500
|
+
var ma = /* @__PURE__ */ xs('<svg xmlns="http://www.w3.org/2000/svg" class="pie-tool-color-scheme__check svelte-17qy4wk" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"></polyline></svg>'), ba = /* @__PURE__ */ Ii('<button type="button" role="menuitem"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__info svelte-17qy4wk"><div class="pie-tool-color-scheme__name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__description svelte-17qy4wk"> </div></div> <!></button>'), ya = /* @__PURE__ */ Ii('<div class="pie-tool-color-scheme__dropdown svelte-17qy4wk" role="menu"></div>'), _a = /* @__PURE__ */ Ii('<div class="pie-tool-color-scheme svelte-17qy4wk" role="dialog" tabindex="-1" aria-label="Theme selector"><div class="pie-tool-color-scheme__content svelte-17qy4wk"><p class="pie-tool-color-scheme__description svelte-17qy4wk">Select a theme to improve readability and reduce eye strain.</p> <button type="button" class="pie-tool-color-scheme__dropdown-trigger svelte-17qy4wk" aria-label="Select theme"><div class="pie-tool-color-scheme__current svelte-17qy4wk"><div class="pie-tool-color-scheme__preview svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-bg svelte-17qy4wk"><div class="pie-tool-color-scheme__preview-text svelte-17qy4wk">A</div> <div class="pie-tool-color-scheme__preview-primary svelte-17qy4wk"></div></div></div> <div class="pie-tool-color-scheme__current-info svelte-17qy4wk"><div class="pie-tool-color-scheme__current-name svelte-17qy4wk"> </div> <div class="pie-tool-color-scheme__current-description svelte-17qy4wk"> </div></div> <svg class="pie-tool-color-scheme__dropdown-arrow svelte-17qy4wk" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M7,10L12,15L17,10H7Z"></path></svg></div></button> <!></div></div>');
|
|
5499
5501
|
const wa = {
|
|
5500
5502
|
hash: "svelte-17qy4wk",
|
|
5501
5503
|
code: `.pie-tool-color-scheme.svelte-17qy4wk {position:relative;width:100%;height:100%;min-height:0;background-color:var(--pie-background, white);display:flex;flex-direction:column;}.pie-tool-color-scheme__content.svelte-17qy4wk {padding:1rem;position:relative;display:flex;flex-direction:column;gap:1rem;min-height:0;overflow:auto;}.pie-tool-color-scheme__description.svelte-17qy4wk {margin:0 0 1rem 0;color:var(--pie-text, black);opacity:0.7;font-size:0.875rem;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk {width:100%;padding:0.75rem;border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;background-color:var(--pie-background, white);color:var(--pie-text, black);cursor:pointer;transition:all 0.15s ease;}.pie-tool-color-scheme__dropdown-trigger.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, #f0f0f0);}.pie-tool-color-scheme__current.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;}.pie-tool-color-scheme__current-info.svelte-17qy4wk {flex:1;text-align:left;}.pie-tool-color-scheme__current-name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);}.pie-tool-color-scheme__current-description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__dropdown-arrow.svelte-17qy4wk {width:1.5rem;height:1.5rem;flex-shrink:0;}.pie-tool-color-scheme__dropdown.svelte-17qy4wk {position:relative;width:100%;max-height:24rem;background-color:var(--pie-background, white);border:2px solid var(--pie-border, #ccc);border-radius:0.5rem;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;overflow-x:hidden;margin-top:0.5rem;}.pie-tool-color-scheme__option.svelte-17qy4wk {display:flex;align-items:center;gap:0.75rem;width:100%;padding:0.75rem 1rem;border:none;background-color:transparent;color:var(--pie-text, black);cursor:pointer;text-align:left;transition:background-color 0.15s ease;}.pie-tool-color-scheme__option.svelte-17qy4wk:hover {background-color:var(--pie-secondary-background, rgba(0, 0, 0, 0.05));}.pie-tool-color-scheme__option--active.svelte-17qy4wk {background-color:var(--pie-primary-light, rgba(63, 81, 181, 0.1));}.pie-tool-color-scheme__preview.svelte-17qy4wk {flex-shrink:0;width:2.5rem;height:2.5rem;border:2px solid var(--pie-border, #ccc);border-radius:0.25rem;overflow:hidden;}.pie-tool-color-scheme__preview-bg.svelte-17qy4wk {width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center;}.pie-tool-color-scheme__preview-text.svelte-17qy4wk {font-weight:700;font-size:1.25rem;}.pie-tool-color-scheme__preview-primary.svelte-17qy4wk {position:absolute;bottom:0;right:0;width:0.75rem;height:0.75rem;border-radius:50%;}.pie-tool-color-scheme__info.svelte-17qy4wk {flex:1;}.pie-tool-color-scheme__name.svelte-17qy4wk {font-size:0.875rem;font-weight:600;color:var(--pie-text, black);line-height:1.25;}.pie-tool-color-scheme__description.svelte-17qy4wk {font-size:0.75rem;color:var(--pie-text, black);opacity:0.6;}.pie-tool-color-scheme__check.svelte-17qy4wk {flex-shrink:0;width:1rem;height:1rem;color:var(--pie-primary, #3f51b5);}
|
|
@@ -5511,77 +5513,34 @@ function ka(t, e) {
|
|
|
5511
5513
|
let f = /* @__PURE__ */ re(!1);
|
|
5512
5514
|
kt(() => {
|
|
5513
5515
|
if (m(l))
|
|
5514
|
-
return
|
|
5516
|
+
return pl(m(l), (b) => {
|
|
5515
5517
|
V(a, b, !0);
|
|
5516
5518
|
});
|
|
5517
5519
|
});
|
|
5518
|
-
const d =
|
|
5519
|
-
|
|
5520
|
-
id: "default",
|
|
5521
|
-
name: "Default",
|
|
5522
|
-
description: "Standard PIE colors",
|
|
5523
|
-
preview: { bg: "#ffffff", text: "#000000", primary: "#3f51b5" }
|
|
5524
|
-
},
|
|
5525
|
-
{
|
|
5526
|
-
id: "black-on-white",
|
|
5527
|
-
name: "Black on White",
|
|
5528
|
-
description: "High contrast for readability",
|
|
5529
|
-
preview: { bg: "#ffffff", text: "#000000", primary: "#0000cc" }
|
|
5530
|
-
},
|
|
5531
|
-
{
|
|
5532
|
-
id: "white-on-black",
|
|
5533
|
-
name: "White on Black",
|
|
5534
|
-
description: "Inverse high contrast",
|
|
5535
|
-
preview: { bg: "#000000", text: "#ffffff", primary: "#ffff00" }
|
|
5536
|
-
},
|
|
5537
|
-
{
|
|
5538
|
-
id: "rose-on-green",
|
|
5539
|
-
name: "Rose on Green",
|
|
5540
|
-
description: "Color blind friendly (protanopia/deuteranopia)",
|
|
5541
|
-
preview: { bg: "#ccffcc", text: "#3d0022", primary: "#660044" }
|
|
5542
|
-
},
|
|
5543
|
-
{
|
|
5544
|
-
id: "yellow-on-blue",
|
|
5545
|
-
name: "Yellow on Blue",
|
|
5546
|
-
description: "Strong contrast scheme",
|
|
5547
|
-
preview: { bg: "#000066", text: "#ffff00", primary: "#ffff66" }
|
|
5548
|
-
},
|
|
5549
|
-
{
|
|
5550
|
-
id: "black-on-rose",
|
|
5551
|
-
name: "Black on Rose",
|
|
5552
|
-
description: "Warm tinted background",
|
|
5553
|
-
preview: { bg: "#ffccdd", text: "#000000", primary: "#880044" }
|
|
5554
|
-
},
|
|
5555
|
-
{
|
|
5556
|
-
id: "light-gray-on-dark-gray",
|
|
5557
|
-
name: "Light Gray on Dark Gray",
|
|
5558
|
-
description: "Reduced brightness for light sensitivity",
|
|
5559
|
-
preview: { bg: "#333333", text: "#e0e0e0", primary: "#aaaaaa" }
|
|
5560
|
-
}
|
|
5561
|
-
];
|
|
5562
|
-
function v(b, _) {
|
|
5520
|
+
const d = { bg: "#ffffff", text: "#000000", primary: "#3f51b5" };
|
|
5521
|
+
function v(b, y) {
|
|
5563
5522
|
return {
|
|
5564
|
-
bg: b?.["--pie-background"] || b?.["--pie-secondary-background"] ||
|
|
5565
|
-
text: b?.["--pie-text"] ||
|
|
5566
|
-
primary: b?.["--pie-primary"] ||
|
|
5523
|
+
bg: b?.["--pie-background"] || b?.["--pie-secondary-background"] || y.bg,
|
|
5524
|
+
text: b?.["--pie-text"] || y.text,
|
|
5525
|
+
primary: b?.["--pie-primary"] || y.primary
|
|
5567
5526
|
};
|
|
5568
5527
|
}
|
|
5569
5528
|
function g(b) {
|
|
5570
5529
|
if (!b || typeof b != "object") return null;
|
|
5571
|
-
const
|
|
5572
|
-
if (!
|
|
5573
|
-
const
|
|
5530
|
+
const y = b, O = typeof y.id == "string" ? y.id.trim() : "";
|
|
5531
|
+
if (!O) return null;
|
|
5532
|
+
const D = typeof y.name == "string" && y.name.trim() ? y.name.trim() : O, _t = typeof y.description == "string" ? y.description : "", se = y.preview, jt = se && typeof se == "object" && typeof se.bg == "string" && typeof se.text == "string" && typeof se.primary == "string" ? {
|
|
5574
5533
|
bg: se.bg,
|
|
5575
5534
|
text: se.text,
|
|
5576
5535
|
primary: se.primary
|
|
5577
|
-
} : v(typeof
|
|
5578
|
-
return { id:
|
|
5536
|
+
} : v(typeof y.variables == "object" && y.variables ? y.variables : void 0, d);
|
|
5537
|
+
return { id: O, name: D, description: _t, preview: jt };
|
|
5579
5538
|
}
|
|
5580
|
-
function
|
|
5539
|
+
function h(b) {
|
|
5581
5540
|
if (!b?.trim()) return [];
|
|
5582
5541
|
try {
|
|
5583
|
-
const
|
|
5584
|
-
return Array.isArray(
|
|
5542
|
+
const y = JSON.parse(b);
|
|
5543
|
+
return Array.isArray(y) ? y.map((O) => g(O)).filter((O) => !!O) : [];
|
|
5585
5544
|
} catch {
|
|
5586
5545
|
return [];
|
|
5587
5546
|
}
|
|
@@ -5589,68 +5548,71 @@ function ka(t, e) {
|
|
|
5589
5548
|
function w() {
|
|
5590
5549
|
const b = m(l)?.closest("pie-theme");
|
|
5591
5550
|
if (b) return b;
|
|
5592
|
-
const
|
|
5593
|
-
return
|
|
5594
|
-
}
|
|
5595
|
-
function
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
preview: { bg: "#ffffff", text: "#000000", primary: "#3f51b5" }
|
|
5603
|
-
};
|
|
5604
|
-
return {
|
|
5605
|
-
id: T.id,
|
|
5606
|
-
name: T.name || L.name,
|
|
5607
|
-
description: T.description || L.description || "",
|
|
5608
|
-
preview: T.preview || v(T.variables, L.preview)
|
|
5609
|
-
};
|
|
5610
|
-
});
|
|
5551
|
+
const y = document.querySelector('pie-theme[scope="document"]');
|
|
5552
|
+
return y || document.querySelector("pie-theme");
|
|
5553
|
+
}
|
|
5554
|
+
function T() {
|
|
5555
|
+
return ra().map((y) => ({
|
|
5556
|
+
id: y.id,
|
|
5557
|
+
name: y.name || y.id,
|
|
5558
|
+
description: y.description || "",
|
|
5559
|
+
preview: y.preview || v(y.variables, d)
|
|
5560
|
+
}));
|
|
5611
5561
|
}
|
|
5612
|
-
const
|
|
5562
|
+
const I = /* @__PURE__ */ Vr(() => {
|
|
5613
5563
|
if (Array.isArray(s()) && s().length > 0) {
|
|
5614
|
-
const
|
|
5615
|
-
if (
|
|
5564
|
+
const O = s().map((D) => g(D)).filter((D) => !!D);
|
|
5565
|
+
if (O.length > 0) return O;
|
|
5616
5566
|
}
|
|
5617
|
-
const b =
|
|
5567
|
+
const b = h(n());
|
|
5618
5568
|
if (b.length > 0) return b;
|
|
5619
|
-
const
|
|
5620
|
-
return
|
|
5569
|
+
const y = T();
|
|
5570
|
+
return y.length > 0 ? y : [
|
|
5571
|
+
{
|
|
5572
|
+
id: "default",
|
|
5573
|
+
name: "Default",
|
|
5574
|
+
description: "",
|
|
5575
|
+
preview: d
|
|
5576
|
+
}
|
|
5577
|
+
];
|
|
5621
5578
|
});
|
|
5622
|
-
let
|
|
5579
|
+
let _ = /* @__PURE__ */ re("default"), N = /* @__PURE__ */ re(!1), pe = null;
|
|
5623
5580
|
function oe(b) {
|
|
5624
5581
|
if (!r) return;
|
|
5625
|
-
const
|
|
5626
|
-
if (
|
|
5627
|
-
|
|
5582
|
+
const y = w();
|
|
5583
|
+
if (y)
|
|
5584
|
+
y.setAttribute("scheme", b || "default");
|
|
5628
5585
|
else {
|
|
5629
|
-
const
|
|
5630
|
-
b === "default" ?
|
|
5586
|
+
const O = document.documentElement;
|
|
5587
|
+
b === "default" ? O.removeAttribute("data-color-scheme") : O.setAttribute("data-color-scheme", b);
|
|
5631
5588
|
}
|
|
5632
5589
|
ga("pie-color-scheme", b);
|
|
5633
5590
|
}
|
|
5634
5591
|
function we(b) {
|
|
5635
|
-
V(
|
|
5592
|
+
V(_, b, !0), oe(b), m(c)?.hideTool(o());
|
|
5636
5593
|
}
|
|
5637
5594
|
function bt() {
|
|
5638
5595
|
V(N, !m(N));
|
|
5639
5596
|
}
|
|
5640
|
-
let
|
|
5597
|
+
let x = /* @__PURE__ */ Vr(() => m(I).find((b) => b.id === m(_)) || m(I)[0] || {
|
|
5598
|
+
id: "default",
|
|
5599
|
+
name: "Default",
|
|
5600
|
+
description: "",
|
|
5601
|
+
preview: d
|
|
5602
|
+
});
|
|
5641
5603
|
kt(() => {
|
|
5642
|
-
m(
|
|
5604
|
+
m(I).find((b) => b.id === m(_)) || V(_, m(I)[0]?.id || "default", !0);
|
|
5643
5605
|
});
|
|
5644
5606
|
function Bt(b) {
|
|
5645
5607
|
if (b.key === "Escape")
|
|
5646
5608
|
m(N) && V(N, !1);
|
|
5647
5609
|
else if (m(N) && (b.key === "ArrowDown" || b.key === "ArrowUp")) {
|
|
5648
5610
|
b.preventDefault();
|
|
5649
|
-
const
|
|
5650
|
-
if (!
|
|
5651
|
-
const
|
|
5652
|
-
let
|
|
5653
|
-
b.key === "ArrowDown" ?
|
|
5611
|
+
const y = m(l)?.querySelectorAll(".pie-tool-color-scheme__option:not([disabled])");
|
|
5612
|
+
if (!y || y.length === 0) return;
|
|
5613
|
+
const O = Array.from(y).findIndex((_t) => _t === document.activeElement);
|
|
5614
|
+
let D;
|
|
5615
|
+
b.key === "ArrowDown" ? D = O === -1 ? 0 : (O + 1) % y.length : D = O === -1 ? y.length - 1 : (O - 1 + y.length) % y.length, y[D]?.focus();
|
|
5654
5616
|
}
|
|
5655
5617
|
}
|
|
5656
5618
|
kt(() => {
|
|
@@ -5658,18 +5620,18 @@ function ka(t, e) {
|
|
|
5658
5620
|
}), kt(() => {
|
|
5659
5621
|
m(c) && m(l) && o() && m(c).updateToolElement(o(), m(l));
|
|
5660
5622
|
}), kt(() => {
|
|
5661
|
-
!i() &&
|
|
5623
|
+
!i() && pe ? (pe(), pe = null) : i() && m(l) && !pe && (pe = pa(m(l)));
|
|
5662
5624
|
}), js(() => {
|
|
5663
5625
|
if (r) {
|
|
5664
|
-
const
|
|
5665
|
-
V(
|
|
5666
|
-
oe(
|
|
5626
|
+
const O = w()?.getAttribute("scheme"), D = va("pie-color-scheme") ?? O ?? "default";
|
|
5627
|
+
V(_, D, !0), D && requestAnimationFrame(() => {
|
|
5628
|
+
oe(D);
|
|
5667
5629
|
});
|
|
5668
5630
|
}
|
|
5669
|
-
function b(
|
|
5631
|
+
function b(y) {
|
|
5670
5632
|
if (!m(N)) return;
|
|
5671
|
-
const
|
|
5672
|
-
(!m(l) || !
|
|
5633
|
+
const O = y.composedPath();
|
|
5634
|
+
(!m(l) || !O.includes(m(l))) && V(N, !1);
|
|
5673
5635
|
}
|
|
5674
5636
|
return document.addEventListener("click", b), () => {
|
|
5675
5637
|
document.removeEventListener("click", b), m(c) && o() && m(c).unregisterTool(o());
|
|
@@ -5703,39 +5665,39 @@ function ka(t, e) {
|
|
|
5703
5665
|
}, ne = Ds(), Er = ws(ne);
|
|
5704
5666
|
{
|
|
5705
5667
|
var $r = (b) => {
|
|
5706
|
-
var
|
|
5668
|
+
var y = _a(), O = z(y), D = Pe(z(O), 2), _t = z(D), se = z(_t), jt = z(se), $i = z(jt), vn = Pe($i, 2);
|
|
5707
5669
|
j(jt), j(se);
|
|
5708
5670
|
var Ri = Pe(se, 2), Rr = z(Ri), gn = z(Rr, !0);
|
|
5709
5671
|
j(Rr);
|
|
5710
5672
|
var Oi = Pe(Rr, 2), mn = z(Oi, !0);
|
|
5711
|
-
j(Oi), j(Ri), vo(2), j(_t), j(
|
|
5712
|
-
var bn = Pe(
|
|
5673
|
+
j(Oi), j(Ri), vo(2), j(_t), j(D);
|
|
5674
|
+
var bn = Pe(D, 2);
|
|
5713
5675
|
{
|
|
5714
5676
|
var yn = (zt) => {
|
|
5715
5677
|
var Or = ya();
|
|
5716
|
-
Us(Or, 21, () => m(
|
|
5678
|
+
Us(Or, 21, () => m(I), (Lr) => Lr.id, (Lr, ke) => {
|
|
5717
5679
|
var tt = ba();
|
|
5718
5680
|
let Li;
|
|
5719
5681
|
var Cr = z(tt), Pr = z(Cr), Ci = z(Pr), _n = Pe(Ci, 2);
|
|
5720
5682
|
j(Pr), j(Cr);
|
|
5721
|
-
var Mr = Pe(Cr, 2),
|
|
5722
|
-
j(
|
|
5723
|
-
var Pi = Pe(
|
|
5683
|
+
var Mr = Pe(Cr, 2), Nr = z(Mr), wn = z(Nr, !0);
|
|
5684
|
+
j(Nr);
|
|
5685
|
+
var Pi = Pe(Nr, 2), kn = z(Pi, !0);
|
|
5724
5686
|
j(Pi), j(Mr);
|
|
5725
5687
|
var Tn = Pe(Mr, 2);
|
|
5726
5688
|
{
|
|
5727
|
-
var In = (
|
|
5689
|
+
var In = (xr) => {
|
|
5728
5690
|
var Sn = ma();
|
|
5729
|
-
Tt(
|
|
5691
|
+
Tt(xr, Sn);
|
|
5730
5692
|
};
|
|
5731
|
-
Fr(Tn, (
|
|
5732
|
-
m(
|
|
5693
|
+
Fr(Tn, (xr) => {
|
|
5694
|
+
m(_) === m(ke).id && xr(In);
|
|
5733
5695
|
});
|
|
5734
5696
|
}
|
|
5735
5697
|
j(tt), Fi(() => {
|
|
5736
5698
|
Li = Js(tt, 1, "pie-tool-color-scheme__option svelte-17qy4wk", null, Li, {
|
|
5737
|
-
"pie-tool-color-scheme__option--active": m(
|
|
5738
|
-
}), Hr(tt, "aria-label", m(ke).name), Hr(tt, "aria-current", m(
|
|
5699
|
+
"pie-tool-color-scheme__option--active": m(_) === m(ke).id
|
|
5700
|
+
}), Hr(tt, "aria-label", m(ke).name), Hr(tt, "aria-current", m(_) === m(ke).id), wt(Pr, `background-color: ${m(ke).preview.bg ?? ""}`), wt(Ci, `color: ${m(ke).preview.text ?? ""}`), wt(_n, `background-color: ${m(ke).preview.primary ?? ""}`), or(wn, m(ke).name), or(kn, m(ke).description);
|
|
5739
5701
|
}), qr("click", tt, () => we(m(ke).id)), Tt(Lr, tt);
|
|
5740
5702
|
}), j(Or), Tt(zt, Or);
|
|
5741
5703
|
};
|
|
@@ -5743,9 +5705,9 @@ function ka(t, e) {
|
|
|
5743
5705
|
m(N) && zt(yn);
|
|
5744
5706
|
});
|
|
5745
5707
|
}
|
|
5746
|
-
j(
|
|
5747
|
-
Hr(
|
|
5748
|
-
}), qr("keydown",
|
|
5708
|
+
j(O), j(y), il(y, (zt) => V(l, zt), () => m(l)), Fi(() => {
|
|
5709
|
+
Hr(D, "aria-expanded", m(N)), wt(jt, `background-color: ${m(x).preview.bg ?? ""}`), wt($i, `color: ${m(x).preview.text ?? ""}`), wt(vn, `background-color: ${m(x).preview.primary ?? ""}`), or(gn, m(x).name), or(mn, m(x).description);
|
|
5710
|
+
}), qr("keydown", y, Bt), qr("click", D, bt), Tt(b, y);
|
|
5749
5711
|
};
|
|
5750
5712
|
Fr(Er, (b) => {
|
|
5751
5713
|
i() && b($r);
|