@jasonshimmy/custom-elements-runtime 2.2.5 → 2.2.7

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,77 +1,77 @@
1
- import { g as U, t as Z, i as j, s as xe, a as P, b as z, d as B, f as V, T as dt, h as Ve, S as ht, j as st, k as Ze, l as Se, m as Je, n as yt } from "./namespace-helpers-Vwt2Fzds.js";
2
- import { c as pn, r as dn, u as hn, w as yn } from "./namespace-helpers-Vwt2Fzds.js";
3
- import { d as D, a as Y } from "./logger-BpibrmKL.js";
4
- import { j as mt, g as $e, a as fe, m as _e, s as gt, b as Ye } from "./transitions-DCIjMqzG.js";
5
- import { c as gn } from "./transitions-DCIjMqzG.js";
6
- function bt(e, n, t) {
1
+ import { g as U, t as J, i as P, s as Re, a as H, b as F, d as D, f as q, T as gt, h as Ze, S as bt, j as at, k as Xe, l as Ce, m as Qe, n as Et } from "./namespace-helpers-Vwt2Fzds.js";
2
+ import { c as En, r as Sn, u as vn, w as _n } from "./namespace-helpers-Vwt2Fzds.js";
3
+ import { d as W, a as Q } from "./logger-BpibrmKL.js";
4
+ import { j as St, g as vt, a as je, b as pe, m as ke, s as _t, c as et } from "./transitions-CZ21fzhh.js";
5
+ import { d as kn } from "./transitions-CZ21fzhh.js";
6
+ function Ct(e, n, t) {
7
7
  if (t)
8
8
  for (const [s, r] of Object.entries(t)) {
9
- let o, i = {};
10
- if (Array.isArray(r) ? (o = r[0], i = r[1] || {}) : o = r, n.set(s, {
11
- callback: o,
12
- options: i,
9
+ let i, o = {};
10
+ if (Array.isArray(r) ? (i = r[0], o = r[1] || {}) : i = r, n.set(s, {
11
+ callback: i,
12
+ options: o,
13
13
  oldValue: U(e, s)
14
- }), i.immediate)
14
+ }), o.immediate)
15
15
  try {
16
16
  const c = U(e, s);
17
- o(c, void 0, e);
17
+ i(c, void 0, e);
18
18
  } catch (c) {
19
- D(`Error in immediate watcher for "${s}":`, c);
19
+ W(`Error in immediate watcher for "${s}":`, c);
20
20
  }
21
21
  }
22
22
  }
23
- function Et(e, n, t, s) {
24
- const r = (i, c) => {
25
- if (i === c) return !0;
26
- if (typeof i != typeof c || typeof i != "object" || i === null || c === null) return !1;
27
- if (Array.isArray(i) && Array.isArray(c))
28
- return i.length !== c.length ? !1 : i.every((m, A) => r(m, c[A]));
29
- const f = i, u = c, _ = Object.keys(f || {}), E = Object.keys(u || {});
30
- return _.length !== E.length ? !1 : _.every((m) => r(f[m], u[m]));
31
- }, o = n.get(t);
32
- if (o && !r(s, o.oldValue))
23
+ function kt(e, n, t, s) {
24
+ const r = (o, c) => {
25
+ if (o === c) return !0;
26
+ if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
27
+ if (Array.isArray(o) && Array.isArray(c))
28
+ return o.length !== c.length ? !1 : o.every((g, w) => r(g, c[w]));
29
+ const f = o, u = c, S = Object.keys(f || {}), E = Object.keys(u || {});
30
+ return S.length !== E.length ? !1 : S.every((g) => r(f[g], u[g]));
31
+ }, i = n.get(t);
32
+ if (i && !r(s, i.oldValue))
33
33
  try {
34
- o.callback(s, o.oldValue, e), o.oldValue = s;
35
- } catch (i) {
36
- D(`Error in watcher for "${t}":`, i);
34
+ i.callback(s, i.oldValue, e), i.oldValue = s;
35
+ } catch (o) {
36
+ W(`Error in watcher for "${t}":`, o);
37
37
  }
38
- for (const [i, c] of n.entries())
39
- if (c.options.deep && t.startsWith(i + "."))
38
+ for (const [o, c] of n.entries())
39
+ if (c.options.deep && t.startsWith(o + "."))
40
40
  try {
41
- const f = U(e, i);
41
+ const f = U(e, o);
42
42
  r(f, c.oldValue) || (c.callback(f, c.oldValue, e), c.oldValue = f);
43
43
  } catch (f) {
44
- D(`Error in deep watcher for "${i}":`, f);
44
+ W(`Error in deep watcher for "${o}":`, f);
45
45
  }
46
46
  }
47
- function Ie(e, n) {
47
+ function De(e, n) {
48
48
  return n === Boolean ? e === "" || e === "true" : n === Number ? Number(e) : e;
49
49
  }
50
- function vt(e, n, t) {
50
+ function At(e, n, t) {
51
51
  if (n)
52
52
  for (const s in n) {
53
- const r = n[s], o = Z(s), i = e.getAttribute(o);
53
+ const r = n[s], i = J(s), o = e.getAttribute(i);
54
54
  if (r.type === Function && typeof e[s] == "function")
55
55
  t[s] = e[s];
56
- else if (i !== null)
57
- t[s] = Ie(i, r.type);
56
+ else if (o !== null)
57
+ t[s] = De(o, r.type);
58
58
  else if (typeof e[s] < "u")
59
59
  try {
60
60
  const c = e[s];
61
61
  if (r.type === String && c && typeof c == "object")
62
62
  try {
63
- t[s] = Ie(String(c), r.type);
63
+ t[s] = De(String(c), r.type);
64
64
  } catch {
65
65
  t[s] = c;
66
66
  }
67
- else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] = Ie(String(c), r.type);
67
+ else r.type === Boolean && typeof c == "boolean" || r.type === Number && typeof c == "number" || r.type === Function && typeof c == "function" ? t[s] = c : t[s] = De(String(c), r.type);
68
68
  } catch {
69
69
  t[s] = e[s];
70
70
  }
71
71
  else "default" in r && r.default !== void 0 && (t[s] = r.default);
72
72
  }
73
73
  }
74
- function St(e, n, t) {
74
+ function wt(e, n, t) {
75
75
  if (!n.props) {
76
76
  try {
77
77
  const s = t?._hookCallbacks?.props || {}, r = Array.from(
@@ -80,27 +80,27 @@ function St(e, n, t) {
80
80
  ...Object.keys(s || {})
81
81
  ])
82
82
  );
83
- for (const o of r) {
84
- if (typeof o != "string" || o.startsWith("_")) continue;
85
- const i = Object.getOwnPropertyDescriptor(t, o);
83
+ for (const i of r) {
84
+ if (typeof i != "string" || i.startsWith("_")) continue;
85
+ const o = Object.getOwnPropertyDescriptor(t, i);
86
86
  if (!(!Object.prototype.hasOwnProperty.call(
87
87
  s,
88
- o
89
- ) && i && (i.get || i.set || !i.configurable)))
88
+ i
89
+ ) && o && (o.get || o.set || !o.configurable)))
90
90
  try {
91
- Object.defineProperty(t, o, {
91
+ Object.defineProperty(t, i, {
92
92
  enumerable: !0,
93
93
  configurable: !0,
94
94
  get() {
95
95
  try {
96
- const f = Z(o), u = e.getAttribute(f);
96
+ const f = J(i), u = e.getAttribute(f);
97
97
  if (u !== null)
98
98
  return u;
99
- const _ = e[o];
99
+ const S = e[i];
100
100
  let E;
101
- return j(_) || _ && typeof _ == "object" && "value" in _ && !(_ instanceof Node) ? E = _.value : E = _, E;
101
+ return P(S) || S && typeof S == "object" && "value" in S && !(S instanceof Node) ? E = S.value : E = S, E;
102
102
  } catch {
103
- return e[o];
103
+ return e[i];
104
104
  }
105
105
  }
106
106
  });
@@ -111,18 +111,18 @@ function St(e, n, t) {
111
111
  }
112
112
  return;
113
113
  }
114
- vt(e, n.props, t);
114
+ At(e, n.props, t);
115
115
  }
116
- function _t(e, n, t, s) {
116
+ function Tt(e, n, t, s) {
117
117
  e.onConnected && !t && (e.onConnected(n), s(!0));
118
118
  }
119
- function kt(e, n, t, s, r, o, i, c) {
120
- e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), o(!1), i(null), c(!1);
119
+ function Lt(e, n, t, s, r, i, o, c) {
120
+ e.onDisconnected && e.onDisconnected(n), t.forEach((f) => f()), s(), r(), i(!1), o(null), c(!1);
121
121
  }
122
- function Ct(e, n, t, s, r) {
122
+ function Nt(e, n, t, s, r) {
123
123
  e.onAttributeChanged && e.onAttributeChanged(n, t, s, r);
124
124
  }
125
- class At {
125
+ class Ot {
126
126
  static cache = /* @__PURE__ */ new Map();
127
127
  static maxCacheSize = 1e3;
128
128
  // Dangerous patterns to block
@@ -147,7 +147,7 @@ class At {
147
147
  const s = this.cache.get(n);
148
148
  if (s) {
149
149
  if (!s.isSecure) {
150
- Y("Blocked cached dangerous expression:", n);
150
+ Q("Blocked cached dangerous expression:", n);
151
151
  return;
152
152
  }
153
153
  try {
@@ -158,11 +158,11 @@ class At {
158
158
  }
159
159
  const r = this.createEvaluator(n);
160
160
  if (this.cache.size >= this.maxCacheSize) {
161
- const o = this.cache.keys().next().value;
162
- o && this.cache.delete(o);
161
+ const i = this.cache.keys().next().value;
162
+ i && this.cache.delete(i);
163
163
  }
164
164
  if (this.cache.set(n, r), !r.isSecure) {
165
- Y("Blocked dangerous expression:", n);
165
+ Q("Blocked dangerous expression:", n);
166
166
  return;
167
167
  }
168
168
  return r.evaluator(t);
@@ -177,7 +177,7 @@ class At {
177
177
  try {
178
178
  return { evaluator: this.createSafeEvaluator(n), isSecure: !0 };
179
179
  } catch (t) {
180
- return Y("Failed to create evaluator for expression:", n, t), { evaluator: () => {
180
+ return Q("Failed to create evaluator for expression:", n, t), { evaluator: () => {
181
181
  }, isSecure: !1 };
182
182
  }
183
183
  }
@@ -197,26 +197,26 @@ class At {
197
197
  static createObjectEvaluator(n) {
198
198
  const t = n.trim().slice(1, -1), s = this.parseObjectProperties(t);
199
199
  return (r) => {
200
- const o = {};
201
- for (const { key: i, value: c } of s)
200
+ const i = {};
201
+ for (const { key: o, value: c } of s)
202
202
  try {
203
203
  if (c.startsWith("ctx.")) {
204
204
  const f = c.slice(4);
205
- o[i] = U(r, f);
205
+ i[o] = U(r, f);
206
206
  } else
207
- o[i] = this.evaluateSimpleValue(c, r);
207
+ i[o] = this.evaluateSimpleValue(c, r);
208
208
  } catch {
209
- o[i] = void 0;
209
+ i[o] = void 0;
210
210
  }
211
- return o;
211
+ return i;
212
212
  };
213
213
  }
214
214
  static parseObjectProperties(n) {
215
215
  const t = [], s = n.split(",");
216
216
  for (const r of s) {
217
- const o = r.indexOf(":");
218
- if (o === -1) continue;
219
- const i = r.slice(0, o).trim(), c = r.slice(o + 1).trim(), f = i.replace(/^['"]|['"]$/g, "");
217
+ const i = r.indexOf(":");
218
+ if (i === -1) continue;
219
+ const o = r.slice(0, i).trim(), c = r.slice(i + 1).trim(), f = o.replace(/^['"]|['"]$/g, "");
220
220
  t.push({ key: f, value: c });
221
221
  }
222
222
  return t;
@@ -230,37 +230,37 @@ class At {
230
230
  /("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
231
231
  (E) => `<<#${r.push(E) - 1}#>>`
232
232
  );
233
- const o = s.match(/ctx\.[\w.]+/g) || [];
234
- for (const E of o) {
235
- const m = E.slice(4), A = U(t, m);
236
- if (A === void 0) return;
237
- const p = r.push(JSON.stringify(A)) - 1;
233
+ const i = s.match(/ctx\.[\w.]+/g) || [];
234
+ for (const E of i) {
235
+ const g = E.slice(4), w = U(t, g);
236
+ if (w === void 0) return;
237
+ const p = r.push(JSON.stringify(w)) - 1;
238
238
  s = s.replace(
239
239
  new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
240
240
  `<<#${p}#>>`
241
241
  );
242
242
  }
243
- const i = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = s.match(i) || [];
243
+ const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = s.match(o) || [];
244
244
  for (const E of c) {
245
245
  if (E.startsWith("ctx.")) continue;
246
- const m = U(t, E);
247
- if (m === void 0) return;
248
- const A = r.push(JSON.stringify(m)) - 1;
246
+ const g = U(t, E);
247
+ if (g === void 0) return;
248
+ const w = r.push(JSON.stringify(g)) - 1;
249
249
  s = s.replace(
250
250
  new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
251
- `<<#${A}#>>`
251
+ `<<#${w}#>>`
252
252
  );
253
253
  }
254
254
  const f = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
255
255
  let u;
256
- const _ = /* @__PURE__ */ new Set();
256
+ const S = /* @__PURE__ */ new Set();
257
257
  for (; (u = f.exec(s)) !== null; ) {
258
258
  const E = u[1];
259
- if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" || _.has(E)) continue;
260
- _.add(E);
261
- const m = U(t, E);
262
- if (m === void 0) return;
263
- const A = JSON.stringify(m), p = r.push(A) - 1;
259
+ if (["true", "false", "null", "undefined"].includes(E) || /^[0-9]+$/.test(E) || E === "ctx" || S.has(E)) continue;
260
+ S.add(E);
261
+ const g = U(t, E);
262
+ if (g === void 0) return;
263
+ const w = JSON.stringify(g), p = r.push(w) - 1;
264
264
  E.includes(".") ? s = s.replace(
265
265
  new RegExp(E.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"),
266
266
  `<<#${p}#>>`
@@ -274,7 +274,7 @@ class At {
274
274
  }
275
275
  s = s.replace(
276
276
  /<<#(\d+)#>>/g,
277
- (E, m) => r[Number(m)]
277
+ (E, g) => r[Number(g)]
278
278
  );
279
279
  try {
280
280
  return this.evaluateBasicExpression(s);
@@ -297,227 +297,227 @@ class At {
297
297
  function r() {
298
298
  return t[s];
299
299
  }
300
- function o(a) {
301
- const v = t[s++];
302
- if (a && !v)
303
- throw new Error(`Unexpected token EOF, expected ${a}`);
304
- if (a && v && v.type !== a && v.value !== a)
300
+ function i(y) {
301
+ const k = t[s++];
302
+ if (y && !k)
303
+ throw new Error(`Unexpected token EOF, expected ${y}`);
304
+ if (y && k && k.type !== y && k.value !== y)
305
305
  throw new Error(
306
- `Unexpected token ${v.type}/${v.value}, expected ${a}`
306
+ `Unexpected token ${k.type}/${k.value}, expected ${y}`
307
307
  );
308
- return v;
308
+ return k;
309
309
  }
310
- function i() {
310
+ function o() {
311
311
  return p();
312
312
  }
313
- function c(a) {
314
- if (typeof a == "number") return a;
315
- if (a == null) return NaN;
316
- if (typeof a == "boolean") return a ? 1 : 0;
317
- const v = Number(a);
318
- return Number.isNaN(v) ? NaN : v;
313
+ function c(y) {
314
+ if (typeof y == "number") return y;
315
+ if (y == null) return NaN;
316
+ if (typeof y == "boolean") return y ? 1 : 0;
317
+ const k = Number(y);
318
+ return Number.isNaN(k) ? NaN : k;
319
319
  }
320
- function f(a, v) {
321
- return typeof a == "string" || typeof v == "string" ? String(a) + String(v) : c(a) + c(v);
320
+ function f(y, k) {
321
+ return typeof y == "string" || typeof k == "string" ? String(y) + String(k) : c(y) + c(k);
322
322
  }
323
- function u(a, v) {
324
- return c(a) - c(v);
323
+ function u(y, k) {
324
+ return c(y) - c(k);
325
325
  }
326
- function _(a, v) {
327
- return c(a) * c(v);
326
+ function S(y, k) {
327
+ return c(y) * c(k);
328
328
  }
329
- function E(a, v) {
330
- return c(a) / c(v);
329
+ function E(y, k) {
330
+ return c(y) / c(k);
331
331
  }
332
- function m(a, v) {
333
- return c(a) % c(v);
332
+ function g(y, k) {
333
+ return c(y) % c(k);
334
334
  }
335
- function A(a, v, y) {
336
- if (typeof v == "number" && typeof y == "number")
337
- switch (a) {
335
+ function w(y, k, l) {
336
+ if (typeof k == "number" && typeof l == "number")
337
+ switch (y) {
338
338
  case ">":
339
- return v > y;
339
+ return k > l;
340
340
  case "<":
341
- return v < y;
341
+ return k < l;
342
342
  case ">=":
343
- return v >= y;
343
+ return k >= l;
344
344
  case "<=":
345
- return v <= y;
345
+ return k <= l;
346
346
  default:
347
347
  return !1;
348
348
  }
349
- const h = String(v), T = String(y);
350
- switch (a) {
349
+ const m = String(k), A = String(l);
350
+ switch (y) {
351
351
  case ">":
352
- return h > T;
352
+ return m > A;
353
353
  case "<":
354
- return h < T;
354
+ return m < A;
355
355
  case ">=":
356
- return h >= T;
356
+ return m >= A;
357
357
  case "<=":
358
- return h <= T;
358
+ return m <= A;
359
359
  default:
360
360
  return !1;
361
361
  }
362
362
  }
363
363
  function p() {
364
- const a = S(), v = r();
365
- if (v && v.value === "?") {
366
- o("?");
367
- const y = i();
368
- o(":");
369
- const h = i();
370
- return a ? y : h;
371
- }
372
- return a;
373
- }
374
- function S() {
375
- let a = l();
364
+ const y = v(), k = r();
365
+ if (k && k.value === "?") {
366
+ i("?");
367
+ const l = o();
368
+ i(":");
369
+ const m = o();
370
+ return y ? l : m;
371
+ }
372
+ return y;
373
+ }
374
+ function v() {
375
+ let y = a();
376
376
  for (; ; ) {
377
- const v = r();
378
- if (!v || v.value !== "||") break;
379
- o("OP");
380
- const y = l();
381
- a = a || y;
377
+ const k = r();
378
+ if (!k || k.value !== "||") break;
379
+ i("OP");
380
+ const l = a();
381
+ y = y || l;
382
382
  }
383
- return a;
383
+ return y;
384
384
  }
385
- function l() {
386
- let a = k();
385
+ function a() {
386
+ let y = C();
387
387
  for (; ; ) {
388
- const v = r();
389
- if (!v || v.value !== "&&") break;
390
- o("OP");
391
- const y = k();
392
- a = a && y;
388
+ const k = r();
389
+ if (!k || k.value !== "&&") break;
390
+ i("OP");
391
+ const l = C();
392
+ y = y && l;
393
393
  }
394
- return a;
394
+ return y;
395
395
  }
396
- function k() {
397
- let a = b();
396
+ function C() {
397
+ let y = b();
398
398
  for (; ; ) {
399
- const v = r();
400
- if (!v || !["==", "!=", "===", "!=="].includes(v.value)) break;
401
- const y = o("OP").value, h = b();
402
- switch (y) {
399
+ const k = r();
400
+ if (!k || !["==", "!=", "===", "!=="].includes(k.value)) break;
401
+ const l = i("OP").value, m = b();
402
+ switch (l) {
403
403
  case "==":
404
- a = a == h;
404
+ y = y == m;
405
405
  break;
406
406
  case "!=":
407
- a = a != h;
407
+ y = y != m;
408
408
  break;
409
409
  case "===":
410
- a = a === h;
410
+ y = y === m;
411
411
  break;
412
412
  case "!==":
413
- a = a !== h;
413
+ y = y !== m;
414
414
  break;
415
415
  }
416
416
  }
417
- return a;
417
+ return y;
418
418
  }
419
419
  function b() {
420
- let a = g();
420
+ let y = h();
421
421
  for (; ; ) {
422
- const v = r();
423
- if (!v || ![">", "<", ">=", "<="].includes(v.value)) break;
424
- const y = o("OP").value, h = g();
425
- switch (y) {
422
+ const k = r();
423
+ if (!k || ![">", "<", ">=", "<="].includes(k.value)) break;
424
+ const l = i("OP").value, m = h();
425
+ switch (l) {
426
426
  case ">":
427
- a = A(">", a, h);
427
+ y = w(">", y, m);
428
428
  break;
429
429
  case "<":
430
- a = A("<", a, h);
430
+ y = w("<", y, m);
431
431
  break;
432
432
  case ">=":
433
- a = A(">=", a, h);
433
+ y = w(">=", y, m);
434
434
  break;
435
435
  case "<=":
436
- a = A("<=", a, h);
436
+ y = w("<=", y, m);
437
437
  break;
438
438
  }
439
439
  }
440
- return a;
440
+ return y;
441
441
  }
442
- function g() {
443
- let a = d();
442
+ function h() {
443
+ let y = d();
444
444
  for (; ; ) {
445
- const v = r();
446
- if (!v || v.value !== "+" && v.value !== "-") break;
447
- const y = o("OP").value, h = d();
448
- a = y === "+" ? f(a, h) : u(a, h);
445
+ const k = r();
446
+ if (!k || k.value !== "+" && k.value !== "-") break;
447
+ const l = i("OP").value, m = d();
448
+ y = l === "+" ? f(y, m) : u(y, m);
449
449
  }
450
- return a;
450
+ return y;
451
451
  }
452
452
  function d() {
453
- let a = C();
453
+ let y = _();
454
454
  for (; ; ) {
455
- const v = r();
456
- if (!v || v.value !== "*" && v.value !== "/" && v.value !== "%")
455
+ const k = r();
456
+ if (!k || k.value !== "*" && k.value !== "/" && k.value !== "%")
457
457
  break;
458
- const y = o("OP").value, h = C();
459
- switch (y) {
458
+ const l = i("OP").value, m = _();
459
+ switch (l) {
460
460
  case "*":
461
- a = _(a, h);
461
+ y = S(y, m);
462
462
  break;
463
463
  case "/":
464
- a = E(a, h);
464
+ y = E(y, m);
465
465
  break;
466
466
  case "%":
467
- a = m(a, h);
467
+ y = g(y, m);
468
468
  break;
469
469
  }
470
470
  }
471
- return a;
472
- }
473
- function C() {
474
- const a = r();
475
- if (a && a.value === "!")
476
- return o("OP"), !C();
477
- if (a && a.value === "-") {
478
- o("OP");
479
- const v = C();
480
- return u(0, v);
481
- }
482
- return L();
483
- }
484
- function L() {
485
- const a = r();
486
- if (a) {
487
- if (a.type === "NUMBER")
488
- return o("NUMBER"), Number(a.value);
489
- if (a.type === "STRING")
490
- return o("STRING"), a.value.slice(1, -1);
491
- if (a.type === "IDENT")
492
- return o("IDENT"), a.value === "true" ? !0 : a.value === "false" ? !1 : a.value === "null" ? null : void 0;
493
- if (a.value === "[") {
494
- o("PUNC");
495
- const v = [];
471
+ return y;
472
+ }
473
+ function _() {
474
+ const y = r();
475
+ if (y && y.value === "!")
476
+ return i("OP"), !_();
477
+ if (y && y.value === "-") {
478
+ i("OP");
479
+ const k = _();
480
+ return u(0, k);
481
+ }
482
+ return T();
483
+ }
484
+ function T() {
485
+ const y = r();
486
+ if (y) {
487
+ if (y.type === "NUMBER")
488
+ return i("NUMBER"), Number(y.value);
489
+ if (y.type === "STRING")
490
+ return i("STRING"), y.value.slice(1, -1);
491
+ if (y.type === "IDENT")
492
+ return i("IDENT"), y.value === "true" ? !0 : y.value === "false" ? !1 : y.value === "null" ? null : void 0;
493
+ if (y.value === "[") {
494
+ i("PUNC");
495
+ const k = [];
496
496
  for (; ; ) {
497
- const y = r();
498
- if (!y || y.value === "]") break;
499
- v.push(i());
500
- const h = r();
501
- h && h.value === "," && o("PUNC");
497
+ const l = r();
498
+ if (!l || l.value === "]") break;
499
+ k.push(o());
500
+ const m = r();
501
+ m && m.value === "," && i("PUNC");
502
502
  }
503
- return o("PUNC"), v;
503
+ return i("PUNC"), k;
504
504
  }
505
- if (a.value === "(") {
506
- o("PUNC");
507
- const v = i();
508
- return o("PUNC"), v;
505
+ if (y.value === "(") {
506
+ i("PUNC");
507
+ const k = o();
508
+ return i("PUNC"), k;
509
509
  }
510
510
  throw new Error("Unexpected token in expression");
511
511
  }
512
512
  }
513
- return i();
513
+ return o();
514
514
  }
515
515
  static tokenize(n) {
516
516
  const t = [], s = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
517
517
  let r;
518
518
  for (; (r = s.exec(n)) !== null; ) {
519
- const o = r[1];
520
- o && (/^\d/.test(o) ? t.push({ type: "NUMBER", value: o }) : /^"/.test(o) || /^'/.test(o) ? t.push({ type: "STRING", value: o }) : /^[a-zA-Z_]/.test(o) ? t.push({ type: "IDENT", value: o }) : /^[()?:,[\]]$/.test(o) ? t.push({ type: "PUNC", value: o }) : t.push({ type: "OP", value: o }));
519
+ const i = r[1];
520
+ i && (/^\d/.test(i) ? t.push({ type: "NUMBER", value: i }) : /^"/.test(i) || /^'/.test(i) ? t.push({ type: "STRING", value: i }) : /^[a-zA-Z_]/.test(i) ? t.push({ type: "IDENT", value: i }) : /^[()?:,[\]]$/.test(i) ? t.push({ type: "PUNC", value: i }) : t.push({ type: "OP", value: i }));
521
521
  }
522
522
  return t;
523
523
  }
@@ -538,14 +538,14 @@ class At {
538
538
  return this.cache.size;
539
539
  }
540
540
  }
541
- class Q {
541
+ class te {
542
542
  static cleanupFunctions = /* @__PURE__ */ new WeakMap();
543
543
  /**
544
544
  * Add an event listener with automatic cleanup tracking
545
545
  */
546
546
  static addListener(n, t, s, r) {
547
547
  n.addEventListener(t, s, r);
548
- const i = {
548
+ const o = {
549
549
  event: t,
550
550
  handler: s,
551
551
  wrapper: s,
@@ -555,19 +555,19 @@ class Q {
555
555
  };
556
556
  this.cleanupFunctions.has(n) || this.cleanupFunctions.set(n, []);
557
557
  const c = this.cleanupFunctions.get(n);
558
- c.push(i), c.__metaList = c;
558
+ c.push(o), c.__metaList = c;
559
559
  }
560
560
  /**
561
561
  * Remove a specific event listener
562
562
  */
563
563
  static removeListener(n, t, s, r) {
564
564
  n.removeEventListener(t, s, r);
565
- const o = this.cleanupFunctions.get(n);
566
- if (o)
567
- for (let i = 0; i < o.length; i++) {
568
- const c = o[i];
565
+ const i = this.cleanupFunctions.get(n);
566
+ if (i)
567
+ for (let o = 0; o < i.length; o++) {
568
+ const c = i[o];
569
569
  if (c.event === t && c.handler === s) {
570
- o.splice(i, 1), o.length === 0 && this.cleanupFunctions.delete(n);
570
+ i.splice(o, 1), i.length === 0 && this.cleanupFunctions.delete(n);
571
571
  return;
572
572
  }
573
573
  }
@@ -617,43 +617,43 @@ class Q {
617
617
  })) : [];
618
618
  }
619
619
  }
620
- function je(e, n) {
620
+ function He(e, n) {
621
621
  return Array.isArray(e) && Array.isArray(n) ? JSON.stringify([...e].sort()) !== JSON.stringify([...n].sort()) : e !== n;
622
622
  }
623
- function Xe(e, n, t, s, r) {
623
+ function tt(e, n, t, s, r) {
624
624
  if (e) {
625
- const o = n.value;
626
- if (r && typeof o == "object" && o !== null) {
627
- const i = { ...o };
628
- i[r] = t, n.value = i;
625
+ const i = n.value;
626
+ if (r && typeof i == "object" && i !== null) {
627
+ const o = { ...i };
628
+ o[r] = t, n.value = o;
629
629
  } else
630
630
  n.value = t;
631
631
  } else {
632
- const o = s._state || s;
633
- xe(o, n, t);
632
+ const i = s._state || s;
633
+ Re(i, n, t);
634
634
  }
635
635
  }
636
- function Me(e, n, t, s) {
636
+ function xe(e, n, t, s) {
637
637
  if (typeof e._requestRender == "function" && e._requestRender(), typeof e._triggerWatchers == "function") {
638
638
  const r = n ? "reactiveState" : t;
639
639
  e._triggerWatchers(r, s);
640
640
  }
641
641
  }
642
- function Tt(e, n, t) {
643
- const s = `update:${Z(n)}`, r = `update:${n}`, o = new CustomEvent(s, {
642
+ function Mt(e, n, t) {
643
+ const s = `update:${J(n)}`, r = `update:${n}`, i = new CustomEvent(s, {
644
644
  detail: t,
645
645
  bubbles: !0,
646
646
  cancelable: !0
647
- }), i = new CustomEvent(r, {
647
+ }), o = new CustomEvent(r, {
648
648
  detail: t,
649
649
  bubbles: !0,
650
650
  cancelable: !0
651
651
  });
652
- e.dispatchEvent(o), e.dispatchEvent(i);
652
+ e.dispatchEvent(i), e.dispatchEvent(o);
653
653
  }
654
- function Qe(e, n, t, s) {
654
+ function nt(e, n, t, s) {
655
655
  const r = t;
656
- if (P(() => {
656
+ if (H(() => {
657
657
  if (typeof e.setAttribute == "function")
658
658
  try {
659
659
  e[n] = r;
@@ -662,19 +662,19 @@ function Qe(e, n, t, s) {
662
662
  else
663
663
  e[n] = r;
664
664
  }), r == null || typeof r == "string" || typeof r == "number" || typeof r == "boolean") {
665
- const o = z(r);
666
- o !== null ? P(() => {
667
- typeof e.setAttribute == "function" && B(
665
+ const i = F(r);
666
+ i !== null ? H(() => {
667
+ typeof e.setAttribute == "function" && D(
668
668
  e,
669
- Z(n),
670
- String(o)
669
+ J(n),
670
+ String(i)
671
671
  );
672
- }) : P(() => {
673
- typeof e.removeAttribute == "function" && V(e, Z(n));
672
+ }) : H(() => {
673
+ typeof e.removeAttribute == "function" && q(e, J(n));
674
674
  });
675
675
  }
676
676
  }
677
- function wt(e, n, t, s) {
677
+ function $t(e, n, t, s) {
678
678
  if (e) {
679
679
  const r = n.value;
680
680
  return s && typeof r == "object" && r !== null ? r[s] : r;
@@ -683,170 +683,170 @@ function wt(e, n, t, s) {
683
683
  return U(r, n);
684
684
  }
685
685
  }
686
- function pe(e) {
686
+ function he(e) {
687
687
  return e ? e.split(/\s+/).filter(Boolean) : [];
688
688
  }
689
- function de(e, n) {
689
+ function ye(e, n) {
690
690
  if (n.length === 0) return;
691
691
  const t = n.filter(
692
692
  (s) => s && !e.classList.contains(s)
693
693
  );
694
694
  t.length > 0 && e.classList.add(...t);
695
695
  }
696
- function ue(e, n) {
696
+ function de(e, n) {
697
697
  if (n.length === 0) return;
698
698
  const t = n.filter(Boolean);
699
699
  t.length > 0 && e.classList.remove(...t);
700
700
  }
701
- let Re = !1;
702
- async function Lt(e, n, t = 10) {
703
- if (!Re) {
701
+ let We = !1;
702
+ async function Pt(e, n, t = 10) {
703
+ if (!We) {
704
704
  if (!e.isConnected) {
705
- Y("⚠️ Element not connected to DOM, skipping style wait");
705
+ Q("⚠️ Element not connected to DOM, skipping style wait");
706
706
  return;
707
707
  }
708
708
  for (let s = 0; s < t; s++) {
709
- const r = window.getComputedStyle(e), o = r.transform && r.transform !== "", i = r.opacity && r.opacity !== "";
710
- if (o || i) {
711
- Re = !0;
709
+ const r = window.getComputedStyle(e), i = r.transform && r.transform !== "", o = r.opacity && r.opacity !== "";
710
+ if (i || o) {
711
+ We = !0;
712
712
  return;
713
713
  }
714
714
  await new Promise(
715
715
  (c) => requestAnimationFrame(() => c(void 0))
716
716
  );
717
717
  }
718
- Re = !0, Y("⚠️ Styles did not load in time for transition, continuing anyway");
718
+ We = !0, Q("⚠️ Styles did not load in time for transition, continuing anyway");
719
719
  }
720
720
  }
721
- function Nt(e) {
722
- const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (o) => {
723
- const i = parseFloat(o);
724
- return o.includes("ms") ? i : i * 1e3;
721
+ function jt(e) {
722
+ const n = window.getComputedStyle(e), t = n.transitionDuration || "0s", s = n.transitionDelay || "0s", r = (i) => {
723
+ const o = parseFloat(i);
724
+ return i.includes("ms") ? o : o * 1e3;
725
725
  };
726
726
  return r(t) + r(s);
727
727
  }
728
- function it(e, n) {
728
+ function lt(e, n) {
729
729
  return new Promise((t) => {
730
- const s = n ?? Nt(e);
730
+ const s = n ?? jt(e);
731
731
  if (s <= 0) {
732
732
  t();
733
733
  return;
734
734
  }
735
735
  let r = !1;
736
- const o = () => {
737
- r || (r = !0, e.removeEventListener("transitionend", i), e.removeEventListener("transitioncancel", i), t());
738
- }, i = () => o();
739
- e.addEventListener("transitionend", i), e.addEventListener("transitioncancel", i), setTimeout(o, s + 50);
736
+ const i = () => {
737
+ r || (r = !0, e.removeEventListener("transitionend", o), e.removeEventListener("transitioncancel", o), t());
738
+ }, o = () => i();
739
+ e.addEventListener("transitionend", o), e.addEventListener("transitioncancel", o), setTimeout(i, s + 50);
740
740
  });
741
741
  }
742
- async function ke(e, n) {
743
- const { classes: t, hooks: s, css: r, duration: o } = n;
742
+ async function Ae(e, n) {
743
+ const { classes: t, hooks: s, css: r, duration: i } = n;
744
744
  if (s?.onBeforeEnter)
745
745
  try {
746
746
  s.onBeforeEnter(e);
747
747
  } catch (p) {
748
- D("Transition onBeforeEnter error:", p);
748
+ W("Transition onBeforeEnter error:", p);
749
749
  }
750
750
  if (!r)
751
751
  return s?.onEnter ? new Promise((p) => {
752
- const S = s.onEnter;
753
- typeof S == "function" ? S(e, () => {
752
+ const v = s.onEnter;
753
+ typeof v == "function" ? v(e, () => {
754
754
  if (s?.onAfterEnter)
755
755
  try {
756
756
  s.onAfterEnter(e);
757
- } catch (l) {
758
- D("Transition onAfterEnter error:", l);
757
+ } catch (a) {
758
+ W("Transition onAfterEnter error:", a);
759
759
  }
760
760
  p();
761
761
  }) : p();
762
762
  }) : void 0;
763
- const i = pe(t?.enterFrom), c = pe(t?.enterActive), f = pe(t?.enterTo);
764
- de(e, i), e.offsetHeight, de(e, c), e.offsetHeight;
763
+ const o = he(t?.enterFrom), c = he(t?.enterActive), f = he(t?.enterTo);
764
+ ye(e, o), e.offsetHeight, ye(e, c), e.offsetHeight;
765
765
  let u;
766
766
  if (s?.onEnter) {
767
- const p = new Promise((S) => {
768
- u = S;
767
+ const p = new Promise((v) => {
768
+ u = v;
769
769
  });
770
770
  try {
771
- const S = s.onEnter;
772
- typeof S == "function" && S(e, () => {
771
+ const v = s.onEnter;
772
+ typeof v == "function" && v(e, () => {
773
773
  u && u();
774
774
  });
775
- } catch (S) {
776
- D("Transition onEnter error:", S);
775
+ } catch (v) {
776
+ W("Transition onEnter error:", v);
777
777
  }
778
778
  u && await p;
779
779
  }
780
780
  await new Promise(
781
781
  (p) => requestAnimationFrame(() => p(void 0))
782
782
  ), e.offsetHeight;
783
- const _ = window.getComputedStyle(e), E = _.transform, m = _.opacity;
784
- ue(e, i), E && E !== "none" && (e.style.transform = E), m && m !== "" && (e.style.opacity = m), e.offsetHeight, await new Promise(
783
+ const S = window.getComputedStyle(e), E = S.transform, g = S.opacity;
784
+ de(e, o), E && E !== "none" && (e.style.transform = E), g && g !== "" && (e.style.opacity = g), e.offsetHeight, await new Promise(
785
785
  (p) => requestAnimationFrame(() => p(void 0))
786
- ), e.style.transform = "", e.style.opacity = "", de(e, f), e.offsetHeight, await new Promise(
786
+ ), e.style.transform = "", e.style.opacity = "", ye(e, f), e.offsetHeight, await new Promise(
787
787
  (p) => requestAnimationFrame(() => p(void 0))
788
788
  );
789
- let A;
790
- if (typeof o == "number" ? A = o : o && typeof o == "object" && "enter" in o && (A = o.enter), await it(e, A), ue(e, c), s?.onAfterEnter)
789
+ let w;
790
+ if (typeof i == "number" ? w = i : i && typeof i == "object" && "enter" in i && (w = i.enter), await lt(e, w), de(e, c), s?.onAfterEnter)
791
791
  try {
792
792
  s.onAfterEnter(e);
793
793
  } catch (p) {
794
- D("Transition onAfterEnter error:", p);
794
+ W("Transition onAfterEnter error:", p);
795
795
  }
796
796
  }
797
- async function Be(e, n) {
798
- const { classes: t, hooks: s, css: r, duration: o } = n;
797
+ async function ze(e, n) {
798
+ const { classes: t, hooks: s, css: r, duration: i } = n;
799
799
  if (s?.onBeforeLeave)
800
800
  try {
801
801
  s.onBeforeLeave(e);
802
802
  } catch (E) {
803
- D("Transition onBeforeLeave error:", E);
803
+ W("Transition onBeforeLeave error:", E);
804
804
  }
805
805
  if (!r)
806
806
  return s?.onLeave ? new Promise((E) => {
807
- const m = s.onLeave;
808
- typeof m == "function" ? m(e, () => {
807
+ const g = s.onLeave;
808
+ typeof g == "function" ? g(e, () => {
809
809
  if (s?.onAfterLeave)
810
810
  try {
811
811
  s.onAfterLeave(e);
812
- } catch (A) {
813
- D("Transition onAfterLeave error:", A);
812
+ } catch (w) {
813
+ W("Transition onAfterLeave error:", w);
814
814
  }
815
815
  E();
816
816
  }) : E();
817
817
  }) : void 0;
818
- const i = pe(t?.leaveFrom), c = pe(t?.leaveActive), f = pe(t?.leaveTo);
819
- de(e, i), e.offsetHeight, de(e, c);
818
+ const o = he(t?.leaveFrom), c = he(t?.leaveActive), f = he(t?.leaveTo);
819
+ ye(e, o), e.offsetHeight, ye(e, c);
820
820
  let u;
821
821
  if (s?.onLeave) {
822
- const E = new Promise((m) => {
823
- u = m;
822
+ const E = new Promise((g) => {
823
+ u = g;
824
824
  });
825
825
  try {
826
- const m = s.onLeave;
827
- typeof m == "function" && m(e, () => {
826
+ const g = s.onLeave;
827
+ typeof g == "function" && g(e, () => {
828
828
  u && u();
829
829
  });
830
- } catch (m) {
831
- D("Transition onLeave error:", m);
830
+ } catch (g) {
831
+ W("Transition onLeave error:", g);
832
832
  }
833
833
  u && await E;
834
834
  }
835
835
  await new Promise(
836
836
  (E) => requestAnimationFrame(() => E(void 0))
837
- ), await Lt(e, [...i, ...c]), ue(e, i), de(e, f);
838
- let _;
839
- if (typeof o == "number" ? _ = o : o && typeof o == "object" && "leave" in o && (_ = o.leave), await it(e, _), ue(e, c), ue(e, f), ue(e, i), s?.onAfterLeave)
837
+ ), await Pt(e, [...o, ...c]), de(e, o), ye(e, f);
838
+ let S;
839
+ if (typeof i == "number" ? S = i : i && typeof i == "object" && "leave" in i && (S = i.leave), await lt(e, S), de(e, c), de(e, f), de(e, o), s?.onAfterLeave)
840
840
  try {
841
841
  s.onAfterLeave(e);
842
842
  } catch (E) {
843
- D("Transition onAfterLeave error:", E);
843
+ W("Transition onAfterLeave error:", E);
844
844
  }
845
845
  }
846
- const ot = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap();
847
- function Pe(e) {
846
+ const ft = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap();
847
+ function Ie(e) {
848
848
  if (!e) return;
849
- const n = ot.get(e);
849
+ const n = ft.get(e);
850
850
  if (n !== void 0) return n;
851
851
  try {
852
852
  const t = e;
@@ -858,9 +858,9 @@ function Pe(e) {
858
858
  if (t) return t;
859
859
  }
860
860
  }
861
- function q(e, n) {
861
+ function G(e, n) {
862
862
  try {
863
- ot.set(e, n);
863
+ ft.set(e, n);
864
864
  } catch {
865
865
  }
866
866
  try {
@@ -869,15 +869,15 @@ function q(e, n) {
869
869
  }
870
870
  try {
871
871
  if (e instanceof Element) {
872
- const t = z(n);
873
- t !== null && B(e, "data-anchor-key", t);
872
+ const t = F(n);
873
+ t !== null && D(e, "data-anchor-key", t);
874
874
  }
875
875
  } catch {
876
876
  }
877
877
  }
878
- function Ot(e) {
878
+ function Ht(e) {
879
879
  if (!e) return;
880
- const n = ct.get(e);
880
+ const n = ut.get(e);
881
881
  if (n !== void 0) return n;
882
882
  try {
883
883
  const t = e;
@@ -886,9 +886,9 @@ function Ot(e) {
886
886
  } catch {
887
887
  }
888
888
  }
889
- function $t(e, n) {
889
+ function xt(e, n) {
890
890
  try {
891
- ct.set(e, n);
891
+ ut.set(e, n);
892
892
  } catch {
893
893
  }
894
894
  try {
@@ -896,255 +896,255 @@ function $t(e, n) {
896
896
  } catch {
897
897
  }
898
898
  }
899
- function he(e) {
899
+ function me(e) {
900
900
  return e !== null && typeof e == "object" && "value" in e;
901
901
  }
902
- function Ke(e) {
902
+ function Fe(e) {
903
903
  try {
904
- if (j(e)) return e.value;
904
+ if (P(e)) return e.value;
905
905
  } catch {
906
906
  }
907
907
  try {
908
- if (he(e)) return e.value;
908
+ if (me(e)) return e.value;
909
909
  } catch {
910
910
  }
911
911
  return e;
912
912
  }
913
- function re(e, n, t) {
913
+ function se(e, n, t) {
914
914
  try {
915
915
  e && e.attrs && (e.attrs[n] = t);
916
916
  } catch {
917
917
  }
918
918
  }
919
- function J(e) {
919
+ function X(e) {
920
920
  return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
921
921
  }
922
- function ye(e) {
923
- return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? j(e) || "value" in e ? !!e.value : !1 : !!e;
922
+ function ge(e) {
923
+ return e === "" ? !0 : typeof e == "string" ? e === "false" ? !1 : e === "true" ? !0 : e !== "" : e && typeof e == "object" ? P(e) || "value" in e ? !!e.value : !1 : !!e;
924
924
  }
925
- function le(e, n) {
925
+ function ue(e, n) {
926
926
  if (!n || !(e instanceof Element)) return;
927
- Q.cleanup(e);
927
+ te.cleanup(e);
928
928
  for (const s in n)
929
929
  n[s] === e && delete n[s];
930
930
  const t = e.childNodes;
931
931
  for (let s = 0; s < t.length; s++)
932
- le(t[s], n);
932
+ ue(t[s], n);
933
933
  }
934
- function Ce(e, n, t) {
934
+ function we(e, n, t) {
935
935
  if (typeof e == "string") return;
936
936
  const s = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), r = e.props?.ref ?? (e.props?.props && e.props.props.ref);
937
937
  if (s)
938
938
  try {
939
- if (j(s) || typeof s == "object" && "value" in s)
939
+ if (P(s) || typeof s == "object" && "value" in s)
940
940
  s.value = n;
941
941
  else if (typeof s == "function")
942
942
  s(n);
943
943
  else if (typeof s == "string" && t)
944
944
  try {
945
- const o = String(s);
946
- t[o] = n;
945
+ const i = String(s);
946
+ t[i] = n;
947
947
  } catch {
948
948
  }
949
949
  } catch {
950
950
  }
951
951
  else if (r && t)
952
952
  try {
953
- const o = String(r);
954
- t[o] = n;
953
+ const i = String(r);
954
+ t[i] = n;
955
955
  } catch {
956
956
  }
957
957
  }
958
- function jt(e, n, t, s, r, o, i, c) {
959
- if (!o) return;
960
- const f = n.includes("lazy"), u = n.includes("trim"), _ = n.includes("number"), E = () => {
961
- if (j(e)) {
958
+ function It(e, n, t, s, r, i, o, c) {
959
+ if (!i) return;
960
+ const f = n.includes("lazy"), u = n.includes("trim"), S = n.includes("number"), E = () => {
961
+ if (P(e)) {
962
962
  const d = e.value;
963
- return c && i && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement) && typeof d == "object" && d !== null ? d[c] : d;
964
- }
965
- const g = o?._state || o;
966
- return U(g, e);
967
- }, m = E();
968
- let A = "text";
969
- i instanceof HTMLInputElement ? A = s?.type || i.type || "text" : i instanceof HTMLSelectElement ? A = "select" : i instanceof HTMLTextAreaElement && (A = "textarea");
970
- const p = i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement, l = p ? A === "checkbox" || A === "radio" ? "checked" : "value" : c ?? "modelValue";
971
- if (A === "checkbox")
972
- if (Array.isArray(m))
973
- t[l] = m.includes(
974
- String(i?.getAttribute("value") ?? s?.value ?? "")
963
+ return c && o && (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement) && typeof d == "object" && d !== null ? d[c] : d;
964
+ }
965
+ const h = i?._state || i;
966
+ return U(h, e);
967
+ }, g = E();
968
+ let w = "text";
969
+ o instanceof HTMLInputElement ? w = s?.type || o.type || "text" : o instanceof HTMLSelectElement ? w = "select" : o instanceof HTMLTextAreaElement && (w = "textarea");
970
+ const p = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, a = p ? w === "checkbox" || w === "radio" ? "checked" : "value" : c ?? "modelValue";
971
+ if (w === "checkbox")
972
+ if (Array.isArray(g))
973
+ t[a] = g.includes(
974
+ String(o?.getAttribute("value") ?? s?.value ?? "")
975
975
  );
976
976
  else {
977
- const g = i?.getAttribute("true-value") ?? !0;
978
- t[l] = m === g;
979
- }
980
- else if (A === "radio")
981
- t[l] = m === (s?.value ?? "");
982
- else if (A === "select")
983
- if (i && i.hasAttribute("multiple") && i instanceof HTMLSelectElement) {
984
- const g = Array.isArray(m) ? m.map(String) : [];
977
+ const h = o?.getAttribute("true-value") ?? !0;
978
+ t[a] = g === h;
979
+ }
980
+ else if (w === "radio")
981
+ t[a] = g === (s?.value ?? "");
982
+ else if (w === "select")
983
+ if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
984
+ const h = Array.isArray(g) ? g.map(String) : [];
985
985
  setTimeout(() => {
986
- Array.from(i.options).forEach((d) => {
987
- d.selected = g.includes(d.value);
986
+ Array.from(o.options).forEach((d) => {
987
+ d.selected = h.includes(d.value);
988
988
  });
989
- }, 0), t[l] = Array.isArray(m) ? m : [];
989
+ }, 0), t[a] = Array.isArray(g) ? g : [];
990
990
  } else
991
- t[l] = m;
991
+ t[a] = g;
992
992
  else {
993
- !p && j(e) ? t[l] = e : t[l] = m;
993
+ !p && P(e) ? t[a] = e : t[a] = g;
994
994
  try {
995
- const g = Z(l);
996
- s && (s[g] = m);
995
+ const h = J(a);
996
+ s && (s[h] = g);
997
997
  } catch {
998
998
  }
999
999
  }
1000
- const k = f || A === "checkbox" || A === "radio" || A === "select" ? "change" : "input", b = (g) => {
1001
- if (g.isComposing || r._isComposing)
1000
+ const C = f || w === "checkbox" || w === "radio" || w === "select" ? "change" : "input", b = (h) => {
1001
+ if (h.isComposing || r._isComposing)
1002
1002
  return;
1003
- const d = globalThis.process, C = !!d && d.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
1004
- if (g.isTrusted === !1 && !C)
1003
+ const d = globalThis.process, _ = !!d && d.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
1004
+ if (h.isTrusted === !1 && !_)
1005
1005
  return;
1006
- const L = g.target;
1007
- if (!L || L._modelUpdating)
1006
+ const T = h.target;
1007
+ if (!T || T._modelUpdating)
1008
1008
  return;
1009
- let N = L.value;
1010
- if (A === "checkbox") {
1011
- const y = E();
1012
- if (Array.isArray(y)) {
1013
- const h = L.getAttribute("value") ?? "", T = Array.from(y);
1014
- if (L.checked)
1015
- T.includes(h) || T.push(h);
1009
+ let L = T.value;
1010
+ if (w === "checkbox") {
1011
+ const l = E();
1012
+ if (Array.isArray(l)) {
1013
+ const m = T.getAttribute("value") ?? "", A = Array.from(l);
1014
+ if (T.checked)
1015
+ A.includes(m) || A.push(m);
1016
1016
  else {
1017
- const $ = T.indexOf(h);
1018
- $ > -1 && T.splice($, 1);
1017
+ const N = A.indexOf(m);
1018
+ N > -1 && A.splice(N, 1);
1019
1019
  }
1020
- N = T;
1020
+ L = A;
1021
1021
  } else {
1022
- const h = L.getAttribute("true-value") ?? !0, T = L.getAttribute("false-value") ?? !1;
1023
- N = L.checked ? h : T;
1024
- }
1025
- } else if (A === "radio")
1026
- N = L.getAttribute("value") ?? L.value;
1027
- else if (A === "select" && L.multiple)
1028
- N = Array.from(L.selectedOptions).map(
1029
- (y) => y.value
1022
+ const m = T.getAttribute("true-value") ?? !0, A = T.getAttribute("false-value") ?? !1;
1023
+ L = T.checked ? m : A;
1024
+ }
1025
+ } else if (w === "radio")
1026
+ L = T.getAttribute("value") ?? T.value;
1027
+ else if (w === "select" && T.multiple)
1028
+ L = Array.from(T.selectedOptions).map(
1029
+ (l) => l.value
1030
1030
  );
1031
- else if (u && typeof N == "string" && (N = N.trim()), _) {
1032
- const y = Number(N);
1033
- isNaN(y) || (N = y);
1031
+ else if (u && typeof L == "string" && (L = L.trim()), S) {
1032
+ const l = Number(L);
1033
+ isNaN(l) || (L = l);
1034
1034
  }
1035
- const a = E();
1036
- if (je(N, a)) {
1037
- L._modelUpdating = !0;
1035
+ const y = E();
1036
+ if (He(L, y)) {
1037
+ T._modelUpdating = !0;
1038
1038
  try {
1039
- Xe(j(e), e, N, o, c), Me(o, j(e), e, N), L && Tt(L, l, N);
1039
+ tt(P(e), e, L, i, c), xe(i, P(e), e, L), T && Mt(T, a, L);
1040
1040
  } finally {
1041
1041
  setTimeout(
1042
- () => L._modelUpdating = !1,
1042
+ () => T._modelUpdating = !1,
1043
1043
  0
1044
1044
  );
1045
1045
  }
1046
1046
  }
1047
1047
  };
1048
1048
  if (p) {
1049
- if (r[k]) {
1050
- const g = r[k];
1051
- i && Q.removeListener(i, k, g);
1049
+ if (r[C]) {
1050
+ const h = r[C];
1051
+ o && te.removeListener(o, C, h);
1052
1052
  }
1053
- r[k] = b;
1053
+ r[C] = b;
1054
1054
  } else {
1055
- const g = `update:${Z(l)}`, d = `update:${l}`;
1056
- if (r[g]) {
1057
- const C = r[g];
1058
- i && Q.removeListener(i, g, C);
1055
+ const h = `update:${J(a)}`, d = `update:${a}`;
1056
+ if (r[h]) {
1057
+ const _ = r[h];
1058
+ o && te.removeListener(o, h, _);
1059
1059
  }
1060
1060
  if (r[d]) {
1061
- const C = r[d];
1062
- i && Q.removeListener(i, d, C);
1063
- }
1064
- if (r[g] = (C) => {
1065
- const L = C.detail;
1066
- let N = L !== void 0 ? L : void 0;
1067
- if (N === void 0) {
1068
- const y = C.target;
1069
- if (y && typeof y == "object" && "value" in y)
1061
+ const _ = r[d];
1062
+ o && te.removeListener(o, d, _);
1063
+ }
1064
+ if (r[h] = (_) => {
1065
+ const T = _.detail;
1066
+ let L = T !== void 0 ? T : void 0;
1067
+ if (L === void 0) {
1068
+ const l = _.target;
1069
+ if (l && typeof l == "object" && "value" in l)
1070
1070
  try {
1071
- N = y.value;
1071
+ L = l.value;
1072
1072
  } catch {
1073
- N = void 0;
1073
+ L = void 0;
1074
1074
  }
1075
1075
  }
1076
- const a = wt(
1077
- j(e),
1076
+ const y = $t(
1077
+ P(e),
1078
1078
  e,
1079
- o,
1079
+ i,
1080
1080
  c
1081
1081
  );
1082
- if (je(N, a)) {
1083
- Xe(j(e), e, N, o, c), Me(o, j(e), e, N);
1084
- const y = C.target;
1085
- y && Qe(
1086
- y,
1082
+ if (He(L, y)) {
1083
+ tt(P(e), e, L, i, c), xe(i, P(e), e, L);
1084
+ const l = _.target;
1085
+ l && nt(
1087
1086
  l,
1088
- j(e) ? e : N,
1089
- j(e)
1087
+ a,
1088
+ P(e) ? e : L,
1089
+ P(e)
1090
1090
  );
1091
1091
  }
1092
- }, j(e) && typeof e.value == "object" && e.value !== null) {
1093
- let C = [];
1092
+ }, P(e) && typeof e.value == "object" && e.value !== null) {
1093
+ let _ = [];
1094
1094
  try {
1095
- C = Reflect.ownKeys(e.value);
1095
+ _ = Reflect.ownKeys(e.value);
1096
1096
  } catch {
1097
- C = Object.keys(e.value);
1097
+ _ = Object.keys(e.value);
1098
1098
  }
1099
- const L = C.filter(
1100
- (N) => typeof N == "string" && !String(N).startsWith("_") && N !== "constructor"
1099
+ const T = _.filter(
1100
+ (L) => typeof L == "string" && !String(L).startsWith("_") && L !== "constructor"
1101
1101
  );
1102
- for (const N of L) {
1103
- const a = String(N), v = `update:${Z(a)}`, y = `update:${a}`;
1104
- r[v] || (r[v] = (h) => {
1105
- const T = h.detail !== void 0 ? h.detail : h.target?.value, $ = j(e) ? e.value[a] : U(
1106
- o?._state || o,
1102
+ for (const L of T) {
1103
+ const y = String(L), k = `update:${J(y)}`, l = `update:${y}`;
1104
+ r[k] || (r[k] = (m) => {
1105
+ const A = m.detail !== void 0 ? m.detail : m.target?.value, N = P(e) ? e.value[y] : U(
1106
+ i?._state || i,
1107
1107
  e
1108
1108
  );
1109
- if (!je(T, $)) return;
1110
- if (j(e)) {
1111
- const I = {
1109
+ if (!He(A, N)) return;
1110
+ if (P(e)) {
1111
+ const R = {
1112
1112
  ...e.value
1113
1113
  };
1114
- I[a] = T, e.value = I;
1114
+ R[y] = A, e.value = R;
1115
1115
  } else
1116
- xe(
1117
- o?._state || o,
1116
+ Re(
1117
+ i?._state || i,
1118
1118
  e,
1119
- T
1119
+ A
1120
1120
  );
1121
- Me(o, j(e), e, T);
1122
- const w = h.currentTarget || i || h.target;
1123
- w && Qe(
1124
- w,
1125
- l,
1126
- j(e) ? e : T,
1127
- j(e)
1121
+ xe(i, P(e), e, A);
1122
+ const $ = m.currentTarget || o || m.target;
1123
+ $ && nt(
1124
+ $,
1125
+ a,
1126
+ P(e) ? e : A,
1127
+ P(e)
1128
1128
  );
1129
- }, r[y] = r[v]);
1129
+ }, r[l] = r[k]);
1130
1130
  }
1131
1131
  }
1132
- r[d] = r[g];
1132
+ r[d] = r[h];
1133
1133
  }
1134
- (A === "text" || A === "textarea") && (r.compositionstart = () => r._isComposing = !0, r.compositionend = (g) => {
1134
+ (w === "text" || w === "textarea") && (r.compositionstart = () => r._isComposing = !0, r.compositionend = (h) => {
1135
1135
  r._isComposing = !1;
1136
- const d = g.target;
1136
+ const d = h.target;
1137
1137
  d && setTimeout(() => {
1138
- const C = d.value, L = o?._state || o, N = U(L, e);
1139
- let a = C;
1140
- if (u && (a = a.trim()), _) {
1141
- const y = Number(a);
1142
- isNaN(y) || (a = y);
1138
+ const _ = d.value, T = i?._state || i, L = U(T, e);
1139
+ let y = _;
1140
+ if (u && (y = y.trim()), S) {
1141
+ const l = Number(y);
1142
+ isNaN(l) || (y = l);
1143
1143
  }
1144
- if (je(a, N)) {
1144
+ if (He(y, L)) {
1145
1145
  d._modelUpdating = !0;
1146
1146
  try {
1147
- xe(L, e, a), Me(o, j(e), e, a);
1147
+ Re(T, e, y), xe(i, P(e), e, y);
1148
1148
  } finally {
1149
1149
  setTimeout(
1150
1150
  () => d._modelUpdating = !1,
@@ -1155,97 +1155,97 @@ function jt(e, n, t, s, r, o, i, c) {
1155
1155
  }, 0);
1156
1156
  });
1157
1157
  }
1158
- function at(e) {
1158
+ function pt(e) {
1159
1159
  const n = e.slice(2);
1160
1160
  return n ? n.charAt(0).toLowerCase() + n.slice(1) : "";
1161
1161
  }
1162
- function Mt(e, n, t, s, r) {
1162
+ function Rt(e, n, t, s, r) {
1163
1163
  if (typeof e == "object" && e !== null)
1164
- for (const [o, i] of Object.entries(e))
1165
- if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
1166
- t[o] = i;
1167
- else if (o === "disabled" && r && J(r)) {
1168
- const c = i && typeof i == "object" && "value" in i;
1164
+ for (const [i, o] of Object.entries(e))
1165
+ if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
1166
+ t[i] = o;
1167
+ else if (i === "disabled" && r && X(r)) {
1168
+ const c = o && typeof o == "object" && "value" in o;
1169
1169
  (() => {
1170
1170
  try {
1171
- return j(i);
1171
+ return P(o);
1172
1172
  } catch {
1173
1173
  return !1;
1174
1174
  }
1175
- })() || c ? n[o] = i : t[o] = i;
1175
+ })() || c ? n[i] = o : t[i] = o;
1176
1176
  } else
1177
- n[o] = i;
1177
+ n[i] = o;
1178
1178
  else if (typeof e == "string") {
1179
1179
  if (!s) return;
1180
1180
  try {
1181
- const o = Le(e, s);
1182
- if (typeof o == "object" && o !== null) {
1183
- for (const [i, c] of Object.entries(o))
1184
- if (i.startsWith("data-") || i.startsWith("aria-") || i === "class")
1185
- t[i] = c;
1186
- else if (i === "disabled" && r && J(r)) {
1181
+ const i = Me(e, s);
1182
+ if (typeof i == "object" && i !== null) {
1183
+ for (const [o, c] of Object.entries(i))
1184
+ if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
1185
+ t[o] = c;
1186
+ else if (o === "disabled" && r && X(r)) {
1187
1187
  const f = c && typeof c == "object" && "value" in c;
1188
1188
  (() => {
1189
1189
  try {
1190
- return j(c);
1190
+ return P(c);
1191
1191
  } catch {
1192
1192
  return !1;
1193
1193
  }
1194
- })() || f ? n[i] = c : t[i] = c;
1194
+ })() || f ? n[o] = c : t[o] = c;
1195
1195
  } else
1196
- n[i] = c;
1196
+ n[o] = c;
1197
1197
  return;
1198
1198
  } else {
1199
- t[e] = o;
1199
+ t[e] = i;
1200
1200
  return;
1201
1201
  }
1202
1202
  } catch {
1203
- const o = U(
1203
+ const i = U(
1204
1204
  s,
1205
1205
  e
1206
1206
  );
1207
- t[e] = o;
1207
+ t[e] = i;
1208
1208
  }
1209
1209
  }
1210
1210
  }
1211
- function Pt(e, n, t) {
1211
+ function Bt(e, n, t) {
1212
1212
  let s;
1213
1213
  if (typeof e == "string") {
1214
1214
  if (!t) return;
1215
- s = Le(e, t);
1215
+ s = Me(e, t);
1216
1216
  } else
1217
1217
  s = e;
1218
1218
  const r = String(n.style || "");
1219
- let o = r;
1219
+ let i = r;
1220
1220
  if (s) {
1221
1221
  if (r) {
1222
- const i = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = i.findIndex(
1222
+ const o = String(r).split(";").map((f) => f.trim()).filter(Boolean), c = o.findIndex(
1223
1223
  (f) => f.startsWith("display:")
1224
1224
  );
1225
- c >= 0 && i[c] === "display: none" && (i.splice(c, 1), o = i.length > 0 ? i.join("; ") + ";" : "");
1225
+ c >= 0 && o[c] === "display: none" && (o.splice(c, 1), i = o.length > 0 ? o.join("; ") + ";" : "");
1226
1226
  }
1227
1227
  } else if (r) {
1228
- const i = String(r).split(";").filter(Boolean), c = i.findIndex(
1228
+ const o = String(r).split(";").filter(Boolean), c = o.findIndex(
1229
1229
  (f) => f.trim().startsWith("display:")
1230
1230
  );
1231
- c >= 0 ? i[c] = "display: none" : i.push("display: none"), o = i.join("; ");
1231
+ c >= 0 ? o[c] = "display: none" : o.push("display: none"), i = o.join("; ");
1232
1232
  } else
1233
- o = "display: none";
1234
- o !== r && (o ? n.style = o : n.style = void 0);
1233
+ i = "display: none";
1234
+ i !== r && (i ? n.style = i : n.style = void 0);
1235
1235
  }
1236
- function Le(e, n) {
1237
- return At.evaluate(e, n);
1236
+ function Me(e, n) {
1237
+ return Ot.evaluate(e, n);
1238
1238
  }
1239
- function xt(e, n, t, s) {
1239
+ function Dt(e, n, t, s) {
1240
1240
  let r;
1241
1241
  if (typeof e == "string") {
1242
1242
  if (!t) return;
1243
- r = Le(e, t);
1243
+ r = Me(e, t);
1244
1244
  } else
1245
1245
  r = e;
1246
1246
  try {
1247
1247
  if (r && typeof r == "object") {
1248
- if (j(r))
1248
+ if (P(r))
1249
1249
  r = r.value;
1250
1250
  else if ("value" in r && typeof r.value < "u") {
1251
1251
  const u = r.value;
@@ -1254,18 +1254,18 @@ function xt(e, n, t, s) {
1254
1254
  }
1255
1255
  } catch {
1256
1256
  }
1257
- let o = [];
1257
+ let i = [];
1258
1258
  if (typeof r == "string")
1259
- o = [r];
1259
+ i = [r];
1260
1260
  else if (Array.isArray(r))
1261
- o = r.filter(Boolean);
1261
+ i = r.filter(Boolean);
1262
1262
  else if (typeof r == "object" && r !== null)
1263
- for (const [u, _] of Object.entries(r))
1264
- _ && o.push(u);
1265
- const i = o.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${i}`.trim() : i.trim();
1263
+ for (const [u, S] of Object.entries(r))
1264
+ S && i.push(u);
1265
+ const o = i.join(" "), c = s && s.class || n.class || "", f = c ? `${c} ${o}`.trim() : o.trim();
1266
1266
  f ? n.class = f : n.class = void 0;
1267
1267
  }
1268
- function Ue(e) {
1268
+ function Ve(e) {
1269
1269
  if (e === !0 || e === !1) return !0;
1270
1270
  if (e == null) return !1;
1271
1271
  if (typeof e === "string") return e === "" || e === "true" || e === "false";
@@ -1278,24 +1278,24 @@ function Ue(e) {
1278
1278
  }
1279
1279
  return !1;
1280
1280
  }
1281
- function Ht(e, n, t) {
1281
+ function Wt(e, n, t) {
1282
1282
  let s;
1283
1283
  if (typeof e == "string") {
1284
1284
  if (!t) return;
1285
- s = Le(e, t);
1285
+ s = Me(e, t);
1286
1286
  } else
1287
1287
  s = e;
1288
1288
  let r = "";
1289
1289
  if (typeof s == "string")
1290
1290
  r = s;
1291
1291
  else if (s && typeof s == "object") {
1292
- const i = [];
1292
+ const o = [];
1293
1293
  for (const [c, f] of Object.entries(s))
1294
1294
  if (f != null && f !== "") {
1295
1295
  const u = c.replace(
1296
1296
  /[A-Z]/g,
1297
- (m) => `-${m.toLowerCase()}`
1298
- ), _ = [
1297
+ (g) => `-${g.toLowerCase()}`
1298
+ ), S = [
1299
1299
  "width",
1300
1300
  "height",
1301
1301
  "top",
@@ -1322,66 +1322,66 @@ function Ht(e, n, t) {
1322
1322
  "max-height"
1323
1323
  ];
1324
1324
  let E = String(f);
1325
- typeof f == "number" && _.includes(u) && (E = `${f}px`), i.push(`${u}: ${E}`);
1325
+ typeof f == "number" && S.includes(u) && (E = `${f}px`), o.push(`${u}: ${E}`);
1326
1326
  }
1327
- r = i.join("; ") + (i.length > 0 ? ";" : "");
1327
+ r = o.join("; ") + (o.length > 0 ? ";" : "");
1328
1328
  }
1329
- const o = String(n.style || "");
1330
- n.style = o + (o && !o.endsWith(";") ? "; " : "") + r;
1329
+ const i = String(n.style || "");
1330
+ n.style = i + (i && !i.endsWith(";") ? "; " : "") + r;
1331
1331
  }
1332
- function It(e, n, t) {
1332
+ function zt(e, n, t) {
1333
1333
  let s = e;
1334
- typeof e == "string" && t && (s = Le(e, t)), j(s) ? n.reactiveRef = s : n.ref = s;
1334
+ typeof e == "string" && t && (s = Me(e, t)), P(s) ? n.reactiveRef = s : n.ref = s;
1335
1335
  }
1336
- function lt(e, n, t, s) {
1337
- const r = {}, o = { ...s || {} }, i = {};
1336
+ function dt(e, n, t, s) {
1337
+ const r = {}, i = { ...s || {} }, o = {};
1338
1338
  for (const [c, f] of Object.entries(e)) {
1339
- const { value: u, modifiers: _, arg: E } = f;
1339
+ const { value: u, modifiers: S, arg: E } = f;
1340
1340
  if (c === "model" || c.startsWith("model:")) {
1341
- const m = c.split(":"), A = m.length > 1 ? m[1] : E;
1342
- jt(
1341
+ const g = c.split(":"), w = g.length > 1 ? g[1] : E;
1342
+ It(
1343
1343
  u,
1344
1344
  // Pass the original value (could be string or reactive state object)
1345
- _,
1345
+ S,
1346
1346
  r,
1347
- o,
1348
1347
  i,
1348
+ o,
1349
1349
  n,
1350
1350
  t,
1351
- A
1351
+ w
1352
1352
  );
1353
1353
  continue;
1354
1354
  }
1355
1355
  switch (c) {
1356
1356
  case "bind":
1357
- Mt(u, r, o, n, t);
1357
+ Rt(u, r, i, n, t);
1358
1358
  break;
1359
1359
  case "show":
1360
- Pt(u, o, n);
1360
+ Bt(u, i, n);
1361
1361
  break;
1362
1362
  case "class":
1363
- xt(u, o, n, s);
1363
+ Dt(u, i, n, s);
1364
1364
  break;
1365
1365
  case "style":
1366
- Ht(u, o, n);
1366
+ Wt(u, i, n);
1367
1367
  break;
1368
1368
  case "ref":
1369
- It(u, r, n);
1369
+ zt(u, r, n);
1370
1370
  break;
1371
1371
  }
1372
1372
  }
1373
1373
  try {
1374
- if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && J(t)) {
1374
+ if (Object.prototype.hasOwnProperty.call(r, "disabled") && t && X(t)) {
1375
1375
  const f = r.disabled, u = f && typeof f == "object" && "value" in f;
1376
- let _ = !1;
1376
+ let S = !1;
1377
1377
  try {
1378
- _ = j(f);
1378
+ S = P(f);
1379
1379
  } catch {
1380
- _ = !1;
1380
+ S = !1;
1381
1381
  }
1382
- if (!u && !_)
1382
+ if (!u && !S)
1383
1383
  try {
1384
- o.disabled = f, delete r.disabled;
1384
+ i.disabled = f, delete r.disabled;
1385
1385
  const E = globalThis;
1386
1386
  E.__VDOM_DISABLED_PROMOTIONS || (E.__VDOM_DISABLED_PROMOTIONS = []), E.__VDOM_DISABLED_PROMOTIONS.push({
1387
1387
  phase: "bind-directive:postfix-move",
@@ -1396,148 +1396,148 @@ function lt(e, n, t, s) {
1396
1396
  }
1397
1397
  } catch {
1398
1398
  }
1399
- return { props: r, attrs: o, listeners: i };
1399
+ return { props: r, attrs: i, listeners: o };
1400
1400
  }
1401
- function ze(e, n) {
1401
+ function qe(e, n) {
1402
1402
  if (Array.isArray(e)) {
1403
- const o = /* @__PURE__ */ new Set();
1404
- return e.map((i) => {
1405
- if (!i || typeof i != "object") return i;
1406
- let c = i.props?.key ?? i.key;
1403
+ const i = /* @__PURE__ */ new Set();
1404
+ return e.map((o) => {
1405
+ if (!o || typeof o != "object") return o;
1406
+ let c = o.props?.key ?? o.key;
1407
1407
  if (!c) {
1408
- const E = i.tag || "node", A = [
1408
+ const E = o.tag || "node", w = [
1409
1409
  // attrs (kebab-case)
1410
- i.props?.attrs?.id,
1411
- i.props?.attrs?.name,
1412
- i.props?.attrs?.["data-key"],
1410
+ o.props?.attrs?.id,
1411
+ o.props?.attrs?.name,
1412
+ o.props?.attrs?.["data-key"],
1413
1413
  // promoted JS props (camelCase or original)
1414
- i.props?.props?.id,
1415
- i.props?.props?.name,
1416
- i.props?.props?.dataKey,
1417
- i.props?.props?.["data-key"]
1414
+ o.props?.props?.id,
1415
+ o.props?.props?.name,
1416
+ o.props?.props?.dataKey,
1417
+ o.props?.props?.["data-key"]
1418
1418
  ].find((p) => p != null) ?? "";
1419
- c = A ? `${n}:${E}:${A}` : `${n}:${E}`;
1419
+ c = w ? `${n}:${E}:${w}` : `${n}:${E}`;
1420
1420
  }
1421
1421
  let f = c, u = 1;
1422
- for (; o.has(f); )
1422
+ for (; i.has(f); )
1423
1423
  f = `${c}#${u++}`;
1424
- o.add(f);
1425
- let _ = i.children;
1426
- return Array.isArray(_) && (_ = ze(_, f)), { ...i, key: f, children: _ };
1424
+ i.add(f);
1425
+ let S = o.children;
1426
+ return Array.isArray(S) && (S = qe(S, f)), { ...o, key: f, children: S };
1427
1427
  });
1428
1428
  }
1429
1429
  const t = e, s = t.props?.key ?? t.key ?? n;
1430
1430
  let r = t.children;
1431
- return Array.isArray(r) && (r = ze(r, s)), { ...t, key: s, children: r };
1431
+ return Array.isArray(r) && (r = qe(r, s)), { ...t, key: s, children: r };
1432
1432
  }
1433
- function et(e, n, t, s) {
1434
- const r = t.directives ?? {}, o = lt(
1433
+ function rt(e, n, t, s) {
1434
+ const r = t.directives ?? {}, i = dt(
1435
1435
  r,
1436
1436
  s,
1437
1437
  e,
1438
1438
  t.attrs
1439
- ), i = {
1439
+ ), o = {
1440
1440
  ...n.props || {},
1441
1441
  ...t.props || {},
1442
- ...o.props || {}
1442
+ ...i.props || {}
1443
1443
  }, c = {
1444
1444
  ...n.attrs || {},
1445
1445
  ...t.attrs || {},
1446
- ...o.attrs || {}
1447
- }, f = n.props ?? {}, u = i, _ = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
1446
+ ...i.attrs || {}
1447
+ }, f = n.props ?? {}, u = o, S = !!(t?.isCustomElement ?? n?.isCustomElement ?? !1);
1448
1448
  let E = !1;
1449
1449
  for (const p in { ...f, ...u }) {
1450
- const S = f[p], l = u[p];
1451
- let k = S, b = l;
1452
- if (P(() => {
1453
- (j(S) || he(S)) && (k = S.value);
1454
- }), P(() => {
1455
- (j(l) || he(l)) && (b = l.value);
1456
- }), !(S === l && k === b))
1450
+ const v = f[p], a = u[p];
1451
+ let C = v, b = a;
1452
+ if (H(() => {
1453
+ (P(v) || me(v)) && (C = v.value);
1454
+ }), H(() => {
1455
+ (P(a) || me(a)) && (b = a.value);
1456
+ }), !(v === a && C === b))
1457
1457
  if (E = !0, p === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
1458
- const g = Ke(l), d = g == null ? "" : String(g);
1458
+ const h = Fe(a), d = h == null ? "" : String(h);
1459
1459
  e.value !== d && (e.value = d);
1460
1460
  } else if (p === "checked" && e instanceof HTMLInputElement) {
1461
- const g = Ke(l);
1462
- e.checked = !!g;
1463
- } else if (p.startsWith("on") && typeof l == "function") {
1464
- const g = at(p);
1465
- typeof S == "function" && Q.removeListener(e, g, S), typeof l == "function" && Q.addListener(e, g, l);
1461
+ const h = Fe(a);
1462
+ e.checked = !!h;
1463
+ } else if (p.startsWith("on") && typeof a == "function") {
1464
+ const h = pt(p);
1465
+ typeof v == "function" && te.removeListener(e, h, v), typeof a == "function" && te.addListener(e, h, a);
1466
1466
  try {
1467
- if (g && g.startsWith("update:")) {
1468
- const d = g.split(":", 2)[1], C = u[d];
1469
- let L = [];
1467
+ if (h && h.startsWith("update:")) {
1468
+ const d = h.split(":", 2)[1], _ = u[d];
1469
+ let T = [];
1470
1470
  try {
1471
- if (j(C)) {
1472
- const a = C.value;
1473
- L = a && typeof a == "object" ? Object.keys(a) : [];
1474
- } else C && typeof C == "object" && (L = Object.keys(C));
1471
+ if (P(_)) {
1472
+ const y = _.value;
1473
+ T = y && typeof y == "object" ? Object.keys(y) : [];
1474
+ } else _ && typeof _ == "object" && (T = Object.keys(_));
1475
1475
  } catch {
1476
- L = [];
1476
+ T = [];
1477
1477
  }
1478
- const N = L.filter(
1479
- (a) => typeof a == "string" && !a.startsWith("_") && a !== "constructor"
1478
+ const L = T.filter(
1479
+ (y) => typeof y == "string" && !y.startsWith("_") && y !== "constructor"
1480
1480
  );
1481
- for (const a of N) {
1482
- const v = `update:${a}`, y = (h) => {
1483
- const T = h.detail !== void 0 ? h.detail : h.target instanceof HTMLInputElement || h.target instanceof HTMLTextAreaElement || h.target instanceof HTMLSelectElement ? h.target.value : void 0, O = { ...j(C) ? C.value || {} : u[d] || {}, [a]: T };
1481
+ for (const y of L) {
1482
+ const k = `update:${y}`, l = (m) => {
1483
+ const A = m.detail !== void 0 ? m.detail : m.target instanceof HTMLInputElement || m.target instanceof HTMLTextAreaElement || m.target instanceof HTMLSelectElement ? m.target.value : void 0, O = { ...P(_) ? _.value || {} : u[d] || {}, [y]: A };
1484
1484
  try {
1485
- typeof l == "function" && l({
1485
+ typeof a == "function" && a({
1486
1486
  detail: O
1487
1487
  });
1488
1488
  } catch {
1489
1489
  }
1490
1490
  };
1491
- P(() => {
1492
- Q.addListener(e, v, y);
1491
+ H(() => {
1492
+ te.addListener(e, k, l);
1493
1493
  });
1494
1494
  }
1495
1495
  }
1496
1496
  } catch {
1497
1497
  }
1498
- } else if (l == null)
1499
- V(e, p);
1498
+ } else if (a == null)
1499
+ q(e, p);
1500
1500
  else {
1501
- const g = t?.isCustomElement ?? n?.isCustomElement ?? !1;
1502
- if (g || p in e)
1501
+ const h = t?.isCustomElement ?? n?.isCustomElement ?? !1;
1502
+ if (h || p in e)
1503
1503
  try {
1504
- e[p] = l, p === "disabled" && l === !1 && !g && J(e) && V(e, "disabled");
1504
+ e[p] = a, p === "disabled" && a === !1 && !h && X(e) && q(e, "disabled");
1505
1505
  } catch {
1506
1506
  }
1507
1507
  else
1508
- l === !1 && V(e, p);
1508
+ a === !1 && q(e, p);
1509
1509
  }
1510
1510
  }
1511
- for (const [p, S] of Object.entries(
1512
- o.listeners || {}
1511
+ for (const [p, v] of Object.entries(
1512
+ i.listeners || {}
1513
1513
  )) {
1514
- Q.addListener(e, p, S);
1514
+ te.addListener(e, p, v);
1515
1515
  try {
1516
- const l = e && e.parentElement;
1517
- l && l !== e && Q.addListener(
1518
- l,
1516
+ const a = e && e.parentElement;
1517
+ a && a !== e && te.addListener(
1518
+ a,
1519
1519
  p,
1520
- S
1520
+ v
1521
1521
  );
1522
1522
  } catch {
1523
1523
  }
1524
1524
  }
1525
- const m = { ...n.attrs ?? {} }, A = c;
1525
+ const g = { ...n.attrs ?? {} }, w = c;
1526
1526
  try {
1527
- const p = o && o.attrs || {};
1527
+ const p = i && i.attrs || {};
1528
1528
  if (Object.prototype.hasOwnProperty.call(p, "class") && p.class === void 0 && typeof e.getAttribute == "function") {
1529
- const S = e.getAttribute("class");
1530
- S !== null && (m.class = S);
1529
+ const v = e.getAttribute("class");
1530
+ v !== null && (g.class = v);
1531
1531
  }
1532
1532
  if (Object.prototype.hasOwnProperty.call(p, "style") && p.style === void 0 && typeof e.getAttribute == "function") {
1533
- const S = e.getAttribute("style");
1534
- S !== null && (m.style = S);
1533
+ const v = e.getAttribute("style");
1534
+ v !== null && (g.style = v);
1535
1535
  }
1536
1536
  try {
1537
1537
  if (typeof e.getAttribute == "function") {
1538
- const S = e.getAttribute("class");
1538
+ const v = e.getAttribute("class");
1539
1539
  try {
1540
- e instanceof HTMLInputElement && e.type === "text" && S !== null && S !== m.class && (m.class = S);
1540
+ e instanceof HTMLInputElement && e.type === "text" && v !== null && v !== g.class && (g.class = v);
1541
1541
  } catch {
1542
1542
  }
1543
1543
  }
@@ -1545,544 +1545,544 @@ function et(e, n, t, s) {
1545
1545
  }
1546
1546
  } catch {
1547
1547
  }
1548
- for (const p in { ...m, ...A }) {
1549
- const S = m[p], l = A[p];
1550
- let k = S, b = l;
1551
- if (j(S) && (k = S.value), j(l) && (b = l.value), k !== b)
1548
+ for (const p in { ...g, ...w }) {
1549
+ const v = g[p], a = w[p];
1550
+ let C = v, b = a;
1551
+ if (P(v) && (C = v.value), P(a) && (b = a.value), C !== b)
1552
1552
  if (E = !0, b == null || b === !1)
1553
- P(() => {
1554
- V(e, p);
1555
- }), re(n, p, void 0), p === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? P(() => {
1553
+ H(() => {
1554
+ q(e, p);
1555
+ }), se(n, p, void 0), p === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? H(() => {
1556
1556
  e.value = "";
1557
- }) : e instanceof HTMLSelectElement ? P(() => {
1557
+ }) : e instanceof HTMLSelectElement ? H(() => {
1558
1558
  e.value = "";
1559
- }) : e instanceof HTMLProgressElement && P(() => {
1559
+ }) : e instanceof HTMLProgressElement && H(() => {
1560
1560
  e.value = 0;
1561
- })), p === "checked" && e instanceof HTMLInputElement && P(() => {
1561
+ })), p === "checked" && e instanceof HTMLInputElement && H(() => {
1562
1562
  e.checked = !1;
1563
- }), p === "disabled" && J(e) && P(() => {
1563
+ }), p === "disabled" && X(e) && H(() => {
1564
1564
  (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = !1);
1565
1565
  });
1566
1566
  else {
1567
1567
  if (p === "value") {
1568
1568
  if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
1569
- P(() => {
1569
+ H(() => {
1570
1570
  e.value = b ?? "";
1571
1571
  });
1572
1572
  continue;
1573
1573
  } else if (e instanceof HTMLSelectElement) {
1574
- P(() => {
1574
+ H(() => {
1575
1575
  e.value = b ?? "";
1576
1576
  });
1577
1577
  continue;
1578
1578
  } else if (e instanceof HTMLProgressElement) {
1579
- P(() => {
1579
+ H(() => {
1580
1580
  e.value = Number(b);
1581
1581
  });
1582
1582
  continue;
1583
1583
  }
1584
1584
  }
1585
1585
  if (p === "checked" && e instanceof HTMLInputElement) {
1586
- P(() => {
1586
+ H(() => {
1587
1587
  e.checked = !!b;
1588
1588
  });
1589
1589
  continue;
1590
1590
  }
1591
1591
  if (p === "style") {
1592
- const d = z(b);
1593
- d !== null && B(e, p, String(d)), re(n, p, b);
1592
+ const d = F(b);
1593
+ d !== null && D(e, p, String(d)), se(n, p, b);
1594
1594
  continue;
1595
1595
  }
1596
1596
  if (p === "class") {
1597
- const d = z(b);
1598
- d !== null && B(e, p, String(d)), re(n, p, b);
1597
+ const d = F(b);
1598
+ d !== null && D(e, p, String(d)), se(n, p, b);
1599
1599
  continue;
1600
1600
  }
1601
- if (p === "disabled" && J(e)) {
1602
- P(() => {
1603
- const d = ye(b);
1601
+ if (p === "disabled" && X(e)) {
1602
+ H(() => {
1603
+ const d = ge(b);
1604
1604
  (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = d);
1605
- }), ye(b) ? P(() => {
1606
- B(e, p, "");
1607
- }) : P(() => {
1608
- V(e, p);
1605
+ }), ge(b) ? H(() => {
1606
+ D(e, p, "");
1607
+ }) : H(() => {
1608
+ q(e, p);
1609
1609
  });
1610
1610
  continue;
1611
1611
  }
1612
- const g = e.namespaceURI === "http://www.w3.org/2000/svg";
1613
- if (_ && !g && p.includes("-"))
1614
- if (st(p)) {
1615
- const d = z(l ?? b);
1612
+ const h = e.namespaceURI === "http://www.w3.org/2000/svg";
1613
+ if (S && !h && p.includes("-"))
1614
+ if (at(p)) {
1615
+ const d = F(a ?? b);
1616
1616
  if (d !== null) {
1617
1617
  try {
1618
- B(e, p, String(d));
1618
+ D(e, p, String(d));
1619
1619
  } catch {
1620
1620
  }
1621
- re(n, p, b);
1621
+ se(n, p, b);
1622
1622
  }
1623
1623
  } else {
1624
- const d = Ve(p);
1624
+ const d = Ze(p);
1625
1625
  try {
1626
- const C = e;
1627
- C[d] = j(l) ? l : b, re(n, p, b);
1626
+ const _ = e;
1627
+ _[d] = P(a) ? a : b, se(n, p, b);
1628
1628
  } catch {
1629
- const C = z(l ?? b);
1630
- C !== null && B(e, p, String(C));
1629
+ const _ = F(a ?? b);
1630
+ _ !== null && D(e, p, String(_));
1631
1631
  }
1632
1632
  }
1633
- else if (!g && p in e)
1633
+ else if (!h && p in e)
1634
1634
  try {
1635
1635
  const d = e;
1636
- d[p] = j(l) ? l : b, re(n, p, b);
1636
+ d[p] = P(a) ? a : b, se(n, p, b);
1637
1637
  } catch {
1638
- const d = z(b);
1639
- d !== null && (B(e, p, String(d)), re(n, p, b));
1638
+ const d = F(b);
1639
+ d !== null && (D(e, p, String(d)), se(n, p, b));
1640
1640
  }
1641
1641
  else {
1642
- const d = z(b);
1643
- d !== null && (B(e, p, String(d)), re(n, p, b));
1642
+ const d = F(b);
1643
+ d !== null && (D(e, p, String(d)), se(n, p, b));
1644
1644
  }
1645
1645
  }
1646
1646
  }
1647
1647
  try {
1648
- if (J(e)) {
1649
- const p = i.disabled;
1650
- let S;
1648
+ if (X(e)) {
1649
+ const p = o.disabled;
1650
+ let v;
1651
1651
  try {
1652
- const k = Object.prototype.hasOwnProperty.call(
1653
- o.props || {},
1652
+ const C = Object.prototype.hasOwnProperty.call(
1653
+ i.props || {},
1654
1654
  "disabled"
1655
1655
  ), b = p && typeof p == "object" && "value" in p;
1656
- let g = !1;
1657
- P(() => {
1658
- g = !!j(p);
1656
+ let h = !1;
1657
+ H(() => {
1658
+ h = !!P(p);
1659
1659
  });
1660
- const d = Ue(p);
1661
- g || b || k || d ? S = p : S = c.disabled;
1660
+ const d = Ve(p);
1661
+ h || b || C || d ? v = p : v = c.disabled;
1662
1662
  } catch {
1663
- S = c.disabled;
1664
- }
1665
- const l = ye(S);
1666
- P(() => {
1667
- (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = l);
1668
- }), l ? P(() => {
1669
- B(e, "disabled", "");
1670
- }) : P(() => {
1671
- V(e, "disabled");
1663
+ v = c.disabled;
1664
+ }
1665
+ const a = ge(v);
1666
+ H(() => {
1667
+ (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = a);
1668
+ }), a ? H(() => {
1669
+ D(e, "disabled", "");
1670
+ }) : H(() => {
1671
+ q(e, "disabled");
1672
1672
  });
1673
1673
  }
1674
1674
  } catch {
1675
1675
  }
1676
- if (_ && E) {
1676
+ if (S && E) {
1677
1677
  const p = e;
1678
- P(() => {
1678
+ H(() => {
1679
1679
  p._applyProps?.(p._cfg);
1680
- }), P(() => {
1680
+ }), H(() => {
1681
1681
  typeof p.requestRender == "function" ? p.requestRender() : typeof p._render == "function" && p._render?.(p._cfg);
1682
1682
  });
1683
1683
  }
1684
1684
  }
1685
- function G(e, n, t, s = null) {
1685
+ function Z(e, n, t, s = null) {
1686
1686
  if (typeof e == "string")
1687
1687
  return document.createTextNode(e);
1688
1688
  if (e.tag === "#text") {
1689
- const l = document.createTextNode(
1689
+ const a = document.createTextNode(
1690
1690
  typeof e.children == "string" ? e.children : ""
1691
1691
  );
1692
- return e.key != null && q(l, e.key), l;
1692
+ return e.key != null && G(a, e.key), a;
1693
1693
  }
1694
1694
  if (e.tag === "#raw") {
1695
- const l = typeof e.children == "string" ? e.children : "";
1696
- return document.createRange().createContextualFragment(l);
1695
+ const a = typeof e.children == "string" ? e.children : "";
1696
+ return document.createRange().createContextualFragment(a);
1697
1697
  }
1698
1698
  if (e.tag === "#anchor") {
1699
- const l = e, k = Array.isArray(l.children) ? l.children : [], b = document.createTextNode(""), g = document.createTextNode("");
1700
- l.key != null && (q(b, `${l.key}:start`), q(g, `${l.key}:end`)), l._startNode = b, l._endNode = g;
1699
+ const a = e, C = Array.isArray(a.children) ? a.children : [], b = document.createTextNode(""), h = document.createTextNode("");
1700
+ a.key != null && (G(b, `${a.key}:start`), G(h, `${a.key}:end`)), a._startNode = b, a._endNode = h;
1701
1701
  const d = document.createDocumentFragment();
1702
1702
  d.appendChild(b);
1703
- for (const C of k) {
1704
- const L = G(
1705
- C,
1703
+ for (const _ of C) {
1704
+ const T = Z(
1705
+ _,
1706
1706
  n,
1707
1707
  t,
1708
1708
  // propagate parent namespace (was previously a boolean)
1709
1709
  s
1710
1710
  );
1711
- if (l.key != null && L instanceof Element && !L.hasAttribute("data-anchor-key")) {
1712
- const N = C;
1713
- N && typeof N == "object" && N.key != null || q(L, String(l.key));
1711
+ if (a.key != null && T instanceof Element && !T.hasAttribute("data-anchor-key")) {
1712
+ const L = _;
1713
+ L && typeof L == "object" && L.key != null || G(T, String(a.key));
1714
1714
  }
1715
- d.appendChild(L);
1715
+ d.appendChild(T);
1716
1716
  }
1717
- return d.appendChild(g), d;
1717
+ return d.appendChild(h), d;
1718
1718
  }
1719
- const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0, i = (r && typeof r.xmlns == "string" ? String(r.xmlns) : void 0) ?? s ?? dt[e.tag] ?? null, c = i ? document.createElementNS(i, e.tag) : document.createElement(e.tag);
1720
- e.key != null && q(c, e.key), e.props && e.props?._transitionGroup && $t(
1719
+ const r = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0, o = (r && typeof r.xmlns == "string" ? String(r.xmlns) : void 0) ?? s ?? gt[e.tag] ?? null, c = o ? document.createElementNS(o, e.tag) : document.createElement(e.tag);
1720
+ e.key != null && G(c, e.key), e.props && e.props?._transitionGroup && xt(
1721
1721
  c,
1722
1722
  e.props?._transitionGroup
1723
1723
  );
1724
- const { props: f = {}, attrs: u = {}, directives: _ = {} } = e.props ?? {}, E = lt(
1725
- _,
1724
+ const { props: f = {}, attrs: u = {}, directives: S = {} } = e.props ?? {}, E = dt(
1725
+ S,
1726
1726
  n,
1727
1727
  c instanceof HTMLElement ? c : void 0,
1728
1728
  u
1729
- ), m = {
1729
+ ), g = {
1730
1730
  ...f,
1731
1731
  ...E.props
1732
- }, A = {
1732
+ }, w = {
1733
1733
  ...u,
1734
1734
  ...E.attrs
1735
1735
  };
1736
1736
  try {
1737
- const l = (A && A.class) ?? (m && m.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), k = z(l);
1738
- if (k !== null) {
1739
- const b = String(k).trim();
1740
- b && B(c, "class", b);
1737
+ const a = (w && w.class) ?? (g && g.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), C = F(a);
1738
+ if (C !== null) {
1739
+ const b = String(C).trim();
1740
+ b && D(c, "class", b);
1741
1741
  }
1742
1742
  } catch {
1743
1743
  }
1744
1744
  try {
1745
- if (m.disabled !== void 0 && c && J(c)) {
1746
- const l = m.disabled, k = l && typeof l == "object" && "value" in l;
1745
+ if (g.disabled !== void 0 && c && X(c)) {
1746
+ const a = g.disabled, C = a && typeof a == "object" && "value" in a;
1747
1747
  let b = !1;
1748
1748
  try {
1749
- b = j(l);
1749
+ b = P(a);
1750
1750
  } catch {
1751
1751
  b = !1;
1752
1752
  }
1753
- !k && !b && P(() => {
1754
- A.disabled = l, delete m.disabled;
1753
+ !C && !b && H(() => {
1754
+ w.disabled = a, delete g.disabled;
1755
1755
  });
1756
1756
  }
1757
1757
  } catch {
1758
1758
  }
1759
1759
  const p = c.namespaceURI === "http://www.w3.org/2000/svg";
1760
- for (const l in A) {
1761
- const k = A[l];
1762
- if (typeof l != "string" || /\[object Object\]/.test(l))
1760
+ for (const a in w) {
1761
+ const C = w[a];
1762
+ if (typeof a != "string" || /\[object Object\]/.test(a))
1763
1763
  continue;
1764
- const b = Ke(k);
1764
+ const b = Fe(C);
1765
1765
  if (typeof b == "boolean")
1766
- b ? B(c, l, "") : P(() => {
1767
- V(c, l);
1766
+ b ? D(c, a, "") : H(() => {
1767
+ q(c, a);
1768
1768
  });
1769
1769
  else if (b != null) {
1770
- if (l === "disabled" && J(c)) {
1771
- const g = m.disabled, d = Ue(g) ? g : b, C = ye(d);
1772
- P(() => {
1773
- c.disabled = C;
1774
- }), C ? P(() => {
1775
- B(c, l, "");
1776
- }) : P(() => {
1777
- V(c, l);
1770
+ if (a === "disabled" && X(c)) {
1771
+ const h = g.disabled, d = Ve(h) ? h : b, _ = ge(d);
1772
+ H(() => {
1773
+ c.disabled = _;
1774
+ }), _ ? H(() => {
1775
+ D(c, a, "");
1776
+ }) : H(() => {
1777
+ q(c, a);
1778
1778
  });
1779
1779
  continue;
1780
1780
  }
1781
- if (!p && l === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement || c instanceof HTMLProgressElement))
1781
+ if (!p && a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement || c instanceof HTMLProgressElement))
1782
1782
  try {
1783
1783
  c instanceof HTMLProgressElement ? c.value = Number(b) : c.value = String(b ?? "");
1784
1784
  } catch {
1785
- const g = z(b);
1786
- g !== null && B(c, l, String(g));
1785
+ const h = F(b);
1786
+ h !== null && D(c, a, String(h));
1787
1787
  }
1788
- else if (!p && l === "checked" && c instanceof HTMLInputElement)
1788
+ else if (!p && a === "checked" && c instanceof HTMLInputElement)
1789
1789
  try {
1790
1790
  c.checked = !!b;
1791
1791
  } catch {
1792
- const g = z(b);
1793
- g !== null && B(c, l, String(g));
1792
+ const h = F(b);
1793
+ h !== null && D(c, a, String(h));
1794
1794
  }
1795
- else if (!p && l in c)
1795
+ else if (!p && a in c)
1796
1796
  try {
1797
- c[l] = b, l === "disabled" && b === !1 && J(c) && V(c, "disabled"), re(e.props, l, b);
1797
+ c[a] = b, a === "disabled" && b === !1 && X(c) && q(c, "disabled"), se(e.props, a, b);
1798
1798
  } catch {
1799
- const g = z(b);
1800
- g !== null && B(c, l, String(g));
1799
+ const h = F(b);
1800
+ h !== null && D(c, a, String(h));
1801
1801
  }
1802
- else if ((e.props?.isCustomElement ?? !1) && !p && l.includes("-")) {
1803
- const d = Ve(l);
1802
+ else if ((e.props?.isCustomElement ?? !1) && !p && a.includes("-")) {
1803
+ const d = Ze(a);
1804
1804
  try {
1805
1805
  c[d] = b;
1806
1806
  } catch {
1807
- const C = z(b);
1808
- C !== null && B(c, l, String(C));
1807
+ const _ = F(b);
1808
+ _ !== null && D(c, a, String(_));
1809
1809
  }
1810
1810
  } else {
1811
- const d = z(b);
1812
- d !== null && B(c, l, String(d));
1811
+ const d = F(b);
1812
+ d !== null && D(c, a, String(d));
1813
1813
  }
1814
1814
  }
1815
1815
  }
1816
- for (const l in m) {
1817
- const k = m[l];
1818
- if (!(typeof l != "string" || /\[object Object\]/.test(l)))
1819
- if (l === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement)) {
1820
- const b = typeof k == "object" && k !== null && he(k) ? k.value : k;
1821
- P(() => {
1816
+ for (const a in g) {
1817
+ const C = g[a];
1818
+ if (!(typeof a != "string" || /\[object Object\]/.test(a)))
1819
+ if (a === "value" && (c instanceof HTMLInputElement || c instanceof HTMLTextAreaElement || c instanceof HTMLSelectElement)) {
1820
+ const b = typeof C == "object" && C !== null && me(C) ? C.value : C;
1821
+ H(() => {
1822
1822
  c.value = String(b ?? "");
1823
1823
  });
1824
- } else if (l.startsWith("on") && typeof k == "function") {
1825
- const b = at(l), g = b.includes(":") ? (() => {
1826
- const d = b.split(":"), C = d[1];
1827
- if (C.includes("-")) {
1828
- const L = C.split("-").map(
1829
- (N, a) => a === 0 ? N : N.charAt(0).toUpperCase() + N.slice(1)
1824
+ } else if (a.startsWith("on") && typeof C == "function") {
1825
+ const b = pt(a), h = b.includes(":") ? (() => {
1826
+ const d = b.split(":"), _ = d[1];
1827
+ if (_.includes("-")) {
1828
+ const T = _.split("-").map(
1829
+ (L, y) => y === 0 ? L : L.charAt(0).toUpperCase() + L.slice(1)
1830
1830
  ).join("");
1831
- return `${d[0]}:${L}`;
1831
+ return `${d[0]}:${T}`;
1832
1832
  } else {
1833
- const L = C.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1834
- return `${d[0]}:${L}`;
1833
+ const T = _.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1834
+ return `${d[0]}:${T}`;
1835
1835
  }
1836
1836
  })() : b;
1837
- E.listeners && (E.listeners[b] || E.listeners[g]) || Q.addListener(c, b, k);
1837
+ E.listeners && (E.listeners[b] || E.listeners[h]) || te.addListener(c, b, C);
1838
1838
  } else {
1839
- if (l.startsWith("on") && k === void 0)
1839
+ if (a.startsWith("on") && C === void 0)
1840
1840
  continue;
1841
- if (k == null || k === !1)
1842
- V(c, l);
1841
+ if (C == null || C === !1)
1842
+ q(c, a);
1843
1843
  else {
1844
- const b = e.props?.isCustomElement ?? !1, g = typeof k == "object" && k !== null && j(k) ? k : he(k) && typeof k.value < "u" ? k.value : k;
1845
- if (l === "class" || l === "style") {
1844
+ const b = e.props?.isCustomElement ?? !1, h = typeof C == "object" && C !== null && P(C) ? C : me(C) && typeof C.value < "u" ? C.value : C;
1845
+ if (a === "class" || a === "style") {
1846
1846
  try {
1847
- const d = z(g);
1848
- d !== null && B(c, l, String(d));
1847
+ const d = F(h);
1848
+ d !== null && D(c, a, String(d));
1849
1849
  } catch {
1850
1850
  }
1851
1851
  continue;
1852
1852
  }
1853
- if (b || l in c)
1853
+ if (b || a in c)
1854
1854
  try {
1855
- const d = typeof k == "object" && k !== null && j(k) ? k : he(k) ? k.value : k;
1856
- if (l === "disabled" && J(c)) {
1857
- const C = m.disabled !== void 0 ? m.disabled : d, L = ye(C);
1858
- P(() => {
1859
- c.disabled = L;
1860
- }), L ? P(() => {
1861
- B(c, l, "");
1862
- }) : P(() => {
1863
- V(c, l);
1855
+ const d = typeof C == "object" && C !== null && P(C) ? C : me(C) ? C.value : C;
1856
+ if (a === "disabled" && X(c)) {
1857
+ const _ = g.disabled !== void 0 ? g.disabled : d, T = ge(_);
1858
+ H(() => {
1859
+ c.disabled = T;
1860
+ }), T ? H(() => {
1861
+ D(c, a, "");
1862
+ }) : H(() => {
1863
+ q(c, a);
1864
1864
  });
1865
1865
  continue;
1866
1866
  }
1867
1867
  try {
1868
- if (typeof c[l] == "boolean") {
1869
- let L = d;
1870
- typeof d == "string" ? d === "false" ? L = !1 : d === "true" ? L = !0 : L = !!d && d !== "" : L = !!d, c[l] = L;
1868
+ if (typeof c[a] == "boolean") {
1869
+ let T = d;
1870
+ typeof d == "string" ? d === "false" ? T = !1 : d === "true" ? T = !0 : T = !!d && d !== "" : T = !!d, c[a] = T;
1871
1871
  } else
1872
- c[l] = d;
1872
+ c[a] = d;
1873
1873
  } catch {
1874
- c[l] = d;
1874
+ c[a] = d;
1875
1875
  }
1876
1876
  } catch {
1877
1877
  }
1878
1878
  }
1879
1879
  }
1880
1880
  }
1881
- for (const [l, k] of Object.entries(
1881
+ for (const [a, C] of Object.entries(
1882
1882
  E.listeners || {}
1883
1883
  ))
1884
- Q.addListener(c, l, k);
1885
- const S = {
1884
+ te.addListener(c, a, C);
1885
+ const v = {
1886
1886
  ...e,
1887
1887
  props: {
1888
1888
  ...e.props,
1889
1889
  ...E.props
1890
1890
  }
1891
1891
  };
1892
- Ce(S, c, t);
1892
+ we(v, c, t);
1893
1893
  try {
1894
- const l = c;
1895
- if (typeof l._applyProps == "function")
1894
+ const a = c;
1895
+ if (typeof a._applyProps == "function")
1896
1896
  try {
1897
- l._applyProps(l._cfg);
1897
+ a._applyProps(a._cfg);
1898
1898
  } catch {
1899
1899
  }
1900
- typeof l.requestRender == "function" ? l.requestRender() : typeof l._render == "function" && l._render(l._cfg);
1900
+ typeof a.requestRender == "function" ? a.requestRender() : typeof a._render == "function" && a._render(a._cfg);
1901
1901
  } catch {
1902
1902
  }
1903
1903
  if (Array.isArray(e.children)) {
1904
- const l = e.tag === "foreignObject" && i === ht ? null : c.namespaceURI ?? null;
1905
- for (const k of e.children)
1906
- c.appendChild(G(k, n, t, l));
1904
+ const a = e.tag === "foreignObject" && o === bt ? null : c.namespaceURI ?? null;
1905
+ for (const C of e.children)
1906
+ c.appendChild(Z(C, n, t, a));
1907
1907
  } else typeof e.children == "string" && (c.textContent = e.children);
1908
1908
  try {
1909
- if (c instanceof HTMLSelectElement && A && Object.prototype.hasOwnProperty.call(A, "value"))
1909
+ if (c instanceof HTMLSelectElement && w && Object.prototype.hasOwnProperty.call(w, "value"))
1910
1910
  try {
1911
- c.value = String(A.value ?? "");
1911
+ c.value = String(w.value ?? "");
1912
1912
  } catch {
1913
1913
  }
1914
1914
  } catch {
1915
1915
  }
1916
1916
  try {
1917
- if (J(c)) {
1918
- const l = m.disabled, k = A.disabled, b = l && typeof l == "object" && "value" in l;
1919
- let g = !1;
1917
+ if (X(c)) {
1918
+ const a = g.disabled, C = w.disabled, b = a && typeof a == "object" && "value" in a;
1919
+ let h = !1;
1920
1920
  try {
1921
- g = !!j(l);
1921
+ h = !!P(a);
1922
1922
  } catch {
1923
- g = !1;
1924
- }
1925
- const C = g || b || Ue(l) ? l : k, L = ye(C);
1926
- P(() => {
1927
- c.disabled = L;
1928
- }), L ? P(() => {
1929
- B(c, "disabled", "");
1930
- }) : P(() => {
1931
- V(c, "disabled");
1923
+ h = !1;
1924
+ }
1925
+ const _ = h || b || Ve(a) ? a : C, T = ge(_);
1926
+ H(() => {
1927
+ c.disabled = T;
1928
+ }), T ? H(() => {
1929
+ D(c, "disabled", "");
1930
+ }) : H(() => {
1931
+ q(c, "disabled");
1932
1932
  });
1933
1933
  }
1934
1934
  } catch {
1935
1935
  }
1936
1936
  return c;
1937
1937
  }
1938
- function Rt(e, n, t, s, r) {
1938
+ function Kt(e, n, t, s, r) {
1939
1939
  if (typeof t == "string") {
1940
1940
  e.textContent !== t && (e.textContent = t);
1941
1941
  return;
1942
1942
  }
1943
1943
  if (!Array.isArray(t)) return;
1944
- const o = e.childNodes, i = [];
1945
- for (let S = 0; S < o.length; S++)
1946
- i.push(o[S]);
1947
- const c = Array.isArray(n) ? n : [], f = Ot(e);
1944
+ const i = e.childNodes, o = [];
1945
+ for (let v = 0; v < i.length; v++)
1946
+ o.push(i[v]);
1947
+ const c = Array.isArray(n) ? n : [], f = Ht(e);
1948
1948
  if (f) {
1949
- const S = (g) => {
1950
- if (typeof g == "string")
1951
- return g.startsWith("each-") ? g.substring(5) : g;
1952
- if (typeof g == "number") return String(g);
1953
- }, l = [], k = [];
1954
- for (const g of t)
1955
- if (g && g.tag === "#anchor") {
1956
- const d = Array.isArray(g.children) ? g.children : [];
1957
- for (const C of d) {
1958
- const L = S(
1959
- C.key ?? g.key ?? "unknown"
1949
+ const v = (h) => {
1950
+ if (typeof h == "string")
1951
+ return h.startsWith("each-") ? h.substring(5) : h;
1952
+ if (typeof h == "number") return String(h);
1953
+ }, a = [], C = [];
1954
+ for (const h of t)
1955
+ if (h && h.tag === "#anchor") {
1956
+ const d = Array.isArray(h.children) ? h.children : [];
1957
+ for (const _ of d) {
1958
+ const T = v(
1959
+ _.key ?? h.key ?? "unknown"
1960
1960
  );
1961
- l.push({ ...C, key: L });
1961
+ a.push({ ..._, key: T });
1962
1962
  }
1963
- } else g && l.push({ ...g, key: S(g.key) });
1964
- for (const g of c)
1965
- if (g && g.tag === "#anchor") {
1966
- const d = Array.isArray(g.children) ? g.children : [];
1967
- for (const C of d) {
1968
- const L = S(
1969
- C.key ?? g.key ?? "unknown"
1963
+ } else h && a.push({ ...h, key: v(h.key) });
1964
+ for (const h of c)
1965
+ if (h && h.tag === "#anchor") {
1966
+ const d = Array.isArray(h.children) ? h.children : [];
1967
+ for (const _ of d) {
1968
+ const T = v(
1969
+ _.key ?? h.key ?? "unknown"
1970
1970
  );
1971
- k.push({ ...C, key: L });
1971
+ C.push({ ..._, key: T });
1972
1972
  }
1973
- } else g && k.push({
1974
- ...g,
1975
- key: S(g.key)
1973
+ } else h && C.push({
1974
+ ...h,
1975
+ key: v(h.key)
1976
1976
  });
1977
- if (l.some((g) => g && g.key != null) || k.some((g) => g && g.key != null)) {
1978
- const g = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
1979
- for (const y of k)
1980
- if (y && y.key != null) {
1981
- const h = String(y.key);
1982
- g.set(h, y);
1977
+ if (a.some((h) => h && h.key != null) || C.some((h) => h && h.key != null)) {
1978
+ const h = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
1979
+ for (const l of C)
1980
+ if (l && l.key != null) {
1981
+ const m = String(l.key);
1982
+ h.set(m, l);
1983
1983
  }
1984
- for (let y = 0; y < i.length; y++) {
1985
- const h = i[y];
1986
- let T = Pe(h);
1987
- if (T = S(T), T != null && h instanceof Element && h.nodeType === Node.ELEMENT_NODE) {
1988
- let $ = typeof T == "string" && T.includes(":") ? T.substring(0, T.lastIndexOf(":")) : T;
1989
- $ = String($), d.set($, h);
1984
+ for (let l = 0; l < o.length; l++) {
1985
+ const m = o[l];
1986
+ let A = Ie(m);
1987
+ if (A = v(A), A != null && m instanceof Element && m.nodeType === Node.ELEMENT_NODE) {
1988
+ let N = typeof A == "string" && A.includes(":") ? A.substring(0, A.lastIndexOf(":")) : A;
1989
+ N = String(N), d.set(N, m);
1990
1990
  }
1991
1991
  }
1992
- const C = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Map(), N = i.length > 0;
1993
- if (f.moveClass && N)
1994
- for (let y = 0; y < i.length; y++) {
1995
- const h = i[y];
1996
- if (h instanceof HTMLElement && h.parentElement) {
1997
- const T = h.getBoundingClientRect();
1998
- L.set(h, T);
1992
+ const _ = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Map(), L = o.length > 0;
1993
+ if (f.moveClass && L)
1994
+ for (let l = 0; l < o.length; l++) {
1995
+ const m = o[l];
1996
+ if (m instanceof HTMLElement && m.parentElement) {
1997
+ const A = m.getBoundingClientRect();
1998
+ T.set(m, A);
1999
1999
  }
2000
2000
  }
2001
- const a = [];
2002
- for (const y of l) {
2003
- let h = y.key;
2004
- if (h == null) continue;
2005
- h = String(h);
2006
- const T = g.get(h);
2007
- let $ = d.get(h);
2008
- if ($ && T) {
2009
- const O = Ae($, T, y, s);
2010
- C.add($);
2011
- const w = String(h);
2012
- q(O, w), a.push({
2001
+ const y = [];
2002
+ for (const l of a) {
2003
+ let m = l.key;
2004
+ if (m == null) continue;
2005
+ m = String(m);
2006
+ const A = h.get(m);
2007
+ let N = d.get(m);
2008
+ if (N && A) {
2009
+ const O = Te(N, A, l, s);
2010
+ _.add(N);
2011
+ const $ = String(m);
2012
+ G(O, $), y.push({
2013
2013
  node: O,
2014
- key: h,
2015
- newVNode: y,
2016
- oldVNode: T,
2014
+ key: m,
2015
+ newVNode: l,
2016
+ oldVNode: A,
2017
2017
  isNew: !1
2018
2018
  });
2019
2019
  } else {
2020
- $ = G(
2021
- y,
2020
+ N = Z(
2021
+ l,
2022
2022
  s,
2023
2023
  void 0,
2024
2024
  e instanceof Element ? e.namespaceURI ?? null : null
2025
- ), q($, String(h)), e.appendChild($);
2026
- const O = N || f.appear === !0;
2027
- $ instanceof HTMLElement && O && ke($, f).catch((w) => {
2028
- D("Enter transition error:", w);
2029
- }), a.push({ node: $, key: h, newVNode: y, isNew: !0 });
2025
+ ), G(N, String(m)), e.appendChild(N);
2026
+ const O = L || f.appear === !0;
2027
+ N instanceof HTMLElement && O && Ae(N, f).catch(($) => {
2028
+ W("Enter transition error:", $);
2029
+ }), y.push({ node: N, key: m, newVNode: l, isNew: !0 });
2030
2030
  }
2031
2031
  }
2032
- const v = [];
2033
- for (let y = 0; y < i.length; y++) {
2034
- const h = i[y], T = Pe(h);
2035
- if (!C.has(h) && T != null && h instanceof HTMLElement) {
2036
- const O = Be(h, f).then(() => {
2037
- e.contains(h) && e.removeChild(h);
2038
- }).catch((w) => {
2039
- D("Leave transition error:", w), e.contains(h) && e.removeChild(h);
2032
+ const k = [];
2033
+ for (let l = 0; l < o.length; l++) {
2034
+ const m = o[l], A = Ie(m);
2035
+ if (!_.has(m) && A != null && m instanceof HTMLElement) {
2036
+ const O = ze(m, f).then(() => {
2037
+ e.contains(m) && e.removeChild(m);
2038
+ }).catch(($) => {
2039
+ W("Leave transition error:", $), e.contains(m) && e.removeChild(m);
2040
2040
  });
2041
- v.push(O);
2041
+ k.push(O);
2042
2042
  }
2043
2043
  }
2044
- if (v.length === 0) {
2045
- let y = e.firstChild;
2046
- for (const { node: h } of a)
2047
- h !== y && e.insertBefore(h, y), y = h.nextSibling;
2048
- if (f.moveClass && L.size > 0) {
2049
- const h = [];
2050
- for (const { node: T, isNew: $ } of a)
2051
- if (!$ && T instanceof HTMLElement) {
2052
- const O = L.get(T);
2044
+ if (k.length === 0) {
2045
+ let l = e.firstChild;
2046
+ for (const { node: m } of y)
2047
+ m !== l && e.insertBefore(m, l), l = m.nextSibling;
2048
+ if (f.moveClass && T.size > 0) {
2049
+ const m = [];
2050
+ for (const { node: A, isNew: N } of y)
2051
+ if (!N && A instanceof HTMLElement) {
2052
+ const O = T.get(A);
2053
2053
  if (O) {
2054
- const w = T.getBoundingClientRect(), I = O.left - w.left, x = O.top - w.top;
2055
- if (I !== 0 || x !== 0) {
2056
- const ee = f.moveClass.split(/\s+/).filter((K) => K);
2057
- h.push({ node: T, deltaX: I, deltaY: x, moveClasses: ee });
2054
+ const $ = A.getBoundingClientRect(), R = O.left - $.left, M = O.top - $.top;
2055
+ if (R !== 0 || M !== 0) {
2056
+ const K = f.moveClass.split(/\s+/).filter((I) => I);
2057
+ m.push({ node: A, deltaX: R, deltaY: M, moveClasses: K });
2058
2058
  }
2059
2059
  }
2060
2060
  }
2061
- if (h.length > 0) {
2062
- for (const { node: T, deltaX: $, deltaY: O } of h)
2063
- T.style.transform = `translate(${$}px, ${O}px)`, T.style.transitionProperty = "none";
2061
+ if (m.length > 0) {
2062
+ for (const { node: A, deltaX: N, deltaY: O } of m)
2063
+ A.style.transform = `translate(${N}px, ${O}px)`, A.style.transitionProperty = "none";
2064
2064
  e.offsetHeight, requestAnimationFrame(() => {
2065
2065
  requestAnimationFrame(() => {
2066
- for (const { node: T, moveClasses: $ } of h)
2067
- for (const O of $)
2068
- T.classList.add(O);
2066
+ for (const { node: A, moveClasses: N } of m)
2067
+ for (const O of N)
2068
+ A.classList.add(O);
2069
2069
  requestAnimationFrame(() => {
2070
- const T = f.moveClass || "", $ = T.match(/duration-(\d+)/), O = $ ? `${$[1]}ms` : "300ms", w = T.match(
2070
+ const A = f.moveClass || "", N = A.match(/duration-(\d+)/), O = N ? `${N[1]}ms` : "300ms", $ = A.match(
2071
2071
  /ease-(out|in|in-out|linear)/
2072
- ), I = w ? `ease-${w[1]}` : "ease-out";
2073
- for (const { node: x } of h)
2074
- x.style.transition = `transform ${O} ${I}`;
2072
+ ), R = $ ? `ease-${$[1]}` : "ease-out";
2073
+ for (const { node: M } of m)
2074
+ M.style.transition = `transform ${O} ${R}`;
2075
2075
  requestAnimationFrame(() => {
2076
- for (const { node: x, moveClasses: ee } of h) {
2077
- x.style.removeProperty("transform");
2078
- const K = () => {
2079
- for (const H of ee)
2080
- x.classList.remove(H);
2081
- x.style.removeProperty("transition"), x.removeEventListener("transitionend", K), x.removeEventListener("transitioncancel", K);
2076
+ for (const { node: M, moveClasses: K } of m) {
2077
+ M.style.removeProperty("transform");
2078
+ const I = () => {
2079
+ for (const ie of K)
2080
+ M.classList.remove(ie);
2081
+ M.style.removeProperty("transition"), M.removeEventListener("transitionend", I), M.removeEventListener("transitioncancel", I);
2082
2082
  };
2083
- x.addEventListener("transitionend", K, {
2083
+ M.addEventListener("transitionend", I, {
2084
2084
  once: !0
2085
- }), x.addEventListener("transitioncancel", K, {
2085
+ }), M.addEventListener("transitioncancel", I, {
2086
2086
  once: !0
2087
2087
  });
2088
2088
  }
@@ -2097,203 +2097,203 @@ function Rt(e, n, t, s, r) {
2097
2097
  }
2098
2098
  }
2099
2099
  const u = /* @__PURE__ */ new Map();
2100
- for (const S of c)
2101
- S && S.key != null && u.set(S.key, S);
2102
- const _ = /* @__PURE__ */ new Map();
2103
- for (let S = 0; S < i.length; S++) {
2104
- const l = i[S], k = Pe(l);
2105
- k != null && _.set(k, l);
2100
+ for (const v of c)
2101
+ v && v.key != null && u.set(v.key, v);
2102
+ const S = /* @__PURE__ */ new Map();
2103
+ for (let v = 0; v < o.length; v++) {
2104
+ const a = o[v], C = Ie(a);
2105
+ C != null && S.set(C, a);
2106
2106
  }
2107
2107
  const E = /* @__PURE__ */ new Set();
2108
- let m = e.firstChild;
2109
- function A(S, l) {
2110
- let k = S;
2111
- for (; k && (E.add(k), k !== l); )
2112
- k = k.nextSibling;
2113
- }
2114
- function p(S, l, k, b, g, d = !0) {
2115
- const C = [];
2116
- let L = S.nextSibling;
2117
- for (; L && L !== l; )
2118
- C.push(L), L = L.nextSibling;
2119
- const N = Array.isArray(k) ? k : [];
2120
- if (b.some((v) => v && v.key != null) || N.some((v) => v && v.key != null)) {
2121
- const v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
2122
- for (const O of N)
2123
- O && O.key != null && v.set(O.key, O);
2124
- for (const O of C) {
2125
- const w = Pe(O);
2126
- w != null && y.set(w, O);
2127
- }
2128
- const h = g && g.state === "visible" && N.length === 0 && b.length > 0, T = /* @__PURE__ */ new Set();
2129
- let $ = S.nextSibling;
2108
+ let g = e.firstChild;
2109
+ function w(v, a) {
2110
+ let C = v;
2111
+ for (; C && (E.add(C), C !== a); )
2112
+ C = C.nextSibling;
2113
+ }
2114
+ function p(v, a, C, b, h, d = !0) {
2115
+ const _ = [];
2116
+ let T = v.nextSibling;
2117
+ for (; T && T !== a; )
2118
+ _.push(T), T = T.nextSibling;
2119
+ const L = Array.isArray(C) ? C : [];
2120
+ if (b.some((k) => k && k.key != null) || L.some((k) => k && k.key != null)) {
2121
+ const k = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
2122
+ for (const O of L)
2123
+ O && O.key != null && k.set(O.key, O);
2124
+ for (const O of _) {
2125
+ const $ = Ie(O);
2126
+ $ != null && l.set($, O);
2127
+ }
2128
+ const m = h && h.state === "visible" && L.length === 0 && b.length > 0, A = /* @__PURE__ */ new Set();
2129
+ let N = v.nextSibling;
2130
2130
  for (const O of b) {
2131
- let w;
2132
- if (O.key != null && y.has(O.key)) {
2133
- const I = v.get(O.key);
2134
- w = Ae(
2135
- y.get(O.key),
2136
- I,
2131
+ let $;
2132
+ if (O.key != null && l.has(O.key)) {
2133
+ const R = k.get(O.key);
2134
+ $ = Te(
2135
+ l.get(O.key),
2136
+ R,
2137
2137
  O,
2138
2138
  s
2139
- ), T.add(w), g && w instanceof HTMLElement && h && g.appear && ke(w, g).catch((x) => {
2140
- D("Transition enter error (appear):", x);
2141
- }), w !== $ && e.contains(w) && e.insertBefore(w, $);
2139
+ ), A.add($), h && $ instanceof HTMLElement && m && h.appear && Ae($, h).catch((M) => {
2140
+ W("Transition enter error (appear):", M);
2141
+ }), $ !== N && e.contains($) && e.insertBefore($, N);
2142
2142
  } else
2143
- w = G(
2143
+ $ = Z(
2144
2144
  O,
2145
2145
  s,
2146
2146
  void 0,
2147
2147
  e instanceof Element ? e.namespaceURI ?? null : null
2148
- ), e.insertBefore(w, $), T.add(w), g && w instanceof HTMLElement && d && ke(w, g).catch((I) => {
2149
- D("Transition enter error:", I);
2148
+ ), e.insertBefore($, N), A.add($), h && $ instanceof HTMLElement && d && Ae($, h).catch((R) => {
2149
+ W("Transition enter error:", R);
2150
2150
  });
2151
- $ = w.nextSibling;
2151
+ N = $.nextSibling;
2152
2152
  }
2153
- for (const O of C)
2154
- !T.has(O) && e.contains(O) && (g && O instanceof HTMLElement && d ? Be(O, g).then(() => {
2153
+ for (const O of _)
2154
+ !A.has(O) && e.contains(O) && (h && O instanceof HTMLElement && d ? ze(O, h).then(() => {
2155
2155
  e.contains(O) && e.removeChild(O);
2156
- }).catch((w) => {
2157
- D("Transition leave error:", w), e.contains(O) && e.removeChild(O);
2156
+ }).catch(($) => {
2157
+ W("Transition leave error:", $), e.contains(O) && e.removeChild(O);
2158
2158
  }) : e.removeChild(O));
2159
2159
  } else {
2160
- const v = Math.min(
2161
- N.length,
2160
+ const k = Math.min(
2161
+ L.length,
2162
2162
  b.length
2163
2163
  );
2164
- for (let y = 0; y < v; y++) {
2165
- const h = N[y], T = b[y], $ = Ae(C[y], h, T, s);
2166
- $ !== C[y] && (e.insertBefore($, C[y]), e.removeChild(C[y]));
2164
+ for (let l = 0; l < k; l++) {
2165
+ const m = L[l], A = b[l], N = Te(_[l], m, A, s);
2166
+ N !== _[l] && (e.insertBefore(N, _[l]), e.removeChild(_[l]));
2167
2167
  }
2168
- for (let y = v; y < b.length; y++) {
2169
- const h = G(
2170
- b[y],
2168
+ for (let l = k; l < b.length; l++) {
2169
+ const m = Z(
2170
+ b[l],
2171
2171
  s,
2172
2172
  void 0,
2173
2173
  e instanceof Element ? e.namespaceURI ?? null : null
2174
2174
  );
2175
- e.insertBefore(h, l), g && h instanceof HTMLElement && d && ke(h, g).catch((T) => {
2176
- D("Transition enter error:", T);
2175
+ e.insertBefore(m, a), h && m instanceof HTMLElement && d && Ae(m, h).catch((A) => {
2176
+ W("Transition enter error:", A);
2177
2177
  });
2178
2178
  }
2179
- for (let y = v; y < C.length; y++) {
2180
- const h = C[y];
2181
- g && h instanceof HTMLElement && d ? Be(h, g).then(() => {
2182
- e.contains(h) && e.removeChild(h);
2183
- }).catch((T) => {
2184
- D("Transition leave error:", T), e.contains(h) && e.removeChild(h);
2185
- }) : e.removeChild(h);
2186
- }
2187
- }
2188
- }
2189
- for (const S of t) {
2190
- let l;
2191
- if (S.tag === "#anchor") {
2192
- const k = S.key, b = `${k}:start`, g = `${k}:end`;
2193
- let d = _.get(b), C = _.get(g);
2194
- const L = Array.isArray(S.children) ? S.children : [];
2195
- if (d || (d = document.createTextNode(""), q(d, b)), C || (C = document.createTextNode(""), q(C, g)), S._startNode = d, S._endNode = C, !e.contains(d) || !e.contains(C)) {
2196
- e.insertBefore(d, m);
2197
- const N = S._transition, v = !(N && N.state === "visible" && L.length > 0) || N.appear;
2198
- for (const y of L) {
2199
- const h = G(
2200
- y,
2179
+ for (let l = k; l < _.length; l++) {
2180
+ const m = _[l];
2181
+ h && m instanceof HTMLElement && d ? ze(m, h).then(() => {
2182
+ e.contains(m) && e.removeChild(m);
2183
+ }).catch((A) => {
2184
+ W("Transition leave error:", A), e.contains(m) && e.removeChild(m);
2185
+ }) : e.removeChild(m);
2186
+ }
2187
+ }
2188
+ }
2189
+ for (const v of t) {
2190
+ let a;
2191
+ if (v.tag === "#anchor") {
2192
+ const C = v.key, b = `${C}:start`, h = `${C}:end`;
2193
+ let d = S.get(b), _ = S.get(h);
2194
+ const T = Array.isArray(v.children) ? v.children : [];
2195
+ if (d || (d = document.createTextNode(""), G(d, b)), _ || (_ = document.createTextNode(""), G(_, h)), v._startNode = d, v._endNode = _, !e.contains(d) || !e.contains(_)) {
2196
+ e.insertBefore(d, g);
2197
+ const L = v._transition, k = !(L && L.state === "visible" && T.length > 0) || L.appear;
2198
+ for (const l of T) {
2199
+ const m = Z(
2200
+ l,
2201
2201
  s,
2202
2202
  r,
2203
2203
  e instanceof Element ? e.namespaceURI ?? null : null
2204
2204
  );
2205
- e.insertBefore(h, m), N && h instanceof HTMLElement && v && ke(h, N).catch((T) => {
2206
- D("Transition enter error:", T);
2205
+ e.insertBefore(m, g), L && m instanceof HTMLElement && k && Ae(m, L).catch((A) => {
2206
+ W("Transition enter error:", A);
2207
2207
  });
2208
2208
  }
2209
- e.insertBefore(C, m);
2209
+ e.insertBefore(_, g);
2210
2210
  } else {
2211
- const N = S._transition, v = u.get(k)._transition, y = v && v.state !== N?.state, h = N && N.state === "visible" && L.length > 0 && !y, T = y || !h || N?.appear === !0;
2211
+ const L = v._transition, k = u.get(C)._transition, l = k && k.state !== L?.state, m = L && L.state === "visible" && T.length > 0 && !l, A = l || !m || L?.appear === !0;
2212
2212
  p(
2213
2213
  d,
2214
- C,
2215
- u.get(k)?.children,
2214
+ _,
2215
+ u.get(C)?.children,
2216
+ T,
2216
2217
  L,
2217
- N,
2218
- T
2218
+ A
2219
2219
  );
2220
2220
  }
2221
- A(d, C), m = C.nextSibling;
2221
+ w(d, _), g = _.nextSibling;
2222
2222
  continue;
2223
2223
  }
2224
- if (S.key != null && _.has(S.key)) {
2225
- const k = u.get(S.key);
2226
- l = Ae(
2227
- _.get(S.key),
2228
- k,
2229
- S,
2224
+ if (v.key != null && S.has(v.key)) {
2225
+ const C = u.get(v.key);
2226
+ a = Te(
2227
+ S.get(v.key),
2228
+ C,
2229
+ v,
2230
2230
  s,
2231
2231
  r
2232
- ), E.add(l), l !== m && e.contains(l) && (m && !e.contains(m) && (m = null), e.insertBefore(l, m));
2232
+ ), E.add(a), a !== g && e.contains(a) && (g && !e.contains(g) && (g = null), e.insertBefore(a, g));
2233
2233
  } else
2234
- l = G(
2235
- S,
2234
+ a = Z(
2235
+ v,
2236
2236
  s,
2237
2237
  r,
2238
2238
  e instanceof Element ? e.namespaceURI ?? null : null
2239
- ), m && !e.contains(m) && (m = null), e.insertBefore(l, m), E.add(l);
2240
- m = l.nextSibling;
2239
+ ), g && !e.contains(g) && (g = null), e.insertBefore(a, g), E.add(a);
2240
+ g = a.nextSibling;
2241
2241
  }
2242
- for (let S = 0; S < i.length; S++) {
2243
- const l = i[S];
2244
- !E.has(l) && e.contains(l) && (le(l, r), e.removeChild(l));
2242
+ for (let v = 0; v < o.length; v++) {
2243
+ const a = o[v];
2244
+ !E.has(a) && e.contains(a) && (ue(a, r), e.removeChild(a));
2245
2245
  }
2246
2246
  }
2247
- function Ae(e, n, t, s, r) {
2248
- if (n && typeof n != "string" && n.props?.ref && r && le(e, r), n === t) return e;
2247
+ function Te(e, n, t, s, r) {
2248
+ if (n && typeof n != "string" && n.props?.ref && r && ue(e, r), n === t) return e;
2249
2249
  if (typeof t == "string") {
2250
2250
  if (e.nodeType === Node.TEXT_NODE)
2251
2251
  return e.textContent !== t && (e.textContent = t), e;
2252
2252
  {
2253
- const i = document.createTextNode(t);
2254
- return e.parentNode?.replaceChild(i, e), i;
2253
+ const o = document.createTextNode(t);
2254
+ return e.parentNode?.replaceChild(o, e), o;
2255
2255
  }
2256
2256
  }
2257
2257
  if (t && typeof t != "string" && t.tag === "#anchor") {
2258
- const i = t, c = Array.isArray(i.children) ? i.children : [], f = i._startNode ?? document.createTextNode(""), u = i._endNode ?? document.createTextNode("");
2259
- i.key != null && (q(f, `${i.key}:start`), q(u, `${i.key}:end`)), i._startNode = f, i._endNode = u;
2260
- const _ = document.createDocumentFragment();
2261
- _.appendChild(f);
2258
+ const o = t, c = Array.isArray(o.children) ? o.children : [], f = o._startNode ?? document.createTextNode(""), u = o._endNode ?? document.createTextNode("");
2259
+ o.key != null && (G(f, `${o.key}:start`), G(u, `${o.key}:end`)), o._startNode = f, o._endNode = u;
2260
+ const S = document.createDocumentFragment();
2261
+ S.appendChild(f);
2262
2262
  for (const E of c) {
2263
- const m = G(
2263
+ const g = Z(
2264
2264
  E,
2265
2265
  s,
2266
2266
  r,
2267
2267
  e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
2268
2268
  );
2269
- _.appendChild(m);
2269
+ S.appendChild(g);
2270
2270
  }
2271
- return _.appendChild(u), e.parentNode?.replaceChild(_, e), f;
2271
+ return S.appendChild(u), e.parentNode?.replaceChild(S, e), f;
2272
2272
  }
2273
2273
  if (!t) {
2274
- le(e, r);
2275
- const i = document.createComment("removed");
2276
- return e.parentNode?.replaceChild(i, e), i;
2274
+ ue(e, r);
2275
+ const o = document.createComment("removed");
2276
+ return e.parentNode?.replaceChild(o, e), o;
2277
2277
  }
2278
2278
  if (!n || typeof n == "string") {
2279
- le(e, r);
2280
- const i = G(
2279
+ ue(e, r);
2280
+ const o = Z(
2281
2281
  t,
2282
2282
  s,
2283
2283
  r,
2284
2284
  e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
2285
2285
  );
2286
- return Ce(t, i, r), e.parentNode?.replaceChild(i, e), i;
2286
+ return we(t, o, r), e.parentNode?.replaceChild(o, e), o;
2287
2287
  }
2288
2288
  if (t.tag === "#anchor") {
2289
- const i = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
2290
- t.key != null && (q(c, `${t.key}:start`), q(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
2289
+ const o = Array.isArray(t.children) ? t.children : [], c = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
2290
+ t.key != null && (G(c, `${t.key}:start`), G(f, `${t.key}:end`)), t._startNode = c, t._endNode = f;
2291
2291
  const u = document.createDocumentFragment();
2292
2292
  u.appendChild(c);
2293
- for (const _ of i)
2293
+ for (const S of o)
2294
2294
  u.appendChild(
2295
- G(
2296
- _,
2295
+ Z(
2296
+ S,
2297
2297
  s,
2298
2298
  r,
2299
2299
  e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
@@ -2302,25 +2302,25 @@ function Ae(e, n, t, s, r) {
2302
2302
  return u.appendChild(f), e.parentNode?.replaceChild(u, e), c;
2303
2303
  }
2304
2304
  if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && n.key === t.key) {
2305
- const i = e;
2306
- return et(i, n.props || {}, t.props || {}, s), Rt(i, n.children, t.children, s, r), Ce(t, i, r), i;
2305
+ const o = e;
2306
+ return rt(o, n.props || {}, t.props || {}, s), Kt(o, n.children, t.children, s, r), we(t, o, r), o;
2307
2307
  }
2308
2308
  if (typeof n != "string" && typeof t != "string" && n.tag === t.tag && (n.tag && String(n.tag).includes("-") || t.props && t.props.isCustomElement || n.props && n.props.isCustomElement))
2309
2309
  try {
2310
2310
  const c = e;
2311
- return et(c, n.props || {}, t.props || {}, s), Ce(t, c, r), c;
2311
+ return rt(c, n.props || {}, t.props || {}, s), we(t, c, r), c;
2312
2312
  } catch {
2313
2313
  }
2314
- le(e, r);
2315
- const o = G(
2314
+ ue(e, r);
2315
+ const i = Z(
2316
2316
  t,
2317
2317
  s,
2318
2318
  r,
2319
2319
  e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
2320
2320
  );
2321
- return Ce(t, o, r), e.parentNode?.replaceChild(o, e), o;
2321
+ return we(t, i, r), e.parentNode?.replaceChild(i, e), i;
2322
2322
  }
2323
- function Bt(e, n, t, s) {
2323
+ function Ut(e, n, t, s) {
2324
2324
  let r;
2325
2325
  Array.isArray(n) ? n.length === 1 ? (r = n[0], r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })) : r = { tag: "div", key: "__root__", children: n } : (r = n, r && typeof r == "object" && r.key == null && (r = { ...r, key: "__root__" })), r && typeof r == "object" && r.tag === "#anchor" && (r = {
2326
2326
  tag: "div",
@@ -2329,15 +2329,15 @@ function Bt(e, n, t, s) {
2329
2329
  attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
2330
2330
  },
2331
2331
  children: [r]
2332
- }), r = ze(r, String(r.key ?? "root"));
2333
- const o = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
2332
+ }), r = qe(r, String(r.key ?? "root"));
2333
+ const i = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
2334
2334
  let c;
2335
- o && i ? typeof o != "string" && typeof r != "string" && o.tag === r.tag && o.key === r.key ? c = Ae(i, o, r, t, s) : (c = G(
2335
+ i && o ? typeof i != "string" && typeof r != "string" && i.tag === r.tag && i.key === r.key ? c = Te(o, i, r, t, s) : (c = Z(
2336
2336
  r,
2337
2337
  t,
2338
2338
  s,
2339
2339
  e.host instanceof Element ? e.host.namespaceURI ?? null : null
2340
- ), e.replaceChild(c, i)) : (c = G(
2340
+ ), e.replaceChild(c, o)) : (c = Z(
2341
2341
  r,
2342
2342
  t,
2343
2343
  s,
@@ -2345,43 +2345,50 @@ function Bt(e, n, t, s) {
2345
2345
  ), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
2346
2346
  const f = [];
2347
2347
  for (let u = 0; u < e.childNodes.length; u++) {
2348
- const _ = e.childNodes[u];
2349
- _ !== c && _.nodeName !== "STYLE" && (le(_, s), f.push(_));
2348
+ const S = e.childNodes[u];
2349
+ S !== c && S.nodeName !== "STYLE" && (ue(S, s), f.push(S));
2350
2350
  }
2351
2351
  f.forEach((u) => e.removeChild(u)), e._prevVNode = r, e._prevDom = c;
2352
2352
  }
2353
- const Te = [];
2354
- function Dt(e, n, t, s, r, o, i, c) {
2353
+ const Le = [], st = /* @__PURE__ */ new WeakMap(), Ne = /* @__PURE__ */ new WeakMap();
2354
+ function Ft(e, n) {
2355
+ Ne.has(e) || Ne.set(e, /* @__PURE__ */ new Set()), Ne.get(e).add(n);
2356
+ }
2357
+ function Vt(e, n) {
2358
+ const t = Ne.get(e);
2359
+ t && t.delete(n);
2360
+ }
2361
+ function qt(e, n, t, s, r, i, o, c) {
2355
2362
  if (e) {
2356
- Te.push(t);
2363
+ Le.push(t);
2357
2364
  try {
2358
2365
  const f = n.render(t);
2359
2366
  if (f instanceof Promise) {
2360
- o(!0), f.then((u) => {
2361
- o(!1), i(null), tt(e, u, t, s, r), c(e.innerHTML);
2367
+ i(!0), f.then((u) => {
2368
+ i(!1), o(null), it(e, u, t, s, r), c(e.innerHTML);
2362
2369
  }).catch((u) => {
2363
- o(!1), i(u);
2370
+ i(!1), o(u);
2364
2371
  });
2365
2372
  return;
2366
2373
  }
2367
- tt(e, f, t, s, r), c(e.innerHTML);
2374
+ it(e, f, t, s, r), c(e.innerHTML);
2368
2375
  } finally {
2369
- Te.pop();
2376
+ Le.pop();
2370
2377
  }
2371
2378
  }
2372
2379
  }
2373
- function tt(e, n, t, s, r) {
2374
- e && (Bt(
2380
+ function it(e, n, t, s, r) {
2381
+ e && (Ut(
2375
2382
  e,
2376
2383
  Array.isArray(n) ? n : [n],
2377
2384
  t,
2378
2385
  s
2379
2386
  ), r(e.innerHTML));
2380
2387
  }
2381
- function Wt(e, n, t, s, r, o, i) {
2382
- if (o !== null && clearTimeout(o), Date.now() - n < 16) {
2388
+ function Gt(e, n, t, s, r, i, o) {
2389
+ if (i !== null && clearTimeout(i), Date.now() - n < 16) {
2383
2390
  if (r(t + 1), t === 15)
2384
- Y(
2391
+ Q(
2385
2392
  `⚠️ Component is re-rendering rapidly. This might indicate:
2386
2393
  Common causes:
2387
2394
  • Event handler calling a function immediately: @click="\${fn()}" should be @click="\${fn}"
@@ -2390,149 +2397,157 @@ function Wt(e, n, t, s, r, o, i) {
2390
2397
  Component rendering will be throttled to prevent browser freeze.`
2391
2398
  );
2392
2399
  else if (t > 20) {
2393
- D(
2400
+ W(
2394
2401
  `🛑 Infinite loop detected in component render:
2395
2402
  • This might be caused by state updates during render
2396
2403
  • Ensure all state modifications are done in event handlers or effects
2397
2404
  Stopping runaway component render to prevent browser freeze`
2398
- ), i(null);
2405
+ ), o(null);
2399
2406
  return;
2400
2407
  }
2401
2408
  } else
2402
2409
  r(0);
2403
2410
  const u = setTimeout(
2404
2411
  () => {
2405
- s(Date.now()), e(), i(null);
2412
+ s(Date.now()), e(), o(null);
2406
2413
  },
2407
2414
  t > 10 ? 100 : 0
2408
2415
  );
2409
- i(u);
2416
+ o(u);
2410
2417
  }
2411
- function Kt(e, n, t, s, r) {
2418
+ function Zt(e, n, t, s, r) {
2412
2419
  if (!e) return;
2413
- let o = t || "";
2420
+ let i = t || "";
2414
2421
  try {
2415
- if (e) {
2416
- const l = Array.from(
2422
+ const b = Ne.get(e);
2423
+ if (b && b.size > 0)
2424
+ for (const h of b)
2425
+ try {
2426
+ const d = h.lastHtmlStringForJitCSS;
2427
+ d && typeof d == "string" && d.trim() && (i += `
2428
+ ` + d);
2429
+ } catch {
2430
+ }
2431
+ else {
2432
+ const h = Array.from(
2417
2433
  e.querySelectorAll("*")
2418
2434
  );
2419
- for (const k of l)
2435
+ for (const d of h)
2420
2436
  try {
2421
- const b = k.lastHtmlStringForJitCSS;
2422
- b && typeof b == "string" && b.trim() && (o += `
2423
- ` + b);
2437
+ const _ = d.lastHtmlStringForJitCSS;
2438
+ _ && typeof _ == "string" && _.trim() && (i += `
2439
+ ` + _);
2424
2440
  } catch {
2425
2441
  }
2426
2442
  }
2427
2443
  } catch {
2428
2444
  }
2429
- const i = mt(o);
2430
- if ((!i || i.trim() === "") && !n._computedStyle) {
2431
- if (r(null), "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u")
2432
- e.adoptedStyleSheets = [
2433
- $e(),
2434
- fe()
2435
- ];
2436
- else {
2437
- const k = _e(Ye), b = fe();
2438
- let g = "";
2445
+ if (st.get(e) === i)
2446
+ return;
2447
+ st.set(e, i);
2448
+ const c = St(i), f = vt();
2449
+ if ((!c || c.trim() === "") && !n._computedStyle && !f) {
2450
+ if (r(null), "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
2451
+ const h = [je(), pe()];
2452
+ e.adoptedStyleSheets = h;
2453
+ } else {
2454
+ const h = ke(et), d = pe();
2455
+ let _ = "";
2439
2456
  try {
2440
- b && "cssRules" in b && (g = Array.from(b.cssRules).map((L) => L.cssText).join(`
2457
+ d && "cssRules" in d && (_ = Array.from(d.cssRules).map((y) => y.cssText).join(`
2441
2458
  `));
2442
2459
  } catch {
2443
- g = "";
2460
+ _ = "";
2444
2461
  }
2445
- const d = _e(`${k}
2446
- ${g}`);
2447
- let C = e.querySelector(
2462
+ const T = ke(`${h}
2463
+ ${_}`);
2464
+ let L = e.querySelector(
2448
2465
  "style[data-cer-runtime]"
2449
2466
  );
2450
- C || (C = document.createElement("style"), B(C, "data-cer-runtime", "true"), e.appendChild(C));
2467
+ L || (L = document.createElement("style"), D(L, "data-cer-runtime", "true"), e.appendChild(L));
2451
2468
  try {
2452
- C.textContent = d;
2469
+ L.textContent = T;
2453
2470
  } catch {
2454
2471
  }
2455
2472
  try {
2456
- e.adoptedStyleSheets = [$e(), fe()];
2473
+ const y = [je(), pe()];
2474
+ e.adoptedStyleSheets = y;
2457
2475
  } catch {
2458
2476
  }
2459
2477
  }
2460
2478
  return;
2461
2479
  }
2462
- let c = "";
2463
- n._computedStyle && (c = n._computedStyle ?? "");
2464
- let f = gt(`${c}
2465
- ${i}
2480
+ let u = "";
2481
+ n._computedStyle && (u = n._computedStyle ?? "");
2482
+ let S = _t(`${u}
2483
+ ${c}
2466
2484
  `);
2467
- f = _e(f);
2468
- let u = s;
2485
+ S = ke(S);
2486
+ let E = s;
2469
2487
  if ("adoptedStyleSheets" in e && typeof CSSStyleSheet < "u") {
2470
- if (u || (u = new CSSStyleSheet()), u.cssRules.length === 0 || u.cssRules.length > 0 && Array.from(u.cssRules).map((k) => k.cssText).join("") !== f)
2471
- try {
2472
- u.replaceSync(f);
2473
- } catch {
2474
- u = null;
2475
- }
2476
- if (u) {
2477
- e.adoptedStyleSheets = [
2478
- $e(),
2479
- fe(),
2480
- u
2481
- ], r(u);
2488
+ E || (E = new CSSStyleSheet());
2489
+ try {
2490
+ E.replaceSync(S);
2491
+ } catch {
2492
+ E = null;
2493
+ }
2494
+ if (E) {
2495
+ const b = [je(), pe()];
2496
+ f && b.push(f), b.push(E), e.adoptedStyleSheets = b, r(E);
2482
2497
  return;
2483
2498
  }
2484
2499
  }
2485
- const E = _e(Ye), m = fe();
2486
- let A = "";
2500
+ const w = ke(et), p = pe();
2501
+ let v = "";
2487
2502
  try {
2488
- m && "cssRules" in m && (A = Array.from(m.cssRules).map((l) => l.cssText).join(`
2503
+ p && "cssRules" in p && (v = Array.from(p.cssRules).map((b) => b.cssText).join(`
2489
2504
  `));
2490
2505
  } catch {
2491
- A = "";
2506
+ v = "";
2492
2507
  }
2493
- const p = _e(`${E}
2494
- ${A}
2495
- ${f}`);
2496
- let S = e.querySelector(
2508
+ const a = ke(`${w}
2509
+ ${v}
2510
+ ${S}`);
2511
+ let C = e.querySelector(
2497
2512
  "style[data-cer-runtime]"
2498
2513
  );
2499
- S || (S = document.createElement("style"), B(S, "data-cer-runtime", "true"), e.appendChild(S));
2514
+ C || (C = document.createElement("style"), D(C, "data-cer-runtime", "true"), e.appendChild(C));
2500
2515
  try {
2501
- S.textContent = p;
2516
+ C.textContent = a;
2502
2517
  } catch {
2503
2518
  }
2504
2519
  try {
2505
- const l = [
2506
- $e(),
2507
- fe()
2520
+ const b = [
2521
+ je(),
2522
+ pe()
2508
2523
  ];
2509
- if (typeof CSSStyleSheet < "u")
2524
+ if (f && b.push(f), typeof CSSStyleSheet < "u")
2510
2525
  try {
2511
- const k = new CSSStyleSheet();
2526
+ const h = new CSSStyleSheet();
2512
2527
  try {
2513
- k.replaceSync(f), l.push(k);
2528
+ h.replaceSync(S), b.push(h);
2514
2529
  } catch {
2515
- l.push({ cssRules: [], replaceSync: () => {
2530
+ b.push({ cssRules: [], replaceSync: () => {
2516
2531
  } });
2517
2532
  }
2518
2533
  } catch {
2519
2534
  }
2520
- e.adoptedStyleSheets = l;
2535
+ e.adoptedStyleSheets = b;
2521
2536
  } catch {
2522
2537
  }
2523
2538
  r(null);
2524
2539
  }
2525
- let R = null;
2526
- function nt(e) {
2527
- R = e;
2540
+ let B = null;
2541
+ function ot(e) {
2542
+ B = e;
2528
2543
  }
2529
- function De() {
2530
- R = null;
2544
+ function Ke() {
2545
+ B = null;
2531
2546
  }
2532
- function en() {
2533
- if (!R)
2547
+ function an() {
2548
+ if (!B)
2534
2549
  throw new Error("useEmit must be called during component render");
2535
- const e = R.emit;
2550
+ const e = B.emit;
2536
2551
  if (typeof e != "function")
2537
2552
  throw new Error(
2538
2553
  "useEmit requires an emit function on the component context"
@@ -2540,7 +2555,7 @@ function en() {
2540
2555
  const n = e;
2541
2556
  return (t, s, r) => n(t, s, r);
2542
2557
  }
2543
- function ge(e) {
2558
+ function Ee(e) {
2544
2559
  e._hookCallbacks || Object.defineProperty(e, "_hookCallbacks", {
2545
2560
  value: {},
2546
2561
  writable: !0,
@@ -2548,70 +2563,70 @@ function ge(e) {
2548
2563
  configurable: !1
2549
2564
  });
2550
2565
  }
2551
- function tn(e) {
2552
- if (!R)
2566
+ function ln(e) {
2567
+ if (!B)
2553
2568
  throw new Error("useOnConnected must be called during component render");
2554
- ge(R), R._hookCallbacks.onConnected = e;
2569
+ Ee(B), B._hookCallbacks.onConnected = e;
2555
2570
  }
2556
- function nn(e) {
2557
- if (!R)
2571
+ function fn(e) {
2572
+ if (!B)
2558
2573
  throw new Error("useOnDisconnected must be called during component render");
2559
- ge(R), R._hookCallbacks.onDisconnected = e;
2574
+ Ee(B), B._hookCallbacks.onDisconnected = e;
2560
2575
  }
2561
- function rn(e) {
2562
- if (!R)
2576
+ function un(e) {
2577
+ if (!B)
2563
2578
  throw new Error(
2564
2579
  "useOnAttributeChanged must be called during component render"
2565
2580
  );
2566
- ge(R), R._hookCallbacks.onAttributeChanged = e;
2581
+ Ee(B), B._hookCallbacks.onAttributeChanged = e;
2567
2582
  }
2568
- function sn(e) {
2569
- if (!R)
2583
+ function pn(e) {
2584
+ if (!B)
2570
2585
  throw new Error("useOnError must be called during component render");
2571
- ge(R), R._hookCallbacks.onError = (n) => {
2586
+ Ee(B), B._hookCallbacks.onError = (n) => {
2572
2587
  try {
2573
2588
  n instanceof Error ? e(n) : e(new Error(String(n)));
2574
2589
  } catch {
2575
2590
  }
2576
2591
  };
2577
2592
  }
2578
- function on(e) {
2579
- if (!R)
2593
+ function dn(e) {
2594
+ if (!B)
2580
2595
  throw new Error("useProps must be called during component render");
2581
- ge(R);
2582
- const n = R._hookCallbacks;
2596
+ Ee(B);
2597
+ const n = B._hookCallbacks;
2583
2598
  n.props = {
2584
2599
  ...n.props || {},
2585
2600
  ...e
2586
2601
  };
2587
- const t = R;
2602
+ const t = B;
2588
2603
  try {
2589
2604
  const r = Object.keys(e || {});
2590
- for (const o of r) {
2591
- if (typeof o != "string" || o.startsWith("_")) continue;
2592
- const i = Object.getOwnPropertyDescriptor(t, o);
2593
- if (!(i && !i.configurable))
2605
+ for (const i of r) {
2606
+ if (typeof i != "string" || i.startsWith("_")) continue;
2607
+ const o = Object.getOwnPropertyDescriptor(t, i);
2608
+ if (!(o && !o.configurable))
2594
2609
  try {
2595
- let f = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
2596
- Object.defineProperty(t, o, {
2610
+ let f = Object.prototype.hasOwnProperty.call(t, i) ? t[i] : void 0;
2611
+ Object.defineProperty(t, i, {
2597
2612
  configurable: !0,
2598
2613
  enumerable: !0,
2599
2614
  get() {
2600
2615
  try {
2601
2616
  const u = t && t._host;
2602
2617
  if (u) {
2603
- const _ = Z(o), E = u.getAttribute(_);
2618
+ const S = J(i), E = u.getAttribute(S);
2604
2619
  if (E !== null) {
2605
- const m = typeof e[o];
2606
- return m === "boolean" ? E === "" || E === "true" : m === "number" ? Number(E) : E;
2620
+ const g = typeof e[i];
2621
+ return g === "boolean" ? E === "" || E === "true" : g === "number" ? Number(E) : E;
2607
2622
  }
2608
- if (typeof u[o] < "u") {
2609
- const m = u[o];
2610
- if (j(m) || m && typeof m == "object" && "value" in m && !(m instanceof Node))
2611
- return m.value;
2612
- const A = typeof e[o];
2613
- if (!(A === "string" && m && typeof m == "object"))
2614
- return A === "boolean" && typeof m == "string" ? m === "" || m === "true" : m;
2623
+ if (typeof u[i] < "u") {
2624
+ const g = u[i];
2625
+ if (P(g) || g && typeof g == "object" && "value" in g && !(g instanceof Node))
2626
+ return g.value;
2627
+ const w = typeof e[i];
2628
+ if (!(w === "string" && g && typeof g == "object"))
2629
+ return w === "boolean" && typeof g == "string" ? g === "" || g === "true" : g;
2615
2630
  }
2616
2631
  }
2617
2632
  } catch {
@@ -2628,31 +2643,31 @@ function on(e) {
2628
2643
  } catch {
2629
2644
  }
2630
2645
  return new Proxy({}, {
2631
- get(r, o) {
2632
- if (typeof o != "string") return;
2633
- const i = e[o];
2646
+ get(r, i) {
2647
+ if (typeof i != "string") return;
2648
+ const o = e[i];
2634
2649
  try {
2635
2650
  const f = t && t._host;
2636
2651
  if (f) {
2637
2652
  if (f instanceof HTMLElement || typeof f.getAttribute == "function" && typeof f.hasAttribute == "function") {
2638
- const _ = o.replace(/([A-Z])/g, "-$1").toLowerCase(), E = f.getAttribute(_);
2653
+ const S = i.replace(/([A-Z])/g, "-$1").toLowerCase(), E = f.getAttribute(S);
2639
2654
  if (E !== null)
2640
- return typeof i == "boolean" ? E === "" || E === "true" : typeof i == "number" ? Number(E) : E;
2655
+ return typeof o == "boolean" ? E === "" || E === "true" : typeof o == "number" ? Number(E) : E;
2641
2656
  }
2642
- const u = f[o];
2657
+ const u = f[i];
2643
2658
  if (typeof u < "u" && u !== "") {
2644
- const _ = u && typeof u == "object" && "value" in u && !(u instanceof Node);
2645
- if (!(typeof i == "string" && u && typeof u == "object" && !_ && !j(u)))
2646
- return typeof i == "boolean" && i === !1 && u === "" ? i : j(u) || _ ? u.value : typeof i == "boolean" && typeof u == "string" ? u === "true" || u !== "" && u !== "false" : typeof i == "number" && typeof u == "string" && !Number.isNaN(Number(u)) ? Number(u) : u;
2659
+ const S = u && typeof u == "object" && "value" in u && !(u instanceof Node);
2660
+ if (!(typeof o == "string" && u && typeof u == "object" && !S && !P(u)))
2661
+ return typeof o == "boolean" && o === !1 && u === "" ? o : P(u) || S ? u.value : typeof o == "boolean" && typeof u == "string" ? u === "true" || u !== "" && u !== "false" : typeof o == "number" && typeof u == "string" && !Number.isNaN(Number(u)) ? Number(u) : u;
2647
2662
  }
2648
2663
  }
2649
2664
  } catch {
2650
2665
  }
2651
- const c = t[o];
2652
- return typeof i == "boolean" && c === "" ? i === !1 ? i : !0 : j(c) || c && typeof c == "object" && "value" in c && !(c instanceof Node) ? c.value : c != null && c !== "" ? typeof i == "boolean" && typeof c == "string" ? c === "true" : typeof i == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c : i;
2666
+ const c = t[i];
2667
+ return typeof o == "boolean" && c === "" ? o === !1 ? o : !0 : P(c) || c && typeof c == "object" && "value" in c && !(c instanceof Node) ? c.value : c != null && c !== "" ? typeof o == "boolean" && typeof c == "string" ? c === "true" : typeof o == "number" && typeof c == "string" && !Number.isNaN(Number(c)) ? Number(c) : c : o;
2653
2668
  },
2654
- has(r, o) {
2655
- return typeof o == "string" && (o in t || o in e);
2669
+ has(r, i) {
2670
+ return typeof i == "string" && (i in t || i in e);
2656
2671
  },
2657
2672
  ownKeys() {
2658
2673
  return Array.from(
@@ -2664,20 +2679,20 @@ function on(e) {
2664
2679
  }
2665
2680
  });
2666
2681
  }
2667
- function cn(e) {
2668
- if (!R)
2682
+ function hn(e) {
2683
+ if (!B)
2669
2684
  throw new Error("useStyle must be called during component render");
2670
- ge(R);
2685
+ Ee(B);
2671
2686
  try {
2672
2687
  const n = e();
2673
- Object.defineProperty(R, "_computedStyle", {
2688
+ Object.defineProperty(B, "_computedStyle", {
2674
2689
  value: n,
2675
2690
  writable: !0,
2676
2691
  enumerable: !1,
2677
2692
  configurable: !0
2678
2693
  });
2679
2694
  } catch (n) {
2680
- Y("Error in useStyle callback:", n), Object.defineProperty(R, "_computedStyle", {
2695
+ Q("Error in useStyle callback:", n), Object.defineProperty(B, "_computedStyle", {
2681
2696
  value: "",
2682
2697
  writable: !0,
2683
2698
  enumerable: !1,
@@ -2685,14 +2700,14 @@ function cn(e) {
2685
2700
  });
2686
2701
  }
2687
2702
  }
2688
- const me = /* @__PURE__ */ new Map(), rt = Symbol.for("cer.registry");
2689
- function Ut() {
2703
+ const be = /* @__PURE__ */ new Map(), ct = Symbol.for("cer.registry");
2704
+ function Jt() {
2690
2705
  if (typeof window < "u") {
2691
2706
  const e = globalThis;
2692
- e[rt] || (e[rt] = me);
2707
+ e[ct] || (e[ct] = be);
2693
2708
  }
2694
2709
  }
2695
- function zt(e, n) {
2710
+ function Yt(e, n) {
2696
2711
  if (!n.render)
2697
2712
  throw new Error("Component must have a render function");
2698
2713
  return typeof window > "u" ? class {
@@ -2735,9 +2750,9 @@ function zt(e, n) {
2735
2750
  _templateLoading = !1;
2736
2751
  _templateError = null;
2737
2752
  constructor() {
2738
- super(), this.attachShadow({ mode: "open" }), this._cfg = me.get(e) || n, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2739
- const t = this._initContext(n), s = (o, i, c) => {
2740
- Object.defineProperty(o, i, {
2753
+ super(), this.attachShadow({ mode: "open" }), this._cfg = be.get(e) || n, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
2754
+ const t = this._initContext(n), s = (i, o, c) => {
2755
+ Object.defineProperty(i, o, {
2741
2756
  value: c,
2742
2757
  writable: !1,
2743
2758
  enumerable: !1,
@@ -2755,47 +2770,47 @@ function zt(e, n) {
2755
2770
  ), s(t, "_componentId", this._componentId), s(
2756
2771
  t,
2757
2772
  "_triggerWatchers",
2758
- (o, i) => this._triggerWatchers(o, i)
2759
- ), this.context = t, P(() => {
2773
+ (i, o) => this._triggerWatchers(i, o)
2774
+ ), this.context = t, H(() => {
2760
2775
  s(t, "_host", this);
2761
2776
  }), s(
2762
2777
  this.context,
2763
2778
  "emit",
2764
- (o, i, c) => {
2779
+ (i, o, c) => {
2765
2780
  const f = {
2766
- detail: i,
2781
+ detail: o,
2767
2782
  bubbles: !0,
2768
2783
  composed: !0,
2769
2784
  ...c || {}
2770
- }, u = new CustomEvent(o, f);
2785
+ }, u = new CustomEvent(i, f);
2771
2786
  this.dispatchEvent(u);
2772
- const _ = o.indexOf(":");
2773
- if (_ > 0) {
2774
- const E = o.substring(0, _), m = o.substring(_ + 1), A = m.includes("-") ? `${E}:${m.split("-").map(
2775
- (p, S) => S === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)
2776
- ).join("")}` : `${E}:${m.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
2777
- A !== o && P(() => {
2778
- this.dispatchEvent(new CustomEvent(A, f));
2787
+ const S = i.indexOf(":");
2788
+ if (S > 0) {
2789
+ const E = i.substring(0, S), g = i.substring(S + 1), w = g.includes("-") ? `${E}:${g.split("-").map(
2790
+ (p, v) => v === 0 ? p : p.charAt(0).toUpperCase() + p.slice(1)
2791
+ ).join("")}` : `${E}:${g.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
2792
+ w !== i && H(() => {
2793
+ this.dispatchEvent(new CustomEvent(w, f));
2779
2794
  });
2780
2795
  }
2781
2796
  return !u.defaultPrevented;
2782
2797
  }
2783
2798
  );
2784
- const r = me.get(e) || n;
2785
- for (const o in r) {
2786
- const i = r[o];
2787
- typeof i == "function" && (this.context[o] = (...c) => i(...c, this.context));
2799
+ const r = be.get(e) || n;
2800
+ for (const i in r) {
2801
+ const o = r[i];
2802
+ typeof o == "function" && (this.context[i] = (...c) => o(...c, this.context));
2788
2803
  }
2789
2804
  if (r.props)
2790
- for (const o in r.props) {
2791
- let i = this[o];
2792
- Object.defineProperty(this, o, {
2805
+ for (const i in r.props) {
2806
+ let o = this[i];
2807
+ Object.defineProperty(this, i, {
2793
2808
  get() {
2794
- return i;
2809
+ return o;
2795
2810
  },
2796
2811
  set(c) {
2797
- const f = i;
2798
- i = c, this.context[o] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
2812
+ const f = o;
2813
+ o = c, this.context[i] = c, this._initializing || (this._applyProps(r), f !== c && this._requestRender());
2799
2814
  },
2800
2815
  enumerable: !0,
2801
2816
  configurable: !0
@@ -2805,14 +2820,16 @@ function zt(e, n) {
2805
2820
  }
2806
2821
  connectedCallback() {
2807
2822
  this._runLogicWithinErrorBoundary(n, () => {
2808
- this._applyProps(n), this._requestRender(), _t(n, this.context, this._mounted, (t) => {
2809
- this._mounted = t;
2823
+ const t = this.getRootNode();
2824
+ t && t !== document && "host" in t && Ft(t, this), this._applyProps(n), this._requestRender(), Tt(n, this.context, this._mounted, (s) => {
2825
+ this._mounted = s;
2810
2826
  });
2811
2827
  });
2812
2828
  }
2813
2829
  disconnectedCallback() {
2814
2830
  this._runLogicWithinErrorBoundary(n, () => {
2815
- kt(
2831
+ const t = this.getRootNode();
2832
+ t && t !== document && "host" in t && Vt(t, this), Lt(
2816
2833
  n,
2817
2834
  this.context,
2818
2835
  this._listeners,
@@ -2822,30 +2839,30 @@ function zt(e, n) {
2822
2839
  () => {
2823
2840
  this._watchers.clear();
2824
2841
  },
2825
- (t) => {
2826
- this._templateLoading = t;
2842
+ (s) => {
2843
+ this._templateLoading = s;
2827
2844
  },
2828
- (t) => {
2829
- this._templateError = t;
2845
+ (s) => {
2846
+ this._templateError = s;
2830
2847
  },
2831
- (t) => {
2832
- this._mounted = t;
2848
+ (s) => {
2849
+ this._mounted = s;
2833
2850
  }
2834
2851
  );
2835
2852
  });
2836
2853
  }
2837
2854
  attributeChangedCallback(t, s, r) {
2838
2855
  this._runLogicWithinErrorBoundary(n, () => {
2839
- this._applyProps(n), s !== r && this._requestRender(), Ct(n, t, s, r, this.context);
2856
+ this._applyProps(n), s !== r && this._requestRender(), Nt(n, t, s, r, this.context);
2840
2857
  });
2841
2858
  }
2842
2859
  static get observedAttributes() {
2843
- return n.props ? Object.keys(n.props).map(Z) : [];
2860
+ return n.props ? Object.keys(n.props).map(J) : [];
2844
2861
  }
2845
2862
  // --- Render ---
2846
2863
  _render(t) {
2847
2864
  this._runLogicWithinErrorBoundary(t, () => {
2848
- Dt(
2865
+ qt(
2849
2866
  this.shadowRoot,
2850
2867
  t,
2851
2868
  this.context,
@@ -2868,8 +2885,8 @@ function zt(e, n) {
2868
2885
  }
2869
2886
  _requestRender() {
2870
2887
  this._runLogicWithinErrorBoundary(this._cfg, () => {
2871
- Se(() => {
2872
- Wt(
2888
+ Ce(() => {
2889
+ Gt(
2873
2890
  () => this._render(this._cfg),
2874
2891
  this._lastRenderTime,
2875
2892
  this._renderCount,
@@ -2890,7 +2907,7 @@ function zt(e, n) {
2890
2907
  // --- Style ---
2891
2908
  _applyStyle(t, s) {
2892
2909
  this._runLogicWithinErrorBoundary(t, () => {
2893
- Kt(
2910
+ Zt(
2894
2911
  this.shadowRoot,
2895
2912
  this.context,
2896
2913
  s,
@@ -2909,7 +2926,7 @@ function zt(e, n) {
2909
2926
  } catch (r) {
2910
2927
  this._hasError = !0;
2911
2928
  try {
2912
- const o = this.tagName?.toLowerCase?.() || "<unknown>", i = this._componentId || "<unknown-id>", c = {};
2929
+ const i = this.tagName?.toLowerCase?.() || "<unknown>", o = this._componentId || "<unknown-id>", c = {};
2913
2930
  if (t && t.props)
2914
2931
  for (const f of Object.keys(t.props))
2915
2932
  try {
@@ -2918,7 +2935,7 @@ function zt(e, n) {
2918
2935
  } catch {
2919
2936
  c[f] = "[unreadable]";
2920
2937
  }
2921
- D(`Error rendering component <${o}> (id=${i}):`, r), D("Component props snapshot:", c), Y(
2938
+ W(`Error rendering component <${i}> (id=${o}):`, r), W("Component props snapshot:", c), Q(
2922
2939
  "Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
2923
2940
  );
2924
2941
  } catch {
@@ -2929,12 +2946,12 @@ function zt(e, n) {
2929
2946
  // --- State, props, computed ---
2930
2947
  _initContext(t) {
2931
2948
  try {
2932
- let s = function(o, i = "") {
2933
- if (Array.isArray(o))
2934
- return new Proxy(o, {
2949
+ let s = function(i, o = "") {
2950
+ if (Array.isArray(i))
2951
+ return new Proxy(i, {
2935
2952
  get(c, f, u) {
2936
- const _ = Reflect.get(c, f, u);
2937
- return typeof _ == "function" && typeof f == "string" && [
2953
+ const S = Reflect.get(c, f, u);
2954
+ return typeof S == "function" && typeof f == "string" && [
2938
2955
  "push",
2939
2956
  "pop",
2940
2957
  "shift",
@@ -2942,63 +2959,63 @@ function zt(e, n) {
2942
2959
  "splice",
2943
2960
  "sort",
2944
2961
  "reverse"
2945
- ].includes(f) ? function(...m) {
2946
- const A = _.apply(c, m);
2962
+ ].includes(f) ? function(...g) {
2963
+ const w = S.apply(c, g);
2947
2964
  if (!r._initializing) {
2948
- const p = i || "root";
2949
- r._triggerWatchers(p, c), Se(
2965
+ const p = o || "root";
2966
+ r._triggerWatchers(p, c), Ce(
2950
2967
  () => r._render(t),
2951
2968
  r._componentId
2952
2969
  );
2953
2970
  }
2954
- return A;
2955
- } : _;
2971
+ return w;
2972
+ } : S;
2956
2973
  },
2957
2974
  set(c, f, u) {
2958
2975
  if (c[String(f)] = u, !r._initializing) {
2959
- const _ = i ? `${i}.${String(f)}` : String(f);
2960
- r._triggerWatchers(_, u), Se(() => r._render(t), r._componentId);
2976
+ const S = o ? `${o}.${String(f)}` : String(f);
2977
+ r._triggerWatchers(S, u), Ce(() => r._render(t), r._componentId);
2961
2978
  }
2962
2979
  return !0;
2963
2980
  },
2964
2981
  deleteProperty(c, f) {
2965
2982
  if (delete c[String(f)], !r._initializing) {
2966
- const u = i ? `${i}.${String(f)}` : String(f);
2967
- r._triggerWatchers(u, void 0), Se(() => r._render(t), r._componentId);
2983
+ const u = o ? `${o}.${String(f)}` : String(f);
2984
+ r._triggerWatchers(u, void 0), Ce(() => r._render(t), r._componentId);
2968
2985
  }
2969
2986
  return !0;
2970
2987
  }
2971
2988
  });
2972
- if (o && typeof o == "object") {
2973
- if (j(o))
2974
- return o;
2975
- for (const c in o) {
2976
- const f = i ? `${i}.${c}` : c;
2977
- o[c] = s(o[c], f);
2989
+ if (i && typeof i == "object") {
2990
+ if (P(i))
2991
+ return i;
2992
+ for (const c in i) {
2993
+ const f = o ? `${o}.${c}` : c;
2994
+ i[c] = s(i[c], f);
2978
2995
  }
2979
- return new Proxy(o, {
2996
+ return new Proxy(i, {
2980
2997
  set(c, f, u) {
2981
- const _ = i ? `${i}.${String(f)}` : String(f);
2982
- return c[String(f)] = s(u, _), r._initializing || (r._triggerWatchers(
2983
- _,
2998
+ const S = o ? `${o}.${String(f)}` : String(f);
2999
+ return c[String(f)] = s(u, S), r._initializing || (r._triggerWatchers(
3000
+ S,
2984
3001
  c[String(f)]
2985
- ), Se(() => r._render(t), r._componentId)), !0;
3002
+ ), Ce(() => r._render(t), r._componentId)), !0;
2986
3003
  },
2987
3004
  get(c, f, u) {
2988
3005
  return Reflect.get(c, f, u);
2989
3006
  }
2990
3007
  });
2991
3008
  }
2992
- return o;
3009
+ return i;
2993
3010
  };
2994
3011
  const r = this;
2995
3012
  return s({
2996
3013
  // For functional components, state is managed by state() function calls
2997
3014
  // Include prop defaults in initial reactive context so prop updates trigger reactivity
2998
3015
  ...t.props ? Object.fromEntries(
2999
- Object.entries(t.props).map(([o, i]) => [
3000
- o,
3001
- i.default
3016
+ Object.entries(t.props).map(([i, o]) => [
3017
+ i,
3018
+ o.default
3002
3019
  ])
3003
3020
  ) : {}
3004
3021
  });
@@ -3008,7 +3025,7 @@ function zt(e, n) {
3008
3025
  }
3009
3026
  _initWatchers(t) {
3010
3027
  this._runLogicWithinErrorBoundary(t, () => {
3011
- bt(
3028
+ Ct(
3012
3029
  this.context,
3013
3030
  this._watchers,
3014
3031
  {}
@@ -3017,12 +3034,12 @@ function zt(e, n) {
3017
3034
  });
3018
3035
  }
3019
3036
  _triggerWatchers(t, s) {
3020
- Et(this.context, this._watchers, t, s);
3037
+ kt(this.context, this._watchers, t, s);
3021
3038
  }
3022
3039
  _applyProps(t) {
3023
3040
  this._runLogicWithinErrorBoundary(t, () => {
3024
3041
  try {
3025
- St(this, t, this.context);
3042
+ wt(this, t, this.context);
3026
3043
  } catch (s) {
3027
3044
  this._hasError = !0, t.onError && t.onError(s, this.context);
3028
3045
  }
@@ -3030,85 +3047,85 @@ function zt(e, n) {
3030
3047
  }
3031
3048
  };
3032
3049
  }
3033
- function an(e, n) {
3034
- Ut();
3035
- let t = Z(e);
3050
+ function yn(e, n) {
3051
+ Jt();
3052
+ let t = J(e);
3036
3053
  t.includes("-") || (t = `cer-${t}`);
3037
3054
  const s = {}, r = {
3038
3055
  // Props are accessed via useProps() hook
3039
3056
  props: {},
3040
3057
  // Add lifecycle hooks from the stored functions
3041
- onConnected: (o) => {
3058
+ onConnected: (i) => {
3042
3059
  if (s.onConnected)
3043
3060
  try {
3044
- s.onConnected(o);
3061
+ s.onConnected(i);
3045
3062
  } catch {
3046
3063
  }
3047
3064
  },
3048
- onDisconnected: (o) => {
3065
+ onDisconnected: (i) => {
3049
3066
  if (s.onDisconnected)
3050
3067
  try {
3051
- s.onDisconnected(o);
3068
+ s.onDisconnected(i);
3052
3069
  } catch {
3053
3070
  }
3054
3071
  },
3055
- onAttributeChanged: (o, i, c, f) => {
3072
+ onAttributeChanged: (i, o, c, f) => {
3056
3073
  if (s.onAttributeChanged)
3057
3074
  try {
3058
- s.onAttributeChanged(o, i, c, f);
3075
+ s.onAttributeChanged(i, o, c, f);
3059
3076
  } catch {
3060
3077
  }
3061
3078
  },
3062
- onError: (o, i) => {
3063
- if (s.onError && o)
3079
+ onError: (i, o) => {
3080
+ if (s.onError && i)
3064
3081
  try {
3065
- s.onError(o, i);
3082
+ s.onError(i, o);
3066
3083
  } catch {
3067
3084
  }
3068
3085
  },
3069
- render: (o) => {
3070
- const i = o, c = i._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
3071
- Ze.setCurrentComponent(c, () => {
3072
- o.requestRender && o.requestRender();
3086
+ render: (i) => {
3087
+ const o = i, c = o._componentId || `${t}-${Math.random().toString(36).substr(2, 9)}`;
3088
+ Xe.setCurrentComponent(c, () => {
3089
+ i.requestRender && i.requestRender();
3073
3090
  });
3074
3091
  try {
3075
- nt(o);
3092
+ ot(i);
3076
3093
  let f;
3077
3094
  try {
3078
3095
  f = n();
3079
3096
  } catch (u) {
3080
3097
  try {
3081
- const _ = i._hookCallbacks;
3082
- if (_ && typeof _.onError == "function")
3098
+ const S = o._hookCallbacks;
3099
+ if (S && typeof S.onError == "function")
3083
3100
  try {
3084
- _.onError(u);
3101
+ S.onError(u);
3085
3102
  } catch {
3086
3103
  }
3087
3104
  } catch {
3088
3105
  }
3089
3106
  throw u;
3090
3107
  }
3091
- if (i._hookCallbacks) {
3092
- const u = i._hookCallbacks;
3093
- if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (i._styleCallback = u.style), u.props) {
3094
- const _ = u.props;
3108
+ if (o._hookCallbacks) {
3109
+ const u = o._hookCallbacks;
3110
+ if (u.onConnected && (s.onConnected = u.onConnected), u.onDisconnected && (s.onDisconnected = u.onDisconnected), u.onAttributeChanged && (s.onAttributeChanged = u.onAttributeChanged), u.onError && (s.onError = u.onError), u.style && (o._styleCallback = u.style), u.props) {
3111
+ const S = u.props;
3095
3112
  r.props = Object.fromEntries(
3096
- Object.entries(_).map(([E, m]) => [
3113
+ Object.entries(S).map(([E, g]) => [
3097
3114
  E,
3098
- { type: typeof m == "boolean" ? Boolean : typeof m == "number" ? Number : typeof m == "string" ? String : Function, default: m }
3115
+ { type: typeof g == "boolean" ? Boolean : typeof g == "number" ? Number : typeof g == "string" ? String : Function, default: g }
3099
3116
  ])
3100
- ), me.set(t, r);
3117
+ ), be.set(t, r);
3101
3118
  }
3102
3119
  }
3103
3120
  return f;
3104
3121
  } finally {
3105
- De(), Ze.clearCurrentComponent();
3122
+ Ke(), Xe.clearCurrentComponent();
3106
3123
  }
3107
3124
  }
3108
3125
  };
3109
- if (me.set(t, r), typeof window < "u") {
3126
+ if (be.set(t, r), typeof window < "u") {
3110
3127
  try {
3111
- const o = {
3128
+ const i = {
3112
3129
  _hookCallbacks: {},
3113
3130
  requestRender: () => {
3114
3131
  },
@@ -3118,45 +3135,45 @@ function an(e, n) {
3118
3135
  // instances will have a proper emit implementation.
3119
3136
  emit: () => !0
3120
3137
  };
3121
- nt(o);
3138
+ ot(i);
3122
3139
  try {
3123
3140
  n();
3124
- } catch (i) {
3141
+ } catch (o) {
3125
3142
  try {
3126
- const c = o?._hookCallbacks;
3143
+ const c = i?._hookCallbacks;
3127
3144
  if (c && typeof c.onError == "function")
3128
3145
  try {
3129
- c.onError(i);
3146
+ c.onError(o);
3130
3147
  } catch {
3131
3148
  }
3132
- D(
3149
+ W(
3133
3150
  `Error during component discovery render <${t}>:`,
3134
- i
3135
- ), Y(
3151
+ o
3152
+ ), Q(
3136
3153
  "Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
3137
3154
  );
3138
3155
  } catch {
3139
3156
  }
3140
- throw De(), i;
3157
+ throw Ke(), o;
3141
3158
  }
3142
- if (De(), o._hookCallbacks?.props) {
3143
- const i = o._hookCallbacks.props;
3159
+ if (Ke(), i._hookCallbacks?.props) {
3160
+ const o = i._hookCallbacks.props;
3144
3161
  r.props = Object.fromEntries(
3145
- Object.entries(i).map(([c, f]) => [
3162
+ Object.entries(o).map(([c, f]) => [
3146
3163
  c,
3147
3164
  { type: typeof f == "boolean" ? Boolean : typeof f == "number" ? Number : typeof f == "string" ? String : Function, default: f }
3148
3165
  ])
3149
- ), me.set(t, r);
3166
+ ), be.set(t, r);
3150
3167
  }
3151
3168
  } catch {
3152
3169
  }
3153
3170
  customElements.get(t) || customElements.define(
3154
3171
  t,
3155
- zt(t, r)
3172
+ Yt(t, r)
3156
3173
  );
3157
3174
  }
3158
3175
  }
3159
- class Ft {
3176
+ class Xt {
3160
3177
  map = /* @__PURE__ */ new Map();
3161
3178
  maxSize;
3162
3179
  constructor(n) {
@@ -3180,49 +3197,49 @@ class Ft {
3180
3197
  this.map.clear();
3181
3198
  }
3182
3199
  }
3183
- const We = new Ft(500);
3184
- function Vt(e, n) {
3200
+ const Ue = new Xt(500);
3201
+ function Qt(e, n) {
3185
3202
  if (e == null) {
3186
- Y(
3203
+ Q(
3187
3204
  `⚠️ Event handler for '@${n}' is ${e}. This will prevent the event from working. Use a function reference instead: @${n}="\${functionName}"`
3188
3205
  );
3189
3206
  return;
3190
3207
  }
3191
- typeof e != "function" && Y(
3208
+ typeof e != "function" && Q(
3192
3209
  `🚨 Potential infinite loop detected! Event handler for '@${n}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${n}="\${functionName()}" to @${n}="\${functionName}" to pass the function reference instead of calling it immediately.`
3193
- ), e === void 0 && typeof e != "function" && Y(
3210
+ ), e === void 0 && typeof e != "function" && Q(
3194
3211
  `💡 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()}"`
3195
3212
  );
3196
3213
  }
3197
- function se(e, n = {}, t, s) {
3214
+ function oe(e, n = {}, t, s) {
3198
3215
  const r = s ?? n.key;
3199
3216
  return { tag: e, key: r, props: n, children: t };
3200
3217
  }
3201
- function we(e) {
3218
+ function Oe(e) {
3202
3219
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
3203
3220
  }
3204
- function ae(e) {
3205
- return typeof e == "object" && e !== null && "tag" in e && !we(e);
3221
+ function fe(e) {
3222
+ return typeof e == "object" && e !== null && "tag" in e && !Oe(e);
3206
3223
  }
3207
- function qt(e, n) {
3224
+ function en(e, n) {
3208
3225
  return e.key != null ? e : { ...e, key: n };
3209
3226
  }
3210
- function Gt(e, n = [], t = {}) {
3211
- const s = {}, r = {}, o = {}, i = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
3227
+ function tn(e, n = [], t = {}) {
3228
+ const s = {}, r = {}, i = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
3212
3229
  let f;
3213
3230
  for (; f = c.exec(e); ) {
3214
- const u = f[1], _ = f[2];
3231
+ const u = f[1], S = f[2];
3215
3232
  let E = "";
3216
- for (let l = 3; l < f.length; l++)
3217
- if (f[l] !== void 0) {
3218
- E = f[l];
3233
+ for (let a = 3; a < f.length; a++)
3234
+ if (f[a] !== void 0) {
3235
+ E = f[a];
3219
3236
  break;
3220
3237
  }
3221
3238
  E.length >= 2 && (E[0] === '"' && E[E.length - 1] === '"' || E[0] === "'" && E[E.length - 1] === "'") && (E = E.slice(1, -1));
3222
- const m = !/=/.test(f[0]), A = E.match(/^{{(\d+)}}$/);
3223
- let p = m ? !0 : A ? n[Number(A[1])] ?? null : E;
3224
- A || (p === "true" ? p = !0 : p === "false" ? p = !1 : p === "null" ? p = null : isNaN(Number(p)) || (p = Number(p)));
3225
- const S = [
3239
+ const g = !/=/.test(f[0]), w = E.match(/^{{(\d+)}}$/);
3240
+ let p = g ? !0 : w ? n[Number(w[1])] ?? null : E;
3241
+ w || (p === "true" ? p = !0 : p === "false" ? p = !1 : p === "null" ? p = null : isNaN(Number(p)) || (p = Number(p)));
3242
+ const v = [
3226
3243
  "model",
3227
3244
  "bind",
3228
3245
  "show",
@@ -3232,71 +3249,71 @@ function Gt(e, n = [], t = {}) {
3232
3249
  "when"
3233
3250
  ];
3234
3251
  if (u === ":") {
3235
- const [l, k] = _.split(":"), [b, ...g] = l.split(".");
3236
- if (S.includes(b)) {
3237
- const d = [...g], C = b === "model" && k ? `model:${k}` : b;
3238
- o[C] = {
3252
+ const [a, C] = S.split(":"), [b, ...h] = a.split(".");
3253
+ if (v.includes(b)) {
3254
+ const d = [...h], _ = b === "model" && C ? `model:${C}` : b;
3255
+ i[_] = {
3239
3256
  value: p,
3240
3257
  modifiers: d,
3241
- arg: k
3258
+ arg: C
3242
3259
  };
3243
- } else if (_ === "disabled") {
3260
+ } else if (S === "disabled") {
3244
3261
  let d = p;
3245
- d && j(d) && (d = d.value);
3246
- const C = typeof d;
3247
- if (d === "" || C === "boolean" || C === "string" && (d === "true" || d === "false") || d == null || C === "number")
3248
- s[_] = d;
3262
+ d && P(d) && (d = d.value);
3263
+ const _ = typeof d;
3264
+ if (d === "" || _ === "boolean" || _ === "string" && (d === "true" || d === "false") || d == null || _ === "number")
3265
+ s[S] = d;
3249
3266
  else {
3250
- let a = p;
3251
- a && j(a) && (a = a.value), r[_] = a;
3267
+ let y = p;
3268
+ y && P(y) && (y = y.value), r[S] = y;
3252
3269
  }
3253
- i.push(_);
3270
+ o.push(S);
3254
3271
  } else {
3255
3272
  let d = p;
3256
- d && j(d) && (d = d.value), r[_] = d, i.push(_);
3273
+ d && P(d) && (d = d.value), r[S] = d, o.push(S);
3257
3274
  }
3258
3275
  } else if (u === "@") {
3259
- const [l, ...k] = _.split("."), b = k;
3260
- Vt(p, l);
3261
- const g = typeof p == "function" ? p : typeof t[p] == "function" ? t[p] : void 0;
3262
- if (g) {
3263
- const d = (L) => {
3264
- if (b.includes("prevent") && L.preventDefault(), b.includes("stop") && L.stopPropagation(), !(b.includes("self") && L.target !== L.currentTarget))
3265
- return b.includes("once") && L.currentTarget?.removeEventListener(
3266
- l,
3276
+ const [a, ...C] = S.split("."), b = C;
3277
+ Qt(p, a);
3278
+ const h = typeof p == "function" ? p : typeof t[p] == "function" ? t[p] : void 0;
3279
+ if (h) {
3280
+ const d = (T) => {
3281
+ if (b.includes("prevent") && T.preventDefault(), b.includes("stop") && T.stopPropagation(), !(b.includes("self") && T.target !== T.currentTarget))
3282
+ return b.includes("once") && T.currentTarget?.removeEventListener(
3283
+ a,
3267
3284
  d
3268
- ), g(L);
3269
- }, C = "on" + l.charAt(0).toUpperCase() + l.slice(1);
3270
- s[C] = d;
3285
+ ), h(T);
3286
+ }, _ = "on" + a.charAt(0).toUpperCase() + a.slice(1);
3287
+ s[_] = d;
3271
3288
  }
3272
- } else _ === "ref" ? s.ref = p : r[_] = p;
3289
+ } else S === "ref" ? s.ref = p : r[S] = p;
3273
3290
  }
3274
- return { props: s, attrs: r, directives: o, bound: i };
3291
+ return { props: s, attrs: r, directives: i, bound: o };
3275
3292
  }
3276
- function Fe(e) {
3277
- if (!ae(e) || we(e))
3293
+ function Ge(e) {
3294
+ if (!fe(e) || Oe(e))
3278
3295
  return e;
3279
3296
  const n = e.props?.directives;
3280
3297
  if (n && n.when) {
3281
- const t = n.when.value, s = j(t) ? t.value : t, r = { ...n };
3298
+ const t = n.when.value, s = P(t) ? t.value : t, r = { ...n };
3282
3299
  delete r.when;
3283
- const o = { ...e.props };
3284
- Object.keys(r).length > 0 ? o.directives = r : delete o.directives;
3285
- const i = {
3300
+ const i = { ...e.props };
3301
+ Object.keys(r).length > 0 ? i.directives = r : delete i.directives;
3302
+ const o = {
3286
3303
  ...e,
3287
- props: o
3304
+ props: i
3288
3305
  };
3289
- return Array.isArray(i.children) && (i.children = i.children.map(
3290
- (f) => typeof f == "object" && f !== null ? Fe(f) : f
3306
+ return Array.isArray(o.children) && (o.children = o.children.map(
3307
+ (f) => typeof f == "object" && f !== null ? Ge(f) : f
3291
3308
  )), {
3292
3309
  tag: "#anchor",
3293
3310
  key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
3294
- children: s ? [i] : []
3311
+ children: s ? [o] : []
3295
3312
  };
3296
3313
  }
3297
3314
  if (Array.isArray(e.children)) {
3298
3315
  const t = e.children.map(
3299
- (s) => typeof s == "object" && s !== null ? Fe(s) : s
3316
+ (s) => typeof s == "object" && s !== null ? Ge(s) : s
3300
3317
  );
3301
3318
  return {
3302
3319
  ...e,
@@ -3305,87 +3322,101 @@ function Fe(e) {
3305
3322
  }
3306
3323
  return e;
3307
3324
  }
3308
- function Zt(e, n, t) {
3309
- const s = Te.length > 0 ? Te[Te.length - 1] : void 0, r = t ?? s, o = !t && n.length === 0, i = o ? e.join("<!--TEMPLATE_DELIM-->") : null;
3310
- if (o && i) {
3311
- const a = We.get(i);
3312
- if (a) return a;
3325
+ function nn(e, n, t) {
3326
+ const s = Le.length > 0 ? Le[Le.length - 1] : void 0, r = t ?? s, i = !t && n.length === 0, o = i ? e.join("<!--TEMPLATE_DELIM-->") : null;
3327
+ if (i && o) {
3328
+ const l = Ue.get(o);
3329
+ if (l) return l;
3313
3330
  }
3314
- function c(a, v) {
3315
- return se("#text", {}, a, v);
3331
+ function c(l, m) {
3332
+ return oe("#text", {}, l, m);
3316
3333
  }
3317
- function f(a, v) {
3318
- let y = typeof a == "string" ? yt(a) : a;
3319
- return typeof y == "string" && /[\r\n]/.test(y) && (y = y.replace(/\s+/g, " ")), se("#text", {}, y, v);
3334
+ function f(l, m, A = !1) {
3335
+ let N = typeof l == "string" ? Et(l) : l;
3336
+ return !A && typeof N == "string" && /[\r\n]/.test(N) && (N = N.replace(/\s+/g, " ")), oe("#text", {}, N, m);
3320
3337
  }
3321
3338
  let u = "";
3322
- for (let a = 0; a < e.length; a++)
3323
- u += e[a], a < n.length && (u += `{{${a}}}`);
3324
- const _ = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, E = [];
3325
- let m, A = [], p = null, S = {}, l, k = 0;
3326
- const b = [];
3327
- function g(a) {
3328
- if (!a || typeof a != "object" || we(a)) return;
3329
- const v = a, y = S;
3330
- if (v.props || v.attrs) {
3331
- const h = v;
3332
- h.props && (y.props || (y.props = {}), Object.assign(y.props, h.props)), h.attrs && (y.attrs || (y.attrs = {}), Object.keys(h.attrs).forEach((T) => {
3333
- if (T === "style" && y.attrs.style) {
3334
- const $ = String(y.attrs.style).replace(/;?\s*$/, ""), O = String(h.attrs.style).replace(/^;?\s*/, "");
3335
- y.attrs.style = $ + "; " + O;
3336
- } else if (T === "class" && y.attrs.class) {
3337
- const $ = String(y.attrs.class).trim().split(/\s+/).filter(Boolean), O = String(h.attrs.class).trim().split(/\s+/).filter(Boolean), w = [
3338
- .../* @__PURE__ */ new Set([...$, ...O])
3339
+ for (let l = 0; l < e.length; l++)
3340
+ u += e[l], l < n.length && (u += `{{${l}}}`);
3341
+ const S = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, E = [];
3342
+ let g, w = [], p = null, v = {}, a, C = 0;
3343
+ const b = [], h = /* @__PURE__ */ new Set([
3344
+ "pre",
3345
+ "code",
3346
+ "textarea",
3347
+ "script",
3348
+ "style"
3349
+ ]);
3350
+ function d() {
3351
+ if (p && h.has(p.toLowerCase()))
3352
+ return !0;
3353
+ for (const l of E)
3354
+ if (h.has(l.tag.toLowerCase()))
3355
+ return !0;
3356
+ return !1;
3357
+ }
3358
+ function _(l) {
3359
+ if (!l || typeof l != "object" || Oe(l)) return;
3360
+ const m = l, A = v;
3361
+ if (m.props || m.attrs) {
3362
+ const N = m;
3363
+ N.props && (A.props || (A.props = {}), Object.assign(A.props, N.props)), N.attrs && (A.attrs || (A.attrs = {}), Object.keys(N.attrs).forEach((O) => {
3364
+ if (O === "style" && A.attrs.style) {
3365
+ const $ = String(A.attrs.style).replace(/;?\s*$/, ""), R = String(N.attrs.style).replace(/^;?\s*/, "");
3366
+ A.attrs.style = $ + "; " + R;
3367
+ } else if (O === "class" && A.attrs.class) {
3368
+ const $ = String(A.attrs.class).trim().split(/\s+/).filter(Boolean), R = String(N.attrs.class).trim().split(/\s+/).filter(Boolean), M = [
3369
+ .../* @__PURE__ */ new Set([...$, ...R])
3339
3370
  ];
3340
- y.attrs.class = w.join(" ");
3371
+ A.attrs.class = M.join(" ");
3341
3372
  } else
3342
- y.attrs[T] = h.attrs[T];
3373
+ A.attrs[O] = N.attrs[O];
3343
3374
  }));
3344
3375
  } else
3345
- y.props || (y.props = {}), Object.assign(y.props, v);
3346
- }
3347
- function d(a, v) {
3348
- const y = p ? A : b;
3349
- if (we(a)) {
3350
- const h = a.key ?? v, T = a.children;
3351
- y.push({
3352
- ...a,
3353
- key: h,
3354
- children: T
3376
+ A.props || (A.props = {}), Object.assign(A.props, m);
3377
+ }
3378
+ function T(l, m) {
3379
+ const A = p ? w : b;
3380
+ if (Oe(l)) {
3381
+ const N = l.key ?? m, O = l.children;
3382
+ A.push({
3383
+ ...l,
3384
+ key: N,
3385
+ children: O
3355
3386
  });
3356
3387
  return;
3357
3388
  }
3358
- if (ae(a)) {
3359
- y.push(qt(a, void 0));
3389
+ if (fe(l)) {
3390
+ A.push(en(l, void 0));
3360
3391
  return;
3361
3392
  }
3362
- if (Array.isArray(a)) {
3363
- if (a.length === 0) return;
3364
- for (let h = 0; h < a.length; h++) {
3365
- const T = a[h];
3366
- we(T) || ae(T) || Array.isArray(T) ? d(T, `${v}-${h}`) : T !== null && typeof T == "object" ? Je(T) ? y.push(
3367
- se(
3393
+ if (Array.isArray(l)) {
3394
+ if (l.length === 0) return;
3395
+ for (let N = 0; N < l.length; N++) {
3396
+ const O = l[N];
3397
+ Oe(O) || fe(O) || Array.isArray(O) ? T(O, `${m}-${N}`) : O !== null && typeof O == "object" ? Qe(O) ? A.push(
3398
+ oe(
3368
3399
  "#raw",
3369
3400
  {},
3370
- T.__rawHTML,
3371
- `${v}-${h}`
3401
+ O.__rawHTML,
3402
+ `${m}-${N}`
3372
3403
  )
3373
- ) : g(T) : y.push(c(String(T), `${v}-${h}`));
3404
+ ) : _(O) : A.push(c(String(O), `${m}-${N}`));
3374
3405
  }
3375
3406
  return;
3376
3407
  }
3377
- if (a !== null && typeof a == "object") {
3378
- if (Je(a)) {
3379
- const h = a.__rawHTML ?? "";
3380
- y.push(se("#raw", {}, h, v));
3408
+ if (l !== null && typeof l == "object") {
3409
+ if (Qe(l)) {
3410
+ const N = l.__rawHTML ?? "";
3411
+ A.push(oe("#raw", {}, N, m));
3381
3412
  return;
3382
3413
  }
3383
- g(a);
3414
+ _(l);
3384
3415
  return;
3385
3416
  }
3386
- y.push(c(String(a), v));
3417
+ A.push(c(String(l), m));
3387
3418
  }
3388
- const C = /* @__PURE__ */ new Set([
3419
+ const L = /* @__PURE__ */ new Set([
3389
3420
  "area",
3390
3421
  "base",
3391
3422
  "br",
@@ -3401,26 +3432,26 @@ function Zt(e, n, t) {
3401
3432
  "track",
3402
3433
  "wbr"
3403
3434
  ]);
3404
- for (; m = _.exec(u); )
3405
- if (!(m[0].startsWith("<!--") && m[0].endsWith("-->"))) {
3406
- if (m[1]) {
3407
- const a = m[1], v = m[0][1] === "/", y = m[0][m[0].length - 2] === "/" || C.has(a), {
3408
- props: h,
3409
- attrs: T,
3435
+ for (; g = S.exec(u); )
3436
+ if (!(g[0].startsWith("<!--") && g[0].endsWith("-->"))) {
3437
+ if (g[1]) {
3438
+ const l = g[1], m = g[0][1] === "/", A = g[0][g[0].length - 2] === "/" || L.has(l), {
3439
+ props: N,
3440
+ attrs: O,
3410
3441
  directives: $,
3411
- bound: O
3412
- } = Gt(
3413
- m[2] || "",
3442
+ bound: R
3443
+ } = tn(
3444
+ g[2] || "",
3414
3445
  n,
3415
3446
  r ?? {}
3416
- ), w = { props: {}, attrs: {} };
3417
- for (const I in h) w.props[I] = h[I];
3418
- for (const I in T) w.attrs[I] = T[I];
3419
- w.attrs && Object.prototype.hasOwnProperty.call(w.attrs, "key") && !(w.props && Object.prototype.hasOwnProperty.call(w.props, "key")) && P(() => {
3420
- w.props.key = w.attrs.key;
3447
+ ), M = { props: {}, attrs: {} };
3448
+ for (const K in N) M.props[K] = N[K];
3449
+ for (const K in O) M.attrs[K] = O[K];
3450
+ M.attrs && Object.prototype.hasOwnProperty.call(M.attrs, "key") && !(M.props && Object.prototype.hasOwnProperty.call(M.props, "key")) && H(() => {
3451
+ M.props.key = M.attrs.key;
3421
3452
  });
3422
3453
  try {
3423
- const I = {
3454
+ const K = {
3424
3455
  input: [
3425
3456
  "value",
3426
3457
  "checked",
@@ -3444,51 +3475,51 @@ function Zt(e, n, t) {
3444
3475
  audio: ["muted", "autoplay", "controls", "loop"],
3445
3476
  img: ["src", "alt", "width", "height"],
3446
3477
  button: ["type", "name", "value", "autofocus", "form"]
3447
- }, x = a.toLowerCase(), ee = I[x] ?? [];
3448
- if (w.attrs) {
3449
- for (const H of ee)
3450
- if (O && O.includes(H) && H in w.attrs && !(w.props && H in w.props)) {
3451
- let M = w.attrs[H];
3452
- if (M && j(M))
3453
- M = M.value, w.props[H] = M, delete w.attrs[H];
3454
- else if (M && typeof M == "object" && "value" in M && !(M instanceof Node))
3478
+ }, I = l.toLowerCase(), ie = K[I] ?? [];
3479
+ if (M.attrs) {
3480
+ for (const x of ie)
3481
+ if (R && R.includes(x) && x in M.attrs && !(M.props && x in M.props)) {
3482
+ let j = M.attrs[x];
3483
+ if (j && P(j))
3484
+ j = j.value, M.props[x] = j, delete M.attrs[x];
3485
+ else if (j && typeof j == "object" && "value" in j && !(j instanceof Node))
3455
3486
  try {
3456
- const W = M.value;
3457
- w.props[H] = (x === "select" || x === "option") && H === "value" ? String(W) : W, delete w.attrs[H];
3487
+ const z = j.value;
3488
+ M.props[x] = (I === "select" || I === "option") && x === "value" ? String(z) : z, delete M.attrs[x];
3458
3489
  } catch {
3459
3490
  }
3460
3491
  else {
3461
- const W = typeof M;
3462
- if (H === "disabled")
3463
- (M === "" || W === "boolean" || W === "string" && (M === "true" || M === "false") || M == null || W === "number") && (w.props[H] = M, delete w.attrs[H]);
3464
- else if (M === "" || W === "string" || W === "number" || W === "boolean" || M == null) {
3465
- const X = (x === "select" || x === "option") && H === "value" ? String(M) : M;
3466
- w.props[H] = X, delete w.attrs[H];
3492
+ const z = typeof j;
3493
+ if (x === "disabled")
3494
+ (j === "" || z === "boolean" || z === "string" && (j === "true" || j === "false") || j == null || z === "number") && (M.props[x] = j, delete M.attrs[x]);
3495
+ else if (j === "" || z === "string" || z === "number" || z === "boolean" || j == null) {
3496
+ const ee = (I === "select" || I === "option") && x === "value" ? String(j) : j;
3497
+ M.props[x] = ee, delete M.attrs[x];
3467
3498
  }
3468
3499
  }
3469
3500
  }
3470
3501
  }
3471
- if (a.includes("-") || !!r?.__customElements?.has?.(a)) {
3472
- if (w.isCustomElement = !0, O && w.attrs) {
3473
- const H = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3474
- for (const M of O)
3475
- if (M in w.attrs && !(w.props && M in w.props)) {
3476
- const W = M.includes("-") ? Ve(M) : M, X = w.attrs[M];
3477
- if (w.props[W] = X, H.has(M) || st(M))
3502
+ if (l.includes("-") || !!r?.__customElements?.has?.(l)) {
3503
+ if (M.isCustomElement = !0, R && M.attrs) {
3504
+ const x = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
3505
+ for (const j of R)
3506
+ if (j in M.attrs && !(M.props && j in M.props)) {
3507
+ const z = j.includes("-") ? Ze(j) : j, ee = M.attrs[j];
3508
+ if (M.props[z] = ee, x.has(j) || at(j))
3478
3509
  try {
3479
- const Oe = z(w.attrs[M]);
3480
- Oe === null ? delete w.attrs[M] : w.attrs[M] = Oe;
3510
+ const Pe = F(M.attrs[j]);
3511
+ Pe === null ? delete M.attrs[j] : M.attrs[j] = Pe;
3481
3512
  } catch {
3482
- delete w.attrs[M];
3513
+ delete M.attrs[j];
3483
3514
  }
3484
3515
  else
3485
- delete w.attrs[M];
3516
+ delete M.attrs[j];
3486
3517
  }
3487
3518
  }
3488
3519
  try {
3489
- if (w.attrs && !(w.props && "modelValue" in w.props)) {
3490
- const H = w.attrs["model-value"] ?? w.attrs.modelValue;
3491
- typeof H < "u" && (w.props.modelValue = H);
3520
+ if (M.attrs && !(M.props && "modelValue" in M.props)) {
3521
+ const x = M.attrs["model-value"] ?? M.attrs.modelValue;
3522
+ typeof x < "u" && (M.props.modelValue = x);
3492
3523
  }
3493
3524
  } catch {
3494
3525
  }
@@ -3496,154 +3527,154 @@ function Zt(e, n, t) {
3496
3527
  } catch {
3497
3528
  }
3498
3529
  if ($ && Object.keys($).some(
3499
- (I) => I === "model" || I.startsWith("model:")
3530
+ (K) => K === "model" || K.startsWith("model:")
3500
3531
  ))
3501
3532
  try {
3502
- const I = Symbol.for("cer.registry"), x = globalThis[I], ee = !!(x && typeof x.has == "function" && x.has(a)), K = r, H = !!(K && (K.__customElements instanceof Set && K.__customElements.has(a) || Array.isArray(K.__isCustomElements) && K.__isCustomElements.includes(a)));
3503
- if (!!(a.includes("-") || H || ee))
3504
- for (const X of Object.keys($)) {
3505
- if (X !== "model" && !X.startsWith("model:")) continue;
3506
- const Ne = $[X], Oe = Ne.arg ?? (X.includes(":") ? X.split(":", 2)[1] : void 0), F = Ne.value, He = Oe ?? "modelValue", qe = U, ft = xe, be = r?._state || r;
3507
- let ne;
3508
- typeof F == "string" && be ? ne = qe(
3509
- be,
3510
- F
3511
- ) : ne = F, w.props[He] = ne;
3533
+ const K = Symbol.for("cer.registry"), I = globalThis[K], ie = !!(I && typeof I.has == "function" && I.has(l)), Y = r, x = !!(Y && (Y.__customElements instanceof Set && Y.__customElements.has(l) || Array.isArray(Y.__isCustomElements) && Y.__isCustomElements.includes(l)));
3534
+ if (!!(l.includes("-") || x || ie))
3535
+ for (const ee of Object.keys($)) {
3536
+ if (ee !== "model" && !ee.startsWith("model:")) continue;
3537
+ const $e = $[ee], Pe = $e.arg ?? (ee.includes(":") ? ee.split(":", 2)[1] : void 0), V = $e.value, Be = Pe ?? "modelValue", Je = U, ht = Re, Se = r?._state || r;
3538
+ let re;
3539
+ typeof V == "string" && Se ? re = Je(
3540
+ Se,
3541
+ V
3542
+ ) : re = V, M.props[Be] = re;
3512
3543
  try {
3513
- const ie = Z(He);
3514
- w.attrs || (w.attrs = {}), ne != null && (typeof ne == "string" || typeof ne == "number" || typeof ne == "boolean") && (w.attrs[ie] = ne);
3544
+ const ce = J(Be);
3545
+ M.attrs || (M.attrs = {}), re != null && (typeof re == "string" || typeof re == "number" || typeof re == "boolean") && (M.attrs[ce] = re);
3515
3546
  } catch {
3516
3547
  }
3517
- w.isCustomElement = !0;
3518
- const Ge = `update:${Z(He)}`.replace(
3548
+ M.isCustomElement = !0;
3549
+ const Ye = `update:${J(Be)}`.replace(
3519
3550
  /-([a-z])/g,
3520
- (ie, te) => te.toUpperCase()
3521
- ), ut = "on" + Ge.charAt(0).toUpperCase() + Ge.slice(1);
3522
- w.props[ut] = function(ie) {
3523
- const te = ie.detail !== void 0 ? ie.detail : ie.target ? ie.target.value : void 0;
3524
- if (be)
3525
- if (F && j(F)) {
3526
- const oe = F.value;
3527
- if (Array.isArray(te) && Array.isArray(oe) ? JSON.stringify([...te].sort()) !== JSON.stringify([...oe].sort()) : te !== oe) {
3528
- F.value = te;
3551
+ (ce, ne) => ne.toUpperCase()
3552
+ ), yt = "on" + Ye.charAt(0).toUpperCase() + Ye.slice(1);
3553
+ M.props[yt] = function(ce) {
3554
+ const ne = ce.detail !== void 0 ? ce.detail : ce.target ? ce.target.value : void 0;
3555
+ if (Se)
3556
+ if (V && P(V)) {
3557
+ const ae = V.value;
3558
+ if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
3559
+ V.value = ne;
3529
3560
  try {
3530
- const ce = r;
3531
- if (ce) {
3532
- const Ee = ce.requestRender, ve = ce._requestRender;
3533
- typeof Ee == "function" ? Ee() : typeof ve == "function" && ve();
3561
+ const le = r;
3562
+ if (le) {
3563
+ const ve = le.requestRender, _e = le._requestRender;
3564
+ typeof ve == "function" ? ve() : typeof _e == "function" && _e();
3534
3565
  }
3535
3566
  } catch {
3536
3567
  }
3537
3568
  }
3538
3569
  } else {
3539
- const oe = qe(
3540
- be || {},
3541
- typeof F == "string" ? F : String(F)
3570
+ const ae = Je(
3571
+ Se || {},
3572
+ typeof V == "string" ? V : String(V)
3542
3573
  );
3543
- if (Array.isArray(te) && Array.isArray(oe) ? JSON.stringify([...te].sort()) !== JSON.stringify([...oe].sort()) : te !== oe) {
3544
- ft(
3545
- be || {},
3546
- typeof F == "string" ? F : String(F),
3547
- te
3574
+ if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
3575
+ ht(
3576
+ Se || {},
3577
+ typeof V == "string" ? V : String(V),
3578
+ ne
3548
3579
  );
3549
3580
  try {
3550
- const ce = r;
3551
- if (ce) {
3552
- const Ee = ce.requestRender, ve = ce._requestRender;
3553
- typeof Ee == "function" ? Ee() : typeof ve == "function" && ve();
3581
+ const le = r;
3582
+ if (le) {
3583
+ const ve = le.requestRender, _e = le._requestRender;
3584
+ typeof ve == "function" ? ve() : typeof _e == "function" && _e();
3554
3585
  }
3555
3586
  } catch {
3556
3587
  }
3557
3588
  }
3558
3589
  }
3559
- }, delete $[X];
3590
+ }, delete $[ee];
3560
3591
  }
3561
3592
  } catch {
3562
3593
  }
3563
- if (Object.keys($).length > 0 && (w.directives = { ...$ }), v) {
3564
- const I = A.some(
3565
- (H) => typeof H == "object" && H.tag !== "#text"
3594
+ if (Object.keys($).length > 0 && (M.directives = { ...$ }), m) {
3595
+ const K = w.some(
3596
+ (x) => typeof x == "object" && x.tag !== "#text"
3566
3597
  );
3567
- let x = A;
3568
- if (I && A.length > 0) {
3569
- let H = 0;
3570
- for (; H < A.length; ) {
3571
- const W = A[H];
3572
- if (!ae(W) || W.tag !== "#text" || typeof W.children != "string" || W.children.trim() !== "")
3598
+ let I = w;
3599
+ if (K && w.length > 0) {
3600
+ let x = 0;
3601
+ for (; x < w.length; ) {
3602
+ const z = w[x];
3603
+ if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
3573
3604
  break;
3574
- H++;
3605
+ x++;
3575
3606
  }
3576
- let M = A.length - 1;
3577
- for (; M >= 0; ) {
3578
- const W = A[M];
3579
- if (!ae(W) || W.tag !== "#text" || typeof W.children != "string" || W.children.trim() !== "")
3607
+ let j = w.length - 1;
3608
+ for (; j >= 0; ) {
3609
+ const z = w[j];
3610
+ if (!fe(z) || z.tag !== "#text" || typeof z.children != "string" || z.children.trim() !== "")
3580
3611
  break;
3581
- M--;
3612
+ j--;
3582
3613
  }
3583
- H === 0 && M === A.length - 1 ? x = A : H > M ? x = [] : x = A.slice(H, M + 1);
3614
+ x === 0 && j === w.length - 1 ? I = w : x > j ? I = [] : I = w.slice(x, j + 1);
3584
3615
  }
3585
- const ee = se(
3616
+ const ie = oe(
3586
3617
  p,
3587
- S,
3588
- x.length === 1 && ae(x[0]) && x[0].tag === "#text" ? typeof x[0].children == "string" ? x[0].children : "" : x.length ? x : void 0,
3589
- l
3590
- ), K = E.pop();
3591
- K ? (p = K.tag, S = K.props, l = K.key, A = K.children, A.push(ee)) : (b.push(ee), p = null, S = {}, l = void 0, A = []);
3592
- } else y ? p ? A.push(se(a, w, void 0, void 0)) : b.push(se(a, w, void 0, void 0)) : (p && E.push({
3618
+ v,
3619
+ I.length === 1 && fe(I[0]) && I[0].tag === "#text" ? typeof I[0].children == "string" ? I[0].children : "" : I.length ? I : void 0,
3620
+ a
3621
+ ), Y = E.pop();
3622
+ Y ? (p = Y.tag, v = Y.props, a = Y.key, w = Y.children, w.push(ie)) : (b.push(ie), p = null, v = {}, a = void 0, w = []);
3623
+ } else A ? p ? w.push(oe(l, M, void 0, void 0)) : b.push(oe(l, M, void 0, void 0)) : (p && E.push({
3593
3624
  tag: p,
3594
- props: S,
3595
- children: A,
3596
- key: l
3597
- }), p = a, S = w, A = []);
3598
- } else if (typeof m[3] < "u") {
3599
- const a = Number(m[3]), v = n[a], y = `interp-${a}`;
3600
- d(v, y);
3601
- } else if (m[4]) {
3602
- const a = m[4], v = p ? A : b, y = a.split(/({{\d+}})/);
3603
- for (const h of y) {
3604
- if (!h) continue;
3605
- const T = h.match(/^{{(\d+)}}$/);
3606
- if (T) {
3607
- const $ = Number(T[1]), O = n[$], w = `interp-${$}`;
3608
- d(O, w);
3625
+ props: v,
3626
+ children: w,
3627
+ key: a
3628
+ }), p = l, v = M, w = []);
3629
+ } else if (typeof g[3] < "u") {
3630
+ const l = Number(g[3]), m = n[l], A = `interp-${l}`;
3631
+ T(m, A);
3632
+ } else if (g[4]) {
3633
+ const l = g[4], m = p ? w : b, A = l.split(/({{\d+}})/);
3634
+ for (const N of A) {
3635
+ if (!N) continue;
3636
+ const O = N.match(/^{{(\d+)}}$/);
3637
+ if (O) {
3638
+ const $ = Number(O[1]), R = n[$], M = `interp-${$}`;
3639
+ T(R, M);
3609
3640
  } else {
3610
- const $ = `text-${k++}`;
3611
- v.push(f(h, $));
3641
+ const $ = `text-${C++}`, R = d();
3642
+ m.push(f(N, $, R));
3612
3643
  }
3613
3644
  }
3614
3645
  }
3615
3646
  }
3616
- const N = b.filter((a) => ae(a) && a.tag === "#text" ? typeof a.children == "string" && a.children.trim() !== "" : !0).map(
3617
- (a) => Fe(a)
3647
+ const k = b.filter((l) => fe(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
3648
+ (l) => Ge(l)
3618
3649
  );
3619
- if (N.length === 1) {
3620
- const a = N[0];
3621
- return o && i && We.set(i, a), a;
3622
- } else if (N.length > 1) {
3623
- const a = N;
3624
- return o && i && We.set(i, a), a;
3650
+ if (k.length === 1) {
3651
+ const l = k[0];
3652
+ return i && o && Ue.set(o, l), l;
3653
+ } else if (k.length > 1) {
3654
+ const l = k;
3655
+ return i && o && Ue.set(o, l), l;
3625
3656
  }
3626
- return se("div", {}, "", "fallback-root");
3657
+ return oe("div", {}, "", "fallback-root");
3627
3658
  }
3628
- function ln(e, ...n) {
3659
+ function mn(e, ...n) {
3629
3660
  const t = n[n.length - 1], s = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
3630
- return Zt(e, n, s);
3661
+ return nn(e, n, s);
3631
3662
  }
3632
3663
  export {
3633
- an as component,
3634
- pn as computed,
3635
- gn as css,
3636
- yt as decodeEntities,
3637
- ln as html,
3638
- dn as ref,
3639
- hn as unsafeHTML,
3640
- en as useEmit,
3641
- rn as useOnAttributeChanged,
3642
- tn as useOnConnected,
3643
- nn as useOnDisconnected,
3644
- sn as useOnError,
3645
- on as useProps,
3646
- cn as useStyle,
3647
- yn as watch
3664
+ yn as component,
3665
+ En as computed,
3666
+ kn as css,
3667
+ Et as decodeEntities,
3668
+ mn as html,
3669
+ Sn as ref,
3670
+ vn as unsafeHTML,
3671
+ an as useEmit,
3672
+ un as useOnAttributeChanged,
3673
+ ln as useOnConnected,
3674
+ fn as useOnDisconnected,
3675
+ pn as useOnError,
3676
+ dn as useProps,
3677
+ hn as useStyle,
3678
+ _n as watch
3648
3679
  };
3649
3680
  //# sourceMappingURL=custom-elements-runtime.es.js.map