@tempots/dom 31.0.0 → 31.2.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.js +309 -275
- package/package.json +1 -1
- package/renderable/style.d.ts +8 -0
- package/std/value.d.ts +24 -0
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
2
|
var ie = (s) => {
|
|
3
3
|
throw TypeError(s);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var o = (s, e, t) =>
|
|
5
|
+
var Re = (s, e, t) => e in s ? Ie(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
6
|
+
var o = (s, e, t) => Re(s, typeof e != "symbol" ? e + "" : e, t), oe = (s, e, t) => e.has(s) || ie("Cannot " + t);
|
|
7
7
|
var R = (s, e, t) => (oe(s, e, "read from private field"), t ? t.call(s) : e.get(s)), le = (s, e, t) => e.has(s) ? ie("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), Z = (s, e, t, r) => (oe(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const je = (s, e, t) => s + (e - s) * t;
|
|
9
|
+
const Ve = (s, e, t) => {
|
|
10
10
|
const r = Math.max(s.length, e.length);
|
|
11
11
|
let n = "";
|
|
12
12
|
for (let i = 0; i < r; i++) {
|
|
@@ -16,7 +16,7 @@ const Ie = (s, e, t) => {
|
|
|
16
16
|
isNaN(c) && (c = 97), n += String.fromCharCode(l + (c - l) * t);
|
|
17
17
|
}
|
|
18
18
|
return n;
|
|
19
|
-
},
|
|
19
|
+
}, qe = (s, e, t) => new Date(s.getTime() + (e.getTime() - s.getTime()) * t), Fe = (s, e) => e, Be = (s) => typeof s == "number" ? je : typeof s == "string" ? Ve : s instanceof Date ? qe : Fe;
|
|
20
20
|
var w;
|
|
21
21
|
class z {
|
|
22
22
|
/**
|
|
@@ -455,7 +455,7 @@ o(k, "is", (e) => (
|
|
|
455
455
|
e != null && e.$__signal__ === !0
|
|
456
456
|
));
|
|
457
457
|
let d = k;
|
|
458
|
-
const
|
|
458
|
+
const We = typeof queueMicrotask == "function" ? queueMicrotask : (s) => Promise.resolve().then(s);
|
|
459
459
|
class L extends d {
|
|
460
460
|
/**
|
|
461
461
|
* Represents a Signal object.
|
|
@@ -491,7 +491,7 @@ class L extends d {
|
|
|
491
491
|
*/
|
|
492
492
|
o(this, "_scheduleNotify", () => {
|
|
493
493
|
const t = ++this._scheduleCount;
|
|
494
|
-
|
|
494
|
+
We(() => {
|
|
495
495
|
this._scheduleCount !== t || this._disposed || this._isDirty && (this._isDirty = !1, this._setAndNotify(this._fn()));
|
|
496
496
|
});
|
|
497
497
|
});
|
|
@@ -604,7 +604,7 @@ let V = G;
|
|
|
604
604
|
const K = (s, e, t = (r, n) => r === n) => {
|
|
605
605
|
const r = new L(s, t);
|
|
606
606
|
return e.forEach((n) => n.setDerivative(r)), r;
|
|
607
|
-
},
|
|
607
|
+
}, Ue = (s, e, t = {}) => {
|
|
608
608
|
let r = t.once ? () => {
|
|
609
609
|
i(), s();
|
|
610
610
|
} : s;
|
|
@@ -619,10 +619,23 @@ const K = (s, e, t = (r, n) => r === n) => {
|
|
|
619
619
|
n.dispose(), t.abortSignal != null && t.abortSignal.removeEventListener("abort", i);
|
|
620
620
|
};
|
|
621
621
|
return t.abortSignal != null && t.abortSignal.addEventListener("abort", i), i;
|
|
622
|
-
}, _ = (s, e = (t, r) => t === r) => new V(s, e), X = (s, e = (t, r) => t === r) => new d(s, e),
|
|
622
|
+
}, _ = (s, e = (t, r) => t === r) => new V(s, e), X = (s, e = (t, r) => t === r) => new d(s, e), he = () => (
|
|
623
623
|
/* c8 ignore next */
|
|
624
624
|
typeof window < "u" ? window : void 0
|
|
625
|
-
)
|
|
625
|
+
);
|
|
626
|
+
function fe(s) {
|
|
627
|
+
return s != null && s !== !1 && s !== 0 && s !== "";
|
|
628
|
+
}
|
|
629
|
+
function Je(s) {
|
|
630
|
+
return !fe(s);
|
|
631
|
+
}
|
|
632
|
+
function Ge(s) {
|
|
633
|
+
return s == null;
|
|
634
|
+
}
|
|
635
|
+
function Xe(s) {
|
|
636
|
+
return s != null;
|
|
637
|
+
}
|
|
638
|
+
const y = {
|
|
626
639
|
/**
|
|
627
640
|
* Maps a value or a Signal to a new value.
|
|
628
641
|
* If the value is a Signal, it returns a new Signal with the mapped value.
|
|
@@ -692,7 +705,31 @@ const K = (s, e, t = (r, n) => r === n) => {
|
|
|
692
705
|
deriveProp: (s, {
|
|
693
706
|
autoDisposeProp: e = !0,
|
|
694
707
|
equals: t
|
|
695
|
-
} = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : _(s, t)
|
|
708
|
+
} = {}) => d.is(s) ? s.deriveProp({ autoDisposeProp: e, equals: t }) : _(s, t),
|
|
709
|
+
/**
|
|
710
|
+
* Creates a new signal that emits `true` if the value is truthy, `false` otherwise.
|
|
711
|
+
* @param value - The value or signal to check.
|
|
712
|
+
* @returns A signal that emits `true` if the value is truthy, `false` otherwise.
|
|
713
|
+
*/
|
|
714
|
+
truthy: (s) => y.map(s, fe),
|
|
715
|
+
/**
|
|
716
|
+
* Creates a new signal that emits `true` if the value is falsy, `false` otherwise.
|
|
717
|
+
* @param value - The value or signal to check.
|
|
718
|
+
* @returns A signal that emits `true` if the value is falsy, `false` otherwise.
|
|
719
|
+
*/
|
|
720
|
+
falsy: (s) => y.map(s, Je),
|
|
721
|
+
/**
|
|
722
|
+
* Creates a new signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
723
|
+
* @param value - The value or signal to check.
|
|
724
|
+
* @returns A signal that emits `true` if the value is null or undefined, `false` otherwise.
|
|
725
|
+
*/
|
|
726
|
+
nil: (s) => y.map(s, Ge),
|
|
727
|
+
/**
|
|
728
|
+
* Creates a new signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
729
|
+
* @param value - The value or signal to check.
|
|
730
|
+
* @returns A signal that emits `true` if the value is not null or undefined, `false` otherwise.
|
|
731
|
+
*/
|
|
732
|
+
defined: (s) => y.map(s, Xe)
|
|
696
733
|
}, ee = (...s) => (e, t) => {
|
|
697
734
|
if (s.length === 1)
|
|
698
735
|
return y.toSignal(s[0]).map(e);
|
|
@@ -702,20 +739,20 @@ const K = (s, e, t = (r, n) => r === n) => {
|
|
|
702
739
|
r,
|
|
703
740
|
t
|
|
704
741
|
);
|
|
705
|
-
},
|
|
742
|
+
}, kt = (s) => {
|
|
706
743
|
const e = Object.keys(s);
|
|
707
744
|
return ee(...Object.values(s))(
|
|
708
745
|
(...t) => Object.fromEntries(e.map((r, n) => [r, t[n]]))
|
|
709
746
|
);
|
|
710
|
-
},
|
|
747
|
+
}, Nt = (...s) => (e, t = {}) => {
|
|
711
748
|
const r = s.filter((n) => d.is(n));
|
|
712
|
-
return
|
|
749
|
+
return Ue(
|
|
713
750
|
() => e(...s.map(y.get)),
|
|
714
751
|
r,
|
|
715
752
|
t
|
|
716
753
|
);
|
|
717
754
|
};
|
|
718
|
-
class
|
|
755
|
+
class de {
|
|
719
756
|
constructor() {
|
|
720
757
|
o(this, "_store", /* @__PURE__ */ new Map());
|
|
721
758
|
/**
|
|
@@ -734,7 +771,7 @@ class ae {
|
|
|
734
771
|
});
|
|
735
772
|
}
|
|
736
773
|
}
|
|
737
|
-
const
|
|
774
|
+
const pe = ({
|
|
738
775
|
key: s,
|
|
739
776
|
defaultValue: e,
|
|
740
777
|
store: t,
|
|
@@ -748,25 +785,25 @@ const he = ({
|
|
|
748
785
|
i
|
|
749
786
|
);
|
|
750
787
|
return u.on((a) => t.setItem(s, r(a))), u;
|
|
751
|
-
},
|
|
788
|
+
}, $t = (s) => {
|
|
752
789
|
var e;
|
|
753
|
-
return
|
|
790
|
+
return pe({
|
|
754
791
|
...s,
|
|
755
792
|
/* c8 ignore next 3 */
|
|
756
|
-
store: ((e =
|
|
793
|
+
store: ((e = he()) == null ? void 0 : e.localStorage) ?? new de()
|
|
757
794
|
});
|
|
758
|
-
},
|
|
795
|
+
}, It = (s) => {
|
|
759
796
|
var e;
|
|
760
|
-
return
|
|
797
|
+
return pe({
|
|
761
798
|
...s,
|
|
762
799
|
/* c8 ignore next 3 */
|
|
763
|
-
store: ((e =
|
|
800
|
+
store: ((e = he()) == null ? void 0 : e.sessionStorage) ?? new de()
|
|
764
801
|
});
|
|
765
802
|
};
|
|
766
803
|
function ce(s) {
|
|
767
804
|
return typeof requestAnimationFrame == "function" ? requestAnimationFrame(s) : setTimeout(s, 0);
|
|
768
805
|
}
|
|
769
|
-
const
|
|
806
|
+
const Ye = (s, e, t, r) => {
|
|
770
807
|
const n = (r == null ? void 0 : r.duration) ?? 300, i = (r == null ? void 0 : r.easing) ?? ((A) => A), l = (r == null ? void 0 : r.equals) ?? ((A, I) => A === I);
|
|
771
808
|
let c = r == null ? void 0 : r.interpolate, u = s, a = e(), h = performance.now(), g = null, T = !0;
|
|
772
809
|
const p = new L(e, l), m = _(s, l);
|
|
@@ -778,22 +815,22 @@ const Be = (s, e, t, r) => {
|
|
|
778
815
|
const C = (A) => {
|
|
779
816
|
a = A, h = performance.now(), u = m.value, T && (T = !1, g = ce(re));
|
|
780
817
|
}, re = () => {
|
|
781
|
-
const I = (performance.now() - h) / y.get(n),
|
|
782
|
-
c == null && (c =
|
|
783
|
-
let ne = c(u, a,
|
|
818
|
+
const I = (performance.now() - h) / y.get(n), $e = i(I);
|
|
819
|
+
c == null && (c = Be(u));
|
|
820
|
+
let ne = c(u, a, $e);
|
|
784
821
|
I >= 1 ? (T = !0, ne = a) : g = ce(re), m.set(ne);
|
|
785
822
|
};
|
|
786
823
|
return p.on(C), m;
|
|
787
|
-
},
|
|
824
|
+
}, Rt = (s, e) => {
|
|
788
825
|
const { initialValue: t, ...r } = e ?? {};
|
|
789
|
-
return
|
|
826
|
+
return Ye(
|
|
790
827
|
/* c8 ignore next 2 */
|
|
791
828
|
t ?? s.get(),
|
|
792
829
|
s.get,
|
|
793
830
|
[s],
|
|
794
831
|
r
|
|
795
832
|
);
|
|
796
|
-
},
|
|
833
|
+
}, Qe = (s, e) => {
|
|
797
834
|
const t = Object.values(s).filter(d.is), r = Object.keys(s);
|
|
798
835
|
return K(() => {
|
|
799
836
|
const n = {};
|
|
@@ -801,7 +838,7 @@ const Be = (s, e, t, r) => {
|
|
|
801
838
|
n[i] = y.get(s[i]);
|
|
802
839
|
return e(n);
|
|
803
840
|
}, t);
|
|
804
|
-
},
|
|
841
|
+
}, jt = (s) => Qe(s, (e) => e), Vt = (s, e) => {
|
|
805
842
|
const t = _(s.get());
|
|
806
843
|
let r = null;
|
|
807
844
|
const n = s.on((i) => {
|
|
@@ -815,33 +852,33 @@ const Be = (s, e, t, r) => {
|
|
|
815
852
|
return t.onDispose(() => {
|
|
816
853
|
n(), r != null && clearTimeout(r);
|
|
817
854
|
}), t;
|
|
818
|
-
},
|
|
855
|
+
}, qt = (s) => {
|
|
819
856
|
let e;
|
|
820
857
|
return s.map((t) => {
|
|
821
858
|
const r = e;
|
|
822
859
|
return e = t, r;
|
|
823
860
|
});
|
|
824
|
-
},
|
|
861
|
+
}, Ft = ({
|
|
825
862
|
size: s = void 0,
|
|
826
863
|
signal: e
|
|
827
864
|
}) => {
|
|
828
865
|
const t = [];
|
|
829
866
|
return e.map((r) => (t.push(r), s != null && t.length > s && t.shift(), t.slice()));
|
|
830
|
-
},
|
|
867
|
+
}, Bt = (s) => (...e) => ee(
|
|
831
868
|
s,
|
|
832
869
|
...e
|
|
833
870
|
)((t, ...r) => t(...r));
|
|
834
|
-
function
|
|
871
|
+
function Wt(...s) {
|
|
835
872
|
return ee(...s)((...e) => {
|
|
836
873
|
for (const t of e) if (t != null) return t;
|
|
837
874
|
});
|
|
838
875
|
}
|
|
839
|
-
const
|
|
876
|
+
const ge = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), me = /* @__PURE__ */ new Set(["selected"]), ye = /* @__PURE__ */ new Set([
|
|
840
877
|
"rowSpan",
|
|
841
878
|
"colSpan",
|
|
842
879
|
"tabIndex",
|
|
843
880
|
"valueAsNumber"
|
|
844
|
-
]),
|
|
881
|
+
]), Te = /* @__PURE__ */ new Set(["valueAsDate"]), be = /* @__PURE__ */ new Set([
|
|
845
882
|
"value",
|
|
846
883
|
"textContent",
|
|
847
884
|
"innerText",
|
|
@@ -849,23 +886,23 @@ const fe = /* @__PURE__ */ new Set(["checked", "disabled", "hidden"]), de = /* @
|
|
|
849
886
|
"outerHTML",
|
|
850
887
|
"className",
|
|
851
888
|
"classList"
|
|
852
|
-
]),
|
|
889
|
+
]), Ze = (s, e) => me.has(s) ? (t) => {
|
|
853
890
|
t == null || t !== !0 ? e.removeAttribute(s) : e.setAttribute(s, "");
|
|
854
|
-
} :
|
|
891
|
+
} : ge.has(s) ? (t) => {
|
|
855
892
|
t == null ? e[s] = null : e[s] = !!t;
|
|
856
|
-
} :
|
|
893
|
+
} : ye.has(s) ? (t) => {
|
|
857
894
|
t == null ? e[s] = null : e[s] = Number(t);
|
|
858
|
-
} :
|
|
895
|
+
} : Te.has(s) ? (t) => {
|
|
859
896
|
t == null ? e[s] = null : e[s] = t;
|
|
860
|
-
} :
|
|
897
|
+
} : be.has(s) ? (t) => {
|
|
861
898
|
t == null ? e[s] = null : e[s] = String(t);
|
|
862
899
|
} : (t) => {
|
|
863
900
|
t == null ? e.removeAttribute(s) : e.setAttribute(s, t);
|
|
864
|
-
},
|
|
901
|
+
}, ze = (s, e) => me.has(s) ? () => e.hasAttribute(s) : ge.has(s) ? () => !!e[s] : ye.has(s) ? () => Number(e[s]) : Te.has(s) ? () => e[s] : be.has(s) ? () => String(e[s]) : () => e.getAttribute(s), q = (s) => {
|
|
865
902
|
const e = s;
|
|
866
903
|
e && e.onblur && (e.onblur = null), !(!s || s.ownerDocument === void 0) && s.parentElement && s.parentElement.removeChild(s);
|
|
867
|
-
},
|
|
868
|
-
class
|
|
904
|
+
}, Ke = (s) => Se(s) ? s : s.parentElement, Se = (s) => s.nodeType === 1;
|
|
905
|
+
class Ae extends Error {
|
|
869
906
|
constructor(e) {
|
|
870
907
|
super(`Provider not found: ${e.description}`);
|
|
871
908
|
}
|
|
@@ -1045,7 +1082,7 @@ class D {
|
|
|
1045
1082
|
*/
|
|
1046
1083
|
o(this, "getProvider", (e) => {
|
|
1047
1084
|
if (this.providers[e] === void 0)
|
|
1048
|
-
throw new
|
|
1085
|
+
throw new Ae(e);
|
|
1049
1086
|
const [t, r] = this.providers[e];
|
|
1050
1087
|
return { value: t, onUse: r };
|
|
1051
1088
|
});
|
|
@@ -1120,8 +1157,8 @@ class D {
|
|
|
1120
1157
|
*/
|
|
1121
1158
|
o(this, "getStyle", (e) => this.element.style[e]);
|
|
1122
1159
|
o(this, "makeAccessors", (e) => ({
|
|
1123
|
-
get:
|
|
1124
|
-
set:
|
|
1160
|
+
get: ze(e, this.element),
|
|
1161
|
+
set: Ze(e, this.element)
|
|
1125
1162
|
}));
|
|
1126
1163
|
o(this, "getWindow", () => this.document.defaultView);
|
|
1127
1164
|
this.document = e, this.element = t, this.reference = r, this.providers = n;
|
|
@@ -1138,17 +1175,17 @@ class D {
|
|
|
1138
1175
|
return new D(e.ownerDocument, e, t, r);
|
|
1139
1176
|
}
|
|
1140
1177
|
}
|
|
1141
|
-
const
|
|
1178
|
+
const et = (s) => Symbol(s), te = (s, e) => {
|
|
1142
1179
|
const t = s(e);
|
|
1143
1180
|
return (r = !0) => t(r);
|
|
1144
|
-
},
|
|
1181
|
+
}, Ut = (s, e, { doc: t, clear: r, disposeWithParent: n = !0, providers: i = {} } = {}) => {
|
|
1145
1182
|
const l = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
1146
1183
|
if (l === null)
|
|
1147
|
-
throw new
|
|
1184
|
+
throw new tt(
|
|
1148
1185
|
`Cannot find element by selector for render: ${e}`
|
|
1149
1186
|
);
|
|
1150
1187
|
r !== !1 && (t ?? l.ownerDocument) != null && l.nodeType === 1 && (l.innerHTML = "");
|
|
1151
|
-
const c =
|
|
1188
|
+
const c = Ke(l), u = Se(l) ? void 0 : l, a = D.of(c, u, i), h = te(s, a);
|
|
1152
1189
|
let g;
|
|
1153
1190
|
return n && (g = new MutationObserver((T) => {
|
|
1154
1191
|
var p;
|
|
@@ -1162,27 +1199,27 @@ const Xe = (s) => Symbol(s), te = (s, e) => {
|
|
|
1162
1199
|
})), () => {
|
|
1163
1200
|
g == null || g.disconnect(), h(!0);
|
|
1164
1201
|
};
|
|
1165
|
-
},
|
|
1202
|
+
}, Jt = (s, {
|
|
1166
1203
|
startUrl: e = "https://example.com",
|
|
1167
1204
|
selector: t,
|
|
1168
1205
|
providers: r = {}
|
|
1169
1206
|
} = {
|
|
1170
1207
|
selector: "body"
|
|
1171
1208
|
}) => {
|
|
1172
|
-
const n = y.toSignal(e).deriveProp(), i = new
|
|
1209
|
+
const n = y.toSignal(e).deriveProp(), i = new Ce(t, void 0), l = new O(i, void 0, { currentURL: n }, r);
|
|
1173
1210
|
return {
|
|
1174
1211
|
clear: te(s(), l),
|
|
1175
1212
|
root: i,
|
|
1176
1213
|
currentURL: n
|
|
1177
1214
|
};
|
|
1178
1215
|
};
|
|
1179
|
-
class
|
|
1216
|
+
class tt extends Error {
|
|
1180
1217
|
constructor(e) {
|
|
1181
1218
|
super(e);
|
|
1182
1219
|
}
|
|
1183
1220
|
}
|
|
1184
|
-
const
|
|
1185
|
-
class
|
|
1221
|
+
const _e = "data-tts-node", F = "data-tts-class", B = "data-tts-style", W = "data-tts-html", U = "data-tts-text", J = "data-tts-attrs";
|
|
1222
|
+
class Gt {
|
|
1186
1223
|
constructor({
|
|
1187
1224
|
select: e,
|
|
1188
1225
|
getAttribute: t,
|
|
@@ -1341,54 +1378,54 @@ class Bt {
|
|
|
1341
1378
|
this.select = e, this.getAttribute = t, this.setAttribute = r, this.getClass = n, this.setClass = i, this.getStyles = l, this.setStyles = c, this.appendHTML = u, this.getInnerHTML = a, this.setInnerHTML = h, this.getInnerText = g, this.setInnerText = T;
|
|
1342
1379
|
}
|
|
1343
1380
|
}
|
|
1344
|
-
const
|
|
1345
|
-
document.querySelectorAll(`[${
|
|
1346
|
-
},
|
|
1381
|
+
const st = () => {
|
|
1382
|
+
document.querySelectorAll(`[${_e}]`).forEach(q);
|
|
1383
|
+
}, rt = (s) => {
|
|
1347
1384
|
const e = s.getAttribute(F);
|
|
1348
1385
|
s.removeAttribute(F), e != null && s.setAttribute("class", e);
|
|
1349
|
-
},
|
|
1350
|
-
document.querySelectorAll(`[${F}]`).forEach((e) =>
|
|
1351
|
-
},
|
|
1386
|
+
}, nt = () => {
|
|
1387
|
+
document.querySelectorAll(`[${F}]`).forEach((e) => rt(e));
|
|
1388
|
+
}, it = (s) => {
|
|
1352
1389
|
const e = s.getAttribute(W);
|
|
1353
1390
|
s.removeAttribute(W), e != null && (s.innerHTML = e);
|
|
1354
|
-
},
|
|
1355
|
-
document.querySelectorAll(`[${W}]`).forEach((e) =>
|
|
1356
|
-
},
|
|
1391
|
+
}, ot = () => {
|
|
1392
|
+
document.querySelectorAll(`[${W}]`).forEach((e) => it(e));
|
|
1393
|
+
}, lt = (s) => {
|
|
1357
1394
|
const e = s.getAttribute(U);
|
|
1358
1395
|
s.removeAttribute(U), e != null && (s.innerText = e);
|
|
1359
|
-
},
|
|
1360
|
-
document.querySelectorAll(`[${U}]`).forEach((e) =>
|
|
1361
|
-
},
|
|
1396
|
+
}, ct = () => {
|
|
1397
|
+
document.querySelectorAll(`[${U}]`).forEach((e) => lt(e));
|
|
1398
|
+
}, Ee = (s) => JSON.parse(s.replace(/"/g, '"')), ut = (s) => {
|
|
1362
1399
|
const e = s.getAttribute(B);
|
|
1363
1400
|
if (s.removeAttribute(B), e != null) {
|
|
1364
|
-
const t =
|
|
1401
|
+
const t = Ee(e);
|
|
1365
1402
|
Object.entries(t).forEach(([r, n]) => {
|
|
1366
1403
|
s.style.setProperty(r, n);
|
|
1367
1404
|
});
|
|
1368
1405
|
}
|
|
1369
|
-
},
|
|
1370
|
-
document.querySelectorAll(`[${B}]`).forEach((e) =>
|
|
1371
|
-
},
|
|
1406
|
+
}, at = () => {
|
|
1407
|
+
document.querySelectorAll(`[${B}]`).forEach((e) => ut(e));
|
|
1408
|
+
}, ht = (s) => {
|
|
1372
1409
|
const e = s.getAttribute(J);
|
|
1373
1410
|
if (s.removeAttribute(J), e != null) {
|
|
1374
|
-
const t =
|
|
1411
|
+
const t = Ee(e);
|
|
1375
1412
|
Object.entries(t).forEach(([r, n]) => {
|
|
1376
1413
|
n == null ? s.removeAttribute(r) : s.setAttribute(r, n);
|
|
1377
1414
|
});
|
|
1378
1415
|
}
|
|
1379
|
-
},
|
|
1380
|
-
document.querySelectorAll(`[${J}]`).forEach((e) =>
|
|
1381
|
-
},
|
|
1382
|
-
|
|
1383
|
-
}, S = Symbol("class"),
|
|
1384
|
-
class
|
|
1416
|
+
}, ft = () => {
|
|
1417
|
+
document.querySelectorAll(`[${J}]`).forEach((e) => ht(e));
|
|
1418
|
+
}, Xt = () => {
|
|
1419
|
+
st(), nt(), ct(), ot(), at(), ft();
|
|
1420
|
+
}, S = Symbol("class"), v = Symbol("style"), P = Symbol("handler"), ve = () => Math.random().toString(36).substring(2, 15), dt = (s) => s.replace(/<[^>]*>?/g, "");
|
|
1421
|
+
class we {
|
|
1385
1422
|
constructor(e) {
|
|
1386
|
-
o(this, "id",
|
|
1423
|
+
o(this, "id", ve());
|
|
1387
1424
|
o(this, "properties", {});
|
|
1388
1425
|
o(this, "children", []);
|
|
1389
1426
|
o(this, "isElement", () => !0);
|
|
1390
1427
|
o(this, "isText", () => !1);
|
|
1391
|
-
o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
1428
|
+
o(this, "getText", () => this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? dt(this.properties.innerHTML) : this.children.map((e) => e.getText()).join(""));
|
|
1392
1429
|
o(this, "removeChild", (e) => {
|
|
1393
1430
|
const t = this.children.indexOf(e);
|
|
1394
1431
|
t !== -1 && this.children.splice(t, 1);
|
|
@@ -1410,7 +1447,7 @@ class _e {
|
|
|
1410
1447
|
o(this, "hasInnerText", () => this.properties.innerText != null);
|
|
1411
1448
|
o(this, "hasChildren", () => this.children.length > 0);
|
|
1412
1449
|
o(this, "hasClasses", () => this.properties[S] != null);
|
|
1413
|
-
o(this, "hasStyles", () => this.properties[
|
|
1450
|
+
o(this, "hasStyles", () => this.properties[v] != null);
|
|
1414
1451
|
o(this, "hasAttributes", () => Object.keys(this.properties).length > 0);
|
|
1415
1452
|
o(this, "hasHandlers", () => this.properties[P] != null);
|
|
1416
1453
|
o(this, "hasRenderableProperties", () => this.hasClasses() || this.hasAttributes() || this.hasStyles());
|
|
@@ -1465,18 +1502,18 @@ class _e {
|
|
|
1465
1502
|
([e]) => !["innerText", "innerHTML"].includes(e)
|
|
1466
1503
|
));
|
|
1467
1504
|
o(this, "getVisibleAttributes", () => Reflect.ownKeys(this.properties).flatMap(
|
|
1468
|
-
(e) => e === S ? [["class", this.getClasses()]] : e ===
|
|
1505
|
+
(e) => e === S ? [["class", this.getClasses()]] : e === v ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
1469
1506
|
));
|
|
1470
1507
|
o(this, "setStyle", (e, t) => {
|
|
1471
1508
|
var n;
|
|
1472
|
-
const r = (n = this.properties)[
|
|
1473
|
-
r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[
|
|
1509
|
+
const r = (n = this.properties)[v] ?? (n[v] = {});
|
|
1510
|
+
r[e] = t, t === "" && (delete r[e], Object.keys(r).length === 0 && delete this.properties[v]);
|
|
1474
1511
|
});
|
|
1475
1512
|
o(this, "getStyle", (e) => {
|
|
1476
1513
|
var t;
|
|
1477
|
-
return ((t = this.properties[
|
|
1514
|
+
return ((t = this.properties[v]) == null ? void 0 : t[e]) ?? "";
|
|
1478
1515
|
});
|
|
1479
|
-
o(this, "getStyles", () => this.properties[
|
|
1516
|
+
o(this, "getStyles", () => this.properties[v] ?? {});
|
|
1480
1517
|
o(this, "makeAccessors", (e) => {
|
|
1481
1518
|
const t = this.properties;
|
|
1482
1519
|
return {
|
|
@@ -1487,21 +1524,21 @@ class _e {
|
|
|
1487
1524
|
this.parent = e;
|
|
1488
1525
|
}
|
|
1489
1526
|
}
|
|
1490
|
-
const
|
|
1491
|
-
class
|
|
1527
|
+
const pt = (s) => s.replace(/"/g, """), gt = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1528
|
+
class mt extends we {
|
|
1492
1529
|
constructor(t, r, n) {
|
|
1493
1530
|
super(n);
|
|
1494
1531
|
o(this, "isPortal", () => !1);
|
|
1495
1532
|
o(this, "toHTML", (t = !1) => {
|
|
1496
1533
|
const r = this.children.map((u) => u.toHTML()).join(""), n = this.namespace ? ` xmlns="${this.namespace}"` : "";
|
|
1497
1534
|
let i = null;
|
|
1498
|
-
const l = this.getVisibleAttributes().map(([u, a]) => u === "class" ? ` class="${a.join(" ")}"` : u === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([h, g]) => `${h}: ${g};`).join(" ")}"` :
|
|
1499
|
-
return
|
|
1535
|
+
const l = this.getVisibleAttributes().map(([u, a]) => u === "class" ? ` class="${a.join(" ")}"` : u === "style" ? typeof a == "string" ? ` style="${a}"` : ` style="${Object.entries(a).map(([h, g]) => `${h}: ${g};`).join(" ")}"` : Tt.has(u) ? ` ${u}` : u === "innerHTML" ? (i = a, "") : u === "innerText" ? (i = gt(a), "") : ` ${u}="${pt(a)}"`).join(""), c = t ? ` ${_e}` : "";
|
|
1536
|
+
return bt.has(this.tagName) && r === "" ? `<${this.tagName}${n}${l}${c} />` : `<${this.tagName}${n}${l}${c}>${i ?? r}</${this.tagName}>`;
|
|
1500
1537
|
});
|
|
1501
1538
|
this.tagName = t, this.namespace = r;
|
|
1502
1539
|
}
|
|
1503
1540
|
}
|
|
1504
|
-
class
|
|
1541
|
+
class Ce extends we {
|
|
1505
1542
|
constructor(t, r) {
|
|
1506
1543
|
super(r);
|
|
1507
1544
|
o(this, "isPortal", () => !0);
|
|
@@ -1510,9 +1547,9 @@ class ve extends _e {
|
|
|
1510
1547
|
this.selector = t;
|
|
1511
1548
|
}
|
|
1512
1549
|
}
|
|
1513
|
-
class
|
|
1550
|
+
class yt {
|
|
1514
1551
|
constructor(e) {
|
|
1515
|
-
o(this, "id",
|
|
1552
|
+
o(this, "id", ve());
|
|
1516
1553
|
o(this, "isElement", () => !1);
|
|
1517
1554
|
o(this, "isText", () => !0);
|
|
1518
1555
|
o(this, "getText", () => this.text);
|
|
@@ -1530,7 +1567,7 @@ class O {
|
|
|
1530
1567
|
this.element.children.push(e);
|
|
1531
1568
|
});
|
|
1532
1569
|
o(this, "makeChildElement", (e, t) => {
|
|
1533
|
-
const r = new
|
|
1570
|
+
const r = new mt(e, t, this.element);
|
|
1534
1571
|
return this.appendOrInsert(r), new O(
|
|
1535
1572
|
r,
|
|
1536
1573
|
void 0,
|
|
@@ -1539,7 +1576,7 @@ class O {
|
|
|
1539
1576
|
);
|
|
1540
1577
|
});
|
|
1541
1578
|
o(this, "makeChildText", (e) => {
|
|
1542
|
-
const t = new
|
|
1579
|
+
const t = new yt(e);
|
|
1543
1580
|
return this.appendOrInsert(t), new O(
|
|
1544
1581
|
this.element,
|
|
1545
1582
|
t,
|
|
@@ -1556,7 +1593,7 @@ class O {
|
|
|
1556
1593
|
});
|
|
1557
1594
|
o(this, "makeRef", () => this.makeChildText(""));
|
|
1558
1595
|
o(this, "makePortal", (e) => {
|
|
1559
|
-
const t = new
|
|
1596
|
+
const t = new Ce(e, this.element);
|
|
1560
1597
|
return this.appendOrInsert(t), new O(
|
|
1561
1598
|
t,
|
|
1562
1599
|
void 0,
|
|
@@ -1577,7 +1614,7 @@ class O {
|
|
|
1577
1614
|
}));
|
|
1578
1615
|
o(this, "getProvider", (e) => {
|
|
1579
1616
|
if (this.providers[e] === void 0)
|
|
1580
|
-
throw new
|
|
1617
|
+
throw new Ae(e);
|
|
1581
1618
|
const [t, r] = this.providers[e];
|
|
1582
1619
|
return { value: t, onUse: r };
|
|
1583
1620
|
});
|
|
@@ -1598,27 +1635,27 @@ class O {
|
|
|
1598
1635
|
this.element = e, this.reference = t, this.container = r, this.providers = n;
|
|
1599
1636
|
}
|
|
1600
1637
|
}
|
|
1601
|
-
const
|
|
1638
|
+
const Tt = /* @__PURE__ */ new Set([
|
|
1602
1639
|
"checked",
|
|
1603
1640
|
"disabled",
|
|
1604
1641
|
"multiple",
|
|
1605
1642
|
"readonly",
|
|
1606
1643
|
"required",
|
|
1607
1644
|
"selected"
|
|
1608
|
-
]),
|
|
1645
|
+
]), bt = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), xe = (s) => (e) => e.makeChildText(s).clear, Pe = (s) => (e) => {
|
|
1609
1646
|
const t = e.makeChildText(s.value), r = s.on(t.setText);
|
|
1610
1647
|
return (n) => {
|
|
1611
1648
|
r(), t.clear(n);
|
|
1612
1649
|
};
|
|
1613
|
-
},
|
|
1650
|
+
}, Yt = (s) => d.is(s) ? Pe(s) : xe(s), b = (...s) => (e) => {
|
|
1614
1651
|
const t = s.map((r) => f(r)(e));
|
|
1615
1652
|
return (r) => {
|
|
1616
1653
|
t.forEach((n) => n(r));
|
|
1617
1654
|
};
|
|
1618
|
-
},
|
|
1619
|
-
},
|
|
1655
|
+
}, E = () => () => {
|
|
1656
|
+
}, St = (s) => (e) => (e.addClasses(s), (t) => {
|
|
1620
1657
|
t && e.removeClasses(s);
|
|
1621
|
-
}),
|
|
1658
|
+
}), At = (s) => (e) => {
|
|
1622
1659
|
let t = [];
|
|
1623
1660
|
const r = s.on((n) => {
|
|
1624
1661
|
e.removeClasses(t), t = (n ?? "").split(" ").filter((i) => i.length > 0), e.addClasses(t);
|
|
@@ -1650,7 +1687,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1650
1687
|
* @returns The renderable component for the specified attribute.
|
|
1651
1688
|
*
|
|
1652
1689
|
*/
|
|
1653
|
-
get: (s, e) => e === "class" ? (t) => d.is(t) ?
|
|
1690
|
+
get: (s, e) => e === "class" ? (t) => d.is(t) ? At(t) : St(
|
|
1654
1691
|
/* c8 ignore next */
|
|
1655
1692
|
(t ?? "").split(" ").filter((r) => r.length > 0)
|
|
1656
1693
|
) : (t) => d.is(t) ? $(
|
|
@@ -1661,7 +1698,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1661
1698
|
t
|
|
1662
1699
|
)
|
|
1663
1700
|
}
|
|
1664
|
-
),
|
|
1701
|
+
), Qt = new Proxy(
|
|
1665
1702
|
{},
|
|
1666
1703
|
{
|
|
1667
1704
|
/**
|
|
@@ -1677,7 +1714,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1677
1714
|
t
|
|
1678
1715
|
) : N(`data-${e}`, t)
|
|
1679
1716
|
}
|
|
1680
|
-
),
|
|
1717
|
+
), Zt = new Proxy(
|
|
1681
1718
|
{},
|
|
1682
1719
|
{
|
|
1683
1720
|
/**
|
|
@@ -1696,7 +1733,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1696
1733
|
t
|
|
1697
1734
|
)
|
|
1698
1735
|
}
|
|
1699
|
-
),
|
|
1736
|
+
), zt = new Proxy(
|
|
1700
1737
|
{},
|
|
1701
1738
|
{
|
|
1702
1739
|
/**
|
|
@@ -1715,7 +1752,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1715
1752
|
t
|
|
1716
1753
|
)
|
|
1717
1754
|
}
|
|
1718
|
-
),
|
|
1755
|
+
), Kt = new Proxy(
|
|
1719
1756
|
{},
|
|
1720
1757
|
{
|
|
1721
1758
|
/**
|
|
@@ -1735,27 +1772,27 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1735
1772
|
}
|
|
1736
1773
|
), f = (s) => {
|
|
1737
1774
|
if (s == null)
|
|
1738
|
-
return
|
|
1775
|
+
return E;
|
|
1739
1776
|
if (Array.isArray(s))
|
|
1740
1777
|
return b(...s.map(f));
|
|
1741
1778
|
if (typeof s == "string")
|
|
1742
|
-
return
|
|
1779
|
+
return xe(s);
|
|
1743
1780
|
if (d.is(s))
|
|
1744
|
-
return
|
|
1781
|
+
return Pe(s);
|
|
1745
1782
|
if (typeof s == "function")
|
|
1746
1783
|
return s;
|
|
1747
1784
|
throw new Error(`Unknown type: '${typeof s}' for child: ${s}`);
|
|
1748
|
-
},
|
|
1785
|
+
}, Le = (s, ...e) => (t) => {
|
|
1749
1786
|
const r = t.makeChildElement(s, void 0), n = e.map((i) => f(i)(r));
|
|
1750
1787
|
return (i) => {
|
|
1751
1788
|
n.forEach((l) => l(!1)), r.clear(i);
|
|
1752
1789
|
};
|
|
1753
|
-
},
|
|
1790
|
+
}, De = (s, e, ...t) => (r) => {
|
|
1754
1791
|
const n = r.makeChildElement(s, e), i = t.map((l) => f(l)(n));
|
|
1755
1792
|
return (l) => {
|
|
1756
1793
|
i.forEach((c) => c(!1)), n.clear(l);
|
|
1757
1794
|
};
|
|
1758
|
-
},
|
|
1795
|
+
}, es = new Proxy(
|
|
1759
1796
|
{},
|
|
1760
1797
|
{
|
|
1761
1798
|
/**
|
|
@@ -1763,9 +1800,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1763
1800
|
* @param tagName - The HTML tag name.
|
|
1764
1801
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1765
1802
|
*/
|
|
1766
|
-
get: (s, e) => (...t) =>
|
|
1803
|
+
get: (s, e) => (...t) => Le(e, t.flatMap(f))
|
|
1767
1804
|
}
|
|
1768
|
-
),
|
|
1805
|
+
), ts = new Proxy(
|
|
1769
1806
|
{},
|
|
1770
1807
|
{
|
|
1771
1808
|
/**
|
|
@@ -1773,9 +1810,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1773
1810
|
* @param type - The input type name.
|
|
1774
1811
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1775
1812
|
*/
|
|
1776
|
-
get: (s, e) => (...t) =>
|
|
1813
|
+
get: (s, e) => (...t) => Le("input", M.type(e), ...t)
|
|
1777
1814
|
}
|
|
1778
|
-
),
|
|
1815
|
+
), _t = "http://www.w3.org/2000/svg", ss = new Proxy(
|
|
1779
1816
|
{},
|
|
1780
1817
|
{
|
|
1781
1818
|
/**
|
|
@@ -1783,9 +1820,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1783
1820
|
* @param tagName - The SVG tag name.
|
|
1784
1821
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1785
1822
|
*/
|
|
1786
|
-
get: (s, e) => (...t) =>
|
|
1823
|
+
get: (s, e) => (...t) => De(e, _t, t.flatMap(f))
|
|
1787
1824
|
}
|
|
1788
|
-
),
|
|
1825
|
+
), Et = "http://www.w3.org/1998/Math/MathML", rs = new Proxy(
|
|
1789
1826
|
{},
|
|
1790
1827
|
{
|
|
1791
1828
|
/**
|
|
@@ -1793,12 +1830,12 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1793
1830
|
* @param tagName - The Math tag name.
|
|
1794
1831
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1795
1832
|
*/
|
|
1796
|
-
get: (s, e) => (...t) =>
|
|
1833
|
+
get: (s, e) => (...t) => De(e, Et, t.flatMap(f))
|
|
1797
1834
|
}
|
|
1798
|
-
),
|
|
1835
|
+
), Oe = (s, e) => {
|
|
1799
1836
|
if (typeof e == "function")
|
|
1800
|
-
return
|
|
1801
|
-
const t = e.pending != null ? f(e.pending()) :
|
|
1837
|
+
return Oe(s, { then: e });
|
|
1838
|
+
const t = e.pending != null ? f(e.pending()) : E, r = e.then, n = e.error != null ? (i) => f(e.error(i)) : () => E;
|
|
1802
1839
|
return (i) => {
|
|
1803
1840
|
let l = !0;
|
|
1804
1841
|
const c = s(), u = i.makeRef();
|
|
@@ -1814,7 +1851,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1814
1851
|
l = !1, a(h), u.clear(h);
|
|
1815
1852
|
};
|
|
1816
1853
|
};
|
|
1817
|
-
},
|
|
1854
|
+
}, ns = (s, e) => Oe(() => s, e), Me = (s, e, t) => (r) => r.on(s, e, t), vt = (s) => Me("click", (e, t) => {
|
|
1818
1855
|
e.preventDefault();
|
|
1819
1856
|
const r = e.target;
|
|
1820
1857
|
setTimeout(() => {
|
|
@@ -1829,20 +1866,20 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1829
1866
|
* @param fn - The function to call when the event is triggered.
|
|
1830
1867
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1831
1868
|
*/
|
|
1832
|
-
get: (s, e) => (t) =>
|
|
1869
|
+
get: (s, e) => (t) => Me(e, t)
|
|
1833
1870
|
}
|
|
1834
|
-
),
|
|
1871
|
+
), wt = (s, e) => (t) => {
|
|
1835
1872
|
(e == null ? void 0 : e.preventDefault) === !0 && t.preventDefault(), (e == null ? void 0 : e.stopPropagation) === !0 && t.stopPropagation(), (e == null ? void 0 : e.stopImmediatePropagation) === !0 && t.stopImmediatePropagation(), s(t);
|
|
1836
|
-
}, x = (s, e) =>
|
|
1873
|
+
}, x = (s, e) => wt((t) => {
|
|
1837
1874
|
const r = t.target;
|
|
1838
1875
|
s(r, t);
|
|
1839
|
-
}, e),
|
|
1876
|
+
}, e), Ct = (s, e) => x(
|
|
1840
1877
|
(t, r) => s(t.value, r),
|
|
1841
1878
|
e
|
|
1842
|
-
),
|
|
1879
|
+
), xt = (s, e) => x(
|
|
1843
1880
|
(t, r) => s(t.valueAsNumber, r),
|
|
1844
1881
|
e
|
|
1845
|
-
),
|
|
1882
|
+
), Pt = (s, e) => x((t, r) => {
|
|
1846
1883
|
if (t.value === "")
|
|
1847
1884
|
return;
|
|
1848
1885
|
const n = t.value.split("-"), i = new Date(
|
|
@@ -1851,7 +1888,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1851
1888
|
Number(n[2].substring(0, 2))
|
|
1852
1889
|
);
|
|
1853
1890
|
s(i, r);
|
|
1854
|
-
}, e),
|
|
1891
|
+
}, e), is = (s, e) => x((t, r) => {
|
|
1855
1892
|
if (t.value === "") {
|
|
1856
1893
|
s(null, r);
|
|
1857
1894
|
return;
|
|
@@ -1862,7 +1899,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1862
1899
|
Number(n[2].substring(0, 2))
|
|
1863
1900
|
);
|
|
1864
1901
|
s(i, r);
|
|
1865
|
-
}, e),
|
|
1902
|
+
}, e), Lt = (s, e) => x((t, r) => {
|
|
1866
1903
|
if (t.value === "")
|
|
1867
1904
|
return;
|
|
1868
1905
|
const n = t.value.split("T"), i = n[0].split("-"), l = new Date(
|
|
@@ -1871,7 +1908,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1871
1908
|
Number(i[2])
|
|
1872
1909
|
), c = n[1].split(":");
|
|
1873
1910
|
l.setHours(Number(c[0])), l.setMinutes(Number(c[1])), l.setSeconds(Number(c[2])), s(l, r);
|
|
1874
|
-
}, e),
|
|
1911
|
+
}, e), os = (s, e) => x((t, r) => {
|
|
1875
1912
|
if (t.value === "") {
|
|
1876
1913
|
s(null, r);
|
|
1877
1914
|
return;
|
|
@@ -1887,9 +1924,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1887
1924
|
Number(i[2])
|
|
1888
1925
|
), c = n[1].split(":");
|
|
1889
1926
|
l.setHours(Number(c[0] ?? 0)), l.setMinutes(Number(c[1] ?? 0)), l.setSeconds(Number(c[2] ?? 0)), s(l, r);
|
|
1890
|
-
}, e),
|
|
1927
|
+
}, e), ls = (s, e) => x((t, r) => {
|
|
1891
1928
|
s(t.checked, r);
|
|
1892
|
-
}, e),
|
|
1929
|
+
}, e), cs = (s, e = "input") => b(M.valueAsDate(s), Y[e](Pt(s.set))), us = (s, e = "input") => b(M.valueAsDate(s), Y[e](Lt(s.set))), as = (s, e = "input") => b(M.valueAsNumber(s), Y[e](xt(s.set))), hs = (s, e = "input") => b(M.value(s), Y[e](Ct(s.set))), fs = (s) => b(M.checked(s), vt(s.set)), Q = (s, e) => {
|
|
1893
1930
|
if (d.is(s))
|
|
1894
1931
|
return (r) => {
|
|
1895
1932
|
const n = r.makeRef();
|
|
@@ -1909,19 +1946,19 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1909
1946
|
};
|
|
1910
1947
|
const t = Object.keys(s)[0];
|
|
1911
1948
|
return f(e[t](X(s[t])));
|
|
1912
|
-
},
|
|
1949
|
+
}, He = (s, e, t) => Q(
|
|
1913
1950
|
y.map(s, (r) => ({ [r[e]]: r })),
|
|
1914
1951
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1915
1952
|
t
|
|
1916
|
-
),
|
|
1953
|
+
), ds = (s, e) => He(s, "kind", e), ps = (s, e) => {
|
|
1917
1954
|
const t = y.map(s, ([r, n]) => ({ [r]: n }));
|
|
1918
1955
|
return Q(t, e);
|
|
1919
|
-
},
|
|
1956
|
+
}, gs = (s, e) => He(s, "type", e), Dt = (s, e) => Q(
|
|
1920
1957
|
y.map(s, (t) => ({ [t]: !0 })),
|
|
1921
1958
|
e
|
|
1922
|
-
),
|
|
1959
|
+
), ms = (s, e = {}) => (t) => {
|
|
1923
1960
|
const r = (e == null ? void 0 : e.firstSeparator) ?? s, n = (e == null ? void 0 : e.lastSeparator) ?? s;
|
|
1924
|
-
return
|
|
1961
|
+
return Dt(
|
|
1925
1962
|
t.map((i) => i.isFirst ? "first" : i.isLast ? "last" : "other"),
|
|
1926
1963
|
{
|
|
1927
1964
|
first: r,
|
|
@@ -1929,9 +1966,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1929
1966
|
other: s
|
|
1930
1967
|
}
|
|
1931
1968
|
);
|
|
1932
|
-
},
|
|
1969
|
+
}, ys = (s) => (e) => (e.appendOrInsert(s), (t) => {
|
|
1933
1970
|
t && q(s);
|
|
1934
|
-
}),
|
|
1971
|
+
}), Ts = (s, e, t) => {
|
|
1935
1972
|
if (d.is(s)) {
|
|
1936
1973
|
const r = s;
|
|
1937
1974
|
return (n) => {
|
|
@@ -1951,16 +1988,16 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1951
1988
|
const r = s;
|
|
1952
1989
|
if (r == null) {
|
|
1953
1990
|
const n = t == null ? void 0 : t();
|
|
1954
|
-
return n != null ? f(n) :
|
|
1991
|
+
return n != null ? f(n) : E;
|
|
1955
1992
|
}
|
|
1956
1993
|
return f(e(X(r)));
|
|
1957
1994
|
}
|
|
1958
|
-
},
|
|
1995
|
+
}, bs = (...s) => (e, t) => (r) => {
|
|
1959
1996
|
const n = r.makeRef();
|
|
1960
1997
|
if (s.some(
|
|
1961
1998
|
(p) => !d.is(p) && p == null
|
|
1962
1999
|
))
|
|
1963
|
-
return (t != null ? f(t == null ? void 0 : t()) :
|
|
2000
|
+
return (t != null ? f(t == null ? void 0 : t()) : E)(
|
|
1964
2001
|
n
|
|
1965
2002
|
);
|
|
1966
2003
|
const l = s.map(() => null), c = s.map(
|
|
@@ -1990,11 +2027,11 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
1990
2027
|
});
|
|
1991
2028
|
});
|
|
1992
2029
|
return a.on((p) => {
|
|
1993
|
-
u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ??
|
|
2030
|
+
u == null || u(!0), u = null, p ? u = f(e(...l))(n) : u = f((t == null ? void 0 : t()) ?? E)(n);
|
|
1994
2031
|
}), (p) => {
|
|
1995
2032
|
l.forEach((m) => m == null ? void 0 : m.dispose()), a.dispose(), T.forEach((m) => m()), u == null || u(p), n.clear(p);
|
|
1996
2033
|
};
|
|
1997
|
-
}, H = (...s) => (e) => (t) => s.forEach((r) => r(t, e)),
|
|
2034
|
+
}, H = (...s) => (e) => (t) => s.forEach((r) => r(t, e)), ke = (s, e, t) => {
|
|
1998
2035
|
if (d.is(s)) {
|
|
1999
2036
|
const r = s;
|
|
2000
2037
|
return (n) => {
|
|
@@ -2011,17 +2048,17 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2011
2048
|
} else {
|
|
2012
2049
|
if (s) {
|
|
2013
2050
|
const n = e();
|
|
2014
|
-
return n != null ? f(n) :
|
|
2051
|
+
return n != null ? f(n) : E;
|
|
2015
2052
|
}
|
|
2016
2053
|
return f(t == null ? void 0 : t());
|
|
2017
2054
|
}
|
|
2018
|
-
},
|
|
2055
|
+
}, Ss = (s, e, t) => ke(
|
|
2019
2056
|
y.map(s, (r) => !r),
|
|
2020
2057
|
e,
|
|
2021
2058
|
t
|
|
2022
|
-
),
|
|
2059
|
+
), Ne = (s, e, t) => {
|
|
2023
2060
|
if (t != null)
|
|
2024
|
-
return
|
|
2061
|
+
return Ne(s, (r) => {
|
|
2025
2062
|
const n = new z(
|
|
2026
2063
|
r.index,
|
|
2027
2064
|
r.total.map((i) => i - 1)
|
|
@@ -2029,9 +2066,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2029
2066
|
return b(
|
|
2030
2067
|
H(n.dispose),
|
|
2031
2068
|
f(e(r)),
|
|
2032
|
-
|
|
2069
|
+
ke(
|
|
2033
2070
|
r.isLast,
|
|
2034
|
-
() =>
|
|
2071
|
+
() => E,
|
|
2035
2072
|
() => t(n)
|
|
2036
2073
|
)
|
|
2037
2074
|
);
|
|
@@ -2071,9 +2108,9 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2071
2108
|
})
|
|
2072
2109
|
);
|
|
2073
2110
|
}
|
|
2074
|
-
},
|
|
2111
|
+
}, As = (s, e, t) => {
|
|
2075
2112
|
const r = y.map(s, (i) => i.length), n = y.toSignal(s);
|
|
2076
|
-
return
|
|
2113
|
+
return Ne(
|
|
2077
2114
|
r,
|
|
2078
2115
|
(i) => {
|
|
2079
2116
|
const l = n.map((c) => c[i.index]);
|
|
@@ -2084,7 +2121,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2084
2121
|
},
|
|
2085
2122
|
t
|
|
2086
2123
|
);
|
|
2087
|
-
},
|
|
2124
|
+
}, _s = (s, e) => {
|
|
2088
2125
|
if (d.is(s)) {
|
|
2089
2126
|
const t = s;
|
|
2090
2127
|
return (r) => {
|
|
@@ -2101,7 +2138,7 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2101
2138
|
};
|
|
2102
2139
|
}
|
|
2103
2140
|
return f(e(s));
|
|
2104
|
-
},
|
|
2141
|
+
}, Es = (s, e, t = () => E) => Q(
|
|
2105
2142
|
y.map(
|
|
2106
2143
|
s,
|
|
2107
2144
|
(r) => r.length > 0 ? { notEmpty: r } : { whenEmpty: null }
|
|
@@ -2110,11 +2147,11 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2110
2147
|
notEmpty: (r) => e(r),
|
|
2111
2148
|
whenEmpty: () => t()
|
|
2112
2149
|
}
|
|
2113
|
-
),
|
|
2150
|
+
), vs = (s, e) => (t) => {
|
|
2114
2151
|
const r = t.makePortal(s), n = te(f(e), r);
|
|
2115
2152
|
return () => n(!0);
|
|
2116
|
-
}, j = /* @__PURE__ */ new Map(),
|
|
2117
|
-
mark:
|
|
2153
|
+
}, j = /* @__PURE__ */ new Map(), Ot = (s) => ({
|
|
2154
|
+
mark: et(`Probe(${s.description})`),
|
|
2118
2155
|
create: ({ callback: e = () => {
|
|
2119
2156
|
}, timeout: t = 10 } = {}) => {
|
|
2120
2157
|
const r = (c) => {
|
|
@@ -2133,30 +2170,27 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2133
2170
|
onUse: () => i.counter++
|
|
2134
2171
|
};
|
|
2135
2172
|
}
|
|
2136
|
-
}),
|
|
2173
|
+
}), ws = Ot(Symbol("GlobalProbe")), ue = (s, e) => (t) => {
|
|
2137
2174
|
const r = t.getStyle(s);
|
|
2138
2175
|
return t.setStyle(s, e), (n) => {
|
|
2139
2176
|
n && t.setStyle(s, r);
|
|
2140
2177
|
};
|
|
2141
|
-
},
|
|
2178
|
+
}, ae = (s, e) => (t) => {
|
|
2142
2179
|
const r = t.getStyle(s), n = e.on((i) => t.setStyle(s, i));
|
|
2143
2180
|
return (i) => {
|
|
2144
2181
|
n(), i && t.setStyle(s, r);
|
|
2145
2182
|
};
|
|
2146
|
-
},
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
get: (s, e) => (t) => d.is(t) ? xt(e, t) : Ct(e, t)
|
|
2158
|
-
}
|
|
2159
|
-
), Pt = (s) => (e) => {
|
|
2183
|
+
}, Cs = new Proxy({}, {
|
|
2184
|
+
/**
|
|
2185
|
+
* Creates a renderable component for the specified `style` property.
|
|
2186
|
+
*
|
|
2187
|
+
* @param _ - The target object.
|
|
2188
|
+
* @param name - The name of the CSS style property.
|
|
2189
|
+
* @returns The renderable component for the specified attribute.
|
|
2190
|
+
*
|
|
2191
|
+
*/
|
|
2192
|
+
get: (s, e) => e === "variable" ? (t, r) => d.is(r) ? ae(t, r) : ue(t, r) : (t) => d.is(t) ? ae(e, t) : ue(e, t)
|
|
2193
|
+
}), Mt = (s) => (e) => {
|
|
2160
2194
|
if (e.isBrowser()) {
|
|
2161
2195
|
const t = s(e);
|
|
2162
2196
|
if (t != null)
|
|
@@ -2164,11 +2198,11 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2164
2198
|
}
|
|
2165
2199
|
return () => {
|
|
2166
2200
|
};
|
|
2167
|
-
},
|
|
2201
|
+
}, xs = (s) => (e) => {
|
|
2168
2202
|
const t = s(e);
|
|
2169
2203
|
return t == null ? () => {
|
|
2170
2204
|
} : f(t)(e);
|
|
2171
|
-
},
|
|
2205
|
+
}, Ps = (s) => Mt((e) => s(e.element)), Ls = (s) => (e) => {
|
|
2172
2206
|
if (e.isHeadlessDOM()) {
|
|
2173
2207
|
const t = s(e);
|
|
2174
2208
|
if (t)
|
|
@@ -2199,124 +2233,124 @@ const ft = /* @__PURE__ */ new Set([
|
|
|
2199
2233
|
f(l),
|
|
2200
2234
|
H(() => i.forEach((c) => c()))
|
|
2201
2235
|
)(r());
|
|
2202
|
-
},
|
|
2236
|
+
}, Ds = (s, e, t) => se(({ set: r }) => (r(s, e), t())), Os = (s, e) => se(({ use: t }) => e(t(s))), Ms = (...s) => (e) => se(({ use: t }) => {
|
|
2203
2237
|
const r = s.map(t);
|
|
2204
2238
|
return e(...r);
|
|
2205
2239
|
});
|
|
2206
2240
|
export {
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2241
|
+
ns as Async,
|
|
2242
|
+
fs as BindChecked,
|
|
2243
|
+
cs as BindDate,
|
|
2244
|
+
us as BindDateTime,
|
|
2245
|
+
as as BindNumber,
|
|
2246
|
+
hs as BindText,
|
|
2213
2247
|
D as BrowserContext,
|
|
2214
2248
|
F as CLASS_PLACEHOLDER_ATTR,
|
|
2215
2249
|
L as Computed,
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2250
|
+
ms as Conjunction,
|
|
2251
|
+
ys as DOMNode,
|
|
2252
|
+
Le as El,
|
|
2253
|
+
De as ElNS,
|
|
2220
2254
|
z as ElementPosition,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2255
|
+
E as Empty,
|
|
2256
|
+
Ts as Ensure,
|
|
2257
|
+
bs as EnsureAll,
|
|
2258
|
+
As as ForEach,
|
|
2225
2259
|
b as Fragment,
|
|
2226
|
-
|
|
2227
|
-
|
|
2260
|
+
ws as GlobalProbe,
|
|
2261
|
+
Gt as HeadlessAdapter,
|
|
2228
2262
|
O as HeadlessContext,
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2263
|
+
mt as HeadlessElement,
|
|
2264
|
+
Ce as HeadlessPortal,
|
|
2265
|
+
yt as HeadlessText,
|
|
2266
|
+
_s as MapSignal,
|
|
2267
|
+
de as MemoryStore,
|
|
2268
|
+
Es as NotEmpty,
|
|
2269
|
+
vt as OnChecked,
|
|
2236
2270
|
H as OnDispose,
|
|
2237
2271
|
Q as OneOf,
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2272
|
+
He as OneOfField,
|
|
2273
|
+
ds as OneOfKind,
|
|
2274
|
+
ps as OneOfTuple,
|
|
2275
|
+
gs as OneOfType,
|
|
2276
|
+
Dt as OneOfValue,
|
|
2277
|
+
vs as Portal,
|
|
2244
2278
|
V as Prop,
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2279
|
+
Ds as Provide,
|
|
2280
|
+
Ae as ProviderNotFoundError,
|
|
2281
|
+
tt as RenderingError,
|
|
2282
|
+
Ne as Repeat,
|
|
2249
2283
|
d as Signal,
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2284
|
+
Oe as Task,
|
|
2285
|
+
Yt as TextNode,
|
|
2286
|
+
Ss as Unless,
|
|
2287
|
+
Os as Use,
|
|
2288
|
+
Ms as UseMany,
|
|
2255
2289
|
y as Value,
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2290
|
+
ke as When,
|
|
2291
|
+
Mt as WithBrowserCtx,
|
|
2292
|
+
xs as WithCtx,
|
|
2293
|
+
Ps as WithElement,
|
|
2294
|
+
Ls as WithHeadlessCtx,
|
|
2261
2295
|
se as WithProvider,
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2296
|
+
_e as _NODE_PLACEHOLDER_ATTR,
|
|
2297
|
+
Ke as _getSelfOrParentElement,
|
|
2298
|
+
Se as _isElement,
|
|
2299
|
+
ze as _makeGetter,
|
|
2300
|
+
Ze as _makeSetter,
|
|
2267
2301
|
q as _removeDOMNode,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2302
|
+
Pe as _signalText,
|
|
2303
|
+
xe as _staticText,
|
|
2304
|
+
Rt as animateSignal,
|
|
2305
|
+
Ye as animateSignals,
|
|
2306
|
+
Zt as aria,
|
|
2273
2307
|
M as attr,
|
|
2274
|
-
|
|
2275
|
-
|
|
2308
|
+
Bt as bind,
|
|
2309
|
+
Wt as coalesce,
|
|
2276
2310
|
K as computed,
|
|
2277
2311
|
ee as computedOf,
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2312
|
+
Qe as computedRecord,
|
|
2313
|
+
Qt as dataAttr,
|
|
2314
|
+
Vt as delaySignal,
|
|
2315
|
+
Ue as effect,
|
|
2316
|
+
Nt as effectOf,
|
|
2317
|
+
wt as emit,
|
|
2318
|
+
ls as emitChecked,
|
|
2285
2319
|
x as emitTarget,
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2320
|
+
Ct as emitValue,
|
|
2321
|
+
Pt as emitValueAsDate,
|
|
2322
|
+
Lt as emitValueAsDateTime,
|
|
2323
|
+
is as emitValueAsNullableDate,
|
|
2324
|
+
os as emitValueAsNullableDateTime,
|
|
2325
|
+
xt as emitValueAsNumber,
|
|
2326
|
+
Fe as endInterpolate,
|
|
2327
|
+
he as getWindow,
|
|
2328
|
+
Be as guessInterpolate,
|
|
2329
|
+
es as html,
|
|
2330
|
+
ts as input,
|
|
2331
|
+
qe as interpolateDate,
|
|
2332
|
+
je as interpolateNumber,
|
|
2333
|
+
Ve as interpolateString,
|
|
2334
|
+
kt as joinSignals,
|
|
2335
|
+
$t as localStorageProp,
|
|
2336
|
+
Ot as makeProbe,
|
|
2337
|
+
et as makeProviderMark,
|
|
2338
|
+
rs as math,
|
|
2339
|
+
Kt as mathAttr,
|
|
2340
|
+
jt as merge,
|
|
2307
2341
|
Y as on,
|
|
2308
|
-
|
|
2342
|
+
qt as previousSignal,
|
|
2309
2343
|
_ as prop,
|
|
2310
|
-
|
|
2344
|
+
Ut as render,
|
|
2311
2345
|
te as renderWithContext,
|
|
2312
2346
|
f as renderableOfTNode,
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2347
|
+
Xt as restoreTempoPlaceholders,
|
|
2348
|
+
Jt as runHeadless,
|
|
2349
|
+
It as sessionStorageProp,
|
|
2316
2350
|
X as signal,
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2351
|
+
Ft as slidingWindowSignal,
|
|
2352
|
+
pe as storedProp,
|
|
2353
|
+
Cs as style,
|
|
2354
|
+
ss as svg,
|
|
2355
|
+
zt as svgAttr
|
|
2322
2356
|
};
|