@jasonshimmy/custom-elements-runtime 2.5.8 → 2.6.1

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.
@@ -1,4 +1,4 @@
1
- import { j as K, t as Y, i as P, k as We, m as $, o as F, p as U, q as G, T as Ct, v as Qe, S as kt, x as pt, y as _e, z as ee, A as _t, B as nt, a as rt, C as st, d as At } from "./namespace-helpers-DcD_6_K1.js";
1
+ import { j as K, t as Y, i as P, k as We, m as x, o as F, p as U, q as G, T as Ct, v as Qe, S as kt, x as pt, y as _e, z as X, A as _t, B as nt, a as rt, C as st, d as At } from "./namespace-helpers-DcD_6_K1.js";
2
2
  import { a as V, d as B } from "./logger-BvkEbVM4.js";
3
3
  import { j as wt, g as Tt, a as He, b as ye, m as Ae, s as Lt, d as ot } from "./transitions-Bo0DVkSp.js";
4
4
  const ge = /* @__PURE__ */ new Map(), Ke = /* @__PURE__ */ Symbol.for("cer.registry");
@@ -124,10 +124,10 @@ function Pt(e, n, t) {
124
124
  }
125
125
  Mt(e, n.props, t);
126
126
  }
127
- function xt(e, n, t, s) {
127
+ function $t(e, n, t, s) {
128
128
  e.onConnected && !t && (e.onConnected(n), s(!0));
129
129
  }
130
- function $t(e, n, t, s, r, i, o, c) {
130
+ function xt(e, n, t, s, r, i, o, c) {
131
131
  e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), i(!1), o(null), c(!1);
132
132
  }
133
133
  function Ht(e, n, t, s, r) {
@@ -664,7 +664,7 @@ function It(e, n, t) {
664
664
  }
665
665
  function ct(e, n, t, s) {
666
666
  const r = t;
667
- if ($(() => {
667
+ if (x(() => {
668
668
  if (typeof e.setAttribute == "function")
669
669
  try {
670
670
  e[n] = r;
@@ -674,13 +674,13 @@ function ct(e, n, t, s) {
674
674
  e[n] = r;
675
675
  }), r == null || typeof r == "string" || typeof r == "number" || typeof r == "boolean") {
676
676
  const i = F(r);
677
- i !== null ? $(() => {
677
+ i !== null ? x(() => {
678
678
  typeof e.setAttribute == "function" && U(
679
679
  e,
680
680
  Y(n),
681
681
  String(i)
682
682
  );
683
- }) : $(() => {
683
+ }) : x(() => {
684
684
  typeof e.removeAttribute == "function" && G(e, Y(n));
685
685
  });
686
686
  }
@@ -706,7 +706,7 @@ function oe(e, n, t) {
706
706
  const s = e.attrs;
707
707
  s[n] = t;
708
708
  }
709
- function Q(e) {
709
+ function ee(e) {
710
710
  return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
711
711
  }
712
712
  function pe(e) {
@@ -923,7 +923,7 @@ function Wt(e, n, t, s, r) {
923
923
  for (const [i, o] of Object.entries(e))
924
924
  if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
925
925
  t[i] = o;
926
- else if (i === "disabled" && r && Q(r)) {
926
+ else if (i === "disabled" && r && ee(r)) {
927
927
  const c = o && typeof o == "object" && "value" in o;
928
928
  (() => {
929
929
  try {
@@ -942,7 +942,7 @@ function Wt(e, n, t, s, r) {
942
942
  for (const [o, c] of Object.entries(i))
943
943
  if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
944
944
  t[o] = c;
945
- else if (o === "disabled" && r && Q(r)) {
945
+ else if (o === "disabled" && r && ee(r)) {
946
946
  const f = c && typeof c == "object" && "value" in c;
947
947
  (() => {
948
948
  try {
@@ -1117,7 +1117,7 @@ function yt(e, n, t, s) {
1117
1117
  }
1118
1118
  }
1119
1119
  try {
1120
- if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && Q(t)) {
1120
+ if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && ee(t)) {
1121
1121
  const f = r.disabled, u = f && typeof f == "object" && "value" in f;
1122
1122
  let h = !1;
1123
1123
  try {
@@ -1448,9 +1448,9 @@ function at(e, n, t, s) {
1448
1448
  for (const a in { ...u, ...h }) {
1449
1449
  const b = u[a], E = h[a];
1450
1450
  let m = b, v = E;
1451
- if ($(() => {
1451
+ if (x(() => {
1452
1452
  (P(b) || Ne(b)) && (m = b.value);
1453
- }), $(() => {
1453
+ }), x(() => {
1454
1454
  (P(E) || Ne(E)) && (v = E.value);
1455
1455
  }), !(b === E && m === v))
1456
1456
  if (d = !0, a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
@@ -1487,7 +1487,7 @@ function at(e, n, t, s) {
1487
1487
  } catch {
1488
1488
  }
1489
1489
  };
1490
- $(() => {
1490
+ x(() => {
1491
1491
  ne.addListener(e, y, w);
1492
1492
  });
1493
1493
  }
@@ -1500,7 +1500,7 @@ function at(e, n, t, s) {
1500
1500
  const S = t?.isCustomElement ?? n?.isCustomElement ?? !1;
1501
1501
  if (S || a in e)
1502
1502
  try {
1503
- e[a] = E, a === "disabled" && E === !1 && !S && Q(e) && G(e, "disabled");
1503
+ e[a] = E, a === "disabled" && E === !1 && !S && ee(e) && G(e, "disabled");
1504
1504
  } catch {
1505
1505
  }
1506
1506
  else
@@ -1556,40 +1556,40 @@ function at(e, n, t, s) {
1556
1556
  let m = b, v = E;
1557
1557
  if (P(b) && (m = b.value), P(E) && (v = E.value), m !== v)
1558
1558
  if (d = !0, v == null || v === !1)
1559
- $(() => {
1559
+ x(() => {
1560
1560
  G(e, a);
1561
- }), oe(n, a, void 0), a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? $(() => {
1561
+ }), oe(n, a, void 0), a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? x(() => {
1562
1562
  e.value = "";
1563
- }) : e instanceof HTMLSelectElement ? $(() => {
1563
+ }) : e instanceof HTMLSelectElement ? x(() => {
1564
1564
  e.value = "";
1565
- }) : e instanceof HTMLProgressElement && $(() => {
1565
+ }) : e instanceof HTMLProgressElement && x(() => {
1566
1566
  e.value = 0;
1567
- })), a === "checked" && e instanceof HTMLInputElement && $(() => {
1567
+ })), a === "checked" && e instanceof HTMLInputElement && x(() => {
1568
1568
  e.checked = !1;
1569
- }), a === "disabled" && Q(e) && $(() => {
1569
+ }), a === "disabled" && ee(e) && x(() => {
1570
1570
  (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
1571
1571
  });
1572
1572
  else {
1573
1573
  if (a === "value") {
1574
1574
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1575
- $(() => {
1575
+ x(() => {
1576
1576
  e.value = v ?? "";
1577
1577
  });
1578
1578
  continue;
1579
1579
  } else if (e instanceof HTMLSelectElement) {
1580
- $(() => {
1580
+ x(() => {
1581
1581
  e.value = v ?? "";
1582
1582
  });
1583
1583
  continue;
1584
1584
  } else if (e instanceof HTMLProgressElement) {
1585
- $(() => {
1585
+ x(() => {
1586
1586
  e.value = Number(v);
1587
1587
  });
1588
1588
  continue;
1589
1589
  }
1590
1590
  }
1591
1591
  if (a === "checked" && e instanceof HTMLInputElement) {
1592
- $(() => {
1592
+ x(() => {
1593
1593
  e.checked = !!v;
1594
1594
  });
1595
1595
  continue;
@@ -1604,13 +1604,13 @@ function at(e, n, t, s) {
1604
1604
  C !== null && U(e, a, String(C)), oe(n, a, v);
1605
1605
  continue;
1606
1606
  }
1607
- if (a === "disabled" && Q(e)) {
1608
- $(() => {
1607
+ if (a === "disabled" && ee(e)) {
1608
+ x(() => {
1609
1609
  const C = pe(v);
1610
1610
  (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = C);
1611
- }), pe(v) ? $(() => {
1611
+ }), pe(v) ? x(() => {
1612
1612
  U(e, a, "");
1613
- }) : $(() => {
1613
+ }) : x(() => {
1614
1614
  G(e, a);
1615
1615
  });
1616
1616
  continue;
@@ -1651,7 +1651,7 @@ function at(e, n, t, s) {
1651
1651
  }
1652
1652
  }
1653
1653
  try {
1654
- if (Q(e)) {
1654
+ if (ee(e)) {
1655
1655
  const a = c.disabled;
1656
1656
  let b;
1657
1657
  try {
@@ -1660,7 +1660,7 @@ function at(e, n, t, s) {
1660
1660
  "disabled"
1661
1661
  ), v = a && typeof a == "object" && "value" in a;
1662
1662
  let S = !1;
1663
- $(() => {
1663
+ x(() => {
1664
1664
  S = !!P(a);
1665
1665
  });
1666
1666
  const C = Je(a);
@@ -1669,11 +1669,11 @@ function at(e, n, t, s) {
1669
1669
  b = f.disabled;
1670
1670
  }
1671
1671
  const E = pe(b);
1672
- $(() => {
1672
+ x(() => {
1673
1673
  (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = E);
1674
- }), E ? $(() => {
1674
+ }), E ? x(() => {
1675
1675
  U(e, "disabled", "");
1676
- }) : $(() => {
1676
+ }) : x(() => {
1677
1677
  G(e, "disabled");
1678
1678
  });
1679
1679
  }
@@ -1681,9 +1681,9 @@ function at(e, n, t, s) {
1681
1681
  }
1682
1682
  if (p && d) {
1683
1683
  const a = e;
1684
- $(() => {
1684
+ x(() => {
1685
1685
  a._applyProps?.(a._cfg);
1686
- }), $(() => {
1686
+ }), x(() => {
1687
1687
  typeof a.requestRender == "function" ? a.requestRender() : typeof a._render == "function" && a._render?.(a._cfg);
1688
1688
  });
1689
1689
  }
@@ -1748,7 +1748,7 @@ function J(e, n, t, s = null) {
1748
1748
  } catch {
1749
1749
  }
1750
1750
  try {
1751
- if (d.disabled !== void 0 && c && Q(c)) {
1751
+ if (d.disabled !== void 0 && c && ee(c)) {
1752
1752
  const a = d.disabled, b = a && typeof a == "object" && "value" in a;
1753
1753
  let E = !1;
1754
1754
  try {
@@ -1756,7 +1756,7 @@ function J(e, n, t, s = null) {
1756
1756
  } catch {
1757
1757
  E = !1;
1758
1758
  }
1759
- !b && !E && $(() => {
1759
+ !b && !E && x(() => {
1760
1760
  k.disabled = a, delete d.disabled;
1761
1761
  });
1762
1762
  }
@@ -1769,17 +1769,17 @@ function J(e, n, t, s = null) {
1769
1769
  continue;
1770
1770
  const E = Ze(b);
1771
1771
  if (typeof E == "boolean")
1772
- E ? U(c, a, "") : $(() => {
1772
+ E ? U(c, a, "") : x(() => {
1773
1773
  G(c, a);
1774
1774
  });
1775
1775
  else if (E != null) {
1776
- if (a === "disabled" && Q(c)) {
1776
+ if (a === "disabled" && ee(c)) {
1777
1777
  const m = d.disabled, v = Je(m) ? m : E, S = pe(v);
1778
- $(() => {
1778
+ x(() => {
1779
1779
  c.disabled = S;
1780
- }), S ? $(() => {
1780
+ }), S ? x(() => {
1781
1781
  U(c, a, "");
1782
- }) : $(() => {
1782
+ }) : x(() => {
1783
1783
  G(c, a);
1784
1784
  });
1785
1785
  continue;
@@ -1800,7 +1800,7 @@ function J(e, n, t, s = null) {
1800
1800
  }
1801
1801
  else if (!N && a in c)
1802
1802
  try {
1803
- c[a] = E, a === "disabled" && E === !1 && Q(c) && G(c, "disabled"), oe(e.props, a, E);
1803
+ c[a] = E, a === "disabled" && E === !1 && ee(c) && G(c, "disabled"), oe(e.props, a, E);
1804
1804
  } catch {
1805
1805
  const m = F(E);
1806
1806
  m !== null && U(c, a, String(m));
@@ -1824,7 +1824,7 @@ function J(e, n, t, s = null) {
1824
1824
  if (!(typeof a != "string" || /\[object Object\]/.test(a)))
1825
1825
  if (a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement)) {
1826
1826
  const E = typeof b == "object" && b !== null && Ne(b) ? b.value : b;
1827
- $(() => {
1827
+ x(() => {
1828
1828
  c.value = String(E ?? "");
1829
1829
  });
1830
1830
  } else if (a.startsWith("on") && typeof b == "function") {
@@ -1859,13 +1859,13 @@ function J(e, n, t, s = null) {
1859
1859
  if (E || a in c)
1860
1860
  try {
1861
1861
  const v = typeof b == "object" && b !== null && P(b) ? b : Ne(b) ? b.value : b;
1862
- if (a === "disabled" && Q(c)) {
1862
+ if (a === "disabled" && ee(c)) {
1863
1863
  const S = d.disabled !== void 0 ? d.disabled : v, C = pe(S);
1864
- $(() => {
1864
+ x(() => {
1865
1865
  c.disabled = C;
1866
- }), C ? $(() => {
1866
+ }), C ? x(() => {
1867
1867
  U(c, a, "");
1868
- }) : $(() => {
1868
+ }) : x(() => {
1869
1869
  G(c, a);
1870
1870
  });
1871
1871
  continue;
@@ -1920,7 +1920,7 @@ function J(e, n, t, s = null) {
1920
1920
  } catch {
1921
1921
  }
1922
1922
  try {
1923
- if (Q(c)) {
1923
+ if (ee(c)) {
1924
1924
  const a = d.disabled, b = k.disabled, E = a && typeof a == "object" && "value" in a;
1925
1925
  let m = !1;
1926
1926
  try {
@@ -1929,11 +1929,11 @@ function J(e, n, t, s = null) {
1929
1929
  m = !1;
1930
1930
  }
1931
1931
  const S = m || E || Je(a) ? a : b, C = pe(S);
1932
- $(() => {
1932
+ x(() => {
1933
1933
  c.disabled = C;
1934
- }), C ? $(() => {
1934
+ }), C ? x(() => {
1935
1935
  U(c, "disabled", "");
1936
- }) : $(() => {
1936
+ }) : x(() => {
1937
1937
  G(c, "disabled");
1938
1938
  });
1939
1939
  }
@@ -2653,7 +2653,7 @@ function sn(e, n) {
2653
2653
  t,
2654
2654
  "_triggerWatchers",
2655
2655
  (i, o) => this._triggerWatchers(i, o)
2656
- ), this.context = t, $(() => {
2656
+ ), this.context = t, x(() => {
2657
2657
  s(t, "_host", this);
2658
2658
  }), s(
2659
2659
  this.context,
@@ -2671,7 +2671,7 @@ function sn(e, n) {
2671
2671
  const p = i.substring(0, h), d = i.substring(h + 1), k = d.includes("-") ? `${p}:${d.split("-").map(
2672
2672
  (N, _) => _ === 0 ? N : N.charAt(0).toUpperCase() + N.slice(1)
2673
2673
  ).join("")}` : `${p}:${d.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
2674
- k !== i && $(() => {
2674
+ k !== i && x(() => {
2675
2675
  this.dispatchEvent(new CustomEvent(k, f));
2676
2676
  });
2677
2677
  }
@@ -2703,7 +2703,7 @@ function sn(e, n) {
2703
2703
  connectedCallback() {
2704
2704
  this._runLogicWithinErrorBoundary(n, () => {
2705
2705
  const t = this.getRootNode();
2706
- t && t !== document && "host" in t && Xt(t, this), this._applyProps(n), this._requestRender(), xt(n, this.context, this._mounted, (s) => {
2706
+ t && t !== document && "host" in t && Xt(t, this), this._applyProps(n), this._requestRender(), $t(n, this.context, this._mounted, (s) => {
2707
2707
  this._mounted = s;
2708
2708
  });
2709
2709
  });
@@ -2711,7 +2711,7 @@ function sn(e, n) {
2711
2711
  disconnectedCallback() {
2712
2712
  this._runLogicWithinErrorBoundary(n, () => {
2713
2713
  const t = this.getRootNode();
2714
- t && t !== document && "host" in t && Qt(t, this), $t(
2714
+ t && t !== document && "host" in t && Qt(t, this), xt(
2715
2715
  n,
2716
2716
  this.context,
2717
2717
  this._listeners,
@@ -2945,8 +2945,8 @@ function sn(e, n) {
2945
2945
  }
2946
2946
  };
2947
2947
  }
2948
- function mn() {
2949
- return ee();
2948
+ function gn() {
2949
+ return X();
2950
2950
  }
2951
2951
  let H = null;
2952
2952
  function Ue(e) {
@@ -2955,13 +2955,13 @@ function Ue(e) {
2955
2955
  function Be() {
2956
2956
  H = null;
2957
2957
  }
2958
- function gn() {
2958
+ function bn() {
2959
2959
  return H;
2960
2960
  }
2961
- function bn() {
2961
+ function vn() {
2962
2962
  if (!H)
2963
2963
  throw new Error("useEmit must be called during component render");
2964
- if (ee())
2964
+ if (X())
2965
2965
  return () => !1;
2966
2966
  const e = H.emit;
2967
2967
  if (typeof e != "function")
@@ -2979,36 +2979,36 @@ function he(e) {
2979
2979
  configurable: !1
2980
2980
  });
2981
2981
  }
2982
- function vn(e) {
2982
+ function En(e) {
2983
2983
  if (!H)
2984
2984
  throw new Error("useOnConnected must be called during component render");
2985
- if (ee()) return;
2985
+ if (X()) return;
2986
2986
  he(H);
2987
2987
  const n = H._hookCallbacks;
2988
2988
  n.onConnected || (n.onConnected = []), n.onConnected.push(e);
2989
2989
  }
2990
- function En(e) {
2990
+ function Sn(e) {
2991
2991
  if (!H)
2992
2992
  throw new Error("useOnDisconnected must be called during component render");
2993
- if (ee()) return;
2993
+ if (X()) return;
2994
2994
  he(H);
2995
2995
  const n = H._hookCallbacks;
2996
2996
  n.onDisconnected || (n.onDisconnected = []), n.onDisconnected.push(e);
2997
2997
  }
2998
- function Sn(e) {
2998
+ function Cn(e) {
2999
2999
  if (!H)
3000
3000
  throw new Error(
3001
3001
  "useOnAttributeChanged must be called during component render"
3002
3002
  );
3003
- if (ee()) return;
3003
+ if (X()) return;
3004
3004
  he(H);
3005
3005
  const n = H._hookCallbacks;
3006
3006
  n.onAttributeChanged || (n.onAttributeChanged = []), n.onAttributeChanged.push(e);
3007
3007
  }
3008
- function Cn(e) {
3008
+ function kn(e) {
3009
3009
  if (!H)
3010
3010
  throw new Error("useOnError must be called during component render");
3011
- if (ee()) return;
3011
+ if (X()) return;
3012
3012
  he(H);
3013
3013
  const n = H._hookCallbacks;
3014
3014
  n.onError || (n.onError = []), n.onError.push((t) => {
@@ -3018,7 +3018,7 @@ function Cn(e) {
3018
3018
  }
3019
3019
  });
3020
3020
  }
3021
- function kn(e) {
3021
+ function on(e) {
3022
3022
  if (!H)
3023
3023
  throw new Error("useProps must be called during component render");
3024
3024
  he(H);
@@ -3110,7 +3110,7 @@ function kn(e) {
3110
3110
  function _n(e) {
3111
3111
  if (!H)
3112
3112
  throw new Error("useStyle must be called during component render");
3113
- if (!ee()) {
3113
+ if (!X()) {
3114
3114
  he(H);
3115
3115
  try {
3116
3116
  const n = e();
@@ -3134,7 +3134,7 @@ const je = /* @__PURE__ */ Symbol.for("@cer/provides");
3134
3134
  function An(e, n) {
3135
3135
  if (!H)
3136
3136
  throw new Error("provide must be called during component render");
3137
- if (ee()) return;
3137
+ if (X()) return;
3138
3138
  const t = H;
3139
3139
  t[je] || Object.defineProperty(t, je, {
3140
3140
  value: /* @__PURE__ */ new Map(),
@@ -3146,7 +3146,7 @@ function An(e, n) {
3146
3146
  function wn(e, n) {
3147
3147
  if (!H)
3148
3148
  throw new Error("inject must be called during component render");
3149
- if (ee()) return n;
3149
+ if (X()) return n;
3150
3150
  try {
3151
3151
  const t = H._host;
3152
3152
  if (t) {
@@ -3196,7 +3196,7 @@ function Tn(e) {
3196
3196
  function Ln(e) {
3197
3197
  if (!H)
3198
3198
  throw new Error("useExpose must be called during component render");
3199
- if (ee()) return;
3199
+ if (X()) return;
3200
3200
  he(H);
3201
3201
  const n = H._hookCallbacks;
3202
3202
  n.expose = { ...n.expose ?? {}, ...e };
@@ -3211,7 +3211,7 @@ function Ln(e) {
3211
3211
  function Nn() {
3212
3212
  if (!H)
3213
3213
  throw new Error("useSlots must be called during component render");
3214
- if (ee())
3214
+ if (X())
3215
3215
  return { has: () => !1, getNodes: () => [], names: () => [] };
3216
3216
  const e = H._host;
3217
3217
  return {
@@ -3247,7 +3247,33 @@ function Nn() {
3247
3247
  }
3248
3248
  };
3249
3249
  }
3250
- function On(e, n) {
3250
+ function On(...e) {
3251
+ if (!H)
3252
+ throw new Error("defineModel must be called during component render");
3253
+ const n = e.length === 2 ? e[0] : "modelValue", t = e.length === 2 ? e[1] : e.length === 1 ? e[0] : void 0, s = on({
3254
+ [n]: t
3255
+ }), i = X() ? null : (() => {
3256
+ const c = H.emit;
3257
+ return typeof c != "function" ? null : c;
3258
+ })(), o = {
3259
+ get value() {
3260
+ return s[n];
3261
+ },
3262
+ set value(c) {
3263
+ i && i(`update:${n}`, c);
3264
+ }
3265
+ };
3266
+ try {
3267
+ Object.defineProperty(o, /* @__PURE__ */ Symbol.for("@cer/ReactiveState"), {
3268
+ value: !0,
3269
+ enumerable: !1,
3270
+ configurable: !1
3271
+ });
3272
+ } catch {
3273
+ }
3274
+ return o;
3275
+ }
3276
+ function jn(e, n) {
3251
3277
  Nt();
3252
3278
  let t = Y(e);
3253
3279
  t.includes("-") || (t = `cer-${t}`);
@@ -3457,10 +3483,10 @@ function Me(e) {
3457
3483
  function ue(e) {
3458
3484
  return typeof e == "object" && e !== null && "tag" in e && !Me(e);
3459
3485
  }
3460
- function on(e, n) {
3486
+ function cn(e, n) {
3461
3487
  return e.key != null ? e : { ...e, key: n };
3462
3488
  }
3463
- class cn {
3489
+ class an {
3464
3490
  map = /* @__PURE__ */ new Map();
3465
3491
  maxSize;
3466
3492
  accessOrder = /* @__PURE__ */ new Map();
@@ -3493,7 +3519,7 @@ class cn {
3493
3519
  return this.map.size;
3494
3520
  }
3495
3521
  }
3496
- const an = () => {
3522
+ const ln = () => {
3497
3523
  if (typeof navigator < "u" && "deviceMemory" in navigator) {
3498
3524
  const n = navigator.deviceMemory;
3499
3525
  if (n)
@@ -3506,10 +3532,10 @@ const an = () => {
3506
3532
  return !1;
3507
3533
  }
3508
3534
  })() ? 100 : 500;
3509
- }, Ge = new cn(
3510
- an()
3535
+ }, Ge = new an(
3536
+ ln()
3511
3537
  );
3512
- function ln(e, n) {
3538
+ function fn(e, n) {
3513
3539
  if (e == null) {
3514
3540
  V(
3515
3541
  `⚠️ Event handler for '@${n}' is ${e}. This will prevent the event from working. Use a function reference instead: @${n}="\${functionName}"`
@@ -3522,7 +3548,7 @@ function ln(e, n) {
3522
3548
  `💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${n}="\${fn}" not @${n}="\${fn()}"`
3523
3549
  );
3524
3550
  }
3525
- function fn(e, n = [], t = {}) {
3551
+ function un(e, n = [], t = {}) {
3526
3552
  const s = {}, r = {}, i = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
3527
3553
  let f;
3528
3554
  for (; f = c.exec(e); ) {
@@ -3575,7 +3601,7 @@ function fn(e, n = [], t = {}) {
3575
3601
  }
3576
3602
  } else if (u === "@") {
3577
3603
  const [b, ...E] = h.split("."), m = E;
3578
- ln(_, b);
3604
+ fn(_, b);
3579
3605
  const v = typeof _ == "function" ? _ : typeof t[_] == "function" ? t[_] : void 0;
3580
3606
  if (v) {
3581
3607
  const S = (T) => {
@@ -3623,7 +3649,7 @@ function Xe(e) {
3623
3649
  }
3624
3650
  return e;
3625
3651
  }
3626
- function un(e, n, t) {
3652
+ function dn(e, n, t) {
3627
3653
  const s = Oe.length > 0 ? Oe[Oe.length - 1] : void 0, r = t ?? s, i = !t && n.length === 0, o = i ? e.join("<!--TEMPLATE_DELIM-->") : null;
3628
3654
  if (i && o) {
3629
3655
  const l = Ge.get(o);
@@ -3688,7 +3714,7 @@ function un(e, n, t) {
3688
3714
  return;
3689
3715
  }
3690
3716
  if (ue(l)) {
3691
- w.push(on(l, void 0));
3717
+ w.push(cn(l, void 0));
3692
3718
  return;
3693
3719
  }
3694
3720
  if (Array.isArray(l)) {
@@ -3741,14 +3767,14 @@ function un(e, n, t) {
3741
3767
  attrs: O,
3742
3768
  directives: M,
3743
3769
  bound: D
3744
- } = fn(
3770
+ } = un(
3745
3771
  d[2] || "",
3746
3772
  n,
3747
3773
  r ?? {}
3748
3774
  ), j = { props: {}, attrs: {} };
3749
3775
  for (const z in L) j.props[z] = L[z];
3750
3776
  for (const z in O) j.attrs[z] = O[z];
3751
- j.attrs && Object.prototype.hasOwnProperty.call(j.attrs, "key") && !(j.props && Object.prototype.hasOwnProperty.call(j.props, "key")) && $(() => {
3777
+ j.attrs && Object.prototype.hasOwnProperty.call(j.attrs, "key") && !(j.props && Object.prototype.hasOwnProperty.call(j.props, "key")) && x(() => {
3752
3778
  j.props.key = j.attrs.key;
3753
3779
  });
3754
3780
  try {
@@ -3780,21 +3806,21 @@ function un(e, n, t) {
3780
3806
  if (j.attrs) {
3781
3807
  for (const R of ie)
3782
3808
  if (D && D.includes(R) && R in j.attrs && !(j.props && R in j.props)) {
3783
- let x = j.attrs[R];
3784
- if (x && P(x))
3785
- x = x.value, j.props[R] = x, delete j.attrs[R];
3786
- else if (x && typeof x == "object" && "value" in x && !(x instanceof Node))
3809
+ let $ = j.attrs[R];
3810
+ if ($ && P($))
3811
+ $ = $.value, j.props[R] = $, delete j.attrs[R];
3812
+ else if ($ && typeof $ == "object" && "value" in $ && !($ instanceof Node))
3787
3813
  try {
3788
- const W = x.value;
3814
+ const W = $.value;
3789
3815
  j.props[R] = (I === "select" || I === "option") && R === "value" ? String(W) : W, delete j.attrs[R];
3790
3816
  } catch {
3791
3817
  }
3792
3818
  else {
3793
- const W = typeof x;
3819
+ const W = typeof $;
3794
3820
  if (R === "disabled")
3795
- (x === "" || W === "boolean" || W === "string" && (x === "true" || x === "false") || x == null || W === "number") && (j.props[R] = x, delete j.attrs[R]);
3796
- else if (x === "" || W === "string" || W === "number" || W === "boolean" || x == null) {
3797
- const te = (I === "select" || I === "option") && R === "value" ? String(x) : x;
3821
+ ($ === "" || W === "boolean" || W === "string" && ($ === "true" || $ === "false") || $ == null || W === "number") && (j.props[R] = $, delete j.attrs[R]);
3822
+ else if ($ === "" || W === "string" || W === "number" || W === "boolean" || $ == null) {
3823
+ const te = (I === "select" || I === "option") && R === "value" ? String($) : $;
3798
3824
  j.props[R] = te, delete j.attrs[R];
3799
3825
  }
3800
3826
  }
@@ -3803,18 +3829,18 @@ function un(e, n, t) {
3803
3829
  if (l.includes("-") || !!r?.__customElements?.has?.(l)) {
3804
3830
  if (j.isCustomElement = !0, D && j.attrs) {
3805
3831
  const R = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3806
- for (const x of D)
3807
- if (x in j.attrs && !(j.props && x in j.props)) {
3808
- const W = x.includes("-") ? Qe(x) : x, te = j.attrs[x];
3809
- if (j.props[W] = te, R.has(x) || pt(x))
3832
+ for (const $ of D)
3833
+ if ($ in j.attrs && !(j.props && $ in j.props)) {
3834
+ const W = $.includes("-") ? Qe($) : $, te = j.attrs[$];
3835
+ if (j.props[W] = te, R.has($) || pt($))
3810
3836
  try {
3811
- const $e = F(j.attrs[x]);
3812
- $e === null ? delete j.attrs[x] : j.attrs[x] = $e;
3837
+ const xe = F(j.attrs[$]);
3838
+ xe === null ? delete j.attrs[$] : j.attrs[$] = xe;
3813
3839
  } catch {
3814
- delete j.attrs[x];
3840
+ delete j.attrs[$];
3815
3841
  }
3816
3842
  else
3817
- delete j.attrs[x];
3843
+ delete j.attrs[$];
3818
3844
  }
3819
3845
  }
3820
3846
  try {
@@ -3831,11 +3857,11 @@ function un(e, n, t) {
3831
3857
  (z) => z === "model" || z.startsWith("model:")
3832
3858
  ))
3833
3859
  try {
3834
- const I = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")], ie = !!(I && typeof I.has == "function" && I.has(l)), X = r, R = !!(X && (X.__customElements instanceof Set && X.__customElements.has(l) || Array.isArray(X.__isCustomElements) && X.__isCustomElements.includes(l)));
3860
+ const I = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")], ie = !!(I && typeof I.has == "function" && I.has(l)), Q = r, R = !!(Q && (Q.__customElements instanceof Set && Q.__customElements.has(l) || Array.isArray(Q.__isCustomElements) && Q.__isCustomElements.includes(l)));
3835
3861
  if (!!(l.includes("-") || R || ie))
3836
3862
  for (const te of Object.keys(M)) {
3837
3863
  if (te !== "model" && !te.startsWith("model:")) continue;
3838
- const xe = M[te], $e = xe.arg ?? (te.includes(":") ? te.split(":", 2)[1] : void 0), q = xe.value, ze = $e ?? "modelValue", et = K, vt = We, Se = r?._state || r;
3864
+ const $e = M[te], xe = $e.arg ?? (te.includes(":") ? te.split(":", 2)[1] : void 0), q = $e.value, ze = xe ?? "modelValue", et = K, vt = We, Se = r?._state || r;
3839
3865
  let se;
3840
3866
  typeof q == "string" && Se ? se = et(
3841
3867
  Se,
@@ -3905,22 +3931,22 @@ function un(e, n, t) {
3905
3931
  break;
3906
3932
  R++;
3907
3933
  }
3908
- let x = k.length - 1;
3909
- for (; x >= 0; ) {
3910
- const W = k[x];
3934
+ let $ = k.length - 1;
3935
+ for (; $ >= 0; ) {
3936
+ const W = k[$];
3911
3937
  if (!ue(W) || W.tag !== "#text" || typeof W.children != "string" || W.children.trim() !== "")
3912
3938
  break;
3913
- x--;
3939
+ $--;
3914
3940
  }
3915
- R === 0 && x === k.length - 1 ? I = k : R > x ? I = [] : I = k.slice(R, x + 1);
3941
+ R === 0 && $ === k.length - 1 ? I = k : R > $ ? I = [] : I = k.slice(R, $ + 1);
3916
3942
  }
3917
3943
  const ie = ce(
3918
3944
  N,
3919
3945
  _,
3920
3946
  I.length === 1 && ue(I[0]) && I[0].tag === "#text" ? typeof I[0].children == "string" ? I[0].children : "" : I.length ? I : void 0,
3921
3947
  a
3922
- ), X = p.pop();
3923
- X ? (N = X.tag, _ = X.props, a = X.key, k = X.children, k.push(ie)) : (E.push(ie), N = null, _ = {}, a = void 0, k = []);
3948
+ ), Q = p.pop();
3949
+ Q ? (N = Q.tag, _ = Q.props, a = Q.key, k = Q.children, k.push(ie)) : (E.push(ie), N = null, _ = {}, a = void 0, k = []);
3924
3950
  } else w ? N ? k.push(ce(l, j, void 0, void 0)) : E.push(ce(l, j, void 0, void 0)) : (N && p.push({
3925
3951
  tag: N,
3926
3952
  props: _,
@@ -3957,28 +3983,29 @@ function un(e, n, t) {
3957
3983
  }
3958
3984
  return ce("div", {}, "", "fallback-root");
3959
3985
  }
3960
- function jn(e, ...n) {
3961
- if (ee()) return [];
3986
+ function Mn(e, ...n) {
3987
+ if (X()) return [];
3962
3988
  const t = n[n.length - 1], s = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
3963
- return un(e, n, s);
3989
+ return dn(e, n, s);
3964
3990
  }
3965
3991
  export {
3966
3992
  Ln as a,
3967
- kn as b,
3968
- On as c,
3993
+ on as b,
3994
+ jn as c,
3969
3995
  Tn as d,
3970
- wn as e,
3971
- bn as f,
3972
- gn as g,
3973
- jn as h,
3974
- mn as i,
3975
- Sn as j,
3976
- vn as k,
3996
+ On as e,
3997
+ wn as f,
3998
+ bn as g,
3999
+ Mn as h,
4000
+ gn as i,
4001
+ vn as j,
4002
+ Cn as k,
3977
4003
  En as l,
3978
- Nn as m,
3979
- _n as n,
4004
+ Sn as m,
4005
+ Nn as n,
4006
+ _n as o,
3980
4007
  An as p,
3981
- Cn as u,
4008
+ kn as u,
3982
4009
  Yt as v
3983
4010
  };
3984
- //# sourceMappingURL=template-compiler-DbHgEJzb.js.map
4011
+ //# sourceMappingURL=template-compiler-xSxUyqRI.js.map