@tempots/dom 21.0.0 → 22.0.0
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/index.cjs +1 -1
- package/index.d.ts +1 -1
- package/index.js +439 -437
- package/package.json +1 -1
- package/renderable/conjunction.d.ts +1 -1
- package/renderable/foreach.d.ts +2 -2
- package/renderable/repeat.d.ts +2 -3
- package/std/{position.d.ts → element-position.d.ts} +25 -22
- package/std/value.d.ts +7 -0
package/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var Re = Object.defineProperty;
|
|
2
|
+
var ee = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var Me = (t, e, r) => e in t ? Re(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var u = (t, e, r) => Me(t, typeof e != "symbol" ? e + "" : e, r), te = (t, e, r) => e.has(t) || ee("Cannot " + r);
|
|
7
|
+
var D = (t, e, r) => (te(t, e, "read from private field"), r ? r.call(t) : e.get(t)), re = (t, e, r) => e.has(t) ? ee("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), J = (t, e, r, s) => (te(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
8
|
+
const $e = (t, e, r) => t + (e - t) * r;
|
|
9
|
+
const Fe = (t, e, r) => {
|
|
6
10
|
const s = Math.max(t.length, e.length);
|
|
7
11
|
let n = "";
|
|
8
12
|
for (let o = 0; o < s; o++) {
|
|
@@ -12,51 +16,49 @@ const ke = (t, e, r) => {
|
|
|
12
16
|
isNaN(l) && (l = 97), n += String.fromCharCode(i + (l - i) * r);
|
|
13
17
|
}
|
|
14
18
|
return n;
|
|
15
|
-
},
|
|
16
|
-
|
|
19
|
+
}, Ve = (t, e, r) => new Date(t.getTime() + (e.getTime() - t.getTime()) * r), qe = (t, e) => e, Ie = (t) => typeof t == "number" ? $e : typeof t == "string" ? Fe : t instanceof Date ? Ve : qe;
|
|
20
|
+
var y;
|
|
21
|
+
class T {
|
|
17
22
|
/**
|
|
18
23
|
* Creates a new instance of `ElementPosition`.
|
|
19
24
|
* @param index - The index of the element.
|
|
20
25
|
* @param total - The total number of elements in the collection.
|
|
21
26
|
*/
|
|
22
27
|
constructor(e, r) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The counter of the element starting from 1.
|
|
30
|
+
*/
|
|
31
|
+
u(this, "counter");
|
|
32
|
+
/**
|
|
33
|
+
* Checks if the element is the first element in the collection.
|
|
34
|
+
* @returns `true` if the element is the first element, `false` otherwise.
|
|
35
|
+
*/
|
|
36
|
+
u(this, "isFirst");
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the counter of the element is even.
|
|
39
|
+
* @returns `true` if the counter is even, `false` otherwise.
|
|
40
|
+
*/
|
|
41
|
+
u(this, "isEven");
|
|
42
|
+
/**
|
|
43
|
+
* Checks if the counter of the element is odd.
|
|
44
|
+
* @returns `true` if the counter is odd, `false` otherwise.
|
|
45
|
+
*/
|
|
46
|
+
u(this, "isOdd");
|
|
47
|
+
re(this, y);
|
|
48
|
+
u(this, "dispose", () => {
|
|
49
|
+
D(this, y) != null && (D(this, y).dispose(), J(this, y, void 0));
|
|
50
|
+
});
|
|
51
|
+
this.index = e, this.total = r, this.counter = e + 1, this.isFirst = e === 0, this.isEven = e % 2 === 1, this.isOdd = e % 2 === 0;
|
|
37
52
|
}
|
|
38
53
|
/**
|
|
39
54
|
* Checks if the element is the last element in the collection.
|
|
40
55
|
* @returns `true` if the element is the last element, `false` otherwise.
|
|
41
56
|
*/
|
|
42
57
|
get isLast() {
|
|
43
|
-
return this
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Checks if the counter of the element is even.
|
|
47
|
-
* @returns `true` if the counter is even, `false` otherwise.
|
|
48
|
-
*/
|
|
49
|
-
get isEven() {
|
|
50
|
-
return this.index % 2 === 1;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Checks if the counter of the element is odd.
|
|
54
|
-
* @returns `true` if the counter is odd, `false` otherwise.
|
|
55
|
-
*/
|
|
56
|
-
get isOdd() {
|
|
57
|
-
return this.index % 2 === 0;
|
|
58
|
+
return D(this, y) == null && J(this, y, this.total.map((e) => this.counter === e)), D(this, y);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
61
|
+
y = new WeakMap();
|
|
60
62
|
const C = class C {
|
|
61
63
|
/**
|
|
62
64
|
* Represents a signal with a value of type T.
|
|
@@ -241,21 +243,21 @@ const C = class C {
|
|
|
241
243
|
* @returns A property that holds the mapped value and can be observed for changes.
|
|
242
244
|
*/
|
|
243
245
|
u(this, "mapAsync", (e, r, s, n = (o, i) => o === i) => {
|
|
244
|
-
const o =
|
|
246
|
+
const o = V(r, n);
|
|
245
247
|
let i = 0, l = new AbortController();
|
|
246
248
|
return o.onDispose(
|
|
247
249
|
this.on(async (a) => {
|
|
248
|
-
const
|
|
250
|
+
const f = ++i;
|
|
249
251
|
l.abort(), l = new AbortController();
|
|
250
252
|
try {
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
} catch (
|
|
254
|
-
if (
|
|
253
|
+
const g = await e(a, { abortSignal: l.signal });
|
|
254
|
+
f === i && o.set(g);
|
|
255
|
+
} catch (g) {
|
|
256
|
+
if (f === i)
|
|
255
257
|
if (s != null)
|
|
256
|
-
o.set(s(
|
|
258
|
+
o.set(s(g));
|
|
257
259
|
else
|
|
258
|
-
throw
|
|
260
|
+
throw g;
|
|
259
261
|
}
|
|
260
262
|
})
|
|
261
263
|
), o;
|
|
@@ -286,7 +288,7 @@ const C = class C {
|
|
|
286
288
|
* @param autoDisposeProp - Determines whether the derived property should be automatically disposed.
|
|
287
289
|
* @returns The derived property.
|
|
288
290
|
*/
|
|
289
|
-
u(this, "deriveProp", (e = !0) => this.feedProp(
|
|
291
|
+
u(this, "deriveProp", (e = !0) => this.feedProp(V(this.get()), e));
|
|
290
292
|
/**
|
|
291
293
|
* Returns a signal that emits the count of values received so far.
|
|
292
294
|
* @returns A signal that emits the count of values received so far.
|
|
@@ -357,7 +359,7 @@ u(C, "is", (e) => (
|
|
|
357
359
|
e != null && e.$__signal__ === !0
|
|
358
360
|
));
|
|
359
361
|
let h = C;
|
|
360
|
-
const
|
|
362
|
+
const Be = typeof queueMicrotask == "function" ? queueMicrotask : (t) => Promise.resolve().then(t);
|
|
361
363
|
class E extends h {
|
|
362
364
|
/**
|
|
363
365
|
* Represents a Signal object.
|
|
@@ -393,7 +395,7 @@ class E extends h {
|
|
|
393
395
|
*/
|
|
394
396
|
u(this, "_scheduleNotify", () => {
|
|
395
397
|
const r = ++this._scheduleCount;
|
|
396
|
-
|
|
398
|
+
Be(() => {
|
|
397
399
|
this._scheduleCount !== r || this._disposed !== !1 || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn(), !1));
|
|
398
400
|
});
|
|
399
401
|
});
|
|
@@ -503,10 +505,10 @@ u(q, "is", (r) => (
|
|
|
503
505
|
r != null && r.$__prop__ === !0
|
|
504
506
|
));
|
|
505
507
|
let F = q;
|
|
506
|
-
const
|
|
508
|
+
const z = (t, e, r = (s, n) => s === n) => {
|
|
507
509
|
const s = new E(t, r);
|
|
508
510
|
return e.forEach((n) => n.setDerivative(s)), s;
|
|
509
|
-
},
|
|
511
|
+
}, je = (t, e) => z(t, e).dispose, V = (t, e = (r, s) => r === s) => new F(t, e), I = (t, e = (r, s) => r === s) => new h(t, e), d = {
|
|
510
512
|
/**
|
|
511
513
|
* Maps a value or a Signal to a new value.
|
|
512
514
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -538,7 +540,7 @@ const J = (t, e, r = (s, n) => s === n) => {
|
|
|
538
540
|
*/
|
|
539
541
|
maybeToSignal: (t, e) => {
|
|
540
542
|
if (t != null)
|
|
541
|
-
return
|
|
543
|
+
return d.toSignal(t, e);
|
|
542
544
|
},
|
|
543
545
|
/**
|
|
544
546
|
* Gets the value from a `Signal` or the value itself if it is not a `Signal`.
|
|
@@ -553,19 +555,28 @@ const J = (t, e, r = (s, n) => s === n) => {
|
|
|
553
555
|
* @returns A function to remove the listener.
|
|
554
556
|
*/
|
|
555
557
|
on: (t, e) => h.is(t) ? t.on(e) : (e(t), () => {
|
|
556
|
-
})
|
|
557
|
-
|
|
558
|
+
}),
|
|
559
|
+
/**
|
|
560
|
+
* Disposes of a value or a Signal.
|
|
561
|
+
* If the value is a Signal, it disposes of the Signal.
|
|
562
|
+
* If the value is not a Signal, it does nothing.
|
|
563
|
+
* @param value - The value or Signal instance to dispose of.
|
|
564
|
+
*/
|
|
565
|
+
dispose: (t) => {
|
|
566
|
+
h.is(t) && t.dispose();
|
|
567
|
+
}
|
|
568
|
+
}, At = (...t) => (e, r) => {
|
|
558
569
|
const s = t.filter((n) => h.is(n));
|
|
559
|
-
return
|
|
560
|
-
() => e(...t.map((n) =>
|
|
570
|
+
return z(
|
|
571
|
+
() => e(...t.map((n) => d.get(n))),
|
|
561
572
|
s,
|
|
562
573
|
r
|
|
563
574
|
);
|
|
564
|
-
},
|
|
575
|
+
}, Et = (...t) => (e) => {
|
|
565
576
|
const r = t.filter((s) => h.is(s));
|
|
566
|
-
|
|
577
|
+
je(() => e(...t.map(d.get)), r);
|
|
567
578
|
};
|
|
568
|
-
class
|
|
579
|
+
class ne {
|
|
569
580
|
constructor() {
|
|
570
581
|
u(this, "_store", /* @__PURE__ */ new Map());
|
|
571
582
|
/**
|
|
@@ -584,7 +595,7 @@ class K {
|
|
|
584
595
|
});
|
|
585
596
|
}
|
|
586
597
|
}
|
|
587
|
-
const
|
|
598
|
+
const oe = ({
|
|
588
599
|
key: t,
|
|
589
600
|
defaultValue: e,
|
|
590
601
|
store: r,
|
|
@@ -597,57 +608,57 @@ const x = ({
|
|
|
597
608
|
l != null ? i(n(l)) : typeof e == "function" ? e() : e,
|
|
598
609
|
o
|
|
599
610
|
);
|
|
600
|
-
return a.on((
|
|
601
|
-
r.setItem(t, s(
|
|
611
|
+
return a.on((f) => {
|
|
612
|
+
r.setItem(t, s(f));
|
|
602
613
|
}), a;
|
|
603
|
-
},
|
|
614
|
+
}, Pt = (t) => oe({
|
|
604
615
|
...t,
|
|
605
|
-
store: (window == null ? void 0 : window.localStorage) ?? new
|
|
606
|
-
}),
|
|
616
|
+
store: (window == null ? void 0 : window.localStorage) ?? new ne()
|
|
617
|
+
}), Dt = (t) => oe({
|
|
607
618
|
...t,
|
|
608
|
-
store: (window == null ? void 0 : window.sessionStorage) ?? new
|
|
619
|
+
store: (window == null ? void 0 : window.sessionStorage) ?? new ne()
|
|
609
620
|
});
|
|
610
|
-
function
|
|
621
|
+
function se(t) {
|
|
611
622
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 0);
|
|
612
623
|
}
|
|
613
|
-
const
|
|
614
|
-
const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((
|
|
615
|
-
let l = s == null ? void 0 : s.interpolate, a = t,
|
|
616
|
-
const
|
|
624
|
+
const Ue = (t, e, r, s) => {
|
|
625
|
+
const n = (s == null ? void 0 : s.duration) ?? 300, o = (s == null ? void 0 : s.easing) ?? ((_) => _), i = (s == null ? void 0 : s.equals) ?? ((_, R) => _ === R);
|
|
626
|
+
let l = s == null ? void 0 : s.interpolate, a = t, f = e(), g = performance.now(), w = null, U = !0;
|
|
627
|
+
const G = new E(e, i), A = V(t, i);
|
|
617
628
|
A.onDispose(() => {
|
|
618
|
-
|
|
619
|
-
}), A.onDispose(
|
|
620
|
-
|
|
629
|
+
w !== null && cancelAnimationFrame(w);
|
|
630
|
+
}), A.onDispose(G.dispose), r.forEach((_) => {
|
|
631
|
+
_.setDerivative(G), _.onDispose(A.dispose);
|
|
621
632
|
});
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
const R = (performance.now() -
|
|
626
|
-
l == null && (l =
|
|
627
|
-
let
|
|
628
|
-
R >= 1 ? (
|
|
633
|
+
const Le = (_) => {
|
|
634
|
+
f = _, g = performance.now(), a = A.value, U && (U = !1, w = se(K));
|
|
635
|
+
}, K = () => {
|
|
636
|
+
const R = (performance.now() - g) / d.get(n), Ne = o(R);
|
|
637
|
+
l == null && (l = Ie(a));
|
|
638
|
+
let x = l(a, f, Ne);
|
|
639
|
+
R >= 1 ? (U = !0, x = f) : w = se(K), A.set(x);
|
|
629
640
|
};
|
|
630
|
-
return
|
|
631
|
-
},
|
|
641
|
+
return G.on(Le), A;
|
|
642
|
+
}, bt = (t, e) => {
|
|
632
643
|
const { initialValue: r, ...s } = e ?? {};
|
|
633
|
-
return
|
|
644
|
+
return Ue(
|
|
634
645
|
r ?? t.get(),
|
|
635
646
|
t.get,
|
|
636
647
|
[t],
|
|
637
648
|
s
|
|
638
649
|
);
|
|
639
|
-
},
|
|
650
|
+
}, Tt = (t, e) => {
|
|
640
651
|
const { signals: r, literals: s } = Object.entries(t).reduce(
|
|
641
652
|
({ signals: o, literals: i }, [l, a]) => (h.is(a) ? o.push([l, a]) : i[l] = a, { signals: o, literals: i }),
|
|
642
653
|
{ signals: [], literals: {} }
|
|
643
654
|
), n = r.map(([, o]) => o);
|
|
644
|
-
return
|
|
645
|
-
},
|
|
655
|
+
return z(() => (r.forEach(([o, i]) => s[o] = i.value), e(s)), n);
|
|
656
|
+
}, ie = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), le = /* @__PURE__ */ new Set([
|
|
646
657
|
"rowSpan",
|
|
647
658
|
"colSpan",
|
|
648
659
|
"tabIndex",
|
|
649
660
|
"valueAsNumber"
|
|
650
|
-
]),
|
|
661
|
+
]), ue = /* @__PURE__ */ new Set(["valueAsDate"]), ae = /* @__PURE__ */ new Set([
|
|
651
662
|
"value",
|
|
652
663
|
"textContent",
|
|
653
664
|
"innerText",
|
|
@@ -655,25 +666,25 @@ const qe = (t, e, r, s) => {
|
|
|
655
666
|
"outerHTML",
|
|
656
667
|
"className",
|
|
657
668
|
"classList"
|
|
658
|
-
]),
|
|
659
|
-
if (
|
|
660
|
-
return
|
|
669
|
+
]), H = /* @__PURE__ */ new Map(), b = (t, e) => {
|
|
670
|
+
if (H.has(t))
|
|
671
|
+
return H.get(t);
|
|
661
672
|
{
|
|
662
673
|
const r = e(t);
|
|
663
|
-
return
|
|
674
|
+
return H.set(t, r), r;
|
|
664
675
|
}
|
|
665
|
-
},
|
|
676
|
+
}, Ge = (t) => (e, r) => {
|
|
666
677
|
r == null ? e[t] = null : e[t] = !!r;
|
|
667
|
-
},
|
|
678
|
+
}, Je = (t) => (e, r) => {
|
|
668
679
|
r == null ? e[t] = null : e[t] = Number(r);
|
|
669
|
-
},
|
|
680
|
+
}, He = (t) => (e, r) => {
|
|
670
681
|
r == null ? e[t] = null : e[t] = r;
|
|
671
|
-
},
|
|
682
|
+
}, We = (t) => (e, r) => {
|
|
672
683
|
r == null ? e[t] = null : e[t] = String(r);
|
|
673
|
-
},
|
|
684
|
+
}, Xe = (t) => (e, r) => {
|
|
674
685
|
r == null ? e.removeAttribute(t) : e.setAttribute(t, r);
|
|
675
|
-
},
|
|
676
|
-
class
|
|
686
|
+
}, ce = (t) => ie.has(t) ? b(t, Ge) : le.has(t) ? b(t, Je) : ue.has(t) ? b(t, He) : ae.has(t) ? b(t, We) : b(t, Xe), fe = (t) => (e) => ie.has(t) ? !!e[t] : le.has(t) ? Number(e[t]) : ue.has(t) ? e[t] : ae.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
687
|
+
class v {
|
|
677
688
|
/**
|
|
678
689
|
* Constructs a new `DOMContext` instance.
|
|
679
690
|
*
|
|
@@ -721,18 +732,18 @@ class S {
|
|
|
721
732
|
* @param document - The `Document` to use for the `DOMContext`.
|
|
722
733
|
* @returns A new `DOMContext` instance.
|
|
723
734
|
*/
|
|
724
|
-
u(this, "withDocument", (e) => new
|
|
735
|
+
u(this, "withDocument", (e) => new v(e, this.element, this.reference, this.providers, !0));
|
|
725
736
|
/**
|
|
726
737
|
* Creates a new `DOMContext` instance with the provided `element`.
|
|
727
738
|
* @param element - The DOM element to use in the new `DOMContext` instance.
|
|
728
739
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
729
740
|
*/
|
|
730
|
-
u(this, "withElement", (e) => new
|
|
741
|
+
u(this, "withElement", (e) => new v(this.document, e, void 0, this.providers, !1));
|
|
731
742
|
/**
|
|
732
743
|
* Creates a new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
733
744
|
* @returns A new `DOMContext` instance with the `isFirstLevel` property set to `true`.
|
|
734
745
|
*/
|
|
735
|
-
u(this, "withFirstLevel", () => new
|
|
746
|
+
u(this, "withFirstLevel", () => new v(
|
|
736
747
|
this.document,
|
|
737
748
|
this.element,
|
|
738
749
|
this.reference,
|
|
@@ -745,7 +756,7 @@ class S {
|
|
|
745
756
|
* @param reference - The optional `Text` node to use as the reference for the new `DOMContext`.
|
|
746
757
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
747
758
|
*/
|
|
748
|
-
u(this, "withReference", (e) => new
|
|
759
|
+
u(this, "withReference", (e) => new v(
|
|
749
760
|
this.document,
|
|
750
761
|
this.element,
|
|
751
762
|
e,
|
|
@@ -758,7 +769,7 @@ class S {
|
|
|
758
769
|
* @param value - The value to set for the provider.
|
|
759
770
|
* @returns A new DOMContext with the updated providers.
|
|
760
771
|
*/
|
|
761
|
-
u(this, "withProvider", (e, r) => new
|
|
772
|
+
u(this, "withProvider", (e, r) => new v(
|
|
762
773
|
this.document,
|
|
763
774
|
this.element,
|
|
764
775
|
this.reference,
|
|
@@ -775,7 +786,7 @@ class S {
|
|
|
775
786
|
* @param providers - An object containing the providers to be merged into the existing providers.
|
|
776
787
|
* @returns A new DOMContext instance with the merged providers.
|
|
777
788
|
*/
|
|
778
|
-
u(this, "withProviders", (e) => new
|
|
789
|
+
u(this, "withProviders", (e) => new v(
|
|
779
790
|
this.document,
|
|
780
791
|
this.element,
|
|
781
792
|
this.reference,
|
|
@@ -794,7 +805,7 @@ class S {
|
|
|
794
805
|
*/
|
|
795
806
|
u(this, "getProvider", (e) => {
|
|
796
807
|
if (this.providers[e] === void 0)
|
|
797
|
-
throw new
|
|
808
|
+
throw new ze(e);
|
|
798
809
|
return this.providers[e];
|
|
799
810
|
});
|
|
800
811
|
this.document = e, this.element = r, this.reference = s, this.providers = n, this.isFirstLevel = o;
|
|
@@ -807,41 +818,41 @@ class S {
|
|
|
807
818
|
* @returns A new `DOMContext` instance.
|
|
808
819
|
*/
|
|
809
820
|
static of(e, r) {
|
|
810
|
-
return new
|
|
821
|
+
return new v(e.ownerDocument, e, r, {}, !0);
|
|
811
822
|
}
|
|
812
823
|
}
|
|
813
|
-
class
|
|
824
|
+
class ze extends Error {
|
|
814
825
|
constructor(e) {
|
|
815
826
|
super(`Provider not found: ${e.description}`);
|
|
816
827
|
}
|
|
817
828
|
}
|
|
818
|
-
const
|
|
829
|
+
const m = (t) => {
|
|
819
830
|
const e = t;
|
|
820
831
|
e && e.onblur && (e.onblur = null), !(!t || t.ownerDocument === void 0) && t.parentElement && t.parentElement.removeChild(t);
|
|
821
|
-
},
|
|
822
|
-
|
|
832
|
+
}, Qe = (t) => he(t) ? t : t.parentElement, he = (t) => t.nodeType === 1, de = (t) => (e) => {
|
|
833
|
+
we(e);
|
|
823
834
|
const r = e.createText(t);
|
|
824
835
|
return e.appendOrInsert(r), (s) => {
|
|
825
|
-
s &&
|
|
836
|
+
s && m(r);
|
|
826
837
|
};
|
|
827
|
-
},
|
|
828
|
-
|
|
838
|
+
}, pe = (t) => (e) => {
|
|
839
|
+
we(e);
|
|
829
840
|
const r = e.createText(t.value);
|
|
830
841
|
e.appendOrInsert(r);
|
|
831
842
|
const s = t.on((n) => r.data = n);
|
|
832
843
|
return (n) => {
|
|
833
|
-
s(), n &&
|
|
844
|
+
s(), n && m(r);
|
|
834
845
|
};
|
|
835
|
-
},
|
|
836
|
-
const r = t.map((s) =>
|
|
846
|
+
}, Ot = (t) => h.is(t) ? pe(t) : de(t), p = (...t) => (e) => {
|
|
847
|
+
const r = t.map((s) => c(s)(e));
|
|
837
848
|
return (s) => {
|
|
838
849
|
r.forEach((n) => n(s));
|
|
839
850
|
};
|
|
840
|
-
},
|
|
841
|
-
},
|
|
851
|
+
}, S = () => () => {
|
|
852
|
+
}, Ye = (t) => (e) => (ye(e), e.element.classList.add(...t), (r) => {
|
|
842
853
|
r && e.element.classList.remove(...t);
|
|
843
|
-
}),
|
|
844
|
-
|
|
854
|
+
}), Ze = (t) => (e) => {
|
|
855
|
+
ye(e);
|
|
845
856
|
const r = e.element;
|
|
846
857
|
let s = [];
|
|
847
858
|
const n = t.on((o) => {
|
|
@@ -850,19 +861,19 @@ const _ = (t) => {
|
|
|
850
861
|
return (o) => {
|
|
851
862
|
n(), o && s.forEach((i) => r.classList.remove(i)), s.length = 0;
|
|
852
863
|
};
|
|
853
|
-
},
|
|
854
|
-
const r =
|
|
864
|
+
}, k = (t, e) => {
|
|
865
|
+
const r = ce(t), s = fe(t);
|
|
855
866
|
return (n) => {
|
|
856
|
-
|
|
867
|
+
ve(n, t);
|
|
857
868
|
const o = s(n.element);
|
|
858
869
|
return r(n.element, e), (i) => {
|
|
859
870
|
i && r(n.element, o);
|
|
860
871
|
};
|
|
861
872
|
};
|
|
862
|
-
},
|
|
863
|
-
const r =
|
|
873
|
+
}, L = (t, e) => {
|
|
874
|
+
const r = ce(t), s = fe(t);
|
|
864
875
|
return (n) => {
|
|
865
|
-
|
|
876
|
+
ve(n, t);
|
|
866
877
|
const o = s(n.element), i = e.on((l) => r(n.element, l));
|
|
867
878
|
return (l) => {
|
|
868
879
|
i(), l && r(n.element, o);
|
|
@@ -882,17 +893,17 @@ const _ = (t) => {
|
|
|
882
893
|
* @returns The renderable component for the specified attribute.
|
|
883
894
|
*
|
|
884
895
|
*/
|
|
885
|
-
get: (t, e) => e === "class" ? (r) => h.is(r) ?
|
|
896
|
+
get: (t, e) => e === "class" ? (r) => h.is(r) ? Ze(r) : Ye(
|
|
886
897
|
(r ?? "").split(" ").filter((s) => s.length > 0)
|
|
887
|
-
) : (r) => h.is(r) ?
|
|
898
|
+
) : (r) => h.is(r) ? L(
|
|
888
899
|
e,
|
|
889
900
|
r
|
|
890
|
-
) :
|
|
901
|
+
) : k(
|
|
891
902
|
e,
|
|
892
903
|
r
|
|
893
904
|
)
|
|
894
905
|
}
|
|
895
|
-
),
|
|
906
|
+
), Ct = new Proxy(
|
|
896
907
|
{},
|
|
897
908
|
{
|
|
898
909
|
/**
|
|
@@ -903,12 +914,12 @@ const _ = (t) => {
|
|
|
903
914
|
* @returns The renderable component for the specified attribute.
|
|
904
915
|
*
|
|
905
916
|
*/
|
|
906
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
917
|
+
get: (t, e) => (r) => h.is(r) ? L(
|
|
907
918
|
`data-${e}`,
|
|
908
919
|
r
|
|
909
|
-
) :
|
|
920
|
+
) : k(`data-${e}`, r)
|
|
910
921
|
}
|
|
911
|
-
),
|
|
922
|
+
), kt = new Proxy(
|
|
912
923
|
{},
|
|
913
924
|
{
|
|
914
925
|
/**
|
|
@@ -919,15 +930,15 @@ const _ = (t) => {
|
|
|
919
930
|
* @returns The renderable component for the specified attribute.
|
|
920
931
|
*
|
|
921
932
|
*/
|
|
922
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
933
|
+
get: (t, e) => (r) => h.is(r) ? L(
|
|
923
934
|
`aria-${e}`,
|
|
924
935
|
r
|
|
925
|
-
) :
|
|
936
|
+
) : k(
|
|
926
937
|
`aria-${e}`,
|
|
927
938
|
r
|
|
928
939
|
)
|
|
929
940
|
}
|
|
930
|
-
),
|
|
941
|
+
), Lt = new Proxy(
|
|
931
942
|
{},
|
|
932
943
|
{
|
|
933
944
|
/**
|
|
@@ -938,15 +949,15 @@ const _ = (t) => {
|
|
|
938
949
|
* @returns The renderable component for the specified attribute.
|
|
939
950
|
*
|
|
940
951
|
*/
|
|
941
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
952
|
+
get: (t, e) => (r) => h.is(r) ? L(
|
|
942
953
|
e,
|
|
943
954
|
r
|
|
944
|
-
) :
|
|
955
|
+
) : k(
|
|
945
956
|
e,
|
|
946
957
|
r
|
|
947
958
|
)
|
|
948
959
|
}
|
|
949
|
-
),
|
|
960
|
+
), Nt = new Proxy(
|
|
950
961
|
{},
|
|
951
962
|
{
|
|
952
963
|
/**
|
|
@@ -956,29 +967,29 @@ const _ = (t) => {
|
|
|
956
967
|
* @returns The renderable component for the specified attribute.
|
|
957
968
|
*
|
|
958
969
|
*/
|
|
959
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
970
|
+
get: (t, e) => (r) => h.is(r) ? L(
|
|
960
971
|
e,
|
|
961
972
|
r
|
|
962
|
-
) :
|
|
973
|
+
) : k(
|
|
963
974
|
e,
|
|
964
975
|
r
|
|
965
976
|
)
|
|
966
977
|
}
|
|
967
|
-
),
|
|
978
|
+
), c = (t) => t == null ? S : Array.isArray(t) ? p(...t.map(c)) : typeof t == "string" ? de(t) : h.is(t) ? pe(t) : t, me = (t, ...e) => (r) => {
|
|
968
979
|
const s = r.createElement(t, void 0);
|
|
969
|
-
r.isFirstLevel && N() &&
|
|
970
|
-
const n = e.map((o) =>
|
|
980
|
+
r.isFirstLevel && N() && Se(s), r.appendOrInsert(s), r = r.withElement(s);
|
|
981
|
+
const n = e.map((o) => c(o)(r));
|
|
971
982
|
return (o) => {
|
|
972
|
-
n.forEach((i) => i(!1)), o &&
|
|
983
|
+
n.forEach((i) => i(!1)), o && m(s);
|
|
973
984
|
};
|
|
974
|
-
},
|
|
985
|
+
}, ge = (t, e, ...r) => (s) => {
|
|
975
986
|
const n = s.createElement(t, e);
|
|
976
|
-
s.isFirstLevel && N() &&
|
|
977
|
-
const o = r.map((i) =>
|
|
987
|
+
s.isFirstLevel && N() && Se(n), s.appendOrInsert(n), s = s.withElement(n);
|
|
988
|
+
const o = r.map((i) => c(i)(s));
|
|
978
989
|
return (i) => {
|
|
979
|
-
o.forEach((l) => l(!1)), i &&
|
|
990
|
+
o.forEach((l) => l(!1)), i && m(n);
|
|
980
991
|
};
|
|
981
|
-
},
|
|
992
|
+
}, Rt = new Proxy(
|
|
982
993
|
{},
|
|
983
994
|
{
|
|
984
995
|
/**
|
|
@@ -986,9 +997,9 @@ const _ = (t) => {
|
|
|
986
997
|
* @param tagName - The HTML tag name.
|
|
987
998
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
988
999
|
*/
|
|
989
|
-
get: (t, e) => (...r) =>
|
|
1000
|
+
get: (t, e) => (...r) => me(e, r.flatMap(c))
|
|
990
1001
|
}
|
|
991
|
-
),
|
|
1002
|
+
), Mt = new Proxy(
|
|
992
1003
|
{},
|
|
993
1004
|
{
|
|
994
1005
|
/**
|
|
@@ -996,9 +1007,9 @@ const _ = (t) => {
|
|
|
996
1007
|
* @param type - The input type name.
|
|
997
1008
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
998
1009
|
*/
|
|
999
|
-
get: (t, e) => (...r) =>
|
|
1010
|
+
get: (t, e) => (...r) => me("input", P.type(e), ...r)
|
|
1000
1011
|
}
|
|
1001
|
-
),
|
|
1012
|
+
), Ke = "http://www.w3.org/2000/svg", $t = new Proxy(
|
|
1002
1013
|
{},
|
|
1003
1014
|
{
|
|
1004
1015
|
/**
|
|
@@ -1006,9 +1017,9 @@ const _ = (t) => {
|
|
|
1006
1017
|
* @param tagName - The SVG tag name.
|
|
1007
1018
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1008
1019
|
*/
|
|
1009
|
-
get: (t, e) => (...r) =>
|
|
1020
|
+
get: (t, e) => (...r) => ge(e, Ke, r.flatMap(c))
|
|
1010
1021
|
}
|
|
1011
|
-
),
|
|
1022
|
+
), xe = "http://www.w3.org/1998/Math/MathML", Ft = new Proxy(
|
|
1012
1023
|
{},
|
|
1013
1024
|
{
|
|
1014
1025
|
/**
|
|
@@ -1016,101 +1027,101 @@ const _ = (t) => {
|
|
|
1016
1027
|
* @param tagName - The Math tag name.
|
|
1017
1028
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1018
1029
|
*/
|
|
1019
|
-
get: (t, e) => (...r) =>
|
|
1030
|
+
get: (t, e) => (...r) => ge(e, xe, r.flatMap(c))
|
|
1020
1031
|
}
|
|
1021
|
-
),
|
|
1032
|
+
), O = "data-tempo-attr", M = "data-tempo-class", _e = "data-tempo-node", $ = "data-tempo-text", et = (t, e) => {
|
|
1022
1033
|
const r = t.getAttribute(e);
|
|
1023
1034
|
if (r != null) {
|
|
1024
|
-
const s = t.getAttribute(
|
|
1035
|
+
const s = t.getAttribute(O) ?? "{}", n = { ...JSON.parse(s), name: r };
|
|
1025
1036
|
t.setAttribute(
|
|
1026
|
-
|
|
1037
|
+
O,
|
|
1027
1038
|
JSON.stringify(n).replace(/"/g, """)
|
|
1028
1039
|
);
|
|
1029
1040
|
}
|
|
1030
|
-
},
|
|
1031
|
-
N() && t.isFirstLevel &&
|
|
1032
|
-
},
|
|
1033
|
-
t.querySelectorAll(`[${
|
|
1041
|
+
}, ve = (t, e) => {
|
|
1042
|
+
N() && t.isFirstLevel && et(t.element, e);
|
|
1043
|
+
}, tt = (t) => {
|
|
1044
|
+
t.querySelectorAll(`[${O}]`).forEach((e) => {
|
|
1034
1045
|
const r = JSON.parse(
|
|
1035
|
-
(e.getAttribute(
|
|
1046
|
+
(e.getAttribute(O) ?? "{}").replace(/"/g, '"')
|
|
1036
1047
|
);
|
|
1037
1048
|
for (const [s, n] of Object.entries(r))
|
|
1038
1049
|
e.setAttribute(s, n);
|
|
1039
|
-
e.removeAttribute(
|
|
1050
|
+
e.removeAttribute(O);
|
|
1040
1051
|
});
|
|
1041
1052
|
};
|
|
1042
|
-
function
|
|
1043
|
-
t.setAttribute(
|
|
1053
|
+
function rt(t) {
|
|
1054
|
+
t.setAttribute(M, t.className);
|
|
1044
1055
|
}
|
|
1045
|
-
const
|
|
1046
|
-
N() && t.isFirstLevel &&
|
|
1047
|
-
},
|
|
1048
|
-
t.querySelectorAll(`[${
|
|
1049
|
-
const r = e.getAttribute(
|
|
1050
|
-
r !== null && (e.className = r, e.removeAttribute(
|
|
1056
|
+
const ye = (t) => {
|
|
1057
|
+
N() && t.isFirstLevel && rt(t.element);
|
|
1058
|
+
}, st = (t) => {
|
|
1059
|
+
t.querySelectorAll(`[${M}]`).forEach((e) => {
|
|
1060
|
+
const r = e.getAttribute(M);
|
|
1061
|
+
r !== null && (e.className = r, e.removeAttribute(M));
|
|
1051
1062
|
});
|
|
1052
|
-
},
|
|
1053
|
-
t.setAttribute(
|
|
1054
|
-
},
|
|
1055
|
-
t.querySelectorAll(`[${
|
|
1056
|
-
|
|
1063
|
+
}, Se = (t) => {
|
|
1064
|
+
t.setAttribute(_e, "");
|
|
1065
|
+
}, nt = (t) => {
|
|
1066
|
+
t.querySelectorAll(`[${_e}]`).forEach((e) => {
|
|
1067
|
+
m(e);
|
|
1057
1068
|
});
|
|
1058
|
-
},
|
|
1059
|
-
t.setAttribute(
|
|
1060
|
-
},
|
|
1061
|
-
N() && t.isFirstLevel &&
|
|
1062
|
-
},
|
|
1063
|
-
t.querySelectorAll(`[${
|
|
1064
|
-
e.textContent = e.getAttribute(
|
|
1069
|
+
}, ot = (t) => {
|
|
1070
|
+
t.setAttribute($, t.textContent ?? "");
|
|
1071
|
+
}, we = (t) => {
|
|
1072
|
+
N() && t.isFirstLevel && ot(t.element);
|
|
1073
|
+
}, it = (t) => {
|
|
1074
|
+
t.querySelectorAll(`[${$}]`).forEach((e) => {
|
|
1075
|
+
e.textContent = e.getAttribute($), e.removeAttribute($);
|
|
1065
1076
|
});
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1077
|
+
}, lt = (t) => {
|
|
1078
|
+
nt(t), st(t), tt(t), it(t);
|
|
1079
|
+
}, Ae = () => {
|
|
1069
1080
|
const t = globalThis;
|
|
1070
1081
|
return t.__tempoSSR__ == null && (t.__tempoSSR__ = {
|
|
1071
1082
|
isSSR: !1,
|
|
1072
1083
|
counter: 0
|
|
1073
1084
|
}), t.__tempoSSR__;
|
|
1074
|
-
},
|
|
1075
|
-
const r =
|
|
1085
|
+
}, Q = (t, e) => {
|
|
1086
|
+
const r = Ae();
|
|
1076
1087
|
r[t] = e;
|
|
1077
|
-
},
|
|
1078
|
-
|
|
1079
|
-
},
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1082
|
-
|
|
1083
|
-
},
|
|
1088
|
+
}, Ee = (t) => Ae()[t], W = (t) => {
|
|
1089
|
+
Q("isSSR", t);
|
|
1090
|
+
}, Y = () => Ee("counter"), ut = () => {
|
|
1091
|
+
Q("counter", (Y() ?? 0) + 1);
|
|
1092
|
+
}, at = () => {
|
|
1093
|
+
Q("counter", (Y() ?? 0) - 1);
|
|
1094
|
+
}, Vt = (t = 30) => (W(!0), new Promise((e, r) => {
|
|
1084
1095
|
let s;
|
|
1085
1096
|
const n = setInterval(() => {
|
|
1086
|
-
|
|
1097
|
+
Y() <= 0 && (clearInterval(n), clearTimeout(s), W(!1), e());
|
|
1087
1098
|
}, 30);
|
|
1088
1099
|
s = setTimeout(() => {
|
|
1089
|
-
clearInterval(n),
|
|
1100
|
+
clearInterval(n), W(!1), r(new Error("SSR Timeout"));
|
|
1090
1101
|
}, t * 1e3);
|
|
1091
|
-
})),
|
|
1102
|
+
})), qt = (t) => (ut(), c(t(at))), N = () => Ee("isSSR"), Pe = (t, e) => {
|
|
1092
1103
|
if (typeof e == "function")
|
|
1093
|
-
return
|
|
1094
|
-
const r = e.pending != null ?
|
|
1104
|
+
return Pe(t, { then: e });
|
|
1105
|
+
const r = e.pending != null ? c(e.pending) : S, s = e.then, n = e.error != null ? (o) => c(e.error(o)) : () => S;
|
|
1095
1106
|
return (o) => {
|
|
1096
1107
|
let i = !0;
|
|
1097
1108
|
const l = t();
|
|
1098
1109
|
o = o.makeRef();
|
|
1099
|
-
let a =
|
|
1110
|
+
let a = c(r)(o);
|
|
1100
1111
|
return l.then(
|
|
1101
|
-
(
|
|
1102
|
-
i && (a(!0), a =
|
|
1112
|
+
(f) => {
|
|
1113
|
+
i && (a(!0), a = c(s(f))(o));
|
|
1103
1114
|
},
|
|
1104
|
-
(
|
|
1105
|
-
i && (a(!0), a =
|
|
1115
|
+
(f) => {
|
|
1116
|
+
i && (a(!0), a = c(n(f))(o));
|
|
1106
1117
|
}
|
|
1107
|
-
), (
|
|
1108
|
-
i = !1, a(
|
|
1118
|
+
), (f) => {
|
|
1119
|
+
i = !1, a(f), f && o.reference && m(o.reference);
|
|
1109
1120
|
};
|
|
1110
1121
|
};
|
|
1111
|
-
},
|
|
1122
|
+
}, It = (t, e) => Pe(() => t, e), De = (t, e) => (r) => (r.element.addEventListener(t, e), (s) => {
|
|
1112
1123
|
s && r.element.removeEventListener(t, e);
|
|
1113
|
-
}),
|
|
1124
|
+
}), ct = (t) => De("click", (e) => {
|
|
1114
1125
|
e.preventDefault();
|
|
1115
1126
|
const r = e.target;
|
|
1116
1127
|
setTimeout(() => {
|
|
@@ -1125,15 +1136,15 @@ const de = (t) => {
|
|
|
1125
1136
|
* @param fn - The function to call when the event is triggered.
|
|
1126
1137
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1127
1138
|
*/
|
|
1128
|
-
get: (t, e) => (r) =>
|
|
1139
|
+
get: (t, e) => (r) => De(e, r)
|
|
1129
1140
|
}
|
|
1130
|
-
),
|
|
1141
|
+
), ft = (t) => (e) => {
|
|
1131
1142
|
const r = e.target;
|
|
1132
1143
|
t(r.value);
|
|
1133
|
-
},
|
|
1144
|
+
}, ht = (t) => (e) => {
|
|
1134
1145
|
const r = e.target;
|
|
1135
1146
|
t(r.valueAsNumber);
|
|
1136
|
-
},
|
|
1147
|
+
}, dt = (t) => (e) => {
|
|
1137
1148
|
const r = e.target;
|
|
1138
1149
|
if (r.value === "")
|
|
1139
1150
|
return;
|
|
@@ -1143,7 +1154,7 @@ const de = (t) => {
|
|
|
1143
1154
|
Number(s[2].substring(0, 2))
|
|
1144
1155
|
);
|
|
1145
1156
|
t(n);
|
|
1146
|
-
},
|
|
1157
|
+
}, pt = (t) => (e) => {
|
|
1147
1158
|
const r = e.target;
|
|
1148
1159
|
if (r.value === "")
|
|
1149
1160
|
return;
|
|
@@ -1153,57 +1164,57 @@ const de = (t) => {
|
|
|
1153
1164
|
Number(n[2])
|
|
1154
1165
|
), i = s[1].split(":");
|
|
1155
1166
|
o.setHours(Number(i[0])), o.setMinutes(Number(i[1])), o.setSeconds(Number(i[2])), t(o);
|
|
1156
|
-
},
|
|
1167
|
+
}, Bt = (t) => (e) => {
|
|
1157
1168
|
const r = e.target;
|
|
1158
1169
|
t(r.checked);
|
|
1159
|
-
},
|
|
1170
|
+
}, jt = (t) => (e) => {
|
|
1160
1171
|
e.preventDefault(), t();
|
|
1161
|
-
},
|
|
1172
|
+
}, Ut = (t) => (e) => {
|
|
1162
1173
|
e.stopPropagation(), t();
|
|
1163
|
-
},
|
|
1174
|
+
}, Gt = (t) => (e) => {
|
|
1164
1175
|
e.stopImmediatePropagation(), t();
|
|
1165
|
-
},
|
|
1176
|
+
}, Jt = (t, e = "input") => p(
|
|
1166
1177
|
P.valueAsDate(t),
|
|
1167
|
-
B[e](
|
|
1168
|
-
),
|
|
1178
|
+
B[e](dt(t.set))
|
|
1179
|
+
), Ht = (t, e = "input") => p(
|
|
1169
1180
|
P.valueAsDate(t),
|
|
1170
|
-
B[e](
|
|
1171
|
-
),
|
|
1181
|
+
B[e](pt(t.set))
|
|
1182
|
+
), Wt = (t, e = "input") => p(
|
|
1172
1183
|
P.valueAsNumber(t),
|
|
1173
|
-
B[e](
|
|
1174
|
-
),
|
|
1184
|
+
B[e](ht(t.set))
|
|
1185
|
+
), Xt = (t, e = "input") => p(P.value(t), B[e](ft(t.set))), zt = (t) => p(P.checked(t), ct(t.set)), Z = (t, e) => {
|
|
1175
1186
|
if (h.is(t))
|
|
1176
1187
|
return (s) => {
|
|
1177
1188
|
s = s.makeRef();
|
|
1178
1189
|
let n, o;
|
|
1179
|
-
const i = t.map((
|
|
1190
|
+
const i = t.map((f) => Object.keys(f)[0]);
|
|
1180
1191
|
let l;
|
|
1181
|
-
const a = i.on((
|
|
1182
|
-
if (
|
|
1183
|
-
o == null || o.dispose(), n == null || n(!0), o = t.map((
|
|
1184
|
-
const
|
|
1185
|
-
n =
|
|
1192
|
+
const a = i.on((f) => {
|
|
1193
|
+
if (f !== l) {
|
|
1194
|
+
o == null || o.dispose(), n == null || n(!0), o = t.map((w) => w[f]);
|
|
1195
|
+
const g = e[f](o);
|
|
1196
|
+
n = c(g)(s), l = f;
|
|
1186
1197
|
}
|
|
1187
1198
|
});
|
|
1188
|
-
return (
|
|
1189
|
-
a(),
|
|
1199
|
+
return (f) => {
|
|
1200
|
+
a(), f && s.reference != null && m(s.reference), n == null || n(!0);
|
|
1190
1201
|
};
|
|
1191
1202
|
};
|
|
1192
1203
|
const r = Object.keys(t)[0];
|
|
1193
|
-
return
|
|
1194
|
-
},
|
|
1195
|
-
|
|
1204
|
+
return c(e[r](I(t[r])));
|
|
1205
|
+
}, be = (t, e, r) => Z(
|
|
1206
|
+
d.map(t, (s) => ({ [s[e]]: s })),
|
|
1196
1207
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1197
1208
|
r
|
|
1198
|
-
),
|
|
1199
|
-
const r =
|
|
1200
|
-
return
|
|
1201
|
-
},
|
|
1202
|
-
|
|
1209
|
+
), Qt = (t, e) => be(t, "kind", e), Yt = (t, e) => {
|
|
1210
|
+
const r = d.map(t, ([s, n]) => ({ [s]: n }));
|
|
1211
|
+
return Z(r, e);
|
|
1212
|
+
}, Zt = (t, e) => be(t, "type", e), mt = (t, e) => Z(
|
|
1213
|
+
d.map(t, (r) => ({ [r]: !0 })),
|
|
1203
1214
|
e
|
|
1204
|
-
),
|
|
1215
|
+
), Kt = (t, e = {}) => (r) => {
|
|
1205
1216
|
const s = (e == null ? void 0 : e.firstSeparator) ?? t, n = (e == null ? void 0 : e.lastSeparator) ?? t;
|
|
1206
|
-
return
|
|
1217
|
+
return mt(
|
|
1207
1218
|
r.map((o) => o.isFirst ? "first" : o.isLast ? "last" : "other"),
|
|
1208
1219
|
{
|
|
1209
1220
|
first: () => s,
|
|
@@ -1211,15 +1222,15 @@ const de = (t) => {
|
|
|
1211
1222
|
other: () => t
|
|
1212
1223
|
}
|
|
1213
1224
|
);
|
|
1214
|
-
},
|
|
1225
|
+
}, Te = (t, e) => (r) => {
|
|
1215
1226
|
const s = Object.values(t).reduce((n, o) => {
|
|
1216
1227
|
const i = r.getProvider(o);
|
|
1217
1228
|
if (i == null)
|
|
1218
1229
|
throw new Error(`No provider found for mark: ${o.description}`);
|
|
1219
1230
|
return n[o] = i, n;
|
|
1220
1231
|
}, {});
|
|
1221
|
-
return
|
|
1222
|
-
},
|
|
1232
|
+
return c(e(s))(r);
|
|
1233
|
+
}, xt = (t, e) => (r) => {
|
|
1223
1234
|
const s = [], n = Object.entries(t).reduce(
|
|
1224
1235
|
(o, [i, l]) => (s.push(
|
|
1225
1236
|
l((a) => (Reflect.set(o, i, a), null))(r)
|
|
@@ -1229,97 +1240,96 @@ const de = (t) => {
|
|
|
1229
1240
|
return s.push(e(n)(r)), (o) => {
|
|
1230
1241
|
s.forEach((i) => i(o));
|
|
1231
1242
|
};
|
|
1232
|
-
},
|
|
1233
|
-
r &&
|
|
1234
|
-
}),
|
|
1243
|
+
}, er = (t, e) => Te([t], (r) => c(e(r[t]))), tr = (t, e) => Te(t, (r) => c(e(r))), rr = (t) => (e) => t(e), sr = (t) => (e) => (e.appendOrInsert(t), (r) => {
|
|
1244
|
+
r && m(t);
|
|
1245
|
+
}), gt = (t, e, r) => {
|
|
1235
1246
|
if (h.is(t)) {
|
|
1236
1247
|
const s = t;
|
|
1237
1248
|
return (n) => {
|
|
1238
1249
|
n = n.makeRef();
|
|
1239
1250
|
let o = null, i = !1;
|
|
1240
|
-
const l =
|
|
1241
|
-
|
|
1251
|
+
const l = V(null), a = s.on((f) => {
|
|
1252
|
+
f == null ? (o == null || o(!0), o = c((r == null ? void 0 : r()) ?? S)(n), i = !1) : (l.value = f, i || (o == null || o(!0), o = c(e(l))(n), i = !0));
|
|
1242
1253
|
});
|
|
1243
|
-
return (
|
|
1244
|
-
a(), o == null || o(
|
|
1254
|
+
return (f) => {
|
|
1255
|
+
a(), o == null || o(f), f && n.reference && m(n.reference);
|
|
1245
1256
|
};
|
|
1246
1257
|
};
|
|
1247
1258
|
} else {
|
|
1248
1259
|
const s = t;
|
|
1249
1260
|
if (s == null) {
|
|
1250
1261
|
const n = r == null ? void 0 : r();
|
|
1251
|
-
return n != null ?
|
|
1262
|
+
return n != null ? c(n) : S;
|
|
1252
1263
|
}
|
|
1253
|
-
return
|
|
1264
|
+
return c(e(I(s)));
|
|
1254
1265
|
}
|
|
1255
|
-
},
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
+
}, X = (t) => (e) => (r) => t(r, e), j = (t, e, r) => gt(
|
|
1267
|
+
d.map(t, (s) => s ? !0 : null),
|
|
1268
|
+
() => e,
|
|
1269
|
+
r != null ? () => r : void 0
|
|
1270
|
+
), nr = (t, e, r) => j(
|
|
1271
|
+
d.map(t, (s) => !s),
|
|
1272
|
+
e,
|
|
1273
|
+
r
|
|
1274
|
+
), Oe = (t, e, r) => r != null ? Oe(t, (s) => {
|
|
1275
|
+
const n = new T(
|
|
1276
|
+
s.index,
|
|
1277
|
+
s.total.map((o) => o - 1)
|
|
1278
|
+
);
|
|
1279
|
+
return p(
|
|
1280
|
+
X(n.dispose),
|
|
1281
|
+
c(e(s)),
|
|
1282
|
+
j(s.isLast, S, r(n))
|
|
1266
1283
|
);
|
|
1267
1284
|
}) : h.is(t) ? (s) => {
|
|
1268
1285
|
s = s.makeRef();
|
|
1269
|
-
const n =
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
} else
|
|
1284
|
-
i[p].value = a[p];
|
|
1286
|
+
const n = Array.from(
|
|
1287
|
+
{ length: t.value },
|
|
1288
|
+
(l, a) => a
|
|
1289
|
+
).map((l) => new T(l, t)), o = n.map(
|
|
1290
|
+
(l) => c(e(l))(s)
|
|
1291
|
+
), i = t.on((l) => {
|
|
1292
|
+
for (; l < o.length; )
|
|
1293
|
+
o.pop()(!0), n.pop().dispose();
|
|
1294
|
+
for (let a = 0; a < l; a++)
|
|
1295
|
+
if (n[a] == null) {
|
|
1296
|
+
n[a] = new T(a, t);
|
|
1297
|
+
const f = c(e(n[a]));
|
|
1298
|
+
o[a] = f(s);
|
|
1299
|
+
}
|
|
1285
1300
|
});
|
|
1286
|
-
return (
|
|
1287
|
-
|
|
1301
|
+
return (l) => {
|
|
1302
|
+
i(), l && s.reference && m(s.reference);
|
|
1288
1303
|
};
|
|
1289
|
-
} :
|
|
1304
|
+
} : p(
|
|
1290
1305
|
...Array.from({ length: t }, (s, n) => n).map(
|
|
1291
|
-
(s) =>
|
|
1306
|
+
(s) => c(e(new T(s, I(t))))
|
|
1292
1307
|
)
|
|
1293
|
-
),
|
|
1294
|
-
const o =
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
other: () => r(o)
|
|
1303
|
-
})
|
|
1308
|
+
), _t = (t, e, r) => r != null ? _t(t, (s, n) => {
|
|
1309
|
+
const o = new T(
|
|
1310
|
+
n.index,
|
|
1311
|
+
n.total.map((i) => i - 1)
|
|
1312
|
+
);
|
|
1313
|
+
return p([
|
|
1314
|
+
X(o.dispose),
|
|
1315
|
+
c(e(s, n)),
|
|
1316
|
+
j(n.isLast, S, r(o))
|
|
1304
1317
|
]);
|
|
1305
1318
|
}) : (s) => {
|
|
1306
|
-
const n =
|
|
1307
|
-
return
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
return g(
|
|
1313
|
-
G(() => i.dispose()),
|
|
1314
|
-
f(e(i, o))
|
|
1319
|
+
const n = d.map(t, (i) => i.length), o = d.toSignal(t);
|
|
1320
|
+
return Oe(n, (i) => {
|
|
1321
|
+
const l = o.map((a) => a[i.index]);
|
|
1322
|
+
return p(
|
|
1323
|
+
X(l.dispose),
|
|
1324
|
+
c(e(l, i))
|
|
1315
1325
|
);
|
|
1316
1326
|
})(s);
|
|
1317
|
-
},
|
|
1327
|
+
}, or = (t, e) => {
|
|
1318
1328
|
if (h.is(t)) {
|
|
1319
1329
|
const r = t;
|
|
1320
1330
|
return (s) => {
|
|
1321
1331
|
s = s.makeRef();
|
|
1322
|
-
const n = r.map((l) =>
|
|
1332
|
+
const n = r.map((l) => c(e(l)));
|
|
1323
1333
|
let o = () => {
|
|
1324
1334
|
};
|
|
1325
1335
|
const i = n.on((l) => {
|
|
@@ -1330,57 +1340,49 @@ const de = (t) => {
|
|
|
1330
1340
|
};
|
|
1331
1341
|
};
|
|
1332
1342
|
}
|
|
1333
|
-
return
|
|
1334
|
-
},
|
|
1335
|
-
|
|
1336
|
-
() => e,
|
|
1337
|
-
r != null ? () => r : void 0
|
|
1338
|
-
), xt = (t, e, r) => Ee(
|
|
1339
|
-
m.map(t, (s) => !s),
|
|
1340
|
-
e,
|
|
1341
|
-
r
|
|
1342
|
-
), er = (t, e, r = w) => Ee(
|
|
1343
|
-
m.map(t, (s) => s.length > 0),
|
|
1343
|
+
return c(e(t));
|
|
1344
|
+
}, ir = (t, e, r = S) => j(
|
|
1345
|
+
d.map(t, (s) => s.length > 0),
|
|
1344
1346
|
e,
|
|
1345
1347
|
r
|
|
1346
|
-
),
|
|
1347
|
-
}),
|
|
1348
|
+
), lr = (t) => (e) => t(e.element) ?? (() => {
|
|
1349
|
+
}), Ce = (t, e) => {
|
|
1348
1350
|
const r = t(e);
|
|
1349
1351
|
return () => r(!0);
|
|
1350
|
-
},
|
|
1352
|
+
}, ur = (t, e, { doc: r, clear: s } = {}) => {
|
|
1351
1353
|
const n = typeof e == "string" ? (r ?? document).querySelector(e) : e;
|
|
1352
1354
|
if (n === null)
|
|
1353
|
-
throw new
|
|
1355
|
+
throw new vt(
|
|
1354
1356
|
`Cannot find element by selector for render: ${e}`
|
|
1355
1357
|
);
|
|
1356
|
-
s !== !1 && (r ?? n.ownerDocument) != null &&
|
|
1357
|
-
const o =
|
|
1358
|
-
return
|
|
1358
|
+
s !== !1 && (r ?? n.ownerDocument) != null && lt(r ?? n.ownerDocument);
|
|
1359
|
+
const o = Qe(n), i = he(n) ? void 0 : n, l = v.of(o, i);
|
|
1360
|
+
return Ce(t, l);
|
|
1359
1361
|
};
|
|
1360
|
-
class
|
|
1362
|
+
class vt extends Error {
|
|
1361
1363
|
constructor(e) {
|
|
1362
1364
|
super(e);
|
|
1363
1365
|
}
|
|
1364
1366
|
}
|
|
1365
|
-
const
|
|
1367
|
+
const ar = (t, e) => (r) => {
|
|
1366
1368
|
const s = r.document.querySelector(t);
|
|
1367
1369
|
if (s === null)
|
|
1368
1370
|
throw new Error(`Cannot find element by selector for portal: ${t}`);
|
|
1369
|
-
return
|
|
1370
|
-
|
|
1371
|
+
return Ce(
|
|
1372
|
+
c(e),
|
|
1371
1373
|
r.withElement(s).withFirstLevel()
|
|
1372
1374
|
);
|
|
1373
|
-
},
|
|
1375
|
+
}, cr = (t) => Symbol(t), ke = (t, e) => (r) => c(e)(r.withProviders(t)), fr = (...t) => t.length > 0 ? t.reduceRight((e, r) => (s) => e(r(s))) : c, hr = (t, e, r) => ke({ [t]: e }, c(r)), dr = (t, e) => ke(t, c(e)), yt = (t, e) => (r) => {
|
|
1374
1376
|
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1375
1377
|
return s.style.setProperty(t, e), (o) => {
|
|
1376
1378
|
o && s.style.setProperty(t, n);
|
|
1377
1379
|
};
|
|
1378
|
-
},
|
|
1380
|
+
}, St = (t, e) => (r) => {
|
|
1379
1381
|
const s = r.element, n = s.style.getPropertyValue(t);
|
|
1380
1382
|
return e.on((o) => s.style.setProperty(t, o)), (o) => {
|
|
1381
1383
|
o && s.style.setProperty(t, n);
|
|
1382
1384
|
};
|
|
1383
|
-
},
|
|
1385
|
+
}, pr = new Proxy(
|
|
1384
1386
|
{},
|
|
1385
1387
|
{
|
|
1386
1388
|
/**
|
|
@@ -1391,116 +1393,116 @@ const sr = (t, e) => (r) => {
|
|
|
1391
1393
|
* @returns The renderable component for the specified attribute.
|
|
1392
1394
|
*
|
|
1393
1395
|
*/
|
|
1394
|
-
get: (t, e) => (r) => h.is(r) ?
|
|
1396
|
+
get: (t, e) => (r) => h.is(r) ? St(e, r) : yt(e, r)
|
|
1395
1397
|
}
|
|
1396
1398
|
);
|
|
1397
1399
|
export {
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1400
|
+
It as Async,
|
|
1401
|
+
zt as BindChecked,
|
|
1402
|
+
Jt as BindDate,
|
|
1403
|
+
Ht as BindDateTime,
|
|
1404
|
+
Wt as BindNumber,
|
|
1405
|
+
Xt as BindText,
|
|
1404
1406
|
E as Computed,
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1407
|
+
Kt as Conjunction,
|
|
1408
|
+
v as DOMContext,
|
|
1409
|
+
sr as DOMNode,
|
|
1410
|
+
me as El,
|
|
1411
|
+
ge as ElNS,
|
|
1412
|
+
T as ElementPosition,
|
|
1413
|
+
S as Empty,
|
|
1414
|
+
gt as Ensure,
|
|
1415
|
+
_t as ForEach,
|
|
1416
|
+
p as Fragment,
|
|
1417
|
+
or as MapSignal,
|
|
1418
|
+
ne as MemoryStore,
|
|
1419
|
+
ir as NotEmpty,
|
|
1420
|
+
ct as OnChecked,
|
|
1421
|
+
rr as OnCtx,
|
|
1422
|
+
lr as OnMount,
|
|
1423
|
+
X as OnUnmount,
|
|
1424
|
+
Z as OneOf,
|
|
1425
|
+
be as OneOfField,
|
|
1426
|
+
Qt as OneOfKind,
|
|
1427
|
+
Yt as OneOfTuple,
|
|
1428
|
+
Zt as OneOfType,
|
|
1429
|
+
mt as OneOfValue,
|
|
1430
|
+
ar as Portal,
|
|
1429
1431
|
F as Prop,
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1432
|
+
fr as Provide,
|
|
1433
|
+
ze as ProviderNotFoundError,
|
|
1434
|
+
vt as RenderingError,
|
|
1435
|
+
Oe as Repeat,
|
|
1434
1436
|
h as Signal,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1437
|
+
Pe as Task,
|
|
1438
|
+
Ot as TextNode,
|
|
1439
|
+
nr as Unless,
|
|
1440
|
+
xt as Use,
|
|
1441
|
+
er as UseProvider,
|
|
1442
|
+
tr as UseProviders,
|
|
1443
|
+
qt as UseSSRDone,
|
|
1444
|
+
d as Value,
|
|
1445
|
+
j as When,
|
|
1446
|
+
hr as WithProvider,
|
|
1447
|
+
dr as WithProviders,
|
|
1448
|
+
Se as _addNodeTracker,
|
|
1449
|
+
lt as _clearSSR,
|
|
1450
|
+
Qe as _getSelfOrParentElement,
|
|
1451
|
+
he as _isElement,
|
|
1452
|
+
fe as _makeGetter,
|
|
1453
|
+
ce as _makeSetter,
|
|
1454
|
+
ve as _maybeAddAttributeTracker,
|
|
1455
|
+
ye as _maybeAddClassTracker,
|
|
1456
|
+
we as _maybeAddTextTracker,
|
|
1457
|
+
m as _removeDOMNode,
|
|
1458
|
+
Xe as _setAttribute,
|
|
1459
|
+
Ge as _setBooleanProperty,
|
|
1460
|
+
He as _setDateProperty,
|
|
1461
|
+
Je as _setNumberProperty,
|
|
1462
|
+
We as _setStringProperty,
|
|
1463
|
+
pe as _signalText,
|
|
1464
|
+
de as _staticText,
|
|
1465
|
+
bt as animateSignal,
|
|
1466
|
+
Ue as animateSignals,
|
|
1467
|
+
kt as aria,
|
|
1466
1468
|
P as attr,
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1469
|
+
Ct as dataAttr,
|
|
1470
|
+
Bt as emitChecked,
|
|
1471
|
+
jt as emitPreventDefault,
|
|
1472
|
+
Gt as emitStopImmediatePropagation,
|
|
1473
|
+
Ut as emitStopPropagation,
|
|
1474
|
+
ft as emitValue,
|
|
1475
|
+
dt as emitValueAsDate,
|
|
1476
|
+
pt as emitValueAsDateTime,
|
|
1477
|
+
ht as emitValueAsNumber,
|
|
1478
|
+
qe as endInterpolate,
|
|
1479
|
+
Ie as guessInterpolate,
|
|
1480
|
+
Rt as html,
|
|
1481
|
+
Mt as input,
|
|
1482
|
+
Ve as interpolateDate,
|
|
1483
|
+
$e as interpolateNumber,
|
|
1484
|
+
Fe as interpolateString,
|
|
1483
1485
|
N as isSSR,
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1486
|
+
Pt as localStorageProp,
|
|
1487
|
+
z as makeComputed,
|
|
1488
|
+
At as makeComputedOf,
|
|
1489
|
+
Tt as makeComputedRecord,
|
|
1490
|
+
je as makeEffect,
|
|
1491
|
+
Et as makeEffectOf,
|
|
1492
|
+
V as makeProp,
|
|
1493
|
+
cr as makeProviderMark,
|
|
1492
1494
|
I as makeSignal,
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
+
Ft as math,
|
|
1496
|
+
Nt as mathAttr,
|
|
1495
1497
|
B as on,
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1498
|
+
Vt as prepareSSR,
|
|
1499
|
+
it as removeTextTrackers,
|
|
1500
|
+
ur as render,
|
|
1501
|
+
Ce as renderWithContext,
|
|
1502
|
+
c as renderableOfTNode,
|
|
1503
|
+
Dt as sessionStorageProp,
|
|
1504
|
+
oe as storedProp,
|
|
1505
|
+
pr as style,
|
|
1506
|
+
$t as svg,
|
|
1507
|
+
Lt as svgAttr
|
|
1506
1508
|
};
|