@jasonshimmy/custom-elements-runtime 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +4 -4
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +293 -291
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +1 -1
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -71,8 +71,8 @@ class ht {
|
|
|
71
71
|
"fill",
|
|
72
72
|
"copyWithin"
|
|
73
73
|
].includes(i) ? function(...u) {
|
|
74
|
-
const
|
|
75
|
-
return t.triggerUpdate(),
|
|
74
|
+
const m = o.apply(r, u);
|
|
75
|
+
return t.triggerUpdate(), m;
|
|
76
76
|
} : o;
|
|
77
77
|
},
|
|
78
78
|
set: (r, i, s) => (r[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
|
|
@@ -327,18 +327,18 @@ function pn(e, t, n = {}) {
|
|
|
327
327
|
F.cleanup(i);
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
const
|
|
330
|
+
const ve = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map(), Ue = 500;
|
|
331
331
|
function ne(e) {
|
|
332
|
-
if (
|
|
333
|
-
return
|
|
332
|
+
if (ve.has(e))
|
|
333
|
+
return ve.get(e);
|
|
334
334
|
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
335
|
-
return
|
|
335
|
+
return ve.size < Ue && ve.set(e, t), t;
|
|
336
336
|
}
|
|
337
337
|
function it(e) {
|
|
338
|
-
if (
|
|
339
|
-
return
|
|
338
|
+
if (xe.has(e))
|
|
339
|
+
return xe.get(e);
|
|
340
340
|
const t = e.replace(/-([a-z])/g, (n, r) => r.toUpperCase());
|
|
341
|
-
return
|
|
341
|
+
return xe.size < Ue && xe.set(e, t), t;
|
|
342
342
|
}
|
|
343
343
|
function ie(e) {
|
|
344
344
|
if (typeof e == "string") {
|
|
@@ -378,7 +378,7 @@ function se(e, ...t) {
|
|
|
378
378
|
function Oe(e, ...t) {
|
|
379
379
|
st && console.warn(e, ...t);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function mt(e, t, n) {
|
|
382
382
|
if (n)
|
|
383
383
|
for (const [r, i] of Object.entries(n)) {
|
|
384
384
|
let s, o = {};
|
|
@@ -395,14 +395,14 @@ function yt(e, t, n) {
|
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function yt(e, t, n, r) {
|
|
399
399
|
const i = (o, a) => {
|
|
400
400
|
if (o === a) return !0;
|
|
401
401
|
if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
|
|
402
402
|
if (Array.isArray(o) && Array.isArray(a))
|
|
403
403
|
return o.length !== a.length ? !1 : o.every((g, b) => i(g, a[b]));
|
|
404
|
-
const u = Object.keys(o),
|
|
405
|
-
return u.length !==
|
|
404
|
+
const u = Object.keys(o), m = Object.keys(a);
|
|
405
|
+
return u.length !== m.length ? !1 : u.every((g) => i(o[g], a[g]));
|
|
406
406
|
}, s = t.get(n);
|
|
407
407
|
if (s && !i(r, s.oldValue))
|
|
408
408
|
try {
|
|
@@ -440,10 +440,10 @@ function bt(e, t, n) {
|
|
|
440
440
|
function wt(e, t, n) {
|
|
441
441
|
t.props && bt(e, t.props, n);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function vt(e, t, n, r) {
|
|
444
444
|
e.onConnected && !n && (e.onConnected(t), r(!0));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function xt(e, t, n, r, i, s, o, a) {
|
|
447
447
|
e.onDisconnected && e.onDisconnected(t), n.forEach((u) => u()), r(), i(), s(!1), o(null), a(!1);
|
|
448
448
|
}
|
|
449
449
|
function kt(e, t, n, r, i) {
|
|
@@ -565,10 +565,10 @@ class Ct {
|
|
|
565
565
|
r = r.replace(new RegExp(b.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${l}#>>`);
|
|
566
566
|
}
|
|
567
567
|
const u = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
568
|
-
let
|
|
568
|
+
let m;
|
|
569
569
|
const g = /* @__PURE__ */ new Set();
|
|
570
|
-
for (; (
|
|
571
|
-
const b =
|
|
570
|
+
for (; (m = u.exec(r)) !== null; ) {
|
|
571
|
+
const b = m[1];
|
|
572
572
|
if (["true", "false", "null", "undefined"].includes(b) || /^[0-9]+$/.test(b) || b === "ctx" || g.has(b)) continue;
|
|
573
573
|
g.add(b);
|
|
574
574
|
const h = H(n, b);
|
|
@@ -615,21 +615,21 @@ class Ct {
|
|
|
615
615
|
s("?");
|
|
616
616
|
const p = o();
|
|
617
617
|
s(":");
|
|
618
|
-
const
|
|
619
|
-
return c ? p :
|
|
618
|
+
const y = o();
|
|
619
|
+
return c ? p : y;
|
|
620
620
|
}
|
|
621
621
|
return c;
|
|
622
622
|
}
|
|
623
623
|
function u() {
|
|
624
|
-
let c =
|
|
624
|
+
let c = m();
|
|
625
625
|
for (; i() && i().value === "||"; ) {
|
|
626
626
|
s("OP");
|
|
627
|
-
const p =
|
|
627
|
+
const p = m();
|
|
628
628
|
c = c || p;
|
|
629
629
|
}
|
|
630
630
|
return c;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function m() {
|
|
633
633
|
let c = g();
|
|
634
634
|
for (; i() && i().value === "&&"; ) {
|
|
635
635
|
s("OP");
|
|
@@ -641,19 +641,19 @@ class Ct {
|
|
|
641
641
|
function g() {
|
|
642
642
|
let c = b();
|
|
643
643
|
for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
|
|
644
|
-
const p = s("OP").value,
|
|
644
|
+
const p = s("OP").value, y = b();
|
|
645
645
|
switch (p) {
|
|
646
646
|
case "==":
|
|
647
|
-
c = c ==
|
|
647
|
+
c = c == y;
|
|
648
648
|
break;
|
|
649
649
|
case "!=":
|
|
650
|
-
c = c !=
|
|
650
|
+
c = c != y;
|
|
651
651
|
break;
|
|
652
652
|
case "===":
|
|
653
|
-
c = c ===
|
|
653
|
+
c = c === y;
|
|
654
654
|
break;
|
|
655
655
|
case "!==":
|
|
656
|
-
c = c !==
|
|
656
|
+
c = c !== y;
|
|
657
657
|
break;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
@@ -662,19 +662,19 @@ class Ct {
|
|
|
662
662
|
function b() {
|
|
663
663
|
let c = h();
|
|
664
664
|
for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
|
|
665
|
-
const p = s("OP").value,
|
|
665
|
+
const p = s("OP").value, y = h();
|
|
666
666
|
switch (p) {
|
|
667
667
|
case ">":
|
|
668
|
-
c = c >
|
|
668
|
+
c = c > y;
|
|
669
669
|
break;
|
|
670
670
|
case "<":
|
|
671
|
-
c = c <
|
|
671
|
+
c = c < y;
|
|
672
672
|
break;
|
|
673
673
|
case ">=":
|
|
674
|
-
c = c >=
|
|
674
|
+
c = c >= y;
|
|
675
675
|
break;
|
|
676
676
|
case "<=":
|
|
677
|
-
c = c <=
|
|
677
|
+
c = c <= y;
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
@@ -683,33 +683,33 @@ class Ct {
|
|
|
683
683
|
function h() {
|
|
684
684
|
let c = l();
|
|
685
685
|
for (; i() && (i().value === "+" || i().value === "-"); ) {
|
|
686
|
-
const p = s("OP").value,
|
|
687
|
-
c = p === "+" ? c +
|
|
686
|
+
const p = s("OP").value, y = l();
|
|
687
|
+
c = p === "+" ? c + y : c - y;
|
|
688
688
|
}
|
|
689
689
|
return c;
|
|
690
690
|
}
|
|
691
691
|
function l() {
|
|
692
692
|
let c = d();
|
|
693
693
|
for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
|
|
694
|
-
const p = s("OP").value,
|
|
694
|
+
const p = s("OP").value, y = d();
|
|
695
695
|
switch (p) {
|
|
696
696
|
case "*":
|
|
697
|
-
c = c *
|
|
697
|
+
c = c * y;
|
|
698
698
|
break;
|
|
699
699
|
case "/":
|
|
700
|
-
c = c /
|
|
700
|
+
c = c / y;
|
|
701
701
|
break;
|
|
702
702
|
case "%":
|
|
703
|
-
c = c %
|
|
703
|
+
c = c % y;
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
return c;
|
|
708
708
|
}
|
|
709
709
|
function d() {
|
|
710
|
-
return i() && i().value === "!" ? (s("OP"), !d()) : i() && i().value === "-" ? (s("OP"), -d()) :
|
|
710
|
+
return i() && i().value === "!" ? (s("OP"), !d()) : i() && i().value === "-" ? (s("OP"), -d()) : v();
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function v() {
|
|
713
713
|
const c = i();
|
|
714
714
|
if (c) {
|
|
715
715
|
if (c.type === "NUMBER")
|
|
@@ -851,7 +851,7 @@ function he(e, t, n) {
|
|
|
851
851
|
}
|
|
852
852
|
function _t(e, t, n, r, i, s, o, a) {
|
|
853
853
|
if (!s) return;
|
|
854
|
-
const u = t.includes("lazy"),
|
|
854
|
+
const u = t.includes("lazy"), m = t.includes("trim"), g = t.includes("number"), b = e && typeof e == "object" && "value" in e && typeof e.value < "u", h = () => {
|
|
855
855
|
if (b) {
|
|
856
856
|
const C = e.value;
|
|
857
857
|
return a && typeof C == "object" && C !== null ? C[a] : C;
|
|
@@ -860,7 +860,7 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
860
860
|
}, l = h();
|
|
861
861
|
let d = "text";
|
|
862
862
|
o instanceof HTMLInputElement ? d = r?.type || o.type || "text" : o instanceof HTMLSelectElement ? d = "select" : o instanceof HTMLTextAreaElement && (d = "textarea");
|
|
863
|
-
const
|
|
863
|
+
const v = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, c = v ? d === "checkbox" || d === "radio" ? "checked" : "value" : a ?? "modelValue";
|
|
864
864
|
if (d === "checkbox")
|
|
865
865
|
if (Array.isArray(l))
|
|
866
866
|
n[c] = l.includes(String(o?.getAttribute("value") ?? r?.value ?? ""));
|
|
@@ -888,13 +888,13 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
888
888
|
} catch {
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
const p = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input",
|
|
891
|
+
const p = u || d === "checkbox" || d === "radio" || d === "select" ? "change" : "input", y = (C) => {
|
|
892
892
|
if (C.isComposing || i._isComposing) return;
|
|
893
893
|
const k = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
|
|
894
894
|
if (C.isTrusted === !1 && !k) return;
|
|
895
895
|
const f = C.target;
|
|
896
896
|
if (!f || f._modelUpdating) return;
|
|
897
|
-
let
|
|
897
|
+
let x = f.value;
|
|
898
898
|
if (d === "checkbox") {
|
|
899
899
|
const T = h();
|
|
900
900
|
if (Array.isArray(T)) {
|
|
@@ -905,38 +905,38 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
905
905
|
const P = S.indexOf(R);
|
|
906
906
|
P > -1 && S.splice(P, 1);
|
|
907
907
|
}
|
|
908
|
-
|
|
908
|
+
x = S;
|
|
909
909
|
} else {
|
|
910
910
|
const R = f.getAttribute("true-value") ?? !0, S = f.getAttribute("false-value") ?? !1;
|
|
911
|
-
|
|
911
|
+
x = f.checked ? R : S;
|
|
912
912
|
}
|
|
913
913
|
} else if (d === "radio")
|
|
914
|
-
|
|
914
|
+
x = f.getAttribute("value") ?? f.value;
|
|
915
915
|
else if (d === "select" && f.multiple)
|
|
916
|
-
|
|
917
|
-
else if (
|
|
918
|
-
const T = Number(
|
|
919
|
-
isNaN(T) || (
|
|
916
|
+
x = Array.from(f.selectedOptions).map((T) => T.value);
|
|
917
|
+
else if (m && typeof x == "string" && (x = x.trim()), g) {
|
|
918
|
+
const T = Number(x);
|
|
919
|
+
isNaN(T) || (x = T);
|
|
920
920
|
}
|
|
921
921
|
const A = s._state || s, _ = h();
|
|
922
|
-
if (Array.isArray(
|
|
922
|
+
if (Array.isArray(x) && Array.isArray(_) ? JSON.stringify([...x].sort()) !== JSON.stringify([..._].sort()) : x !== _) {
|
|
923
923
|
f._modelUpdating = !0;
|
|
924
924
|
try {
|
|
925
925
|
if (b)
|
|
926
926
|
if (a && typeof e.value == "object" && e.value !== null) {
|
|
927
927
|
const T = { ...e.value };
|
|
928
|
-
T[a] =
|
|
928
|
+
T[a] = x, e.value = T;
|
|
929
929
|
} else
|
|
930
|
-
e.value =
|
|
930
|
+
e.value = x;
|
|
931
931
|
else
|
|
932
|
-
Ee(A, e,
|
|
932
|
+
Ee(A, e, x);
|
|
933
933
|
if (s._requestRender && s._requestRender(), s._triggerWatchers) {
|
|
934
934
|
const T = b ? "reactiveState" : e;
|
|
935
|
-
s._triggerWatchers(T,
|
|
935
|
+
s._triggerWatchers(T, x);
|
|
936
936
|
}
|
|
937
937
|
if (f) {
|
|
938
938
|
const T = `update:${ne(c)}`, R = new CustomEvent(T, {
|
|
939
|
-
detail:
|
|
939
|
+
detail: x,
|
|
940
940
|
bubbles: !0,
|
|
941
941
|
composed: !0
|
|
942
942
|
});
|
|
@@ -947,12 +947,12 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
|
-
if (
|
|
950
|
+
if (v) {
|
|
951
951
|
if (i[p]) {
|
|
952
952
|
const C = i[p];
|
|
953
953
|
o && oe.removeListener(o, p, C);
|
|
954
954
|
}
|
|
955
|
-
i[p] =
|
|
955
|
+
i[p] = y;
|
|
956
956
|
} else {
|
|
957
957
|
const C = `update:${ne(c)}`;
|
|
958
958
|
if (i[C]) {
|
|
@@ -960,15 +960,15 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
960
960
|
o && oe.removeListener(o, C, k);
|
|
961
961
|
}
|
|
962
962
|
i[C] = (k) => {
|
|
963
|
-
const f = s._state || s,
|
|
964
|
-
if (Array.isArray(
|
|
965
|
-
Ee(f, e,
|
|
963
|
+
const f = s._state || s, x = k.detail !== void 0 ? k.detail : k.target?.value, A = H(f, e);
|
|
964
|
+
if (Array.isArray(x) && Array.isArray(A) ? JSON.stringify([...x].sort()) !== JSON.stringify([...A].sort()) : x !== A) {
|
|
965
|
+
Ee(f, e, x), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, x);
|
|
966
966
|
const $ = k.target;
|
|
967
967
|
if ($) {
|
|
968
|
-
$[c] =
|
|
968
|
+
$[c] = x;
|
|
969
969
|
try {
|
|
970
970
|
const T = ne(c);
|
|
971
|
-
typeof
|
|
971
|
+
typeof x == "boolean" ? x ? $.setAttribute(T, "true") : $.setAttribute(T, "false") : $.setAttribute(T, String(x));
|
|
972
972
|
} catch {
|
|
973
973
|
}
|
|
974
974
|
queueMicrotask(() => {
|
|
@@ -982,16 +982,16 @@ function _t(e, t, n, r, i, s, o, a) {
|
|
|
982
982
|
i._isComposing = !1;
|
|
983
983
|
const k = C.target;
|
|
984
984
|
k && setTimeout(() => {
|
|
985
|
-
const f = k.value,
|
|
985
|
+
const f = k.value, x = s._state || s, A = H(x, e);
|
|
986
986
|
let _ = f;
|
|
987
|
-
if (
|
|
987
|
+
if (m && (_ = _.trim()), g) {
|
|
988
988
|
const T = Number(_);
|
|
989
989
|
isNaN(T) || (_ = T);
|
|
990
990
|
}
|
|
991
991
|
if (Array.isArray(_) && Array.isArray(A) ? JSON.stringify([..._].sort()) !== JSON.stringify([...A].sort()) : _ !== A) {
|
|
992
992
|
k._modelUpdating = !0;
|
|
993
993
|
try {
|
|
994
|
-
Ee(
|
|
994
|
+
Ee(x, e, _), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, _);
|
|
995
995
|
} finally {
|
|
996
996
|
setTimeout(() => k._modelUpdating = !1, 0);
|
|
997
997
|
}
|
|
@@ -1010,7 +1010,7 @@ function Et(e, t, n, r) {
|
|
|
1010
1010
|
else if (typeof e == "string") {
|
|
1011
1011
|
if (!r) return;
|
|
1012
1012
|
try {
|
|
1013
|
-
const i =
|
|
1013
|
+
const i = me(e, r);
|
|
1014
1014
|
if (typeof i == "object" && i !== null) {
|
|
1015
1015
|
for (const [s, o] of Object.entries(i))
|
|
1016
1016
|
s.startsWith("data-") || s.startsWith("aria-") || s === "class" ? n[s] = o : t[s] = o;
|
|
@@ -1029,7 +1029,7 @@ function $t(e, t, n) {
|
|
|
1029
1029
|
let r;
|
|
1030
1030
|
if (typeof e == "string") {
|
|
1031
1031
|
if (!n) return;
|
|
1032
|
-
r =
|
|
1032
|
+
r = me(e, n);
|
|
1033
1033
|
} else
|
|
1034
1034
|
r = e;
|
|
1035
1035
|
const i = t.style || "";
|
|
@@ -1050,14 +1050,14 @@ function $t(e, t, n) {
|
|
|
1050
1050
|
s = "display: none";
|
|
1051
1051
|
s !== i && (s ? t.style = s : delete t.style);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function me(e, t) {
|
|
1054
1054
|
return Ct.evaluate(e, t);
|
|
1055
1055
|
}
|
|
1056
1056
|
function St(e, t, n) {
|
|
1057
1057
|
let r;
|
|
1058
1058
|
if (typeof e == "string") {
|
|
1059
1059
|
if (!n) return;
|
|
1060
|
-
r =
|
|
1060
|
+
r = me(e, n);
|
|
1061
1061
|
} else
|
|
1062
1062
|
r = e;
|
|
1063
1063
|
let i = [];
|
|
@@ -1069,7 +1069,7 @@ function At(e, t, n) {
|
|
|
1069
1069
|
let r;
|
|
1070
1070
|
if (typeof e == "string") {
|
|
1071
1071
|
if (!n) return;
|
|
1072
|
-
r =
|
|
1072
|
+
r = me(e, n);
|
|
1073
1073
|
} else
|
|
1074
1074
|
r = e;
|
|
1075
1075
|
let i = "";
|
|
@@ -1079,7 +1079,7 @@ function At(e, t, n) {
|
|
|
1079
1079
|
const o = [];
|
|
1080
1080
|
for (const [a, u] of Object.entries(r))
|
|
1081
1081
|
if (u != null && u !== "") {
|
|
1082
|
-
const
|
|
1082
|
+
const m = a.replace(
|
|
1083
1083
|
/[A-Z]/g,
|
|
1084
1084
|
(h) => `-${h.toLowerCase()}`
|
|
1085
1085
|
), g = [
|
|
@@ -1109,7 +1109,7 @@ function At(e, t, n) {
|
|
|
1109
1109
|
"max-height"
|
|
1110
1110
|
];
|
|
1111
1111
|
let b = String(u);
|
|
1112
|
-
typeof u == "number" && g.includes(
|
|
1112
|
+
typeof u == "number" && g.includes(m) && (b = `${u}px`), o.push(`${m}: ${b}`);
|
|
1113
1113
|
}
|
|
1114
1114
|
i = o.join("; ") + (o.length > 0 ? ";" : "");
|
|
1115
1115
|
}
|
|
@@ -1118,16 +1118,16 @@ function At(e, t, n) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
function Tt(e, t, n) {
|
|
1120
1120
|
let r = e;
|
|
1121
|
-
typeof e == "string" && n && (r =
|
|
1121
|
+
typeof e == "string" && n && (r = me(e, n)), ee(r) ? t.reactiveRef = r : t.ref = r;
|
|
1122
1122
|
}
|
|
1123
1123
|
function at(e, t, n, r) {
|
|
1124
1124
|
const i = {}, s = { ...r || {} }, o = {};
|
|
1125
1125
|
for (const [a, u] of Object.entries(e)) {
|
|
1126
|
-
const { value:
|
|
1126
|
+
const { value: m, modifiers: g, arg: b } = u;
|
|
1127
1127
|
if (a === "model" || a.startsWith("model:")) {
|
|
1128
1128
|
const h = a.split(":"), l = h.length > 1 ? h[1] : b;
|
|
1129
1129
|
_t(
|
|
1130
|
-
|
|
1130
|
+
m,
|
|
1131
1131
|
// Pass the original value (could be string or reactive state object)
|
|
1132
1132
|
g,
|
|
1133
1133
|
i,
|
|
@@ -1141,19 +1141,19 @@ function at(e, t, n, r) {
|
|
|
1141
1141
|
}
|
|
1142
1142
|
switch (a) {
|
|
1143
1143
|
case "bind":
|
|
1144
|
-
Et(
|
|
1144
|
+
Et(m, i, s, t);
|
|
1145
1145
|
break;
|
|
1146
1146
|
case "show":
|
|
1147
|
-
$t(
|
|
1147
|
+
$t(m, s, t);
|
|
1148
1148
|
break;
|
|
1149
1149
|
case "class":
|
|
1150
|
-
St(
|
|
1150
|
+
St(m, s, t);
|
|
1151
1151
|
break;
|
|
1152
1152
|
case "style":
|
|
1153
|
-
At(
|
|
1153
|
+
At(m, s, t);
|
|
1154
1154
|
break;
|
|
1155
1155
|
case "ref":
|
|
1156
|
-
Tt(
|
|
1156
|
+
Tt(m, i, t);
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
@@ -1179,9 +1179,9 @@ function Be(e, t) {
|
|
|
1179
1179
|
].find((d) => d != null) ?? "";
|
|
1180
1180
|
a = l ? `${t}:${b}:${l}` : `${t}:${b}`;
|
|
1181
1181
|
}
|
|
1182
|
-
let u = a,
|
|
1182
|
+
let u = a, m = 1;
|
|
1183
1183
|
for (; s.has(u); )
|
|
1184
|
-
u = `${a}#${
|
|
1184
|
+
u = `${a}#${m++}`;
|
|
1185
1185
|
s.add(u);
|
|
1186
1186
|
let g = o.children;
|
|
1187
1187
|
return Array.isArray(g) && (g = Be(g, u)), { ...o, key: u, children: g };
|
|
@@ -1205,18 +1205,18 @@ function Ve(e, t, n, r) {
|
|
|
1205
1205
|
...t.attrs,
|
|
1206
1206
|
...n.attrs,
|
|
1207
1207
|
...s.attrs
|
|
1208
|
-
}, u = t.props ?? {},
|
|
1208
|
+
}, u = t.props ?? {}, m = o, g = n?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1209
1209
|
let b = !1;
|
|
1210
|
-
for (const d in { ...u, ...
|
|
1211
|
-
const
|
|
1212
|
-
if (
|
|
1210
|
+
for (const d in { ...u, ...m }) {
|
|
1211
|
+
const v = u[d], w = m[d];
|
|
1212
|
+
if (v !== w)
|
|
1213
1213
|
if (b = !0, d === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
|
|
1214
1214
|
e.value !== w && (e.value = w ?? "");
|
|
1215
1215
|
else if (d === "checked" && e instanceof HTMLInputElement)
|
|
1216
1216
|
e.checked = !!w;
|
|
1217
1217
|
else if (d.startsWith("on") && typeof w == "function") {
|
|
1218
1218
|
const c = ot(d);
|
|
1219
|
-
typeof
|
|
1219
|
+
typeof v == "function" && oe.removeListener(e, c, v), oe.addListener(e, c, w);
|
|
1220
1220
|
} else if (w == null)
|
|
1221
1221
|
e.removeAttribute(d);
|
|
1222
1222
|
else if ((n?.isCustomElement ?? t?.isCustomElement ?? !1) || d in e)
|
|
@@ -1227,15 +1227,15 @@ function Ve(e, t, n, r) {
|
|
|
1227
1227
|
else
|
|
1228
1228
|
w === !1 && e.removeAttribute(d);
|
|
1229
1229
|
}
|
|
1230
|
-
for (const [d,
|
|
1230
|
+
for (const [d, v] of Object.entries(
|
|
1231
1231
|
s.listeners || {}
|
|
1232
1232
|
))
|
|
1233
|
-
oe.addListener(e, d,
|
|
1233
|
+
oe.addListener(e, d, v);
|
|
1234
1234
|
const h = t.attrs ?? {}, l = a;
|
|
1235
1235
|
for (const d in { ...h, ...l }) {
|
|
1236
|
-
const
|
|
1237
|
-
let c =
|
|
1238
|
-
if (ee(
|
|
1236
|
+
const v = h[d], w = l[d];
|
|
1237
|
+
let c = v, p = w;
|
|
1238
|
+
if (ee(v) && (c = v.value), ee(w) && (p = w.value), c !== p)
|
|
1239
1239
|
if (b = !0, p == null || p === !1) {
|
|
1240
1240
|
if (e.removeAttribute(d), d === "value") {
|
|
1241
1241
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
|
|
@@ -1298,15 +1298,15 @@ function Ve(e, t, n, r) {
|
|
|
1298
1298
|
e.setAttribute(d, String(p));
|
|
1299
1299
|
continue;
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1302
|
-
if (g && !
|
|
1301
|
+
const y = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1302
|
+
if (g && !y && d.includes("-")) {
|
|
1303
1303
|
const C = it(d);
|
|
1304
1304
|
try {
|
|
1305
1305
|
e[C] = p;
|
|
1306
1306
|
} catch {
|
|
1307
1307
|
e.setAttribute(d, String(p));
|
|
1308
1308
|
}
|
|
1309
|
-
} else if (!
|
|
1309
|
+
} else if (!y && d in e)
|
|
1310
1310
|
try {
|
|
1311
1311
|
e[d] = p;
|
|
1312
1312
|
} catch {
|
|
@@ -1337,27 +1337,27 @@ function X(e, t, n) {
|
|
|
1337
1337
|
return e.key != null && (h.key = e.key), h;
|
|
1338
1338
|
}
|
|
1339
1339
|
if (e.tag === "#anchor") {
|
|
1340
|
-
const h = e, l = Array.isArray(h.children) ? h.children : [], d = document.createTextNode(""),
|
|
1341
|
-
h.key != null && (d.key = `${h.key}:start`,
|
|
1340
|
+
const h = e, l = Array.isArray(h.children) ? h.children : [], d = document.createTextNode(""), v = document.createTextNode("");
|
|
1341
|
+
h.key != null && (d.key = `${h.key}:start`, v.key = `${h.key}:end`), h._startNode = d, h._endNode = v;
|
|
1342
1342
|
const w = document.createDocumentFragment();
|
|
1343
1343
|
w.appendChild(d);
|
|
1344
1344
|
for (const c of l) {
|
|
1345
1345
|
const p = X(c, t);
|
|
1346
1346
|
w.appendChild(p);
|
|
1347
1347
|
}
|
|
1348
|
-
return w.appendChild(
|
|
1348
|
+
return w.appendChild(v), w;
|
|
1349
1349
|
}
|
|
1350
1350
|
const r = document.createElement(e.tag);
|
|
1351
1351
|
e.key != null && (r.key = e.key);
|
|
1352
1352
|
const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = at(o, t, r, s), u = {
|
|
1353
1353
|
...i,
|
|
1354
1354
|
...a.props
|
|
1355
|
-
},
|
|
1355
|
+
}, m = {
|
|
1356
1356
|
...s,
|
|
1357
1357
|
...a.attrs
|
|
1358
1358
|
}, g = r.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1359
|
-
for (const h in
|
|
1360
|
-
const l =
|
|
1359
|
+
for (const h in m) {
|
|
1360
|
+
const l = m[h];
|
|
1361
1361
|
if (!(typeof h != "string" || /\[object Object\]/.test(h))) {
|
|
1362
1362
|
if (typeof l == "boolean")
|
|
1363
1363
|
l && r.setAttribute(h, "");
|
|
@@ -1381,9 +1381,9 @@ function X(e, t, n) {
|
|
|
1381
1381
|
r.setAttribute(h, String(l));
|
|
1382
1382
|
}
|
|
1383
1383
|
else if ((e.props?.isCustomElement ?? !1) && !g && h.includes("-")) {
|
|
1384
|
-
const
|
|
1384
|
+
const v = it(h);
|
|
1385
1385
|
try {
|
|
1386
|
-
r[
|
|
1386
|
+
r[v] = l;
|
|
1387
1387
|
} catch {
|
|
1388
1388
|
r.setAttribute(h, String(l));
|
|
1389
1389
|
}
|
|
@@ -1409,8 +1409,8 @@ function X(e, t, n) {
|
|
|
1409
1409
|
r.removeAttribute(h);
|
|
1410
1410
|
else if ((e.props?.isCustomElement ?? !1) || h in r)
|
|
1411
1411
|
try {
|
|
1412
|
-
const
|
|
1413
|
-
r[h] =
|
|
1412
|
+
const v = typeof l == "object" && l !== null && typeof l.value < "u" ? l.value : l;
|
|
1413
|
+
r[h] = v;
|
|
1414
1414
|
} catch {
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
@@ -1441,9 +1441,9 @@ function X(e, t, n) {
|
|
|
1441
1441
|
r.appendChild(X(h, t, n));
|
|
1442
1442
|
else typeof e.children == "string" && (r.textContent = e.children);
|
|
1443
1443
|
try {
|
|
1444
|
-
if (r instanceof HTMLSelectElement &&
|
|
1444
|
+
if (r instanceof HTMLSelectElement && m && m.hasOwnProperty("value"))
|
|
1445
1445
|
try {
|
|
1446
|
-
r.value =
|
|
1446
|
+
r.value = m.value ?? "";
|
|
1447
1447
|
} catch {
|
|
1448
1448
|
}
|
|
1449
1449
|
} catch {
|
|
@@ -1464,28 +1464,28 @@ function Rt(e, t, n, r, i) {
|
|
|
1464
1464
|
const d = l.key;
|
|
1465
1465
|
d != null && u.set(d, l);
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1467
|
+
const m = /* @__PURE__ */ new Set();
|
|
1468
1468
|
let g = e.firstChild;
|
|
1469
1469
|
function b(l, d) {
|
|
1470
|
-
let
|
|
1471
|
-
for (;
|
|
1472
|
-
|
|
1470
|
+
let v = l;
|
|
1471
|
+
for (; v && (m.add(v), v !== d); )
|
|
1472
|
+
v = v.nextSibling;
|
|
1473
1473
|
}
|
|
1474
|
-
function h(l, d,
|
|
1474
|
+
function h(l, d, v, w) {
|
|
1475
1475
|
const c = [];
|
|
1476
1476
|
let p = l.nextSibling;
|
|
1477
1477
|
for (; p && p !== d; )
|
|
1478
1478
|
c.push(p), p = p.nextSibling;
|
|
1479
|
-
const
|
|
1480
|
-
if (w.some((k) => k && k.key != null) ||
|
|
1479
|
+
const y = Array.isArray(v) ? v : [];
|
|
1480
|
+
if (w.some((k) => k && k.key != null) || y.some((k) => k && k.key != null)) {
|
|
1481
1481
|
const k = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
1482
|
-
for (const _ of
|
|
1482
|
+
for (const _ of y)
|
|
1483
1483
|
_ && _.key != null && k.set(_.key, _);
|
|
1484
1484
|
for (const _ of c) {
|
|
1485
1485
|
const $ = _.key;
|
|
1486
1486
|
$ != null && f.set($, _);
|
|
1487
1487
|
}
|
|
1488
|
-
const
|
|
1488
|
+
const x = /* @__PURE__ */ new Set();
|
|
1489
1489
|
let A = l.nextSibling;
|
|
1490
1490
|
for (const _ of w) {
|
|
1491
1491
|
let $;
|
|
@@ -1496,20 +1496,20 @@ function Rt(e, t, n, r, i) {
|
|
|
1496
1496
|
T,
|
|
1497
1497
|
_,
|
|
1498
1498
|
r
|
|
1499
|
-
),
|
|
1499
|
+
), x.add($), $ !== A && e.contains($) && e.insertBefore($, A);
|
|
1500
1500
|
} else
|
|
1501
|
-
$ = X(_, r), e.insertBefore($, A),
|
|
1501
|
+
$ = X(_, r), e.insertBefore($, A), x.add($);
|
|
1502
1502
|
A = $.nextSibling;
|
|
1503
1503
|
}
|
|
1504
1504
|
for (const _ of c)
|
|
1505
|
-
!
|
|
1505
|
+
!x.has(_) && e.contains(_) && e.removeChild(_);
|
|
1506
1506
|
} else {
|
|
1507
1507
|
const k = Math.min(
|
|
1508
|
-
|
|
1508
|
+
y.length,
|
|
1509
1509
|
w.length
|
|
1510
1510
|
);
|
|
1511
1511
|
for (let f = 0; f < k; f++) {
|
|
1512
|
-
const
|
|
1512
|
+
const x = y[f], A = w[f], _ = $e(c[f], x, A, r);
|
|
1513
1513
|
_ !== c[f] && (e.insertBefore(_, c[f]), e.removeChild(c[f]));
|
|
1514
1514
|
}
|
|
1515
1515
|
for (let f = k; f < w.length; f++)
|
|
@@ -1521,39 +1521,39 @@ function Rt(e, t, n, r, i) {
|
|
|
1521
1521
|
for (const l of n) {
|
|
1522
1522
|
let d;
|
|
1523
1523
|
if (l.tag === "#anchor") {
|
|
1524
|
-
const
|
|
1525
|
-
let p = u.get(w),
|
|
1524
|
+
const v = l.key, w = `${v}:start`, c = `${v}:end`;
|
|
1525
|
+
let p = u.get(w), y = u.get(c);
|
|
1526
1526
|
const C = Array.isArray(l.children) ? l.children : [];
|
|
1527
|
-
if (p || (p = document.createTextNode(""), p.key = w),
|
|
1527
|
+
if (p || (p = document.createTextNode(""), p.key = w), y || (y = document.createTextNode(""), y.key = c), l._startNode = p, l._endNode = y, !e.contains(p) || !e.contains(y)) {
|
|
1528
1528
|
e.insertBefore(p, g);
|
|
1529
1529
|
for (const k of C)
|
|
1530
1530
|
e.insertBefore(X(k, r), g);
|
|
1531
|
-
e.insertBefore(
|
|
1531
|
+
e.insertBefore(y, g);
|
|
1532
1532
|
} else
|
|
1533
1533
|
h(
|
|
1534
1534
|
p,
|
|
1535
|
-
|
|
1536
|
-
a.get(
|
|
1535
|
+
y,
|
|
1536
|
+
a.get(v)?.children,
|
|
1537
1537
|
C
|
|
1538
1538
|
);
|
|
1539
|
-
b(p,
|
|
1539
|
+
b(p, y), g = y.nextSibling;
|
|
1540
1540
|
continue;
|
|
1541
1541
|
}
|
|
1542
1542
|
if (l.key != null && u.has(l.key)) {
|
|
1543
|
-
const
|
|
1543
|
+
const v = a.get(l.key);
|
|
1544
1544
|
d = $e(
|
|
1545
1545
|
u.get(l.key),
|
|
1546
|
-
|
|
1546
|
+
v,
|
|
1547
1547
|
l,
|
|
1548
1548
|
r,
|
|
1549
1549
|
i
|
|
1550
|
-
),
|
|
1550
|
+
), m.add(d), d !== g && e.contains(d) && (g && !e.contains(g) && (g = null), e.insertBefore(d, g));
|
|
1551
1551
|
} else
|
|
1552
|
-
d = X(l, r, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g),
|
|
1552
|
+
d = X(l, r, i), g && !e.contains(g) && (g = null), e.insertBefore(d, g), m.add(d);
|
|
1553
1553
|
g = d.nextSibling;
|
|
1554
1554
|
}
|
|
1555
1555
|
for (const l of s)
|
|
1556
|
-
!
|
|
1556
|
+
!m.has(l) && e.contains(l) && (ue(l, i), e.removeChild(l));
|
|
1557
1557
|
}
|
|
1558
1558
|
function $e(e, t, n, r, i) {
|
|
1559
1559
|
if (t && typeof t != "string" && t.props?.ref && i && ue(e, i), t === n) return e;
|
|
@@ -1566,15 +1566,15 @@ function $e(e, t, n, r, i) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
if (n && typeof n != "string" && n.tag === "#anchor") {
|
|
1569
|
-
const o = n, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""),
|
|
1570
|
-
o.key != null && (u.key = `${o.key}:start`,
|
|
1569
|
+
const o = n, a = Array.isArray(o.children) ? o.children : [], u = o._startNode ?? document.createTextNode(""), m = o._endNode ?? document.createTextNode("");
|
|
1570
|
+
o.key != null && (u.key = `${o.key}:start`, m.key = `${o.key}:end`), o._startNode = u, o._endNode = m;
|
|
1571
1571
|
const g = document.createDocumentFragment();
|
|
1572
1572
|
g.appendChild(u);
|
|
1573
1573
|
for (const b of a) {
|
|
1574
1574
|
const h = X(b, r);
|
|
1575
1575
|
g.appendChild(h);
|
|
1576
1576
|
}
|
|
1577
|
-
return g.appendChild(
|
|
1577
|
+
return g.appendChild(m), e.parentNode?.replaceChild(g, e), u;
|
|
1578
1578
|
}
|
|
1579
1579
|
if (!n) {
|
|
1580
1580
|
ue(e, i);
|
|
@@ -1589,11 +1589,11 @@ function $e(e, t, n, r, i) {
|
|
|
1589
1589
|
if (n.tag === "#anchor") {
|
|
1590
1590
|
const o = Array.isArray(n.children) ? n.children : [], a = n._startNode ?? document.createTextNode(""), u = n._endNode ?? document.createTextNode("");
|
|
1591
1591
|
n.key != null && (a.key = `${n.key}:start`, u.key = `${n.key}:end`), n._startNode = a, n._endNode = u;
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1592
|
+
const m = document.createDocumentFragment();
|
|
1593
|
+
m.appendChild(a);
|
|
1594
1594
|
for (const g of o)
|
|
1595
|
-
|
|
1596
|
-
return
|
|
1595
|
+
m.appendChild(X(g, r));
|
|
1596
|
+
return m.appendChild(u), e.parentNode?.replaceChild(m, e), a;
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof t != "string" && typeof n != "string" && t.tag === n.tag && t.key === n.key) {
|
|
1599
1599
|
const o = e;
|
|
@@ -1621,11 +1621,11 @@ function Ot(e, t, n, r) {
|
|
|
1621
1621
|
let a;
|
|
1622
1622
|
s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? a = $e(o, s, i, n, r) : (a = X(i, n, r), e.replaceChild(a, o)) : (a = X(i, n, r), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
|
|
1623
1623
|
const u = [];
|
|
1624
|
-
for (let
|
|
1625
|
-
const g = e.childNodes[
|
|
1624
|
+
for (let m = 0; m < e.childNodes.length; m++) {
|
|
1625
|
+
const g = e.childNodes[m];
|
|
1626
1626
|
g !== a && g.nodeName !== "STYLE" && (ue(g, r), u.push(g));
|
|
1627
1627
|
}
|
|
1628
|
-
u.forEach((
|
|
1628
|
+
u.forEach((m) => e.removeChild(m)), e._prevVNode = i, e._prevDom = a;
|
|
1629
1629
|
}
|
|
1630
1630
|
function Pe(e) {
|
|
1631
1631
|
if (typeof e == "string") return ie(e);
|
|
@@ -1878,6 +1878,8 @@ const Mt = Pt`
|
|
|
1878
1878
|
"max-h-screen": "max-height:100dvh;",
|
|
1879
1879
|
"min-w-0": "min-width:0;",
|
|
1880
1880
|
"min-h-0": "min-height:0;",
|
|
1881
|
+
"min-w-screen": "min-width:100dvw;",
|
|
1882
|
+
"min-h-screen": "min-height:100dvh;",
|
|
1881
1883
|
...zt(),
|
|
1882
1884
|
"m-auto": "margin:auto;",
|
|
1883
1885
|
"mx-auto": "margin-inline:auto;",
|
|
@@ -2266,23 +2268,23 @@ const Xe = /* @__PURE__ */ new Map(), Kt = 16;
|
|
|
2266
2268
|
function Vt(e) {
|
|
2267
2269
|
const t = Date.now(), n = Xe.get(e);
|
|
2268
2270
|
if (n && t - n.timestamp < Kt) return n.css;
|
|
2269
|
-
const r = Ft(e), i = new Set(r), s = [], o = [], a = [], u = [],
|
|
2271
|
+
const r = Ft(e), i = new Set(r), s = [], o = [], a = [], u = [], m = {};
|
|
2270
2272
|
function g(w, c = !1) {
|
|
2271
2273
|
const p = (c ? "dark|" : "") + w;
|
|
2272
|
-
if (p in
|
|
2273
|
-
const
|
|
2274
|
-
return
|
|
2274
|
+
if (p in m) return m[p];
|
|
2275
|
+
const y = d(w, c);
|
|
2276
|
+
return m[p] = y, y;
|
|
2275
2277
|
}
|
|
2276
2278
|
function b(w) {
|
|
2277
|
-
const c = w.some((
|
|
2279
|
+
const c = w.some((y) => je.includes(y)), p = w.includes("dark");
|
|
2278
2280
|
return w.length === 0 ? 1 : !c && !p ? 2 : c && !p ? 3 : 4;
|
|
2279
2281
|
}
|
|
2280
2282
|
function h(w) {
|
|
2281
2283
|
const c = [];
|
|
2282
|
-
let p = "",
|
|
2284
|
+
let p = "", y = 0, C = 0;
|
|
2283
2285
|
for (let k = 0; k < w.length; k++) {
|
|
2284
2286
|
const f = w[k];
|
|
2285
|
-
f === "[" ?
|
|
2287
|
+
f === "[" ? y++ : f === "]" && y > 0 ? y-- : f === "(" ? C++ : f === ")" && C > 0 && C--, f === ":" && y === 0 && C === 0 ? (c.push(p), p = "") : p += f;
|
|
2286
2288
|
}
|
|
2287
2289
|
return p && c.push(p), c;
|
|
2288
2290
|
}
|
|
@@ -2318,15 +2320,15 @@ function Vt(e) {
|
|
|
2318
2320
|
}
|
|
2319
2321
|
function d(w, c = !1) {
|
|
2320
2322
|
const p = h(w);
|
|
2321
|
-
let
|
|
2322
|
-
const C = p.find((E) => (E.startsWith("!") && (
|
|
2323
|
+
let y = !1;
|
|
2324
|
+
const C = p.find((E) => (E.startsWith("!") && (y = !0, E = E.slice(1)), Le[E] || Ne(E) || ze(E) || We(E) || Se(E)));
|
|
2323
2325
|
if (!C) return null;
|
|
2324
2326
|
const k = C.replace(/^!/, ""), f = Le[k] ?? Ne(k) ?? ze(k) ?? We(k) ?? Se(k);
|
|
2325
2327
|
if (!f) return null;
|
|
2326
|
-
const
|
|
2327
|
-
let A =
|
|
2328
|
+
const x = p.indexOf(C);
|
|
2329
|
+
let A = x >= 0 ? p.slice(0, x) : [];
|
|
2328
2330
|
c && (A = A.filter((E) => E !== "dark"));
|
|
2329
|
-
const _ = `.${qt(w)}`, $ = "__SUBJECT__", T =
|
|
2331
|
+
const _ = `.${qt(w)}`, $ = "__SUBJECT__", T = y ? f.replace(/;$/, " !important;") : f;
|
|
2330
2332
|
let R = $;
|
|
2331
2333
|
const S = [];
|
|
2332
2334
|
for (const E of A)
|
|
@@ -2393,7 +2395,7 @@ function Vt(e) {
|
|
|
2393
2395
|
(f) => Le[f] || Ne(f) || ze(f) || We(f) || Se(f)
|
|
2394
2396
|
);
|
|
2395
2397
|
if (!p) continue;
|
|
2396
|
-
const
|
|
2398
|
+
const y = c.indexOf(p), C = y >= 0 ? c.slice(0, y) : [], k = b(C);
|
|
2397
2399
|
if (k === 4) {
|
|
2398
2400
|
const f = g(w, !0);
|
|
2399
2401
|
f && u.push(f);
|
|
@@ -2402,8 +2404,8 @@ function Vt(e) {
|
|
|
2402
2404
|
f && (k === 1 ? s.push(f) : k === 2 ? o.push(f) : k === 3 && a.push(f));
|
|
2403
2405
|
}
|
|
2404
2406
|
}
|
|
2405
|
-
const
|
|
2406
|
-
return Xe.set(e, { css:
|
|
2407
|
+
const v = [...s, ...o, ...a, ...u].join("");
|
|
2408
|
+
return Xe.set(e, { css: v, timestamp: t }), v;
|
|
2407
2409
|
}
|
|
2408
2410
|
const ge = [];
|
|
2409
2411
|
function Jt(e, t, n, r, i, s, o, a) {
|
|
@@ -2412,10 +2414,10 @@ function Jt(e, t, n, r, i, s, o, a) {
|
|
|
2412
2414
|
try {
|
|
2413
2415
|
const u = t.render(n);
|
|
2414
2416
|
if (u instanceof Promise) {
|
|
2415
|
-
s(!0), u.then((
|
|
2416
|
-
s(!1), o(null), Ye(e,
|
|
2417
|
-
}).catch((
|
|
2418
|
-
s(!1), o(
|
|
2417
|
+
s(!0), u.then((m) => {
|
|
2418
|
+
s(!1), o(null), Ye(e, m, n, r, i), a(e.innerHTML);
|
|
2419
|
+
}).catch((m) => {
|
|
2420
|
+
s(!1), o(m);
|
|
2419
2421
|
});
|
|
2420
2422
|
return;
|
|
2421
2423
|
}
|
|
@@ -2455,10 +2457,10 @@ Stopping runaway component render to prevent browser freeze`
|
|
|
2455
2457
|
}
|
|
2456
2458
|
} else
|
|
2457
2459
|
i(0);
|
|
2458
|
-
const
|
|
2460
|
+
const m = setTimeout(() => {
|
|
2459
2461
|
r(Date.now()), e(), o(null);
|
|
2460
2462
|
}, n > 10 ? 100 : 0);
|
|
2461
|
-
o(
|
|
2463
|
+
o(m);
|
|
2462
2464
|
}
|
|
2463
2465
|
function Gt(e, t, n, r, i) {
|
|
2464
2466
|
if (!e) return;
|
|
@@ -2489,7 +2491,7 @@ function hn() {
|
|
|
2489
2491
|
const e = N.emit;
|
|
2490
2492
|
return (t, n) => e(t, n);
|
|
2491
2493
|
}
|
|
2492
|
-
function
|
|
2494
|
+
function ye(e) {
|
|
2493
2495
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
2494
2496
|
value: {},
|
|
2495
2497
|
writable: !0,
|
|
@@ -2500,27 +2502,27 @@ function me(e) {
|
|
|
2500
2502
|
function gn(e) {
|
|
2501
2503
|
if (!N)
|
|
2502
2504
|
throw new Error("useOnConnected must be called during component render");
|
|
2503
|
-
|
|
2505
|
+
ye(N), N._hookCallbacks.onConnected = e;
|
|
2504
2506
|
}
|
|
2505
|
-
function
|
|
2507
|
+
function mn(e) {
|
|
2506
2508
|
if (!N)
|
|
2507
2509
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2508
|
-
|
|
2510
|
+
ye(N), N._hookCallbacks.onDisconnected = e;
|
|
2509
2511
|
}
|
|
2510
|
-
function
|
|
2512
|
+
function yn(e) {
|
|
2511
2513
|
if (!N)
|
|
2512
2514
|
throw new Error("useOnAttributeChanged must be called during component render");
|
|
2513
|
-
|
|
2515
|
+
ye(N), N._hookCallbacks.onAttributeChanged = e;
|
|
2514
2516
|
}
|
|
2515
2517
|
function bn(e) {
|
|
2516
2518
|
if (!N)
|
|
2517
2519
|
throw new Error("useOnError must be called during component render");
|
|
2518
|
-
|
|
2520
|
+
ye(N), N._hookCallbacks.onError = e;
|
|
2519
2521
|
}
|
|
2520
2522
|
function wn(e) {
|
|
2521
2523
|
if (!N)
|
|
2522
2524
|
throw new Error("useStyle must be called during component render");
|
|
2523
|
-
|
|
2525
|
+
ye(N);
|
|
2524
2526
|
try {
|
|
2525
2527
|
const t = e();
|
|
2526
2528
|
Object.defineProperty(N, "_computedStyle", {
|
|
@@ -2650,7 +2652,7 @@ function Qt(e, t) {
|
|
|
2650
2652
|
}
|
|
2651
2653
|
connectedCallback() {
|
|
2652
2654
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2653
|
-
this._applyProps(t), this._requestRender(),
|
|
2655
|
+
this._applyProps(t), this._requestRender(), vt(
|
|
2654
2656
|
t,
|
|
2655
2657
|
this.context,
|
|
2656
2658
|
this._mounted,
|
|
@@ -2662,7 +2664,7 @@ function Qt(e, t) {
|
|
|
2662
2664
|
}
|
|
2663
2665
|
disconnectedCallback() {
|
|
2664
2666
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2665
|
-
|
|
2667
|
+
xt(
|
|
2666
2668
|
t,
|
|
2667
2669
|
this.context,
|
|
2668
2670
|
this._listeners,
|
|
@@ -2773,8 +2775,8 @@ function Qt(e, t) {
|
|
|
2773
2775
|
try {
|
|
2774
2776
|
let r = function(s, o = "") {
|
|
2775
2777
|
return Array.isArray(s) ? new Proxy(s, {
|
|
2776
|
-
get(a, u,
|
|
2777
|
-
const g = Reflect.get(a, u,
|
|
2778
|
+
get(a, u, m) {
|
|
2779
|
+
const g = Reflect.get(a, u, m);
|
|
2778
2780
|
return typeof g == "function" && typeof u == "string" && [
|
|
2779
2781
|
"push",
|
|
2780
2782
|
"pop",
|
|
@@ -2792,17 +2794,17 @@ function Qt(e, t) {
|
|
|
2792
2794
|
return l;
|
|
2793
2795
|
} : g;
|
|
2794
2796
|
},
|
|
2795
|
-
set(a, u,
|
|
2796
|
-
if (a[u] =
|
|
2797
|
+
set(a, u, m) {
|
|
2798
|
+
if (a[u] = m, !i._initializing) {
|
|
2797
2799
|
const g = o ? `${o}.${String(u)}` : String(u);
|
|
2798
|
-
i._triggerWatchers(g,
|
|
2800
|
+
i._triggerWatchers(g, m), fe(() => i._render(n), i._componentId);
|
|
2799
2801
|
}
|
|
2800
2802
|
return !0;
|
|
2801
2803
|
},
|
|
2802
2804
|
deleteProperty(a, u) {
|
|
2803
2805
|
if (delete a[u], !i._initializing) {
|
|
2804
|
-
const
|
|
2805
|
-
i._triggerWatchers(
|
|
2806
|
+
const m = o ? `${o}.${String(u)}` : String(u);
|
|
2807
|
+
i._triggerWatchers(m, void 0), fe(() => i._render(n), i._componentId);
|
|
2806
2808
|
}
|
|
2807
2809
|
return !0;
|
|
2808
2810
|
}
|
|
@@ -2810,15 +2812,15 @@ function Qt(e, t) {
|
|
|
2810
2812
|
const u = o ? `${o}.${a}` : a;
|
|
2811
2813
|
s[a] = r(s[a], u);
|
|
2812
2814
|
}), new Proxy(s, {
|
|
2813
|
-
set(a, u,
|
|
2815
|
+
set(a, u, m) {
|
|
2814
2816
|
const g = o ? `${o}.${String(u)}` : String(u);
|
|
2815
|
-
return a[u] = r(
|
|
2817
|
+
return a[u] = r(m, g), i._initializing || (i._triggerWatchers(
|
|
2816
2818
|
g,
|
|
2817
2819
|
a[u]
|
|
2818
2820
|
), fe(() => i._render(n), i._componentId)), !0;
|
|
2819
2821
|
},
|
|
2820
|
-
get(a, u,
|
|
2821
|
-
return Reflect.get(a, u,
|
|
2822
|
+
get(a, u, m) {
|
|
2823
|
+
return Reflect.get(a, u, m);
|
|
2822
2824
|
}
|
|
2823
2825
|
})) : s;
|
|
2824
2826
|
};
|
|
@@ -2836,7 +2838,7 @@ function Qt(e, t) {
|
|
|
2836
2838
|
}
|
|
2837
2839
|
_initWatchers(n) {
|
|
2838
2840
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
2839
|
-
|
|
2841
|
+
mt(
|
|
2840
2842
|
this.context,
|
|
2841
2843
|
this._watchers,
|
|
2842
2844
|
{}
|
|
@@ -2845,7 +2847,7 @@ function Qt(e, t) {
|
|
|
2845
2847
|
});
|
|
2846
2848
|
}
|
|
2847
2849
|
_triggerWatchers(n, r) {
|
|
2848
|
-
|
|
2850
|
+
yt(this.context, this._watchers, n, r);
|
|
2849
2851
|
}
|
|
2850
2852
|
_applyProps(n) {
|
|
2851
2853
|
this._runLogicWithinErrorBoundary(n, () => {
|
|
@@ -2866,8 +2868,8 @@ function et(e, t) {
|
|
|
2866
2868
|
try {
|
|
2867
2869
|
const a = t.toString().match(/\(\s*{\s*([^}]+)\s*}/);
|
|
2868
2870
|
if (a) {
|
|
2869
|
-
const
|
|
2870
|
-
for (const g of
|
|
2871
|
+
const m = a[1].split(",").map((g) => g.trim());
|
|
2872
|
+
for (const g of m) {
|
|
2871
2873
|
const b = g.indexOf("=");
|
|
2872
2874
|
if (b !== -1) {
|
|
2873
2875
|
const h = g.substring(0, b).trim(), l = g.substring(b + 1).trim();
|
|
@@ -2897,7 +2899,7 @@ function et(e, t) {
|
|
|
2897
2899
|
onDisconnected: (o) => {
|
|
2898
2900
|
i.onDisconnected && i.onDisconnected();
|
|
2899
2901
|
},
|
|
2900
|
-
onAttributeChanged: (o, a, u,
|
|
2902
|
+
onAttributeChanged: (o, a, u, m) => {
|
|
2901
2903
|
i.onAttributeChanged && i.onAttributeChanged(o, a, u);
|
|
2902
2904
|
},
|
|
2903
2905
|
onError: (o, a) => {
|
|
@@ -2911,19 +2913,19 @@ function et(e, t) {
|
|
|
2911
2913
|
try {
|
|
2912
2914
|
Xt(o);
|
|
2913
2915
|
const u = Object.keys(r).length > 0;
|
|
2914
|
-
let
|
|
2916
|
+
let m;
|
|
2915
2917
|
if (u) {
|
|
2916
2918
|
const g = {};
|
|
2917
2919
|
Object.keys(r).forEach((b) => {
|
|
2918
2920
|
g[b] = o[b] ?? r[b];
|
|
2919
|
-
}),
|
|
2921
|
+
}), m = t(g);
|
|
2920
2922
|
} else
|
|
2921
|
-
|
|
2923
|
+
m = t();
|
|
2922
2924
|
if (o._hookCallbacks) {
|
|
2923
2925
|
const g = o._hookCallbacks;
|
|
2924
2926
|
g.onConnected && (i.onConnected = g.onConnected), g.onDisconnected && (i.onDisconnected = g.onDisconnected), g.onAttributeChanged && (i.onAttributeChanged = g.onAttributeChanged), g.onError && (i.onError = g.onError), g.style && (o._styleCallback = g.style);
|
|
2925
2927
|
}
|
|
2926
|
-
return
|
|
2928
|
+
return m;
|
|
2927
2929
|
} finally {
|
|
2928
2930
|
Yt(), F.clearCurrentComponent();
|
|
2929
2931
|
}
|
|
@@ -2986,33 +2988,33 @@ function rn(e, t = [], n = {}) {
|
|
|
2986
2988
|
const r = {}, i = {}, s = {}, o = [], a = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
|
|
2987
2989
|
let u;
|
|
2988
2990
|
for (; u = a.exec(e); ) {
|
|
2989
|
-
const
|
|
2991
|
+
const m = u[1], g = u[2], b = (u[4] || u[6]) ?? "", h = b.match(/^{{(\d+)}}$/);
|
|
2990
2992
|
let l = h ? t[Number(h[1])] ?? null : b;
|
|
2991
2993
|
h || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
|
|
2992
2994
|
const d = ["model", "bind", "show", "class", "style", "ref"];
|
|
2993
|
-
if (
|
|
2994
|
-
const [
|
|
2995
|
+
if (m === ":") {
|
|
2996
|
+
const [v, w] = g.split(":"), [c, ...p] = v.split(".");
|
|
2995
2997
|
if (d.includes(c)) {
|
|
2996
|
-
const
|
|
2998
|
+
const y = [...p], C = c === "model" && w ? `model:${w}` : c;
|
|
2997
2999
|
s[C] = {
|
|
2998
3000
|
value: l,
|
|
2999
|
-
modifiers:
|
|
3001
|
+
modifiers: y,
|
|
3000
3002
|
arg: w
|
|
3001
3003
|
};
|
|
3002
3004
|
} else {
|
|
3003
|
-
let
|
|
3004
|
-
|
|
3005
|
+
let y = l;
|
|
3006
|
+
y && ee(y) && (y = y.value), i[g] = y, o.push(g);
|
|
3005
3007
|
}
|
|
3006
|
-
} else if (
|
|
3007
|
-
const [
|
|
3008
|
-
tn(l,
|
|
3008
|
+
} else if (m === "@") {
|
|
3009
|
+
const [v, ...w] = g.split("."), c = w;
|
|
3010
|
+
tn(l, v);
|
|
3009
3011
|
const p = typeof l == "function" ? l : typeof n[l] == "function" ? n[l] : void 0;
|
|
3010
3012
|
if (p) {
|
|
3011
|
-
const
|
|
3013
|
+
const y = (k) => {
|
|
3012
3014
|
if (c.includes("prevent") && k.preventDefault(), c.includes("stop") && k.stopPropagation(), !(c.includes("self") && k.target !== k.currentTarget))
|
|
3013
|
-
return c.includes("once") && k.currentTarget?.removeEventListener(
|
|
3014
|
-
}, C = "on" +
|
|
3015
|
-
r[C] =
|
|
3015
|
+
return c.includes("once") && k.currentTarget?.removeEventListener(v, y), p(k);
|
|
3016
|
+
}, C = "on" + v.charAt(0).toUpperCase() + v.slice(1);
|
|
3017
|
+
r[C] = y;
|
|
3016
3018
|
}
|
|
3017
3019
|
} else g === "ref" ? r.ref = l : i[g] = l;
|
|
3018
3020
|
}
|
|
@@ -3024,35 +3026,35 @@ function sn(e, t, n) {
|
|
|
3024
3026
|
const f = De.get(o);
|
|
3025
3027
|
if (f) return f;
|
|
3026
3028
|
}
|
|
3027
|
-
function a(f,
|
|
3028
|
-
return pe("#text", {}, f,
|
|
3029
|
+
function a(f, x) {
|
|
3030
|
+
return pe("#text", {}, f, x);
|
|
3029
3031
|
}
|
|
3030
3032
|
let u = "";
|
|
3031
3033
|
for (let f = 0; f < e.length; f++)
|
|
3032
3034
|
u += e[f], f < t.length && (u += `{{${f}}}`);
|
|
3033
|
-
const
|
|
3034
|
-
let b, h = [], l = null, d = {},
|
|
3035
|
+
const m = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, g = [];
|
|
3036
|
+
let b, h = [], l = null, d = {}, v, w = 0, c = [];
|
|
3035
3037
|
function p(f) {
|
|
3036
|
-
!f || typeof f != "object" || Ae(f) || (f.props || f.attrs ? (f.props && (d.props || (d.props = {}), Object.assign(d.props, f.props)), f.attrs && (d.attrs || (d.attrs = {}), Object.keys(f.attrs).forEach((
|
|
3037
|
-
if (
|
|
3038
|
+
!f || typeof f != "object" || Ae(f) || (f.props || f.attrs ? (f.props && (d.props || (d.props = {}), Object.assign(d.props, f.props)), f.attrs && (d.attrs || (d.attrs = {}), Object.keys(f.attrs).forEach((x) => {
|
|
3039
|
+
if (x === "style" && d.attrs.style) {
|
|
3038
3040
|
const A = d.attrs.style.replace(
|
|
3039
3041
|
/;?\s*$/,
|
|
3040
3042
|
""
|
|
3041
3043
|
), _ = f.attrs.style.replace(/^;?\s*/, "");
|
|
3042
3044
|
d.attrs.style = A + "; " + _;
|
|
3043
|
-
} else if (
|
|
3045
|
+
} else if (x === "class" && d.attrs.class) {
|
|
3044
3046
|
const A = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = f.attrs.class.trim().split(/\s+/).filter(Boolean), $ = [
|
|
3045
3047
|
.../* @__PURE__ */ new Set([...A, ..._])
|
|
3046
3048
|
];
|
|
3047
3049
|
d.attrs.class = $.join(" ");
|
|
3048
3050
|
} else
|
|
3049
|
-
d.attrs[
|
|
3051
|
+
d.attrs[x] = f.attrs[x];
|
|
3050
3052
|
}))) : (d.props || (d.props = {}), Object.assign(d.props, f)));
|
|
3051
3053
|
}
|
|
3052
|
-
function
|
|
3054
|
+
function y(f, x) {
|
|
3053
3055
|
const A = l ? h : c;
|
|
3054
3056
|
if (Ae(f)) {
|
|
3055
|
-
const _ = f.key ??
|
|
3057
|
+
const _ = f.key ?? x;
|
|
3056
3058
|
let $ = f.children;
|
|
3057
3059
|
A.push({
|
|
3058
3060
|
...f,
|
|
@@ -3069,7 +3071,7 @@ function sn(e, t, n) {
|
|
|
3069
3071
|
if (f.length === 0) return;
|
|
3070
3072
|
for (let _ = 0; _ < f.length; _++) {
|
|
3071
3073
|
const $ = f[_];
|
|
3072
|
-
Ae($) || _e($) || Array.isArray($) ?
|
|
3074
|
+
Ae($) || _e($) || Array.isArray($) ? y($, `${x}-${_}`) : $ !== null && typeof $ == "object" ? p($) : A.push(a(String($), `${x}-${_}`));
|
|
3073
3075
|
}
|
|
3074
3076
|
return;
|
|
3075
3077
|
}
|
|
@@ -3077,7 +3079,7 @@ function sn(e, t, n) {
|
|
|
3077
3079
|
p(f);
|
|
3078
3080
|
return;
|
|
3079
3081
|
}
|
|
3080
|
-
A.push(a(String(f),
|
|
3082
|
+
A.push(a(String(f), x));
|
|
3081
3083
|
}
|
|
3082
3084
|
const C = /* @__PURE__ */ new Set([
|
|
3083
3085
|
"area",
|
|
@@ -3095,10 +3097,10 @@ function sn(e, t, n) {
|
|
|
3095
3097
|
"track",
|
|
3096
3098
|
"wbr"
|
|
3097
3099
|
]);
|
|
3098
|
-
for (; b =
|
|
3100
|
+
for (; b = m.exec(u); )
|
|
3099
3101
|
if (!(b[0].startsWith("<!--") && b[0].endsWith("-->"))) {
|
|
3100
3102
|
if (b[1]) {
|
|
3101
|
-
const f = b[1],
|
|
3103
|
+
const f = b[1], x = b[0][1] === "/", A = b[0][b[0].length - 2] === "/" || C.has(f), {
|
|
3102
3104
|
props: _,
|
|
3103
3105
|
attrs: $,
|
|
3104
3106
|
directives: T,
|
|
@@ -3170,34 +3172,34 @@ function sn(e, t, n) {
|
|
|
3170
3172
|
}
|
|
3171
3173
|
} catch {
|
|
3172
3174
|
}
|
|
3173
|
-
if (Object.keys(T).length > 0 && (S.directives = { ...T }),
|
|
3175
|
+
if (Object.keys(T).length > 0 && (S.directives = { ...T }), x) {
|
|
3174
3176
|
const P = pe(
|
|
3175
3177
|
l,
|
|
3176
3178
|
d,
|
|
3177
3179
|
h.length === 1 && _e(h[0]) && h[0].tag === "#text" ? typeof h[0].children == "string" ? h[0].children : "" : h.length ? h : void 0,
|
|
3178
|
-
|
|
3180
|
+
v
|
|
3179
3181
|
), B = g.pop();
|
|
3180
|
-
B ? (l = B.tag, d = B.props,
|
|
3182
|
+
B ? (l = B.tag, d = B.props, v = B.key, h = B.children, h.push(P)) : (c.push(P), l = null, d = {}, v = void 0, h = []);
|
|
3181
3183
|
} else A ? l ? h.push(pe(f, S, void 0, void 0)) : c.push(pe(f, S, void 0, void 0)) : (l && g.push({
|
|
3182
3184
|
tag: l,
|
|
3183
3185
|
props: d,
|
|
3184
3186
|
children: h,
|
|
3185
|
-
key:
|
|
3187
|
+
key: v
|
|
3186
3188
|
}), l = f, d = S, h = []);
|
|
3187
3189
|
} else if (typeof b[3] < "u") {
|
|
3188
|
-
const f = Number(b[3]),
|
|
3189
|
-
|
|
3190
|
+
const f = Number(b[3]), x = t[f], A = `interp-${f}`;
|
|
3191
|
+
y(x, A);
|
|
3190
3192
|
} else if (b[4]) {
|
|
3191
|
-
const f = b[4],
|
|
3193
|
+
const f = b[4], x = l ? h : c, A = f.split(/({{\d+}})/);
|
|
3192
3194
|
for (const _ of A) {
|
|
3193
3195
|
if (!_) continue;
|
|
3194
3196
|
const $ = _.match(/^{{(\d+)}}$/);
|
|
3195
3197
|
if ($) {
|
|
3196
3198
|
const T = Number($[1]), R = t[T], S = `interp-${T}`;
|
|
3197
|
-
|
|
3199
|
+
y(R, S);
|
|
3198
3200
|
} else {
|
|
3199
3201
|
const T = `text-${w++}`;
|
|
3200
|
-
|
|
3202
|
+
x.push(a(_, T));
|
|
3201
3203
|
}
|
|
3202
3204
|
}
|
|
3203
3205
|
}
|
|
@@ -3219,7 +3221,7 @@ function ce(e, ...t) {
|
|
|
3219
3221
|
function Re(e, t) {
|
|
3220
3222
|
return j(e ? t : [], "when-block");
|
|
3221
3223
|
}
|
|
3222
|
-
function
|
|
3224
|
+
function vn(e, t) {
|
|
3223
3225
|
return e.map((n, r) => {
|
|
3224
3226
|
const i = typeof n == "object" ? n?.key ?? n?.id ?? `idx-${r}` : String(n);
|
|
3225
3227
|
return j(t(n, r), `each-${i}`);
|
|
@@ -3254,7 +3256,7 @@ function j(e, t) {
|
|
|
3254
3256
|
children: n
|
|
3255
3257
|
};
|
|
3256
3258
|
}
|
|
3257
|
-
function
|
|
3259
|
+
function xn(e, t) {
|
|
3258
3260
|
return Re(!e, t);
|
|
3259
3261
|
}
|
|
3260
3262
|
function kn(e, t) {
|
|
@@ -3291,8 +3293,8 @@ function $n(e, t, n) {
|
|
|
3291
3293
|
function Sn(e, t, n, r) {
|
|
3292
3294
|
const i = n * t, s = Math.min(i + t, e.length);
|
|
3293
3295
|
return e.slice(i, s).map((a, u) => {
|
|
3294
|
-
const
|
|
3295
|
-
return j(r(a,
|
|
3296
|
+
const m = i + u, g = typeof a == "object" && a != null ? a?.key ?? a?.id ?? `page-${m}` : `page-${m}`;
|
|
3297
|
+
return j(r(a, m, u), `each-page-${g}`);
|
|
3296
3298
|
});
|
|
3297
3299
|
}
|
|
3298
3300
|
function An(e, t) {
|
|
@@ -3516,8 +3518,8 @@ const nt = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new
|
|
|
3516
3518
|
const r = [], i = n.path.replace(/:[^/]+/g, (a) => (r.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
|
|
3517
3519
|
if (o) {
|
|
3518
3520
|
const a = {};
|
|
3519
|
-
return r.forEach((u,
|
|
3520
|
-
a[u] = o[
|
|
3521
|
+
return r.forEach((u, m) => {
|
|
3522
|
+
a[u] = o[m + 1];
|
|
3521
3523
|
}), { route: n, params: a };
|
|
3522
3524
|
}
|
|
3523
3525
|
}
|
|
@@ -3538,49 +3540,49 @@ async function ln(e) {
|
|
|
3538
3540
|
}
|
|
3539
3541
|
function un(e) {
|
|
3540
3542
|
const { routes: t, base: n = "", initialUrl: r } = e;
|
|
3541
|
-
let i, s, o, a, u,
|
|
3542
|
-
const b = async (
|
|
3543
|
-
const c = t.find((p) => Q([p],
|
|
3543
|
+
let i, s, o, a, u, m, g;
|
|
3544
|
+
const b = async (v, w) => {
|
|
3545
|
+
const c = t.find((p) => Q([p], v.path).route !== null);
|
|
3544
3546
|
if (c?.beforeEnter)
|
|
3545
3547
|
try {
|
|
3546
|
-
const p = await c.beforeEnter(
|
|
3548
|
+
const p = await c.beforeEnter(v, w);
|
|
3547
3549
|
return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
|
|
3548
3550
|
} catch (p) {
|
|
3549
3551
|
return se("beforeEnter error", p), !1;
|
|
3550
3552
|
}
|
|
3551
3553
|
return !0;
|
|
3552
|
-
}, h = async (
|
|
3553
|
-
const c = t.find((p) => Q([p],
|
|
3554
|
+
}, h = async (v, w) => {
|
|
3555
|
+
const c = t.find((p) => Q([p], v.path).route !== null);
|
|
3554
3556
|
if (c?.onEnter)
|
|
3555
3557
|
try {
|
|
3556
|
-
const p = await c.onEnter(
|
|
3558
|
+
const p = await c.onEnter(v, w);
|
|
3557
3559
|
return typeof p == "string" ? (await d(p, !0), !1) : p !== !1;
|
|
3558
3560
|
} catch (p) {
|
|
3559
3561
|
return se("onEnter error", p), !1;
|
|
3560
3562
|
}
|
|
3561
3563
|
return !0;
|
|
3562
|
-
}, l = (
|
|
3563
|
-
const c = t.find((p) => Q([p],
|
|
3564
|
+
}, l = (v, w) => {
|
|
3565
|
+
const c = t.find((p) => Q([p], v.path).route !== null);
|
|
3564
3566
|
if (c?.afterEnter)
|
|
3565
3567
|
try {
|
|
3566
|
-
c.afterEnter(
|
|
3568
|
+
c.afterEnter(v, w);
|
|
3567
3569
|
} catch (p) {
|
|
3568
3570
|
se("afterEnter error", p);
|
|
3569
3571
|
}
|
|
3570
|
-
}, d = async (
|
|
3572
|
+
}, d = async (v, w = !1) => {
|
|
3571
3573
|
try {
|
|
3572
3574
|
const c = {
|
|
3573
|
-
path:
|
|
3575
|
+
path: v.replace(n, "") || "/",
|
|
3574
3576
|
query: {}
|
|
3575
3577
|
}, p = Q(t, c.path);
|
|
3576
3578
|
if (!p) throw new Error(`No route found for ${c.path}`);
|
|
3577
|
-
const
|
|
3579
|
+
const y = o.getState(), C = {
|
|
3578
3580
|
path: c.path,
|
|
3579
3581
|
params: p.params,
|
|
3580
3582
|
query: c.query
|
|
3581
3583
|
};
|
|
3582
|
-
if (!await b(C,
|
|
3583
|
-
typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", n +
|
|
3584
|
+
if (!await b(C, y) || !await h(C, y)) return;
|
|
3585
|
+
typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", n + v) : window.history.pushState({}, "", n + v)), o.setState(C), l(C, y);
|
|
3584
3586
|
} catch (c) {
|
|
3585
3587
|
se("Navigation error:", c);
|
|
3586
3588
|
}
|
|
@@ -3590,24 +3592,24 @@ function un(e) {
|
|
|
3590
3592
|
const w = new URL(window.location.href), c = w.pathname.replace(n, "") || "/", p = nt(w.search);
|
|
3591
3593
|
return { path: c, query: p };
|
|
3592
3594
|
}, s = i();
|
|
3593
|
-
const
|
|
3595
|
+
const v = Q(t, s.path);
|
|
3594
3596
|
o = tt({
|
|
3595
3597
|
path: s.path,
|
|
3596
|
-
params:
|
|
3598
|
+
params: v.params,
|
|
3597
3599
|
query: s.query
|
|
3598
3600
|
}), a = async (w = !1) => {
|
|
3599
3601
|
const c = i();
|
|
3600
3602
|
await d(c.path, w);
|
|
3601
|
-
}, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1),
|
|
3603
|
+
}, window.addEventListener("popstate", () => a(!0)), u = (w) => d(w, !1), m = (w) => d(w, !0), g = () => window.history.back();
|
|
3602
3604
|
} else {
|
|
3603
3605
|
i = () => {
|
|
3604
|
-
const c = new URL(r || "/", "http://localhost"), p = c.pathname.replace(n, "") || "/",
|
|
3605
|
-
return { path: p, query:
|
|
3606
|
+
const c = new URL(r || "/", "http://localhost"), p = c.pathname.replace(n, "") || "/", y = nt(c.search);
|
|
3607
|
+
return { path: p, query: y };
|
|
3606
3608
|
}, s = i();
|
|
3607
|
-
const
|
|
3609
|
+
const v = Q(t, s.path);
|
|
3608
3610
|
o = tt({
|
|
3609
3611
|
path: s.path,
|
|
3610
|
-
params:
|
|
3612
|
+
params: v.params,
|
|
3611
3613
|
query: s.query
|
|
3612
3614
|
}), a = async () => {
|
|
3613
3615
|
const c = i();
|
|
@@ -3618,32 +3620,32 @@ function un(e) {
|
|
|
3618
3620
|
const p = {
|
|
3619
3621
|
path: c.replace(n, "") || "/",
|
|
3620
3622
|
query: {}
|
|
3621
|
-
},
|
|
3622
|
-
if (!
|
|
3623
|
+
}, y = Q(t, p.path);
|
|
3624
|
+
if (!y) throw new Error(`No route found for ${p.path}`);
|
|
3623
3625
|
const C = o.getState(), k = {
|
|
3624
3626
|
path: p.path,
|
|
3625
|
-
params:
|
|
3627
|
+
params: y.params,
|
|
3626
3628
|
query: p.query
|
|
3627
|
-
}, f = t.find((
|
|
3629
|
+
}, f = t.find((x) => Q([x], k.path).route !== null);
|
|
3628
3630
|
if (f?.beforeEnter)
|
|
3629
3631
|
try {
|
|
3630
|
-
const
|
|
3631
|
-
if (typeof
|
|
3632
|
-
await w(
|
|
3632
|
+
const x = await f.beforeEnter(k, C);
|
|
3633
|
+
if (typeof x == "string") {
|
|
3634
|
+
await w(x);
|
|
3633
3635
|
return;
|
|
3634
3636
|
}
|
|
3635
|
-
if (
|
|
3637
|
+
if (x === !1) return;
|
|
3636
3638
|
} catch {
|
|
3637
3639
|
return;
|
|
3638
3640
|
}
|
|
3639
3641
|
if (f?.onEnter)
|
|
3640
3642
|
try {
|
|
3641
|
-
const
|
|
3642
|
-
if (typeof
|
|
3643
|
-
await w(
|
|
3643
|
+
const x = await f.onEnter(k, C);
|
|
3644
|
+
if (typeof x == "string") {
|
|
3645
|
+
await w(x);
|
|
3644
3646
|
return;
|
|
3645
3647
|
}
|
|
3646
|
-
if (
|
|
3648
|
+
if (x === !1) return;
|
|
3647
3649
|
} catch {
|
|
3648
3650
|
return;
|
|
3649
3651
|
}
|
|
@@ -3655,16 +3657,16 @@ function un(e) {
|
|
|
3655
3657
|
} catch {
|
|
3656
3658
|
}
|
|
3657
3659
|
};
|
|
3658
|
-
u = async (c) => w(c),
|
|
3660
|
+
u = async (c) => w(c), m = async (c) => w(c), g = () => {
|
|
3659
3661
|
};
|
|
3660
3662
|
}
|
|
3661
3663
|
return {
|
|
3662
3664
|
store: o,
|
|
3663
3665
|
push: u,
|
|
3664
|
-
replace:
|
|
3666
|
+
replace: m,
|
|
3665
3667
|
back: g,
|
|
3666
3668
|
subscribe: o.subscribe,
|
|
3667
|
-
matchRoute: (
|
|
3669
|
+
matchRoute: (v) => Q(t, v),
|
|
3668
3670
|
getCurrent: () => o.getState(),
|
|
3669
3671
|
resolveRouteComponent: ln
|
|
3670
3672
|
};
|
|
@@ -3685,8 +3687,8 @@ function zn(e) {
|
|
|
3685
3687
|
if (typeof u == "string")
|
|
3686
3688
|
return { tag: u, props: {}, children: [] };
|
|
3687
3689
|
if (typeof u == "function") {
|
|
3688
|
-
const
|
|
3689
|
-
return (
|
|
3690
|
+
const m = u();
|
|
3691
|
+
return (m instanceof Promise ? m : Promise.resolve(m)).then((b) => typeof b == "string" ? { tag: b, props: {}, children: [] } : b);
|
|
3690
3692
|
}
|
|
3691
3693
|
return ce`<div>Invalid route component</div>`;
|
|
3692
3694
|
}).catch(() => ce`<div>Invalid route component</div>`) : ce`<div>Not found</div>`;
|
|
@@ -3697,19 +3699,19 @@ function zn(e) {
|
|
|
3697
3699
|
replace: o = !1,
|
|
3698
3700
|
exact: a = !1,
|
|
3699
3701
|
activeClass: u = "active",
|
|
3700
|
-
exactActiveClass:
|
|
3702
|
+
exactActiveClass: m = "exact-active",
|
|
3701
3703
|
ariaCurrentValue: g = "page",
|
|
3702
3704
|
disabled: b = !1,
|
|
3703
3705
|
external: h = !1,
|
|
3704
3706
|
class: l = ""
|
|
3705
|
-
} = n, d = t.getCurrent(),
|
|
3706
|
-
for (const _ of p)
|
|
3707
|
+
} = n, d = t.getCurrent(), v = d.path === i, w = a ? v : d && typeof d.path == "string" ? d.path.startsWith(i) : !1, c = v ? `aria-current="${g}"` : "", p = (l || "").split(/\s+/).filter(Boolean), y = {};
|
|
3708
|
+
for (const _ of p) y[_] = !0;
|
|
3707
3709
|
const C = {
|
|
3708
|
-
...
|
|
3710
|
+
...y,
|
|
3709
3711
|
// Also include the configurable names (may duplicate the above)
|
|
3710
3712
|
[u]: w,
|
|
3711
|
-
[
|
|
3712
|
-
}, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "",
|
|
3713
|
+
[m]: v
|
|
3714
|
+
}, k = s === "button", f = b ? k ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", x = h && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", A = (_) => {
|
|
3713
3715
|
if (b) {
|
|
3714
3716
|
_.preventDefault();
|
|
3715
3717
|
return;
|
|
@@ -3723,7 +3725,7 @@ function zn(e) {
|
|
|
3723
3725
|
:class="${C}"
|
|
3724
3726
|
${c}
|
|
3725
3727
|
${f}
|
|
3726
|
-
${
|
|
3728
|
+
${x}
|
|
3727
3729
|
@click="${A}"
|
|
3728
3730
|
><slot></slot></button>
|
|
3729
3731
|
`).otherwise(ce`
|
|
@@ -3733,7 +3735,7 @@ function zn(e) {
|
|
|
3733
3735
|
:class="${C}"
|
|
3734
3736
|
${c}
|
|
3735
3737
|
${f}
|
|
3736
|
-
${
|
|
3738
|
+
${x}
|
|
3737
3739
|
@click="${A}"
|
|
3738
3740
|
><slot></slot></a>
|
|
3739
3741
|
`).done()}
|
|
@@ -3747,7 +3749,7 @@ export {
|
|
|
3747
3749
|
dn as computed,
|
|
3748
3750
|
tt as createStore,
|
|
3749
3751
|
Pt as css,
|
|
3750
|
-
|
|
3752
|
+
vn as each,
|
|
3751
3753
|
$n as eachGroup,
|
|
3752
3754
|
Sn as eachPage,
|
|
3753
3755
|
_n as eachWhere,
|
|
@@ -3773,11 +3775,11 @@ export {
|
|
|
3773
3775
|
On as switchOn,
|
|
3774
3776
|
En as switchOnLength,
|
|
3775
3777
|
An as switchOnPromise,
|
|
3776
|
-
|
|
3778
|
+
xn as unless,
|
|
3777
3779
|
hn as useEmit,
|
|
3778
|
-
|
|
3780
|
+
yn as useOnAttributeChanged,
|
|
3779
3781
|
gn as useOnConnected,
|
|
3780
|
-
|
|
3782
|
+
mn as useOnDisconnected,
|
|
3781
3783
|
bn as useOnError,
|
|
3782
3784
|
un as useRouter,
|
|
3783
3785
|
wn as useStyle,
|