@jasonshimmy/custom-elements-runtime 1.0.10 → 1.1.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/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 +130 -110
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +5 -5
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/runtime/hooks.d.ts +23 -0
- package/package.json +1 -1
|
@@ -340,7 +340,7 @@ function lt(e) {
|
|
|
340
340
|
const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
|
|
341
341
|
return Ce.size < Ve && Ce.set(e, t), t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function ge(e) {
|
|
344
344
|
if (typeof e == "string") {
|
|
345
345
|
if (_e.has(e))
|
|
346
346
|
return _e.get(e);
|
|
@@ -375,7 +375,7 @@ const ut = typeof process < "u" && process.env?.NODE_ENV !== "production";
|
|
|
375
375
|
function oe(e, ...t) {
|
|
376
376
|
ut && console.error(e, ...t);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function Le(e, ...t) {
|
|
379
379
|
ut && console.warn(e, ...t);
|
|
380
380
|
}
|
|
381
381
|
function vt(e, t, r) {
|
|
@@ -474,7 +474,7 @@ class At {
|
|
|
474
474
|
const n = this.cache.get(t);
|
|
475
475
|
if (n) {
|
|
476
476
|
if (!n.isSecure) {
|
|
477
|
-
|
|
477
|
+
Le("Blocked cached dangerous expression:", t);
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
return n.evaluator(r);
|
|
@@ -485,7 +485,7 @@ class At {
|
|
|
485
485
|
s && this.cache.delete(s);
|
|
486
486
|
}
|
|
487
487
|
if (this.cache.set(t, i), !i.isSecure) {
|
|
488
|
-
|
|
488
|
+
Le("Blocked dangerous expression:", t);
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
491
|
return i.evaluator(r);
|
|
@@ -500,7 +500,7 @@ class At {
|
|
|
500
500
|
try {
|
|
501
501
|
return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
|
|
502
502
|
} catch (r) {
|
|
503
|
-
return
|
|
503
|
+
return Le("Failed to create evaluator for expression:", t, r), { evaluator: () => {
|
|
504
504
|
}, isSecure: !1 };
|
|
505
505
|
}
|
|
506
506
|
}
|
|
@@ -844,7 +844,7 @@ function fe(e, t) {
|
|
|
844
844
|
fe(r, t);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function be(e, t, r) {
|
|
848
848
|
if (typeof e == "string") return;
|
|
849
849
|
const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
850
850
|
n ? n.value = t : i && r && (r[i] = t);
|
|
@@ -1010,7 +1010,7 @@ function Ot(e, t, r, n) {
|
|
|
1010
1010
|
else if (typeof e == "string") {
|
|
1011
1011
|
if (!n) return;
|
|
1012
1012
|
try {
|
|
1013
|
-
const i =
|
|
1013
|
+
const i = xe(e, n);
|
|
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" ? r[s] = o : t[s] = o;
|
|
@@ -1029,7 +1029,7 @@ function Tt(e, t, r) {
|
|
|
1029
1029
|
let n;
|
|
1030
1030
|
if (typeof e == "string") {
|
|
1031
1031
|
if (!r) return;
|
|
1032
|
-
n =
|
|
1032
|
+
n = xe(e, r);
|
|
1033
1033
|
} else
|
|
1034
1034
|
n = e;
|
|
1035
1035
|
const i = t.style || "";
|
|
@@ -1050,14 +1050,14 @@ function Tt(e, t, r) {
|
|
|
1050
1050
|
s = "display: none";
|
|
1051
1051
|
s !== i && (s ? t.style = s : delete t.style);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function xe(e, t) {
|
|
1054
1054
|
return At.evaluate(e, t);
|
|
1055
1055
|
}
|
|
1056
1056
|
function Rt(e, t, r) {
|
|
1057
1057
|
let n;
|
|
1058
1058
|
if (typeof e == "string") {
|
|
1059
1059
|
if (!r) return;
|
|
1060
|
-
n =
|
|
1060
|
+
n = xe(e, r);
|
|
1061
1061
|
} else
|
|
1062
1062
|
n = e;
|
|
1063
1063
|
let i = [];
|
|
@@ -1065,11 +1065,11 @@ function Rt(e, t, r) {
|
|
|
1065
1065
|
const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
|
|
1066
1066
|
o && (t.class = o);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Pt(e, t, r) {
|
|
1069
1069
|
let n;
|
|
1070
1070
|
if (typeof e == "string") {
|
|
1071
1071
|
if (!r) return;
|
|
1072
|
-
n =
|
|
1072
|
+
n = xe(e, r);
|
|
1073
1073
|
} else
|
|
1074
1074
|
n = e;
|
|
1075
1075
|
let i = "";
|
|
@@ -1116,9 +1116,9 @@ function Lt(e, t, r) {
|
|
|
1116
1116
|
const s = t.style || "";
|
|
1117
1117
|
t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function Lt(e, t, r) {
|
|
1120
1120
|
let n = e;
|
|
1121
|
-
typeof e == "string" && r && (n =
|
|
1121
|
+
typeof e == "string" && r && (n = xe(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
|
|
1122
1122
|
}
|
|
1123
1123
|
function dt(e, t, r, n) {
|
|
1124
1124
|
const i = {}, s = { ...n || {} }, o = {};
|
|
@@ -1150,10 +1150,10 @@ function dt(e, t, r, n) {
|
|
|
1150
1150
|
Rt(h, s, t);
|
|
1151
1151
|
break;
|
|
1152
1152
|
case "style":
|
|
1153
|
-
|
|
1153
|
+
Pt(h, s, t);
|
|
1154
1154
|
break;
|
|
1155
1155
|
case "ref":
|
|
1156
|
-
|
|
1156
|
+
Lt(h, i, t);
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
@@ -1426,7 +1426,7 @@ function Z(e, t, r) {
|
|
|
1426
1426
|
...c.props
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
be(x, n, r);
|
|
1430
1430
|
try {
|
|
1431
1431
|
if (typeof n._applyProps == "function")
|
|
1432
1432
|
try {
|
|
@@ -1584,7 +1584,7 @@ function je(e, t, r, n, i) {
|
|
|
1584
1584
|
if (!t || typeof t == "string") {
|
|
1585
1585
|
fe(e, i);
|
|
1586
1586
|
const o = Z(r, n, i);
|
|
1587
|
-
return
|
|
1587
|
+
return be(r, o, i), e.parentNode?.replaceChild(o, e), o;
|
|
1588
1588
|
}
|
|
1589
1589
|
if (r.tag === "#anchor") {
|
|
1590
1590
|
const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
|
|
@@ -1597,17 +1597,17 @@ function je(e, t, r, n, i) {
|
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
|
|
1599
1599
|
const o = e;
|
|
1600
|
-
return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i),
|
|
1600
|
+
return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i), be(r, o, i), o;
|
|
1601
1601
|
}
|
|
1602
1602
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
|
|
1603
1603
|
try {
|
|
1604
1604
|
const c = e;
|
|
1605
|
-
return Ge(c, t.props || {}, r.props || {}, n),
|
|
1605
|
+
return Ge(c, t.props || {}, r.props || {}, n), be(r, c, i), c;
|
|
1606
1606
|
} catch {
|
|
1607
1607
|
}
|
|
1608
1608
|
fe(e, i);
|
|
1609
1609
|
const s = Z(r, n, i);
|
|
1610
|
-
return
|
|
1610
|
+
return be(r, s, i), e.parentNode?.replaceChild(s, e), s;
|
|
1611
1611
|
}
|
|
1612
1612
|
function Wt(e, t, r, n) {
|
|
1613
1613
|
let i;
|
|
@@ -1628,16 +1628,16 @@ function Wt(e, t, r, n) {
|
|
|
1628
1628
|
a.forEach((h) => e.removeChild(h)), e._prevVNode = i, e._prevDom = c;
|
|
1629
1629
|
}
|
|
1630
1630
|
function Me(e) {
|
|
1631
|
-
if (typeof e == "string") return
|
|
1631
|
+
if (typeof e == "string") return ge(e);
|
|
1632
1632
|
if (e.tag === "#text")
|
|
1633
|
-
return typeof e.children == "string" ?
|
|
1633
|
+
return typeof e.children == "string" ? ge(e.children) : "";
|
|
1634
1634
|
if (e.tag === "#anchor")
|
|
1635
1635
|
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Me).join("");
|
|
1636
1636
|
let t = "";
|
|
1637
|
-
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${
|
|
1637
|
+
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
|
|
1638
1638
|
let r = "";
|
|
1639
|
-
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${
|
|
1640
|
-
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ?
|
|
1639
|
+
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${ge(String(s))}"`).join(""));
|
|
1640
|
+
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ? ge(e.children) : e.children ? Me(e.children) : "";
|
|
1641
1641
|
return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
|
|
1642
1642
|
}
|
|
1643
1643
|
function Dt(e, ...t) {
|
|
@@ -2499,9 +2499,9 @@ function Gt(e) {
|
|
|
2499
2499
|
}
|
|
2500
2500
|
return r;
|
|
2501
2501
|
}
|
|
2502
|
-
const
|
|
2502
|
+
const me = /* @__PURE__ */ new Map(), Xt = 16, rt = 1e3;
|
|
2503
2503
|
function Qt(e) {
|
|
2504
|
-
const t = Date.now(), r =
|
|
2504
|
+
const t = Date.now(), r = me.get(e);
|
|
2505
2505
|
if (r && t - r.timestamp < Xt) return r.css;
|
|
2506
2506
|
const n = Gt(e);
|
|
2507
2507
|
if (!n.length) return "";
|
|
@@ -2661,15 +2661,15 @@ function Qt(e) {
|
|
|
2661
2661
|
w && s[0].push(w);
|
|
2662
2662
|
}
|
|
2663
2663
|
const d = s.flat().join("");
|
|
2664
|
-
return
|
|
2664
|
+
return me.size >= rt && Array.from(me.keys()).slice(
|
|
2665
2665
|
0,
|
|
2666
2666
|
Math.floor(rt / 2)
|
|
2667
|
-
).forEach((y) =>
|
|
2667
|
+
).forEach((y) => me.delete(y)), me.set(e, { css: d, timestamp: t }), d;
|
|
2668
2668
|
}
|
|
2669
|
-
const
|
|
2669
|
+
const we = [];
|
|
2670
2670
|
function Yt(e, t, r, n, i, s, o, c) {
|
|
2671
2671
|
if (e) {
|
|
2672
|
-
|
|
2672
|
+
we.push(r);
|
|
2673
2673
|
try {
|
|
2674
2674
|
const a = t.render(r);
|
|
2675
2675
|
if (a instanceof Promise) {
|
|
@@ -2682,7 +2682,7 @@ function Yt(e, t, r, n, i, s, o, c) {
|
|
|
2682
2682
|
}
|
|
2683
2683
|
nt(e, a, r, n, i), c(e.innerHTML);
|
|
2684
2684
|
} finally {
|
|
2685
|
-
|
|
2685
|
+
we.pop();
|
|
2686
2686
|
}
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
@@ -2737,20 +2737,20 @@ ${s}
|
|
|
2737
2737
|
let a = n;
|
|
2738
2738
|
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Xe(), a], i(a);
|
|
2739
2739
|
}
|
|
2740
|
-
let
|
|
2740
|
+
let P = null;
|
|
2741
2741
|
function rr(e) {
|
|
2742
|
-
|
|
2742
|
+
P = e;
|
|
2743
2743
|
}
|
|
2744
2744
|
function nr() {
|
|
2745
|
-
|
|
2745
|
+
P = null;
|
|
2746
2746
|
}
|
|
2747
2747
|
function br() {
|
|
2748
|
-
if (!
|
|
2748
|
+
if (!P)
|
|
2749
2749
|
throw new Error("useEmit must be called during component render");
|
|
2750
|
-
const e =
|
|
2750
|
+
const e = P.emit;
|
|
2751
2751
|
return (t, r) => e(t, r);
|
|
2752
2752
|
}
|
|
2753
|
-
function
|
|
2753
|
+
function he(e) {
|
|
2754
2754
|
e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
|
|
2755
2755
|
value: {},
|
|
2756
2756
|
writable: !0,
|
|
@@ -2759,39 +2759,58 @@ function xe(e) {
|
|
|
2759
2759
|
});
|
|
2760
2760
|
}
|
|
2761
2761
|
function wr(e) {
|
|
2762
|
-
if (!
|
|
2762
|
+
if (!P)
|
|
2763
2763
|
throw new Error("useOnConnected must be called during component render");
|
|
2764
|
-
|
|
2764
|
+
he(P), P._hookCallbacks.onConnected = e;
|
|
2765
2765
|
}
|
|
2766
2766
|
function xr(e) {
|
|
2767
|
-
if (!
|
|
2767
|
+
if (!P)
|
|
2768
2768
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2769
|
-
|
|
2769
|
+
he(P), P._hookCallbacks.onDisconnected = e;
|
|
2770
2770
|
}
|
|
2771
2771
|
function vr(e) {
|
|
2772
|
-
if (!
|
|
2772
|
+
if (!P)
|
|
2773
2773
|
throw new Error("useOnAttributeChanged must be called during component render");
|
|
2774
|
-
|
|
2774
|
+
he(P), P._hookCallbacks.onAttributeChanged = e;
|
|
2775
2775
|
}
|
|
2776
2776
|
function $r(e) {
|
|
2777
|
-
if (!
|
|
2777
|
+
if (!P)
|
|
2778
2778
|
throw new Error("useOnError must be called during component render");
|
|
2779
|
-
|
|
2779
|
+
he(P), P._hookCallbacks.onError = e;
|
|
2780
2780
|
}
|
|
2781
2781
|
function kr(e) {
|
|
2782
|
-
if (!
|
|
2782
|
+
if (!P)
|
|
2783
|
+
throw new Error("useProps must be called during component render");
|
|
2784
|
+
he(P), P._hookCallbacks.props = {
|
|
2785
|
+
...P._hookCallbacks.props || {},
|
|
2786
|
+
...e
|
|
2787
|
+
};
|
|
2788
|
+
const t = P, r = {};
|
|
2789
|
+
return Object.keys(e).forEach((n) => {
|
|
2790
|
+
Object.defineProperty(r, n, {
|
|
2791
|
+
enumerable: !0,
|
|
2792
|
+
configurable: !0,
|
|
2793
|
+
get() {
|
|
2794
|
+
const i = t[n];
|
|
2795
|
+
return i != null && i !== "" ? i : e[n];
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
}), r;
|
|
2799
|
+
}
|
|
2800
|
+
function Cr(e) {
|
|
2801
|
+
if (!P)
|
|
2783
2802
|
throw new Error("useStyle must be called during component render");
|
|
2784
|
-
|
|
2803
|
+
he(P);
|
|
2785
2804
|
try {
|
|
2786
2805
|
const t = e();
|
|
2787
|
-
Object.defineProperty(
|
|
2806
|
+
Object.defineProperty(P, "_computedStyle", {
|
|
2788
2807
|
value: t,
|
|
2789
2808
|
writable: !0,
|
|
2790
2809
|
enumerable: !1,
|
|
2791
2810
|
configurable: !0
|
|
2792
2811
|
});
|
|
2793
2812
|
} catch (t) {
|
|
2794
|
-
console.warn("Error in useStyle callback:", t), Object.defineProperty(
|
|
2813
|
+
console.warn("Error in useStyle callback:", t), Object.defineProperty(P, "_computedStyle", {
|
|
2795
2814
|
value: "",
|
|
2796
2815
|
writable: !0,
|
|
2797
2816
|
enumerable: !1,
|
|
@@ -3357,7 +3376,7 @@ function or(e, t) {
|
|
|
3357
3376
|
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${t}="\${fn}" not @${t}="\${fn()}"`
|
|
3358
3377
|
);
|
|
3359
3378
|
}
|
|
3360
|
-
function
|
|
3379
|
+
function ye(e, t = {}, r, n) {
|
|
3361
3380
|
const i = n ?? t.key;
|
|
3362
3381
|
return { tag: e, key: i, props: t, children: r };
|
|
3363
3382
|
}
|
|
@@ -3407,13 +3426,13 @@ function cr(e, t = [], r = {}) {
|
|
|
3407
3426
|
return { props: n, attrs: i, directives: s, bound: o };
|
|
3408
3427
|
}
|
|
3409
3428
|
function lr(e, t, r) {
|
|
3410
|
-
const n =
|
|
3429
|
+
const n = we.length > 0 ? we[we.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3411
3430
|
if (s && o) {
|
|
3412
3431
|
const g = Ue.get(o);
|
|
3413
3432
|
if (g) return g;
|
|
3414
3433
|
}
|
|
3415
3434
|
function c(g, $) {
|
|
3416
|
-
return
|
|
3435
|
+
return ye("#text", {}, g, $);
|
|
3417
3436
|
}
|
|
3418
3437
|
let a = "";
|
|
3419
3438
|
for (let g = 0; g < e.length; g++)
|
|
@@ -3559,14 +3578,14 @@ function lr(e, t, r) {
|
|
|
3559
3578
|
} catch {
|
|
3560
3579
|
}
|
|
3561
3580
|
if (Object.keys(A).length > 0 && (S.directives = { ...A }), $) {
|
|
3562
|
-
const O =
|
|
3581
|
+
const O = ye(
|
|
3563
3582
|
d,
|
|
3564
3583
|
u,
|
|
3565
3584
|
m.length === 1 && Se(m[0]) && m[0].tag === "#text" ? typeof m[0].children == "string" ? m[0].children : "" : m.length ? m : void 0,
|
|
3566
3585
|
y
|
|
3567
3586
|
), H = p.pop();
|
|
3568
3587
|
H ? (d = H.tag, u = H.props, y = H.key, m = H.children, m.push(O)) : (l.push(O), d = null, u = {}, y = void 0, m = []);
|
|
3569
|
-
} else j ? d ? m.push(
|
|
3588
|
+
} else j ? d ? m.push(ye(g, S, void 0, void 0)) : l.push(ye(g, S, void 0, void 0)) : (d && p.push({
|
|
3570
3589
|
tag: d,
|
|
3571
3590
|
props: u,
|
|
3572
3591
|
children: m,
|
|
@@ -3598,19 +3617,19 @@ function lr(e, t, r) {
|
|
|
3598
3617
|
const g = C;
|
|
3599
3618
|
return s && o && Ue.set(o, g), g;
|
|
3600
3619
|
}
|
|
3601
|
-
return
|
|
3620
|
+
return ye("div", {}, "", "fallback-root");
|
|
3602
3621
|
}
|
|
3603
3622
|
function le(e, ...t) {
|
|
3604
3623
|
const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
|
|
3605
3624
|
return lr(e, t, n);
|
|
3606
3625
|
}
|
|
3607
|
-
function
|
|
3608
|
-
return
|
|
3626
|
+
function Pe(e, t) {
|
|
3627
|
+
return M(e ? t : [], "when-block");
|
|
3609
3628
|
}
|
|
3610
|
-
function
|
|
3629
|
+
function _r(e, t) {
|
|
3611
3630
|
return e.map((r, n) => {
|
|
3612
3631
|
const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
|
|
3613
|
-
return
|
|
3632
|
+
return M(t(r, n), `each-${i}`);
|
|
3614
3633
|
});
|
|
3615
3634
|
}
|
|
3616
3635
|
function ur() {
|
|
@@ -3630,11 +3649,11 @@ function ur() {
|
|
|
3630
3649
|
function fr(...e) {
|
|
3631
3650
|
for (let t = 0; t < e.length; t++) {
|
|
3632
3651
|
const [r, n] = e[t];
|
|
3633
|
-
if (r) return [
|
|
3652
|
+
if (r) return [M(n, `whenChain-branch-${t}`)];
|
|
3634
3653
|
}
|
|
3635
|
-
return [
|
|
3654
|
+
return [M([], "whenChain-empty")];
|
|
3636
3655
|
}
|
|
3637
|
-
function
|
|
3656
|
+
function M(e, t) {
|
|
3638
3657
|
const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
|
|
3639
3658
|
return {
|
|
3640
3659
|
tag: "#anchor",
|
|
@@ -3642,53 +3661,53 @@ function P(e, t) {
|
|
|
3642
3661
|
children: r
|
|
3643
3662
|
};
|
|
3644
3663
|
}
|
|
3645
|
-
function _r(e, t) {
|
|
3646
|
-
return Le(!e, t);
|
|
3647
|
-
}
|
|
3648
3664
|
function Er(e, t) {
|
|
3649
|
-
|
|
3650
|
-
return Le(r, t);
|
|
3665
|
+
return Pe(!e, t);
|
|
3651
3666
|
}
|
|
3652
3667
|
function Sr(e, t) {
|
|
3668
|
+
const r = !e || e.length === 0;
|
|
3669
|
+
return Pe(r, t);
|
|
3670
|
+
}
|
|
3671
|
+
function Ar(e, t) {
|
|
3653
3672
|
const r = !!(e && e.length > 0);
|
|
3654
|
-
return
|
|
3673
|
+
return Pe(r, t);
|
|
3655
3674
|
}
|
|
3656
|
-
function
|
|
3675
|
+
function jr(e, t, r) {
|
|
3657
3676
|
const n = [];
|
|
3658
3677
|
return e.forEach((i, s) => {
|
|
3659
3678
|
t(i, s) && n.push({ item: i, originalIndex: s });
|
|
3660
3679
|
}), n.map(({ item: i, originalIndex: s }, o) => {
|
|
3661
3680
|
const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
|
|
3662
|
-
return
|
|
3681
|
+
return M(r(i, s, o), `each-where-${c}`);
|
|
3663
3682
|
});
|
|
3664
3683
|
}
|
|
3665
|
-
function
|
|
3684
|
+
function Or(e, t) {
|
|
3666
3685
|
const r = e?.length ?? 0;
|
|
3667
|
-
return r === 0 && t.empty ?
|
|
3686
|
+
return r === 0 && t.empty ? M(t.empty, "switch-length-empty") : r === 1 && t.one ? M(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? M(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? M(t.many(e), "switch-length-many") : M([], "switch-length-fallback");
|
|
3668
3687
|
}
|
|
3669
|
-
function
|
|
3688
|
+
function Tr(e, t, r) {
|
|
3670
3689
|
const n = /* @__PURE__ */ new Map();
|
|
3671
3690
|
return e.forEach((i) => {
|
|
3672
3691
|
const s = t(i);
|
|
3673
3692
|
n.has(s) || n.set(s, []), n.get(s).push(i);
|
|
3674
|
-
}), Array.from(n.entries()).map(([i, s], o) =>
|
|
3693
|
+
}), Array.from(n.entries()).map(([i, s], o) => M(
|
|
3675
3694
|
r(i, s, o),
|
|
3676
3695
|
`each-group-${i}`
|
|
3677
3696
|
));
|
|
3678
3697
|
}
|
|
3679
|
-
function
|
|
3698
|
+
function Rr(e, t, r, n) {
|
|
3680
3699
|
const i = r * t, s = Math.min(i + t, e.length);
|
|
3681
3700
|
return e.slice(i, s).map((c, a) => {
|
|
3682
3701
|
const h = i + a, p = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${h}` : `page-${h}`;
|
|
3683
|
-
return
|
|
3702
|
+
return M(n(c, h, a), `each-page-${p}`);
|
|
3684
3703
|
});
|
|
3685
3704
|
}
|
|
3686
|
-
function
|
|
3687
|
-
return e.loading && t.loading ?
|
|
3705
|
+
function Pr(e, t) {
|
|
3706
|
+
return e.loading && t.loading ? M(t.loading, "promise-loading") : e.error && t.error ? M(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? M(t.success(e.data), "promise-success") : t.idle ? M(t.idle, "promise-idle") : M([], "promise-fallback");
|
|
3688
3707
|
}
|
|
3689
3708
|
function q(e, t) {
|
|
3690
3709
|
const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
|
|
3691
|
-
return
|
|
3710
|
+
return Pe(!!r, t);
|
|
3692
3711
|
}
|
|
3693
3712
|
const ne = {
|
|
3694
3713
|
// Responsive breakpoints (matching style.ts)
|
|
@@ -3728,14 +3747,14 @@ function Lr(e, t) {
|
|
|
3728
3747
|
const s = r.length > 0 ? r.join(" and ") : "all";
|
|
3729
3748
|
return q(s, t);
|
|
3730
3749
|
}
|
|
3731
|
-
function
|
|
3750
|
+
function Mr(e) {
|
|
3732
3751
|
const t = [];
|
|
3733
|
-
return e.base && t.push(
|
|
3752
|
+
return e.base && t.push(M(e.base, "responsive-base")), gt.forEach((r) => {
|
|
3734
3753
|
const n = e[r];
|
|
3735
3754
|
n && t.push(dr[r](n));
|
|
3736
3755
|
}), t;
|
|
3737
3756
|
}
|
|
3738
|
-
function
|
|
3757
|
+
function Wr(e) {
|
|
3739
3758
|
const t = [];
|
|
3740
3759
|
let r = null;
|
|
3741
3760
|
return {
|
|
@@ -3753,9 +3772,9 @@ function Mr(e) {
|
|
|
3753
3772
|
for (let n = 0; n < t.length; n++) {
|
|
3754
3773
|
const { condition: i, content: s } = t[n];
|
|
3755
3774
|
if (i(e))
|
|
3756
|
-
return
|
|
3775
|
+
return M(s, `switch-case-${n}`);
|
|
3757
3776
|
}
|
|
3758
|
-
return
|
|
3777
|
+
return M(r || [], "switch-otherwise");
|
|
3759
3778
|
}
|
|
3760
3779
|
};
|
|
3761
3780
|
}
|
|
@@ -3880,7 +3899,7 @@ class pe extends EventTarget {
|
|
|
3880
3899
|
this.eventCounters.clear();
|
|
3881
3900
|
}
|
|
3882
3901
|
}
|
|
3883
|
-
const ve = pe.getInstance(),
|
|
3902
|
+
const ve = pe.getInstance(), Dr = (e, t) => ve.emit(e, t), Ir = (e, t) => ve.on(e, t), Nr = (e, t) => ve.off(e, t), Hr = (e, t) => ve.once(e, t), Br = (e, t, r) => ve.listen(e, t, r);
|
|
3884
3903
|
function ot(e) {
|
|
3885
3904
|
let t = { ...e };
|
|
3886
3905
|
const r = [];
|
|
@@ -4057,10 +4076,10 @@ function hr(e) {
|
|
|
4057
4076
|
resolveRouteComponent: pr
|
|
4058
4077
|
};
|
|
4059
4078
|
}
|
|
4060
|
-
function
|
|
4079
|
+
function zr(e, t) {
|
|
4061
4080
|
return Y(e, t);
|
|
4062
4081
|
}
|
|
4063
|
-
function
|
|
4082
|
+
function Ur(e) {
|
|
4064
4083
|
const t = hr(e);
|
|
4065
4084
|
return st("router-view", (r = {}, n = {}) => {
|
|
4066
4085
|
const { onConnected: i } = n;
|
|
@@ -4130,50 +4149,51 @@ function zr(e) {
|
|
|
4130
4149
|
}
|
|
4131
4150
|
export {
|
|
4132
4151
|
pe as GlobalEventBus,
|
|
4133
|
-
|
|
4152
|
+
M as anchorBlock,
|
|
4134
4153
|
st as component,
|
|
4135
4154
|
mr as computed,
|
|
4136
4155
|
ot as createStore,
|
|
4137
4156
|
Dt as css,
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4157
|
+
_r as each,
|
|
4158
|
+
Tr as eachGroup,
|
|
4159
|
+
Rr as eachPage,
|
|
4160
|
+
jr as eachWhere,
|
|
4161
|
+
Dr as emit,
|
|
4143
4162
|
ve as eventBus,
|
|
4144
4163
|
le as html,
|
|
4145
|
-
|
|
4146
|
-
|
|
4164
|
+
Ur as initRouter,
|
|
4165
|
+
Br as listen,
|
|
4147
4166
|
ur as match,
|
|
4148
4167
|
Y as matchRoute,
|
|
4149
|
-
|
|
4168
|
+
zr as matchRouteSSR,
|
|
4150
4169
|
ne as mediaVariants,
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4170
|
+
Nr as off,
|
|
4171
|
+
Ir as on,
|
|
4172
|
+
Hr as once,
|
|
4154
4173
|
at as parseQuery,
|
|
4155
4174
|
gr as ref,
|
|
4156
4175
|
Me as renderToString,
|
|
4157
4176
|
pr as resolveRouteComponent,
|
|
4158
4177
|
dr as responsive,
|
|
4159
4178
|
gt as responsiveOrder,
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4179
|
+
Mr as responsiveSwitch,
|
|
4180
|
+
Wr as switchOn,
|
|
4181
|
+
Or as switchOnLength,
|
|
4182
|
+
Pr as switchOnPromise,
|
|
4183
|
+
Er as unless,
|
|
4165
4184
|
br as useEmit,
|
|
4166
4185
|
vr as useOnAttributeChanged,
|
|
4167
4186
|
wr as useOnConnected,
|
|
4168
4187
|
xr as useOnDisconnected,
|
|
4169
4188
|
$r as useOnError,
|
|
4189
|
+
kr as useProps,
|
|
4170
4190
|
hr as useRouter,
|
|
4171
|
-
|
|
4191
|
+
Cr as useStyle,
|
|
4172
4192
|
yr as watch,
|
|
4173
|
-
|
|
4174
|
-
|
|
4193
|
+
Pe as when,
|
|
4194
|
+
Sr as whenEmpty,
|
|
4175
4195
|
q as whenMedia,
|
|
4176
|
-
|
|
4196
|
+
Ar as whenNotEmpty,
|
|
4177
4197
|
Lr as whenVariants
|
|
4178
4198
|
};
|
|
4179
4199
|
//# sourceMappingURL=custom-elements-runtime.es.js.map
|