@jasonshimmy/custom-elements-runtime 0.1.24 → 0.1.25

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,13 +1,13 @@
1
- function bt(e, t) {
1
+ function yt(e, t) {
2
2
  return te(e ? t : [], "when-block");
3
3
  }
4
- function vt(e, t) {
4
+ function mt(e, t) {
5
5
  return e.map((r, n) => {
6
6
  const o = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
7
7
  return te(t(r, n), `each-${o}`);
8
8
  });
9
9
  }
10
- function Re() {
10
+ function Be() {
11
11
  const e = [];
12
12
  return {
13
13
  when(t, r) {
@@ -17,11 +17,11 @@ function Re() {
17
17
  return e.push([!0, t]), this;
18
18
  },
19
19
  done() {
20
- return Pe(...e);
20
+ return Re(...e);
21
21
  }
22
22
  };
23
23
  }
24
- function Pe(...e) {
24
+ function Re(...e) {
25
25
  for (let t = 0; t < e.length; t++) {
26
26
  const [r, n] = e[t];
27
27
  if (r) return [te(n, `whenChain-branch-${t}`)];
@@ -36,7 +36,7 @@ function te(e, t) {
36
36
  children: r
37
37
  };
38
38
  }
39
- class U extends EventTarget {
39
+ class K extends EventTarget {
40
40
  handlers = {};
41
41
  static instance;
42
42
  eventCounters = /* @__PURE__ */ new Map();
@@ -44,7 +44,7 @@ class U extends EventTarget {
44
44
  * Returns the singleton instance of GlobalEventBus
45
45
  */
46
46
  static getInstance() {
47
- return U.instance || (U.instance = new U()), U.instance;
47
+ return K.instance || (K.instance = new K()), K.instance;
48
48
  }
49
49
  // Enhanced emit method with better typing and event storm protection
50
50
  /**
@@ -160,7 +160,7 @@ class U extends EventTarget {
160
160
  this.eventCounters.clear();
161
161
  }
162
162
  }
163
- const Z = U.getInstance(), xt = (e, t) => Z.emit(e, t), wt = (e, t) => Z.on(e, t), kt = (e, t) => Z.off(e, t), $t = (e, t) => Z.once(e, t), St = (e, t, r) => Z.listen(e, t, r);
163
+ const Z = K.getInstance(), bt = (e, t) => Z.emit(e, t), vt = (e, t) => Z.on(e, t), xt = (e, t) => Z.off(e, t), wt = (e, t) => Z.once(e, t), kt = (e, t, r) => Z.listen(e, t, r);
164
164
  function xe(e) {
165
165
  let t = { ...e };
166
166
  const r = [];
@@ -171,8 +171,8 @@ function xe(e) {
171
171
  return t;
172
172
  }
173
173
  function s(a) {
174
- const l = typeof a == "function" ? a(t) : a;
175
- t = { ...t, ...l }, i();
174
+ const c = typeof a == "function" ? a(t) : a;
175
+ t = { ...t, ...c }, i();
176
176
  }
177
177
  function i() {
178
178
  r.forEach((a) => a(t));
@@ -194,7 +194,7 @@ function pe(e) {
194
194
  })[t]
195
195
  ) : e;
196
196
  }
197
- function Oe(e, t, r) {
197
+ function Pe(e, t, r) {
198
198
  if (r)
199
199
  for (const [n, o] of Object.entries(r)) {
200
200
  let s, i = {};
@@ -214,14 +214,14 @@ function Oe(e, t, r) {
214
214
  function he(e, t) {
215
215
  return t.split(".").reduce((r, n) => r?.[n], e);
216
216
  }
217
- function He(e, t, r, n) {
217
+ function Oe(e, t, r, n) {
218
218
  const o = (i, a) => {
219
219
  if (i === a) return !0;
220
220
  if (typeof i != typeof a || typeof i != "object" || i === null || a === null) return !1;
221
221
  if (Array.isArray(i) && Array.isArray(a))
222
- return i.length !== a.length ? !1 : i.every((u, h) => o(u, a[h]));
223
- const l = Object.keys(i), f = Object.keys(a);
224
- return l.length !== f.length ? !1 : l.every((u) => o(i[u], a[u]));
222
+ return i.length !== a.length ? !1 : i.every((p, y) => o(p, a[y]));
223
+ const c = Object.keys(i), f = Object.keys(a);
224
+ return c.length !== f.length ? !1 : c.every((p) => o(i[p], a[p]));
225
225
  }, s = t.get(r);
226
226
  if (s && !o(n, s.oldValue))
227
227
  try {
@@ -232,10 +232,10 @@ function He(e, t, r, n) {
232
232
  for (const [i, a] of t.entries())
233
233
  if (a.options.deep && r.startsWith(i + "."))
234
234
  try {
235
- const l = he(e, i);
236
- o(l, a.oldValue) || (a.callback(l, a.oldValue, e), a.oldValue = l);
237
- } catch (l) {
238
- console.error(`Error in deep watcher for "${i}":`, l);
235
+ const c = he(e, i);
236
+ o(c, a.oldValue) || (a.callback(c, a.oldValue, e), a.oldValue = c);
237
+ } catch (c) {
238
+ console.error(`Error in deep watcher for "${i}":`, c);
239
239
  }
240
240
  }
241
241
  function Me(e, t, r) {
@@ -256,20 +256,20 @@ function Ne(e, t, r, n) {
256
256
  e.onConnected && !r && (e.onConnected(t), n(!0));
257
257
  }
258
258
  function We(e, t, r, n, o, s, i, a) {
259
- e.onDisconnected && e.onDisconnected(t), r.forEach((l) => l()), n(), o(), s(!1), i(null), a(!1);
259
+ e.onDisconnected && e.onDisconnected(t), r.forEach((c) => c()), n(), o(), s(!1), i(null), a(!1);
260
260
  }
261
261
  function De(e, t, r, n, o) {
262
262
  e.onAttributeChanged && e.onAttributeChanged(t, r, n, o);
263
263
  }
264
- function D(e, t) {
264
+ function q(e, t) {
265
265
  if (t && e instanceof HTMLElement) {
266
266
  for (const r in t)
267
267
  t[r] === e && delete t[r];
268
268
  for (const r of Array.from(e.childNodes))
269
- D(r, t);
269
+ q(r, t);
270
270
  }
271
271
  }
272
- function q(e, t) {
272
+ function I(e, t) {
273
273
  return typeof t == "string" ? t.split(".").reduce((r, n) => r?.[n], e) : t;
274
274
  }
275
275
  function we(e, t, r) {
@@ -280,50 +280,50 @@ function we(e, t, r) {
280
280
  }
281
281
  function qe(e, t, r, n, o, s, i) {
282
282
  if (!s) return;
283
- const a = t.includes("lazy"), l = t.includes("trim"), f = t.includes("number"), u = () => {
284
- const g = s._state || s;
285
- return q(g, e);
286
- }, h = u();
287
- let c = "text";
288
- const v = n?.type;
289
- if (i instanceof HTMLInputElement ? c = v || i.type || "text" : i instanceof HTMLSelectElement ? c = "select" : i instanceof HTMLTextAreaElement && (c = "textarea"), c === "checkbox")
290
- if (Array.isArray(h)) {
291
- const g = i?.getAttribute("value") || n?.value || "", d = h.includes(g);
292
- i && i.checked !== d && (r.checked = d);
283
+ const a = t.includes("lazy"), c = t.includes("trim"), f = t.includes("number"), p = () => {
284
+ const h = s._state || s;
285
+ return I(h, e);
286
+ }, y = p();
287
+ let l = "text";
288
+ const w = n?.type;
289
+ if (i instanceof HTMLInputElement ? l = w || i.type || "text" : i instanceof HTMLSelectElement ? l = "select" : i instanceof HTMLTextAreaElement && (l = "textarea"), l === "checkbox")
290
+ if (Array.isArray(y)) {
291
+ const h = i?.getAttribute("value") || n?.value || "", u = y.includes(h);
292
+ i && i.checked !== u && (r.checked = u);
293
293
  } else {
294
- const g = i?.getAttribute("true-value") || !0, d = h === g;
295
- i && i.checked !== d && (r.checked = d);
294
+ const h = i?.getAttribute("true-value") || !0, u = y === h;
295
+ i && i.checked !== u && (r.checked = u);
296
296
  }
297
- else if (c === "radio") {
298
- const g = n?.value || "", d = h === g;
299
- i && i.checked !== d && (r.checked = d);
300
- } else if (c === "select")
297
+ else if (l === "radio") {
298
+ const h = n?.value || "", u = y === h;
299
+ i && i.checked !== u && (r.checked = u);
300
+ } else if (l === "select")
301
301
  if (i && i.hasAttribute("multiple")) {
302
- const g = i, d = Array.isArray(h) ? h : [];
302
+ const h = i, u = Array.isArray(y) ? y : [];
303
303
  setTimeout(() => {
304
- Array.from(g.options).forEach((y) => {
305
- const b = d.includes(y.value);
306
- y.selected !== b && (y.selected = b);
304
+ Array.from(h.options).forEach((g) => {
305
+ const b = u.includes(g.value);
306
+ g.selected !== b && (g.selected = b);
307
307
  });
308
308
  }, 0);
309
309
  } else
310
310
  setTimeout(() => {
311
- i instanceof HTMLSelectElement && i.value !== String(h) && (i.value = String(h));
311
+ i instanceof HTMLSelectElement && i.value !== String(y) && (i.value = String(y));
312
312
  }, 0);
313
313
  else {
314
- const g = String(h ?? "");
315
- (!i || i.value !== g) && (r.value = h);
316
- }
317
- const x = a || c === "checkbox" || c === "radio" || c === "select" ? "change" : "input", k = (g) => {
318
- if (g.isComposing || o._isComposing || g.isTrusted === !1) return;
319
- const d = g.target;
320
- if (d._modelUpdating) return;
321
- const y = u();
322
- let b = d.value;
323
- if (c === "checkbox")
324
- if (Array.isArray(y)) {
325
- const $ = d.getAttribute("value") || "", _ = [...y];
326
- if (d.checked)
314
+ const h = String(y ?? "");
315
+ (!i || i.value !== h) && (r.value = y);
316
+ }
317
+ const x = a || l === "checkbox" || l === "radio" || l === "select" ? "change" : "input", k = (h) => {
318
+ if (h.isComposing || o._isComposing || h.isTrusted === !1) return;
319
+ const u = h.target;
320
+ if (u._modelUpdating) return;
321
+ const g = p();
322
+ let b = u.value;
323
+ if (l === "checkbox")
324
+ if (Array.isArray(g)) {
325
+ const $ = u.getAttribute("value") || "", _ = [...g];
326
+ if (u.checked)
327
327
  _.includes($) || _.push($);
328
328
  else {
329
329
  const C = _.indexOf($);
@@ -331,56 +331,55 @@ function qe(e, t, r, n, o, s, i) {
331
331
  }
332
332
  b = _;
333
333
  } else {
334
- const $ = d.getAttribute("true-value") || !0, _ = d.getAttribute("false-value") || !1;
335
- b = d.checked ? $ : _;
334
+ const $ = u.getAttribute("true-value") || !0, _ = u.getAttribute("false-value") || !1;
335
+ b = u.checked ? $ : _;
336
336
  }
337
- else if (c === "radio")
338
- b = d.getAttribute("value") || d.value;
339
- else if (c === "select" && d.multiple) {
340
- const $ = d;
337
+ else if (l === "radio")
338
+ b = u.getAttribute("value") || u.value;
339
+ else if (l === "select" && u.multiple) {
340
+ const $ = u;
341
341
  b = Array.from($.selectedOptions).map(
342
342
  (_) => _.value
343
343
  );
344
- } else if (l && (b = b.trim()), f) {
344
+ } else if (c && (b = b.trim()), f) {
345
345
  const $ = Number(b);
346
346
  isNaN($) || (b = $);
347
347
  }
348
- const p = s._state || s, w = q(p, e);
349
- if (Array.isArray(b) && Array.isArray(w) ? JSON.stringify([...b].sort()) !== JSON.stringify([...w].sort()) : b !== w) {
350
- const $ = g.target;
351
- $._modelUpdating = !0, we(p, e, b), setTimeout(() => {
348
+ const d = s._state || s, v = I(d, e);
349
+ if (Array.isArray(b) && Array.isArray(v) ? JSON.stringify([...b].sort()) !== JSON.stringify([...v].sort()) : b !== v) {
350
+ const $ = h.target;
351
+ $._modelUpdating = !0, we(d, e, b), setTimeout(() => {
352
352
  $._modelUpdating = !1;
353
353
  }, 0), s._requestRender && s._requestRender();
354
354
  }
355
355
  };
356
- if (o[x] = k, c === "text" || c === "textarea") {
357
- const g = () => {
356
+ if (o[x] = k, l === "text" || l === "textarea") {
357
+ const h = () => {
358
358
  o._isComposing = !0;
359
- }, d = (y) => {
359
+ }, u = (g) => {
360
360
  o._isComposing = !1;
361
- const b = y.target;
361
+ const b = g.target;
362
362
  setTimeout(() => {
363
363
  if (b) {
364
- let p = b.value;
365
- if (l && (p = p.trim()), f) {
366
- const _ = Number(p);
367
- isNaN(_) || (p = _);
364
+ let d = b.value;
365
+ if (c && (d = d.trim()), f) {
366
+ const _ = Number(d);
367
+ isNaN(_) || (d = _);
368
368
  }
369
- const w = s._state || s, m = q(w, e);
370
- (Array.isArray(p) && Array.isArray(m) ? JSON.stringify([...p].sort()) !== JSON.stringify([...m].sort()) : p !== m) && (b && (b._modelUpdating = !0, setTimeout(() => {
369
+ const v = s._state || s, m = I(v, e);
370
+ (Array.isArray(d) && Array.isArray(m) ? JSON.stringify([...d].sort()) !== JSON.stringify([...m].sort()) : d !== m) && (b && (b._modelUpdating = !0, setTimeout(() => {
371
371
  b._modelUpdating = !1;
372
- }, 0)), we(w, e, p), s._requestRender && s._requestRender());
372
+ }, 0)), we(v, e, d), s._requestRender && s._requestRender());
373
373
  }
374
374
  }, 0);
375
375
  };
376
- o.compositionstart = g, o.compositionend = d;
376
+ o.compositionstart = h, o.compositionend = u;
377
377
  }
378
378
  }
379
- const Ie = "onHost";
380
- function Te(e) {
381
- return e.slice(Ie.length).toLowerCase();
379
+ function Ae(e) {
380
+ return e.slice(2).charAt(0).toLowerCase() + e.slice(3);
382
381
  }
383
- function Fe(e, t, r, n) {
382
+ function Ie(e, t, r, n) {
384
383
  if (n) {
385
384
  if (typeof e == "object" && e !== null)
386
385
  for (const [o, s] of Object.entries(e))
@@ -394,35 +393,35 @@ function Fe(e, t, r, n) {
394
393
  return;
395
394
  }
396
395
  } catch {
397
- const o = q(n, e);
396
+ const o = I(n, e);
398
397
  r[e] = o;
399
398
  }
400
399
  }
401
400
  }
402
- function Ue(e, t, r) {
401
+ function He(e, t, r) {
403
402
  if (!r) return;
404
- const n = q(r, e), o = t.style || "", s = n ? "" : "none";
403
+ const n = I(r, e), o = t.style || "", s = n ? "" : "none";
405
404
  if (o) {
406
405
  const i = o.split(";").filter(Boolean), a = i.findIndex(
407
- (l) => l.trim().startsWith("display:")
406
+ (c) => c.trim().startsWith("display:")
408
407
  );
409
408
  a >= 0 ? i[a] = `display: ${s}` : i.push(`display: ${s}`), t.style = i.join("; ");
410
409
  } else
411
410
  t.style = `display: ${s}`;
412
411
  }
413
- function Ke(e, t, r) {
412
+ function Fe(e, t, r) {
414
413
  if (!r) return;
415
- const n = q(r, e);
414
+ const n = I(r, e);
416
415
  let o = [];
417
416
  typeof n == "string" ? o = [n] : Array.isArray(n) ? o = n.filter(Boolean) : typeof n == "object" && (o = Object.entries(n).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
418
417
  const s = t.class || "", i = s ? `${s} ${o.join(" ")}`.trim() : o.join(" ");
419
418
  i && (t.class = i);
420
419
  }
421
- function Ve(e, t, r) {
420
+ function Ke(e, t, r) {
422
421
  let n;
423
422
  if (typeof e == "string") {
424
423
  if (!r) return;
425
- n = q(r, e);
424
+ n = I(r, e);
426
425
  } else
427
426
  n = e;
428
427
  let o = "";
@@ -430,12 +429,12 @@ function Ve(e, t, r) {
430
429
  o = n;
431
430
  else if (n && typeof n == "object") {
432
431
  const i = [];
433
- for (const [a, l] of Object.entries(n))
434
- if (l != null && l !== "") {
432
+ for (const [a, c] of Object.entries(n))
433
+ if (c != null && c !== "") {
435
434
  const f = a.replace(
436
435
  /[A-Z]/g,
437
- (c) => `-${c.toLowerCase()}`
438
- ), u = [
436
+ (l) => `-${l.toLowerCase()}`
437
+ ), p = [
439
438
  "width",
440
439
  "height",
441
440
  "top",
@@ -461,23 +460,23 @@ function Ve(e, t, r) {
461
460
  "min-height",
462
461
  "max-height"
463
462
  ];
464
- let h = String(l);
465
- typeof l == "number" && u.includes(f) && (h = `${l}px`), i.push(`${f}: ${h}`);
463
+ let y = String(c);
464
+ typeof c == "number" && p.includes(f) && (y = `${c}px`), i.push(`${f}: ${y}`);
466
465
  }
467
466
  o = i.join("; ") + (i.length > 0 ? ";" : "");
468
467
  }
469
468
  const s = t.style || "";
470
469
  t.style = s + (s && !s.endsWith(";") ? "; " : "") + o;
471
470
  }
472
- function je(e, t, r, n) {
471
+ function Te(e, t, r, n) {
473
472
  const o = {}, s = { ...n || {} }, i = {};
474
- for (const [a, l] of Object.entries(e)) {
475
- const { value: f, modifiers: u } = l;
473
+ for (const [a, c] of Object.entries(e)) {
474
+ const { value: f, modifiers: p } = c;
476
475
  switch (a) {
477
476
  case "model":
478
477
  qe(
479
478
  typeof f == "string" ? f : String(f),
480
- u,
479
+ p,
481
480
  o,
482
481
  s,
483
482
  i,
@@ -486,16 +485,16 @@ function je(e, t, r, n) {
486
485
  );
487
486
  break;
488
487
  case "bind":
489
- Fe(f, o, s, t);
488
+ Ie(f, o, s, t);
490
489
  break;
491
490
  case "show":
492
- Ue(f, s, t);
491
+ He(f, s, t);
493
492
  break;
494
493
  case "class":
495
- Ke(f, s, t);
494
+ Fe(f, s, t);
496
495
  break;
497
496
  case "style":
498
- Ve(f, s, t);
497
+ Ke(f, s, t);
499
498
  break;
500
499
  }
501
500
  }
@@ -508,23 +507,23 @@ function ge(e, t) {
508
507
  if (!i || typeof i != "object") return i;
509
508
  let a = i.props?.key ?? i.key;
510
509
  if (!a) {
511
- const h = i.tag || "node", c = i.props?.attrs?.id ?? i.props?.attrs?.name ?? i.props?.attrs?.["data-key"] ?? "";
512
- a = c ? `${t}:${h}:${c}` : `${t}:${h}`;
510
+ const y = i.tag || "node", l = i.props?.attrs?.id ?? i.props?.attrs?.name ?? i.props?.attrs?.["data-key"] ?? "";
511
+ a = l ? `${t}:${y}:${l}` : `${t}:${y}`;
513
512
  }
514
- let l = a, f = 1;
515
- for (; s.has(l); )
516
- l = `${a}#${f++}`;
517
- s.add(l);
518
- let u = i.children;
519
- return Array.isArray(u) && (u = ge(u, l)), { ...i, key: l, children: u };
513
+ let c = a, f = 1;
514
+ for (; s.has(c); )
515
+ c = `${a}#${f++}`;
516
+ s.add(c);
517
+ let p = i.children;
518
+ return Array.isArray(p) && (p = ge(p, c)), { ...i, key: c, children: p };
520
519
  });
521
520
  }
522
521
  const r = e;
523
522
  let n = r.props?.key ?? r.key ?? t, o = r.children;
524
523
  return Array.isArray(o) && (o = ge(o, n)), { ...r, key: n, children: o };
525
524
  }
526
- function Je(e, t, r, n) {
527
- const o = r.directives ?? {}, s = je(
525
+ function Ue(e, t, r, n) {
526
+ const o = r.directives ?? {}, s = Te(
528
527
  o,
529
528
  n,
530
529
  e,
@@ -537,136 +536,136 @@ function Je(e, t, r, n) {
537
536
  ...t.attrs,
538
537
  ...r.attrs,
539
538
  ...s.attrs
540
- }, l = t.props ?? {}, f = i;
541
- for (const c in { ...l, ...f }) {
542
- const v = l[c], x = f[c];
543
- if (v !== x)
544
- if (c === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
539
+ }, c = t.props ?? {}, f = i;
540
+ for (const l in { ...c, ...f }) {
541
+ const w = c[l], x = f[l];
542
+ if (w !== x)
543
+ if (l === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
545
544
  e.value !== x && (e.value = x ?? "");
546
- else if (c === "checked" && e instanceof HTMLInputElement)
545
+ else if (l === "checked" && e instanceof HTMLInputElement)
547
546
  e.checked = !!x;
548
- else if (c.startsWith("onHost") && typeof x == "function") {
549
- const k = Te(c);
550
- typeof v == "function" && e.removeEventListener(k, v), e.addEventListener(k, x);
551
- } else x == null || x === !1 ? e.removeAttribute(c) : e.setAttribute(c, String(x));
547
+ else if (l.startsWith("on") && typeof x == "function") {
548
+ const k = Ae(l);
549
+ typeof w == "function" && e.removeEventListener(k, w), e.addEventListener(k, x);
550
+ } else x == null || x === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(x));
552
551
  }
553
- for (const [c, v] of Object.entries(
552
+ for (const [l, w] of Object.entries(
554
553
  s.listeners || {}
555
554
  ))
556
- e.addEventListener(c, v);
557
- const u = t.attrs ?? {}, h = a;
558
- for (const c in { ...u, ...h }) {
559
- const v = u[c], x = h[c];
560
- v !== x && (x == null || x === !1 ? e.removeAttribute(c) : e.setAttribute(c, String(x)));
555
+ e.addEventListener(l, w);
556
+ const p = t.attrs ?? {}, y = a;
557
+ for (const l in { ...p, ...y }) {
558
+ const w = p[l], x = y[l];
559
+ w !== x && (x == null || x === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(x)));
561
560
  }
562
561
  }
563
562
  function P(e, t, r) {
564
563
  if (typeof e == "string")
565
564
  return document.createTextNode(e);
566
565
  if (e.tag === "#text") {
567
- const h = document.createTextNode(
566
+ const y = document.createTextNode(
568
567
  typeof e.children == "string" ? e.children : ""
569
568
  );
570
- return e.key != null && (h.key = e.key), h;
569
+ return e.key != null && (y.key = e.key), y;
571
570
  }
572
571
  if (e.tag === "#anchor") {
573
- const h = e, c = Array.isArray(h.children) ? h.children : [], v = document.createTextNode(""), x = document.createTextNode("");
574
- h.key != null && (v.key = `${h.key}:start`, x.key = `${h.key}:end`), h._startNode = v, h._endNode = x;
572
+ const y = e, l = Array.isArray(y.children) ? y.children : [], w = document.createTextNode(""), x = document.createTextNode("");
573
+ y.key != null && (w.key = `${y.key}:start`, x.key = `${y.key}:end`), y._startNode = w, y._endNode = x;
575
574
  const k = document.createDocumentFragment();
576
- k.appendChild(v);
577
- for (const g of c) {
578
- const d = P(g, t);
579
- k.appendChild(d);
575
+ k.appendChild(w);
576
+ for (const h of l) {
577
+ const u = P(h, t);
578
+ k.appendChild(u);
580
579
  }
581
580
  return k.appendChild(x), k;
582
581
  }
583
582
  const n = document.createElement(e.tag);
584
583
  e.key != null && (n.key = e.key);
585
- const { props: o = {}, attrs: s = {}, directives: i = {} } = e.props ?? {}, a = je(i, t, n, s), l = {
584
+ const { props: o = {}, attrs: s = {}, directives: i = {} } = e.props ?? {}, a = Te(i, t, n, s), c = {
586
585
  ...o,
587
586
  ...a.props
588
587
  }, f = {
589
588
  ...s,
590
589
  ...a.attrs
591
590
  };
592
- for (const h in f) {
593
- const c = f[h];
594
- if (typeof h != "string" || /\[object Object\]/.test(h)) {
595
- typeof window < "u" && window.console && console.warn("Skipping invalid attribute key:", h, c);
591
+ for (const y in f) {
592
+ const l = f[y];
593
+ if (typeof y != "string" || /\[object Object\]/.test(y)) {
594
+ typeof window < "u" && window.console && console.warn("Skipping invalid attribute key:", y, l);
596
595
  continue;
597
596
  }
598
- typeof c == "boolean" ? c && n.setAttribute(h, "") : c != null && n.setAttribute(h, c);
597
+ typeof l == "boolean" ? l && n.setAttribute(y, "") : l != null && n.setAttribute(y, l);
599
598
  }
600
- for (const h in l) {
601
- const c = l[h];
602
- if (typeof h != "string" || /\[object Object\]/.test(h)) {
603
- typeof window < "u" && window.console && console.warn("Skipping invalid prop key:", h, c);
599
+ for (const y in c) {
600
+ const l = c[y];
601
+ if (typeof y != "string" || /\[object Object\]/.test(y)) {
602
+ typeof window < "u" && window.console && console.warn("Skipping invalid prop key:", y, l);
604
603
  continue;
605
604
  }
606
- if (h === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement))
607
- n.value = c ?? "";
608
- else if (h === "checked" && n instanceof HTMLInputElement)
609
- n.checked = !!c;
610
- else if (h.startsWith("onHost") && typeof c == "function")
611
- n.addEventListener(Te(h), c);
605
+ if (y === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement))
606
+ n.value = l ?? "";
607
+ else if (y === "checked" && n instanceof HTMLInputElement)
608
+ n.checked = !!l;
609
+ else if (y.startsWith("on") && typeof l == "function")
610
+ n.addEventListener(Ae(y), l);
612
611
  else {
613
- if (h.startsWith("onHost") && c === void 0)
612
+ if (y.startsWith("on") && l === void 0)
614
613
  continue;
615
- c == null || c === !1 ? n.removeAttribute(h) : n.setAttribute(h, String(c));
614
+ l == null || l === !1 ? n.removeAttribute(y) : n.setAttribute(y, String(l));
616
615
  }
617
616
  }
618
- for (const [h, c] of Object.entries(
617
+ for (const [y, l] of Object.entries(
619
618
  a.listeners || {}
620
619
  ))
621
- n.addEventListener(h, c);
622
- const u = e.props?.ref ?? (e.props?.props && e.props.props.ref);
623
- if (typeof e != "string" && u && r && (r[u] = n), Array.isArray(e.children))
624
- for (const h of e.children)
625
- n.appendChild(P(h, t, r));
620
+ n.addEventListener(y, l);
621
+ const p = e.props?.ref ?? (e.props?.props && e.props.props.ref);
622
+ if (typeof e != "string" && p && r && (r[p] = n), Array.isArray(e.children))
623
+ for (const y of e.children)
624
+ n.appendChild(P(y, t, r));
626
625
  else typeof e.children == "string" && (n.textContent = e.children);
627
626
  return n;
628
627
  }
629
- function Ze(e, t, r, n, o) {
628
+ function Ve(e, t, r, n, o) {
630
629
  if (typeof r == "string") {
631
630
  e.textContent !== r && (e.textContent = r);
632
631
  return;
633
632
  }
634
633
  if (!Array.isArray(r)) return;
635
634
  const s = Array.from(e.childNodes), i = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
636
- for (const v of i)
637
- v && v.key != null && a.set(v.key, v);
638
- const l = /* @__PURE__ */ new Map();
639
- for (const v of s) {
640
- const x = v.key;
641
- x != null && l.set(x, v);
635
+ for (const w of i)
636
+ w && w.key != null && a.set(w.key, w);
637
+ const c = /* @__PURE__ */ new Map();
638
+ for (const w of s) {
639
+ const x = w.key;
640
+ x != null && c.set(x, w);
642
641
  }
643
642
  const f = /* @__PURE__ */ new Set();
644
- let u = e.firstChild;
645
- function h(v, x) {
646
- let k = v;
643
+ let p = e.firstChild;
644
+ function y(w, x) {
645
+ let k = w;
647
646
  for (; k && (f.add(k), k !== x); )
648
647
  k = k.nextSibling;
649
648
  }
650
- function c(v, x, k, g) {
651
- const d = [];
652
- let y = v.nextSibling;
653
- for (; y && y !== x; )
654
- d.push(y), y = y.nextSibling;
649
+ function l(w, x, k, h) {
650
+ const u = [];
651
+ let g = w.nextSibling;
652
+ for (; g && g !== x; )
653
+ u.push(g), g = g.nextSibling;
655
654
  const b = Array.isArray(k) ? k : [];
656
- if (g.some((w) => w && w.key != null) || b.some((w) => w && w.key != null)) {
657
- const w = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
655
+ if (h.some((v) => v && v.key != null) || b.some((v) => v && v.key != null)) {
656
+ const v = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
658
657
  for (const C of b)
659
- C && C.key != null && w.set(C.key, C);
660
- for (const C of d) {
658
+ C && C.key != null && v.set(C.key, C);
659
+ for (const C of u) {
661
660
  const E = C.key;
662
661
  E != null && m.set(E, C);
663
662
  }
664
663
  const $ = /* @__PURE__ */ new Set();
665
- let _ = v.nextSibling;
666
- for (const C of g) {
664
+ let _ = w.nextSibling;
665
+ for (const C of h) {
667
666
  let E;
668
667
  if (C.key != null && m.has(C.key)) {
669
- const j = w.get(C.key);
668
+ const j = v.get(C.key);
670
669
  E = Y(
671
670
  m.get(C.key),
672
671
  j,
@@ -677,62 +676,62 @@ function Ze(e, t, r, n, o) {
677
676
  E = P(C, n), e.insertBefore(E, _), $.add(E);
678
677
  _ = E.nextSibling;
679
678
  }
680
- for (const C of d)
679
+ for (const C of u)
681
680
  !$.has(C) && e.contains(C) && e.removeChild(C);
682
681
  } else {
683
- const w = Math.min(
682
+ const v = Math.min(
684
683
  b.length,
685
- g.length
684
+ h.length
686
685
  );
687
- for (let m = 0; m < w; m++) {
688
- const $ = b[m], _ = g[m], C = Y(d[m], $, _, n);
689
- C !== d[m] && (e.insertBefore(C, d[m]), e.removeChild(d[m]));
686
+ for (let m = 0; m < v; m++) {
687
+ const $ = b[m], _ = h[m], C = Y(u[m], $, _, n);
688
+ C !== u[m] && (e.insertBefore(C, u[m]), e.removeChild(u[m]));
690
689
  }
691
- for (let m = w; m < g.length; m++)
692
- e.insertBefore(P(g[m], n), x);
693
- for (let m = w; m < d.length; m++)
694
- e.removeChild(d[m]);
690
+ for (let m = v; m < h.length; m++)
691
+ e.insertBefore(P(h[m], n), x);
692
+ for (let m = v; m < u.length; m++)
693
+ e.removeChild(u[m]);
695
694
  }
696
695
  }
697
- for (const v of r) {
696
+ for (const w of r) {
698
697
  let x;
699
- if (v.tag === "#anchor") {
700
- const k = v.key, g = `${k}:start`, d = `${k}:end`;
701
- let y = l.get(g), b = l.get(d);
702
- const p = Array.isArray(v.children) ? v.children : [];
703
- if (y || (y = document.createTextNode(""), y.key = g), b || (b = document.createTextNode(""), b.key = d), v._startNode = y, v._endNode = b, !e.contains(y) || !e.contains(b)) {
704
- e.insertBefore(y, u);
705
- for (const w of p)
706
- e.insertBefore(P(w, n), u);
707
- e.insertBefore(b, u);
698
+ if (w.tag === "#anchor") {
699
+ const k = w.key, h = `${k}:start`, u = `${k}:end`;
700
+ let g = c.get(h), b = c.get(u);
701
+ const d = Array.isArray(w.children) ? w.children : [];
702
+ if (g || (g = document.createTextNode(""), g.key = h), b || (b = document.createTextNode(""), b.key = u), w._startNode = g, w._endNode = b, !e.contains(g) || !e.contains(b)) {
703
+ e.insertBefore(g, p);
704
+ for (const v of d)
705
+ e.insertBefore(P(v, n), p);
706
+ e.insertBefore(b, p);
708
707
  } else
709
- c(
710
- y,
708
+ l(
709
+ g,
711
710
  b,
712
711
  a.get(k)?.children,
713
- p
712
+ d
714
713
  );
715
- h(y, b), u = b.nextSibling;
714
+ y(g, b), p = b.nextSibling;
716
715
  continue;
717
716
  }
718
- if (v.key != null && l.has(v.key)) {
719
- const k = a.get(v.key);
717
+ if (w.key != null && c.has(w.key)) {
718
+ const k = a.get(w.key);
720
719
  x = Y(
721
- l.get(v.key),
720
+ c.get(w.key),
722
721
  k,
723
- v,
722
+ w,
724
723
  n,
725
724
  o
726
- ), f.add(x), x !== u && e.contains(x) && (u && !e.contains(u) && (u = null), e.insertBefore(x, u));
725
+ ), f.add(x), x !== p && e.contains(x) && (p && !e.contains(p) && (p = null), e.insertBefore(x, p));
727
726
  } else
728
- x = P(v, n, o), u && !e.contains(u) && (u = null), e.insertBefore(x, u), f.add(x);
729
- u = x.nextSibling;
727
+ x = P(w, n, o), p && !e.contains(p) && (p = null), e.insertBefore(x, p), f.add(x);
728
+ p = x.nextSibling;
730
729
  }
731
- for (const v of s)
732
- !f.has(v) && e.contains(v) && (D(v, o), e.removeChild(v));
730
+ for (const w of s)
731
+ !f.has(w) && e.contains(w) && (q(w, o), e.removeChild(w));
733
732
  }
734
733
  function Y(e, t, r, n, o) {
735
- if (t && typeof t != "string" && t.props?.ref && o && D(e, o), t === r) return e;
734
+ if (t && typeof t != "string" && t.props?.ref && o && q(e, o), t === r) return e;
736
735
  if (typeof r == "string") {
737
736
  if (e.nodeType === Node.TEXT_NODE)
738
737
  return e.textContent !== r && (e.textContent = r), e;
@@ -742,44 +741,44 @@ function Y(e, t, r, n, o) {
742
741
  }
743
742
  }
744
743
  if (r && typeof r != "string" && r.tag === "#anchor") {
745
- const i = r, a = Array.isArray(i.children) ? i.children : [], l = i._startNode ?? document.createTextNode(""), f = i._endNode ?? document.createTextNode("");
746
- i.key != null && (l.key = `${i.key}:start`, f.key = `${i.key}:end`), i._startNode = l, i._endNode = f;
747
- const u = document.createDocumentFragment();
748
- u.appendChild(l);
749
- for (const h of a) {
750
- const c = P(h, n);
751
- u.appendChild(c);
744
+ const i = r, a = Array.isArray(i.children) ? i.children : [], c = i._startNode ?? document.createTextNode(""), f = i._endNode ?? document.createTextNode("");
745
+ i.key != null && (c.key = `${i.key}:start`, f.key = `${i.key}:end`), i._startNode = c, i._endNode = f;
746
+ const p = document.createDocumentFragment();
747
+ p.appendChild(c);
748
+ for (const y of a) {
749
+ const l = P(y, n);
750
+ p.appendChild(l);
752
751
  }
753
- return u.appendChild(f), e.parentNode?.replaceChild(u, e), l;
752
+ return p.appendChild(f), e.parentNode?.replaceChild(p, e), c;
754
753
  }
755
754
  if (!r) {
756
- D(e, o);
755
+ q(e, o);
757
756
  const i = document.createComment("removed");
758
757
  return e.parentNode?.replaceChild(i, e), i;
759
758
  }
760
759
  if (!t || typeof t == "string") {
761
- D(e, o);
760
+ q(e, o);
762
761
  const i = P(r, n, o);
763
762
  return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), e.parentNode?.replaceChild(i, e), i;
764
763
  }
765
764
  if (r.tag === "#anchor") {
766
- const i = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), l = r._endNode ?? document.createTextNode("");
767
- r.key != null && (a.key = `${r.key}:start`, l.key = `${r.key}:end`), r._startNode = a, r._endNode = l;
765
+ const i = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), c = r._endNode ?? document.createTextNode("");
766
+ r.key != null && (a.key = `${r.key}:start`, c.key = `${r.key}:end`), r._startNode = a, r._endNode = c;
768
767
  const f = document.createDocumentFragment();
769
768
  f.appendChild(a);
770
- for (const u of i)
771
- f.appendChild(P(u, n));
772
- return f.appendChild(l), e.parentNode?.replaceChild(f, e), a;
769
+ for (const p of i)
770
+ f.appendChild(P(p, n));
771
+ return f.appendChild(c), e.parentNode?.replaceChild(f, e), a;
773
772
  }
774
773
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
775
774
  const i = e;
776
- return Je(i, t.props || {}, r.props || {}, n), Ze(i, t.children, r.children, n, o), typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), i;
775
+ return Ue(i, t.props || {}, r.props || {}, n), Ve(i, t.children, r.children, n, o), typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = i), i;
777
776
  }
778
- D(e, o);
777
+ q(e, o);
779
778
  const s = P(r, n, o);
780
779
  return typeof r != "string" && r.props?.ref && o && (o[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
781
780
  }
782
- function Xe(e, t, r, n) {
781
+ function Je(e, t, r, n) {
783
782
  let o;
784
783
  Array.isArray(t) ? t.length === 1 ? (o = t[0], o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })) : o = { tag: "div", key: "__root__", children: t } : (o = t, o && typeof o == "object" && o.key == null && (o = { ...o, key: "__root__" })), o && typeof o == "object" && o.tag === "#anchor" && (o = {
785
784
  tag: "div",
@@ -790,30 +789,30 @@ function Xe(e, t, r, n) {
790
789
  const s = e._prevVNode ?? null, i = e._prevDom ?? e.firstChild ?? null;
791
790
  let a;
792
791
  s && i ? typeof s != "string" && typeof o != "string" && s.tag === o.tag && s.key === o.key ? a = Y(i, s, o, r, n) : (a = P(o, r, n), e.replaceChild(a, i)) : (a = P(o, r, n), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
793
- const l = [];
792
+ const c = [];
794
793
  for (let f = 0; f < e.childNodes.length; f++) {
795
- const u = e.childNodes[f];
796
- u !== a && u.nodeName !== "STYLE" && (D(u, n), l.push(u));
794
+ const p = e.childNodes[f];
795
+ p !== a && p.nodeName !== "STYLE" && (q(p, n), c.push(p));
797
796
  }
798
- l.forEach((f) => e.removeChild(f)), e._prevVNode = o, e._prevDom = a;
797
+ c.forEach((f) => e.removeChild(f)), e._prevVNode = o, e._prevDom = a;
799
798
  }
800
- function Le(e, ...t) {
799
+ function je(e, ...t) {
801
800
  let r = "";
802
801
  for (let n = 0; n < e.length; n++)
803
802
  r += e[n], n < t.length && (r += t[n]);
804
803
  return r;
805
804
  }
806
- function ze(e) {
805
+ function Le(e) {
807
806
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
808
807
  }
809
- let X = null;
808
+ let Q = null;
810
809
  function ke() {
811
- return X || (X = new CSSStyleSheet(), X.replaceSync(ze(Ye))), X;
810
+ return Q || (Q = new CSSStyleSheet(), Q.replaceSync(Le(Qe))), Q;
812
811
  }
813
- function Qe(e) {
812
+ function Ze(e) {
814
813
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
815
814
  }
816
- const Ye = Le`
815
+ const Qe = je`
817
816
  :host, *, ::before, ::after {
818
817
  all: isolate;
819
818
  box-sizing: border-box;
@@ -871,7 +870,7 @@ const Ye = Le`
871
870
  sup { top: -.5em }
872
871
  [disabled], [aria-disabled=true] { cursor: not-allowed }
873
872
  [hidden] { display: none }
874
- `, Ge = {
873
+ `, Xe = {
875
874
  gray: {
876
875
  50: "var(--color-gray-50, #f9fafb)",
877
876
  100: "var(--color-gray-100, #f3f4f6)",
@@ -1187,7 +1186,7 @@ const Ye = Le`
1187
1186
  "z-30": "z-index:30;",
1188
1187
  "z-40": "z-index:40;",
1189
1188
  "z-50": "z-index:50;"
1190
- }, et = "0.25rem", $e = {
1189
+ }, Ye = "0.25rem", $e = {
1191
1190
  m: ["margin"],
1192
1191
  mx: ["margin-inline"],
1193
1192
  my: ["margin-block"],
@@ -1232,7 +1231,7 @@ function R(e, t) {
1232
1231
  }
1233
1232
  return e + t;
1234
1233
  }
1235
- const tt = {
1234
+ const Ge = {
1236
1235
  before: (e, t) => `${e}::before{${t}}`,
1237
1236
  after: (e, t) => `${e}::after{${t}}`,
1238
1237
  hover: (e, t) => `${R(e, ":hover")}{${t}}`,
@@ -1264,23 +1263,23 @@ const tt = {
1264
1263
  "2xl": "(min-width:1536px)",
1265
1264
  // Dark mode (now plain string)
1266
1265
  dark: "(prefers-color-scheme: dark)"
1267
- }, ce = ["sm", "md", "lg", "xl", "2xl"];
1268
- function le(e) {
1266
+ }, le = ["sm", "md", "lg", "xl", "2xl"];
1267
+ function ce(e) {
1269
1268
  const t = e.startsWith("-"), n = (t ? e.slice(1) : e).split("-");
1270
1269
  if (n.length < 2) return null;
1271
1270
  const o = n.slice(0, -1).join("-"), s = n[n.length - 1], i = parseFloat(s);
1272
1271
  if (Number.isNaN(i) || !$e[o]) return null;
1273
1272
  const a = t ? "-" : "";
1274
- return $e[o].map((l) => `${l}:calc(${a}${et} * ${i});`).join("");
1273
+ return $e[o].map((c) => `${c}:calc(${a}${Ye} * ${i});`).join("");
1275
1274
  }
1276
1275
  function Se(e) {
1277
1276
  const t = e.replace("#", ""), r = parseInt(t, 16), n = r >> 16 & 255, o = r >> 8 & 255, s = r & 255;
1278
1277
  return `${n} ${o} ${s}`;
1279
1278
  }
1280
- function rt(e) {
1279
+ function et(e) {
1281
1280
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
1282
1281
  if (!t) return null;
1283
- const [, r, n, o = "DEFAULT"] = t, s = Ge[n]?.[o];
1282
+ const [, r, n, o = "DEFAULT"] = t, s = Xe[n]?.[o];
1284
1283
  return s ? `${{
1285
1284
  bg: "background-color",
1286
1285
  decoration: "text-decoration-color",
@@ -1295,14 +1294,14 @@ function rt(e) {
1295
1294
  stroke: "stroke-color"
1296
1295
  }[r]}:${s};` : null;
1297
1296
  }
1298
- function nt(e) {
1297
+ function tt(e) {
1299
1298
  const [t, r] = e.split("/");
1300
1299
  if (!r) return { base: t };
1301
1300
  const n = parseInt(r, 10);
1302
1301
  return isNaN(n) || n < 0 || n > 100 ? { base: t } : { base: t, opacity: n / 100 };
1303
1302
  }
1304
1303
  function fe(e) {
1305
- const { base: t, opacity: r } = nt(e), n = rt(t);
1304
+ const { base: t, opacity: r } = tt(e), n = et(t);
1306
1305
  if (n) {
1307
1306
  if (r !== void 0) {
1308
1307
  const s = /#([0-9a-f]{6})/i.exec(n);
@@ -1391,7 +1390,7 @@ function G(e) {
1391
1390
  }
1392
1391
  return null;
1393
1392
  }
1394
- function ot(e) {
1393
+ function rt(e) {
1395
1394
  if (e.startsWith("[") && e.endsWith("]")) {
1396
1395
  const r = e.slice(1, -1);
1397
1396
  return r.includes("&") ? r : e;
@@ -1403,10 +1402,10 @@ function ot(e) {
1403
1402
  }
1404
1403
  return null;
1405
1404
  }
1406
- function it(e) {
1405
+ function nt(e) {
1407
1406
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
1408
1407
  }
1409
- function st(e) {
1408
+ function ot(e) {
1410
1409
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
1411
1410
  let n;
1412
1411
  for (; n = t.exec(e); ) {
@@ -1415,32 +1414,32 @@ function st(e) {
1415
1414
  }
1416
1415
  return r.filter(Boolean);
1417
1416
  }
1418
- const _e = /* @__PURE__ */ new Map(), at = 16;
1419
- function ct(e) {
1417
+ const _e = /* @__PURE__ */ new Map(), it = 16;
1418
+ function st(e) {
1420
1419
  const t = Date.now(), r = _e.get(e);
1421
- if (r && t - r.timestamp < at) return r.css;
1422
- const n = st(e), o = new Set(n), s = [], i = [], a = [], l = [], f = {};
1423
- function u(g, d = !1) {
1424
- const y = (d ? "dark|" : "") + g;
1425
- if (y in f) return f[y];
1426
- const b = x(g, d);
1427
- return f[y] = b, b;
1428
- }
1429
- function h(g) {
1430
- const d = g.some((b) => ce.includes(b)), y = g.includes("dark");
1431
- return g.length === 0 ? 1 : !d && !y ? 2 : d && !y ? 3 : 4;
1432
- }
1433
- function c(g) {
1434
- const d = [];
1435
- let y = "", b = 0, p = 0;
1436
- for (let w = 0; w < g.length; w++) {
1437
- const m = g[w];
1438
- m === "[" ? b++ : m === "]" && b > 0 ? b-- : m === "(" ? p++ : m === ")" && p > 0 && p--, m === ":" && b === 0 && p === 0 ? (d.push(y), y = "") : y += m;
1420
+ if (r && t - r.timestamp < it) return r.css;
1421
+ const n = ot(e), o = new Set(n), s = [], i = [], a = [], c = [], f = {};
1422
+ function p(h, u = !1) {
1423
+ const g = (u ? "dark|" : "") + h;
1424
+ if (g in f) return f[g];
1425
+ const b = x(h, u);
1426
+ return f[g] = b, b;
1427
+ }
1428
+ function y(h) {
1429
+ const u = h.some((b) => le.includes(b)), g = h.includes("dark");
1430
+ return h.length === 0 ? 1 : !u && !g ? 2 : u && !g ? 3 : 4;
1431
+ }
1432
+ function l(h) {
1433
+ const u = [];
1434
+ let g = "", b = 0, d = 0;
1435
+ for (let v = 0; v < h.length; v++) {
1436
+ const m = h[v];
1437
+ m === "[" ? b++ : m === "]" && b > 0 ? b-- : m === "(" ? d++ : m === ")" && d > 0 && d--, m === ":" && b === 0 && d === 0 ? (u.push(g), g = "") : g += m;
1439
1438
  }
1440
- return y && d.push(y), d;
1439
+ return g && u.push(g), u;
1441
1440
  }
1442
- function v(g) {
1443
- switch (g) {
1441
+ function w(h) {
1442
+ switch (h) {
1444
1443
  case "hover":
1445
1444
  return ":hover";
1446
1445
  case "focus":
@@ -1469,41 +1468,41 @@ function ct(e) {
1469
1468
  return null;
1470
1469
  }
1471
1470
  }
1472
- function x(g, d = !1) {
1473
- const y = c(g);
1474
- (g.includes("mask-image") || g.includes("sm: hover") || g.includes("sm:hover") || g.includes("mask.svg")) && console.error("DEBUG generateRule:", g, y);
1475
- let b = !1, p = y.find((S) => (S.startsWith("!") && (b = !0, S = S.slice(1)), se[S] || le(S) || ue(S) || fe(S) || G(S)));
1476
- if (!p) return null;
1477
- const w = p.replace(/^!/, ""), m = se[w] ?? le(w) ?? ue(w) ?? fe(w) ?? G(w);
1471
+ function x(h, u = !1) {
1472
+ const g = l(h);
1473
+ (h.includes("mask-image") || h.includes("sm: hover") || h.includes("sm:hover") || h.includes("mask.svg")) && console.error("DEBUG generateRule:", h, g);
1474
+ let b = !1, d = g.find((S) => (S.startsWith("!") && (b = !0, S = S.slice(1)), se[S] || ce(S) || ue(S) || fe(S) || G(S)));
1475
+ if (!d) return null;
1476
+ const v = d.replace(/^!/, ""), m = se[v] ?? ce(v) ?? ue(v) ?? fe(v) ?? G(v);
1478
1477
  if (!m) return null;
1479
- const $ = y.indexOf(p);
1480
- let _ = $ >= 0 ? y.slice(0, $) : [];
1481
- d && (_ = _.filter((S) => S !== "dark"));
1482
- const C = `.${it(g)}`, E = "__SUBJECT__", j = b ? m.replace(/;$/, " !important;") : m;
1478
+ const $ = g.indexOf(d);
1479
+ let _ = $ >= 0 ? g.slice(0, $) : [];
1480
+ u && (_ = _.filter((S) => S !== "dark"));
1481
+ const C = `.${nt(h)}`, E = "__SUBJECT__", j = b ? m.replace(/;$/, " !important;") : m;
1483
1482
  let A = E;
1484
1483
  const re = [];
1485
1484
  for (const S of _)
1486
1485
  S.startsWith("group-") ? (A = `.group:${S.slice(6)} ${A}`, re.push(S)) : S.startsWith("peer-") && (A = A.replace(E, `.peer:${S.slice(5)}~${E}`), re.push(S));
1487
1486
  _ = _.filter((S) => !re.includes(S));
1488
1487
  const ne = [], be = [];
1489
- let N = null;
1488
+ let W = null;
1490
1489
  for (const S of _) {
1491
- if (S === "dark" || ce.includes(S)) continue;
1492
- const H = ot(S);
1493
- if (H) {
1494
- N = H;
1490
+ if (S === "dark" || le.includes(S)) continue;
1491
+ const M = rt(S);
1492
+ if (M) {
1493
+ W = M;
1495
1494
  continue;
1496
1495
  }
1497
- const L = v(S);
1496
+ const L = w(S);
1498
1497
  if (L) {
1499
- N ? be.push(L) : ne.push(L);
1498
+ W ? be.push(L) : ne.push(L);
1500
1499
  continue;
1501
1500
  }
1502
- const B = tt[S];
1501
+ const B = Ge[S];
1503
1502
  typeof B == "function" && (A = B(A, j).split("{")[0]);
1504
1503
  }
1505
- function Be(S, H) {
1506
- if (!H) return S;
1504
+ function ze(S, M) {
1505
+ if (!M) return S;
1507
1506
  let L = 0, B = 0;
1508
1507
  if (S.length && (S[0] === ">" || S[0] === "+" || S[0] === "~" || S[0] === " ")) {
1509
1508
  let T = 1;
@@ -1511,55 +1510,55 @@ function ct(e) {
1511
1510
  for (; T < S.length; T++) {
1512
1511
  const z = S[T];
1513
1512
  if (z === "[" ? L++ : z === "]" && L > 0 ? L-- : z === "(" ? B++ : z === ")" && B > 0 && B--, L === 0 && B === 0 && (S[T] === ">" || S[T] === "+" || S[T] === "~" || S[T] === " "))
1514
- return S.slice(0, T) + H + S.slice(T);
1513
+ return S.slice(0, T) + M + S.slice(T);
1515
1514
  }
1516
- return S + H;
1515
+ return S + M;
1517
1516
  }
1518
1517
  for (let T = 0; T < S.length; T++) {
1519
1518
  const z = S[T];
1520
1519
  if (z === "[" ? L++ : z === "]" && L > 0 ? L-- : z === "(" ? B++ : z === ")" && B > 0 && B--, L === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
1521
- return S.slice(0, T) + H + S.slice(T);
1520
+ return S.slice(0, T) + M + S.slice(T);
1522
1521
  }
1523
- return S + H;
1522
+ return S + M;
1524
1523
  }
1525
- const oe = ne.join(""), K = be.join("");
1526
- if (N)
1527
- if (N.includes("&")) {
1528
- const S = N.indexOf("&"), H = N.slice(0, S), L = N.slice(S + 1), B = E + oe, T = A;
1524
+ const oe = ne.join(""), U = be.join("");
1525
+ if (W)
1526
+ if (W.includes("&")) {
1527
+ const S = W.indexOf("&"), M = W.slice(0, S), L = W.slice(S + 1), B = E + oe, T = A;
1529
1528
  if (ne.length === 0)
1530
- A = T.replace(E, H + B + K + L);
1529
+ A = T.replace(E, M + B + U + L);
1531
1530
  else {
1532
- const z = Be(L, K);
1533
- A = T.replace(E, H + B + z);
1531
+ const z = ze(L, U);
1532
+ A = T.replace(E, M + B + z);
1534
1533
  }
1535
1534
  } else
1536
- A = A.replace(E, `${N}${E + oe}`), K && (A = A.replace(E, `${E}${K}`));
1535
+ A = A.replace(E, `${W}${E + oe}`), U && (A = A.replace(E, `${E}${U}`));
1537
1536
  else
1538
- A = E + oe + K;
1537
+ A = E + oe + U;
1539
1538
  A = A.replace(new RegExp(E, "g"), C);
1540
1539
  let O = `${A}{${j}}`;
1541
- const ie = _.filter((S) => ce.includes(S)), I = ie.length ? ie[ie.length - 1] : null, ve = _.includes("dark");
1542
- return d && I ? O = `@media (prefers-color-scheme: dark) and ${ae[I]}{${O}}` : d ? O = `@media (prefers-color-scheme: dark){${O}}` : ve && I ? O = `@media (prefers-color-scheme: dark) and ${ae[I]}{${O}}` : ve ? O = `@media (prefers-color-scheme: dark){${O}}` : I && (O = `@media ${ae[I]}{${O}}`), O;
1540
+ const ie = _.filter((S) => le.includes(S)), H = ie.length ? ie[ie.length - 1] : null, ve = _.includes("dark");
1541
+ return u && H ? O = `@media (prefers-color-scheme: dark) and ${ae[H]}{${O}}` : u ? O = `@media (prefers-color-scheme: dark){${O}}` : ve && H ? O = `@media (prefers-color-scheme: dark) and ${ae[H]}{${O}}` : ve ? O = `@media (prefers-color-scheme: dark){${O}}` : H && (O = `@media ${ae[H]}{${O}}`), O;
1543
1542
  }
1544
- for (const g of o) {
1545
- const d = c(g), y = d.find(
1546
- (m) => se[m] || le(m) || ue(m) || fe(m) || G(m)
1543
+ for (const h of o) {
1544
+ const u = l(h), g = u.find(
1545
+ (m) => se[m] || ce(m) || ue(m) || fe(m) || G(m)
1547
1546
  );
1548
- if (!y) continue;
1549
- const b = d.indexOf(y), p = b >= 0 ? d.slice(0, b) : [], w = h(p);
1550
- if (w === 4) {
1551
- const m = u(g, !0);
1552
- m && l.push(m);
1547
+ if (!g) continue;
1548
+ const b = u.indexOf(g), d = b >= 0 ? u.slice(0, b) : [], v = y(d);
1549
+ if (v === 4) {
1550
+ const m = p(h, !0);
1551
+ m && c.push(m);
1553
1552
  } else {
1554
- const m = u(g);
1555
- m && (w === 1 ? s.push(m) : w === 2 ? i.push(m) : w === 3 && a.push(m));
1553
+ const m = p(h);
1554
+ m && (v === 1 ? s.push(m) : v === 2 ? i.push(m) : v === 3 && a.push(m));
1556
1555
  }
1557
1556
  }
1558
- const k = [...s, ...i, ...a, ...l].join("");
1557
+ const k = [...s, ...i, ...a, ...c].join("");
1559
1558
  return _e.set(e, { css: k, timestamp: t }), k;
1560
1559
  }
1561
1560
  const J = [];
1562
- function lt(e, t, r, n, o, s, i, a) {
1561
+ function at(e, t, r, n, o, s, i, a) {
1563
1562
  if (e) {
1564
1563
  J.push(r);
1565
1564
  try {
@@ -1571,30 +1570,30 @@ function lt(e, t, r, n, o, s, i, a) {
1571
1570
  r.error instanceof Error && F(e, t.errorTemplate(r.error, r), r, n, o);
1572
1571
  return;
1573
1572
  }
1574
- const l = t.render(r);
1575
- if (l instanceof Promise) {
1576
- s(!0), l.then((f) => {
1573
+ const c = t.render(r);
1574
+ if (c instanceof Promise) {
1575
+ s(!0), c.then((f) => {
1577
1576
  s(!1), i(null), F(e, f, r, n, o), a(e.innerHTML);
1578
1577
  }).catch((f) => {
1579
1578
  s(!1), i(f), t.errorTemplate && F(e, t.errorTemplate(f, r), r, n, o);
1580
1579
  }), t.loadingTemplate && F(e, t.loadingTemplate(r), r, n, o);
1581
1580
  return;
1582
1581
  }
1583
- F(e, l, r, n, o), a(e.innerHTML);
1582
+ F(e, c, r, n, o), a(e.innerHTML);
1584
1583
  } finally {
1585
1584
  J.pop();
1586
1585
  }
1587
1586
  }
1588
1587
  }
1589
1588
  function F(e, t, r, n, o) {
1590
- e && (Xe(
1589
+ e && (Je(
1591
1590
  e,
1592
1591
  Array.isArray(t) ? t : [t],
1593
1592
  r,
1594
1593
  n
1595
1594
  ), o(e.innerHTML));
1596
1595
  }
1597
- function ft(e, t, r, n, o, s, i) {
1596
+ function lt(e, t, r, n, o, s, i) {
1598
1597
  if (s !== null && clearTimeout(s), Date.now() - t < 16) {
1599
1598
  if (o(r + 1), r > 10) {
1600
1599
  console.warn("Potential infinite render loop detected. Skipping render."), i(null);
@@ -1602,29 +1601,29 @@ function ft(e, t, r, n, o, s, i) {
1602
1601
  }
1603
1602
  } else
1604
1603
  o(0);
1605
- const l = setTimeout(() => {
1604
+ const c = setTimeout(() => {
1606
1605
  n(Date.now()), e(), i(null);
1607
1606
  }, 0);
1608
- i(l);
1607
+ i(c);
1609
1608
  }
1610
- function ut(e, t, r, n, o, s) {
1609
+ function ct(e, t, r, n, o, s) {
1611
1610
  if (!e) return;
1612
- const i = ct(n);
1611
+ const i = st(n);
1613
1612
  if (!t.style && (!i || i.trim() === "")) {
1614
1613
  s(null), e.adoptedStyleSheets = [ke()];
1615
1614
  return;
1616
1615
  }
1617
1616
  let a = "";
1618
1617
  t.style && (typeof t.style == "string" ? a = t.style : typeof t.style == "function" && (a = t.style(r)));
1619
- let l = Qe(`${a}
1618
+ let c = Ze(`${a}
1620
1619
  ${i}
1621
1620
  `);
1622
- l = ze(l);
1621
+ c = Le(c);
1623
1622
  let f = o;
1624
- f || (f = new CSSStyleSheet()), (f.cssRules.length === 0 || f.toString() !== l) && f.replaceSync(l), e.adoptedStyleSheets = [ke(), f], s(f);
1623
+ f || (f = new CSSStyleSheet()), (f.cssRules.length === 0 || f.toString() !== c) && f.replaceSync(c), e.adoptedStyleSheets = [ke(), f], s(f);
1625
1624
  }
1626
- const ye = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new WeakSet();
1627
- function Ee(e, t, r) {
1625
+ const ye = /* @__PURE__ */ new Map();
1626
+ function Ce(e, t, r) {
1628
1627
  let n = me(e);
1629
1628
  n.includes("-") || (n = `cer-${n}`);
1630
1629
  let o;
@@ -1632,7 +1631,7 @@ function Ee(e, t, r) {
1632
1631
  console.error(`[${n}] Error:`, s, i);
1633
1632
  }), ye.set(n, o), typeof window < "u")
1634
1633
  if (!customElements.get(n))
1635
- customElements.define(n, dt(n, o));
1634
+ customElements.define(n, ft(n, o));
1636
1635
  else
1637
1636
  try {
1638
1637
  document.querySelectorAll(n).forEach((s) => {
@@ -1644,7 +1643,7 @@ function Ee(e, t, r) {
1644
1643
  } catch {
1645
1644
  }
1646
1645
  }
1647
- function dt(e, t) {
1646
+ function ft(e, t) {
1648
1647
  if (!t.render)
1649
1648
  throw new Error(
1650
1649
  "Component must have a render function"
@@ -1701,40 +1700,23 @@ function dt(e, t) {
1701
1700
  enumerable: !1,
1702
1701
  configurable: !1
1703
1702
  }), this.context = r, this._applyProps(t), Object.defineProperty(this.context, "emit", {
1704
- value: (i, a, l) => {
1705
- const f = new CustomEvent(i, {
1706
- detail: a,
1703
+ value: (o, s, i) => {
1704
+ const a = new CustomEvent(o, {
1705
+ detail: s,
1707
1706
  bubbles: !0,
1708
1707
  composed: !0,
1709
- ...l || {}
1708
+ ...i || {}
1710
1709
  });
1711
- if (this.dispatchEvent(f), Ce.has(f)) return;
1712
- const u = `onHost${i.charAt(0).toUpperCase()}${i.slice(1)}`, h = typeof this[u] == "function" ? this[u] : void 0, c = typeof this.context[u] == "function" ? this.context[u] : void 0, v = typeof t[u] == "function" ? t[u] : void 0;
1713
- h && h(a, this.context), c && c !== h && c(a, this.context), v && v !== h && v !== c && v(a, this.context);
1710
+ return this.dispatchEvent(a), !a.defaultPrevented;
1714
1711
  },
1715
1712
  writable: !1,
1716
1713
  enumerable: !1,
1717
1714
  configurable: !1
1718
1715
  });
1719
- const n = ye.get(e) || t, o = "onHost", s = (i) => {
1720
- if (!i.startsWith(o)) return null;
1721
- const a = i.slice(o.length);
1722
- return a ? a.charAt(0).toLowerCase() + a.slice(1) : null;
1723
- };
1724
- Object.keys(n).forEach((i) => {
1725
- const a = n[i], l = s(i);
1726
- if (typeof a == "function" && !l) {
1727
- this.context[i] = (...f) => a(...f, this.context);
1728
- return;
1729
- }
1730
- if (l) {
1731
- const f = l;
1732
- this.addEventListener(f, (u) => {
1733
- Ce.add(u);
1734
- const h = typeof this[i] == "function" ? this[i] : void 0, c = typeof this.context[i] == "function" ? this.context[i] : void 0, v = typeof n[i] == "function" ? n[i] : void 0, x = h ?? c ?? v;
1735
- typeof x == "function" && x(u.detail, this.context);
1736
- });
1737
- }
1716
+ const n = ye.get(e) || t;
1717
+ Object.keys(n).forEach((o) => {
1718
+ const s = n[o];
1719
+ typeof s == "function" && (this.context[o] = (...i) => s(...i, this.context));
1738
1720
  }), this._applyComputed(n), this._initializing = !1, this._initWatchers(n), this._render(n);
1739
1721
  }
1740
1722
  connectedCallback() {
@@ -1803,7 +1785,7 @@ function dt(e, t) {
1803
1785
  // --- Render ---
1804
1786
  _render(r) {
1805
1787
  this._runLogicWithinErrorBoundary(r, () => {
1806
- lt(
1788
+ at(
1807
1789
  this.shadowRoot,
1808
1790
  r,
1809
1791
  this.context,
@@ -1826,7 +1808,7 @@ function dt(e, t) {
1826
1808
  }
1827
1809
  _requestRender() {
1828
1810
  this._runLogicWithinErrorBoundary(this._cfg, () => {
1829
- ft(
1811
+ lt(
1830
1812
  () => this._render(this._cfg),
1831
1813
  this._lastRenderTime,
1832
1814
  this._renderCount,
@@ -1846,7 +1828,7 @@ function dt(e, t) {
1846
1828
  // --- Style ---
1847
1829
  _applyStyle(r, n) {
1848
1830
  this._runLogicWithinErrorBoundary(r, () => {
1849
- ut(
1831
+ ct(
1850
1832
  this.shadowRoot,
1851
1833
  r,
1852
1834
  this.context,
@@ -1875,9 +1857,9 @@ function dt(e, t) {
1875
1857
  try {
1876
1858
  let n = function(s, i = "") {
1877
1859
  return Array.isArray(s) ? new Proxy(s, {
1878
- get(a, l, f) {
1879
- const u = Reflect.get(a, l, f);
1880
- return typeof u == "function" && typeof l == "string" && [
1860
+ get(a, c, f) {
1861
+ const p = Reflect.get(a, c, f);
1862
+ return typeof p == "function" && typeof c == "string" && [
1881
1863
  "push",
1882
1864
  "pop",
1883
1865
  "shift",
@@ -1885,42 +1867,42 @@ function dt(e, t) {
1885
1867
  "splice",
1886
1868
  "sort",
1887
1869
  "reverse"
1888
- ].includes(l) ? function(...c) {
1889
- const v = u.apply(a, c);
1870
+ ].includes(c) ? function(...l) {
1871
+ const w = p.apply(a, l);
1890
1872
  if (!o._initializing) {
1891
1873
  const x = i || "root";
1892
1874
  o._triggerWatchers(x, a), o._render(r);
1893
1875
  }
1894
- return v;
1895
- } : u;
1876
+ return w;
1877
+ } : p;
1896
1878
  },
1897
- set(a, l, f) {
1898
- if (a[l] = f, !o._initializing) {
1899
- const u = i ? `${i}.${String(l)}` : String(l);
1900
- o._triggerWatchers(u, f), o._render(r);
1879
+ set(a, c, f) {
1880
+ if (a[c] = f, !o._initializing) {
1881
+ const p = i ? `${i}.${String(c)}` : String(c);
1882
+ o._triggerWatchers(p, f), o._render(r);
1901
1883
  }
1902
1884
  return !0;
1903
1885
  },
1904
- deleteProperty(a, l) {
1905
- if (delete a[l], !o._initializing) {
1906
- const f = i ? `${i}.${String(l)}` : String(l);
1886
+ deleteProperty(a, c) {
1887
+ if (delete a[c], !o._initializing) {
1888
+ const f = i ? `${i}.${String(c)}` : String(c);
1907
1889
  o._triggerWatchers(f, void 0), o._render(r);
1908
1890
  }
1909
1891
  return !0;
1910
1892
  }
1911
1893
  }) : s && typeof s == "object" ? (Object.keys(s).forEach((a) => {
1912
- const l = i ? `${i}.${a}` : a;
1913
- s[a] = n(s[a], l);
1894
+ const c = i ? `${i}.${a}` : a;
1895
+ s[a] = n(s[a], c);
1914
1896
  }), new Proxy(s, {
1915
- set(a, l, f) {
1916
- const u = i ? `${i}.${String(l)}` : String(l);
1917
- return a[l] = n(f, u), o._initializing || (o._triggerWatchers(
1918
- u,
1919
- a[l]
1897
+ set(a, c, f) {
1898
+ const p = i ? `${i}.${String(c)}` : String(c);
1899
+ return a[c] = n(f, p), o._initializing || (o._triggerWatchers(
1900
+ p,
1901
+ a[c]
1920
1902
  ), o._render(r)), !0;
1921
1903
  },
1922
- get(a, l, f) {
1923
- return Reflect.get(a, l, f);
1904
+ get(a, c, f) {
1905
+ return Reflect.get(a, c, f);
1924
1906
  }
1925
1907
  })) : s;
1926
1908
  };
@@ -1932,7 +1914,7 @@ function dt(e, t) {
1932
1914
  }
1933
1915
  _initWatchers(r) {
1934
1916
  this._runLogicWithinErrorBoundary(r, () => {
1935
- Oe(
1917
+ Pe(
1936
1918
  this.context,
1937
1919
  this._watchers,
1938
1920
  r.watch || {}
@@ -1940,7 +1922,7 @@ function dt(e, t) {
1940
1922
  });
1941
1923
  }
1942
1924
  _triggerWatchers(r, n) {
1943
- He(this.context, this._watchers, r, n);
1925
+ Oe(this.context, this._watchers, r, n);
1944
1926
  }
1945
1927
  _applyProps(r) {
1946
1928
  this._runLogicWithinErrorBoundary(r, () => {
@@ -1960,95 +1942,95 @@ function V(e, t = {}, r, n) {
1960
1942
  function ee(e) {
1961
1943
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
1962
1944
  }
1963
- function Q(e) {
1945
+ function X(e) {
1964
1946
  return typeof e == "object" && e !== null && "tag" in e && !ee(e);
1965
1947
  }
1966
- function pt(e, t) {
1948
+ function ut(e, t) {
1967
1949
  return e.key != null ? e : { ...e, key: t };
1968
1950
  }
1969
- function ht(e, t = [], r = {}) {
1951
+ function dt(e, t = [], r = {}) {
1970
1952
  const n = {}, o = {}, s = {}, i = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
1971
1953
  let a;
1972
1954
  for (; a = i.exec(e); ) {
1973
- const l = a[1], f = a[2], u = (a[4] || a[6]) ?? "", h = u.match(/^{{(\d+)}}$/);
1974
- let c = h ? t[Number(h[1])] ?? null : u;
1975
- h || (c === "true" ? c = !0 : c === "false" ? c = !1 : c === "null" ? c = null : isNaN(Number(c)) || (c = Number(c)));
1976
- const v = ["model", "bind", "show", "class", "style"];
1977
- if (l === ":") {
1955
+ const c = a[1], f = a[2], p = (a[4] || a[6]) ?? "", y = p.match(/^{{(\d+)}}$/);
1956
+ let l = y ? t[Number(y[1])] ?? null : p;
1957
+ y || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
1958
+ const w = ["model", "bind", "show", "class", "style"];
1959
+ if (c === ":") {
1978
1960
  const [x, ...k] = f.split(".");
1979
- if (v.includes(x)) {
1980
- const g = [...k];
1961
+ if (w.includes(x)) {
1962
+ const h = [...k];
1981
1963
  s[x] = {
1982
- value: c,
1983
- modifiers: g
1964
+ value: l,
1965
+ modifiers: h
1984
1966
  };
1985
1967
  } else
1986
- o[f] = c;
1987
- } else if (l === "@") {
1988
- const x = "onHost" + f.charAt(0).toUpperCase() + f.slice(1);
1989
- n[x] = typeof c == "function" ? c : typeof r[c] == "function" ? r[c] : void 0;
1990
- } else f === "ref" ? n.ref = c : o[f] = c;
1968
+ o[f] = l;
1969
+ } else if (c === "@") {
1970
+ const x = "on" + f.charAt(0).toUpperCase() + f.slice(1);
1971
+ n[x] = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
1972
+ } else f === "ref" ? n.ref = l : o[f] = l;
1991
1973
  }
1992
1974
  return { props: n, attrs: o, directives: s };
1993
1975
  }
1994
- function gt(e, t, r) {
1976
+ function pt(e, t, r) {
1995
1977
  const n = J.length > 0 ? J[J.length - 1] : void 0, o = r ?? n;
1996
- function s(p, w) {
1997
- return V("#text", {}, p, w);
1978
+ function s(d, v) {
1979
+ return V("#text", {}, d, v);
1998
1980
  }
1999
1981
  let i = "";
2000
- for (let p = 0; p < e.length; p++)
2001
- i += e[p], p < t.length && (i += `{{${p}}}`);
2002
- const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, l = [];
2003
- let f, u = [], h = null, c = {}, v, x = 0, k = [];
2004
- function g(p) {
2005
- !p || typeof p != "object" || ee(p) || (p.props || p.attrs ? (p.props && (c.props || (c.props = {}), Object.assign(c.props, p.props)), p.attrs && (c.attrs || (c.attrs = {}), Object.keys(p.attrs).forEach((w) => {
2006
- if (w === "style" && c.attrs.style) {
2007
- const m = c.attrs.style.replace(
1982
+ for (let d = 0; d < e.length; d++)
1983
+ i += e[d], d < t.length && (i += `{{${d}}}`);
1984
+ const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, c = [];
1985
+ let f, p = [], y = null, l = {}, w, x = 0, k = [];
1986
+ function h(d) {
1987
+ !d || typeof d != "object" || ee(d) || (d.props || d.attrs ? (d.props && (l.props || (l.props = {}), Object.assign(l.props, d.props)), d.attrs && (l.attrs || (l.attrs = {}), Object.keys(d.attrs).forEach((v) => {
1988
+ if (v === "style" && l.attrs.style) {
1989
+ const m = l.attrs.style.replace(
2008
1990
  /;?\s*$/,
2009
1991
  ""
2010
- ), $ = p.attrs.style.replace(/^;?\s*/, "");
2011
- c.attrs.style = m + "; " + $;
2012
- } else if (w === "class" && c.attrs.class) {
2013
- const m = c.attrs.class.trim().split(/\s+/).filter(Boolean), $ = p.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
1992
+ ), $ = d.attrs.style.replace(/^;?\s*/, "");
1993
+ l.attrs.style = m + "; " + $;
1994
+ } else if (v === "class" && l.attrs.class) {
1995
+ const m = l.attrs.class.trim().split(/\s+/).filter(Boolean), $ = d.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
2014
1996
  .../* @__PURE__ */ new Set([...m, ...$])
2015
1997
  ];
2016
- c.attrs.class = _.join(" ");
1998
+ l.attrs.class = _.join(" ");
2017
1999
  } else
2018
- c.attrs[w] = p.attrs[w];
2019
- }))) : (c.props || (c.props = {}), Object.assign(c.props, p)));
2020
- }
2021
- function d(p, w) {
2022
- const m = h ? u : k;
2023
- if (ee(p)) {
2024
- const $ = p.key ?? w;
2025
- let _ = p.children;
2000
+ l.attrs[v] = d.attrs[v];
2001
+ }))) : (l.props || (l.props = {}), Object.assign(l.props, d)));
2002
+ }
2003
+ function u(d, v) {
2004
+ const m = y ? p : k;
2005
+ if (ee(d)) {
2006
+ const $ = d.key ?? v;
2007
+ let _ = d.children;
2026
2008
  m.push({
2027
- ...p,
2009
+ ...d,
2028
2010
  key: $,
2029
2011
  children: _
2030
2012
  });
2031
2013
  return;
2032
2014
  }
2033
- if (Q(p)) {
2034
- m.push(pt(p, void 0));
2015
+ if (X(d)) {
2016
+ m.push(ut(d, void 0));
2035
2017
  return;
2036
2018
  }
2037
- if (Array.isArray(p)) {
2038
- if (p.length === 0) return;
2039
- for (let $ = 0; $ < p.length; $++) {
2040
- const _ = p[$];
2041
- ee(_) || Q(_) || Array.isArray(_) ? d(_, `${w}-${$}`) : _ !== null && typeof _ == "object" ? g(_) : m.push(s(String(_), `${w}-${$}`));
2019
+ if (Array.isArray(d)) {
2020
+ if (d.length === 0) return;
2021
+ for (let $ = 0; $ < d.length; $++) {
2022
+ const _ = d[$];
2023
+ ee(_) || X(_) || Array.isArray(_) ? u(_, `${v}-${$}`) : _ !== null && typeof _ == "object" ? h(_) : m.push(s(String(_), `${v}-${$}`));
2042
2024
  }
2043
2025
  return;
2044
2026
  }
2045
- if (p !== null && typeof p == "object") {
2046
- g(p);
2027
+ if (d !== null && typeof d == "object") {
2028
+ h(d);
2047
2029
  return;
2048
2030
  }
2049
- m.push(s(String(p), w));
2031
+ m.push(s(String(d), v));
2050
2032
  }
2051
- const y = /* @__PURE__ */ new Set([
2033
+ const g = /* @__PURE__ */ new Set([
2052
2034
  "area",
2053
2035
  "base",
2054
2036
  "br",
@@ -2066,64 +2048,64 @@ function gt(e, t, r) {
2066
2048
  ]);
2067
2049
  for (; f = a.exec(i); )
2068
2050
  if (f[1]) {
2069
- const p = f[1], w = f[0][1] === "/", m = f[0][f[0].length - 2] === "/" || y.has(p), {
2051
+ const d = f[1], v = f[0][1] === "/", m = f[0][f[0].length - 2] === "/" || g.has(d), {
2070
2052
  props: $,
2071
2053
  attrs: _,
2072
2054
  directives: C
2073
- } = ht(f[2] || "", t, o), E = { props: {}, attrs: {} };
2055
+ } = dt(f[2] || "", t, o), E = { props: {}, attrs: {} };
2074
2056
  for (const j in $) E.props[j] = $[j];
2075
2057
  for (const j in _) E.attrs[j] = _[j];
2076
- if (Object.keys(C).length > 0 && (E.directives = { ...C }), w) {
2058
+ if (Object.keys(C).length > 0 && (E.directives = { ...C }), v) {
2077
2059
  const j = V(
2078
- h,
2079
- c,
2080
- u.length === 1 && Q(u[0]) && u[0].tag === "#text" ? typeof u[0].children == "string" ? u[0].children : "" : u.length ? u : void 0,
2081
- v
2082
- ), A = l.pop();
2083
- A ? (h = A.tag, c = A.props, v = A.key, u = A.children, u.push(j)) : (k.push(j), h = null, c = {}, v = void 0, u = []);
2084
- } else m ? h ? u.push(V(p, E, void 0, void 0)) : k.push(V(p, E, void 0, void 0)) : (h && l.push({
2085
- tag: h,
2086
- props: c,
2087
- children: u,
2088
- key: v
2089
- }), h = p, c = E, u = []);
2060
+ y,
2061
+ l,
2062
+ p.length === 1 && X(p[0]) && p[0].tag === "#text" ? typeof p[0].children == "string" ? p[0].children : "" : p.length ? p : void 0,
2063
+ w
2064
+ ), A = c.pop();
2065
+ A ? (y = A.tag, l = A.props, w = A.key, p = A.children, p.push(j)) : (k.push(j), y = null, l = {}, w = void 0, p = []);
2066
+ } else m ? y ? p.push(V(d, E, void 0, void 0)) : k.push(V(d, E, void 0, void 0)) : (y && c.push({
2067
+ tag: y,
2068
+ props: l,
2069
+ children: p,
2070
+ key: w
2071
+ }), y = d, l = E, p = []);
2090
2072
  } else if (typeof f[3] < "u") {
2091
- const p = Number(f[3]), w = t[p], m = `interp-${p}`;
2092
- d(w, m);
2073
+ const d = Number(f[3]), v = t[d], m = `interp-${d}`;
2074
+ u(v, m);
2093
2075
  } else if (f[4]) {
2094
- const p = f[4], w = h ? u : k, m = p.split(/({{\d+}})/);
2076
+ const d = f[4], v = y ? p : k, m = d.split(/({{\d+}})/);
2095
2077
  for (const $ of m) {
2096
2078
  if (!$) continue;
2097
2079
  const _ = $.match(/^{{(\d+)}}$/);
2098
2080
  if (_) {
2099
2081
  const C = Number(_[1]), E = t[C], j = `interp-${C}`;
2100
- d(E, j);
2082
+ u(E, j);
2101
2083
  } else {
2102
2084
  const C = `text-${x++}`;
2103
- w.push(s($, C));
2085
+ v.push(s($, C));
2104
2086
  }
2105
2087
  }
2106
2088
  }
2107
- const b = k.filter((p) => Q(p) && p.tag === "#text" ? typeof p.children == "string" && p.children.trim() !== "" : !0);
2089
+ const b = k.filter((d) => X(d) && d.tag === "#text" ? typeof d.children == "string" && d.children.trim() !== "" : !0);
2108
2090
  return b.length === 1 ? b[0] : b.length > 1 ? b : V("div", {}, "", "fallback-root");
2109
2091
  }
2110
- function W(e, ...t) {
2092
+ function D(e, ...t) {
2111
2093
  const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
2112
- return gt(e, t, n);
2094
+ return pt(e, t, n);
2113
2095
  }
2114
- const Ae = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, M = (e, t) => {
2096
+ const Ee = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, N = (e, t) => {
2115
2097
  for (const r of e) {
2116
2098
  const n = [], o = r.path.replace(/:[^/]+/g, (a) => (n.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${o}$`), i = t.match(s);
2117
2099
  if (i) {
2118
2100
  const a = {};
2119
- return n.forEach((l, f) => {
2120
- a[l] = i[f + 1];
2101
+ return n.forEach((c, f) => {
2102
+ a[c] = i[f + 1];
2121
2103
  }), { route: r, params: a };
2122
2104
  }
2123
2105
  }
2124
2106
  return { route: null, params: {} };
2125
2107
  }, de = {};
2126
- async function yt(e) {
2108
+ async function ht(e) {
2127
2109
  if (e.component) return e.component;
2128
2110
  if (e.load) {
2129
2111
  if (de[e.path]) return de[e.path];
@@ -2136,100 +2118,100 @@ async function yt(e) {
2136
2118
  }
2137
2119
  throw new Error(`No component or loader defined for route: ${e.path}`);
2138
2120
  }
2139
- function mt(e) {
2121
+ function gt(e) {
2140
2122
  const { routes: t, base: r = "", initialUrl: n } = e;
2141
- let o, s, i, a, l, f, u;
2142
- const h = async (k, g) => {
2143
- const d = t.find((y) => M([y], k.path).route !== null);
2144
- if (d?.beforeEnter)
2123
+ let o, s, i, a, c, f, p;
2124
+ const y = async (k, h) => {
2125
+ const u = t.find((g) => N([g], k.path).route !== null);
2126
+ if (u?.beforeEnter)
2145
2127
  try {
2146
- const y = await d.beforeEnter(k, g);
2147
- return typeof y == "string" ? (await x(y, !0), !1) : y !== !1;
2148
- } catch (y) {
2149
- return console.error("beforeEnter error", y), !1;
2128
+ const g = await u.beforeEnter(k, h);
2129
+ return typeof g == "string" ? (await x(g, !0), !1) : g !== !1;
2130
+ } catch (g) {
2131
+ return console.error("beforeEnter error", g), !1;
2150
2132
  }
2151
2133
  return !0;
2152
- }, c = async (k, g) => {
2153
- const d = t.find((y) => M([y], k.path).route !== null);
2154
- if (d?.onEnter)
2134
+ }, l = async (k, h) => {
2135
+ const u = t.find((g) => N([g], k.path).route !== null);
2136
+ if (u?.onEnter)
2155
2137
  try {
2156
- const y = await d.onEnter(k, g);
2157
- return typeof y == "string" ? (await x(y, !0), !1) : y !== !1;
2158
- } catch (y) {
2159
- return console.error("onEnter error", y), !1;
2138
+ const g = await u.onEnter(k, h);
2139
+ return typeof g == "string" ? (await x(g, !0), !1) : g !== !1;
2140
+ } catch (g) {
2141
+ return console.error("onEnter error", g), !1;
2160
2142
  }
2161
2143
  return !0;
2162
- }, v = (k, g) => {
2163
- const d = t.find((y) => M([y], k.path).route !== null);
2164
- if (d?.afterEnter)
2144
+ }, w = (k, h) => {
2145
+ const u = t.find((g) => N([g], k.path).route !== null);
2146
+ if (u?.afterEnter)
2165
2147
  try {
2166
- d.afterEnter(k, g);
2167
- } catch (y) {
2168
- console.error("afterEnter error", y);
2148
+ u.afterEnter(k, h);
2149
+ } catch (g) {
2150
+ console.error("afterEnter error", g);
2169
2151
  }
2170
- }, x = async (k, g = !1) => {
2152
+ }, x = async (k, h = !1) => {
2171
2153
  try {
2172
- const d = {
2154
+ const u = {
2173
2155
  path: k.replace(r, "") || "/",
2174
2156
  query: {}
2175
- }, y = M(t, d.path);
2176
- if (!y) throw new Error(`No route found for ${d.path}`);
2177
- const b = i.getState(), p = {
2178
- path: d.path,
2179
- params: y.params,
2180
- query: d.query
2157
+ }, g = N(t, u.path);
2158
+ if (!g) throw new Error(`No route found for ${u.path}`);
2159
+ const b = i.getState(), d = {
2160
+ path: u.path,
2161
+ params: g.params,
2162
+ query: u.query
2181
2163
  };
2182
- if (!await h(p, b) || !await c(p, b)) return;
2183
- typeof window < "u" && typeof document < "u" && (g ? window.history.replaceState({}, "", r + k) : window.history.pushState({}, "", r + k)), i.setState(p), v(p, b);
2184
- } catch (d) {
2185
- console.error("Navigation error:", d);
2164
+ if (!await y(d, b) || !await l(d, b)) return;
2165
+ typeof window < "u" && typeof document < "u" && (h ? window.history.replaceState({}, "", r + k) : window.history.pushState({}, "", r + k)), i.setState(d), w(d, b);
2166
+ } catch (u) {
2167
+ console.error("Navigation error:", u);
2186
2168
  }
2187
2169
  };
2188
2170
  if (typeof window < "u" && typeof document < "u") {
2189
2171
  o = () => {
2190
- const g = new URL(window.location.href), d = g.pathname.replace(r, "") || "/", y = Ae(g.search);
2191
- return { path: d, query: y };
2172
+ const h = new URL(window.location.href), u = h.pathname.replace(r, "") || "/", g = Ee(h.search);
2173
+ return { path: u, query: g };
2192
2174
  }, s = o();
2193
- const k = M(t, s.path);
2175
+ const k = N(t, s.path);
2194
2176
  i = xe({
2195
2177
  path: s.path,
2196
2178
  params: k.params,
2197
2179
  query: s.query
2198
- }), a = async (g = !1) => {
2199
- const d = o();
2200
- await x(d.path, g);
2201
- }, window.addEventListener("popstate", () => a(!0)), l = (g) => x(g, !1), f = (g) => x(g, !0), u = () => window.history.back();
2180
+ }), a = async (h = !1) => {
2181
+ const u = o();
2182
+ await x(u.path, h);
2183
+ }, window.addEventListener("popstate", () => a(!0)), c = (h) => x(h, !1), f = (h) => x(h, !0), p = () => window.history.back();
2202
2184
  } else {
2203
2185
  o = () => {
2204
- const d = new URL(n || "/", "http://localhost"), y = d.pathname.replace(r, "") || "/", b = Ae(d.search);
2205
- return { path: y, query: b };
2186
+ const u = new URL(n || "/", "http://localhost"), g = u.pathname.replace(r, "") || "/", b = Ee(u.search);
2187
+ return { path: g, query: b };
2206
2188
  }, s = o();
2207
- const k = M(t, s.path);
2189
+ const k = N(t, s.path);
2208
2190
  i = xe({
2209
2191
  path: s.path,
2210
2192
  params: k.params,
2211
2193
  query: s.query
2212
2194
  }), a = async () => {
2213
- const d = o();
2214
- await g(d.path);
2195
+ const u = o();
2196
+ await h(u.path);
2215
2197
  };
2216
- const g = async (d) => {
2198
+ const h = async (u) => {
2217
2199
  try {
2218
- const y = {
2219
- path: d.replace(r, "") || "/",
2200
+ const g = {
2201
+ path: u.replace(r, "") || "/",
2220
2202
  query: {}
2221
- }, b = M(t, y.path);
2222
- if (!b) throw new Error(`No route found for ${y.path}`);
2223
- const p = i.getState(), w = {
2224
- path: y.path,
2203
+ }, b = N(t, g.path);
2204
+ if (!b) throw new Error(`No route found for ${g.path}`);
2205
+ const d = i.getState(), v = {
2206
+ path: g.path,
2225
2207
  params: b.params,
2226
- query: y.query
2227
- }, m = t.find(($) => M([$], w.path).route !== null);
2208
+ query: g.query
2209
+ }, m = t.find(($) => N([$], v.path).route !== null);
2228
2210
  if (m?.beforeEnter)
2229
2211
  try {
2230
- const $ = await m.beforeEnter(w, p);
2212
+ const $ = await m.beforeEnter(v, d);
2231
2213
  if (typeof $ == "string") {
2232
- await g($);
2214
+ await h($);
2233
2215
  return;
2234
2216
  }
2235
2217
  if ($ === !1) return;
@@ -2238,47 +2220,47 @@ function mt(e) {
2238
2220
  }
2239
2221
  if (m?.onEnter)
2240
2222
  try {
2241
- const $ = await m.onEnter(w, p);
2223
+ const $ = await m.onEnter(v, d);
2242
2224
  if (typeof $ == "string") {
2243
- await g($);
2225
+ await h($);
2244
2226
  return;
2245
2227
  }
2246
2228
  if ($ === !1) return;
2247
2229
  } catch {
2248
2230
  return;
2249
2231
  }
2250
- if (i.setState(w), m?.afterEnter)
2232
+ if (i.setState(v), m?.afterEnter)
2251
2233
  try {
2252
- m.afterEnter(w, p);
2234
+ m.afterEnter(v, d);
2253
2235
  } catch {
2254
2236
  }
2255
2237
  } catch {
2256
2238
  }
2257
2239
  };
2258
- l = async (d) => g(d), f = async (d) => g(d), u = () => {
2240
+ c = async (u) => h(u), f = async (u) => h(u), p = () => {
2259
2241
  };
2260
2242
  }
2261
2243
  return {
2262
2244
  store: i,
2263
- push: l,
2245
+ push: c,
2264
2246
  replace: f,
2265
- back: u,
2247
+ back: p,
2266
2248
  subscribe: i.subscribe,
2267
- matchRoute: (k) => M(t, k),
2249
+ matchRoute: (k) => N(t, k),
2268
2250
  getCurrent: () => i.getState(),
2269
- resolveRouteComponent: yt
2251
+ resolveRouteComponent: ht
2270
2252
  };
2271
2253
  }
2272
- function _t(e, t) {
2273
- return M(e, t);
2254
+ function $t(e, t) {
2255
+ return N(e, t);
2274
2256
  }
2275
- function Ct(e) {
2276
- const t = mt(e);
2277
- return Ee("router-view", {
2257
+ function St(e) {
2258
+ const t = gt(e);
2259
+ return Ce("router-view", {
2278
2260
  async render() {
2279
- if (!t) return W`<div>Router not initialized.</div>`;
2261
+ if (!t) return D`<div>Router not initialized.</div>`;
2280
2262
  const r = t.getCurrent(), { path: n } = r, o = t.matchRoute(n);
2281
- if (!o.route) return W`<div>Not found</div>`;
2263
+ if (!o.route) return D`<div>Not found</div>`;
2282
2264
  try {
2283
2265
  const s = await t.resolveRouteComponent(o.route);
2284
2266
  if (typeof s == "string")
@@ -2287,9 +2269,9 @@ function Ct(e) {
2287
2269
  const i = s(), a = i instanceof Promise ? await i : i;
2288
2270
  return typeof a == "string" ? { tag: a, props: {}, children: [] } : a;
2289
2271
  }
2290
- return W`<div>Invalid route component</div>`;
2272
+ return D`<div>Invalid route component</div>`;
2291
2273
  } catch {
2292
- return W`<div>Invalid route component</div>`;
2274
+ return D`<div>Invalid route component</div>`;
2293
2275
  }
2294
2276
  },
2295
2277
  onConnected(r) {
@@ -2297,7 +2279,7 @@ function Ct(e) {
2297
2279
  typeof r.requestRender == "function" && r.requestRender();
2298
2280
  });
2299
2281
  }
2300
- }), Ee("router-link", {
2282
+ }), Ce("router-link", {
2301
2283
  state: {},
2302
2284
  props: {
2303
2285
  to: { type: String, default: "" },
@@ -2310,7 +2292,7 @@ function Ct(e) {
2310
2292
  disabled: { type: Boolean, default: !1 },
2311
2293
  external: { type: Boolean, default: !1 },
2312
2294
  class: { type: String, default: "" },
2313
- style: { type: String, default: Le`
2295
+ style: { type: String, default: je`
2314
2296
  [aria-disabled="true"] {
2315
2297
  pointer-events: none;
2316
2298
  opacity: 0.5;
@@ -2319,32 +2301,32 @@ function Ct(e) {
2319
2301
  },
2320
2302
  style: (r) => r.style,
2321
2303
  render: (r) => {
2322
- const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, l = r.ariaCurrentValue, f = r.tag, u = r.disabled, h = r.external, c = n.path === o, v = s ? c : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, x = c ? `aria-current="${l}"` : "", k = (r.class || "").split(/\s+/).filter(Boolean), g = {};
2323
- for (const w of k) g[w] = !0;
2324
- const d = {
2325
- ...g,
2304
+ const n = t.getCurrent(), o = r.to, s = r.exact, i = r.exactActiveClass, a = r.activeClass, c = r.ariaCurrentValue, f = r.tag, p = r.disabled, y = r.external, l = n.path === o, w = s ? l : n && typeof n.path == "string" ? n.path.startsWith(o) : !1, x = l ? `aria-current="${c}"` : "", k = (r.class || "").split(/\s+/).filter(Boolean), h = {};
2305
+ for (const v of k) h[v] = !0;
2306
+ const u = {
2307
+ ...h,
2326
2308
  // Also include the configurable names (may duplicate the above)
2327
- [a]: v,
2328
- [i]: c
2329
- }, y = f === "button", b = u ? y ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", p = h && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
2330
- return W`
2331
- ${Re().when(y, W`
2309
+ [a]: w,
2310
+ [i]: l
2311
+ }, g = f === "button", b = p ? g ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", d = y && (f === "a" || !f) ? 'target="_blank" rel="noopener noreferrer"' : "";
2312
+ return D`
2313
+ ${Be().when(g, D`
2332
2314
  <button
2333
2315
  part="button"
2334
- :class="${d}"
2316
+ :class="${u}"
2335
2317
  ${x}
2336
2318
  ${b}
2337
- ${p}
2319
+ ${d}
2338
2320
  @click="navigate"
2339
2321
  ><slot></slot></button>
2340
- `).otherwise(W`
2322
+ `).otherwise(D`
2341
2323
  <a
2342
2324
  part="link"
2343
2325
  href="${o}"
2344
- :class="${d}"
2326
+ :class="${u}"
2345
2327
  ${x}
2346
2328
  ${b}
2347
- ${p}
2329
+ ${d}
2348
2330
  @click="navigate"
2349
2331
  ><slot></slot></a>
2350
2332
  `).done()}
@@ -2360,25 +2342,25 @@ function Ct(e) {
2360
2342
  }), t;
2361
2343
  }
2362
2344
  export {
2363
- U as GlobalEventBus,
2364
- Ee as component,
2345
+ K as GlobalEventBus,
2346
+ Ce as component,
2365
2347
  xe as createStore,
2366
- Le as css,
2367
- vt as each,
2368
- xt as emit,
2348
+ je as css,
2349
+ mt as each,
2350
+ bt as emit,
2369
2351
  Z as eventBus,
2370
- W as html,
2371
- Ct as initRouter,
2372
- St as listen,
2373
- Re as match,
2374
- M as matchRoute,
2375
- _t as matchRouteSSR,
2376
- kt as off,
2377
- wt as on,
2378
- $t as once,
2379
- Ae as parseQuery,
2380
- yt as resolveRouteComponent,
2381
- mt as useRouter,
2382
- bt as when
2352
+ D as html,
2353
+ St as initRouter,
2354
+ kt as listen,
2355
+ Be as match,
2356
+ N as matchRoute,
2357
+ $t as matchRouteSSR,
2358
+ xt as off,
2359
+ vt as on,
2360
+ wt as once,
2361
+ Ee as parseQuery,
2362
+ ht as resolveRouteComponent,
2363
+ gt as useRouter,
2364
+ yt as when
2383
2365
  };
2384
2366
  //# sourceMappingURL=custom-elements-runtime.es.js.map