@jasonshimmy/custom-elements-runtime 0.2.5 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- function vt(e, t) {
1
+ function xt(e, t) {
2
2
  return fe(e ? t : [], "when-block");
3
3
  }
4
- function xt(e, t) {
5
- return e.map((r, o) => {
6
- const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${o}` : String(r);
7
- return fe(t(r, o), `each-${n}`);
4
+ function kt(e, t) {
5
+ return e.map((r, i) => {
6
+ const n = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${i}` : String(r);
7
+ return fe(t(r, i), `each-${n}`);
8
8
  });
9
9
  }
10
- function Oe() {
10
+ function Pe() {
11
11
  const e = [];
12
12
  return {
13
13
  when(t, r) {
@@ -17,14 +17,14 @@ function Oe() {
17
17
  return e.push([!0, t]), this;
18
18
  },
19
19
  done() {
20
- return Pe(...e);
20
+ return Ne(...e);
21
21
  }
22
22
  };
23
23
  }
24
- function Pe(...e) {
24
+ function Ne(...e) {
25
25
  for (let t = 0; t < e.length; t++) {
26
- const [r, o] = e[t];
27
- if (r) return [fe(o, `whenChain-branch-${t}`)];
26
+ const [r, i] = e[t];
27
+ if (r) return [fe(i, `whenChain-branch-${t}`)];
28
28
  }
29
29
  return [fe([], "whenChain-empty")];
30
30
  }
@@ -52,9 +52,9 @@ class G extends EventTarget {
52
52
  * @param data - Optional event payload
53
53
  */
54
54
  emit(t, r) {
55
- const o = Date.now(), n = this.eventCounters.get(t);
56
- if (!n || o - n.window > 1e3)
57
- this.eventCounters.set(t, { count: 1, window: o });
55
+ const i = Date.now(), n = this.eventCounters.get(t);
56
+ if (!n || i - n.window > 1e3)
57
+ this.eventCounters.set(t, { count: 1, window: i });
58
58
  else if (n.count++, n.count > 50 && n.count > 100)
59
59
  return;
60
60
  this.dispatchEvent(new CustomEvent(t, {
@@ -63,10 +63,10 @@ class G extends EventTarget {
63
63
  // Global events don't need to bubble
64
64
  cancelable: !0
65
65
  }));
66
- const i = this.handlers[t];
67
- i && i.forEach((s) => {
66
+ const s = this.handlers[t];
67
+ s && s.forEach((o) => {
68
68
  try {
69
- s(r);
69
+ o(r);
70
70
  } catch (a) {
71
71
  console.error(`Error in global event handler for "${t}":`, a);
72
72
  }
@@ -86,8 +86,8 @@ class G extends EventTarget {
86
86
  * @param handler - Handler function to remove
87
87
  */
88
88
  off(t, r) {
89
- const o = this.handlers[t];
90
- o && o.delete(r);
89
+ const i = this.handlers[t];
90
+ i && i.delete(r);
91
91
  }
92
92
  /**
93
93
  * Remove all handlers for a specific event.
@@ -102,8 +102,8 @@ class G extends EventTarget {
102
102
  * @param handler - CustomEvent handler
103
103
  * @param options - AddEventListener options
104
104
  */
105
- listen(t, r, o) {
106
- return this.addEventListener(t, r, o), () => this.removeEventListener(t, r);
105
+ listen(t, r, i) {
106
+ return this.addEventListener(t, r, i), () => this.removeEventListener(t, r);
107
107
  }
108
108
  /**
109
109
  * Register a one-time event handler. Returns a promise that resolves with the event data.
@@ -111,9 +111,9 @@ class G extends EventTarget {
111
111
  * @param handler - Handler function
112
112
  */
113
113
  once(t, r) {
114
- return new Promise((o) => {
115
- const n = this.on(t, (i) => {
116
- n(), r(i), o(i);
114
+ return new Promise((i) => {
115
+ const n = this.on(t, (s) => {
116
+ n(), r(s), i(s);
117
117
  });
118
118
  });
119
119
  }
@@ -143,9 +143,9 @@ class G extends EventTarget {
143
143
  */
144
144
  getEventStats() {
145
145
  const t = {};
146
- for (const [r, o] of this.eventCounters.entries())
146
+ for (const [r, i] of this.eventCounters.entries())
147
147
  t[r] = {
148
- count: o.count,
148
+ count: i.count,
149
149
  handlersCount: this.getHandlerCount(r)
150
150
  };
151
151
  return t;
@@ -157,24 +157,24 @@ class G extends EventTarget {
157
157
  this.eventCounters.clear();
158
158
  }
159
159
  }
160
- const re = G.getInstance(), wt = (e, t) => re.emit(e, t), kt = (e, t) => re.on(e, t), $t = (e, t) => re.off(e, t), _t = (e, t) => re.once(e, t), St = (e, t, r) => re.listen(e, t, r);
160
+ const re = G.getInstance(), vt = (e, t) => re.emit(e, t), $t = (e, t) => re.on(e, t), _t = (e, t) => re.off(e, t), St = (e, t) => re.once(e, t), Et = (e, t, r) => re.listen(e, t, r);
161
161
  function $e(e) {
162
162
  let t = { ...e };
163
163
  const r = [];
164
- function o(a) {
164
+ function i(a) {
165
165
  r.push(a), a(t);
166
166
  }
167
167
  function n() {
168
168
  return t;
169
169
  }
170
- function i(a) {
170
+ function s(a) {
171
171
  const f = typeof a == "function" ? a(t) : a;
172
- t = { ...t, ...f }, s();
172
+ t = { ...t, ...f }, o();
173
173
  }
174
- function s() {
174
+ function o() {
175
175
  r.forEach((a) => a(t));
176
176
  }
177
- return { subscribe: o, getState: n, setState: i };
177
+ return { subscribe: i, getState: n, setState: s };
178
178
  }
179
179
  function J(e) {
180
180
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
@@ -191,78 +191,78 @@ function H(e) {
191
191
  })[t]
192
192
  ) : e;
193
193
  }
194
- function N(e, t) {
195
- return typeof t == "string" ? t.split(".").reduce((r, o) => r?.[o], e) : t;
194
+ function z(e, t) {
195
+ return typeof t == "string" ? t.split(".").reduce((r, i) => r?.[i], e) : t;
196
196
  }
197
- function se(e, t, r) {
198
- const o = String(t).split("."), n = o.pop();
197
+ function oe(e, t, r) {
198
+ const i = String(t).split("."), n = i.pop();
199
199
  if (!n) return;
200
- const i = o.reduce((s, a) => (s[a] == null && (s[a] = {}), s[a]), e);
201
- i[n] = r;
200
+ const s = i.reduce((o, a) => (o[a] == null && (o[a] = {}), o[a]), e);
201
+ s[n] = r;
202
202
  }
203
- function Ne(e, t, r) {
203
+ function ze(e, t, r) {
204
204
  if (r)
205
- for (const [o, n] of Object.entries(r)) {
206
- let i, s = {};
207
- if (Array.isArray(n) ? (i = n[0], s = n[1] || {}) : i = n, t.set(o, {
208
- callback: i,
209
- options: s,
210
- oldValue: N(e, o)
211
- }), s.immediate)
205
+ for (const [i, n] of Object.entries(r)) {
206
+ let s, o = {};
207
+ if (Array.isArray(n) ? (s = n[0], o = n[1] || {}) : s = n, t.set(i, {
208
+ callback: s,
209
+ options: o,
210
+ oldValue: z(e, i)
211
+ }), o.immediate)
212
212
  try {
213
- const a = N(e, o);
214
- i(a, void 0, e);
213
+ const a = z(e, i);
214
+ s(a, void 0, e);
215
215
  } catch (a) {
216
- console.error(`Error in immediate watcher for "${o}":`, a);
216
+ console.error(`Error in immediate watcher for "${i}":`, a);
217
217
  }
218
218
  }
219
219
  }
220
- function Me(e, t, r, o) {
221
- const n = (s, a) => {
222
- if (s === a) return !0;
223
- if (typeof s != typeof a || typeof s != "object" || s === null || a === null) return !1;
224
- if (Array.isArray(s) && Array.isArray(a))
225
- return s.length !== a.length ? !1 : s.every((d, m) => n(d, a[m]));
226
- const f = Object.keys(s), u = Object.keys(a);
227
- return f.length !== u.length ? !1 : f.every((d) => n(s[d], a[d]));
228
- }, i = t.get(r);
229
- if (i && !n(o, i.oldValue))
220
+ function Me(e, t, r, i) {
221
+ const n = (o, a) => {
222
+ if (o === a) return !0;
223
+ if (typeof o != typeof a || typeof o != "object" || o === null || a === null) return !1;
224
+ if (Array.isArray(o) && Array.isArray(a))
225
+ return o.length !== a.length ? !1 : o.every((d, y) => n(d, a[y]));
226
+ const f = Object.keys(o), u = Object.keys(a);
227
+ return f.length !== u.length ? !1 : f.every((d) => n(o[d], a[d]));
228
+ }, s = t.get(r);
229
+ if (s && !n(i, s.oldValue))
230
230
  try {
231
- i.callback(o, i.oldValue, e), i.oldValue = o;
232
- } catch (s) {
233
- console.error(`Error in watcher for "${r}":`, s);
231
+ s.callback(i, s.oldValue, e), s.oldValue = i;
232
+ } catch (o) {
233
+ console.error(`Error in watcher for "${r}":`, o);
234
234
  }
235
- for (const [s, a] of t.entries())
236
- if (a.options.deep && r.startsWith(s + "."))
235
+ for (const [o, a] of t.entries())
236
+ if (a.options.deep && r.startsWith(o + "."))
237
237
  try {
238
- const f = N(e, s);
238
+ const f = z(e, o);
239
239
  n(f, a.oldValue) || (a.callback(f, a.oldValue, e), a.oldValue = f);
240
240
  } catch (f) {
241
- console.error(`Error in deep watcher for "${s}":`, f);
241
+ console.error(`Error in deep watcher for "${o}":`, f);
242
242
  }
243
243
  }
244
244
  function We(e, t, r) {
245
245
  if (!t.props) return;
246
- function o(n, i) {
247
- return i === Boolean ? n === "true" : i === Number ? Number(n) : n;
246
+ function i(n, s) {
247
+ return s === Boolean ? n === "true" : s === Number ? Number(n) : n;
248
248
  }
249
- Object.entries(t.props).forEach(([n, i]) => {
250
- if (i.type === Function && typeof e[n] == "function")
249
+ Object.entries(t.props).forEach(([n, s]) => {
250
+ if (s.type === Function && typeof e[n] == "function")
251
251
  r[n] = e[n];
252
252
  else {
253
- const s = e.getAttribute(J(n));
254
- s !== null ? r[n] = H(o(s, i.type)) : "default" in i && i.default !== void 0 && (r[n] = H(i.default));
253
+ const o = e.getAttribute(J(n));
254
+ o !== null ? r[n] = H(i(o, s.type)) : "default" in s && s.default !== void 0 && (r[n] = H(s.default));
255
255
  }
256
256
  });
257
257
  }
258
- function qe(e, t, r, o) {
259
- e.onConnected && !r && (e.onConnected(t), o(!0));
258
+ function qe(e, t, r, i) {
259
+ e.onConnected && !r && (e.onConnected(t), i(!0));
260
260
  }
261
- function De(e, t, r, o, n, i, s, a) {
262
- e.onDisconnected && e.onDisconnected(t), r.forEach((f) => f()), o(), n(), i(!1), s(null), a(!1);
261
+ function De(e, t, r, i, n, s, o, a) {
262
+ e.onDisconnected && e.onDisconnected(t), r.forEach((f) => f()), i(), n(), s(!1), o(null), a(!1);
263
263
  }
264
- function Ie(e, t, r, o, n) {
265
- e.onAttributeChanged && e.onAttributeChanged(t, r, o, n);
264
+ function Ie(e, t, r, i, n) {
265
+ e.onAttributeChanged && e.onAttributeChanged(t, r, i, n);
266
266
  }
267
267
  function V(e, t) {
268
268
  if (t && e instanceof HTMLElement) {
@@ -272,96 +272,96 @@ function V(e, t) {
272
272
  V(r, t);
273
273
  }
274
274
  }
275
- function He(e, t, r, o, n, i, s, a) {
276
- if (!i) return;
277
- const f = t.includes("lazy"), u = t.includes("trim"), d = t.includes("number"), m = () => N(i._state || i, e), l = m();
275
+ function He(e, t, r, i, n, s, o, a) {
276
+ if (!s) return;
277
+ const f = t.includes("lazy"), u = t.includes("trim"), d = t.includes("number"), y = () => z(s._state || s, e), c = y();
278
278
  let h = "text";
279
- s instanceof HTMLInputElement ? h = o?.type || s.type || "text" : s instanceof HTMLSelectElement ? h = "select" : s instanceof HTMLTextAreaElement && (h = "textarea");
280
- const w = s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || s instanceof HTMLSelectElement, v = w ? h === "checkbox" || h === "radio" ? "checked" : "value" : a ?? "modelValue";
279
+ o instanceof HTMLInputElement ? h = i?.type || o.type || "text" : o instanceof HTMLSelectElement ? h = "select" : o instanceof HTMLTextAreaElement && (h = "textarea");
280
+ const k = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, w = k ? h === "checkbox" || h === "radio" ? "checked" : "value" : a ?? "modelValue";
281
281
  if (h === "checkbox")
282
- if (Array.isArray(l))
283
- r[v] = l.includes(String(s?.getAttribute("value") ?? o?.value ?? ""));
282
+ if (Array.isArray(c))
283
+ r[w] = c.includes(String(o?.getAttribute("value") ?? i?.value ?? ""));
284
284
  else {
285
- const x = s?.getAttribute("true-value") ?? !0;
286
- r[v] = l === x;
285
+ const x = o?.getAttribute("true-value") ?? !0;
286
+ r[w] = c === x;
287
287
  }
288
288
  else if (h === "radio")
289
- r[v] = l === (o?.value ?? "");
289
+ r[w] = c === (i?.value ?? "");
290
290
  else if (h === "select")
291
- if (s && s.hasAttribute("multiple") && s instanceof HTMLSelectElement) {
292
- const x = Array.isArray(l) ? l.map(String) : [];
291
+ if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
292
+ const x = Array.isArray(c) ? c.map(String) : [];
293
293
  setTimeout(() => {
294
- Array.from(s.options).forEach((c) => {
295
- c.selected = x.includes(c.value);
294
+ Array.from(o.options).forEach((l) => {
295
+ l.selected = x.includes(l.value);
296
296
  });
297
- }, 0), r[v] = Array.isArray(l) ? l : [];
297
+ }, 0), r[w] = Array.isArray(c) ? c : [];
298
298
  } else
299
- r[v] = l;
299
+ r[w] = c;
300
300
  else {
301
- r[v] = l;
301
+ r[w] = c;
302
302
  try {
303
- const x = J(v);
304
- o && (o[x] = l);
303
+ const x = J(w);
304
+ i && (i[x] = c);
305
305
  } catch {
306
306
  }
307
307
  }
308
- const b = f || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", y = (x) => {
308
+ const b = f || h === "checkbox" || h === "radio" || h === "select" ? "change" : "input", m = (x) => {
309
309
  if (x.isComposing || n._isComposing || x.isTrusted === !1) return;
310
- const c = x.target;
311
- if (!c || c._modelUpdating) return;
312
- let g = c.value;
310
+ const l = x.target;
311
+ if (!l || l._modelUpdating) return;
312
+ let g = l.value;
313
313
  if (h === "checkbox") {
314
- const C = m();
315
- if (Array.isArray(C)) {
316
- const S = c.getAttribute("value") ?? "", A = Array.from(C);
317
- if (c.checked)
314
+ const E = y();
315
+ if (Array.isArray(E)) {
316
+ const S = l.getAttribute("value") ?? "", A = Array.from(E);
317
+ if (l.checked)
318
318
  A.includes(S) || A.push(S);
319
319
  else {
320
- const T = A.indexOf(S);
321
- T > -1 && A.splice(T, 1);
320
+ const j = A.indexOf(S);
321
+ j > -1 && A.splice(j, 1);
322
322
  }
323
323
  g = A;
324
324
  } else {
325
- const S = c.getAttribute("true-value") ?? !0, A = c.getAttribute("false-value") ?? !1;
326
- g = c.checked ? S : A;
325
+ const S = l.getAttribute("true-value") ?? !0, A = l.getAttribute("false-value") ?? !1;
326
+ g = l.checked ? S : A;
327
327
  }
328
328
  } else if (h === "radio")
329
- g = c.getAttribute("value") ?? c.value;
330
- else if (h === "select" && c.multiple)
331
- g = Array.from(c.selectedOptions).map((C) => C.value);
329
+ g = l.getAttribute("value") ?? l.value;
330
+ else if (h === "select" && l.multiple)
331
+ g = Array.from(l.selectedOptions).map((E) => E.value);
332
332
  else if (u && typeof g == "string" && (g = g.trim()), d) {
333
- const C = Number(g);
334
- isNaN(C) || (g = C);
333
+ const E = Number(g);
334
+ isNaN(E) || (g = E);
335
335
  }
336
- const p = i._state || i, _ = N(p, e);
336
+ const p = s._state || s, _ = z(p, e);
337
337
  if (Array.isArray(g) && Array.isArray(_) ? JSON.stringify([...g].sort()) !== JSON.stringify([..._].sort()) : g !== _) {
338
- c._modelUpdating = !0;
338
+ l._modelUpdating = !0;
339
339
  try {
340
- se(p, e, g), i._requestRender && i._requestRender();
340
+ oe(p, e, g), s._requestRender && s._requestRender();
341
341
  } finally {
342
- setTimeout(() => c._modelUpdating = !1, 0);
342
+ setTimeout(() => l._modelUpdating = !1, 0);
343
343
  }
344
344
  }
345
345
  };
346
- w ? n[b] = y : n[`update:${J(v)}`] = (x) => {
347
- const c = i._state || i, g = x.detail !== void 0 ? x.detail : x.target?.value, p = N(c, e);
348
- (Array.isArray(g) && Array.isArray(p) ? JSON.stringify([...g].sort()) !== JSON.stringify([...p].sort()) : g !== p) && (se(c, e, g), i._requestRender && i._requestRender());
346
+ k ? n[b] = m : n[`update:${J(w)}`] = (x) => {
347
+ const l = s._state || s, g = x.detail !== void 0 ? x.detail : x.target?.value, p = z(l, e);
348
+ (Array.isArray(g) && Array.isArray(p) ? JSON.stringify([...g].sort()) !== JSON.stringify([...p].sort()) : g !== p) && (oe(l, e, g), s._requestRender && s._requestRender());
349
349
  }, (h === "text" || h === "textarea") && (n.compositionstart = (() => n._isComposing = !0), n.compositionend = (x) => {
350
350
  n._isComposing = !1;
351
- const c = x.target;
352
- c && setTimeout(() => {
353
- const g = c.value, p = i._state || i, _ = N(p, e);
354
- let E = g;
355
- if (u && (E = E.trim()), d) {
356
- const S = Number(E);
357
- isNaN(S) || (E = S);
351
+ const l = x.target;
352
+ l && setTimeout(() => {
353
+ const g = l.value, p = s._state || s, _ = z(p, e);
354
+ let C = g;
355
+ if (u && (C = C.trim()), d) {
356
+ const S = Number(C);
357
+ isNaN(S) || (C = S);
358
358
  }
359
- if (Array.isArray(E) && Array.isArray(_) ? JSON.stringify([...E].sort()) !== JSON.stringify([..._].sort()) : E !== _) {
360
- c._modelUpdating = !0;
359
+ if (Array.isArray(C) && Array.isArray(_) ? JSON.stringify([...C].sort()) !== JSON.stringify([..._].sort()) : C !== _) {
360
+ l._modelUpdating = !0;
361
361
  try {
362
- se(p, e, E), i._requestRender && i._requestRender();
362
+ oe(p, e, C), s._requestRender && s._requestRender();
363
363
  } finally {
364
- setTimeout(() => c._modelUpdating = !1, 0);
364
+ setTimeout(() => l._modelUpdating = !1, 0);
365
365
  }
366
366
  }
367
367
  }, 0);
@@ -371,61 +371,61 @@ function Le(e) {
371
371
  const t = e.slice(2);
372
372
  return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
373
373
  }
374
- function Fe(e, t, r, o) {
375
- if (o) {
374
+ function Fe(e, t, r, i) {
375
+ if (i) {
376
376
  if (typeof e == "object" && e !== null)
377
- for (const [n, i] of Object.entries(e))
378
- t[n] = i;
377
+ for (const [n, s] of Object.entries(e))
378
+ t[n] = s;
379
379
  else if (typeof e == "string")
380
380
  try {
381
381
  const n = JSON.parse(e);
382
382
  if (typeof n == "object" && n !== null) {
383
- for (const [i, s] of Object.entries(n))
384
- t[i] = s;
383
+ for (const [s, o] of Object.entries(n))
384
+ t[s] = o;
385
385
  return;
386
386
  }
387
387
  } catch {
388
- const n = N(o, e);
388
+ const n = z(i, e);
389
389
  r[e] = n;
390
390
  }
391
391
  }
392
392
  }
393
393
  function Ke(e, t, r) {
394
394
  if (!r) return;
395
- const o = N(r, e), n = t.style || "", i = o ? "" : "none";
395
+ const i = z(r, e), n = t.style || "", s = i ? "" : "none";
396
396
  if (n) {
397
- const s = n.split(";").filter(Boolean), a = s.findIndex(
397
+ const o = n.split(";").filter(Boolean), a = o.findIndex(
398
398
  (f) => f.trim().startsWith("display:")
399
399
  );
400
- a >= 0 ? s[a] = `display: ${i}` : s.push(`display: ${i}`), t.style = s.join("; ");
400
+ a >= 0 ? o[a] = `display: ${s}` : o.push(`display: ${s}`), t.style = o.join("; ");
401
401
  } else
402
- t.style = `display: ${i}`;
402
+ t.style = `display: ${s}`;
403
403
  }
404
404
  function Ue(e, t, r) {
405
405
  if (!r) return;
406
- const o = N(r, e);
406
+ const i = z(r, e);
407
407
  let n = [];
408
- typeof o == "string" ? n = [o] : Array.isArray(o) ? n = o.filter(Boolean) : typeof o == "object" && (n = Object.entries(o).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
409
- const i = t.class || "", s = i ? `${i} ${n.join(" ")}`.trim() : n.join(" ");
410
- s && (t.class = s);
408
+ typeof i == "string" ? n = [i] : Array.isArray(i) ? n = i.filter(Boolean) : typeof i == "object" && (n = Object.entries(i).filter(([, a]) => !!a).flatMap(([a]) => a.split(/\s+/).filter(Boolean)));
409
+ const s = t.class || "", o = s ? `${s} ${n.join(" ")}`.trim() : n.join(" ");
410
+ o && (t.class = o);
411
411
  }
412
412
  function Ve(e, t, r) {
413
- let o;
413
+ let i;
414
414
  if (typeof e == "string") {
415
415
  if (!r) return;
416
- o = N(r, e);
416
+ i = z(r, e);
417
417
  } else
418
- o = e;
418
+ i = e;
419
419
  let n = "";
420
- if (typeof o == "string")
421
- n = o;
422
- else if (o && typeof o == "object") {
423
- const s = [];
424
- for (const [a, f] of Object.entries(o))
420
+ if (typeof i == "string")
421
+ n = i;
422
+ else if (i && typeof i == "object") {
423
+ const o = [];
424
+ for (const [a, f] of Object.entries(i))
425
425
  if (f != null && f !== "") {
426
426
  const u = a.replace(
427
427
  /[A-Z]/g,
428
- (l) => `-${l.toLowerCase()}`
428
+ (c) => `-${c.toLowerCase()}`
429
429
  ), d = [
430
430
  "width",
431
431
  "height",
@@ -452,26 +452,26 @@ function Ve(e, t, r) {
452
452
  "min-height",
453
453
  "max-height"
454
454
  ];
455
- let m = String(f);
456
- typeof f == "number" && d.includes(u) && (m = `${f}px`), s.push(`${u}: ${m}`);
455
+ let y = String(f);
456
+ typeof f == "number" && d.includes(u) && (y = `${f}px`), o.push(`${u}: ${y}`);
457
457
  }
458
- n = s.join("; ") + (s.length > 0 ? ";" : "");
458
+ n = o.join("; ") + (o.length > 0 ? ";" : "");
459
459
  }
460
- const i = t.style || "";
461
- t.style = i + (i && !i.endsWith(";") ? "; " : "") + n;
460
+ const s = t.style || "";
461
+ t.style = s + (s && !s.endsWith(";") ? "; " : "") + n;
462
462
  }
463
- function Re(e, t, r, o) {
464
- const n = {}, i = { ...o || {} }, s = {};
463
+ function Re(e, t, r, i) {
464
+ const n = {}, s = { ...i || {} }, o = {};
465
465
  for (const [a, f] of Object.entries(e)) {
466
- const { value: u, modifiers: d, arg: m } = f;
466
+ const { value: u, modifiers: d, arg: y } = f;
467
467
  if (a === "model" || a.startsWith("model:")) {
468
- const l = a.split(":"), h = l.length > 1 ? l[1] : m;
468
+ const c = a.split(":"), h = c.length > 1 ? c[1] : y;
469
469
  He(
470
470
  typeof u == "string" ? u : String(u),
471
471
  d,
472
472
  n,
473
- i,
474
473
  s,
474
+ o,
475
475
  t,
476
476
  r,
477
477
  h
@@ -480,330 +480,330 @@ function Re(e, t, r, o) {
480
480
  }
481
481
  switch (a) {
482
482
  case "bind":
483
- Fe(u, n, i, t);
483
+ Fe(u, n, s, t);
484
484
  break;
485
485
  case "show":
486
- Ke(u, i, t);
486
+ Ke(u, s, t);
487
487
  break;
488
488
  case "class":
489
- Ue(u, i, t);
489
+ Ue(u, s, t);
490
490
  break;
491
491
  case "style":
492
- Ve(u, i, t);
492
+ Ve(u, s, t);
493
493
  break;
494
494
  }
495
495
  }
496
- return { props: n, attrs: i, listeners: s };
496
+ return { props: n, attrs: s, listeners: o };
497
497
  }
498
- function ke(e, t) {
498
+ function ve(e, t) {
499
499
  if (Array.isArray(e)) {
500
- const i = /* @__PURE__ */ new Set();
501
- return e.map((s) => {
502
- if (!s || typeof s != "object") return s;
503
- let a = s.props?.key ?? s.key;
500
+ const s = /* @__PURE__ */ new Set();
501
+ return e.map((o) => {
502
+ if (!o || typeof o != "object") return o;
503
+ let a = o.props?.key ?? o.key;
504
504
  if (!a) {
505
- const m = s.tag || "node", l = s.props?.attrs?.id ?? s.props?.attrs?.name ?? s.props?.attrs?.["data-key"] ?? "";
506
- a = l ? `${t}:${m}:${l}` : `${t}:${m}`;
505
+ const y = o.tag || "node", c = o.props?.attrs?.id ?? o.props?.attrs?.name ?? o.props?.attrs?.["data-key"] ?? "";
506
+ a = c ? `${t}:${y}:${c}` : `${t}:${y}`;
507
507
  }
508
508
  let f = a, u = 1;
509
- for (; i.has(f); )
509
+ for (; s.has(f); )
510
510
  f = `${a}#${u++}`;
511
- i.add(f);
512
- let d = s.children;
513
- return Array.isArray(d) && (d = ke(d, f)), { ...s, key: f, children: d };
511
+ s.add(f);
512
+ let d = o.children;
513
+ return Array.isArray(d) && (d = ve(d, f)), { ...o, key: f, children: d };
514
514
  });
515
515
  }
516
516
  const r = e;
517
- let o = r.props?.key ?? r.key ?? t, n = r.children;
518
- return Array.isArray(n) && (n = ke(n, o)), { ...r, key: o, children: n };
517
+ let i = r.props?.key ?? r.key ?? t, n = r.children;
518
+ return Array.isArray(n) && (n = ve(n, i)), { ...r, key: i, children: n };
519
519
  }
520
- function Je(e, t, r, o) {
521
- const n = r.directives ?? {}, i = Re(
520
+ function Je(e, t, r, i) {
521
+ const n = r.directives ?? {}, s = Re(
522
522
  n,
523
- o,
523
+ i,
524
524
  e,
525
525
  r.attrs
526
- ), s = {
526
+ ), o = {
527
527
  ...t.props,
528
528
  ...r.props,
529
- ...i.props
529
+ ...s.props
530
530
  }, a = {
531
531
  ...t.attrs,
532
532
  ...r.attrs,
533
- ...i.attrs
534
- }, f = t.props ?? {}, u = s;
535
- for (const l in { ...f, ...u }) {
536
- const h = f[l], w = u[l];
537
- if (h !== w) {
538
- if (l === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
539
- e.value !== w && (e.value = w ?? "");
540
- else if (l === "checked" && e instanceof HTMLInputElement)
541
- e.checked = !!w;
542
- else if (l.startsWith("on") && typeof w == "function") {
543
- const $ = Le(l);
544
- typeof h == "function" && e.removeEventListener($, h), e.addEventListener($, w);
545
- } else if (w == null || w === !1)
546
- e.removeAttribute(l);
547
- else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || l in e)
533
+ ...s.attrs
534
+ }, f = t.props ?? {}, u = o;
535
+ for (const c in { ...f, ...u }) {
536
+ const h = f[c], k = u[c];
537
+ if (h !== k) {
538
+ if (c === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
539
+ e.value !== k && (e.value = k ?? "");
540
+ else if (c === "checked" && e instanceof HTMLInputElement)
541
+ e.checked = !!k;
542
+ else if (c.startsWith("on") && typeof k == "function") {
543
+ const $ = Le(c);
544
+ typeof h == "function" && e.removeEventListener($, h), e.addEventListener($, k);
545
+ } else if (k == null || k === !1)
546
+ e.removeAttribute(c);
547
+ else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || c in e)
548
548
  try {
549
- e[l] = w;
549
+ e[c] = k;
550
550
  } catch {
551
551
  }
552
552
  }
553
553
  }
554
- for (const [l, h] of Object.entries(
555
- i.listeners || {}
554
+ for (const [c, h] of Object.entries(
555
+ s.listeners || {}
556
556
  ))
557
- e.addEventListener(l, h);
558
- const d = t.attrs ?? {}, m = a;
559
- for (const l in { ...d, ...m }) {
560
- const h = d[l], w = m[l];
561
- h !== w && (w == null || w === !1 ? e.removeAttribute(l) : e.setAttribute(l, String(w)));
557
+ e.addEventListener(c, h);
558
+ const d = t.attrs ?? {}, y = a;
559
+ for (const c in { ...d, ...y }) {
560
+ const h = d[c], k = y[c];
561
+ h !== k && (k == null || k === !1 ? e.removeAttribute(c) : e.setAttribute(c, String(k)));
562
562
  }
563
563
  }
564
564
  function M(e, t, r) {
565
565
  if (typeof e == "string")
566
566
  return document.createTextNode(e);
567
567
  if (e.tag === "#text") {
568
- const m = document.createTextNode(
568
+ const y = document.createTextNode(
569
569
  typeof e.children == "string" ? e.children : ""
570
570
  );
571
- return e.key != null && (m.key = e.key), m;
571
+ return e.key != null && (y.key = e.key), y;
572
572
  }
573
573
  if (e.tag === "#anchor") {
574
- const m = e, l = Array.isArray(m.children) ? m.children : [], h = document.createTextNode(""), w = document.createTextNode("");
575
- m.key != null && (h.key = `${m.key}:start`, w.key = `${m.key}:end`), m._startNode = h, m._endNode = w;
574
+ const y = e, c = Array.isArray(y.children) ? y.children : [], h = document.createTextNode(""), k = document.createTextNode("");
575
+ y.key != null && (h.key = `${y.key}:start`, k.key = `${y.key}:end`), y._startNode = h, y._endNode = k;
576
576
  const $ = document.createDocumentFragment();
577
577
  $.appendChild(h);
578
- for (const v of l) {
579
- const b = M(v, t);
578
+ for (const w of c) {
579
+ const b = M(w, t);
580
580
  $.appendChild(b);
581
581
  }
582
- return $.appendChild(w), $;
582
+ return $.appendChild(k), $;
583
583
  }
584
- const o = document.createElement(e.tag);
585
- e.key != null && (o.key = e.key);
586
- const { props: n = {}, attrs: i = {}, directives: s = {} } = e.props ?? {}, a = Re(s, t, o, i), f = {
584
+ const i = document.createElement(e.tag);
585
+ e.key != null && (i.key = e.key);
586
+ const { props: n = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, a = Re(o, t, i, s), f = {
587
587
  ...n,
588
588
  ...a.props
589
589
  }, u = {
590
- ...i,
590
+ ...s,
591
591
  ...a.attrs
592
592
  };
593
- for (const m in u) {
594
- const l = u[m];
595
- typeof m != "string" || /\[object Object\]/.test(m) || (typeof l == "boolean" ? l && o.setAttribute(m, "") : l != null && o.setAttribute(m, l));
596
- }
597
- for (const m in f) {
598
- const l = f[m];
599
- if (!(typeof m != "string" || /\[object Object\]/.test(m)))
600
- if (m === "value" && (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement))
601
- o.value = l ?? "";
602
- else if (m === "checked" && o instanceof HTMLInputElement)
603
- o.checked = !!l;
604
- else if (m.startsWith("on") && typeof l == "function")
605
- o.addEventListener(Le(m), l);
593
+ for (const y in u) {
594
+ const c = u[y];
595
+ typeof y != "string" || /\[object Object\]/.test(y) || (typeof c == "boolean" ? c && i.setAttribute(y, "") : c != null && i.setAttribute(y, c));
596
+ }
597
+ for (const y in f) {
598
+ const c = f[y];
599
+ if (!(typeof y != "string" || /\[object Object\]/.test(y)))
600
+ if (y === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement))
601
+ i.value = c ?? "";
602
+ else if (y === "checked" && i instanceof HTMLInputElement)
603
+ i.checked = !!c;
604
+ else if (y.startsWith("on") && typeof c == "function")
605
+ i.addEventListener(Le(y), c);
606
606
  else {
607
- if (m.startsWith("on") && l === void 0)
607
+ if (y.startsWith("on") && c === void 0)
608
608
  continue;
609
- if (l == null || l === !1)
610
- o.removeAttribute(m);
611
- else if ((e.props?.isCustomElement ?? !1) || m in o)
609
+ if (c == null || c === !1)
610
+ i.removeAttribute(y);
611
+ else if ((e.props?.isCustomElement ?? !1) || y in i)
612
612
  try {
613
- o[m] = l;
613
+ i[y] = c;
614
614
  } catch {
615
615
  }
616
616
  }
617
617
  }
618
- for (const [m, l] of Object.entries(
618
+ for (const [y, c] of Object.entries(
619
619
  a.listeners || {}
620
620
  ))
621
- o.addEventListener(m, l);
621
+ i.addEventListener(y, c);
622
622
  const d = e.props?.ref ?? (e.props?.props && e.props.props.ref);
623
- typeof e != "string" && d && r && (r[d] = o);
623
+ typeof e != "string" && d && r && (r[d] = i);
624
624
  try {
625
- if (typeof o._applyProps == "function")
625
+ if (typeof i._applyProps == "function")
626
626
  try {
627
- o._applyProps(o._cfg);
627
+ i._applyProps(i._cfg);
628
628
  } catch {
629
629
  }
630
- typeof o.requestRender == "function" ? o.requestRender() : typeof o._render == "function" && o._render(o._cfg);
630
+ typeof i.requestRender == "function" ? i.requestRender() : typeof i._render == "function" && i._render(i._cfg);
631
631
  } catch {
632
632
  }
633
633
  if (Array.isArray(e.children))
634
- for (const m of e.children)
635
- o.appendChild(M(m, t, r));
636
- else typeof e.children == "string" && (o.textContent = e.children);
637
- return o;
634
+ for (const y of e.children)
635
+ i.appendChild(M(y, t, r));
636
+ else typeof e.children == "string" && (i.textContent = e.children);
637
+ return i;
638
638
  }
639
- function Ze(e, t, r, o, n) {
639
+ function Ze(e, t, r, i, n) {
640
640
  if (typeof r == "string") {
641
641
  e.textContent !== r && (e.textContent = r);
642
642
  return;
643
643
  }
644
644
  if (!Array.isArray(r)) return;
645
- const i = Array.from(e.childNodes), s = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
646
- for (const h of s)
645
+ const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], a = /* @__PURE__ */ new Map();
646
+ for (const h of o)
647
647
  h && h.key != null && a.set(h.key, h);
648
648
  const f = /* @__PURE__ */ new Map();
649
- for (const h of i) {
650
- const w = h.key;
651
- w != null && f.set(w, h);
649
+ for (const h of s) {
650
+ const k = h.key;
651
+ k != null && f.set(k, h);
652
652
  }
653
653
  const u = /* @__PURE__ */ new Set();
654
654
  let d = e.firstChild;
655
- function m(h, w) {
655
+ function y(h, k) {
656
656
  let $ = h;
657
- for (; $ && (u.add($), $ !== w); )
657
+ for (; $ && (u.add($), $ !== k); )
658
658
  $ = $.nextSibling;
659
659
  }
660
- function l(h, w, $, v) {
660
+ function c(h, k, $, w) {
661
661
  const b = [];
662
- let y = h.nextSibling;
663
- for (; y && y !== w; )
664
- b.push(y), y = y.nextSibling;
662
+ let m = h.nextSibling;
663
+ for (; m && m !== k; )
664
+ b.push(m), m = m.nextSibling;
665
665
  const x = Array.isArray($) ? $ : [];
666
- if (v.some((g) => g && g.key != null) || x.some((g) => g && g.key != null)) {
666
+ if (w.some((g) => g && g.key != null) || x.some((g) => g && g.key != null)) {
667
667
  const g = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
668
- for (const C of x)
669
- C && C.key != null && g.set(C.key, C);
670
- for (const C of b) {
671
- const S = C.key;
672
- S != null && p.set(S, C);
668
+ for (const E of x)
669
+ E && E.key != null && g.set(E.key, E);
670
+ for (const E of b) {
671
+ const S = E.key;
672
+ S != null && p.set(S, E);
673
673
  }
674
674
  const _ = /* @__PURE__ */ new Set();
675
- let E = h.nextSibling;
676
- for (const C of v) {
675
+ let C = h.nextSibling;
676
+ for (const E of w) {
677
677
  let S;
678
- if (C.key != null && p.has(C.key)) {
679
- const A = g.get(C.key);
678
+ if (E.key != null && p.has(E.key)) {
679
+ const A = g.get(E.key);
680
680
  S = ae(
681
- p.get(C.key),
681
+ p.get(E.key),
682
682
  A,
683
- C,
684
- o
685
- ), _.add(S), S !== E && e.contains(S) && e.insertBefore(S, E);
683
+ E,
684
+ i
685
+ ), _.add(S), S !== C && e.contains(S) && e.insertBefore(S, C);
686
686
  } else
687
- S = M(C, o), e.insertBefore(S, E), _.add(S);
688
- E = S.nextSibling;
687
+ S = M(E, i), e.insertBefore(S, C), _.add(S);
688
+ C = S.nextSibling;
689
689
  }
690
- for (const C of b)
691
- !_.has(C) && e.contains(C) && e.removeChild(C);
690
+ for (const E of b)
691
+ !_.has(E) && e.contains(E) && e.removeChild(E);
692
692
  } else {
693
693
  const g = Math.min(
694
694
  x.length,
695
- v.length
695
+ w.length
696
696
  );
697
697
  for (let p = 0; p < g; p++) {
698
- const _ = x[p], E = v[p], C = ae(b[p], _, E, o);
699
- C !== b[p] && (e.insertBefore(C, b[p]), e.removeChild(b[p]));
698
+ const _ = x[p], C = w[p], E = ae(b[p], _, C, i);
699
+ E !== b[p] && (e.insertBefore(E, b[p]), e.removeChild(b[p]));
700
700
  }
701
- for (let p = g; p < v.length; p++)
702
- e.insertBefore(M(v[p], o), w);
701
+ for (let p = g; p < w.length; p++)
702
+ e.insertBefore(M(w[p], i), k);
703
703
  for (let p = g; p < b.length; p++)
704
704
  e.removeChild(b[p]);
705
705
  }
706
706
  }
707
707
  for (const h of r) {
708
- let w;
708
+ let k;
709
709
  if (h.tag === "#anchor") {
710
- const $ = h.key, v = `${$}:start`, b = `${$}:end`;
711
- let y = f.get(v), x = f.get(b);
712
- const c = Array.isArray(h.children) ? h.children : [];
713
- if (y || (y = document.createTextNode(""), y.key = v), x || (x = document.createTextNode(""), x.key = b), h._startNode = y, h._endNode = x, !e.contains(y) || !e.contains(x)) {
714
- e.insertBefore(y, d);
715
- for (const g of c)
716
- e.insertBefore(M(g, o), d);
710
+ const $ = h.key, w = `${$}:start`, b = `${$}:end`;
711
+ let m = f.get(w), x = f.get(b);
712
+ const l = Array.isArray(h.children) ? h.children : [];
713
+ if (m || (m = document.createTextNode(""), m.key = w), x || (x = document.createTextNode(""), x.key = b), h._startNode = m, h._endNode = x, !e.contains(m) || !e.contains(x)) {
714
+ e.insertBefore(m, d);
715
+ for (const g of l)
716
+ e.insertBefore(M(g, i), d);
717
717
  e.insertBefore(x, d);
718
718
  } else
719
- l(
720
- y,
719
+ c(
720
+ m,
721
721
  x,
722
722
  a.get($)?.children,
723
- c
723
+ l
724
724
  );
725
- m(y, x), d = x.nextSibling;
725
+ y(m, x), d = x.nextSibling;
726
726
  continue;
727
727
  }
728
728
  if (h.key != null && f.has(h.key)) {
729
729
  const $ = a.get(h.key);
730
- w = ae(
730
+ k = ae(
731
731
  f.get(h.key),
732
732
  $,
733
733
  h,
734
- o,
734
+ i,
735
735
  n
736
- ), u.add(w), w !== d && e.contains(w) && (d && !e.contains(d) && (d = null), e.insertBefore(w, d));
736
+ ), u.add(k), k !== d && e.contains(k) && (d && !e.contains(d) && (d = null), e.insertBefore(k, d));
737
737
  } else
738
- w = M(h, o, n), d && !e.contains(d) && (d = null), e.insertBefore(w, d), u.add(w);
739
- d = w.nextSibling;
738
+ k = M(h, i, n), d && !e.contains(d) && (d = null), e.insertBefore(k, d), u.add(k);
739
+ d = k.nextSibling;
740
740
  }
741
- for (const h of i)
741
+ for (const h of s)
742
742
  !u.has(h) && e.contains(h) && (V(h, n), e.removeChild(h));
743
743
  }
744
- function ae(e, t, r, o, n) {
744
+ function ae(e, t, r, i, n) {
745
745
  if (t && typeof t != "string" && t.props?.ref && n && V(e, n), t === r) return e;
746
746
  if (typeof r == "string") {
747
747
  if (e.nodeType === Node.TEXT_NODE)
748
748
  return e.textContent !== r && (e.textContent = r), e;
749
749
  {
750
- const s = document.createTextNode(r);
751
- return e.parentNode?.replaceChild(s, e), s;
750
+ const o = document.createTextNode(r);
751
+ return e.parentNode?.replaceChild(o, e), o;
752
752
  }
753
753
  }
754
754
  if (r && typeof r != "string" && r.tag === "#anchor") {
755
- const s = r, a = Array.isArray(s.children) ? s.children : [], f = s._startNode ?? document.createTextNode(""), u = s._endNode ?? document.createTextNode("");
756
- s.key != null && (f.key = `${s.key}:start`, u.key = `${s.key}:end`), s._startNode = f, s._endNode = u;
755
+ const o = r, a = Array.isArray(o.children) ? o.children : [], f = o._startNode ?? document.createTextNode(""), u = o._endNode ?? document.createTextNode("");
756
+ o.key != null && (f.key = `${o.key}:start`, u.key = `${o.key}:end`), o._startNode = f, o._endNode = u;
757
757
  const d = document.createDocumentFragment();
758
758
  d.appendChild(f);
759
- for (const m of a) {
760
- const l = M(m, o);
761
- d.appendChild(l);
759
+ for (const y of a) {
760
+ const c = M(y, i);
761
+ d.appendChild(c);
762
762
  }
763
763
  return d.appendChild(u), e.parentNode?.replaceChild(d, e), f;
764
764
  }
765
765
  if (!r) {
766
766
  V(e, n);
767
- const s = document.createComment("removed");
768
- return e.parentNode?.replaceChild(s, e), s;
767
+ const o = document.createComment("removed");
768
+ return e.parentNode?.replaceChild(o, e), o;
769
769
  }
770
770
  if (!t || typeof t == "string") {
771
771
  V(e, n);
772
- const s = M(r, o, n);
773
- return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
772
+ const o = M(r, i, n);
773
+ return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = o), e.parentNode?.replaceChild(o, e), o;
774
774
  }
775
775
  if (r.tag === "#anchor") {
776
- const s = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), f = r._endNode ?? document.createTextNode("");
776
+ const o = Array.isArray(r.children) ? r.children : [], a = r._startNode ?? document.createTextNode(""), f = r._endNode ?? document.createTextNode("");
777
777
  r.key != null && (a.key = `${r.key}:start`, f.key = `${r.key}:end`), r._startNode = a, r._endNode = f;
778
778
  const u = document.createDocumentFragment();
779
779
  u.appendChild(a);
780
- for (const d of s)
781
- u.appendChild(M(d, o));
780
+ for (const d of o)
781
+ u.appendChild(M(d, i));
782
782
  return u.appendChild(f), e.parentNode?.replaceChild(u, e), a;
783
783
  }
784
784
  if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
785
- const s = e;
786
- return Je(s, t.props || {}, r.props || {}, o), Ze(s, t.children, r.children, o, n), typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), s;
785
+ const o = e;
786
+ return Je(o, t.props || {}, r.props || {}, i), Ze(o, t.children, r.children, i, n), typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = o), o;
787
787
  }
788
788
  V(e, n);
789
- const i = M(r, o, n);
790
- return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = i), e.parentNode?.replaceChild(i, e), i;
789
+ const s = M(r, i, n);
790
+ return typeof r != "string" && r.props?.ref && n && (n[r.props.ref] = s), e.parentNode?.replaceChild(s, e), s;
791
791
  }
792
- function Ye(e, t, r, o) {
792
+ function Ye(e, t, r, i) {
793
793
  let n;
794
794
  Array.isArray(t) ? t.length === 1 ? (n = t[0], n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })) : n = { tag: "div", key: "__root__", children: t } : (n = t, n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })), n && typeof n == "object" && n.tag === "#anchor" && (n = {
795
795
  tag: "div",
796
796
  key: "__anchor_root__",
797
797
  props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
798
798
  children: [n]
799
- }), n = ke(n, String(n.key ?? "root"));
800
- const i = e._prevVNode ?? null, s = e._prevDom ?? e.firstChild ?? null;
799
+ }), n = ve(n, String(n.key ?? "root"));
800
+ const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
801
801
  let a;
802
- i && s ? typeof i != "string" && typeof n != "string" && i.tag === n.tag && i.key === n.key ? a = ae(s, i, n, r, o) : (a = M(n, r, o), e.replaceChild(a, s)) : (a = M(n, r, o), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
802
+ s && o ? typeof s != "string" && typeof n != "string" && s.tag === n.tag && s.key === n.key ? a = ae(o, s, n, r, i) : (a = M(n, r, i), e.replaceChild(a, o)) : (a = M(n, r, i), e.firstChild ? e.replaceChild(a, e.firstChild) : e.appendChild(a));
803
803
  const f = [];
804
804
  for (let u = 0; u < e.childNodes.length; u++) {
805
805
  const d = e.childNodes[u];
806
- d !== a && d.nodeName !== "STYLE" && (V(d, o), f.push(d));
806
+ d !== a && d.nodeName !== "STYLE" && (V(d, i), f.push(d));
807
807
  }
808
808
  f.forEach((u) => e.removeChild(u)), e._prevVNode = n, e._prevDom = a;
809
809
  }
@@ -814,29 +814,29 @@ function he(e) {
814
814
  if (e.tag === "#anchor")
815
815
  return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(he).join("");
816
816
  let t = "";
817
- e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, i]) => ` ${n}="${H(String(i))}"`).join(""));
817
+ e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([n, s]) => ` ${n}="${H(String(s))}"`).join(""));
818
818
  let r = "";
819
- e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, i]) => ` ${n}="${H(String(i))}"`).join(""));
820
- const o = Array.isArray(e.children) ? e.children.filter(Boolean).map(he).join("") : typeof e.children == "string" ? H(e.children) : e.children ? he(e.children) : "";
821
- return `<${e.tag}${t}${r}>${o}</${e.tag}>`;
819
+ e.props && (r = Object.entries(e.props).filter(([n]) => n !== "attrs" && n !== "directives" && n !== "ref" && n !== "key").map(([n, s]) => ` ${n}="${H(String(s))}"`).join(""));
820
+ const i = Array.isArray(e.children) ? e.children.filter(Boolean).map(he).join("") : typeof e.children == "string" ? H(e.children) : e.children ? he(e.children) : "";
821
+ return `<${e.tag}${t}${r}>${i}</${e.tag}>`;
822
822
  }
823
- function ze(e, ...t) {
823
+ function Oe(e, ...t) {
824
824
  let r = "";
825
- for (let o = 0; o < e.length; o++)
826
- r += e[o], o < t.length && (r += t[o]);
825
+ for (let i = 0; i < e.length; i++)
826
+ r += e[i], i < t.length && (r += t[i]);
827
827
  return r;
828
828
  }
829
829
  function Be(e) {
830
830
  return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
831
831
  }
832
- let oe = null;
832
+ let ie = null;
833
833
  function _e() {
834
- return oe || (oe = new CSSStyleSheet(), oe.replaceSync(Be(Qe))), oe;
834
+ return ie || (ie = new CSSStyleSheet(), ie.replaceSync(Be(Qe))), ie;
835
835
  }
836
836
  function Ge(e) {
837
837
  return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
838
838
  }
839
- const Qe = ze`
839
+ const Qe = Oe`
840
840
  :host, *, ::before, ::after {
841
841
  all: isolate;
842
842
  box-sizing: border-box;
@@ -879,8 +879,8 @@ const Qe = ze`
879
879
  ::-webkit-input-placeholder, ::placeholder {
880
880
  color: inherit; opacity: .5;
881
881
  }
882
- *:focus {
883
- outline: 2px solid var(--color-blue-500, #3b82f6);
882
+ *:focus-visible {
883
+ outline: 2px solid var(--color-primary-500, #3b82f6);
884
884
  outline-offset: 2px;
885
885
  }
886
886
  ol, ul { list-style: none }
@@ -895,143 +895,112 @@ const Qe = ze`
895
895
  [disabled], [aria-disabled=true] { cursor: not-allowed }
896
896
  [hidden] { display: none }
897
897
  `, Xe = {
898
- gray: {
899
- 50: "var(--color-gray-50, #f9fafb)",
900
- 100: "var(--color-gray-100, #f3f4f6)",
901
- 200: "var(--color-gray-200, #e5e7eb)",
902
- 300: "var(--color-gray-300, #d1d5db)",
903
- 400: "var(--color-gray-400, #9ca3af)",
904
- 500: "var(--color-gray-500, #6b7280)",
905
- 600: "var(--color-gray-600, #4b5563)",
906
- 700: "var(--color-gray-700, #374151)",
907
- 800: "var(--color-gray-800, #1f2937)",
908
- 900: "var(--color-gray-900, #111827)"
909
- },
910
898
  neutral: {
911
- 50: "var(--color-neutral-50, #fafafa)",
912
- 100: "var(--color-neutral-100, #f5f5f5)",
913
- 200: "var(--color-neutral-200, #e5e5e5)",
914
- 300: "var(--color-neutral-300, #d4d4d4)",
915
- 400: "var(--color-neutral-400, #a3a3a3)",
916
- 500: "var(--color-neutral-500, #737373)",
917
- 600: "var(--color-neutral-600, #525252)",
918
- 700: "var(--color-neutral-700, #404040)",
919
- 800: "var(--color-neutral-800, #262626)",
920
- 900: "var(--color-neutral-900, #171717)"
921
- },
922
- slate: {
923
- 50: "var(--color-slate-50, #f8fafc)",
924
- 100: "var(--color-slate-100, #f1f5f9)",
925
- 200: "var(--color-slate-200, #e2e8f0)",
926
- 300: "var(--color-slate-300, #cbd5e1)",
927
- 400: "var(--color-slate-400, #94a3b8)",
928
- 500: "var(--color-slate-500, #64748b)",
929
- 600: "var(--color-slate-600, #475569)",
930
- 700: "var(--color-slate-700, #334155)",
931
- 800: "var(--color-slate-800, #1e293b)",
932
- 900: "var(--color-slate-900, #0f172a)"
899
+ 50: "#fafafa",
900
+ 100: "#f4f4f5",
901
+ 200: "#e4e4e7",
902
+ 300: "#d4d4d8",
903
+ 400: "#9f9fa9",
904
+ 500: "#71717b",
905
+ 600: "#52525c",
906
+ 700: "#3f3f46",
907
+ 800: "#27272a",
908
+ 900: "#18181b",
909
+ 950: "#09090b"
933
910
  },
934
- zinc: {
935
- 50: "var(--color-zinc-50, #fafafa)",
936
- 100: "var(--color-zinc-100, #f4f4f5)",
937
- 200: "var(--color-zinc-200, #e4e4e7)",
938
- 300: "var(--color-zinc-300, #d4d4d8)",
939
- 400: "var(--color-zinc-400, #a1a1aa)",
940
- 500: "var(--color-zinc-500, #71717a)",
941
- 600: "var(--color-zinc-600, #52525b)",
942
- 700: "var(--color-zinc-700, #3f3f46)",
943
- 800: "var(--color-zinc-800, #27272a)",
944
- 900: "var(--color-zinc-900, #18181b)"
911
+ primary: {
912
+ 50: "#eff6ff",
913
+ 100: "#dbeafe",
914
+ 200: "#bfdbfe",
915
+ 300: "#93c5fd",
916
+ 400: "#60a5fa",
917
+ 500: "#3b82f6",
918
+ 600: "#2563eb",
919
+ 700: "#1d4ed8",
920
+ 800: "#1e40af",
921
+ 900: "#1e3a8a",
922
+ 950: "#172554"
945
923
  },
946
- red: {
947
- 50: "var(--color-red-50, #fef2f2)",
948
- 100: "var(--color-red-100, #fee2e2)",
949
- 200: "var(--color-red-200, #fecaca)",
950
- 300: "var(--color-red-300, #fca5a5)",
951
- 400: "var(--color-red-400, #f87171)",
952
- 500: "var(--color-red-500, #ef4444)",
953
- 600: "var(--color-red-600, #dc2626)",
954
- 700: "var(--color-red-700, #b91c1c)",
955
- 800: "var(--color-red-800, #991b1b)",
956
- 900: "var(--color-red-900, #7f1d1d)"
924
+ secondary: {
925
+ 50: "#eef2ff",
926
+ 100: "#e0e7ff",
927
+ 200: "#c7d2fe",
928
+ 300: "#a5b4fc",
929
+ 400: "#818cf8",
930
+ 500: "#6366f1",
931
+ 600: "#4f46e5",
932
+ 700: "#4338ca",
933
+ 800: "#3730a3",
934
+ 900: "#312e81",
935
+ 950: "#1e1b4b"
957
936
  },
958
- blue: {
959
- 50: "var(--color-blue-50, #eff6ff)",
960
- 100: "var(--color-blue-100, #dbeafe)",
961
- 200: "var(--color-blue-200, #bfdbfe)",
962
- 300: "var(--color-blue-300, #93c5fd)",
963
- 400: "var(--color-blue-400, #60a5fa)",
964
- 500: "var(--color-blue-500, #3b82f6)",
965
- 600: "var(--color-blue-600, #2563eb)",
966
- 700: "var(--color-blue-700, #1d4ed8)",
967
- 800: "var(--color-blue-800, #1e40af)",
968
- 900: "var(--color-blue-900, #1e3a8a)"
937
+ success: {
938
+ 50: "#f0fdf4",
939
+ 100: "#dcfce7",
940
+ 200: "#bbf7d0",
941
+ 300: "#86efac",
942
+ 400: "#4ade80",
943
+ 500: "#22c55e",
944
+ 600: "#16a34a",
945
+ 700: "#15803d",
946
+ 800: "#166534",
947
+ 900: "#14532d",
948
+ 950: "#052e16"
969
949
  },
970
- green: {
971
- 50: "var(--color-green-50, #f0fdf4)",
972
- 100: "var(--color-green-100, #dcfce7)",
973
- 200: "var(--color-green-200, #bbf7d0)",
974
- 300: "var(--color-green-300, #86efac)",
975
- 400: "var(--color-green-400, #4ade80)",
976
- 500: "var(--color-green-500, #22c55e)",
977
- 600: "var(--color-green-600, #16a34a)",
978
- 700: "var(--color-green-700, #15803d)",
979
- 800: "var(--color-green-800, #166534)",
980
- 900: "var(--color-green-900, #14532d)"
950
+ info: {
951
+ 50: "#f0f9ff",
952
+ 100: "#e0f2fe",
953
+ 200: "#bae6fd",
954
+ 300: "#7dd3fc",
955
+ 400: "#38bdf8",
956
+ 500: "#0ea5e9",
957
+ 600: "#0284c7",
958
+ 700: "#0369a1",
959
+ 800: "#075985",
960
+ 900: "#0c4a6e",
961
+ 950: "#082f49"
981
962
  },
982
- amber: {
983
- 50: "var(--color-amber-50, #fffbeb)",
984
- 100: "var(--color-amber-100, #fef3c7)",
985
- 200: "var(--color-amber-200, #fde68a)",
986
- 300: "var(--color-amber-300, #fcd34d)",
987
- 400: "var(--color-amber-400, #fbbf24)",
988
- 500: "var(--color-amber-500, #f59e0b)",
989
- 600: "var(--color-amber-600, #d97706)",
990
- 700: "var(--color-amber-700, #b45309)",
991
- 800: "var(--color-amber-800, #92400e)",
992
- 900: "var(--color-amber-900, #78350f)"
963
+ warning: {
964
+ 50: "#fffbeb",
965
+ 100: "#fef3c7",
966
+ 200: "#fde68a",
967
+ 300: "#fcd34d",
968
+ 400: "#fbbf24",
969
+ 500: "#f59e0b",
970
+ 600: "#d97706",
971
+ 700: "#b45309",
972
+ 800: "#92400e",
973
+ 900: "#78350f",
974
+ 950: "#451a03"
993
975
  },
994
- indigo: {
995
- 50: "var(--color-indigo-50, #eef2ff)",
996
- 100: "var(--color-indigo-100, #e0e7ff)",
997
- 200: "var(--color-indigo-200, #c7d2fe)",
998
- 300: "var(--color-indigo-300, #a5b4fc)",
999
- 400: "var(--color-indigo-400, #818cf8)",
1000
- 500: "var(--color-indigo-500, #6366f1)",
1001
- 600: "var(--color-indigo-600, #4f46e5)",
1002
- 700: "var(--color-indigo-700, #4338ca)",
1003
- 800: "var(--color-indigo-800, #3730a3)",
1004
- 900: "var(--color-indigo-900, #312e81)"
976
+ error: {
977
+ 50: "#fef2f2",
978
+ 100: "#fee2e2",
979
+ 200: "#fecaca",
980
+ 300: "#fca5a5",
981
+ 400: "#f87171",
982
+ 500: "#ef4444",
983
+ 600: "#dc2626",
984
+ 700: "#b91c1c",
985
+ 800: "#991b1b",
986
+ 900: "#7f1d1d",
987
+ 950: "#450a0a"
1005
988
  },
1006
- emerald: {
1007
- 50: "var(--color-emerald-50, #ecfdf5)",
1008
- 100: "var(--color-emerald-100, #d1fae5)",
1009
- 200: "var(--color-emerald-200, #a7f3d0)",
1010
- 300: "var(--color-emerald-300, #6ee7b7)",
1011
- 400: "var(--color-emerald-400, #34d399)",
1012
- 500: "var(--color-emerald-500, #10b981)",
1013
- 600: "var(--color-emerald-600, #059669)",
1014
- 700: "var(--color-emerald-700, #047857)",
1015
- 800: "var(--color-emerald-800, #065f46)",
1016
- 900: "var(--color-emerald-900, #064e3b)"
1017
- },
1018
- rose: {
1019
- 50: "var(--color-rose-50, #fff1f2)",
1020
- 100: "var(--color-rose-100, #ffe4e6)",
1021
- 200: "var(--color-rose-200, #fecdd3)",
1022
- 300: "var(--color-rose-300, #fda4af)",
1023
- 400: "var(--color-rose-400, #fb7185)",
1024
- 500: "var(--color-rose-500, #f43f5e)",
1025
- 600: "var(--color-rose-600, #e11d48)",
1026
- 700: "var(--color-rose-700, #be123c)",
1027
- 800: "var(--color-rose-800, #9f1239)",
1028
- 900: "var(--color-rose-900, #881337)"
1029
- },
1030
- white: { DEFAULT: "var(--color-white, #ffffff)" },
1031
- black: { DEFAULT: "var(--color-black, #000000)" },
1032
- transparent: { DEFAULT: "var(--color-transparent, transparent)" },
1033
- current: { DEFAULT: "var(--color-current, currentColor)" }
1034
- }, ge = {
989
+ white: { DEFAULT: "#ffffff" },
990
+ black: { DEFAULT: "#000000" },
991
+ transparent: { DEFAULT: "transparent" },
992
+ current: { DEFAULT: "currentColor" }
993
+ }, et = Object.fromEntries(
994
+ Object.entries(Xe).map(([e, t]) => [
995
+ e,
996
+ Object.fromEntries(
997
+ Object.entries(t).map(([r, i]) => [
998
+ r,
999
+ `var(--color-${e}${r === "DEFAULT" ? "" : `-${r}`}, ${i})`
1000
+ ])
1001
+ )
1002
+ ])
1003
+ ), ge = {
1035
1004
  /* Display */
1036
1005
  block: "display:block;",
1037
1006
  inline: "display:inline;",
@@ -1070,12 +1039,23 @@ const Qe = ze`
1070
1039
  "grid-cols-4": "grid-template-columns:repeat(4,minmax(0,1fr));",
1071
1040
  "grid-cols-5": "grid-template-columns:repeat(5,minmax(0,1fr));",
1072
1041
  "grid-cols-6": "grid-template-columns:repeat(6,minmax(0,1fr));",
1042
+ "grid-cols-7": "grid-template-columns:repeat(7,minmax(0,1fr));",
1043
+ "grid-cols-8": "grid-template-columns:repeat(8,minmax(0,1fr));",
1044
+ "grid-cols-9": "grid-template-columns:repeat(9,minmax(0,1fr));",
1045
+ "grid-cols-10": "grid-template-columns:repeat(10,minmax(0,1fr));",
1046
+ "grid-cols-11": "grid-template-columns:repeat(11,minmax(0,1fr));",
1073
1047
  "grid-cols-12": "grid-template-columns:repeat(12,minmax(0,1fr));",
1074
1048
  "grid-rows-1": "grid-template-rows:repeat(1,minmax(0,1fr));",
1075
1049
  "grid-rows-2": "grid-template-rows:repeat(2,minmax(0,1fr));",
1076
1050
  "grid-rows-3": "grid-template-rows:repeat(3,minmax(0,1fr));",
1077
1051
  "grid-rows-4": "grid-template-rows:repeat(4,minmax(0,1fr));",
1052
+ "grid-rows-5": "grid-template-rows:repeat(5,minmax(0,1fr));",
1078
1053
  "grid-rows-6": "grid-template-rows:repeat(6,minmax(0,1fr));",
1054
+ "grid-rows-7": "grid-template-rows:repeat(7,minmax(0,1fr));",
1055
+ "grid-rows-8": "grid-template-rows:repeat(8,minmax(0,1fr));",
1056
+ "grid-rows-9": "grid-template-rows:repeat(9,minmax(0,1fr));",
1057
+ "grid-rows-10": "grid-template-rows:repeat(10,minmax(0,1fr));",
1058
+ "grid-rows-11": "grid-template-rows:repeat(11,minmax(0,1fr));",
1079
1059
  "grid-rows-12": "grid-template-rows:repeat(12,minmax(0,1fr));",
1080
1060
  /* Grid Placement */
1081
1061
  "col-span-1": "grid-column:span 1 / span 1;",
@@ -1084,12 +1064,22 @@ const Qe = ze`
1084
1064
  "col-span-4": "grid-column:span 4 / span 4;",
1085
1065
  "col-span-5": "grid-column:span 5 / span 5;",
1086
1066
  "col-span-6": "grid-column:span 6 / span 6;",
1067
+ "col-span-7": "grid-column:span 7 / span 7;",
1068
+ "col-span-8": "grid-column:span 8 / span 8;",
1069
+ "col-span-9": "grid-column:span 9 / span 9;",
1070
+ "col-span-10": "grid-column:span 10 / span 10;",
1071
+ "col-span-11": "grid-column:span 11 / span 11;",
1087
1072
  "col-span-12": "grid-column:span 12 / span 12;",
1088
1073
  "row-span-1": "grid-row:span 1 / span 1;",
1089
1074
  "row-span-2": "grid-row:span 2 / span 2;",
1090
1075
  "row-span-3": "grid-row:span 3 / span 3;",
1091
1076
  "row-span-4": "grid-row:span 4 / span 4;",
1092
1077
  "row-span-6": "grid-row:span 6 / span 6;",
1078
+ "row-span-7": "grid-row:span 7 / span 7;",
1079
+ "row-span-8": "grid-row:span 8 / span 8;",
1080
+ "row-span-9": "grid-row:span 9 / span 9;",
1081
+ "row-span-10": "grid-row:span 10 / span 10;",
1082
+ "row-span-11": "grid-row:span 11 / span 11;",
1093
1083
  "row-span-12": "grid-row:span 12 / span 12;",
1094
1084
  /* Positioning */
1095
1085
  absolute: "position:absolute;",
@@ -1128,21 +1118,29 @@ const Qe = ze`
1128
1118
  "text-8xl": "font-size:6rem;line-height:1",
1129
1119
  /* Borders */
1130
1120
  border: "border-width:1px;",
1121
+ "border-2": "border-width:2px;",
1122
+ "border-4": "border-width:4px;",
1123
+ "border-6": "border-width:6px;",
1124
+ "border-8": "border-width:8px;",
1131
1125
  "rounded-none": "border-radius:0;",
1132
1126
  "rounded-xs": "border-radius:0.125rem;",
1133
- rounded: "border-radius:0.25rem;",
1134
1127
  "rounded-sm": "border-radius:0.25rem;",
1135
1128
  "rounded-md": "border-radius:0.375rem;",
1136
1129
  "rounded-lg": "border-radius:0.5rem;",
1130
+ "rounded-xl": "border-radius:0.75rem;",
1131
+ "rounded-2xl": "border-radius:1rem;",
1132
+ "rounded-3xl": "border-radius:1.5rem;",
1133
+ "rounded-4xl": "border-radius:2rem;",
1137
1134
  "rounded-full": "border-radius:9999px;",
1138
1135
  /* Shadow and effects */
1139
- "shadow-none": "box-shadow:0 0 #0000;",
1140
- "shadow-xs": "box-shadow:0 1px 2px 0 rgb(0 0 0 / 0.05);",
1141
- "shadow-sm": "box-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);",
1142
- "shadow-md": "box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);",
1143
- "shadow-lg": "box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);",
1144
- "shadow-xl": "box-shadow:0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);",
1145
- "shadow-2xl": "box-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);",
1136
+ // Shadows use a CSS variable for color so color utilities can modify --ce-shadow-color
1137
+ "shadow-none": "--ce-shadow-color: rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
1138
+ "shadow-xs": "--ce-shadow-color: rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
1139
+ "shadow-sm": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 1px 3px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 1px 2px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1140
+ "shadow-md": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 4px 6px -1px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 2px 4px -2px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1141
+ "shadow-lg": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 10px 15px -3px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 4px 6px -4px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1142
+ "shadow-xl": "--ce-shadow-color: rgb(0 0 0 / 0.1);box-shadow:0 20px 25px -5px var(--ce-shadow-color, rgb(0 0 0 / 0.1)),0 8px 10px -6px var(--ce-shadow-color, rgb(0 0 0 / 0.1));",
1143
+ "shadow-2xl": "--ce-shadow-color: rgb(0 0 0 / 0.25);box-shadow:0 25px 50px -12px var(--ce-shadow-color, rgb(0 0 0 / 0.25));",
1146
1144
  /* Text Overflow & Whitespace */
1147
1145
  truncate: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",
1148
1146
  /* Visibility */
@@ -1201,6 +1199,15 @@ const Qe = ze`
1201
1199
  "transition-opacity": "transition-property:opacity;",
1202
1200
  "transition-transform": "transition-property:transform;",
1203
1201
  "transition-none": "transition-property:none;",
1202
+ /* Cursor */
1203
+ "cursor-auto": "cursor:auto;",
1204
+ "cursor-default": "cursor:default;",
1205
+ "cursor-pointer": "cursor:pointer;",
1206
+ "cursor-wait": "cursor:wait;",
1207
+ "cursor-text": "cursor:text;",
1208
+ "cursor-move": "cursor:move;",
1209
+ "cursor-help": "cursor:help;",
1210
+ "cursor-not-allowed": "cursor:not-allowed;",
1204
1211
  /* Z-index */
1205
1212
  "z-0": "z-index:0;",
1206
1213
  "z-10": "z-index:10;",
@@ -1208,7 +1215,7 @@ const Qe = ze`
1208
1215
  "z-30": "z-index:30;",
1209
1216
  "z-40": "z-index:40;",
1210
1217
  "z-50": "z-index:50;"
1211
- }, et = "0.25rem", Se = {
1218
+ }, tt = "0.25rem", Se = {
1212
1219
  m: ["margin"],
1213
1220
  mx: ["margin-inline"],
1214
1221
  my: ["margin-block"],
@@ -1240,34 +1247,34 @@ const Qe = ze`
1240
1247
  "gap-x": ["column-gap"],
1241
1248
  "gap-y": ["row-gap"]
1242
1249
  };
1243
- function P(e, t) {
1244
- let r = 0, o = 0;
1250
+ function N(e, t) {
1251
+ let r = 0, i = 0;
1245
1252
  for (let n = 0; n < e.length; n++) {
1246
- const i = e[n];
1247
- if (i === "[") r++;
1248
- else if (i === "]" && r > 0) r--;
1249
- else if (i === "(") o++;
1250
- else if (i === ")" && o > 0) o--;
1251
- else if (r === 0 && o === 0 && (i === ">" || i === "+" || i === "~" || i === " "))
1253
+ const s = e[n];
1254
+ if (s === "[") r++;
1255
+ else if (s === "]" && r > 0) r--;
1256
+ else if (s === "(") i++;
1257
+ else if (s === ")" && i > 0) i--;
1258
+ else if (r === 0 && i === 0 && (s === ">" || s === "+" || s === "~" || s === " "))
1252
1259
  return e.slice(0, n) + t + e.slice(n);
1253
1260
  }
1254
1261
  return e + t;
1255
1262
  }
1256
- const tt = {
1263
+ const rt = {
1257
1264
  before: (e, t) => `${e}::before{${t}}`,
1258
1265
  after: (e, t) => `${e}::after{${t}}`,
1259
- hover: (e, t) => `${P(e, ":hover")}{${t}}`,
1260
- focus: (e, t) => `${P(e, ":focus")}{${t}}`,
1261
- active: (e, t) => `${P(e, ":active")}{${t}}`,
1262
- disabled: (e, t) => `${P(e, ":disabled")}{${t}}`,
1263
- visited: (e, t) => `${P(e, ":visited")}{${t}}`,
1264
- checked: (e, t) => `${P(e, ":checked")}{${t}}`,
1265
- first: (e, t) => `${P(e, ":first-child")}{${t}}`,
1266
- last: (e, t) => `${P(e, ":last-child")}{${t}}`,
1267
- odd: (e, t) => `${P(e, ":nth-child(odd)")}{${t}}`,
1268
- even: (e, t) => `${P(e, ":nth-child(even)")}{${t}}`,
1269
- "focus-within": (e, t) => `${P(e, ":focus-within")}{${t}}`,
1270
- "focus-visible": (e, t) => `${P(e, ":focus-visible")}{${t}}`,
1266
+ hover: (e, t) => `${N(e, ":hover")}{${t}}`,
1267
+ focus: (e, t) => `${N(e, ":focus")}{${t}}`,
1268
+ active: (e, t) => `${N(e, ":active")}{${t}}`,
1269
+ disabled: (e, t) => `${N(e, ":disabled")}{${t}}`,
1270
+ visited: (e, t) => `${N(e, ":visited")}{${t}}`,
1271
+ checked: (e, t) => `${N(e, ":checked")}{${t}}`,
1272
+ first: (e, t) => `${N(e, ":first-child")}{${t}}`,
1273
+ last: (e, t) => `${N(e, ":last-child")}{${t}}`,
1274
+ odd: (e, t) => `${N(e, ":nth-child(odd)")}{${t}}`,
1275
+ even: (e, t) => `${N(e, ":nth-child(even)")}{${t}}`,
1276
+ "focus-within": (e, t) => `${N(e, ":focus-within")}{${t}}`,
1277
+ "focus-visible": (e, t) => `${N(e, ":focus-visible")}{${t}}`,
1271
1278
  "group-hover": (e, t) => `.group:hover ${e}{${t}}`,
1272
1279
  "group-focus": (e, t) => `.group:focus ${e}{${t}}`,
1273
1280
  "group-active": (e, t) => `.group:active ${e}{${t}}`,
@@ -1276,7 +1283,7 @@ const tt = {
1276
1283
  "peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
1277
1284
  "peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
1278
1285
  "peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
1279
- }, ye = {
1286
+ }, me = {
1280
1287
  // Responsive
1281
1288
  sm: "(min-width:640px)",
1282
1289
  md: "(min-width:768px)",
@@ -1285,61 +1292,62 @@ const tt = {
1285
1292
  "2xl": "(min-width:1536px)",
1286
1293
  // Dark mode (now plain string)
1287
1294
  dark: "(prefers-color-scheme: dark)"
1288
- }, me = ["sm", "md", "lg", "xl", "2xl"];
1295
+ }, ye = ["sm", "md", "lg", "xl", "2xl"];
1289
1296
  function be(e) {
1290
- const t = e.startsWith("-"), o = (t ? e.slice(1) : e).split("-");
1291
- if (o.length < 2) return null;
1292
- const n = o.slice(0, -1).join("-"), i = o[o.length - 1], s = parseFloat(i);
1293
- if (Number.isNaN(s) || !Se[n]) return null;
1297
+ const t = e.startsWith("-"), i = (t ? e.slice(1) : e).split("-");
1298
+ if (i.length < 2) return null;
1299
+ const n = i.slice(0, -1).join("-"), s = i[i.length - 1], o = parseFloat(s);
1300
+ if (Number.isNaN(o) || !Se[n]) return null;
1294
1301
  const a = t ? "-" : "";
1295
- return Se[n].map((f) => `${f}:calc(${a}${et} * ${s});`).join("");
1302
+ return Se[n].map((f) => `${f}:calc(${a}${tt} * ${o});`).join("");
1296
1303
  }
1297
- function Ce(e) {
1298
- const t = e.replace("#", ""), r = parseInt(t, 16), o = r >> 16 & 255, n = r >> 8 & 255, i = r & 255;
1299
- return `${o} ${n} ${i}`;
1304
+ function Ee(e) {
1305
+ const t = e.replace("#", ""), r = parseInt(t, 16), i = r >> 16 & 255, n = r >> 8 & 255, s = r & 255;
1306
+ return `${i} ${n} ${s}`;
1300
1307
  }
1301
- function rt(e) {
1308
+ function nt(e) {
1302
1309
  const t = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
1303
1310
  if (!t) return null;
1304
- const [, r, o, n = "DEFAULT"] = t, i = Xe[o]?.[n];
1305
- return i ? `${{
1311
+ const [, r, i, n = "DEFAULT"] = t, s = et[i]?.[n];
1312
+ if (!s) return null;
1313
+ if (r === "shadow") return `--ce-shadow-color:${s};`;
1314
+ const a = {
1306
1315
  bg: "background-color",
1307
1316
  decoration: "text-decoration-color",
1308
1317
  text: "color",
1309
1318
  border: "border-color",
1310
- shadow: "box-shadow",
1311
1319
  outline: "outline-color",
1312
1320
  caret: "caret-color",
1313
1321
  accent: "accent-color",
1314
- placeholder: "placeholder-color",
1315
- fill: "fill-color",
1316
- stroke: "stroke-color"
1317
- }[r]}:${i};` : null;
1322
+ fill: "fill",
1323
+ stroke: "stroke"
1324
+ }[r];
1325
+ return a ? `${a}:${s};` : null;
1318
1326
  }
1319
- function nt(e) {
1327
+ function it(e) {
1320
1328
  const [t, r] = e.split("/");
1321
1329
  if (!r) return { base: t };
1322
- const o = parseInt(r, 10);
1323
- return isNaN(o) || o < 0 || o > 100 ? { base: t } : { base: t, opacity: o / 100 };
1330
+ const i = parseInt(r, 10);
1331
+ return isNaN(i) || i < 0 || i > 100 ? { base: t } : { base: t, opacity: i / 100 };
1324
1332
  }
1325
- function ve(e) {
1326
- const { base: t, opacity: r } = nt(e), o = rt(t);
1327
- if (o) {
1333
+ function we(e) {
1334
+ const { base: t, opacity: r } = it(e), i = nt(t);
1335
+ if (i) {
1328
1336
  if (r !== void 0) {
1329
- const i = /#([0-9a-f]{6})/i.exec(o);
1330
- if (i) {
1331
- const s = Ce(i[0]);
1332
- return o.replace(/#([0-9a-f]{6})/i, `rgb(${s} / ${r})`);
1337
+ const s = /#([0-9a-f]{6})/i.exec(i);
1338
+ if (s) {
1339
+ const o = Ee(s[0]);
1340
+ return i.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1333
1341
  }
1334
1342
  }
1335
- return o;
1343
+ return i;
1336
1344
  }
1337
- const n = le(t);
1345
+ const n = ce(t);
1338
1346
  if (n && r !== void 0) {
1339
- const i = /#([0-9a-f]{6})/i.exec(n);
1340
- if (i) {
1341
- const s = Ce(i[0]);
1342
- return n.replace(/#([0-9a-f]{6})/i, `rgb(${s} / ${r})`);
1347
+ const s = /#([0-9a-f]{6})/i.exec(n);
1348
+ if (s) {
1349
+ const o = Ee(s[0]);
1350
+ return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
1343
1351
  }
1344
1352
  }
1345
1353
  return n;
@@ -1350,22 +1358,22 @@ function xe(e) {
1350
1358
  const r = parseInt(t[1], 10);
1351
1359
  return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
1352
1360
  }
1353
- function le(e) {
1361
+ function ce(e) {
1354
1362
  if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
1355
1363
  const n = e.slice(1, -1).trim().match(/^([a-zA-Z][a-zA-Z0-9-]*)\s*:(.*)$/);
1356
1364
  if (n) {
1357
- const i = n[1].trim();
1358
- let s = n[2].trim();
1359
- return s = s.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), s = s.replace(/^'([^']*)'$/g, '"$1"'), `${i}:${s};`;
1365
+ const s = n[1].trim();
1366
+ let o = n[2].trim();
1367
+ return o = o.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), o = o.replace(/^'([^']*)'$/g, '"$1"'), `${s}:${o};`;
1360
1368
  }
1361
1369
  return null;
1362
1370
  }
1363
1371
  const t = e.indexOf("-["), r = e.endsWith("]");
1364
1372
  if (t > 0 && r) {
1365
- const o = e.slice(0, t);
1373
+ const i = e.slice(0, t);
1366
1374
  let n = e.slice(t + 2, -1);
1367
1375
  n = n.replace(/_/g, " ");
1368
- const i = {
1376
+ const s = {
1369
1377
  bg: "background-color",
1370
1378
  text: "color",
1371
1379
  shadow: "box-shadow",
@@ -1407,14 +1415,14 @@ function le(e) {
1407
1415
  leading: "line-height",
1408
1416
  z: "z-index"
1409
1417
  };
1410
- if (o === "rotate")
1418
+ if (i === "rotate")
1411
1419
  return `transform:rotate(${n});`;
1412
- const s = i[o] ?? o.replace(/_/g, "-");
1413
- if (s && n) return `${s}:${n};`;
1420
+ const o = s[i] ?? i.replace(/_/g, "-");
1421
+ if (o && n) return `${o}:${n};`;
1414
1422
  }
1415
1423
  return null;
1416
1424
  }
1417
- function ot(e) {
1425
+ function st(e) {
1418
1426
  if (e.startsWith("[") && e.endsWith("]")) {
1419
1427
  const r = e.slice(1, -1);
1420
1428
  return r.includes("&") ? r : e;
@@ -1426,44 +1434,44 @@ function ot(e) {
1426
1434
  }
1427
1435
  return null;
1428
1436
  }
1429
- function it(e) {
1437
+ function ot(e) {
1430
1438
  return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
1431
1439
  }
1432
- function st(e) {
1440
+ function at(e) {
1433
1441
  const t = /class\s*=\s*(['"])(.*?)\1/g, r = [];
1434
- let o;
1435
- for (; o = t.exec(e); ) {
1436
- const n = o[2].split(/\s+/).filter(Boolean);
1442
+ let i;
1443
+ for (; i = t.exec(e); ) {
1444
+ const n = i[2].split(/\s+/).filter(Boolean);
1437
1445
  n.length && r.push(...n);
1438
1446
  }
1439
1447
  return r.filter(Boolean);
1440
1448
  }
1441
- const Ee = /* @__PURE__ */ new Map(), at = 16;
1449
+ const Ce = /* @__PURE__ */ new Map(), ct = 16;
1442
1450
  function lt(e) {
1443
- const t = Date.now(), r = Ee.get(e);
1444
- if (r && t - r.timestamp < at) return r.css;
1445
- const o = st(e), n = new Set(o), i = [], s = [], a = [], f = [], u = {};
1446
- function d(v, b = !1) {
1447
- const y = (b ? "dark|" : "") + v;
1448
- if (y in u) return u[y];
1449
- const x = w(v, b);
1450
- return u[y] = x, x;
1451
- }
1452
- function m(v) {
1453
- const b = v.some((x) => me.includes(x)), y = v.includes("dark");
1454
- return v.length === 0 ? 1 : !b && !y ? 2 : b && !y ? 3 : 4;
1455
- }
1456
- function l(v) {
1451
+ const t = Date.now(), r = Ce.get(e);
1452
+ if (r && t - r.timestamp < ct) return r.css;
1453
+ const i = at(e), n = new Set(i), s = [], o = [], a = [], f = [], u = {};
1454
+ function d(w, b = !1) {
1455
+ const m = (b ? "dark|" : "") + w;
1456
+ if (m in u) return u[m];
1457
+ const x = k(w, b);
1458
+ return u[m] = x, x;
1459
+ }
1460
+ function y(w) {
1461
+ const b = w.some((x) => ye.includes(x)), m = w.includes("dark");
1462
+ return w.length === 0 ? 1 : !b && !m ? 2 : b && !m ? 3 : 4;
1463
+ }
1464
+ function c(w) {
1457
1465
  const b = [];
1458
- let y = "", x = 0, c = 0;
1459
- for (let g = 0; g < v.length; g++) {
1460
- const p = v[g];
1461
- p === "[" ? x++ : p === "]" && x > 0 ? x-- : p === "(" ? c++ : p === ")" && c > 0 && c--, p === ":" && x === 0 && c === 0 ? (b.push(y), y = "") : y += p;
1466
+ let m = "", x = 0, l = 0;
1467
+ for (let g = 0; g < w.length; g++) {
1468
+ const p = w[g];
1469
+ p === "[" ? x++ : p === "]" && x > 0 ? x-- : p === "(" ? l++ : p === ")" && l > 0 && l--, p === ":" && x === 0 && l === 0 ? (b.push(m), m = "") : m += p;
1462
1470
  }
1463
- return y && b.push(y), b;
1471
+ return m && b.push(m), b;
1464
1472
  }
1465
- function h(v) {
1466
- switch (v) {
1473
+ function h(w) {
1474
+ switch (w) {
1467
1475
  case "hover":
1468
1476
  return ":hover";
1469
1477
  case "focus":
@@ -1492,210 +1500,210 @@ function lt(e) {
1492
1500
  return null;
1493
1501
  }
1494
1502
  }
1495
- function w(v, b = !1) {
1496
- const y = l(v);
1503
+ function k(w, b = !1) {
1504
+ const m = c(w);
1497
1505
  let x = !1;
1498
- const c = y.find((k) => (k.startsWith("!") && (x = !0, k = k.slice(1)), ge[k] || be(k) || xe(k) || ve(k) || le(k)));
1499
- if (!c) return null;
1500
- const g = c.replace(/^!/, ""), p = ge[g] ?? be(g) ?? xe(g) ?? ve(g) ?? le(g);
1506
+ const l = m.find((v) => (v.startsWith("!") && (x = !0, v = v.slice(1)), ge[v] || be(v) || xe(v) || we(v) || ce(v)));
1507
+ if (!l) return null;
1508
+ const g = l.replace(/^!/, ""), p = ge[g] ?? be(g) ?? xe(g) ?? we(g) ?? ce(g);
1501
1509
  if (!p) return null;
1502
- const _ = y.indexOf(c);
1503
- let E = _ >= 0 ? y.slice(0, _) : [];
1504
- b && (E = E.filter((k) => k !== "dark"));
1505
- const C = `.${it(v)}`, S = "__SUBJECT__", A = x ? p.replace(/;$/, " !important;") : p;
1506
- let T = S;
1510
+ const _ = m.indexOf(l);
1511
+ let C = _ >= 0 ? m.slice(0, _) : [];
1512
+ b && (C = C.filter((v) => v !== "dark"));
1513
+ const E = `.${ot(w)}`, S = "__SUBJECT__", A = x ? p.replace(/;$/, " !important;") : p;
1514
+ let j = S;
1507
1515
  const Q = [];
1508
- for (const k of E)
1509
- k.startsWith("group-") ? (T = `.group:${k.slice(6)} ${T}`, Q.push(k)) : k.startsWith("peer-") && (T = T.replace(S, `.peer:${k.slice(5)}~${S}`), Q.push(k));
1510
- E = E.filter((k) => !Q.includes(k));
1516
+ for (const v of C)
1517
+ v.startsWith("group-") ? (j = `.group:${v.slice(6)} ${j}`, Q.push(v)) : v.startsWith("peer-") && (j = j.replace(S, `.peer:${v.slice(5)}~${S}`), Q.push(v));
1518
+ C = C.filter((v) => !Q.includes(v));
1511
1519
  const X = [], de = [];
1512
1520
  let q = null;
1513
- for (const k of E) {
1514
- if (k === "dark" || me.includes(k)) continue;
1515
- const B = ot(k);
1521
+ for (const v of C) {
1522
+ if (v === "dark" || ye.includes(v)) continue;
1523
+ const B = st(v);
1516
1524
  if (B) {
1517
1525
  q = B;
1518
1526
  continue;
1519
1527
  }
1520
- const z = h(k);
1521
- if (z) {
1522
- q ? de.push(z) : X.push(z);
1528
+ const O = h(v);
1529
+ if (O) {
1530
+ q ? de.push(O) : X.push(O);
1523
1531
  continue;
1524
1532
  }
1525
- const O = tt[k];
1526
- typeof O == "function" && (T = O(T, A).split("{")[0]);
1533
+ const P = rt[v];
1534
+ typeof P == "function" && (j = P(j, A).split("{")[0]);
1527
1535
  }
1528
- function I(k, B) {
1529
- if (!B) return k;
1530
- let z = 0, O = 0;
1531
- if (k.length && (k[0] === ">" || k[0] === "+" || k[0] === "~" || k[0] === " ")) {
1532
- let j = 1;
1533
- for (; j < k.length && k[j] === " "; ) j++;
1534
- for (; j < k.length; j++) {
1535
- const R = k[j];
1536
- if (R === "[" ? z++ : R === "]" && z > 0 ? z-- : R === "(" ? O++ : R === ")" && O > 0 && O--, z === 0 && O === 0 && (k[j] === ">" || k[j] === "+" || k[j] === "~" || k[j] === " "))
1537
- return k.slice(0, j) + B + k.slice(j);
1536
+ function I(v, B) {
1537
+ if (!B) return v;
1538
+ let O = 0, P = 0;
1539
+ if (v.length && (v[0] === ">" || v[0] === "+" || v[0] === "~" || v[0] === " ")) {
1540
+ let T = 1;
1541
+ for (; T < v.length && v[T] === " "; ) T++;
1542
+ for (; T < v.length; T++) {
1543
+ const R = v[T];
1544
+ if (R === "[" ? O++ : R === "]" && O > 0 ? O-- : R === "(" ? P++ : R === ")" && P > 0 && P--, O === 0 && P === 0 && (v[T] === ">" || v[T] === "+" || v[T] === "~" || v[T] === " "))
1545
+ return v.slice(0, T) + B + v.slice(T);
1538
1546
  }
1539
- return k + B;
1547
+ return v + B;
1540
1548
  }
1541
- for (let j = 0; j < k.length; j++) {
1542
- const R = k[j];
1543
- if (R === "[" ? z++ : R === "]" && z > 0 ? z-- : R === "(" ? O++ : R === ")" && O > 0 && O--, z === 0 && O === 0 && (R === ">" || R === "+" || R === "~" || R === " "))
1544
- return k.slice(0, j) + B + k.slice(j);
1549
+ for (let T = 0; T < v.length; T++) {
1550
+ const R = v[T];
1551
+ if (R === "[" ? O++ : R === "]" && O > 0 ? O-- : R === "(" ? P++ : R === ")" && P > 0 && P--, O === 0 && P === 0 && (R === ">" || R === "+" || R === "~" || R === " "))
1552
+ return v.slice(0, T) + B + v.slice(T);
1545
1553
  }
1546
- return k + B;
1554
+ return v + B;
1547
1555
  }
1548
1556
  const Z = X.join(""), F = de.join("");
1549
1557
  if (q)
1550
1558
  if (q.includes("&")) {
1551
- const k = q.indexOf("&"), B = q.slice(0, k), z = q.slice(k + 1), O = S + Z, j = T;
1559
+ const v = q.indexOf("&"), B = q.slice(0, v), O = q.slice(v + 1), P = S + Z, T = j;
1552
1560
  if (X.length === 0)
1553
- T = j.replace(S, B + O + F + z);
1561
+ j = T.replace(S, B + P + F + O);
1554
1562
  else {
1555
- const R = I(z, F);
1556
- T = j.replace(S, B + O + R);
1563
+ const R = I(O, F);
1564
+ j = T.replace(S, B + P + R);
1557
1565
  }
1558
1566
  } else
1559
- T = T.replace(S, `${q}${S + Z}`), F && (T = T.replace(S, `${S}${F}`));
1567
+ j = j.replace(S, `${q}${S + Z}`), F && (j = j.replace(S, `${S}${F}`));
1560
1568
  else
1561
- T = S + Z + F;
1562
- T = T.replace(new RegExp(S, "g"), C);
1563
- let L = `${T}{${A}}`;
1564
- const K = E.filter((k) => me.includes(k)), D = K.length ? K[K.length - 1] : null, ne = E.includes("dark");
1565
- return b && D ? L = `@media (prefers-color-scheme: dark) and ${ye[D]}{${L}}` : b ? L = `@media (prefers-color-scheme: dark){${L}}` : ne && D ? L = `@media (prefers-color-scheme: dark) and ${ye[D]}{${L}}` : ne ? L = `@media (prefers-color-scheme: dark){${L}}` : D && (L = `@media ${ye[D]}{${L}}`), L;
1566
- }
1567
- for (const v of n) {
1568
- const b = l(v), y = b.find(
1569
- (p) => ge[p] || be(p) || xe(p) || ve(p) || le(p)
1569
+ j = S + Z + F;
1570
+ j = j.replace(new RegExp(S, "g"), E);
1571
+ let L = `${j}{${A}}`;
1572
+ const K = C.filter((v) => ye.includes(v)), D = K.length ? K[K.length - 1] : null, ne = C.includes("dark");
1573
+ return b && D ? L = `@media (prefers-color-scheme: dark) and ${me[D]}{${L}}` : b ? L = `@media (prefers-color-scheme: dark){${L}}` : ne && D ? L = `@media (prefers-color-scheme: dark) and ${me[D]}{${L}}` : ne ? L = `@media (prefers-color-scheme: dark){${L}}` : D && (L = `@media ${me[D]}{${L}}`), L;
1574
+ }
1575
+ for (const w of n) {
1576
+ const b = c(w), m = b.find(
1577
+ (p) => ge[p] || be(p) || xe(p) || we(p) || ce(p)
1570
1578
  );
1571
- if (!y) continue;
1572
- const x = b.indexOf(y), c = x >= 0 ? b.slice(0, x) : [], g = m(c);
1579
+ if (!m) continue;
1580
+ const x = b.indexOf(m), l = x >= 0 ? b.slice(0, x) : [], g = y(l);
1573
1581
  if (g === 4) {
1574
- const p = d(v, !0);
1582
+ const p = d(w, !0);
1575
1583
  p && f.push(p);
1576
1584
  } else {
1577
- const p = d(v);
1578
- p && (g === 1 ? i.push(p) : g === 2 ? s.push(p) : g === 3 && a.push(p));
1585
+ const p = d(w);
1586
+ p && (g === 1 ? s.push(p) : g === 2 ? o.push(p) : g === 3 && a.push(p));
1579
1587
  }
1580
1588
  }
1581
- const $ = [...i, ...s, ...a, ...f].join("");
1582
- return Ee.set(e, { css: $, timestamp: t }), $;
1589
+ const $ = [...s, ...o, ...a, ...f].join("");
1590
+ return Ce.set(e, { css: $, timestamp: t }), $;
1583
1591
  }
1584
1592
  const te = [];
1585
- function ct(e, t, r, o, n, i, s, a) {
1593
+ function ft(e, t, r, i, n, s, o, a) {
1586
1594
  if (e) {
1587
1595
  te.push(r);
1588
1596
  try {
1589
1597
  if (t.loadingTemplate && r.isLoading) {
1590
- Y(e, t.loadingTemplate(r), r, o, n);
1598
+ Y(e, t.loadingTemplate(r), r, i, n);
1591
1599
  return;
1592
1600
  }
1593
1601
  if (t.errorTemplate && r.hasError) {
1594
- r.error instanceof Error && Y(e, t.errorTemplate(r.error, r), r, o, n);
1602
+ r.error instanceof Error && Y(e, t.errorTemplate(r.error, r), r, i, n);
1595
1603
  return;
1596
1604
  }
1597
1605
  const f = t.render(r);
1598
1606
  if (f instanceof Promise) {
1599
- i(!0), f.then((u) => {
1600
- i(!1), s(null), Y(e, u, r, o, n), a(e.innerHTML);
1607
+ s(!0), f.then((u) => {
1608
+ s(!1), o(null), Y(e, u, r, i, n), a(e.innerHTML);
1601
1609
  }).catch((u) => {
1602
- i(!1), s(u), t.errorTemplate && Y(e, t.errorTemplate(u, r), r, o, n);
1603
- }), t.loadingTemplate && Y(e, t.loadingTemplate(r), r, o, n);
1610
+ s(!1), o(u), t.errorTemplate && Y(e, t.errorTemplate(u, r), r, i, n);
1611
+ }), t.loadingTemplate && Y(e, t.loadingTemplate(r), r, i, n);
1604
1612
  return;
1605
1613
  }
1606
- Y(e, f, r, o, n), a(e.innerHTML);
1614
+ Y(e, f, r, i, n), a(e.innerHTML);
1607
1615
  } finally {
1608
1616
  te.pop();
1609
1617
  }
1610
1618
  }
1611
1619
  }
1612
- function Y(e, t, r, o, n) {
1620
+ function Y(e, t, r, i, n) {
1613
1621
  e && (Ye(
1614
1622
  e,
1615
1623
  Array.isArray(t) ? t : [t],
1616
1624
  r,
1617
- o
1625
+ i
1618
1626
  ), n(e.innerHTML));
1619
1627
  }
1620
- function ft(e, t, r, o, n, i, s) {
1621
- if (i !== null && clearTimeout(i), Date.now() - t < 16) {
1628
+ function ut(e, t, r, i, n, s, o) {
1629
+ if (s !== null && clearTimeout(s), Date.now() - t < 16) {
1622
1630
  if (n(r + 1), r > 10) {
1623
- s(null);
1631
+ o(null);
1624
1632
  return;
1625
1633
  }
1626
1634
  } else
1627
1635
  n(0);
1628
1636
  const f = setTimeout(() => {
1629
- o(Date.now()), e(), s(null);
1637
+ i(Date.now()), e(), o(null);
1630
1638
  }, 0);
1631
- s(f);
1639
+ o(f);
1632
1640
  }
1633
- function ut(e, t, r, o, n, i) {
1641
+ function dt(e, t, r, i, n, s) {
1634
1642
  if (!e) return;
1635
- const s = lt(o);
1636
- if (!t.style && (!s || s.trim() === "")) {
1637
- i(null), e.adoptedStyleSheets = [_e()];
1643
+ const o = lt(i);
1644
+ if (!t.style && (!o || o.trim() === "")) {
1645
+ s(null), e.adoptedStyleSheets = [_e()];
1638
1646
  return;
1639
1647
  }
1640
1648
  let a = "";
1641
1649
  t.style && (typeof t.style == "string" ? a = t.style : typeof t.style == "function" && (a = t.style(r)));
1642
1650
  let f = Ge(`${a}
1643
- ${s}
1651
+ ${o}
1644
1652
  `);
1645
1653
  f = Be(f);
1646
1654
  let u = n;
1647
- u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== f) && u.replaceSync(f), e.adoptedStyleSheets = [_e(), u], i(u);
1655
+ u || (u = new CSSStyleSheet()), (u.cssRules.length === 0 || u.toString() !== f) && u.replaceSync(f), e.adoptedStyleSheets = [_e(), u], s(u);
1648
1656
  }
1649
1657
  const ue = /* @__PURE__ */ new Map(), Ae = Symbol.for("cer.registry");
1650
1658
  if (typeof window < "u") {
1651
1659
  const e = globalThis;
1652
1660
  e[Ae] || (e[Ae] = ue);
1653
1661
  }
1654
- function Te(e, t, r) {
1655
- let o = J(e);
1656
- o.includes("-") || (o = `cer-${o}`);
1662
+ function je(e, t, r) {
1663
+ let i = J(e);
1664
+ i.includes("-") || (i = `cer-${i}`);
1657
1665
  let n;
1658
- typeof t == "function" ? n = { ...r, render: t } : n = t, typeof n.onError != "function" && (n.onError = (i, s) => {
1659
- console.error(`[${o}] Error:`, i, s);
1666
+ typeof t == "function" ? n = { ...r, render: t } : n = t, typeof n.onError != "function" && (n.onError = (s, o) => {
1667
+ console.error(`[${i}] Error:`, s, o);
1660
1668
  });
1661
1669
  try {
1662
- const i = /* @__PURE__ */ new Set([
1670
+ const s = /* @__PURE__ */ new Set([
1663
1671
  "refs",
1664
1672
  "requestRender",
1665
1673
  "error",
1666
1674
  "hasError",
1667
1675
  "isLoading",
1668
1676
  "emit"
1669
- ]), s = [];
1677
+ ]), o = [];
1670
1678
  if (n.state && typeof n.state == "object" && Object.keys(n.state).forEach((a) => {
1671
- i.has(a) && s.push(a);
1679
+ s.has(a) && o.push(a);
1672
1680
  }), n.props && typeof n.props == "object" && Object.keys(n.props).forEach((a) => {
1673
- i.has(a) && s.push(a);
1681
+ s.has(a) && o.push(a);
1674
1682
  }), n.computed && typeof n.computed == "object" && Object.keys(n.computed).forEach((a) => {
1675
- i.has(a) && s.push(a);
1676
- }), s.length > 0) {
1677
- const a = Array.from(new Set(s));
1683
+ s.has(a) && o.push(a);
1684
+ }), o.length > 0) {
1685
+ const a = Array.from(new Set(o));
1678
1686
  console.warn(
1679
- `[${o}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`
1687
+ `[${i}] Reserved runtime context keys used in component config: ${a.join(", ")}. These names are provided by the runtime (for example: refs, error, emit). Rename your state/prop/computed keys (e.g. 'error' -> 'errorMessage') to avoid collisions and TypeScript type conflicts.`
1680
1688
  );
1681
1689
  }
1682
1690
  } catch {
1683
1691
  }
1684
- if (ue.set(o, n), typeof window < "u")
1685
- if (!customElements.get(o))
1686
- customElements.define(o, dt(o, n));
1692
+ if (ue.set(i, n), typeof window < "u")
1693
+ if (!customElements.get(i))
1694
+ customElements.define(i, pt(i, n));
1687
1695
  else
1688
1696
  try {
1689
- document.querySelectorAll(o).forEach((i) => {
1697
+ document.querySelectorAll(i).forEach((s) => {
1690
1698
  try {
1691
- typeof i._cfg < "u" && (i._cfg = n), typeof i._render == "function" && i._render(n);
1699
+ typeof s._cfg < "u" && (s._cfg = n), typeof s._render == "function" && s._render(n);
1692
1700
  } catch {
1693
1701
  }
1694
1702
  });
1695
1703
  } catch {
1696
1704
  }
1697
1705
  }
1698
- function dt(e, t) {
1706
+ function pt(e, t) {
1699
1707
  if (!t.render)
1700
1708
  throw new Error(
1701
1709
  "Component must have a render function"
@@ -1752,12 +1760,12 @@ function dt(e, t) {
1752
1760
  enumerable: !1,
1753
1761
  configurable: !1
1754
1762
  }), this.context = r, Object.defineProperty(this.context, "emit", {
1755
- value: (n, i, s) => {
1763
+ value: (n, s, o) => {
1756
1764
  const a = new CustomEvent(n, {
1757
- detail: i,
1765
+ detail: s,
1758
1766
  bubbles: !0,
1759
1767
  composed: !0,
1760
- ...s || {}
1768
+ ...o || {}
1761
1769
  });
1762
1770
  return this.dispatchEvent(a), !a.defaultPrevented;
1763
1771
  },
@@ -1765,11 +1773,11 @@ function dt(e, t) {
1765
1773
  enumerable: !1,
1766
1774
  configurable: !1
1767
1775
  });
1768
- const o = ue.get(e) || t;
1769
- Object.keys(o).forEach((n) => {
1770
- const i = o[n];
1771
- typeof i == "function" && (this.context[n] = (...s) => i(...s, this.context));
1772
- }), this._applyComputed(o), this._initializing = !1, this._initWatchers(o), this._render(o);
1776
+ const i = ue.get(e) || t;
1777
+ Object.keys(i).forEach((n) => {
1778
+ const s = i[n];
1779
+ typeof s == "function" && (this.context[n] = (...o) => s(...o, this.context));
1780
+ }), this._applyComputed(i), this._initializing = !1, this._initWatchers(i), this._render(i);
1773
1781
  }
1774
1782
  connectedCallback() {
1775
1783
  this._runLogicWithinErrorBoundary(t, () => {
@@ -1807,12 +1815,12 @@ function dt(e, t) {
1807
1815
  );
1808
1816
  });
1809
1817
  }
1810
- attributeChangedCallback(r, o, n) {
1818
+ attributeChangedCallback(r, i, n) {
1811
1819
  this._runLogicWithinErrorBoundary(t, () => {
1812
1820
  this._applyProps(t), Ie(
1813
1821
  t,
1814
1822
  r,
1815
- o,
1823
+ i,
1816
1824
  n,
1817
1825
  this.context
1818
1826
  );
@@ -1823,11 +1831,11 @@ function dt(e, t) {
1823
1831
  }
1824
1832
  _applyComputed(r) {
1825
1833
  this._runLogicWithinErrorBoundary(t, () => {
1826
- r.computed && Object.entries(r.computed).forEach(([o, n]) => {
1827
- Object.defineProperty(this.context, o, {
1834
+ r.computed && Object.entries(r.computed).forEach(([i, n]) => {
1835
+ Object.defineProperty(this.context, i, {
1828
1836
  get: () => {
1829
- const i = n(this.context);
1830
- return H(i);
1837
+ const s = n(this.context);
1838
+ return H(s);
1831
1839
  },
1832
1840
  enumerable: !0
1833
1841
  });
@@ -1837,21 +1845,21 @@ function dt(e, t) {
1837
1845
  // --- Render ---
1838
1846
  _render(r) {
1839
1847
  this._runLogicWithinErrorBoundary(r, () => {
1840
- ct(
1848
+ ft(
1841
1849
  this.shadowRoot,
1842
1850
  r,
1843
1851
  this.context,
1844
1852
  this._refs,
1845
- (o) => {
1846
- this._lastHtmlStringForJitCSS = o, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(o);
1853
+ (i) => {
1854
+ this._lastHtmlStringForJitCSS = i, typeof this.onHtmlStringUpdate == "function" && this.onHtmlStringUpdate(i);
1847
1855
  },
1848
- (o) => {
1849
- this._templateLoading = o, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(o);
1856
+ (i) => {
1857
+ this._templateLoading = i, typeof this.onLoadingStateChange == "function" && this.onLoadingStateChange(i);
1850
1858
  },
1851
- (o) => {
1852
- this._templateError = o, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(o);
1859
+ (i) => {
1860
+ this._templateError = i, typeof this.onErrorStateChange == "function" && this.onErrorStateChange(i);
1853
1861
  },
1854
- (o) => this._applyStyle(r, o)
1862
+ (i) => this._applyStyle(r, i)
1855
1863
  );
1856
1864
  });
1857
1865
  }
@@ -1860,7 +1868,7 @@ function dt(e, t) {
1860
1868
  }
1861
1869
  _requestRender() {
1862
1870
  this._runLogicWithinErrorBoundary(this._cfg, () => {
1863
- ft(
1871
+ ut(
1864
1872
  () => this._render(this._cfg),
1865
1873
  this._lastRenderTime,
1866
1874
  this._renderCount,
@@ -1878,13 +1886,13 @@ function dt(e, t) {
1878
1886
  });
1879
1887
  }
1880
1888
  // --- Style ---
1881
- _applyStyle(r, o) {
1889
+ _applyStyle(r, i) {
1882
1890
  this._runLogicWithinErrorBoundary(r, () => {
1883
- ut(
1891
+ dt(
1884
1892
  this.shadowRoot,
1885
1893
  r,
1886
1894
  this.context,
1887
- o,
1895
+ i,
1888
1896
  this._styleSheet,
1889
1897
  (n) => {
1890
1898
  this._styleSheet = n;
@@ -1893,10 +1901,10 @@ function dt(e, t) {
1893
1901
  });
1894
1902
  }
1895
1903
  // --- Error Boundary function ---
1896
- _runLogicWithinErrorBoundary(r, o) {
1904
+ _runLogicWithinErrorBoundary(r, i) {
1897
1905
  this._hasError && (this._hasError = !1);
1898
1906
  try {
1899
- o();
1907
+ i();
1900
1908
  } catch (n) {
1901
1909
  this._hasError = !0, r.onError && r.onError(n, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(
1902
1910
  n,
@@ -1907,8 +1915,8 @@ function dt(e, t) {
1907
1915
  // --- State, props, computed ---
1908
1916
  _initContext(r) {
1909
1917
  try {
1910
- let o = function(i, s = "") {
1911
- return Array.isArray(i) ? new Proxy(i, {
1918
+ let i = function(s, o = "") {
1919
+ return Array.isArray(s) ? new Proxy(s, {
1912
1920
  get(a, f, u) {
1913
1921
  const d = Reflect.get(a, f, u);
1914
1922
  return typeof d == "function" && typeof f == "string" && [
@@ -1919,36 +1927,36 @@ function dt(e, t) {
1919
1927
  "splice",
1920
1928
  "sort",
1921
1929
  "reverse"
1922
- ].includes(f) ? function(...l) {
1923
- const h = d.apply(a, l);
1930
+ ].includes(f) ? function(...c) {
1931
+ const h = d.apply(a, c);
1924
1932
  if (!n._initializing) {
1925
- const w = s || "root";
1926
- n._triggerWatchers(w, a), n._render(r);
1933
+ const k = o || "root";
1934
+ n._triggerWatchers(k, a), n._render(r);
1927
1935
  }
1928
1936
  return h;
1929
1937
  } : d;
1930
1938
  },
1931
1939
  set(a, f, u) {
1932
1940
  if (a[f] = u, !n._initializing) {
1933
- const d = s ? `${s}.${String(f)}` : String(f);
1941
+ const d = o ? `${o}.${String(f)}` : String(f);
1934
1942
  n._triggerWatchers(d, u), n._render(r);
1935
1943
  }
1936
1944
  return !0;
1937
1945
  },
1938
1946
  deleteProperty(a, f) {
1939
1947
  if (delete a[f], !n._initializing) {
1940
- const u = s ? `${s}.${String(f)}` : String(f);
1948
+ const u = o ? `${o}.${String(f)}` : String(f);
1941
1949
  n._triggerWatchers(u, void 0), n._render(r);
1942
1950
  }
1943
1951
  return !0;
1944
1952
  }
1945
- }) : i && typeof i == "object" ? (Object.keys(i).forEach((a) => {
1946
- const f = s ? `${s}.${a}` : a;
1947
- i[a] = o(i[a], f);
1948
- }), new Proxy(i, {
1953
+ }) : s && typeof s == "object" ? (Object.keys(s).forEach((a) => {
1954
+ const f = o ? `${o}.${a}` : a;
1955
+ s[a] = i(s[a], f);
1956
+ }), new Proxy(s, {
1949
1957
  set(a, f, u) {
1950
- const d = s ? `${s}.${String(f)}` : String(f);
1951
- return a[f] = o(u, d), n._initializing || (n._triggerWatchers(
1958
+ const d = o ? `${o}.${String(f)}` : String(f);
1959
+ return a[f] = i(u, d), n._initializing || (n._triggerWatchers(
1952
1960
  d,
1953
1961
  a[f]
1954
1962
  ), n._render(r)), !0;
@@ -1956,134 +1964,134 @@ function dt(e, t) {
1956
1964
  get(a, f, u) {
1957
1965
  return Reflect.get(a, f, u);
1958
1966
  }
1959
- })) : i;
1967
+ })) : s;
1960
1968
  };
1961
1969
  const n = this;
1962
- return o({ ...r.state });
1970
+ return i({ ...r.state });
1963
1971
  } catch {
1964
1972
  return {};
1965
1973
  }
1966
1974
  }
1967
1975
  _initWatchers(r) {
1968
1976
  this._runLogicWithinErrorBoundary(r, () => {
1969
- Ne(
1977
+ ze(
1970
1978
  this.context,
1971
1979
  this._watchers,
1972
1980
  r.watch || {}
1973
1981
  );
1974
1982
  });
1975
1983
  }
1976
- _triggerWatchers(r, o) {
1977
- Me(this.context, this._watchers, r, o);
1984
+ _triggerWatchers(r, i) {
1985
+ Me(this.context, this._watchers, r, i);
1978
1986
  }
1979
1987
  _applyProps(r) {
1980
1988
  this._runLogicWithinErrorBoundary(r, () => {
1981
1989
  try {
1982
1990
  We(this, r, this.context);
1983
- } catch (o) {
1984
- this._hasError = !0, r.onError && r.onError(o, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(o, this.context));
1991
+ } catch (i) {
1992
+ this._hasError = !0, r.onError && r.onError(i, this.context), r.errorFallback && this.shadowRoot && (this.shadowRoot.innerHTML = r.errorFallback(i, this.context));
1985
1993
  }
1986
1994
  });
1987
1995
  }
1988
1996
  };
1989
1997
  }
1990
- function ee(e, t = {}, r, o) {
1991
- const n = o ?? t.key;
1998
+ function ee(e, t = {}, r, i) {
1999
+ const n = i ?? t.key;
1992
2000
  return { tag: e, key: n, props: t, children: r };
1993
2001
  }
1994
- function ce(e) {
2002
+ function le(e) {
1995
2003
  return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
1996
2004
  }
1997
- function ie(e) {
1998
- return typeof e == "object" && e !== null && "tag" in e && !ce(e);
2005
+ function se(e) {
2006
+ return typeof e == "object" && e !== null && "tag" in e && !le(e);
1999
2007
  }
2000
- function pt(e, t) {
2008
+ function ht(e, t) {
2001
2009
  return e.key != null ? e : { ...e, key: t };
2002
2010
  }
2003
- function ht(e, t = [], r = {}) {
2004
- const o = {}, n = {}, i = {}, s = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2011
+ function gt(e, t = [], r = {}) {
2012
+ const i = {}, n = {}, s = {}, o = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
2005
2013
  let a;
2006
- for (; a = s.exec(e); ) {
2007
- const f = a[1], u = a[2], d = (a[4] || a[6]) ?? "", m = d.match(/^{{(\d+)}}$/);
2008
- let l = m ? t[Number(m[1])] ?? null : d;
2009
- m || (l === "true" ? l = !0 : l === "false" ? l = !1 : l === "null" ? l = null : isNaN(Number(l)) || (l = Number(l)));
2014
+ for (; a = o.exec(e); ) {
2015
+ const f = a[1], u = a[2], d = (a[4] || a[6]) ?? "", y = d.match(/^{{(\d+)}}$/);
2016
+ let c = y ? t[Number(y[1])] ?? null : d;
2017
+ y || (c === "true" ? c = !0 : c === "false" ? c = !1 : c === "null" ? c = null : isNaN(Number(c)) || (c = Number(c)));
2010
2018
  const h = ["model", "bind", "show", "class", "style"];
2011
2019
  if (f === ":") {
2012
- const [w, $] = u.split(":"), [v, ...b] = w.split(".");
2013
- if (h.includes(v)) {
2014
- const y = [...b], x = v === "model" && $ ? `model:${$}` : v;
2015
- i[x] = {
2016
- value: l,
2017
- modifiers: y,
2020
+ const [k, $] = u.split(":"), [w, ...b] = k.split(".");
2021
+ if (h.includes(w)) {
2022
+ const m = [...b], x = w === "model" && $ ? `model:${$}` : w;
2023
+ s[x] = {
2024
+ value: c,
2025
+ modifiers: m,
2018
2026
  arg: $
2019
2027
  };
2020
2028
  } else
2021
- n[u] = l;
2029
+ n[u] = c;
2022
2030
  } else if (f === "@") {
2023
- const w = "on" + u.charAt(0).toUpperCase() + u.slice(1);
2024
- o[w] = typeof l == "function" ? l : typeof r[l] == "function" ? r[l] : void 0;
2025
- } else u === "ref" ? o.ref = l : n[u] = l;
2031
+ const k = "on" + u.charAt(0).toUpperCase() + u.slice(1);
2032
+ i[k] = typeof c == "function" ? c : typeof r[c] == "function" ? r[c] : void 0;
2033
+ } else u === "ref" ? i.ref = c : n[u] = c;
2026
2034
  }
2027
- return { props: o, attrs: n, directives: i };
2035
+ return { props: i, attrs: n, directives: s };
2028
2036
  }
2029
- function gt(e, t, r) {
2030
- const o = te.length > 0 ? te[te.length - 1] : void 0, n = r ?? o;
2031
- function i(c, g) {
2032
- return ee("#text", {}, c, g);
2037
+ function mt(e, t, r) {
2038
+ const i = te.length > 0 ? te[te.length - 1] : void 0, n = r ?? i;
2039
+ function s(l, g) {
2040
+ return ee("#text", {}, l, g);
2033
2041
  }
2034
- let s = "";
2035
- for (let c = 0; c < e.length; c++)
2036
- s += e[c], c < t.length && (s += `{{${c}}}`);
2042
+ let o = "";
2043
+ for (let l = 0; l < e.length; l++)
2044
+ o += e[l], l < t.length && (o += `{{${l}}}`);
2037
2045
  const a = /<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, f = [];
2038
- let u, d = [], m = null, l = {}, h, w = 0, $ = [];
2039
- function v(c) {
2040
- !c || typeof c != "object" || ce(c) || (c.props || c.attrs ? (c.props && (l.props || (l.props = {}), Object.assign(l.props, c.props)), c.attrs && (l.attrs || (l.attrs = {}), Object.keys(c.attrs).forEach((g) => {
2041
- if (g === "style" && l.attrs.style) {
2042
- const p = l.attrs.style.replace(
2046
+ let u, d = [], y = null, c = {}, h, k = 0, $ = [];
2047
+ function w(l) {
2048
+ !l || typeof l != "object" || le(l) || (l.props || l.attrs ? (l.props && (c.props || (c.props = {}), Object.assign(c.props, l.props)), l.attrs && (c.attrs || (c.attrs = {}), Object.keys(l.attrs).forEach((g) => {
2049
+ if (g === "style" && c.attrs.style) {
2050
+ const p = c.attrs.style.replace(
2043
2051
  /;?\s*$/,
2044
2052
  ""
2045
- ), _ = c.attrs.style.replace(/^;?\s*/, "");
2046
- l.attrs.style = p + "; " + _;
2047
- } else if (g === "class" && l.attrs.class) {
2048
- const p = l.attrs.class.trim().split(/\s+/).filter(Boolean), _ = c.attrs.class.trim().split(/\s+/).filter(Boolean), E = [
2053
+ ), _ = l.attrs.style.replace(/^;?\s*/, "");
2054
+ c.attrs.style = p + "; " + _;
2055
+ } else if (g === "class" && c.attrs.class) {
2056
+ const p = c.attrs.class.trim().split(/\s+/).filter(Boolean), _ = l.attrs.class.trim().split(/\s+/).filter(Boolean), C = [
2049
2057
  .../* @__PURE__ */ new Set([...p, ..._])
2050
2058
  ];
2051
- l.attrs.class = E.join(" ");
2059
+ c.attrs.class = C.join(" ");
2052
2060
  } else
2053
- l.attrs[g] = c.attrs[g];
2054
- }))) : (l.props || (l.props = {}), Object.assign(l.props, c)));
2055
- }
2056
- function b(c, g) {
2057
- const p = m ? d : $;
2058
- if (ce(c)) {
2059
- const _ = c.key ?? g;
2060
- let E = c.children;
2061
+ c.attrs[g] = l.attrs[g];
2062
+ }))) : (c.props || (c.props = {}), Object.assign(c.props, l)));
2063
+ }
2064
+ function b(l, g) {
2065
+ const p = y ? d : $;
2066
+ if (le(l)) {
2067
+ const _ = l.key ?? g;
2068
+ let C = l.children;
2061
2069
  p.push({
2062
- ...c,
2070
+ ...l,
2063
2071
  key: _,
2064
- children: E
2072
+ children: C
2065
2073
  });
2066
2074
  return;
2067
2075
  }
2068
- if (ie(c)) {
2069
- p.push(pt(c, void 0));
2076
+ if (se(l)) {
2077
+ p.push(ht(l, void 0));
2070
2078
  return;
2071
2079
  }
2072
- if (Array.isArray(c)) {
2073
- if (c.length === 0) return;
2074
- for (let _ = 0; _ < c.length; _++) {
2075
- const E = c[_];
2076
- ce(E) || ie(E) || Array.isArray(E) ? b(E, `${g}-${_}`) : E !== null && typeof E == "object" ? v(E) : p.push(i(String(E), `${g}-${_}`));
2080
+ if (Array.isArray(l)) {
2081
+ if (l.length === 0) return;
2082
+ for (let _ = 0; _ < l.length; _++) {
2083
+ const C = l[_];
2084
+ le(C) || se(C) || Array.isArray(C) ? b(C, `${g}-${_}`) : C !== null && typeof C == "object" ? w(C) : p.push(s(String(C), `${g}-${_}`));
2077
2085
  }
2078
2086
  return;
2079
2087
  }
2080
- if (c !== null && typeof c == "object") {
2081
- v(c);
2088
+ if (l !== null && typeof l == "object") {
2089
+ w(l);
2082
2090
  return;
2083
2091
  }
2084
- p.push(i(String(c), g));
2092
+ p.push(s(String(l), g));
2085
2093
  }
2086
- const y = /* @__PURE__ */ new Set([
2094
+ const m = /* @__PURE__ */ new Set([
2087
2095
  "area",
2088
2096
  "base",
2089
2097
  "br",
@@ -2099,197 +2107,197 @@ function gt(e, t, r) {
2099
2107
  "track",
2100
2108
  "wbr"
2101
2109
  ]);
2102
- for (; u = a.exec(s); )
2110
+ for (; u = a.exec(o); )
2103
2111
  if (u[1]) {
2104
- const c = u[1], g = u[0][1] === "/", p = u[0][u[0].length - 2] === "/" || y.has(c), {
2112
+ const l = u[1], g = u[0][1] === "/", p = u[0][u[0].length - 2] === "/" || m.has(l), {
2105
2113
  props: _,
2106
- attrs: E,
2107
- directives: C
2108
- } = ht(u[2] || "", t, n), S = { props: {}, attrs: {} };
2114
+ attrs: C,
2115
+ directives: E
2116
+ } = gt(u[2] || "", t, n), S = { props: {}, attrs: {} };
2109
2117
  for (const A in _) S.props[A] = _[A];
2110
- for (const A in E) S.attrs[A] = E[A];
2111
- if (C && Object.keys(C).some((A) => A === "model" || A.startsWith("model:")))
2118
+ for (const A in C) S.attrs[A] = C[A];
2119
+ if (E && Object.keys(E).some((A) => A === "model" || A.startsWith("model:")))
2112
2120
  try {
2113
- const A = Symbol.for("cer.registry"), T = globalThis[A], Q = !!(T && typeof T.has == "function" && T.has(c)), X = !!(n && (n.__customElements instanceof Set && n.__customElements.has(c) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(c)));
2114
- if (!!(c.includes("-") || X || Q))
2115
- for (const I of Object.keys(C)) {
2121
+ const A = Symbol.for("cer.registry"), j = globalThis[A], Q = !!(j && typeof j.has == "function" && j.has(l)), X = !!(n && (n.__customElements instanceof Set && n.__customElements.has(l) || Array.isArray(n.__isCustomElements) && n.__isCustomElements.includes(l)));
2122
+ if (!!(l.includes("-") || X || Q))
2123
+ for (const I of Object.keys(E)) {
2116
2124
  if (I !== "model" && !I.startsWith("model:")) continue;
2117
- const Z = C[I], F = Z.arg ?? (I.includes(":") ? I.split(":", 2)[1] : void 0), L = Z.value, K = F ?? "modelValue", D = N, ne = se, k = n ? n._state || n : void 0;
2125
+ const Z = E[I], F = Z.arg ?? (I.includes(":") ? I.split(":", 2)[1] : void 0), L = Z.value, K = F ?? "modelValue", D = z, ne = oe, v = n ? n._state || n : void 0;
2118
2126
  let B;
2119
- typeof L == "string" && n ? B = D(k, L) : B = L, S.props[K] = B;
2127
+ typeof L == "string" && n ? B = D(v, L) : B = L, S.props[K] = B;
2120
2128
  try {
2121
- const j = J(K);
2122
- S.attrs || (S.attrs = {}), B !== void 0 && (S.attrs[j] = B);
2129
+ const T = J(K);
2130
+ S.attrs || (S.attrs = {}), B !== void 0 && (S.attrs[T] = B);
2123
2131
  } catch {
2124
2132
  }
2125
2133
  S.isCustomElement = !0;
2126
- const z = `update:${J(K)}`, O = "on" + z.charAt(0).toUpperCase() + z.slice(1);
2127
- S.props[O] = function(j) {
2128
- const R = j.detail !== void 0 ? j.detail : j.target ? j.target.value : void 0;
2129
- if (!k) return;
2130
- const pe = D(k, typeof L == "string" ? L : String(L));
2131
- (Array.isArray(R) && Array.isArray(pe) ? JSON.stringify([...R].sort()) !== JSON.stringify([...pe].sort()) : R !== pe) && (ne(k, typeof L == "string" ? L : String(L), R), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
2132
- }, delete C[I];
2134
+ const O = `update:${J(K)}`, P = "on" + O.charAt(0).toUpperCase() + O.slice(1);
2135
+ S.props[P] = function(T) {
2136
+ const R = T.detail !== void 0 ? T.detail : T.target ? T.target.value : void 0;
2137
+ if (!v) return;
2138
+ const pe = D(v, typeof L == "string" ? L : String(L));
2139
+ (Array.isArray(R) && Array.isArray(pe) ? JSON.stringify([...R].sort()) !== JSON.stringify([...pe].sort()) : R !== pe) && (ne(v, typeof L == "string" ? L : String(L), R), n?.requestRender ? n.requestRender() : n?._requestRender && n._requestRender());
2140
+ }, delete E[I];
2133
2141
  }
2134
2142
  } catch {
2135
2143
  }
2136
- if (Object.keys(C).length > 0 && (S.directives = { ...C }), g) {
2144
+ if (Object.keys(E).length > 0 && (S.directives = { ...E }), g) {
2137
2145
  const A = ee(
2138
- m,
2139
- l,
2140
- d.length === 1 && ie(d[0]) && d[0].tag === "#text" ? typeof d[0].children == "string" ? d[0].children : "" : d.length ? d : void 0,
2146
+ y,
2147
+ c,
2148
+ d.length === 1 && se(d[0]) && d[0].tag === "#text" ? typeof d[0].children == "string" ? d[0].children : "" : d.length ? d : void 0,
2141
2149
  h
2142
- ), T = f.pop();
2143
- T ? (m = T.tag, l = T.props, h = T.key, d = T.children, d.push(A)) : ($.push(A), m = null, l = {}, h = void 0, d = []);
2144
- } else p ? m ? d.push(ee(c, S, void 0, void 0)) : $.push(ee(c, S, void 0, void 0)) : (m && f.push({
2145
- tag: m,
2146
- props: l,
2150
+ ), j = f.pop();
2151
+ j ? (y = j.tag, c = j.props, h = j.key, d = j.children, d.push(A)) : ($.push(A), y = null, c = {}, h = void 0, d = []);
2152
+ } else p ? y ? d.push(ee(l, S, void 0, void 0)) : $.push(ee(l, S, void 0, void 0)) : (y && f.push({
2153
+ tag: y,
2154
+ props: c,
2147
2155
  children: d,
2148
2156
  key: h
2149
- }), m = c, l = S, d = []);
2157
+ }), y = l, c = S, d = []);
2150
2158
  } else if (typeof u[3] < "u") {
2151
- const c = Number(u[3]), g = t[c], p = `interp-${c}`;
2159
+ const l = Number(u[3]), g = t[l], p = `interp-${l}`;
2152
2160
  b(g, p);
2153
2161
  } else if (u[4]) {
2154
- const c = u[4], g = m ? d : $, p = c.split(/({{\d+}})/);
2162
+ const l = u[4], g = y ? d : $, p = l.split(/({{\d+}})/);
2155
2163
  for (const _ of p) {
2156
2164
  if (!_) continue;
2157
- const E = _.match(/^{{(\d+)}}$/);
2158
- if (E) {
2159
- const C = Number(E[1]), S = t[C], A = `interp-${C}`;
2165
+ const C = _.match(/^{{(\d+)}}$/);
2166
+ if (C) {
2167
+ const E = Number(C[1]), S = t[E], A = `interp-${E}`;
2160
2168
  b(S, A);
2161
2169
  } else {
2162
- const C = `text-${w++}`;
2163
- g.push(i(_, C));
2170
+ const E = `text-${k++}`;
2171
+ g.push(s(_, E));
2164
2172
  }
2165
2173
  }
2166
2174
  }
2167
- const x = $.filter((c) => ie(c) && c.tag === "#text" ? typeof c.children == "string" && c.children.trim() !== "" : !0);
2175
+ const x = $.filter((l) => se(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0);
2168
2176
  return x.length === 1 ? x[0] : x.length > 1 ? x : ee("div", {}, "", "fallback-root");
2169
2177
  }
2170
2178
  function U(e, ...t) {
2171
- const r = t[t.length - 1], o = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
2172
- return gt(e, t, o);
2179
+ const r = t[t.length - 1], i = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
2180
+ return mt(e, t, i);
2173
2181
  }
2174
- const je = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, W = (e, t) => {
2182
+ const Te = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, W = (e, t) => {
2175
2183
  for (const r of e) {
2176
- const o = [], n = r.path.replace(/:[^/]+/g, (a) => (o.push(a.slice(1)), "([^/]+)")), i = new RegExp(`^${n}$`), s = t.match(i);
2177
- if (s) {
2184
+ const i = [], n = r.path.replace(/:[^/]+/g, (a) => (i.push(a.slice(1)), "([^/]+)")), s = new RegExp(`^${n}$`), o = t.match(s);
2185
+ if (o) {
2178
2186
  const a = {};
2179
- return o.forEach((f, u) => {
2180
- a[f] = s[u + 1];
2187
+ return i.forEach((f, u) => {
2188
+ a[f] = o[u + 1];
2181
2189
  }), { route: r, params: a };
2182
2190
  }
2183
2191
  }
2184
2192
  return { route: null, params: {} };
2185
- }, we = {};
2193
+ }, ke = {};
2186
2194
  async function yt(e) {
2187
2195
  if (e.component) return e.component;
2188
2196
  if (e.load) {
2189
- if (we[e.path]) return we[e.path];
2197
+ if (ke[e.path]) return ke[e.path];
2190
2198
  try {
2191
2199
  const t = await e.load();
2192
- return we[e.path] = t.default, t.default;
2200
+ return ke[e.path] = t.default, t.default;
2193
2201
  } catch {
2194
2202
  throw new Error(`Failed to load component for route: ${e.path}`);
2195
2203
  }
2196
2204
  }
2197
2205
  throw new Error(`No component or loader defined for route: ${e.path}`);
2198
2206
  }
2199
- function mt(e) {
2200
- const { routes: t, base: r = "", initialUrl: o } = e;
2201
- let n, i, s, a, f, u, d;
2202
- const m = async ($, v) => {
2203
- const b = t.find((y) => W([y], $.path).route !== null);
2207
+ function bt(e) {
2208
+ const { routes: t, base: r = "", initialUrl: i } = e;
2209
+ let n, s, o, a, f, u, d;
2210
+ const y = async ($, w) => {
2211
+ const b = t.find((m) => W([m], $.path).route !== null);
2204
2212
  if (b?.beforeEnter)
2205
2213
  try {
2206
- const y = await b.beforeEnter($, v);
2207
- return typeof y == "string" ? (await w(y, !0), !1) : y !== !1;
2208
- } catch (y) {
2209
- return console.error("beforeEnter error", y), !1;
2214
+ const m = await b.beforeEnter($, w);
2215
+ return typeof m == "string" ? (await k(m, !0), !1) : m !== !1;
2216
+ } catch (m) {
2217
+ return console.error("beforeEnter error", m), !1;
2210
2218
  }
2211
2219
  return !0;
2212
- }, l = async ($, v) => {
2213
- const b = t.find((y) => W([y], $.path).route !== null);
2220
+ }, c = async ($, w) => {
2221
+ const b = t.find((m) => W([m], $.path).route !== null);
2214
2222
  if (b?.onEnter)
2215
2223
  try {
2216
- const y = await b.onEnter($, v);
2217
- return typeof y == "string" ? (await w(y, !0), !1) : y !== !1;
2218
- } catch (y) {
2219
- return console.error("onEnter error", y), !1;
2224
+ const m = await b.onEnter($, w);
2225
+ return typeof m == "string" ? (await k(m, !0), !1) : m !== !1;
2226
+ } catch (m) {
2227
+ return console.error("onEnter error", m), !1;
2220
2228
  }
2221
2229
  return !0;
2222
- }, h = ($, v) => {
2223
- const b = t.find((y) => W([y], $.path).route !== null);
2230
+ }, h = ($, w) => {
2231
+ const b = t.find((m) => W([m], $.path).route !== null);
2224
2232
  if (b?.afterEnter)
2225
2233
  try {
2226
- b.afterEnter($, v);
2227
- } catch (y) {
2228
- console.error("afterEnter error", y);
2234
+ b.afterEnter($, w);
2235
+ } catch (m) {
2236
+ console.error("afterEnter error", m);
2229
2237
  }
2230
- }, w = async ($, v = !1) => {
2238
+ }, k = async ($, w = !1) => {
2231
2239
  try {
2232
2240
  const b = {
2233
2241
  path: $.replace(r, "") || "/",
2234
2242
  query: {}
2235
- }, y = W(t, b.path);
2236
- if (!y) throw new Error(`No route found for ${b.path}`);
2237
- const x = s.getState(), c = {
2243
+ }, m = W(t, b.path);
2244
+ if (!m) throw new Error(`No route found for ${b.path}`);
2245
+ const x = o.getState(), l = {
2238
2246
  path: b.path,
2239
- params: y.params,
2247
+ params: m.params,
2240
2248
  query: b.query
2241
2249
  };
2242
- if (!await m(c, x) || !await l(c, x)) return;
2243
- typeof window < "u" && typeof document < "u" && (v ? window.history.replaceState({}, "", r + $) : window.history.pushState({}, "", r + $)), s.setState(c), h(c, x);
2250
+ if (!await y(l, x) || !await c(l, x)) return;
2251
+ typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + $) : window.history.pushState({}, "", r + $)), o.setState(l), h(l, x);
2244
2252
  } catch (b) {
2245
2253
  console.error("Navigation error:", b);
2246
2254
  }
2247
2255
  };
2248
2256
  if (typeof window < "u" && typeof document < "u") {
2249
2257
  n = () => {
2250
- const v = new URL(window.location.href), b = v.pathname.replace(r, "") || "/", y = je(v.search);
2251
- return { path: b, query: y };
2252
- }, i = n();
2253
- const $ = W(t, i.path);
2254
- s = $e({
2255
- path: i.path,
2258
+ const w = new URL(window.location.href), b = w.pathname.replace(r, "") || "/", m = Te(w.search);
2259
+ return { path: b, query: m };
2260
+ }, s = n();
2261
+ const $ = W(t, s.path);
2262
+ o = $e({
2263
+ path: s.path,
2256
2264
  params: $.params,
2257
- query: i.query
2258
- }), a = async (v = !1) => {
2265
+ query: s.query
2266
+ }), a = async (w = !1) => {
2259
2267
  const b = n();
2260
- await w(b.path, v);
2261
- }, window.addEventListener("popstate", () => a(!0)), f = (v) => w(v, !1), u = (v) => w(v, !0), d = () => window.history.back();
2268
+ await k(b.path, w);
2269
+ }, window.addEventListener("popstate", () => a(!0)), f = (w) => k(w, !1), u = (w) => k(w, !0), d = () => window.history.back();
2262
2270
  } else {
2263
2271
  n = () => {
2264
- const b = new URL(o || "/", "http://localhost"), y = b.pathname.replace(r, "") || "/", x = je(b.search);
2265
- return { path: y, query: x };
2266
- }, i = n();
2267
- const $ = W(t, i.path);
2268
- s = $e({
2269
- path: i.path,
2272
+ const b = new URL(i || "/", "http://localhost"), m = b.pathname.replace(r, "") || "/", x = Te(b.search);
2273
+ return { path: m, query: x };
2274
+ }, s = n();
2275
+ const $ = W(t, s.path);
2276
+ o = $e({
2277
+ path: s.path,
2270
2278
  params: $.params,
2271
- query: i.query
2279
+ query: s.query
2272
2280
  }), a = async () => {
2273
2281
  const b = n();
2274
- await v(b.path);
2282
+ await w(b.path);
2275
2283
  };
2276
- const v = async (b) => {
2284
+ const w = async (b) => {
2277
2285
  try {
2278
- const y = {
2286
+ const m = {
2279
2287
  path: b.replace(r, "") || "/",
2280
2288
  query: {}
2281
- }, x = W(t, y.path);
2282
- if (!x) throw new Error(`No route found for ${y.path}`);
2283
- const c = s.getState(), g = {
2284
- path: y.path,
2289
+ }, x = W(t, m.path);
2290
+ if (!x) throw new Error(`No route found for ${m.path}`);
2291
+ const l = o.getState(), g = {
2292
+ path: m.path,
2285
2293
  params: x.params,
2286
- query: y.query
2294
+ query: m.query
2287
2295
  }, p = t.find((_) => W([_], g.path).route !== null);
2288
2296
  if (p?.beforeEnter)
2289
2297
  try {
2290
- const _ = await p.beforeEnter(g, c);
2298
+ const _ = await p.beforeEnter(g, l);
2291
2299
  if (typeof _ == "string") {
2292
- await v(_);
2300
+ await w(_);
2293
2301
  return;
2294
2302
  }
2295
2303
  if (_ === !1) return;
@@ -2298,53 +2306,53 @@ function mt(e) {
2298
2306
  }
2299
2307
  if (p?.onEnter)
2300
2308
  try {
2301
- const _ = await p.onEnter(g, c);
2309
+ const _ = await p.onEnter(g, l);
2302
2310
  if (typeof _ == "string") {
2303
- await v(_);
2311
+ await w(_);
2304
2312
  return;
2305
2313
  }
2306
2314
  if (_ === !1) return;
2307
2315
  } catch {
2308
2316
  return;
2309
2317
  }
2310
- if (s.setState(g), p?.afterEnter)
2318
+ if (o.setState(g), p?.afterEnter)
2311
2319
  try {
2312
- p.afterEnter(g, c);
2320
+ p.afterEnter(g, l);
2313
2321
  } catch {
2314
2322
  }
2315
2323
  } catch {
2316
2324
  }
2317
2325
  };
2318
- f = async (b) => v(b), u = async (b) => v(b), d = () => {
2326
+ f = async (b) => w(b), u = async (b) => w(b), d = () => {
2319
2327
  };
2320
2328
  }
2321
2329
  return {
2322
- store: s,
2330
+ store: o,
2323
2331
  push: f,
2324
2332
  replace: u,
2325
2333
  back: d,
2326
- subscribe: s.subscribe,
2334
+ subscribe: o.subscribe,
2327
2335
  matchRoute: ($) => W(t, $),
2328
- getCurrent: () => s.getState(),
2336
+ getCurrent: () => o.getState(),
2329
2337
  resolveRouteComponent: yt
2330
2338
  };
2331
2339
  }
2332
2340
  function Ct(e, t) {
2333
2341
  return W(e, t);
2334
2342
  }
2335
- function Et(e) {
2336
- const t = mt(e);
2337
- return Te("router-view", {
2343
+ function At(e) {
2344
+ const t = bt(e);
2345
+ return je("router-view", {
2338
2346
  async render() {
2339
2347
  if (!t) return U`<div>Router not initialized.</div>`;
2340
- const r = t.getCurrent(), { path: o } = r, n = t.matchRoute(o);
2348
+ const r = t.getCurrent(), { path: i } = r, n = t.matchRoute(i);
2341
2349
  if (!n.route) return U`<div>Not found</div>`;
2342
2350
  try {
2343
- const i = await t.resolveRouteComponent(n.route);
2344
- if (typeof i == "string")
2345
- return { tag: i, props: {}, children: [] };
2346
- if (typeof i == "function") {
2347
- const s = i(), a = s instanceof Promise ? await s : s;
2351
+ const s = await t.resolveRouteComponent(n.route);
2352
+ if (typeof s == "string")
2353
+ return { tag: s, props: {}, children: [] };
2354
+ if (typeof s == "function") {
2355
+ const o = s(), a = o instanceof Promise ? await o : o;
2348
2356
  return typeof a == "string" ? { tag: a, props: {}, children: [] } : a;
2349
2357
  }
2350
2358
  return U`<div>Invalid route component</div>`;
@@ -2357,7 +2365,7 @@ function Et(e) {
2357
2365
  typeof r.requestRender == "function" && r.requestRender();
2358
2366
  });
2359
2367
  }
2360
- }), Te("router-link", {
2368
+ }), je("router-link", {
2361
2369
  state: {},
2362
2370
  props: {
2363
2371
  to: { type: String, default: "" },
@@ -2370,7 +2378,7 @@ function Et(e) {
2370
2378
  disabled: { type: Boolean, default: !1 },
2371
2379
  external: { type: Boolean, default: !1 },
2372
2380
  class: { type: String, default: "" },
2373
- style: { type: String, default: ze`
2381
+ style: { type: String, default: Oe`
2374
2382
  [aria-disabled="true"] {
2375
2383
  pointer-events: none;
2376
2384
  opacity: 0.5;
@@ -2379,22 +2387,22 @@ function Et(e) {
2379
2387
  },
2380
2388
  style: (r) => r.style,
2381
2389
  render: (r) => {
2382
- const o = t.getCurrent(), n = r.to, i = r.exact, s = r.exactActiveClass, a = r.activeClass, f = r.ariaCurrentValue, u = r.tag, d = r.disabled, m = r.external, l = o.path === n, h = i ? l : o && typeof o.path == "string" ? o.path.startsWith(n) : !1, w = l ? `aria-current="${f}"` : "", $ = (r.class || "").split(/\s+/).filter(Boolean), v = {};
2383
- for (const g of $) v[g] = !0;
2390
+ const i = t.getCurrent(), n = r.to, s = r.exact, o = r.exactActiveClass, a = r.activeClass, f = r.ariaCurrentValue, u = r.tag, d = r.disabled, y = r.external, c = i.path === n, h = s ? c : i && typeof i.path == "string" ? i.path.startsWith(n) : !1, k = c ? `aria-current="${f}"` : "", $ = (r.class || "").split(/\s+/).filter(Boolean), w = {};
2391
+ for (const g of $) w[g] = !0;
2384
2392
  const b = {
2385
- ...v,
2393
+ ...w,
2386
2394
  // Also include the configurable names (may duplicate the above)
2387
2395
  [a]: h,
2388
- [s]: l
2389
- }, y = u === "button", x = d ? y ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", c = m && (u === "a" || !u) ? 'target="_blank" rel="noopener noreferrer"' : "";
2396
+ [o]: c
2397
+ }, m = u === "button", x = d ? m ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", l = y && (u === "a" || !u) ? 'target="_blank" rel="noopener noreferrer"' : "";
2390
2398
  return U`
2391
- ${Oe().when(y, U`
2399
+ ${Pe().when(m, U`
2392
2400
  <button
2393
2401
  part="button"
2394
2402
  :class="${b}"
2395
- ${w}
2403
+ ${k}
2396
2404
  ${x}
2397
- ${c}
2405
+ ${l}
2398
2406
  @click="navigate"
2399
2407
  ><slot></slot></button>
2400
2408
  `).otherwise(U`
@@ -2402,44 +2410,44 @@ function Et(e) {
2402
2410
  part="link"
2403
2411
  href="${n}"
2404
2412
  :class="${b}"
2405
- ${w}
2413
+ ${k}
2406
2414
  ${x}
2407
- ${c}
2415
+ ${l}
2408
2416
  @click="navigate"
2409
2417
  ><slot></slot></a>
2410
2418
  `).done()}
2411
2419
  `;
2412
2420
  },
2413
- navigate: (r, o) => {
2414
- if (o.disabled) {
2421
+ navigate: (r, i) => {
2422
+ if (i.disabled) {
2415
2423
  r.preventDefault();
2416
2424
  return;
2417
2425
  }
2418
- o.external && (o.tag === "a" || !o.tag) || (r.preventDefault(), o.replace ? t.replace(o.to) : t.push(o.to));
2426
+ i.external && (i.tag === "a" || !i.tag) || (r.preventDefault(), i.replace ? t.replace(i.to) : t.push(i.to));
2419
2427
  }
2420
2428
  }), t;
2421
2429
  }
2422
2430
  export {
2423
2431
  G as GlobalEventBus,
2424
- Te as component,
2432
+ je as component,
2425
2433
  $e as createStore,
2426
- ze as css,
2427
- xt as each,
2428
- wt as emit,
2434
+ Oe as css,
2435
+ kt as each,
2436
+ vt as emit,
2429
2437
  re as eventBus,
2430
2438
  U as html,
2431
- Et as initRouter,
2432
- St as listen,
2433
- Oe as match,
2439
+ At as initRouter,
2440
+ Et as listen,
2441
+ Pe as match,
2434
2442
  W as matchRoute,
2435
2443
  Ct as matchRouteSSR,
2436
- $t as off,
2437
- kt as on,
2438
- _t as once,
2439
- je as parseQuery,
2444
+ _t as off,
2445
+ $t as on,
2446
+ St as once,
2447
+ Te as parseQuery,
2440
2448
  he as renderToString,
2441
2449
  yt as resolveRouteComponent,
2442
- mt as useRouter,
2443
- vt as when
2450
+ bt as useRouter,
2451
+ xt as when
2444
2452
  };
2445
2453
  //# sourceMappingURL=custom-elements-runtime.es.js.map