@jasonshimmy/custom-elements-runtime 2.2.2 → 2.2.3

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