@everymatrix/tournaments-banner 0.2.8 → 0.2.10
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/components/{StatusBadge-CS0BGAb9.js → StatusBadge-B9M5QIjb.js} +1843 -1850
- package/components/{StatusBadge-D1cxIANy.js → StatusBadge-B_hJ6MrD.js} +523 -528
- package/components/StatusBadge-C2mucMD-.cjs +11 -0
- package/components/StatusBadge-DfCCEQie.cjs +11 -0
- package/components/{TournamentImage-BFmFLA7f.cjs → TournamentImage-B46vpvie.cjs} +1 -1
- package/components/{TournamentImage-BEit90hg.cjs → TournamentImage-BP7-q8U1.cjs} +1 -1
- package/components/{TournamentImage-DEk8kSZ_.js → TournamentImage-CCCgbzYe.js} +1 -1
- package/components/{TournamentImage-DhXCEHmk.js → TournamentImage-kvlG54fs.js} +1 -1
- package/components/{TournamentsBanner-DG4Ek8wp.js → TournamentsBanner-BlMaHy7Q.js} +2 -2
- package/components/{TournamentsBanner-BoYY31Ae.js → TournamentsBanner-CCuGQC-j.js} +2 -2
- package/components/{TournamentsBanner-kjOgQMqE.cjs → TournamentsBanner-CrYG_0wf.cjs} +1 -1
- package/components/{TournamentsBanner-BHVUD322.cjs → TournamentsBanner-De-Cjg_j.cjs} +1 -1
- package/es2015/tournaments-banner.cjs +1 -1
- package/es2015/tournaments-banner.js +2 -2
- package/esnext/tournaments-banner.cjs +1 -1
- package/esnext/tournaments-banner.js +2 -2
- package/package.json +1 -1
- package/components/StatusBadge-C63t4mQr.cjs +0 -11
- package/components/StatusBadge-uX34r33J.cjs +0 -11
|
@@ -6,7 +6,7 @@ typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
|
6
6
|
} });
|
|
7
7
|
const gs = "5";
|
|
8
8
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(gs);
|
|
9
|
-
const bs = 1,
|
|
9
|
+
const bs = 1, ys = 2, Es = 16, xs = 1, ws = 2, kn = "[", Xr = "[!", pn = "[?", zr = "]", He = {}, M = Symbol("uninitialized"), Ts = "http://www.w3.org/1999/xhtml", jn = !1;
|
|
10
10
|
var Vn = Array.isArray, Ss = Array.prototype.indexOf, bt = Array.prototype.includes, Jt = Array.from, Gt = Object.keys, Ye = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, As = Object.getOwnPropertyDescriptors, Hs = Object.prototype, Ns = Array.prototype, qn = Object.getPrototypeOf, vn = Object.isExtensible;
|
|
11
11
|
const _e = () => {
|
|
12
12
|
};
|
|
@@ -20,7 +20,7 @@ function zn() {
|
|
|
20
20
|
});
|
|
21
21
|
return { promise: r, resolve: e, reject: t };
|
|
22
22
|
}
|
|
23
|
-
const $ = 2, Ze = 4, Tt = 8, Wn = 1 << 24, ee = 16, ie = 32, ge = 64, Ar = 128, Wr = 256, ne = 512, L = 1024,
|
|
23
|
+
const $ = 2, Ze = 4, Tt = 8, Wn = 1 << 24, ee = 16, ie = 32, ge = 64, Ar = 128, Wr = 256, ne = 512, L = 1024, H = 2048, W = 4096, G = 8192, R = 16384, Ue = 32768, yt = 1 << 25, $e = 65536, kt = 1 << 17, Os = 1 << 18, Fe = 1 << 19, Yn = 1 << 20, ve = 1 << 25, jt = 1 << 21, Xe = 1 << 22, Ae = 1 << 23, Mt = Symbol("$state"), Zn = Symbol("component"), Bs = Symbol("legacy props"), Ps = Symbol(""), Qn = Symbol("attributes"), Hr = Symbol("class"), Is = Symbol("style"), Nr = Symbol("text"), St = new class extends Error {
|
|
24
24
|
name = "StaleReactionError";
|
|
25
25
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
26
26
|
}(), Cs = (
|
|
@@ -36,36 +36,36 @@ function er(e) {
|
|
|
36
36
|
function Ls() {
|
|
37
37
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
38
38
|
}
|
|
39
|
-
let
|
|
39
|
+
let w = !1;
|
|
40
40
|
function me(e) {
|
|
41
|
-
|
|
41
|
+
w = e;
|
|
42
42
|
}
|
|
43
|
-
let
|
|
43
|
+
let T;
|
|
44
44
|
function q(e) {
|
|
45
45
|
if (e === null)
|
|
46
46
|
throw er(), He;
|
|
47
|
-
return
|
|
47
|
+
return T = e;
|
|
48
48
|
}
|
|
49
49
|
function tr() {
|
|
50
|
-
return q(/* @__PURE__ */ ce(
|
|
50
|
+
return q(/* @__PURE__ */ ce(T));
|
|
51
51
|
}
|
|
52
52
|
function Lt(e) {
|
|
53
|
-
if (
|
|
54
|
-
if (/* @__PURE__ */ ce(
|
|
53
|
+
if (w) {
|
|
54
|
+
if (/* @__PURE__ */ ce(T) !== null)
|
|
55
55
|
throw er(), He;
|
|
56
|
-
|
|
56
|
+
T = e;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
function Rs(e = 1) {
|
|
60
|
-
if (
|
|
61
|
-
for (var t = e, r =
|
|
60
|
+
if (w) {
|
|
61
|
+
for (var t = e, r = T; t--; )
|
|
62
62
|
r = /** @type {TemplateNode} */
|
|
63
63
|
/* @__PURE__ */ ce(r);
|
|
64
|
-
|
|
64
|
+
T = r;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function Vt(e = !0) {
|
|
68
|
-
for (var t = 0, r =
|
|
68
|
+
for (var t = 0, r = T; ; ) {
|
|
69
69
|
if (r.nodeType === At) {
|
|
70
70
|
var n = (
|
|
71
71
|
/** @type {Comment} */
|
|
@@ -148,7 +148,7 @@ function ti(e, t = !1, r) {
|
|
|
148
148
|
x: null,
|
|
149
149
|
r: (
|
|
150
150
|
/** @type {Effect} */
|
|
151
|
-
|
|
151
|
+
g
|
|
152
152
|
),
|
|
153
153
|
l: null
|
|
154
154
|
};
|
|
@@ -161,7 +161,7 @@ function ri(e) {
|
|
|
161
161
|
if (r !== null) {
|
|
162
162
|
t.e = null;
|
|
163
163
|
for (var n of r)
|
|
164
|
-
|
|
164
|
+
yi(n);
|
|
165
165
|
}
|
|
166
166
|
return e !== void 0 && (t.x = e), t.i = !0, k = t.p, Zr(e);
|
|
167
167
|
}
|
|
@@ -190,17 +190,17 @@ function Ys() {
|
|
|
190
190
|
ii();
|
|
191
191
|
}
|
|
192
192
|
const Zs = -7169;
|
|
193
|
-
function
|
|
193
|
+
function I(e, t) {
|
|
194
194
|
e.f = e.f & Zs | t;
|
|
195
195
|
}
|
|
196
196
|
function Qr(e) {
|
|
197
|
-
e.f & ne || e.deps === null ?
|
|
197
|
+
e.f & ne || e.deps === null ? I(e, L) : I(e, W);
|
|
198
198
|
}
|
|
199
|
-
function si(e, t
|
|
200
|
-
e.f &
|
|
199
|
+
function si(e, t) {
|
|
200
|
+
e.f & H ? t.set(e, H) : e.f & W && t.get(e) !== H && t.set(e, W), I(e, L);
|
|
201
201
|
}
|
|
202
202
|
function Ht(e) {
|
|
203
|
-
var t =
|
|
203
|
+
var t = _, r = g;
|
|
204
204
|
K(null), he(null);
|
|
205
205
|
try {
|
|
206
206
|
return e();
|
|
@@ -217,7 +217,7 @@ function Qs(e, t, r, n) {
|
|
|
217
217
|
}
|
|
218
218
|
var a = (
|
|
219
219
|
/** @type {Effect} */
|
|
220
|
-
|
|
220
|
+
g
|
|
221
221
|
), l = Js(), u = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((p) => p.promise)) : null;
|
|
222
222
|
function f(p) {
|
|
223
223
|
if (!(a.f & R)) {
|
|
@@ -249,8 +249,8 @@ function Qs(e, t, r, n) {
|
|
|
249
249
|
function Js() {
|
|
250
250
|
var e = (
|
|
251
251
|
/** @type {Effect} */
|
|
252
|
-
|
|
253
|
-
), t =
|
|
252
|
+
g
|
|
253
|
+
), t = _, r = k, n = (
|
|
254
254
|
/** @type {Batch} */
|
|
255
255
|
x
|
|
256
256
|
);
|
|
@@ -264,7 +264,7 @@ function qt(e = !0) {
|
|
|
264
264
|
function ai() {
|
|
265
265
|
var e = (
|
|
266
266
|
/** @type {Effect} */
|
|
267
|
-
|
|
267
|
+
g
|
|
268
268
|
), t = e.b, r = (
|
|
269
269
|
/** @type {Batch} */
|
|
270
270
|
x
|
|
@@ -275,8 +275,8 @@ function ai() {
|
|
|
275
275
|
}
|
|
276
276
|
// @__NO_SIDE_EFFECTS__
|
|
277
277
|
function rr(e) {
|
|
278
|
-
var t = $ |
|
|
279
|
-
return
|
|
278
|
+
var t = $ | H;
|
|
279
|
+
return g !== null && (g.f |= Fe), {
|
|
280
280
|
ctx: k,
|
|
281
281
|
deps: null,
|
|
282
282
|
effects: null,
|
|
@@ -290,7 +290,7 @@ function rr(e) {
|
|
|
290
290
|
M
|
|
291
291
|
),
|
|
292
292
|
wv: 0,
|
|
293
|
-
parent:
|
|
293
|
+
parent: g,
|
|
294
294
|
ac: null
|
|
295
295
|
};
|
|
296
296
|
}
|
|
@@ -299,7 +299,7 @@ const ht = Symbol("obsolete");
|
|
|
299
299
|
function Ks(e, t, r) {
|
|
300
300
|
let n = (
|
|
301
301
|
/** @type {Effect | null} */
|
|
302
|
-
|
|
302
|
+
g
|
|
303
303
|
);
|
|
304
304
|
n === null && $s();
|
|
305
305
|
var i = (
|
|
@@ -309,11 +309,11 @@ function Ks(e, t, r) {
|
|
|
309
309
|
), s = De(
|
|
310
310
|
/** @type {V} */
|
|
311
311
|
M
|
|
312
|
-
), o = !
|
|
312
|
+
), o = !_, a = /* @__PURE__ */ new Set();
|
|
313
313
|
return ha(() => {
|
|
314
314
|
var l = (
|
|
315
315
|
/** @type {Effect} */
|
|
316
|
-
|
|
316
|
+
g
|
|
317
317
|
), u = zn();
|
|
318
318
|
i = u.promise;
|
|
319
319
|
try {
|
|
@@ -379,8 +379,8 @@ function ta(e) {
|
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
function Jr(e) {
|
|
382
|
-
var t, r =
|
|
383
|
-
if (!
|
|
382
|
+
var t, r = g, n = e.parent;
|
|
383
|
+
if (!ye && n !== null && e.v !== M && // if it was never evaluated before, it's guaranteed to fail downstream, so we try to execute instead
|
|
384
384
|
n.f & (R | G))
|
|
385
385
|
return Ms(), e.v;
|
|
386
386
|
he(n);
|
|
@@ -394,17 +394,17 @@ function Jr(e) {
|
|
|
394
394
|
function oi(e) {
|
|
395
395
|
var t = Jr(e);
|
|
396
396
|
if (!e.equals(t) && (e.wv = Ni(), (!x?.is_fork || e.deps === null) && (x !== null ? (x.capture(e, t, !0), ze?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
|
|
397
|
-
|
|
397
|
+
I(e, L);
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
|
-
|
|
400
|
+
ye || (te !== null ? (nr() || x?.is_fork) && te.set(e, t) : Qr(e));
|
|
401
401
|
}
|
|
402
402
|
function ra(e) {
|
|
403
403
|
if (e.effects !== null)
|
|
404
404
|
for (const t of e.effects)
|
|
405
405
|
(t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && Ht(() => {
|
|
406
406
|
t.ac.abort(St), t.ac = null;
|
|
407
|
-
}), t.fn !== null && (t.teardown = _e),
|
|
407
|
+
}), t.fn !== null && (t.teardown = _e), Et(t, 0), on(t));
|
|
408
408
|
}
|
|
409
409
|
function ui(e) {
|
|
410
410
|
if (e.effects !== null)
|
|
@@ -417,24 +417,24 @@ let na = 1;
|
|
|
417
417
|
class be {
|
|
418
418
|
id = na++;
|
|
419
419
|
/** True as soon as `#process` was called */
|
|
420
|
-
|
|
420
|
+
started = !1;
|
|
421
421
|
linked = !0;
|
|
422
422
|
/** @type {Batch | null} */
|
|
423
|
-
|
|
423
|
+
prev = null;
|
|
424
424
|
/** @type {Batch | null} */
|
|
425
|
-
|
|
425
|
+
next = null;
|
|
426
426
|
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
427
427
|
async_deriveds = /* @__PURE__ */ new Map();
|
|
428
428
|
/**
|
|
429
429
|
* The current values of any signals that are updated in this batch.
|
|
430
430
|
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
431
|
-
*
|
|
431
|
+
* The keys of this map are identical to `this.previous`
|
|
432
432
|
* @type {Map<Value, [any, boolean]>}
|
|
433
433
|
*/
|
|
434
434
|
current = /* @__PURE__ */ new Map();
|
|
435
435
|
/**
|
|
436
436
|
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
437
|
-
*
|
|
437
|
+
* The keys of this map are identical to `this.current`
|
|
438
438
|
* @type {Map<Value, any>}
|
|
439
439
|
*/
|
|
440
440
|
previous = /* @__PURE__ */ new Map();
|
|
@@ -443,27 +443,27 @@ class be {
|
|
|
443
443
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
444
444
|
* @type {Set<(batch: Batch) => void>}
|
|
445
445
|
*/
|
|
446
|
-
#
|
|
446
|
+
#e = /* @__PURE__ */ new Set();
|
|
447
447
|
/**
|
|
448
448
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
449
449
|
* @type {Set<(batch: Batch) => void>}
|
|
450
450
|
*/
|
|
451
|
-
#
|
|
451
|
+
#t = /* @__PURE__ */ new Set();
|
|
452
452
|
/**
|
|
453
453
|
* The number of async effects that are currently in flight
|
|
454
454
|
*/
|
|
455
|
-
#
|
|
455
|
+
#r = 0;
|
|
456
456
|
/**
|
|
457
457
|
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
458
458
|
* @type {Map<Effect, number>}
|
|
459
459
|
*/
|
|
460
|
-
#
|
|
460
|
+
#o = /* @__PURE__ */ new Map();
|
|
461
461
|
/**
|
|
462
462
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
463
463
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
464
464
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
465
465
|
*/
|
|
466
|
-
#
|
|
466
|
+
#n = null;
|
|
467
467
|
/**
|
|
468
468
|
* Effects that were scheduled in this batch but not yet 'resolved' into the
|
|
469
469
|
* root effects that need to be flushed. Resolving — the upwards traversal that
|
|
@@ -475,22 +475,17 @@ class be {
|
|
|
475
475
|
* May contain duplicates — deduplication happens during resolving
|
|
476
476
|
* @type {Effect[]}
|
|
477
477
|
*/
|
|
478
|
-
#
|
|
478
|
+
#i = [];
|
|
479
479
|
/**
|
|
480
480
|
* Effects created while this batch was active.
|
|
481
481
|
* @type {Effect[]}
|
|
482
482
|
*/
|
|
483
|
-
#
|
|
483
|
+
#a = [];
|
|
484
484
|
/**
|
|
485
|
-
* Deferred effects (which run after async work has completed)
|
|
486
|
-
* @type {
|
|
487
|
-
*/
|
|
488
|
-
#l = /* @__PURE__ */ new Set();
|
|
489
|
-
/**
|
|
490
|
-
* Deferred effects that are MAYBE_DIRTY
|
|
491
|
-
* @type {Set<Effect>}
|
|
485
|
+
* Deferred effects (which run after async work has completed) and their status (DIRTY or MAYBE_DIRTY)
|
|
486
|
+
* @type {Map<Effect, number>}
|
|
492
487
|
*/
|
|
493
|
-
#
|
|
488
|
+
#s = /* @__PURE__ */ new Map();
|
|
494
489
|
/**
|
|
495
490
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
496
491
|
* is committed — we skip over these during `process`.
|
|
@@ -498,30 +493,34 @@ class be {
|
|
|
498
493
|
* so they can be rescheduled if the branch survives.
|
|
499
494
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
500
495
|
*/
|
|
501
|
-
#
|
|
496
|
+
#u = /* @__PURE__ */ new Map();
|
|
502
497
|
/**
|
|
503
498
|
* Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
|
|
504
499
|
* @type {Set<Effect>}
|
|
505
500
|
*/
|
|
506
|
-
#
|
|
501
|
+
#d = /* @__PURE__ */ new Set();
|
|
507
502
|
is_fork = !1;
|
|
508
|
-
#
|
|
503
|
+
#l = !1;
|
|
509
504
|
constructor() {
|
|
510
|
-
ke === null ? dr = ke = this : (ke
|
|
505
|
+
ke === null ? dr = ke = this : (ke.next = this, this.prev = ke), ke = this;
|
|
511
506
|
}
|
|
512
|
-
#
|
|
507
|
+
#v() {
|
|
513
508
|
if (this.is_fork) return !0;
|
|
514
|
-
for (const
|
|
515
|
-
|
|
516
|
-
if (this.#c.has(t)) {
|
|
517
|
-
r = !0;
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
t = t.parent;
|
|
521
|
-
}
|
|
522
|
-
if (!r)
|
|
509
|
+
for (const t of this.#o.keys())
|
|
510
|
+
if (!this.#_(t))
|
|
523
511
|
return !0;
|
|
524
|
-
|
|
512
|
+
return !1;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Whether `effect` is inside a branch that this batch skips
|
|
516
|
+
* @param {Effect} effect
|
|
517
|
+
*/
|
|
518
|
+
#_(t) {
|
|
519
|
+
for (var r = (
|
|
520
|
+
/** @type {Effect | null} */
|
|
521
|
+
t
|
|
522
|
+
); r !== null; r = r.parent)
|
|
523
|
+
if (this.#u.has(r)) return !0;
|
|
525
524
|
return !1;
|
|
526
525
|
}
|
|
527
526
|
/**
|
|
@@ -529,7 +528,7 @@ class be {
|
|
|
529
528
|
* @param {Effect} effect
|
|
530
529
|
*/
|
|
531
530
|
skip_effect(t) {
|
|
532
|
-
this.#
|
|
531
|
+
this.#u.has(t) || this.#u.set(t, { d: [], m: [] }), this.#d.delete(t);
|
|
533
532
|
}
|
|
534
533
|
/**
|
|
535
534
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -538,15 +537,15 @@ class be {
|
|
|
538
537
|
* @param {(e: Effect) => void} callback
|
|
539
538
|
*/
|
|
540
539
|
unskip_effect(t, r = (n) => this.schedule(n)) {
|
|
541
|
-
var n = this.#
|
|
540
|
+
var n = this.#u.get(t);
|
|
542
541
|
if (n) {
|
|
543
|
-
this.#
|
|
542
|
+
this.#u.delete(t);
|
|
544
543
|
for (var i of n.d)
|
|
545
|
-
|
|
544
|
+
I(i, H), r(i);
|
|
546
545
|
for (i of n.m)
|
|
547
|
-
|
|
546
|
+
I(i, W), r(i);
|
|
548
547
|
}
|
|
549
|
-
this.#
|
|
548
|
+
this.#d.add(t);
|
|
550
549
|
}
|
|
551
550
|
/**
|
|
552
551
|
* Convert the effects that were scheduled in this batch into the root effects
|
|
@@ -557,10 +556,10 @@ class be {
|
|
|
557
556
|
* a single traversal — scheduling into other batches can never observe them
|
|
558
557
|
* @returns {Effect[]}
|
|
559
558
|
*/
|
|
560
|
-
#
|
|
559
|
+
#f() {
|
|
561
560
|
var t = [];
|
|
562
|
-
for (const s of this.#
|
|
563
|
-
if (!(s.f & R || !(s.f & (
|
|
561
|
+
for (const s of this.#i)
|
|
562
|
+
if (!(s.f & R || !(s.f & (H | W)))) {
|
|
564
563
|
for (var r = s, n = !1; r.parent !== null; ) {
|
|
565
564
|
r = r.parent;
|
|
566
565
|
var i = r.f;
|
|
@@ -574,22 +573,20 @@ class be {
|
|
|
574
573
|
}
|
|
575
574
|
n || t.push(r);
|
|
576
575
|
}
|
|
577
|
-
return this.#
|
|
576
|
+
return this.#i = [], t;
|
|
578
577
|
}
|
|
579
|
-
#
|
|
580
|
-
this
|
|
581
|
-
for (const a of this.#
|
|
582
|
-
|
|
583
|
-
for (const a of this.#f)
|
|
584
|
-
B(a, Q), this.schedule(a);
|
|
578
|
+
#m() {
|
|
579
|
+
this.started = !0;
|
|
580
|
+
for (const [a, l] of this.#s)
|
|
581
|
+
I(a, l), this.schedule(a);
|
|
585
582
|
this.apply();
|
|
586
|
-
for (var t = _t = [], r = [], n = Rt = []; this.#
|
|
587
|
-
_n++ > 1e3 && (this.#
|
|
588
|
-
for (const a of this.#
|
|
583
|
+
for (var t = _t = [], r = [], n = Rt = []; this.#i.length > 0; ) {
|
|
584
|
+
_n++ > 1e3 && (this.#c(), ia());
|
|
585
|
+
for (const a of this.#f())
|
|
589
586
|
try {
|
|
590
|
-
this.#
|
|
587
|
+
this.#g(a, t, r);
|
|
591
588
|
} catch (l) {
|
|
592
|
-
throw hi(a), this.#
|
|
589
|
+
throw hi(a), this.#v() || this.discard(), l;
|
|
593
590
|
}
|
|
594
591
|
}
|
|
595
592
|
if (x = null, n.length > 0) {
|
|
@@ -597,35 +594,28 @@ class be {
|
|
|
597
594
|
for (const a of n)
|
|
598
595
|
i.schedule(a);
|
|
599
596
|
}
|
|
600
|
-
if (_t = null, Rt = null, this.#
|
|
597
|
+
if (_t = null, Rt = null, this.#v()) {
|
|
601
598
|
this.#p(r), this.#p(t);
|
|
602
|
-
for (const [a, l] of this.#
|
|
599
|
+
for (const [a, l] of this.#u)
|
|
603
600
|
fi(a, l);
|
|
604
601
|
n.length > 0 && /** @type {unknown} */
|
|
605
|
-
x.#
|
|
602
|
+
x.#m();
|
|
606
603
|
return;
|
|
607
604
|
}
|
|
608
|
-
const s = this.#
|
|
605
|
+
const s = this.#y();
|
|
609
606
|
if (s) {
|
|
610
|
-
this.#p(r), this.#p(t), s.#
|
|
607
|
+
this.#p(r), this.#p(t), s.#h(this);
|
|
611
608
|
return;
|
|
612
609
|
}
|
|
613
|
-
this.#
|
|
614
|
-
for (const a of this.#
|
|
615
|
-
this.#
|
|
610
|
+
this.#s.clear();
|
|
611
|
+
for (const a of this.#e) a(this);
|
|
612
|
+
this.#e.clear(), ze = this, gn(r), gn(t), ze = null, this.#n?.resolve();
|
|
616
613
|
var o = (
|
|
617
614
|
/** @type {Batch | null} */
|
|
618
615
|
/** @type {unknown} */
|
|
619
616
|
x
|
|
620
617
|
);
|
|
621
|
-
|
|
622
|
-
if (o !== null) {
|
|
623
|
-
for (const a of this.#s)
|
|
624
|
-
o.#s.push(a);
|
|
625
|
-
this.#s = [];
|
|
626
|
-
} else
|
|
627
|
-
o = this;
|
|
628
|
-
o !== null && (le.clear(), o.#g());
|
|
618
|
+
this.#r === 0 && (this.#i.length === 0 || o !== null) && this.#c(), o !== null && (le.clear(), o.#m());
|
|
629
619
|
}
|
|
630
620
|
/**
|
|
631
621
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -634,12 +624,12 @@ class be {
|
|
|
634
624
|
* @param {Effect[]} effects
|
|
635
625
|
* @param {Effect[]} render_effects
|
|
636
626
|
*/
|
|
637
|
-
#
|
|
627
|
+
#g(t, r, n) {
|
|
638
628
|
t.f ^= L;
|
|
639
629
|
for (var i = t.first; i !== null; ) {
|
|
640
|
-
var s = i.f, o = (s & (ie | ge)) !== 0, a = o && (s & L) !== 0, l = a || (s & G) !== 0 || this.#
|
|
630
|
+
var s = i.f, o = (s & (ie | ge)) !== 0, a = o && (s & L) !== 0, l = a || (s & G) !== 0 || this.#u.has(i);
|
|
641
631
|
if (!l && i.fn !== null) {
|
|
642
|
-
o ? i.f ^= L : s & Ze ? r.push(i) : Nt(i) && (s & ee && this
|
|
632
|
+
o ? i.f ^= L : s & Ze ? r.push(i) : Nt(i) && (s & ee && this.add_dirty_reaction(i, W), Ke(i));
|
|
643
633
|
var u = i.first;
|
|
644
634
|
if (u !== null) {
|
|
645
635
|
i = u;
|
|
@@ -656,31 +646,32 @@ class be {
|
|
|
656
646
|
}
|
|
657
647
|
}
|
|
658
648
|
}
|
|
659
|
-
#
|
|
660
|
-
for (var t = this
|
|
661
|
-
if (!t.is_fork)
|
|
662
|
-
for (const [r, [, n]] of this.current)
|
|
663
|
-
if (t.current.has(r) && !n)
|
|
664
|
-
return t;
|
|
665
|
-
}
|
|
666
|
-
t = t.#t;
|
|
667
|
-
}
|
|
649
|
+
#y() {
|
|
650
|
+
for (var t = this.prev; t !== null; t = t.prev)
|
|
651
|
+
if (!t.is_fork && this.#b(t)) return t;
|
|
668
652
|
return null;
|
|
669
653
|
}
|
|
654
|
+
/** @param {Batch} batch */
|
|
655
|
+
#b(t) {
|
|
656
|
+
for (const [r, [, n]] of this.current)
|
|
657
|
+
if (!n && t.current.has(r))
|
|
658
|
+
return !0;
|
|
659
|
+
return !1;
|
|
660
|
+
}
|
|
670
661
|
/**
|
|
671
662
|
* @param {Batch} batch
|
|
672
663
|
*/
|
|
673
|
-
#
|
|
664
|
+
#h(t) {
|
|
674
665
|
for (const [n, i] of t.current)
|
|
675
666
|
!this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, i);
|
|
676
667
|
for (const [n, i] of t.async_deriveds) {
|
|
677
668
|
const s = this.async_deriveds.get(n);
|
|
678
669
|
s && i.promise.then(s.resolve).catch(s.reject);
|
|
679
670
|
}
|
|
680
|
-
t.async_deriveds.clear(), this.
|
|
671
|
+
t.async_deriveds.clear(), this.transfer_reactions(t.#s);
|
|
681
672
|
const r = (n) => {
|
|
682
673
|
var i = n.reactions;
|
|
683
|
-
if (i !== null && !(n.f & $ && !(n.f & (
|
|
674
|
+
if (i !== null && !(n.f & $ && !(n.f & (H | W))))
|
|
684
675
|
for (const a of i) {
|
|
685
676
|
var s = a.f;
|
|
686
677
|
if (s & $)
|
|
@@ -693,20 +684,20 @@ class be {
|
|
|
693
684
|
/** @type {Effect} */
|
|
694
685
|
a
|
|
695
686
|
);
|
|
696
|
-
s & (Xe | ee) && !this.async_deriveds.has(o) && (this.#
|
|
687
|
+
s & (Xe | ee) && !this.async_deriveds.has(o) && (this.#s.delete(o), I(o, H), this.schedule(o));
|
|
697
688
|
}
|
|
698
689
|
}
|
|
699
690
|
};
|
|
700
691
|
for (const n of this.current.keys())
|
|
701
692
|
r(n);
|
|
702
|
-
this.oncommit(() => t.discard()), t.#
|
|
693
|
+
this.oncommit(() => t.discard()), t.#c(), x = this, this.#m();
|
|
703
694
|
}
|
|
704
695
|
/**
|
|
705
696
|
* @param {Effect[]} effects
|
|
706
697
|
*/
|
|
707
698
|
#p(t) {
|
|
708
699
|
for (var r = 0; r < t.length; r += 1)
|
|
709
|
-
si(t[r], this.#
|
|
700
|
+
si(t[r], this.#s);
|
|
710
701
|
}
|
|
711
702
|
/**
|
|
712
703
|
* Associate a change to a given source with the current
|
|
@@ -726,26 +717,26 @@ class be {
|
|
|
726
717
|
}
|
|
727
718
|
flush() {
|
|
728
719
|
try {
|
|
729
|
-
pr = !0, x = this, this.#
|
|
720
|
+
pr = !0, x = this, this.#m();
|
|
730
721
|
} finally {
|
|
731
722
|
_n = 0, Or = null, _t = null, Rt = null, pr = !1, x = null, te = null, le.clear();
|
|
732
723
|
}
|
|
733
724
|
}
|
|
734
725
|
discard() {
|
|
735
|
-
for (const t of this.#
|
|
736
|
-
this.#
|
|
726
|
+
for (const t of this.#t) t(this);
|
|
727
|
+
this.#t.clear();
|
|
737
728
|
for (const t of this.async_deriveds.values())
|
|
738
729
|
t.reject(ht);
|
|
739
|
-
this.#
|
|
730
|
+
this.#c(), this.#n?.resolve();
|
|
740
731
|
}
|
|
741
732
|
/**
|
|
742
733
|
* @param {Effect} effect
|
|
743
734
|
*/
|
|
744
735
|
register_created_effect(t) {
|
|
745
|
-
this.#
|
|
736
|
+
this.#a.push(t);
|
|
746
737
|
}
|
|
747
738
|
#E() {
|
|
748
|
-
for (let h = dr; h !== null; h = h
|
|
739
|
+
for (let h = dr; h !== null; h = h.next) {
|
|
749
740
|
var t = h.id < this.id, r = [];
|
|
750
741
|
for (const [c, [p, d]] of this.current) {
|
|
751
742
|
if (h.current.has(c)) {
|
|
@@ -769,13 +760,13 @@ class be {
|
|
|
769
760
|
(c) => !/** @type {[any, boolean]} */
|
|
770
761
|
h.current.get(c)[1]
|
|
771
762
|
);
|
|
772
|
-
if (!(!h
|
|
763
|
+
if (!(!h.started || i.length === 0)) {
|
|
773
764
|
var s = i.filter((c) => !this.current.has(c));
|
|
774
765
|
if (s.length === 0)
|
|
775
766
|
t && h.discard();
|
|
776
767
|
else if (r.length > 0) {
|
|
777
768
|
if (t)
|
|
778
|
-
for (const c of this.#
|
|
769
|
+
for (const c of this.#d)
|
|
779
770
|
h.unskip_effect(c, (p) => {
|
|
780
771
|
p.f & (ee | Xe) ? h.schedule(p) : h.#p([p]);
|
|
781
772
|
});
|
|
@@ -789,12 +780,12 @@ class be {
|
|
|
789
780
|
return d ? d[0] !== p[0] || d[1] !== p[1] : !0;
|
|
790
781
|
}).map(([c]) => c);
|
|
791
782
|
if (u.length > 0)
|
|
792
|
-
for (const c of this.#
|
|
793
|
-
!(c.f & (R | G | kt)) && Kr(c, u, a) && (c.f & (Xe | ee) ? (
|
|
794
|
-
if (h.#
|
|
783
|
+
for (const c of this.#a)
|
|
784
|
+
!(c.f & (R | G | kt)) && Kr(c, u, a) && (c.f & (Xe | ee) ? (I(c, H), h.schedule(c)) : h.add_dirty_reaction(c, H));
|
|
785
|
+
if (h.#i.length > 0 && !h.#l) {
|
|
795
786
|
h.apply();
|
|
796
|
-
for (var f of h.#
|
|
797
|
-
h.#
|
|
787
|
+
for (var f of h.#f())
|
|
788
|
+
h.#g(f, [], []);
|
|
798
789
|
}
|
|
799
790
|
h.deactivate();
|
|
800
791
|
}
|
|
@@ -806,9 +797,9 @@ class be {
|
|
|
806
797
|
* @param {Effect} effect
|
|
807
798
|
*/
|
|
808
799
|
increment(t, r) {
|
|
809
|
-
if (this.#
|
|
810
|
-
let n = this.#
|
|
811
|
-
this.#
|
|
800
|
+
if (this.#r += 1, t) {
|
|
801
|
+
let n = this.#o.get(r) ?? 0;
|
|
802
|
+
this.#o.set(r, n + 1);
|
|
812
803
|
}
|
|
813
804
|
}
|
|
814
805
|
/**
|
|
@@ -816,41 +807,45 @@ class be {
|
|
|
816
807
|
* @param {Effect} effect
|
|
817
808
|
*/
|
|
818
809
|
decrement(t, r) {
|
|
819
|
-
if (this.#
|
|
820
|
-
let n = this.#
|
|
821
|
-
n === 1 ? this.#
|
|
810
|
+
if (this.#r -= 1, t) {
|
|
811
|
+
let n = this.#o.get(r) ?? 0;
|
|
812
|
+
n === 1 ? this.#o.delete(r) : this.#o.set(r, n - 1);
|
|
822
813
|
}
|
|
823
|
-
this.#
|
|
824
|
-
this.#
|
|
814
|
+
this.#l || (this.#l = !0, Te(() => {
|
|
815
|
+
this.#l = !1, this.linked && this.flush();
|
|
825
816
|
}));
|
|
826
817
|
}
|
|
827
818
|
/**
|
|
828
|
-
* @param {
|
|
829
|
-
* @param {Set<Effect>} maybe_dirty_effects
|
|
819
|
+
* @param {Map<Effect, number>} dirty_reactions
|
|
830
820
|
*/
|
|
831
|
-
|
|
832
|
-
for (const n of t)
|
|
833
|
-
this
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
821
|
+
transfer_reactions(t) {
|
|
822
|
+
for (const [r, n] of t)
|
|
823
|
+
this.add_dirty_reaction(r, n);
|
|
824
|
+
t.clear();
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* @param {Effect} effect
|
|
828
|
+
* @param {number} status
|
|
829
|
+
*/
|
|
830
|
+
add_dirty_reaction(t, r) {
|
|
831
|
+
(r === H || this.#s.get(t) !== H) && this.#s.set(t, r);
|
|
837
832
|
}
|
|
838
833
|
/** @param {(batch: Batch) => void} fn */
|
|
839
834
|
oncommit(t) {
|
|
840
|
-
this.#
|
|
835
|
+
this.#e.add(t);
|
|
841
836
|
}
|
|
842
837
|
/** @param {(batch: Batch) => void} fn */
|
|
843
838
|
ondiscard(t) {
|
|
844
|
-
this.#
|
|
839
|
+
this.#t.add(t);
|
|
845
840
|
}
|
|
846
841
|
settled() {
|
|
847
|
-
return (this.#
|
|
842
|
+
return (this.#n ??= zn()).promise;
|
|
848
843
|
}
|
|
849
844
|
static ensure() {
|
|
850
845
|
if (x === null) {
|
|
851
846
|
const t = x = new be();
|
|
852
847
|
!pr && !mt && Te(() => {
|
|
853
|
-
t
|
|
848
|
+
t.started || t.flush();
|
|
854
849
|
});
|
|
855
850
|
}
|
|
856
851
|
return x;
|
|
@@ -870,12 +865,12 @@ class be {
|
|
|
870
865
|
t.b.defer_effect(t);
|
|
871
866
|
return;
|
|
872
867
|
}
|
|
873
|
-
this.#
|
|
868
|
+
this.#i.push(t);
|
|
874
869
|
}
|
|
875
|
-
#
|
|
870
|
+
#c() {
|
|
876
871
|
if (this.linked) {
|
|
877
|
-
var t = this
|
|
878
|
-
t === null ? dr = r : t
|
|
872
|
+
var t = this.prev, r = this.next;
|
|
873
|
+
t === null ? dr = r : t.next = r, r === null ? ke = t : r.prev = t, this.linked = !1;
|
|
879
874
|
}
|
|
880
875
|
}
|
|
881
876
|
}
|
|
@@ -937,7 +932,7 @@ function li(e, t, r, n) {
|
|
|
937
932
|
t,
|
|
938
933
|
r,
|
|
939
934
|
n
|
|
940
|
-
) : s & (Xe | ee) && !(s &
|
|
935
|
+
) : s & (Xe | ee) && !(s & H) && Kr(i, t, n) && (I(i, H), en(
|
|
941
936
|
/** @type {Effect} */
|
|
942
937
|
i
|
|
943
938
|
));
|
|
@@ -969,13 +964,13 @@ function en(e) {
|
|
|
969
964
|
}
|
|
970
965
|
function fi(e, t) {
|
|
971
966
|
if (!(e.f & ie && e.f & L)) {
|
|
972
|
-
e.f &
|
|
967
|
+
e.f & H ? t.d.push(e) : e.f & W && t.m.push(e), I(e, L);
|
|
973
968
|
for (var r = e.first; r !== null; )
|
|
974
969
|
fi(r, t), r = r.next;
|
|
975
970
|
}
|
|
976
971
|
}
|
|
977
972
|
function hi(e) {
|
|
978
|
-
|
|
973
|
+
I(e, L);
|
|
979
974
|
for (var t = e.first; t !== null; )
|
|
980
975
|
hi(t), t = t.next;
|
|
981
976
|
}
|
|
@@ -985,7 +980,6 @@ let ci = !1;
|
|
|
985
980
|
function De(e, t) {
|
|
986
981
|
var r = {
|
|
987
982
|
f: 0,
|
|
988
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
989
983
|
v: e,
|
|
990
984
|
reactions: null,
|
|
991
985
|
equals: Jn,
|
|
@@ -1005,32 +999,32 @@ function tn(e, t = !1, r = !0) {
|
|
|
1005
999
|
return t || (n.equals = ei), n;
|
|
1006
1000
|
}
|
|
1007
1001
|
function ae(e, t, r = !1) {
|
|
1008
|
-
|
|
1002
|
+
_ !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1009
1003
|
// to ensure we error if state is set inside an inspect effect
|
|
1010
|
-
(!re ||
|
|
1004
|
+
(!re || _.f & kt) && ni() && _.f & ($ | ee | Xe | kt) && (fe === null || !fe.has(e)) && Xs();
|
|
1011
1005
|
let n = r ? ct(t) : t;
|
|
1012
1006
|
return Je(e, n, Rt);
|
|
1013
1007
|
}
|
|
1014
1008
|
var Ie = null, Br = 0;
|
|
1015
1009
|
function Je(e, t, r = null) {
|
|
1016
1010
|
if (!e.equals(t)) {
|
|
1017
|
-
|
|
1011
|
+
ye ? le.set(e, t) : le.has(e) || le.set(e, e.v);
|
|
1018
1012
|
var n = be.ensure();
|
|
1019
1013
|
if (n.capture(e, t), e.f & $) {
|
|
1020
1014
|
const i = (
|
|
1021
1015
|
/** @type {Derived} */
|
|
1022
1016
|
e
|
|
1023
1017
|
);
|
|
1024
|
-
e.f &
|
|
1018
|
+
e.f & H && Jr(i), te === null && Qr(i);
|
|
1025
1019
|
}
|
|
1026
|
-
e.wv = Ni(), Ie = null, Br = 0, di(e,
|
|
1020
|
+
e.wv = Ni(), Ie = null, Br = 0, di(e, H, r), Ie = null, g !== null && g.f & L && !(g.f & (ie | ge)) && (Z === null ? pa([e]) : Z.push(e)), !n.is_fork && Xt.size > 0 && !ci && sa();
|
|
1027
1021
|
}
|
|
1028
1022
|
return t;
|
|
1029
1023
|
}
|
|
1030
1024
|
function sa() {
|
|
1031
1025
|
ci = !1;
|
|
1032
1026
|
for (const e of Xt) {
|
|
1033
|
-
e.f & L &&
|
|
1027
|
+
e.f & L && I(e, W);
|
|
1034
1028
|
let t;
|
|
1035
1029
|
try {
|
|
1036
1030
|
t = Nt(e);
|
|
@@ -1053,8 +1047,8 @@ function di(e, t, r) {
|
|
|
1053
1047
|
Ie.add(e);
|
|
1054
1048
|
}
|
|
1055
1049
|
for (var s = 0; s < i; s++) {
|
|
1056
|
-
var o = n[s], a = o.f, l = (a &
|
|
1057
|
-
if (l &&
|
|
1050
|
+
var o = n[s], a = o.f, l = (a & H) === 0;
|
|
1051
|
+
if (l && I(o, t), a & kt)
|
|
1058
1052
|
Xt.add(
|
|
1059
1053
|
/** @type {Effect} */
|
|
1060
1054
|
o
|
|
@@ -1064,7 +1058,7 @@ function di(e, t, r) {
|
|
|
1064
1058
|
/** @type {Derived} */
|
|
1065
1059
|
o
|
|
1066
1060
|
);
|
|
1067
|
-
te?.delete(u), di(u,
|
|
1061
|
+
te?.delete(u), di(u, W, r);
|
|
1068
1062
|
} else if (l) {
|
|
1069
1063
|
var f = (
|
|
1070
1064
|
/** @type {Effect} */
|
|
@@ -1084,10 +1078,10 @@ function ct(e) {
|
|
|
1084
1078
|
var r = /* @__PURE__ */ new Map(), n = Vn(e), i = /* @__PURE__ */ xe(0), s = Re, o = (a) => {
|
|
1085
1079
|
if (Re === s)
|
|
1086
1080
|
return a();
|
|
1087
|
-
var l =
|
|
1088
|
-
K(null),
|
|
1081
|
+
var l = _, u = Re;
|
|
1082
|
+
K(null), En(s);
|
|
1089
1083
|
var f = a();
|
|
1090
|
-
return K(l),
|
|
1084
|
+
return K(l), En(u), f;
|
|
1091
1085
|
};
|
|
1092
1086
|
return n && r.set("length", /* @__PURE__ */ xe(
|
|
1093
1087
|
/** @type {any[]} */
|
|
@@ -1151,7 +1145,7 @@ function ct(e) {
|
|
|
1151
1145
|
if (l === Mt)
|
|
1152
1146
|
return !0;
|
|
1153
1147
|
var u = r.get(l), f = u !== void 0 && u.v !== M || Reflect.has(a, l);
|
|
1154
|
-
if (u !== void 0 || _ !== null && (!f || qe(a, l)?.writable)) {
|
|
1148
|
+
if (u !== void 0 || (g !== null || _ !== null) && (!f || qe(a, l)?.writable)) {
|
|
1155
1149
|
u === void 0 && (u = o(() => {
|
|
1156
1150
|
var c = f ? ct(a[l]) : M, p = /* @__PURE__ */ xe(c);
|
|
1157
1151
|
return p;
|
|
@@ -1183,8 +1177,8 @@ function ct(e) {
|
|
|
1183
1177
|
var m = (
|
|
1184
1178
|
/** @type {Source<number>} */
|
|
1185
1179
|
r.get("length")
|
|
1186
|
-
),
|
|
1187
|
-
Number.isInteger(
|
|
1180
|
+
), y = Number(l);
|
|
1181
|
+
Number.isInteger(y) && y >= m.v && ae(m, y + 1);
|
|
1188
1182
|
}
|
|
1189
1183
|
gt(i);
|
|
1190
1184
|
}
|
|
@@ -1232,11 +1226,11 @@ function ce(e) {
|
|
|
1232
1226
|
);
|
|
1233
1227
|
}
|
|
1234
1228
|
function $t(e, t) {
|
|
1235
|
-
if (!
|
|
1229
|
+
if (!w)
|
|
1236
1230
|
return /* @__PURE__ */ Ne(e);
|
|
1237
|
-
var r = /* @__PURE__ */ Ne(
|
|
1231
|
+
var r = /* @__PURE__ */ Ne(T);
|
|
1238
1232
|
if (r === null)
|
|
1239
|
-
r =
|
|
1233
|
+
r = T.appendChild(J());
|
|
1240
1234
|
else if (t && r.nodeType !== Kt) {
|
|
1241
1235
|
var n = J();
|
|
1242
1236
|
return r?.before(n), q(n), n;
|
|
@@ -1247,34 +1241,34 @@ function $t(e, t) {
|
|
|
1247
1241
|
), q(r), r;
|
|
1248
1242
|
}
|
|
1249
1243
|
function aa(e, t = !1) {
|
|
1250
|
-
if (!
|
|
1244
|
+
if (!w) {
|
|
1251
1245
|
var r = /* @__PURE__ */ Ne(e);
|
|
1252
1246
|
return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ce(r) : r;
|
|
1253
1247
|
}
|
|
1254
1248
|
if (t) {
|
|
1255
|
-
if (
|
|
1249
|
+
if (T?.nodeType !== Kt) {
|
|
1256
1250
|
var n = J();
|
|
1257
|
-
return
|
|
1251
|
+
return T?.before(n), q(n), n;
|
|
1258
1252
|
}
|
|
1259
1253
|
nn(
|
|
1260
1254
|
/** @type {Text} */
|
|
1261
|
-
|
|
1255
|
+
T
|
|
1262
1256
|
);
|
|
1263
1257
|
}
|
|
1264
|
-
return
|
|
1258
|
+
return T;
|
|
1265
1259
|
}
|
|
1266
1260
|
function Bt(e, t = !1) {
|
|
1267
|
-
if (!
|
|
1261
|
+
if (!w)
|
|
1268
1262
|
return /* @__PURE__ */ Ne(e);
|
|
1269
1263
|
var r = $t(e, t);
|
|
1270
1264
|
return Lt(e), r;
|
|
1271
1265
|
}
|
|
1272
1266
|
function ut(e, t = 1, r = !1) {
|
|
1273
|
-
let n =
|
|
1267
|
+
let n = w ? T : e;
|
|
1274
1268
|
for (var i; t--; )
|
|
1275
1269
|
i = n, n = /** @type {TemplateNode} */
|
|
1276
1270
|
/* @__PURE__ */ ce(n);
|
|
1277
|
-
if (!
|
|
1271
|
+
if (!w)
|
|
1278
1272
|
return n;
|
|
1279
1273
|
if (r) {
|
|
1280
1274
|
if (n?.nodeType !== Kt) {
|
|
@@ -1312,9 +1306,9 @@ function nn(e) {
|
|
|
1312
1306
|
t.nodeValue, t = e.nextSibling;
|
|
1313
1307
|
}
|
|
1314
1308
|
function oa(e) {
|
|
1315
|
-
var t =
|
|
1309
|
+
var t = g;
|
|
1316
1310
|
if (t === null)
|
|
1317
|
-
return
|
|
1311
|
+
return _.f |= Ae, e;
|
|
1318
1312
|
if (!(t.f & Ue) && !(t.f & Ze))
|
|
1319
1313
|
throw e;
|
|
1320
1314
|
oe(e, t);
|
|
@@ -1324,7 +1318,7 @@ function oe(e, t) {
|
|
|
1324
1318
|
throw e;
|
|
1325
1319
|
if (!(t !== null && t.f & R)) {
|
|
1326
1320
|
for (; t !== null; ) {
|
|
1327
|
-
if (t.f & Ar && !(t.f & (R |
|
|
1321
|
+
if (t.f & Ar && !(t.f & (R | yt))) {
|
|
1328
1322
|
if (!(t.f & Ue))
|
|
1329
1323
|
throw e;
|
|
1330
1324
|
try {
|
|
@@ -1340,20 +1334,20 @@ function oe(e, t) {
|
|
|
1340
1334
|
}
|
|
1341
1335
|
}
|
|
1342
1336
|
function bi(e) {
|
|
1343
|
-
|
|
1337
|
+
g === null && (_ === null && Gs(), Fs()), ye && Us();
|
|
1344
1338
|
}
|
|
1345
1339
|
function ua(e, t) {
|
|
1346
1340
|
var r = t.last;
|
|
1347
1341
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1348
1342
|
}
|
|
1349
1343
|
function se(e, t) {
|
|
1350
|
-
var r =
|
|
1344
|
+
var r = g;
|
|
1351
1345
|
r !== null && r.f & G && (e |= G);
|
|
1352
1346
|
var n = {
|
|
1353
1347
|
ctx: k,
|
|
1354
1348
|
deps: null,
|
|
1355
1349
|
nodes: null,
|
|
1356
|
-
f: e |
|
|
1350
|
+
f: e | H | ne,
|
|
1357
1351
|
first: null,
|
|
1358
1352
|
fn: t,
|
|
1359
1353
|
last: null,
|
|
@@ -1378,28 +1372,28 @@ function se(e, t) {
|
|
|
1378
1372
|
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1379
1373
|
!(i.f & Fe) && (i = i.first, e & ee && e & $e && i !== null && (i.f |= $e));
|
|
1380
1374
|
}
|
|
1381
|
-
if (i !== null && (i.parent = r, r !== null && ua(i, r),
|
|
1375
|
+
if (i !== null && (i.parent = r, r !== null && ua(i, r), _ !== null && _.f & $ && !(e & ge))) {
|
|
1382
1376
|
var s = (
|
|
1383
1377
|
/** @type {Derived} */
|
|
1384
|
-
|
|
1378
|
+
_
|
|
1385
1379
|
);
|
|
1386
1380
|
(s.effects ??= []).push(i);
|
|
1387
1381
|
}
|
|
1388
1382
|
return n;
|
|
1389
1383
|
}
|
|
1390
1384
|
function nr() {
|
|
1391
|
-
return
|
|
1385
|
+
return _ !== null && !re;
|
|
1392
1386
|
}
|
|
1393
1387
|
function sn(e) {
|
|
1394
1388
|
const t = se(Tt, null);
|
|
1395
|
-
return
|
|
1389
|
+
return I(t, L), t.teardown = e, t;
|
|
1396
1390
|
}
|
|
1397
1391
|
function Yu(e) {
|
|
1398
1392
|
bi();
|
|
1399
1393
|
var t = (
|
|
1400
1394
|
/** @type {Effect} */
|
|
1401
|
-
|
|
1402
|
-
), r = !
|
|
1395
|
+
g.f
|
|
1396
|
+
), r = !_ && (t & ie) !== 0 && k !== null && !k.i;
|
|
1403
1397
|
if (r) {
|
|
1404
1398
|
var n = (
|
|
1405
1399
|
/** @type {ComponentContext} */
|
|
@@ -1407,9 +1401,9 @@ function Yu(e) {
|
|
|
1407
1401
|
);
|
|
1408
1402
|
(n.e ??= []).push(e);
|
|
1409
1403
|
} else
|
|
1410
|
-
return
|
|
1404
|
+
return yi(e);
|
|
1411
1405
|
}
|
|
1412
|
-
function
|
|
1406
|
+
function yi(e) {
|
|
1413
1407
|
return se(Ze | Yn, e);
|
|
1414
1408
|
}
|
|
1415
1409
|
function Zu(e) {
|
|
@@ -1431,7 +1425,7 @@ function fa(e) {
|
|
|
1431
1425
|
}) : (j(t), n(void 0));
|
|
1432
1426
|
});
|
|
1433
1427
|
}
|
|
1434
|
-
function
|
|
1428
|
+
function Ei(e) {
|
|
1435
1429
|
return se(Ze, e);
|
|
1436
1430
|
}
|
|
1437
1431
|
function ha(e) {
|
|
@@ -1451,20 +1445,20 @@ function ir(e, t = 0) {
|
|
|
1451
1445
|
var r = se(ee | t, e);
|
|
1452
1446
|
return r;
|
|
1453
1447
|
}
|
|
1454
|
-
function
|
|
1448
|
+
function Q(e) {
|
|
1455
1449
|
return se(ie | Fe, e);
|
|
1456
1450
|
}
|
|
1457
1451
|
function xi(e) {
|
|
1458
1452
|
var t = e.teardown;
|
|
1459
1453
|
if (t !== null) {
|
|
1460
|
-
const r =
|
|
1461
|
-
|
|
1454
|
+
const r = ye, n = _;
|
|
1455
|
+
yn(!0), K(null);
|
|
1462
1456
|
try {
|
|
1463
1457
|
t.call(null);
|
|
1464
1458
|
} catch (i) {
|
|
1465
1459
|
oe(i, e.parent);
|
|
1466
1460
|
} finally {
|
|
1467
|
-
|
|
1461
|
+
yn(r), K(n);
|
|
1468
1462
|
}
|
|
1469
1463
|
}
|
|
1470
1464
|
}
|
|
@@ -1491,12 +1485,12 @@ function j(e, t = !0) {
|
|
|
1491
1485
|
e.nodes.start,
|
|
1492
1486
|
/** @type {TemplateNode} */
|
|
1493
1487
|
e.nodes.end
|
|
1494
|
-
), r = !0), e.f |=
|
|
1488
|
+
), r = !0), e.f |= yt, on(e, t && !r), Et(e, 0);
|
|
1495
1489
|
var n = e.nodes && e.nodes.t;
|
|
1496
1490
|
if (n !== null)
|
|
1497
1491
|
for (const s of n)
|
|
1498
1492
|
s.stop();
|
|
1499
|
-
xi(e), e.f ^=
|
|
1493
|
+
xi(e), e.f ^= yt, e.f |= R;
|
|
1500
1494
|
var i = e.parent;
|
|
1501
1495
|
i !== null && i.first !== null && wi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1502
1496
|
}
|
|
@@ -1548,7 +1542,7 @@ function zt(e) {
|
|
|
1548
1542
|
}
|
|
1549
1543
|
function Si(e, t) {
|
|
1550
1544
|
if (!(e.f & Wr) && e.f & G) {
|
|
1551
|
-
e.f ^= G, e.f & L || (
|
|
1545
|
+
e.f ^= G, e.f & L || (I(e, H), be.ensure().schedule(e));
|
|
1552
1546
|
for (var r = e.first; r !== null; ) {
|
|
1553
1547
|
var n = r.next, i = (r.f & $e) !== 0 || (r.f & ie) !== 0;
|
|
1554
1548
|
Si(r, i ? t : !1), r = n;
|
|
@@ -1566,28 +1560,28 @@ function un(e, t) {
|
|
|
1566
1560
|
t.append(r), r = i;
|
|
1567
1561
|
}
|
|
1568
1562
|
}
|
|
1569
|
-
let
|
|
1570
|
-
function
|
|
1571
|
-
|
|
1563
|
+
let ye = !1;
|
|
1564
|
+
function yn(e) {
|
|
1565
|
+
ye = e;
|
|
1572
1566
|
}
|
|
1573
|
-
let
|
|
1567
|
+
let _ = null, re = !1;
|
|
1574
1568
|
function K(e) {
|
|
1575
|
-
|
|
1569
|
+
_ = e;
|
|
1576
1570
|
}
|
|
1577
|
-
let
|
|
1571
|
+
let g = null;
|
|
1578
1572
|
function he(e) {
|
|
1579
|
-
|
|
1573
|
+
g = e;
|
|
1580
1574
|
}
|
|
1581
1575
|
let fe = null;
|
|
1582
1576
|
function Ai(e) {
|
|
1583
|
-
|
|
1577
|
+
_ !== null && (_.f & jt || _.f & $) && (fe ??= /* @__PURE__ */ new Set()).add(e);
|
|
1584
1578
|
}
|
|
1585
|
-
let V = null, z = 0,
|
|
1579
|
+
let V = null, z = 0, Z = null;
|
|
1586
1580
|
function pa(e) {
|
|
1587
|
-
|
|
1581
|
+
Z = e;
|
|
1588
1582
|
}
|
|
1589
1583
|
let Hi = 1, Me = 0, Re = Me;
|
|
1590
|
-
function
|
|
1584
|
+
function En(e) {
|
|
1591
1585
|
Re = e;
|
|
1592
1586
|
}
|
|
1593
1587
|
function Ni() {
|
|
@@ -1595,9 +1589,9 @@ function Ni() {
|
|
|
1595
1589
|
}
|
|
1596
1590
|
function Nt(e) {
|
|
1597
1591
|
var t = e.f;
|
|
1598
|
-
if (t &
|
|
1592
|
+
if (t & H)
|
|
1599
1593
|
return !0;
|
|
1600
|
-
if (t &
|
|
1594
|
+
if (t & W) {
|
|
1601
1595
|
for (var r = (
|
|
1602
1596
|
/** @type {Value[]} */
|
|
1603
1597
|
e.deps
|
|
@@ -1614,7 +1608,7 @@ function Nt(e) {
|
|
|
1614
1608
|
}
|
|
1615
1609
|
t & ne && // During time traveling we don't want to reset the status so that
|
|
1616
1610
|
// traversal of the graph in the other batches still happens
|
|
1617
|
-
te === null &&
|
|
1611
|
+
te === null && I(e, L);
|
|
1618
1612
|
}
|
|
1619
1613
|
return !1;
|
|
1620
1614
|
}
|
|
@@ -1628,16 +1622,16 @@ function Oi(e, t, r = !0) {
|
|
|
1628
1622
|
s,
|
|
1629
1623
|
t,
|
|
1630
1624
|
!1
|
|
1631
|
-
) : t === s && (r ?
|
|
1625
|
+
) : t === s && (r ? I(s, H) : s.f & L && I(s, W), en(
|
|
1632
1626
|
/** @type {Effect} */
|
|
1633
1627
|
s
|
|
1634
1628
|
));
|
|
1635
1629
|
}
|
|
1636
1630
|
}
|
|
1637
1631
|
function Bi(e) {
|
|
1638
|
-
var t = V, r = z, n =
|
|
1632
|
+
var t = V, r = z, n = Z, i = _, s = fe, o = k, a = re, l = Re, u = e.f;
|
|
1639
1633
|
V = /** @type {null | Value[]} */
|
|
1640
|
-
null, z = 0,
|
|
1634
|
+
null, z = 0, Z = null, _ = u & (ie | ge) ? null : e, fe = null, Qe(e.ctx), re = !1, Re = ++Me, e.ac !== null && (Ht(() => {
|
|
1641
1635
|
e.ac.abort(St);
|
|
1642
1636
|
}), e.ac = null);
|
|
1643
1637
|
try {
|
|
@@ -1648,11 +1642,11 @@ function Bi(e) {
|
|
|
1648
1642
|
), h = f();
|
|
1649
1643
|
e.f |= Ue;
|
|
1650
1644
|
var c = xn(e);
|
|
1651
|
-
if (ni() &&
|
|
1645
|
+
if (ni() && Z !== null && !re && c !== null && !(e.f & ($ | W | H)))
|
|
1652
1646
|
for (var p = 0; p < /** @type {Source[]} */
|
|
1653
|
-
|
|
1647
|
+
Z.length; p++)
|
|
1654
1648
|
Oi(
|
|
1655
|
-
|
|
1649
|
+
Z[p],
|
|
1656
1650
|
/** @type {Effect} */
|
|
1657
1651
|
e
|
|
1658
1652
|
);
|
|
@@ -1663,21 +1657,21 @@ function Bi(e) {
|
|
|
1663
1657
|
if (t !== null)
|
|
1664
1658
|
for (const d of t)
|
|
1665
1659
|
d.rv = Me;
|
|
1666
|
-
|
|
1667
|
-
|
|
1660
|
+
Z !== null && (n === null ? n = Z : n.push(.../** @type {Source[]} */
|
|
1661
|
+
Z));
|
|
1668
1662
|
}
|
|
1669
1663
|
return e.f & Ae && (e.f ^= Ae), h;
|
|
1670
1664
|
} catch (d) {
|
|
1671
1665
|
return xn(e), oa(d);
|
|
1672
1666
|
} finally {
|
|
1673
|
-
e.f ^= jt, V = t, z = r,
|
|
1667
|
+
e.f ^= jt, V = t, z = r, Z = n, _ = i, fe = s, Qe(o), re = a, Re = l;
|
|
1674
1668
|
}
|
|
1675
1669
|
}
|
|
1676
1670
|
function xn(e) {
|
|
1677
1671
|
var t = e.deps, r = x?.is_fork;
|
|
1678
1672
|
if (V !== null) {
|
|
1679
1673
|
var n;
|
|
1680
|
-
if (r ||
|
|
1674
|
+
if (r || Et(e, z), t !== null && z > 0)
|
|
1681
1675
|
for (t.length = z + V.length, n = 0; n < V.length; n++)
|
|
1682
1676
|
t[z + n] = V[n];
|
|
1683
1677
|
else
|
|
@@ -1685,7 +1679,7 @@ function xn(e) {
|
|
|
1685
1679
|
if (nr() && e.f & ne)
|
|
1686
1680
|
for (n = z; n < t.length; n++)
|
|
1687
1681
|
(t[n].reactions ??= []).push(e);
|
|
1688
|
-
} else !r && t !== null && z < t.length && (
|
|
1682
|
+
} else !r && t !== null && z < t.length && (Et(e, z), t.length = z);
|
|
1689
1683
|
return t;
|
|
1690
1684
|
}
|
|
1691
1685
|
function va(e, t) {
|
|
@@ -1706,11 +1700,11 @@ function va(e, t) {
|
|
|
1706
1700
|
t
|
|
1707
1701
|
);
|
|
1708
1702
|
s.f & ne && (s.f ^= ne), s.v !== M && Qr(s), s.ac !== null && Ht(() => {
|
|
1709
|
-
s.ac.abort(St), s.ac = null,
|
|
1710
|
-
}), ra(s),
|
|
1703
|
+
s.ac.abort(St), s.ac = null, I(s, H);
|
|
1704
|
+
}), ra(s), Et(s, 0);
|
|
1711
1705
|
}
|
|
1712
1706
|
}
|
|
1713
|
-
function
|
|
1707
|
+
function Et(e, t) {
|
|
1714
1708
|
var r = e.deps;
|
|
1715
1709
|
if (r !== null)
|
|
1716
1710
|
for (var n = t; n < r.length; n++)
|
|
@@ -1719,47 +1713,47 @@ function yt(e, t) {
|
|
|
1719
1713
|
function Ke(e) {
|
|
1720
1714
|
var t = e.f;
|
|
1721
1715
|
if (!(t & R)) {
|
|
1722
|
-
|
|
1723
|
-
var r =
|
|
1724
|
-
|
|
1716
|
+
I(e, L);
|
|
1717
|
+
var r = g;
|
|
1718
|
+
g = e;
|
|
1725
1719
|
try {
|
|
1726
1720
|
t & (ee | Wn) ? ca(e) : on(e), xi(e);
|
|
1727
1721
|
var n = Bi(e);
|
|
1728
1722
|
e.teardown = typeof n == "function" ? n : null, e.wv = Hi;
|
|
1729
1723
|
var i;
|
|
1730
|
-
jn && Ws && e.f &
|
|
1724
|
+
jn && Ws && e.f & H && e.deps;
|
|
1731
1725
|
} finally {
|
|
1732
|
-
|
|
1726
|
+
g = r;
|
|
1733
1727
|
}
|
|
1734
1728
|
}
|
|
1735
1729
|
}
|
|
1736
1730
|
function A(e) {
|
|
1737
1731
|
var t = e.f, r = (t & $) !== 0;
|
|
1738
|
-
if (
|
|
1739
|
-
var n =
|
|
1732
|
+
if (_ !== null && !re) {
|
|
1733
|
+
var n = g !== null && (g.f & R) !== 0;
|
|
1740
1734
|
if (!n && (fe === null || !fe.has(e))) {
|
|
1741
|
-
var i =
|
|
1742
|
-
if (
|
|
1735
|
+
var i = _.deps;
|
|
1736
|
+
if (_.f & jt)
|
|
1743
1737
|
e.rv < Me && (e.rv = Me, V === null && i !== null && i[z] === e ? z++ : V === null ? V = [e] : V.push(e));
|
|
1744
1738
|
else {
|
|
1745
|
-
|
|
1739
|
+
_.deps ??= [], bt.call(_.deps, e) || _.deps.push(e);
|
|
1746
1740
|
var s = e.reactions;
|
|
1747
|
-
s === null ? e.reactions = [
|
|
1741
|
+
s === null ? e.reactions = [_] : bt.call(s, _) || s.push(_);
|
|
1748
1742
|
}
|
|
1749
1743
|
}
|
|
1750
1744
|
}
|
|
1751
|
-
if (
|
|
1745
|
+
if (ye && le.has(e))
|
|
1752
1746
|
return le.get(e);
|
|
1753
1747
|
if (r) {
|
|
1754
1748
|
var o = (
|
|
1755
1749
|
/** @type {Derived} */
|
|
1756
1750
|
e
|
|
1757
1751
|
);
|
|
1758
|
-
if (
|
|
1752
|
+
if (ye) {
|
|
1759
1753
|
var a = o.v;
|
|
1760
1754
|
return (!(o.f & L) && o.reactions !== null || Ii(o)) && (a = Jr(o)), le.set(o, a), a;
|
|
1761
1755
|
}
|
|
1762
|
-
var l = (o.f & ne) === 0 && !re &&
|
|
1756
|
+
var l = (o.f & ne) === 0 && !re && _ !== null && (_.f & ne) !== 0, u = (o.f & Ue) === 0;
|
|
1763
1757
|
Nt(o) && (l && (o.f |= ne), oi(o)), l && !u && (ui(o), Pi(o));
|
|
1764
1758
|
}
|
|
1765
1759
|
if (te?.has(e))
|
|
@@ -1802,7 +1796,7 @@ function ln(e) {
|
|
|
1802
1796
|
}
|
|
1803
1797
|
const dt = Symbol("events"), Ci = /* @__PURE__ */ new Set(), Ir = /* @__PURE__ */ new Set();
|
|
1804
1798
|
function Qu(e) {
|
|
1805
|
-
if (!
|
|
1799
|
+
if (!w) return;
|
|
1806
1800
|
e.removeAttribute("onload"), e.removeAttribute("onerror");
|
|
1807
1801
|
const t = e.__e;
|
|
1808
1802
|
t !== void 0 && (e.__e = void 0, queueMicrotask(() => {
|
|
@@ -1869,7 +1863,7 @@ function Cr(e) {
|
|
|
1869
1863
|
return s || r;
|
|
1870
1864
|
}
|
|
1871
1865
|
});
|
|
1872
|
-
var f =
|
|
1866
|
+
var f = _, h = g;
|
|
1873
1867
|
K(null), he(null);
|
|
1874
1868
|
try {
|
|
1875
1869
|
for (var c, p = []; s !== null && s !== t; ) {
|
|
@@ -1920,7 +1914,7 @@ function ba(e) {
|
|
|
1920
1914
|
function We(e, t) {
|
|
1921
1915
|
var r = (
|
|
1922
1916
|
/** @type {Effect} */
|
|
1923
|
-
|
|
1917
|
+
g
|
|
1924
1918
|
);
|
|
1925
1919
|
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1926
1920
|
}
|
|
@@ -1928,8 +1922,8 @@ function We(e, t) {
|
|
|
1928
1922
|
function sr(e, t) {
|
|
1929
1923
|
var r = (t & xs) !== 0, n = (t & ws) !== 0, i, s = !e.startsWith("<!>");
|
|
1930
1924
|
return () => {
|
|
1931
|
-
if (
|
|
1932
|
-
return We(
|
|
1925
|
+
if (w)
|
|
1926
|
+
return We(T, null), T;
|
|
1933
1927
|
i === void 0 && (i = ba(s ? e : "<!>" + e), r || (i = /** @type {TemplateNode} */
|
|
1934
1928
|
/* @__PURE__ */ Ne(i)));
|
|
1935
1929
|
var o = (
|
|
@@ -1951,18 +1945,18 @@ function sr(e, t) {
|
|
|
1951
1945
|
};
|
|
1952
1946
|
}
|
|
1953
1947
|
function tl() {
|
|
1954
|
-
if (
|
|
1955
|
-
return We(
|
|
1948
|
+
if (w)
|
|
1949
|
+
return We(T, null), T;
|
|
1956
1950
|
var e = document.createDocumentFragment(), t = document.createComment(""), r = J();
|
|
1957
1951
|
return e.append(t, r), We(t, r), e;
|
|
1958
1952
|
}
|
|
1959
1953
|
function pt(e, t) {
|
|
1960
|
-
if (
|
|
1954
|
+
if (w) {
|
|
1961
1955
|
var r = (
|
|
1962
1956
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1963
|
-
|
|
1957
|
+
g
|
|
1964
1958
|
);
|
|
1965
|
-
(!(r.f & Ue) || r.nodes.end === null) && (r.nodes.end =
|
|
1959
|
+
(!(r.f & Ue) || r.nodes.end === null) && (r.nodes.end = T), tr();
|
|
1966
1960
|
return;
|
|
1967
1961
|
}
|
|
1968
1962
|
e !== null && e.before(
|
|
@@ -1970,9 +1964,9 @@ function pt(e, t) {
|
|
|
1970
1964
|
t
|
|
1971
1965
|
);
|
|
1972
1966
|
}
|
|
1973
|
-
const
|
|
1974
|
-
function
|
|
1975
|
-
return
|
|
1967
|
+
const ya = ["touchstart", "touchmove"];
|
|
1968
|
+
function Ea(e) {
|
|
1969
|
+
return ya.includes(e);
|
|
1976
1970
|
}
|
|
1977
1971
|
function Mi(e) {
|
|
1978
1972
|
let t = 0, r = De(0), n;
|
|
@@ -2001,28 +1995,26 @@ class Ta {
|
|
|
2001
1995
|
/** @type {TemplateNode} */
|
|
2002
1996
|
#e;
|
|
2003
1997
|
/** @type {TemplateNode | null} */
|
|
2004
|
-
#t =
|
|
1998
|
+
#t = w ? T : null;
|
|
2005
1999
|
/** @type {BoundaryProps} */
|
|
2006
2000
|
#r;
|
|
2007
2001
|
/** @type {((anchor: Node) => void)} */
|
|
2008
|
-
#
|
|
2002
|
+
#o;
|
|
2009
2003
|
/** @type {Effect} */
|
|
2010
|
-
#
|
|
2004
|
+
#n;
|
|
2011
2005
|
/** @type {Effect | null} */
|
|
2012
|
-
#
|
|
2006
|
+
#i = null;
|
|
2013
2007
|
/** @type {Effect | null} */
|
|
2014
|
-
#
|
|
2008
|
+
#a = null;
|
|
2015
2009
|
/** @type {Effect | null} */
|
|
2016
|
-
#o = null;
|
|
2017
|
-
/** @type {DocumentFragment | null} */
|
|
2018
2010
|
#s = null;
|
|
2019
|
-
|
|
2011
|
+
/** @type {DocumentFragment | null} */
|
|
2012
|
+
#u = null;
|
|
2013
|
+
#d = 0;
|
|
2020
2014
|
#l = 0;
|
|
2021
|
-
#
|
|
2022
|
-
/** @type {
|
|
2023
|
-
#
|
|
2024
|
-
/** @type {Set<Effect>} */
|
|
2025
|
-
#_ = /* @__PURE__ */ new Set();
|
|
2015
|
+
#v = !1;
|
|
2016
|
+
/** @type {Map<Effect, number>} */
|
|
2017
|
+
#_ = /* @__PURE__ */ new Map();
|
|
2026
2018
|
/**
|
|
2027
2019
|
* A source containing the number of pending async deriveds/expressions.
|
|
2028
2020
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -2030,9 +2022,9 @@ class Ta {
|
|
|
2030
2022
|
* calls followed by no-op flushes
|
|
2031
2023
|
* @type {Source<number> | null}
|
|
2032
2024
|
*/
|
|
2033
|
-
#
|
|
2034
|
-
#
|
|
2035
|
-
this.#
|
|
2025
|
+
#f = null;
|
|
2026
|
+
#m = Mi(() => (this.#f = De(this.#d), () => {
|
|
2027
|
+
this.#f = null;
|
|
2036
2028
|
}));
|
|
2037
2029
|
/**
|
|
2038
2030
|
* @param {TemplateNode} node
|
|
@@ -2041,15 +2033,15 @@ class Ta {
|
|
|
2041
2033
|
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
2042
2034
|
*/
|
|
2043
2035
|
constructor(t, r, n, i) {
|
|
2044
|
-
this.#e = t, this.#r = r, this.#
|
|
2036
|
+
this.#e = t, this.#r = r, this.#o = (s) => {
|
|
2045
2037
|
var o = (
|
|
2046
2038
|
/** @type {Effect} */
|
|
2047
|
-
|
|
2039
|
+
g
|
|
2048
2040
|
);
|
|
2049
2041
|
o.b = this, o.f |= Ar, n(s);
|
|
2050
2042
|
}, this.parent = /** @type {Effect} */
|
|
2051
|
-
|
|
2052
|
-
if (
|
|
2043
|
+
g.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = ir(() => {
|
|
2044
|
+
if (w) {
|
|
2053
2045
|
const s = Yr(
|
|
2054
2046
|
/** @type {TemplateNode} */
|
|
2055
2047
|
this.#t
|
|
@@ -2058,15 +2050,15 @@ class Ta {
|
|
|
2058
2050
|
const o = s === Xr;
|
|
2059
2051
|
if (s.startsWith(pn)) {
|
|
2060
2052
|
const l = JSON.parse(s.slice(pn.length));
|
|
2061
|
-
this.#
|
|
2062
|
-
} else o ? this.#
|
|
2053
|
+
this.#y(l);
|
|
2054
|
+
} else o ? this.#p() : this.#g();
|
|
2063
2055
|
} else
|
|
2064
|
-
this.#
|
|
2065
|
-
}, xa),
|
|
2056
|
+
this.#E();
|
|
2057
|
+
}, xa), w && (this.#e = T);
|
|
2066
2058
|
}
|
|
2067
|
-
#
|
|
2059
|
+
#g() {
|
|
2068
2060
|
try {
|
|
2069
|
-
this.#
|
|
2061
|
+
this.#i = Q(() => this.#o(this.#e));
|
|
2070
2062
|
} catch (t) {
|
|
2071
2063
|
this.error(t);
|
|
2072
2064
|
}
|
|
@@ -2074,9 +2066,9 @@ class Ta {
|
|
|
2074
2066
|
/**
|
|
2075
2067
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
2076
2068
|
*/
|
|
2077
|
-
#
|
|
2069
|
+
#y(t) {
|
|
2078
2070
|
const r = this.#r.failed, { reset: n, invoke_onerror: i } = this.#b(t);
|
|
2079
|
-
Te(i), r && (this.#
|
|
2071
|
+
Te(i), r && (this.#s = Q(() => {
|
|
2080
2072
|
r(
|
|
2081
2073
|
this.#e,
|
|
2082
2074
|
() => t,
|
|
@@ -2093,80 +2085,80 @@ class Ta {
|
|
|
2093
2085
|
#b(t) {
|
|
2094
2086
|
var r = !1, n = !1;
|
|
2095
2087
|
const i = () => {
|
|
2096
|
-
if (!this.#
|
|
2088
|
+
if (!this.#h()) {
|
|
2097
2089
|
if (r) {
|
|
2098
2090
|
Ls();
|
|
2099
2091
|
return;
|
|
2100
2092
|
}
|
|
2101
|
-
r = !0, n && zs(), this.#
|
|
2102
|
-
this.#
|
|
2103
|
-
}), this.#
|
|
2104
|
-
this.#
|
|
2093
|
+
r = !0, n && zs(), this.#s !== null && Le(this.#s, () => {
|
|
2094
|
+
this.#s = null;
|
|
2095
|
+
}), this.#x(() => {
|
|
2096
|
+
this.#E();
|
|
2105
2097
|
});
|
|
2106
2098
|
}
|
|
2107
2099
|
};
|
|
2108
2100
|
return { reset: i, invoke_onerror: () => {
|
|
2109
|
-
if (!this.#
|
|
2101
|
+
if (!this.#h())
|
|
2110
2102
|
try {
|
|
2111
2103
|
n = !0, this.#r.onerror?.(t, i), n = !1;
|
|
2112
2104
|
} catch (o) {
|
|
2113
|
-
oe(o, this.#
|
|
2105
|
+
oe(o, this.#n && this.#n.parent);
|
|
2114
2106
|
}
|
|
2115
2107
|
} };
|
|
2116
2108
|
}
|
|
2117
|
-
#
|
|
2118
|
-
return (this.#
|
|
2109
|
+
#h() {
|
|
2110
|
+
return (this.#n.f & (R | yt)) !== 0;
|
|
2119
2111
|
}
|
|
2120
|
-
#
|
|
2112
|
+
#p() {
|
|
2121
2113
|
const t = this.#r.pending;
|
|
2122
|
-
t && (this.is_pending = !0, this.#
|
|
2123
|
-
if (!this.#
|
|
2124
|
-
var r = this.#
|
|
2125
|
-
if (r.append(n), this.#
|
|
2114
|
+
t && (this.is_pending = !0, this.#a = Q(() => t(this.#e)), Te(() => {
|
|
2115
|
+
if (!this.#h()) {
|
|
2116
|
+
var r = this.#u = document.createDocumentFragment(), n = J(), i = !1;
|
|
2117
|
+
if (r.append(n), this.#i = this.#x(() => {
|
|
2126
2118
|
try {
|
|
2127
|
-
return
|
|
2119
|
+
return Q(() => this.#o(n));
|
|
2128
2120
|
} catch (s) {
|
|
2129
2121
|
try {
|
|
2130
2122
|
this.error(s), i = !0;
|
|
2131
2123
|
} catch (o) {
|
|
2132
|
-
oe(o, this.#
|
|
2124
|
+
oe(o, this.#n.parent);
|
|
2133
2125
|
}
|
|
2134
2126
|
return null;
|
|
2135
2127
|
}
|
|
2136
|
-
}), this.#
|
|
2137
|
-
this.#
|
|
2128
|
+
}), this.#i === null) {
|
|
2129
|
+
this.#u = null, i && this.#c(
|
|
2138
2130
|
/** @type {Batch} */
|
|
2139
2131
|
x
|
|
2140
2132
|
);
|
|
2141
2133
|
return;
|
|
2142
2134
|
}
|
|
2143
|
-
this.#l === 0 && (this.#e.before(r), this.#
|
|
2135
|
+
this.#l === 0 && (this.#e.before(r), this.#u = null, Le(
|
|
2144
2136
|
/** @type {Effect} */
|
|
2145
|
-
this.#
|
|
2137
|
+
this.#a,
|
|
2146
2138
|
() => {
|
|
2147
|
-
this.#
|
|
2139
|
+
this.#a = null;
|
|
2148
2140
|
}
|
|
2149
|
-
), this.#
|
|
2141
|
+
), this.#c(
|
|
2150
2142
|
/** @type {Batch} */
|
|
2151
2143
|
x
|
|
2152
2144
|
));
|
|
2153
2145
|
}
|
|
2154
2146
|
}));
|
|
2155
2147
|
}
|
|
2156
|
-
#
|
|
2148
|
+
#E() {
|
|
2157
2149
|
try {
|
|
2158
|
-
if (this.is_pending = this.has_pending_snippet(), this.#l = 0, this.#
|
|
2159
|
-
this.#
|
|
2150
|
+
if (this.is_pending = this.has_pending_snippet(), this.#l = 0, this.#d = 0, this.#i = Q(() => {
|
|
2151
|
+
this.#o(this.#e);
|
|
2160
2152
|
}), this.#l > 0) {
|
|
2161
|
-
var t = this.#
|
|
2162
|
-
un(this.#
|
|
2153
|
+
var t = this.#u = document.createDocumentFragment();
|
|
2154
|
+
un(this.#i, t);
|
|
2163
2155
|
const r = (
|
|
2164
2156
|
/** @type {(anchor: Node) => void} */
|
|
2165
2157
|
this.#r.pending
|
|
2166
2158
|
);
|
|
2167
|
-
this.#
|
|
2159
|
+
this.#a = Q(() => r(this.#e));
|
|
2168
2160
|
} else
|
|
2169
|
-
this.#
|
|
2161
|
+
this.#c(
|
|
2170
2162
|
/** @type {Batch} */
|
|
2171
2163
|
x
|
|
2172
2164
|
);
|
|
@@ -2177,15 +2169,15 @@ class Ta {
|
|
|
2177
2169
|
/**
|
|
2178
2170
|
* @param {Batch} batch
|
|
2179
2171
|
*/
|
|
2180
|
-
#
|
|
2181
|
-
this.is_pending = !1, t.
|
|
2172
|
+
#c(t) {
|
|
2173
|
+
this.is_pending = !1, t.transfer_reactions(this.#_);
|
|
2182
2174
|
}
|
|
2183
2175
|
/**
|
|
2184
2176
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
2185
2177
|
* @param {Effect} effect
|
|
2186
2178
|
*/
|
|
2187
2179
|
defer_effect(t) {
|
|
2188
|
-
si(t, this.#
|
|
2180
|
+
si(t, this.#_);
|
|
2189
2181
|
}
|
|
2190
2182
|
/**
|
|
2191
2183
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -2201,9 +2193,9 @@ class Ta {
|
|
|
2201
2193
|
* @template T
|
|
2202
2194
|
* @param {() => T} fn
|
|
2203
2195
|
*/
|
|
2204
|
-
#
|
|
2205
|
-
var r =
|
|
2206
|
-
he(this.#
|
|
2196
|
+
#x(t) {
|
|
2197
|
+
var r = g, n = _, i = k;
|
|
2198
|
+
he(this.#n), K(this.#n), Qe(this.#n.ctx);
|
|
2207
2199
|
try {
|
|
2208
2200
|
return be.ensure(), t();
|
|
2209
2201
|
} finally {
|
|
@@ -2216,14 +2208,14 @@ class Ta {
|
|
|
2216
2208
|
* @param {1 | -1} d
|
|
2217
2209
|
* @param {Batch} batch
|
|
2218
2210
|
*/
|
|
2219
|
-
#
|
|
2211
|
+
#w(t, r) {
|
|
2220
2212
|
if (!this.has_pending_snippet()) {
|
|
2221
|
-
this.parent && this.parent.#
|
|
2213
|
+
this.parent && this.parent.#w(t, r);
|
|
2222
2214
|
return;
|
|
2223
2215
|
}
|
|
2224
|
-
this.#l += t, this.#l === 0 && (this.#
|
|
2225
|
-
this.#
|
|
2226
|
-
}), this.#
|
|
2216
|
+
this.#l += t, this.#l === 0 && (this.#c(r), this.#a && Le(this.#a, () => {
|
|
2217
|
+
this.#a = null;
|
|
2218
|
+
}), this.#u && (this.#e.before(this.#u), this.#u = null));
|
|
2227
2219
|
}
|
|
2228
2220
|
/**
|
|
2229
2221
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -2233,42 +2225,42 @@ class Ta {
|
|
|
2233
2225
|
* @param {Batch} batch
|
|
2234
2226
|
*/
|
|
2235
2227
|
update_pending_count(t, r) {
|
|
2236
|
-
this.#
|
|
2237
|
-
this.#
|
|
2228
|
+
this.#w(t, r), this.#d += t, !(!this.#f || this.#v) && (this.#v = !0, Te(() => {
|
|
2229
|
+
this.#v = !1, this.#f && Je(this.#f, this.#d);
|
|
2238
2230
|
}));
|
|
2239
2231
|
}
|
|
2240
2232
|
get_effect_pending() {
|
|
2241
|
-
return this.#
|
|
2233
|
+
return this.#m(), A(
|
|
2242
2234
|
/** @type {Source<number>} */
|
|
2243
|
-
this.#
|
|
2235
|
+
this.#f
|
|
2244
2236
|
);
|
|
2245
2237
|
}
|
|
2246
2238
|
/** @param {unknown} error */
|
|
2247
2239
|
error(t) {
|
|
2248
2240
|
if (t === He || !this.#r.onerror && !this.#r.failed)
|
|
2249
2241
|
throw t;
|
|
2250
|
-
x?.is_fork ? (this.#
|
|
2251
|
-
this.#
|
|
2252
|
-
})) : this.#
|
|
2242
|
+
x?.is_fork ? (this.#i && x.skip_effect(this.#i), this.#a && x.skip_effect(this.#a), this.#s && x.skip_effect(this.#s), x.oncommit(() => {
|
|
2243
|
+
this.#h() || this.#T(t);
|
|
2244
|
+
})) : this.#T(t);
|
|
2253
2245
|
}
|
|
2254
2246
|
/**
|
|
2255
2247
|
* @param {unknown} error
|
|
2256
2248
|
*/
|
|
2257
|
-
#
|
|
2258
|
-
this.#
|
|
2249
|
+
#T(t) {
|
|
2250
|
+
this.#i && (j(this.#i), this.#i = null), this.#a && (j(this.#a), this.#a = null), this.#s && (j(this.#s), this.#s = null), w && (q(
|
|
2259
2251
|
/** @type {TemplateNode} */
|
|
2260
2252
|
this.#t
|
|
2261
2253
|
), Rs(), q(Vt()));
|
|
2262
2254
|
let r = this.#r.failed;
|
|
2263
2255
|
const n = (i) => {
|
|
2264
|
-
if (this.#
|
|
2256
|
+
if (this.#h()) return;
|
|
2265
2257
|
const { reset: s, invoke_onerror: o } = this.#b(i);
|
|
2266
|
-
o(), r && !this.#
|
|
2258
|
+
o(), r && !this.#h() && (this.#s = this.#x(() => {
|
|
2267
2259
|
try {
|
|
2268
|
-
return
|
|
2260
|
+
return Q(() => {
|
|
2269
2261
|
var a = (
|
|
2270
2262
|
/** @type {Effect} */
|
|
2271
|
-
|
|
2263
|
+
g
|
|
2272
2264
|
);
|
|
2273
2265
|
a.b = this, a.f |= Ar, r(
|
|
2274
2266
|
this.#e,
|
|
@@ -2280,25 +2272,25 @@ class Ta {
|
|
|
2280
2272
|
return oe(
|
|
2281
2273
|
a,
|
|
2282
2274
|
/** @type {Effect} */
|
|
2283
|
-
this.#
|
|
2275
|
+
this.#n.parent
|
|
2284
2276
|
), null;
|
|
2285
2277
|
}
|
|
2286
2278
|
}));
|
|
2287
2279
|
};
|
|
2288
2280
|
Te(() => {
|
|
2289
|
-
if (!this.#
|
|
2281
|
+
if (!this.#h()) {
|
|
2290
2282
|
var i;
|
|
2291
2283
|
try {
|
|
2292
2284
|
i = this.transform_error(t);
|
|
2293
2285
|
} catch (s) {
|
|
2294
|
-
oe(s, this.#
|
|
2286
|
+
oe(s, this.#n && this.#n.parent);
|
|
2295
2287
|
return;
|
|
2296
2288
|
}
|
|
2297
2289
|
i !== null && typeof i == "object" && typeof /** @type {any} */
|
|
2298
2290
|
i.then == "function" ? i.then(
|
|
2299
2291
|
n,
|
|
2300
2292
|
/** @param {unknown} e */
|
|
2301
|
-
(s) => oe(s, this.#
|
|
2293
|
+
(s) => oe(s, this.#n && this.#n.parent)
|
|
2302
2294
|
) : n(i);
|
|
2303
2295
|
}
|
|
2304
2296
|
});
|
|
@@ -2314,7 +2306,7 @@ function Li(e, t) {
|
|
|
2314
2306
|
}
|
|
2315
2307
|
function Sa(e, t) {
|
|
2316
2308
|
Pr(), t.intro = t.intro ?? !1;
|
|
2317
|
-
const r = t.target, n =
|
|
2309
|
+
const r = t.target, n = w, i = T;
|
|
2318
2310
|
try {
|
|
2319
2311
|
for (var s = /* @__PURE__ */ Ne(r); s && (s.nodeType !== At || /** @type {Comment} */
|
|
2320
2312
|
s.data !== kn); )
|
|
@@ -2355,12 +2347,12 @@ function Ri(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
2355
2347
|
/** @type {ComponentContext} */
|
|
2356
2348
|
k
|
|
2357
2349
|
);
|
|
2358
|
-
if (s && (d.c = s), i && (n.$$events = i),
|
|
2350
|
+
if (s && (d.c = s), i && (n.$$events = i), w && We(
|
|
2359
2351
|
/** @type {TemplateNode} */
|
|
2360
2352
|
p,
|
|
2361
2353
|
null
|
|
2362
|
-
), l = e(p, n) || Zr(),
|
|
2363
|
-
|
|
2354
|
+
), l = e(p, n) || Zr(), w && (g.nodes.end = T, T === null || T.nodeType !== At || /** @type {Comment} */
|
|
2355
|
+
T.data !== zr))
|
|
2364
2356
|
throw er(), He;
|
|
2365
2357
|
ri();
|
|
2366
2358
|
},
|
|
@@ -2371,12 +2363,12 @@ function Ri(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
2371
2363
|
var v = p[d];
|
|
2372
2364
|
if (!h.has(v)) {
|
|
2373
2365
|
h.add(v);
|
|
2374
|
-
var S =
|
|
2375
|
-
for (const
|
|
2376
|
-
var m = It.get(
|
|
2377
|
-
m === void 0 && (m = /* @__PURE__ */ new Map(), It.set(
|
|
2378
|
-
var
|
|
2379
|
-
|
|
2366
|
+
var S = Ea(v);
|
|
2367
|
+
for (const N of [t, document]) {
|
|
2368
|
+
var m = It.get(N);
|
|
2369
|
+
m === void 0 && (m = /* @__PURE__ */ new Map(), It.set(N, m));
|
|
2370
|
+
var y = m.get(v);
|
|
2371
|
+
y === void 0 ? (N.addEventListener(v, Cr, { passive: S }), m.set(v, 1)) : m.set(v, y + 1);
|
|
2380
2372
|
}
|
|
2381
2373
|
}
|
|
2382
2374
|
}
|
|
@@ -2433,30 +2425,30 @@ class $i {
|
|
|
2433
2425
|
* Keys of effects that are currently outroing
|
|
2434
2426
|
* @type {Set<Key>}
|
|
2435
2427
|
*/
|
|
2436
|
-
#
|
|
2428
|
+
#o = /* @__PURE__ */ new Set();
|
|
2437
2429
|
/**
|
|
2438
2430
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2439
2431
|
* This is necessary for `<svelte:element>`
|
|
2440
2432
|
*/
|
|
2441
|
-
#
|
|
2433
|
+
#n = !0;
|
|
2442
2434
|
/**
|
|
2443
2435
|
* @param {TemplateNode} anchor
|
|
2444
2436
|
* @param {boolean} transition
|
|
2445
2437
|
*/
|
|
2446
2438
|
constructor(t, r = !0) {
|
|
2447
|
-
this.anchor = t, this.#
|
|
2439
|
+
this.anchor = t, this.#n = r;
|
|
2448
2440
|
}
|
|
2449
2441
|
/**
|
|
2450
2442
|
* @param {Batch} batch
|
|
2451
2443
|
*/
|
|
2452
|
-
#
|
|
2444
|
+
#i = (t) => {
|
|
2453
2445
|
if (this.#e.has(t)) {
|
|
2454
2446
|
var r = (
|
|
2455
2447
|
/** @type {Key} */
|
|
2456
2448
|
this.#e.get(t)
|
|
2457
2449
|
), n = this.#t.get(r);
|
|
2458
2450
|
if (n)
|
|
2459
|
-
zt(n), this.#
|
|
2451
|
+
zt(n), this.#o.delete(r);
|
|
2460
2452
|
else {
|
|
2461
2453
|
var i = this.#r.get(r);
|
|
2462
2454
|
i && (zt(i.effect), this.#t.set(r, i.effect), this.#r.delete(r), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), n = i.effect);
|
|
@@ -2468,23 +2460,23 @@ class $i {
|
|
|
2468
2460
|
a && (j(a.effect), this.#r.delete(o));
|
|
2469
2461
|
}
|
|
2470
2462
|
for (const [s, o] of this.#t) {
|
|
2471
|
-
if (s === r || this.#
|
|
2463
|
+
if (s === r || this.#o.has(s)) continue;
|
|
2472
2464
|
const a = () => {
|
|
2473
2465
|
if (Array.from(this.#e.values()).includes(s)) {
|
|
2474
2466
|
var u = document.createDocumentFragment();
|
|
2475
2467
|
un(o, u), u.append(J()), this.#r.set(s, { effect: o, fragment: u });
|
|
2476
2468
|
} else
|
|
2477
2469
|
j(o);
|
|
2478
|
-
this.#
|
|
2470
|
+
this.#o.delete(s), this.#t.delete(s);
|
|
2479
2471
|
};
|
|
2480
|
-
this.#
|
|
2472
|
+
this.#n || !n ? (this.#o.add(s), Le(o, a, !1)) : a();
|
|
2481
2473
|
}
|
|
2482
2474
|
}
|
|
2483
2475
|
};
|
|
2484
2476
|
/**
|
|
2485
2477
|
* @param {Batch} batch
|
|
2486
2478
|
*/
|
|
2487
|
-
#
|
|
2479
|
+
#a = (t) => {
|
|
2488
2480
|
this.#e.delete(t);
|
|
2489
2481
|
const r = Array.from(this.#e.values());
|
|
2490
2482
|
for (const [n, i] of this.#r)
|
|
@@ -2504,22 +2496,22 @@ class $i {
|
|
|
2504
2496
|
if (i) {
|
|
2505
2497
|
var s = document.createDocumentFragment(), o = J();
|
|
2506
2498
|
s.append(o), this.#r.set(t, {
|
|
2507
|
-
effect:
|
|
2499
|
+
effect: Q(() => r(o)),
|
|
2508
2500
|
fragment: s
|
|
2509
2501
|
});
|
|
2510
2502
|
} else
|
|
2511
2503
|
this.#t.set(
|
|
2512
2504
|
t,
|
|
2513
|
-
|
|
2505
|
+
Q(() => r(this.anchor))
|
|
2514
2506
|
);
|
|
2515
2507
|
if (this.#e.set(n, t), i) {
|
|
2516
2508
|
for (const [a, l] of this.#t)
|
|
2517
2509
|
a === t ? n.unskip_effect(l) : n.skip_effect(l);
|
|
2518
2510
|
for (const [a, l] of this.#r)
|
|
2519
2511
|
a === t ? n.unskip_effect(l.effect) : n.skip_effect(l.effect);
|
|
2520
|
-
n.oncommit(this.#
|
|
2512
|
+
n.oncommit(this.#i), n.ondiscard(this.#a);
|
|
2521
2513
|
} else
|
|
2522
|
-
|
|
2514
|
+
w && (this.anchor = T), this.#i(n);
|
|
2523
2515
|
}
|
|
2524
2516
|
}
|
|
2525
2517
|
function rl(e, t, ...r) {
|
|
@@ -2531,10 +2523,10 @@ function rl(e, t, ...r) {
|
|
|
2531
2523
|
}
|
|
2532
2524
|
function gr(e, t, r = !1) {
|
|
2533
2525
|
var n;
|
|
2534
|
-
|
|
2526
|
+
w && (n = T, tr());
|
|
2535
2527
|
var i = new $i(e), s = r ? $e : 0;
|
|
2536
2528
|
function o(a, l) {
|
|
2537
|
-
if (
|
|
2529
|
+
if (w) {
|
|
2538
2530
|
var u = Yr(
|
|
2539
2531
|
/** @type {TemplateNode} */
|
|
2540
2532
|
n
|
|
@@ -2622,9 +2614,9 @@ function nl(e, t, r, n, i, s = null) {
|
|
|
2622
2614
|
/** @type {Element} */
|
|
2623
2615
|
e
|
|
2624
2616
|
);
|
|
2625
|
-
o =
|
|
2617
|
+
o = w ? q(/* @__PURE__ */ Ne(l)) : l.appendChild(J());
|
|
2626
2618
|
}
|
|
2627
|
-
|
|
2619
|
+
w && tr();
|
|
2628
2620
|
var u = null, f = /* @__PURE__ */ ea(() => {
|
|
2629
2621
|
var m = r();
|
|
2630
2622
|
return (
|
|
@@ -2635,8 +2627,8 @@ function nl(e, t, r, n, i, s = null) {
|
|
|
2635
2627
|
function p(m) {
|
|
2636
2628
|
if (!(S.effect.f & R)) {
|
|
2637
2629
|
S.pending.delete(m);
|
|
2638
|
-
var
|
|
2639
|
-
S.fallback = u, Na(S,
|
|
2630
|
+
var y = A(f);
|
|
2631
|
+
S.fallback = u, Na(S, y, o, t, n), u !== null && (y.length === 0 ? u.f & ve ? (u.f ^= ve, vt(u, null, o)) : zt(u) : Le(u, () => {
|
|
2640
2632
|
u = null;
|
|
2641
2633
|
}));
|
|
2642
2634
|
}
|
|
@@ -2648,41 +2640,41 @@ function nl(e, t, r, n, i, s = null) {
|
|
|
2648
2640
|
var m = (
|
|
2649
2641
|
/** @type {V[]} */
|
|
2650
2642
|
A(f)
|
|
2651
|
-
),
|
|
2652
|
-
let
|
|
2653
|
-
if (
|
|
2643
|
+
), y = m.length;
|
|
2644
|
+
let N = !1;
|
|
2645
|
+
if (w) {
|
|
2654
2646
|
var X = Yr(o) === Xr;
|
|
2655
|
-
X !== (
|
|
2647
|
+
X !== (y === 0) && (o = Vt(), q(o), me(!1), N = !0);
|
|
2656
2648
|
}
|
|
2657
2649
|
for (var C = /* @__PURE__ */ new Set(), D = (
|
|
2658
2650
|
/** @type {Batch} */
|
|
2659
2651
|
x
|
|
2660
|
-
), de = gi(), U = 0; U <
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
var P = m[U],
|
|
2665
|
-
|
|
2652
|
+
), de = gi(), U = 0; U < y; U += 1) {
|
|
2653
|
+
w && T.nodeType === At && /** @type {Comment} */
|
|
2654
|
+
T.data === zr && (o = /** @type {Comment} */
|
|
2655
|
+
T, N = !0, me(!1));
|
|
2656
|
+
var P = m[U], Ee = n(P, U), Y = c ? null : a.get(Ee);
|
|
2657
|
+
Y ? (Y.v && Je(Y.v, P), Y.i && Je(Y.i, U), de && D.unskip_effect(Y.e)) : (Y = Oa(
|
|
2666
2658
|
a,
|
|
2667
2659
|
c ? o : wn ??= J(),
|
|
2668
2660
|
P,
|
|
2669
|
-
|
|
2661
|
+
Ee,
|
|
2670
2662
|
U,
|
|
2671
2663
|
i,
|
|
2672
2664
|
t,
|
|
2673
2665
|
r
|
|
2674
|
-
), c || (
|
|
2666
|
+
), c || (Y.e.f |= ve), a.set(Ee, Y)), C.add(Ee);
|
|
2675
2667
|
}
|
|
2676
|
-
if (
|
|
2668
|
+
if (y === 0 && s && !u && (c ? u = Q(() => s(o)) : (u = Q(() => s(wn ??= J())), u.f |= ve)), y > C.size && Ds(), w && y > 0 && q(Vt()), !c)
|
|
2677
2669
|
if (h.set(D, C), de) {
|
|
2678
2670
|
for (const [hr, cr] of a)
|
|
2679
2671
|
C.has(hr) || D.skip_effect(cr.e);
|
|
2680
2672
|
D.oncommit(p), D.ondiscard(d);
|
|
2681
2673
|
} else
|
|
2682
2674
|
p(D);
|
|
2683
|
-
|
|
2675
|
+
N && me(!0), A(f);
|
|
2684
2676
|
}), S = { effect: v, items: a, pending: h, outrogroups: null, fallback: u };
|
|
2685
|
-
c = !1,
|
|
2677
|
+
c = !1, w && (o = T);
|
|
2686
2678
|
}
|
|
2687
2679
|
function lt(e) {
|
|
2688
2680
|
for (; e !== null && !(e.f & ie); )
|
|
@@ -2707,14 +2699,14 @@ function Na(e, t, r, n, i) {
|
|
|
2707
2699
|
if (d !== a) {
|
|
2708
2700
|
if (l !== void 0 && l.has(d)) {
|
|
2709
2701
|
if (f.length < h.length) {
|
|
2710
|
-
var m = h[0],
|
|
2702
|
+
var m = h[0], y;
|
|
2711
2703
|
u = m.prev;
|
|
2712
|
-
var
|
|
2713
|
-
for (
|
|
2714
|
-
vt(f[
|
|
2715
|
-
for (
|
|
2716
|
-
l.delete(h[
|
|
2717
|
-
we(e,
|
|
2704
|
+
var N = f[0], X = f[f.length - 1];
|
|
2705
|
+
for (y = 0; y < f.length; y += 1)
|
|
2706
|
+
vt(f[y], m, r);
|
|
2707
|
+
for (y = 0; y < h.length; y += 1)
|
|
2708
|
+
l.delete(h[y]);
|
|
2709
|
+
we(e, N.prev, X.next), we(e, u, N), we(e, X, m), a = m, u = X, v -= 1, f = [], h = [];
|
|
2718
2710
|
} else
|
|
2719
2711
|
l.delete(d), vt(d, a, r), we(e, d.prev, d.next), we(e, d, u === null ? e.effect.first : u.next), we(e, u, d), u = d;
|
|
2720
2712
|
continue;
|
|
@@ -2746,11 +2738,11 @@ function Na(e, t, r, n, i) {
|
|
|
2746
2738
|
}
|
|
2747
2739
|
}
|
|
2748
2740
|
function Oa(e, t, r, n, i, s, o, a) {
|
|
2749
|
-
var l = o & bs ? o &
|
|
2741
|
+
var l = o & bs ? o & Es ? De(r) : /* @__PURE__ */ tn(r, !1, !1) : null, u = o & ys ? De(i) : null;
|
|
2750
2742
|
return {
|
|
2751
2743
|
v: l,
|
|
2752
2744
|
i: u,
|
|
2753
|
-
e:
|
|
2745
|
+
e: Q(() => (s(t, l ?? r, u ?? i, a), () => {
|
|
2754
2746
|
e.delete(n);
|
|
2755
2747
|
}))
|
|
2756
2748
|
};
|
|
@@ -2774,8 +2766,8 @@ function we(e, t, r) {
|
|
|
2774
2766
|
t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
|
|
2775
2767
|
}
|
|
2776
2768
|
function Ba(e, t) {
|
|
2777
|
-
|
|
2778
|
-
e =
|
|
2769
|
+
Ei(() => {
|
|
2770
|
+
e = g?.parent?.nodes?.start ?? e;
|
|
2779
2771
|
var r = e.getRootNode(), n = (
|
|
2780
2772
|
/** @type {ShadowRoot} */
|
|
2781
2773
|
r.host ? (
|
|
@@ -2814,9 +2806,9 @@ function Sn(e, t, r, n, i, s) {
|
|
|
2814
2806
|
/** @type {any} */
|
|
2815
2807
|
e[Hr]
|
|
2816
2808
|
);
|
|
2817
|
-
if (
|
|
2809
|
+
if (w || o !== r || o === void 0) {
|
|
2818
2810
|
var a = Pa(r, n, s);
|
|
2819
|
-
(!
|
|
2811
|
+
(!w || a !== e.getAttribute("class")) && (a == null ? e.removeAttribute("class") : e.className = a), e[Hr] = r;
|
|
2820
2812
|
} else if (s && i !== s)
|
|
2821
2813
|
for (var l in s) {
|
|
2822
2814
|
var u = !!s[l];
|
|
@@ -2827,7 +2819,10 @@ function Sn(e, t, r, n, i, s) {
|
|
|
2827
2819
|
const Ia = Symbol("is custom element"), Ca = Symbol("is html"), Ma = Cs ? "link" : "LINK";
|
|
2828
2820
|
function An(e, t, r, n) {
|
|
2829
2821
|
var i = La(e);
|
|
2830
|
-
|
|
2822
|
+
if (!(w && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ma))) {
|
|
2823
|
+
var s = i[t];
|
|
2824
|
+
s !== (i[t] = r) && (t === "loading" && (e[Ps] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Ra(e).has(t) ? e[t] = r : w && (typeof r == "number" || typeof r == "boolean") && s === String(r) || e.setAttribute(t, r));
|
|
2825
|
+
}
|
|
2831
2826
|
}
|
|
2832
2827
|
function La(e) {
|
|
2833
2828
|
return (
|
|
@@ -2862,9 +2857,9 @@ function il(e = Zr(), t, r, n) {
|
|
|
2862
2857
|
k.r
|
|
2863
2858
|
), s = (
|
|
2864
2859
|
/** @type {Effect} */
|
|
2865
|
-
|
|
2860
|
+
g
|
|
2866
2861
|
);
|
|
2867
|
-
return
|
|
2862
|
+
return Ei(() => {
|
|
2868
2863
|
var o, a;
|
|
2869
2864
|
return an(() => {
|
|
2870
2865
|
o = a, a = [], ln(() => {
|
|
@@ -2872,7 +2867,7 @@ function il(e = Zr(), t, r, n) {
|
|
|
2872
2867
|
});
|
|
2873
2868
|
}), () => {
|
|
2874
2869
|
let l = s;
|
|
2875
|
-
for (; l !== i && l.parent !== null && l.parent.f &
|
|
2870
|
+
for (; l !== i && l.parent !== null && l.parent.f & yt; )
|
|
2876
2871
|
l = l.parent;
|
|
2877
2872
|
const u = () => {
|
|
2878
2873
|
a && br(r(...a), e) && t(null, ...a);
|
|
@@ -3018,7 +3013,7 @@ function Ve(e, t, r, n) {
|
|
|
3018
3013
|
};
|
|
3019
3014
|
var u = !1, f = /* @__PURE__ */ rr(() => (u = !1, l())), h = (
|
|
3020
3015
|
/** @type {Effect} */
|
|
3021
|
-
|
|
3016
|
+
g
|
|
3022
3017
|
);
|
|
3023
3018
|
return (
|
|
3024
3019
|
/** @type {() => V} */
|
|
@@ -3027,7 +3022,7 @@ function Ve(e, t, r, n) {
|
|
|
3027
3022
|
const d = p ? A(f) : c;
|
|
3028
3023
|
return ae(f, d), u = !0, i !== void 0 && (i = d), c;
|
|
3029
3024
|
}
|
|
3030
|
-
return
|
|
3025
|
+
return ye && u || h.f & R ? f.v : A(f);
|
|
3031
3026
|
}
|
|
3032
3027
|
);
|
|
3033
3028
|
}
|
|
@@ -3449,12 +3444,12 @@ function ao(e, t) {
|
|
|
3449
3444
|
t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
|
|
3450
3445
|
return r;
|
|
3451
3446
|
}
|
|
3452
|
-
function
|
|
3447
|
+
function yr(e, t, r) {
|
|
3453
3448
|
if (r || arguments.length === 2) for (var n = 0, i = t.length, s; n < i; n++)
|
|
3454
3449
|
(s || !(n in t)) && (s || (s = Array.prototype.slice.call(t, 0, n)), s[n] = t[n]);
|
|
3455
3450
|
return e.concat(s || Array.prototype.slice.call(t));
|
|
3456
3451
|
}
|
|
3457
|
-
function
|
|
3452
|
+
function Er(e, t) {
|
|
3458
3453
|
var r = t && t.cache ? t.cache : po, n = t && t.serializer ? t.serializer : ho, i = t && t.strategy ? t.strategy : lo;
|
|
3459
3454
|
return i(e, {
|
|
3460
3455
|
cache: r,
|
|
@@ -3511,44 +3506,44 @@ var ho = function() {
|
|
|
3511
3506
|
return t;
|
|
3512
3507
|
}, Wt.apply(this, arguments);
|
|
3513
3508
|
};
|
|
3514
|
-
var
|
|
3509
|
+
var b;
|
|
3515
3510
|
(function(e) {
|
|
3516
3511
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
|
|
3517
|
-
})(
|
|
3518
|
-
var
|
|
3512
|
+
})(b || (b = {}));
|
|
3513
|
+
var O;
|
|
3519
3514
|
(function(e) {
|
|
3520
3515
|
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
|
|
3521
|
-
})(
|
|
3516
|
+
})(O || (O = {}));
|
|
3522
3517
|
var tt;
|
|
3523
3518
|
(function(e) {
|
|
3524
3519
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
3525
3520
|
})(tt || (tt = {}));
|
|
3526
3521
|
function On(e) {
|
|
3527
|
-
return e.type ===
|
|
3522
|
+
return e.type === O.literal;
|
|
3528
3523
|
}
|
|
3529
3524
|
function vo(e) {
|
|
3530
|
-
return e.type ===
|
|
3525
|
+
return e.type === O.argument;
|
|
3531
3526
|
}
|
|
3532
3527
|
function Vi(e) {
|
|
3533
|
-
return e.type ===
|
|
3528
|
+
return e.type === O.number;
|
|
3534
3529
|
}
|
|
3535
3530
|
function qi(e) {
|
|
3536
|
-
return e.type ===
|
|
3531
|
+
return e.type === O.date;
|
|
3537
3532
|
}
|
|
3538
3533
|
function Xi(e) {
|
|
3539
|
-
return e.type ===
|
|
3534
|
+
return e.type === O.time;
|
|
3540
3535
|
}
|
|
3541
3536
|
function zi(e) {
|
|
3542
|
-
return e.type ===
|
|
3537
|
+
return e.type === O.select;
|
|
3543
3538
|
}
|
|
3544
3539
|
function Wi(e) {
|
|
3545
|
-
return e.type ===
|
|
3540
|
+
return e.type === O.plural;
|
|
3546
3541
|
}
|
|
3547
3542
|
function mo(e) {
|
|
3548
|
-
return e.type ===
|
|
3543
|
+
return e.type === O.pound;
|
|
3549
3544
|
}
|
|
3550
3545
|
function Yi(e) {
|
|
3551
|
-
return e.type ===
|
|
3546
|
+
return e.type === O.tag;
|
|
3552
3547
|
}
|
|
3553
3548
|
function Zi(e) {
|
|
3554
3549
|
return !!(e && typeof e == "object" && e.type === tt.number);
|
|
@@ -3648,17 +3643,17 @@ function go(e) {
|
|
|
3648
3643
|
return "";
|
|
3649
3644
|
}), t;
|
|
3650
3645
|
}
|
|
3651
|
-
var
|
|
3652
|
-
return
|
|
3646
|
+
var B = function() {
|
|
3647
|
+
return B = Object.assign || function(t) {
|
|
3653
3648
|
for (var r, n = 1, i = arguments.length; n < i; n++) {
|
|
3654
3649
|
r = arguments[n];
|
|
3655
3650
|
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
|
|
3656
3651
|
}
|
|
3657
3652
|
return t;
|
|
3658
|
-
},
|
|
3653
|
+
}, B.apply(this, arguments);
|
|
3659
3654
|
};
|
|
3660
3655
|
var bo = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
3661
|
-
function
|
|
3656
|
+
function yo(e) {
|
|
3662
3657
|
if (e.length === 0)
|
|
3663
3658
|
throw new Error("Number skeleton cannot be empty");
|
|
3664
3659
|
for (var t = e.split(bo).filter(function(c) {
|
|
@@ -3676,7 +3671,7 @@ function Eo(e) {
|
|
|
3676
3671
|
}
|
|
3677
3672
|
return r;
|
|
3678
3673
|
}
|
|
3679
|
-
function
|
|
3674
|
+
function Eo(e) {
|
|
3680
3675
|
return e.replace(/^(.*?)-/, "");
|
|
3681
3676
|
}
|
|
3682
3677
|
var Bn = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, Ji = /^(@+)?(\+|#+)?[rs]?$/g, xo = /(\*)(0+)|(#+)(0+)|(0+)/g, Ki = /^(0+)$/;
|
|
@@ -3768,7 +3763,7 @@ function To(e) {
|
|
|
3768
3763
|
continue;
|
|
3769
3764
|
case "measure-unit":
|
|
3770
3765
|
case "unit":
|
|
3771
|
-
t.style = "unit", t.unit =
|
|
3766
|
+
t.style = "unit", t.unit = Eo(i.options[0]);
|
|
3772
3767
|
continue;
|
|
3773
3768
|
case "compact-short":
|
|
3774
3769
|
case "K":
|
|
@@ -3779,13 +3774,13 @@ function To(e) {
|
|
|
3779
3774
|
t.notation = "compact", t.compactDisplay = "long";
|
|
3780
3775
|
continue;
|
|
3781
3776
|
case "scientific":
|
|
3782
|
-
t =
|
|
3783
|
-
return
|
|
3777
|
+
t = B(B(B({}, t), { notation: "scientific" }), i.options.reduce(function(l, u) {
|
|
3778
|
+
return B(B({}, l), In(u));
|
|
3784
3779
|
}, {}));
|
|
3785
3780
|
continue;
|
|
3786
3781
|
case "engineering":
|
|
3787
|
-
t =
|
|
3788
|
-
return
|
|
3782
|
+
t = B(B(B({}, t), { notation: "engineering" }), i.options.reduce(function(l, u) {
|
|
3783
|
+
return B(B({}, l), In(u));
|
|
3789
3784
|
}, {}));
|
|
3790
3785
|
continue;
|
|
3791
3786
|
case "notation-simple":
|
|
@@ -3854,17 +3849,17 @@ function To(e) {
|
|
|
3854
3849
|
return f === "*" ? t.minimumFractionDigits = u.length : h && h[0] === "#" ? t.maximumFractionDigits = h.length : c && p ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + p.length) : (t.minimumFractionDigits = u.length, t.maximumFractionDigits = u.length), "";
|
|
3855
3850
|
});
|
|
3856
3851
|
var s = i.options[0];
|
|
3857
|
-
s === "w" ? t =
|
|
3852
|
+
s === "w" ? t = B(B({}, t), { trailingZeroDisplay: "stripIfInteger" }) : s && (t = B(B({}, t), Pn(s)));
|
|
3858
3853
|
continue;
|
|
3859
3854
|
}
|
|
3860
3855
|
if (Ji.test(i.stem)) {
|
|
3861
|
-
t =
|
|
3856
|
+
t = B(B({}, t), Pn(i.stem));
|
|
3862
3857
|
continue;
|
|
3863
3858
|
}
|
|
3864
3859
|
var o = es(i.stem);
|
|
3865
|
-
o && (t =
|
|
3860
|
+
o && (t = B(B({}, t), o));
|
|
3866
3861
|
var a = wo(i.stem);
|
|
3867
|
-
a && (t =
|
|
3862
|
+
a && (t = B(B({}, t), a));
|
|
3868
3863
|
}
|
|
3869
3864
|
return t;
|
|
3870
3865
|
}
|
|
@@ -5321,7 +5316,7 @@ function Ao(e) {
|
|
|
5321
5316
|
return i[0];
|
|
5322
5317
|
}
|
|
5323
5318
|
var wr, Ho = new RegExp("^".concat(Qi.source, "*")), No = new RegExp("".concat(Qi.source, "*$"));
|
|
5324
|
-
function
|
|
5319
|
+
function E(e, t) {
|
|
5325
5320
|
return { start: e, end: t };
|
|
5326
5321
|
}
|
|
5327
5322
|
var Oo = !!String.prototype.startsWith && "_a".startsWith("a", 1), Bo = !!String.fromCodePoint, Po = !!Object.fromEntries, Io = !!String.prototype.codePointAt, Co = !!String.prototype.trimStart, Mo = !!String.prototype.trimEnd, Lo = !!Number.isSafeInteger, Ro = Lo ? Number.isSafeInteger : function(e) {
|
|
@@ -5448,13 +5443,13 @@ var Fo = (
|
|
|
5448
5443
|
if (s === 35 && (r === "plural" || r === "selectordinal")) {
|
|
5449
5444
|
var a = this.clonePosition();
|
|
5450
5445
|
this.bump(), i.push({
|
|
5451
|
-
type:
|
|
5452
|
-
location:
|
|
5446
|
+
type: O.pound,
|
|
5447
|
+
location: E(a, this.clonePosition())
|
|
5453
5448
|
});
|
|
5454
5449
|
} else if (s === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
5455
5450
|
if (n)
|
|
5456
5451
|
break;
|
|
5457
|
-
return this.error(
|
|
5452
|
+
return this.error(b.UNMATCHED_CLOSING_TAG, E(this.clonePosition(), this.clonePosition()));
|
|
5458
5453
|
} else if (s === 60 && !this.ignoreTag && kr(this.peek() || 0)) {
|
|
5459
5454
|
var o = this.parseTag(t, r);
|
|
5460
5455
|
if (o.err)
|
|
@@ -5476,9 +5471,9 @@ var Fo = (
|
|
|
5476
5471
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
5477
5472
|
return {
|
|
5478
5473
|
val: {
|
|
5479
|
-
type:
|
|
5474
|
+
type: O.literal,
|
|
5480
5475
|
value: "<".concat(i, "/>"),
|
|
5481
|
-
location:
|
|
5476
|
+
location: E(n, this.clonePosition())
|
|
5482
5477
|
},
|
|
5483
5478
|
err: null
|
|
5484
5479
|
};
|
|
@@ -5489,21 +5484,21 @@ var Fo = (
|
|
|
5489
5484
|
var o = s.val, a = this.clonePosition();
|
|
5490
5485
|
if (this.bumpIf("</")) {
|
|
5491
5486
|
if (this.isEOF() || !kr(this.char()))
|
|
5492
|
-
return this.error(
|
|
5487
|
+
return this.error(b.INVALID_TAG, E(a, this.clonePosition()));
|
|
5493
5488
|
var l = this.clonePosition(), u = this.parseTagName();
|
|
5494
|
-
return i !== u ? this.error(
|
|
5489
|
+
return i !== u ? this.error(b.UNMATCHED_CLOSING_TAG, E(l, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
5495
5490
|
val: {
|
|
5496
|
-
type:
|
|
5491
|
+
type: O.tag,
|
|
5497
5492
|
value: i,
|
|
5498
5493
|
children: o,
|
|
5499
|
-
location:
|
|
5494
|
+
location: E(n, this.clonePosition())
|
|
5500
5495
|
},
|
|
5501
5496
|
err: null
|
|
5502
|
-
} : this.error(
|
|
5497
|
+
} : this.error(b.INVALID_TAG, E(a, this.clonePosition())));
|
|
5503
5498
|
} else
|
|
5504
|
-
return this.error(
|
|
5499
|
+
return this.error(b.UNCLOSED_TAG, E(n, this.clonePosition()));
|
|
5505
5500
|
} else
|
|
5506
|
-
return this.error(
|
|
5501
|
+
return this.error(b.INVALID_TAG, E(n, this.clonePosition()));
|
|
5507
5502
|
}, e.prototype.parseTagName = function() {
|
|
5508
5503
|
var t = this.offset();
|
|
5509
5504
|
for (this.bump(); !this.isEOF() && ko(this.char()); )
|
|
@@ -5528,9 +5523,9 @@ var Fo = (
|
|
|
5528
5523
|
}
|
|
5529
5524
|
break;
|
|
5530
5525
|
}
|
|
5531
|
-
var l =
|
|
5526
|
+
var l = E(n, this.clonePosition());
|
|
5532
5527
|
return {
|
|
5533
|
-
val: { type:
|
|
5528
|
+
val: { type: O.literal, value: i, location: l },
|
|
5534
5529
|
err: null
|
|
5535
5530
|
};
|
|
5536
5531
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
@@ -5578,40 +5573,40 @@ var Fo = (
|
|
|
5578
5573
|
}, e.prototype.parseArgument = function(t, r) {
|
|
5579
5574
|
var n = this.clonePosition();
|
|
5580
5575
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
5581
|
-
return this.error(
|
|
5576
|
+
return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
|
|
5582
5577
|
if (this.char() === 125)
|
|
5583
|
-
return this.bump(), this.error(
|
|
5578
|
+
return this.bump(), this.error(b.EMPTY_ARGUMENT, E(n, this.clonePosition()));
|
|
5584
5579
|
var i = this.parseIdentifierIfPossible().value;
|
|
5585
5580
|
if (!i)
|
|
5586
|
-
return this.error(
|
|
5581
|
+
return this.error(b.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
|
|
5587
5582
|
if (this.bumpSpace(), this.isEOF())
|
|
5588
|
-
return this.error(
|
|
5583
|
+
return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition()));
|
|
5589
5584
|
switch (this.char()) {
|
|
5590
5585
|
case 125:
|
|
5591
5586
|
return this.bump(), {
|
|
5592
5587
|
val: {
|
|
5593
|
-
type:
|
|
5588
|
+
type: O.argument,
|
|
5594
5589
|
// value does not include the opening and closing braces.
|
|
5595
5590
|
value: i,
|
|
5596
|
-
location:
|
|
5591
|
+
location: E(n, this.clonePosition())
|
|
5597
5592
|
},
|
|
5598
5593
|
err: null
|
|
5599
5594
|
};
|
|
5600
5595
|
case 44:
|
|
5601
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(
|
|
5596
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE, E(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
|
|
5602
5597
|
default:
|
|
5603
|
-
return this.error(
|
|
5598
|
+
return this.error(b.MALFORMED_ARGUMENT, E(n, this.clonePosition()));
|
|
5604
5599
|
}
|
|
5605
5600
|
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
5606
5601
|
var t = this.clonePosition(), r = this.offset(), n = Gr(this.message, r), i = r + n.length;
|
|
5607
5602
|
this.bumpTo(i);
|
|
5608
|
-
var s = this.clonePosition(), o =
|
|
5603
|
+
var s = this.clonePosition(), o = E(t, s);
|
|
5609
5604
|
return { value: n, location: o };
|
|
5610
5605
|
}, e.prototype.parseArgumentOptions = function(t, r, n, i) {
|
|
5611
5606
|
var s, o = this.clonePosition(), a = this.parseIdentifierIfPossible().value, l = this.clonePosition();
|
|
5612
5607
|
switch (a) {
|
|
5613
5608
|
case "":
|
|
5614
|
-
return this.error(
|
|
5609
|
+
return this.error(b.EXPECT_ARGUMENT_TYPE, E(o, l));
|
|
5615
5610
|
case "number":
|
|
5616
5611
|
case "date":
|
|
5617
5612
|
case "time": {
|
|
@@ -5624,25 +5619,25 @@ var Fo = (
|
|
|
5624
5619
|
return h;
|
|
5625
5620
|
var c = Uo(h.val);
|
|
5626
5621
|
if (c.length === 0)
|
|
5627
|
-
return this.error(
|
|
5628
|
-
var p =
|
|
5622
|
+
return this.error(b.EXPECT_ARGUMENT_STYLE, E(this.clonePosition(), this.clonePosition()));
|
|
5623
|
+
var p = E(f, this.clonePosition());
|
|
5629
5624
|
u = { style: c, styleLocation: p };
|
|
5630
5625
|
}
|
|
5631
5626
|
var d = this.tryParseArgumentClose(i);
|
|
5632
5627
|
if (d.err)
|
|
5633
5628
|
return d;
|
|
5634
|
-
var v =
|
|
5629
|
+
var v = E(i, this.clonePosition());
|
|
5635
5630
|
if (u && Cn(u?.style, "::", 0)) {
|
|
5636
5631
|
var S = Do(u.style.slice(2));
|
|
5637
5632
|
if (a === "number") {
|
|
5638
5633
|
var h = this.parseNumberSkeletonFromString(S, u.styleLocation);
|
|
5639
5634
|
return h.err ? h : {
|
|
5640
|
-
val: { type:
|
|
5635
|
+
val: { type: O.number, value: n, location: v, style: h.val },
|
|
5641
5636
|
err: null
|
|
5642
5637
|
};
|
|
5643
5638
|
} else {
|
|
5644
5639
|
if (S.length === 0)
|
|
5645
|
-
return this.error(
|
|
5640
|
+
return this.error(b.EXPECT_DATE_TIME_SKELETON, v);
|
|
5646
5641
|
var m = S;
|
|
5647
5642
|
this.locale && (m = So(S, this.locale));
|
|
5648
5643
|
var c = {
|
|
@@ -5650,16 +5645,16 @@ var Fo = (
|
|
|
5650
5645
|
pattern: m,
|
|
5651
5646
|
location: u.styleLocation,
|
|
5652
5647
|
parsedOptions: this.shouldParseSkeletons ? go(m) : {}
|
|
5653
|
-
},
|
|
5648
|
+
}, y = a === "date" ? O.date : O.time;
|
|
5654
5649
|
return {
|
|
5655
|
-
val: { type:
|
|
5650
|
+
val: { type: y, value: n, location: v, style: c },
|
|
5656
5651
|
err: null
|
|
5657
5652
|
};
|
|
5658
5653
|
}
|
|
5659
5654
|
}
|
|
5660
5655
|
return {
|
|
5661
5656
|
val: {
|
|
5662
|
-
type: a === "number" ?
|
|
5657
|
+
type: a === "number" ? O.number : a === "date" ? O.date : O.time,
|
|
5663
5658
|
value: n,
|
|
5664
5659
|
location: v,
|
|
5665
5660
|
style: (s = u?.style) !== null && s !== void 0 ? s : null
|
|
@@ -5670,16 +5665,16 @@ var Fo = (
|
|
|
5670
5665
|
case "plural":
|
|
5671
5666
|
case "selectordinal":
|
|
5672
5667
|
case "select": {
|
|
5673
|
-
var
|
|
5668
|
+
var N = this.clonePosition();
|
|
5674
5669
|
if (this.bumpSpace(), !this.bumpIf(","))
|
|
5675
|
-
return this.error(
|
|
5670
|
+
return this.error(b.EXPECT_SELECT_ARGUMENT_OPTIONS, E(N, Wt({}, N)));
|
|
5676
5671
|
this.bumpSpace();
|
|
5677
5672
|
var X = this.parseIdentifierIfPossible(), C = 0;
|
|
5678
5673
|
if (a !== "select" && X.value === "offset") {
|
|
5679
5674
|
if (!this.bumpIf(":"))
|
|
5680
|
-
return this.error(
|
|
5675
|
+
return this.error(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, E(this.clonePosition(), this.clonePosition()));
|
|
5681
5676
|
this.bumpSpace();
|
|
5682
|
-
var h = this.tryParseDecimalInteger(
|
|
5677
|
+
var h = this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, b.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
5683
5678
|
if (h.err)
|
|
5684
5679
|
return h;
|
|
5685
5680
|
this.bumpSpace(), X = this.parseIdentifierIfPossible(), C = h.val;
|
|
@@ -5690,10 +5685,10 @@ var Fo = (
|
|
|
5690
5685
|
var d = this.tryParseArgumentClose(i);
|
|
5691
5686
|
if (d.err)
|
|
5692
5687
|
return d;
|
|
5693
|
-
var de =
|
|
5688
|
+
var de = E(i, this.clonePosition());
|
|
5694
5689
|
return a === "select" ? {
|
|
5695
5690
|
val: {
|
|
5696
|
-
type:
|
|
5691
|
+
type: O.select,
|
|
5697
5692
|
value: n,
|
|
5698
5693
|
options: Mn(D.val),
|
|
5699
5694
|
location: de
|
|
@@ -5701,7 +5696,7 @@ var Fo = (
|
|
|
5701
5696
|
err: null
|
|
5702
5697
|
} : {
|
|
5703
5698
|
val: {
|
|
5704
|
-
type:
|
|
5699
|
+
type: O.plural,
|
|
5705
5700
|
value: n,
|
|
5706
5701
|
options: Mn(D.val),
|
|
5707
5702
|
offset: C,
|
|
@@ -5712,10 +5707,10 @@ var Fo = (
|
|
|
5712
5707
|
};
|
|
5713
5708
|
}
|
|
5714
5709
|
default:
|
|
5715
|
-
return this.error(
|
|
5710
|
+
return this.error(b.INVALID_ARGUMENT_TYPE, E(o, l));
|
|
5716
5711
|
}
|
|
5717
5712
|
}, e.prototype.tryParseArgumentClose = function(t) {
|
|
5718
|
-
return this.isEOF() || this.char() !== 125 ? this.error(
|
|
5713
|
+
return this.isEOF() || this.char() !== 125 ? this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE, E(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
|
|
5719
5714
|
}, e.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
5720
5715
|
for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
|
|
5721
5716
|
var n = this.char();
|
|
@@ -5724,7 +5719,7 @@ var Fo = (
|
|
|
5724
5719
|
this.bump();
|
|
5725
5720
|
var i = this.clonePosition();
|
|
5726
5721
|
if (!this.bumpUntil("'"))
|
|
5727
|
-
return this.error(
|
|
5722
|
+
return this.error(b.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, E(i, this.clonePosition()));
|
|
5728
5723
|
this.bump();
|
|
5729
5724
|
break;
|
|
5730
5725
|
}
|
|
@@ -5754,9 +5749,9 @@ var Fo = (
|
|
|
5754
5749
|
}, e.prototype.parseNumberSkeletonFromString = function(t, r) {
|
|
5755
5750
|
var n = [];
|
|
5756
5751
|
try {
|
|
5757
|
-
n =
|
|
5752
|
+
n = yo(t);
|
|
5758
5753
|
} catch {
|
|
5759
|
-
return this.error(
|
|
5754
|
+
return this.error(b.INVALID_NUMBER_SKELETON, r);
|
|
5760
5755
|
}
|
|
5761
5756
|
return {
|
|
5762
5757
|
val: {
|
|
@@ -5772,19 +5767,19 @@ var Fo = (
|
|
|
5772
5767
|
if (u.length === 0) {
|
|
5773
5768
|
var h = this.clonePosition();
|
|
5774
5769
|
if (r !== "select" && this.bumpIf("=")) {
|
|
5775
|
-
var c = this.tryParseDecimalInteger(
|
|
5770
|
+
var c = this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_SELECTOR, b.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
5776
5771
|
if (c.err)
|
|
5777
5772
|
return c;
|
|
5778
|
-
f =
|
|
5773
|
+
f = E(h, this.clonePosition()), u = this.message.slice(h.offset, this.offset());
|
|
5779
5774
|
} else
|
|
5780
5775
|
break;
|
|
5781
5776
|
}
|
|
5782
5777
|
if (l.has(u))
|
|
5783
|
-
return this.error(r === "select" ?
|
|
5778
|
+
return this.error(r === "select" ? b.DUPLICATE_SELECT_ARGUMENT_SELECTOR : b.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f);
|
|
5784
5779
|
u === "other" && (o = !0), this.bumpSpace();
|
|
5785
5780
|
var p = this.clonePosition();
|
|
5786
5781
|
if (!this.bumpIf("{"))
|
|
5787
|
-
return this.error(r === "select" ?
|
|
5782
|
+
return this.error(r === "select" ? b.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : b.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, E(this.clonePosition(), this.clonePosition()));
|
|
5788
5783
|
var d = this.parseMessage(t + 1, r, n);
|
|
5789
5784
|
if (d.err)
|
|
5790
5785
|
return d;
|
|
@@ -5795,11 +5790,11 @@ var Fo = (
|
|
|
5795
5790
|
u,
|
|
5796
5791
|
{
|
|
5797
5792
|
value: d.val,
|
|
5798
|
-
location:
|
|
5793
|
+
location: E(p, this.clonePosition())
|
|
5799
5794
|
}
|
|
5800
5795
|
]), l.add(u), this.bumpSpace(), s = this.parseIdentifierIfPossible(), u = s.value, f = s.location;
|
|
5801
5796
|
}
|
|
5802
|
-
return a.length === 0 ? this.error(r === "select" ?
|
|
5797
|
+
return a.length === 0 ? this.error(r === "select" ? b.EXPECT_SELECT_ARGUMENT_SELECTOR : b.EXPECT_PLURAL_ARGUMENT_SELECTOR, E(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(b.MISSING_OTHER_CLAUSE, E(this.clonePosition(), this.clonePosition())) : { val: a, err: null };
|
|
5803
5798
|
}, e.prototype.tryParseDecimalInteger = function(t, r) {
|
|
5804
5799
|
var n = 1, i = this.clonePosition();
|
|
5805
5800
|
this.bumpIf("+") || this.bumpIf("-") && (n = -1);
|
|
@@ -5810,7 +5805,7 @@ var Fo = (
|
|
|
5810
5805
|
else
|
|
5811
5806
|
break;
|
|
5812
5807
|
}
|
|
5813
|
-
var l =
|
|
5808
|
+
var l = E(i, this.clonePosition());
|
|
5814
5809
|
return s ? (o *= n, Ro(o) ? { val: o, err: null } : this.error(r, l)) : this.error(t, l);
|
|
5815
5810
|
}, e.prototype.offset = function() {
|
|
5816
5811
|
return this.position.offset;
|
|
@@ -5904,7 +5899,7 @@ function Vo(e, t) {
|
|
|
5904
5899
|
t === void 0 && (t = {}), t = Wt({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
5905
5900
|
var r = new Fo(e, t).parse();
|
|
5906
5901
|
if (r.err) {
|
|
5907
|
-
var n = SyntaxError(
|
|
5902
|
+
var n = SyntaxError(b[r.err.kind]);
|
|
5908
5903
|
throw n.location = r.err.location, n.originalMessage = r.err.message, n;
|
|
5909
5904
|
}
|
|
5910
5905
|
return t?.captureLocation || jr(r.val), r.val;
|
|
@@ -6028,10 +6023,10 @@ function Ut(e, t, r, n, i, s, o) {
|
|
|
6028
6023
|
var d = f.children, v = f.value, S = i[v];
|
|
6029
6024
|
if (!Wo(S))
|
|
6030
6025
|
throw new qo(v, "function", o);
|
|
6031
|
-
var m = Ut(d, t, r, n, i, s),
|
|
6026
|
+
var m = Ut(d, t, r, n, i, s), y = S(m.map(function(C) {
|
|
6032
6027
|
return C.value;
|
|
6033
6028
|
}));
|
|
6034
|
-
Array.isArray(
|
|
6029
|
+
Array.isArray(y) || (y = [y]), a.push.apply(a, y.map(function(C) {
|
|
6035
6030
|
return {
|
|
6036
6031
|
type: typeof C == "string" ? F.literal : F.object,
|
|
6037
6032
|
value: C
|
|
@@ -6039,25 +6034,25 @@ function Ut(e, t, r, n, i, s, o) {
|
|
|
6039
6034
|
}));
|
|
6040
6035
|
}
|
|
6041
6036
|
if (zi(f)) {
|
|
6042
|
-
var
|
|
6043
|
-
if (!
|
|
6037
|
+
var N = f.options[c] || f.options.other;
|
|
6038
|
+
if (!N)
|
|
6044
6039
|
throw new Rn(f.value, c, Object.keys(f.options), o);
|
|
6045
|
-
a.push.apply(a, Ut(
|
|
6040
|
+
a.push.apply(a, Ut(N.value, t, r, n, i));
|
|
6046
6041
|
continue;
|
|
6047
6042
|
}
|
|
6048
6043
|
if (Wi(f)) {
|
|
6049
|
-
var
|
|
6050
|
-
if (!
|
|
6044
|
+
var N = f.options["=".concat(c)];
|
|
6045
|
+
if (!N) {
|
|
6051
6046
|
if (!Intl.PluralRules)
|
|
6052
6047
|
throw new ur(`Intl.PluralRules is not available in this environment.
|
|
6053
6048
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
6054
6049
|
`, rt.MISSING_INTL_API, o);
|
|
6055
6050
|
var X = r.getPluralRules(t, { type: f.pluralType }).select(c - (f.offset || 0));
|
|
6056
|
-
|
|
6051
|
+
N = f.options[X] || f.options.other;
|
|
6057
6052
|
}
|
|
6058
|
-
if (!
|
|
6053
|
+
if (!N)
|
|
6059
6054
|
throw new Rn(f.value, c, Object.keys(f.options), o);
|
|
6060
|
-
a.push.apply(a, Ut(
|
|
6055
|
+
a.push.apply(a, Ut(N.value, t, r, n, i, c - (f.offset || 0)));
|
|
6061
6056
|
continue;
|
|
6062
6057
|
}
|
|
6063
6058
|
}
|
|
@@ -6093,26 +6088,26 @@ function Qo(e) {
|
|
|
6093
6088
|
dateTime: {},
|
|
6094
6089
|
pluralRules: {}
|
|
6095
6090
|
}), {
|
|
6096
|
-
getNumberFormat:
|
|
6091
|
+
getNumberFormat: Er(function() {
|
|
6097
6092
|
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
6098
6093
|
r[n] = arguments[n];
|
|
6099
|
-
return new ((t = Intl.NumberFormat).bind.apply(t,
|
|
6094
|
+
return new ((t = Intl.NumberFormat).bind.apply(t, yr([void 0], r, !1)))();
|
|
6100
6095
|
}, {
|
|
6101
6096
|
cache: Tr(e.number),
|
|
6102
6097
|
strategy: xr.variadic
|
|
6103
6098
|
}),
|
|
6104
|
-
getDateTimeFormat:
|
|
6099
|
+
getDateTimeFormat: Er(function() {
|
|
6105
6100
|
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
6106
6101
|
r[n] = arguments[n];
|
|
6107
|
-
return new ((t = Intl.DateTimeFormat).bind.apply(t,
|
|
6102
|
+
return new ((t = Intl.DateTimeFormat).bind.apply(t, yr([void 0], r, !1)))();
|
|
6108
6103
|
}, {
|
|
6109
6104
|
cache: Tr(e.dateTime),
|
|
6110
6105
|
strategy: xr.variadic
|
|
6111
6106
|
}),
|
|
6112
|
-
getPluralRules:
|
|
6107
|
+
getPluralRules: Er(function() {
|
|
6113
6108
|
for (var t, r = [], n = 0; n < arguments.length; n++)
|
|
6114
6109
|
r[n] = arguments[n];
|
|
6115
|
-
return new ((t = Intl.PluralRules).bind.apply(t,
|
|
6110
|
+
return new ((t = Intl.PluralRules).bind.apply(t, yr([void 0], r, !1)))();
|
|
6116
6111
|
}, {
|
|
6117
6112
|
cache: Tr(e.pluralRules),
|
|
6118
6113
|
strategy: xr.variadic
|
|
@@ -6452,14 +6447,14 @@ const wt = (e, t) => {
|
|
|
6452
6447
|
throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
|
|
6453
6448
|
return n && (i = wt("number", n)), new Intl.NumberFormat(r, i);
|
|
6454
6449
|
}
|
|
6455
|
-
),
|
|
6450
|
+
), yu = fr(
|
|
6456
6451
|
(e) => {
|
|
6457
6452
|
var t = e, { locale: r, format: n } = t, i = at(t, ["locale", "format"]);
|
|
6458
6453
|
if (r == null)
|
|
6459
6454
|
throw new Error('[svelte-i18n] A "locale" must be set to format dates');
|
|
6460
6455
|
return n ? i = wt("date", n) : Object.keys(i).length === 0 && (i = wt("date", "short")), new Intl.DateTimeFormat(r, i);
|
|
6461
6456
|
}
|
|
6462
|
-
),
|
|
6457
|
+
), Eu = fr(
|
|
6463
6458
|
(e) => {
|
|
6464
6459
|
var t = e, { locale: r, format: n } = t, i = at(t, ["locale", "format"]);
|
|
6465
6460
|
if (r == null)
|
|
@@ -6481,14 +6476,14 @@ const wt = (e, t) => {
|
|
|
6481
6476
|
} = t, n = at(t, [
|
|
6482
6477
|
"locale"
|
|
6483
6478
|
]);
|
|
6484
|
-
return
|
|
6479
|
+
return yu(cn({ locale: r }, n));
|
|
6485
6480
|
}, Tu = (e = {}) => {
|
|
6486
6481
|
var t = e, {
|
|
6487
6482
|
locale: r = Ge()
|
|
6488
6483
|
} = t, n = at(t, [
|
|
6489
6484
|
"locale"
|
|
6490
6485
|
]);
|
|
6491
|
-
return
|
|
6486
|
+
return Eu(cn({ locale: r }, n));
|
|
6492
6487
|
}, Su = fr(
|
|
6493
6488
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
6494
6489
|
(e, t = Ge()) => new Jo(e, t, nt().formats, {
|
|
@@ -6673,24 +6668,24 @@ function Xu(e, t) {
|
|
|
6673
6668
|
}
|
|
6674
6669
|
}, v = Vu();
|
|
6675
6670
|
let S;
|
|
6676
|
-
var m = $t(v),
|
|
6677
|
-
let
|
|
6678
|
-
var X = ut(
|
|
6671
|
+
var m = $t(v), y = $t(m);
|
|
6672
|
+
let N;
|
|
6673
|
+
var X = ut(y, 2), C = Bt(X, !0);
|
|
6679
6674
|
Lt(m);
|
|
6680
6675
|
var D = ut(m, 2);
|
|
6681
6676
|
{
|
|
6682
6677
|
var de = (P) => {
|
|
6683
|
-
var
|
|
6678
|
+
var Ee = ju(), Y = $t(Ee);
|
|
6684
6679
|
{
|
|
6685
6680
|
var hr = (Be) => {
|
|
6686
6681
|
var ot = Gu(), Ot = Bt(ot, !0);
|
|
6687
6682
|
vr(() => Pt(Ot, A(p).date)), pt(Be, ot);
|
|
6688
6683
|
};
|
|
6689
|
-
gr(
|
|
6684
|
+
gr(Y, (Be) => {
|
|
6690
6685
|
A(p).date && Be(hr);
|
|
6691
6686
|
});
|
|
6692
6687
|
}
|
|
6693
|
-
var cr = ut(
|
|
6688
|
+
var cr = ut(Y, 2);
|
|
6694
6689
|
{
|
|
6695
6690
|
var cs = (Be) => {
|
|
6696
6691
|
var ot = ku(), Ot = aa(ot), ds = Bt(Ot, !0), dn = ut(Ot, 2);
|
|
@@ -6707,7 +6702,7 @@ function Xu(e, t) {
|
|
|
6707
6702
|
A(p).countdown && Be(cs);
|
|
6708
6703
|
});
|
|
6709
6704
|
}
|
|
6710
|
-
Lt(
|
|
6705
|
+
Lt(Ee), pt(P, Ee);
|
|
6711
6706
|
};
|
|
6712
6707
|
gr(D, (P) => {
|
|
6713
6708
|
(A(p).date || A(p).countdown) && P(de);
|
|
@@ -6715,7 +6710,7 @@ function Xu(e, t) {
|
|
|
6715
6710
|
}
|
|
6716
6711
|
Lt(v), vr(
|
|
6717
6712
|
(P) => {
|
|
6718
|
-
S = Sn(v, 1, "tournament-badge svelte-1gqjw6m", null, S, { "tournament-badge--large": f() === "large" }), An(v, "data-status", A(c)), An(m, "data-status", A(c)),
|
|
6713
|
+
S = Sn(v, 1, "tournament-badge svelte-1gqjw6m", null, S, { "tournament-badge--large": f() === "large" }), An(v, "data-status", A(c)), An(m, "data-status", A(c)), N = Sn(y, 1, "dot dot-status svelte-1gqjw6m", null, N, {
|
|
6719
6714
|
new: A(c) === "new",
|
|
6720
6715
|
scheduled: A(c) === "scheduled",
|
|
6721
6716
|
ongoing: A(c) === "ongoing",
|