@jasonshimmy/custom-elements-runtime 2.3.0 → 2.4.0

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,267 +1,273 @@
1
- import { component as O, html as S, useOnConnected as N, useOnDisconnected as j, useProps as W, useStyle as F } from "./custom-elements-runtime.es.js";
2
- import { r as _, c as g } from "./namespace-helpers-Dw1mgQab.js";
3
- import { createStore as B } from "./custom-elements-runtime.store.es.js";
4
- import { d as C, a as $ } from "./logger-BuUYv7C_.js";
5
- import { match as M } from "./custom-elements-runtime.directives.es.js";
6
- const T = (n) => n ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(n)) : {}, U = /* @__PURE__ */ new WeakMap();
7
- function V(n) {
1
+ import { component as T, html as P, useOnConnected as U, useOnDisconnected as W, useProps as M, useStyle as V } from "./custom-elements-runtime.es.js";
2
+ import { r as O, c as b } from "./namespace-helpers-Dw1mgQab.js";
3
+ import { createStore as D } from "./custom-elements-runtime.store.es.js";
4
+ import { d as A, a as $ } from "./logger-BuUYv7C_.js";
5
+ import { match as z } from "./custom-elements-runtime.directives.es.js";
6
+ const I = (n) => n ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(n)) : {}, F = /* @__PURE__ */ new WeakMap();
7
+ function H(n) {
8
8
  return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
9
9
  }
10
- function D(n) {
10
+ function _(n) {
11
11
  if (!n) return "/";
12
12
  let r = n.replace(/\/+/g, "/");
13
13
  return r.startsWith("/") || (r = "/" + r), r.length > 1 && r.endsWith("/") && (r = r.slice(0, -1)), r;
14
14
  }
15
- function z(n) {
16
- const r = n.path || "/", t = D(r), f = t === "/" ? [] : t.split("/").filter(Boolean), s = [], i = [];
17
- for (let c = 0; c < f.length; c++) {
18
- const d = f[c];
15
+ function Q(n) {
16
+ const r = n.path || "/", t = _(r), h = t === "/" ? [] : t.split("/").filter(Boolean), o = [], s = [];
17
+ for (let u = 0; u < h.length; u++) {
18
+ const d = h[u];
19
19
  if (d === "*") {
20
- if (c !== f.length - 1)
20
+ if (u !== h.length - 1)
21
21
  return $(
22
22
  `Route '${n.path}' contains a '*' splat in a non-terminal position; splats must be the last segment. This route will be ignored.`
23
23
  ), { invalid: !0 };
24
- const p = `splat${s.length}`;
25
- s.push(p), i.push("__SPLAT__");
24
+ const p = `splat${o.length}`;
25
+ o.push(p), s.push("__SPLAT__");
26
26
  continue;
27
27
  }
28
- const w = d.match(/^:([A-Za-z0-9_-]+)(\*)?$/);
29
- if (w) {
30
- const p = w[1], b = !!w[2];
31
- if (b && c !== f.length - 1)
28
+ const y = d.match(/^:([A-Za-z0-9_-]+)(\*)?$/);
29
+ if (y) {
30
+ const p = y[1], w = !!y[2];
31
+ if (w && u !== h.length - 1)
32
32
  return $(
33
33
  `Route '${n.path}' contains a splat param ':${p}*' in a non-terminal position; splats must be the last segment. This route will be ignored.`
34
34
  ), { invalid: !0 };
35
- s.push(p), i.push(b ? "__SPLAT__" : "([^/]+)");
35
+ o.push(p), s.push(w ? "__SPLAT__" : "([^/]+)");
36
36
  continue;
37
37
  }
38
- i.push(V(d));
38
+ s.push(H(d));
39
39
  }
40
- let o;
41
- if (i.length === 0)
42
- o = "^/$";
43
- else if (i[i.length - 1] === "__SPLAT__") {
44
- const d = i.slice(0, -1).join("/");
45
- d ? o = `^/${d}(?:/(.*))?(?:/)?$` : o = "^(?:/(.*))?(?:/)?$";
40
+ let c;
41
+ if (s.length === 0)
42
+ c = "^/$";
43
+ else if (s[s.length - 1] === "__SPLAT__") {
44
+ const d = s.slice(0, -1).join("/");
45
+ d ? c = `^/${d}(?:/(.*))?(?:/)?$` : c = "^(?:/(.*))?(?:/)?$";
46
46
  } else
47
- o = `^/${i.join("/")}(?:/)?$`;
47
+ c = `^/${s.join("/")}(?:/)?$`;
48
48
  try {
49
- return { regex: new RegExp(o), paramNames: s };
50
- } catch (c) {
51
- return $(`Failed to compile route regex for '${n.path}': ${String(c)}`), { invalid: !0 };
49
+ return { regex: new RegExp(c), paramNames: o };
50
+ } catch (u) {
51
+ return $(`Failed to compile route regex for '${n.path}': ${String(u)}`), { invalid: !0 };
52
52
  }
53
53
  }
54
- const x = (n, r) => {
55
- const t = D(r);
56
- for (const f of n) {
57
- let s = U.get(f);
58
- if (s || (s = z(f), U.set(f, s)), s.invalid) continue;
59
- const { regex: i, paramNames: o } = s, c = i.exec(t);
60
- if (c) {
61
- const d = {}, w = (p) => {
54
+ const C = (n, r) => {
55
+ const t = _(r);
56
+ for (const h of n) {
57
+ let o = F.get(h);
58
+ if (o || (o = Q(h), F.set(h, o)), o.invalid) continue;
59
+ const { regex: s, paramNames: c } = o, u = s.exec(t);
60
+ if (u) {
61
+ const d = {}, y = (p) => {
62
62
  try {
63
63
  return decodeURIComponent(p);
64
64
  } catch {
65
65
  return p;
66
66
  }
67
67
  };
68
- for (let p = 0; p < o.length; p++) {
69
- const b = c[p + 1] || "";
70
- d[o[p]] = b ? w(b) : "";
68
+ for (let p = 0; p < c.length; p++) {
69
+ const w = u[p + 1] || "";
70
+ d[c[p]] = w ? y(w) : "";
71
71
  }
72
- return { route: f, params: d };
72
+ return { route: h, params: d };
73
73
  }
74
74
  }
75
75
  return { route: null, params: {} };
76
76
  };
77
- function A(n, r) {
77
+ function L(n, r) {
78
78
  for (const t of n)
79
- if (x([t], r).route !== null) return t;
79
+ if (C([t], r).route !== null) return t;
80
80
  return null;
81
81
  }
82
- const L = {};
83
- async function H(n) {
82
+ const j = {};
83
+ async function Z(n) {
84
84
  if (n.component) return n.component;
85
85
  if (n.load) {
86
- if (L[n.path]) return L[n.path];
86
+ if (j[n.path]) return j[n.path];
87
87
  try {
88
88
  const r = await n.load();
89
- return L[n.path] = r.default, r.default;
89
+ return j[n.path] = r.default, r.default;
90
90
  } catch {
91
91
  throw new Error(`Failed to load component for route: ${n.path}`);
92
92
  }
93
93
  }
94
94
  throw new Error(`No component or loader defined for route: ${n.path}`);
95
95
  }
96
- function I(n) {
97
- const { routes: r, base: t = "", initialUrl: f } = n;
98
- let s, i, o, c, d, w, p;
99
- const b = async (u, l) => {
100
- const e = A(r, u.path);
96
+ function G(n) {
97
+ const { routes: r, base: t = "", initialUrl: h } = n;
98
+ let o, s, c, u, d, y, p;
99
+ const w = async (f, i) => {
100
+ const e = L(r, f.path);
101
101
  if (!e || !e.beforeEnter) return !0;
102
102
  try {
103
- const a = await e.beforeEnter(u, l);
103
+ const a = await e.beforeEnter(f, i);
104
104
  return typeof a == "string" ? (await R(a, !0), !1) : a !== !1;
105
105
  } catch (a) {
106
- return C("beforeEnter error", a), !1;
106
+ return A("beforeEnter error", a), !1;
107
107
  }
108
- }, k = async (u, l) => {
109
- const e = A(r, u.path);
108
+ }, q = async (f, i) => {
109
+ const e = L(r, f.path);
110
110
  if (!e || !e.onEnter) return !0;
111
111
  try {
112
- const a = await e.onEnter(u, l);
112
+ const a = await e.onEnter(f, i);
113
113
  return typeof a == "string" ? (await R(a, !0), !1) : a !== !1;
114
114
  } catch (a) {
115
- return C("onEnter error", a), !1;
115
+ return A("onEnter error", a), !1;
116
116
  }
117
- }, q = (u, l) => {
118
- const e = A(r, u.path);
117
+ }, N = (f, i) => {
118
+ const e = L(r, f.path);
119
119
  if (!(!e || !e.afterEnter))
120
120
  try {
121
- e.afterEnter(u, l);
121
+ e.afterEnter(f, i);
122
122
  } catch (a) {
123
- C("afterEnter error", a);
123
+ A("afterEnter error", a);
124
124
  }
125
- }, R = async (u, l = !1) => {
125
+ }, R = async (f, i = !1) => {
126
126
  try {
127
- const e = {
128
- path: u.replace(t, "") || "/",
129
- query: {}
130
- }, a = x(r, e.path);
131
- if (!a.route) throw new Error(`No route found for ${e.path}`);
132
- const m = o.getState(), h = {
133
- path: e.path,
134
- params: a.params,
135
- query: e.query
127
+ const e = f.indexOf("#"), a = e >= 0 ? f.slice(e + 1) : "", l = {
128
+ path: (e >= 0 ? f.slice(0, e) : f).replace(t, "") || "/",
129
+ query: {},
130
+ fragment: a
131
+ }, m = C(r, l.path);
132
+ if (!m.route) throw new Error(`No route found for ${l.path}`);
133
+ const v = c.getState(), E = {
134
+ path: l.path,
135
+ params: m.params,
136
+ query: l.query,
137
+ fragment: l.fragment
136
138
  };
137
- if (!await b(h, m) || !await k(h, m)) return;
138
- typeof window < "u" && typeof document < "u" && (l ? window.history.replaceState({}, "", t + u) : window.history.pushState({}, "", t + u)), o.setState(h), q(h, m);
139
+ if (!await w(E, v) || !await q(E, v)) return;
140
+ typeof window < "u" && typeof document < "u" && (i ? window.history.replaceState({}, "", t + f) : window.history.pushState({}, "", t + f)), c.setState(E), N(E, v);
139
141
  } catch (e) {
140
- C("Navigation error:", e);
142
+ A("Navigation error:", e);
141
143
  }
142
144
  };
143
- if (typeof window < "u" && typeof document < "u" && typeof f > "u") {
144
- s = () => {
145
- const l = new URL(window.location.href), e = l.pathname.replace(t, "") || "/", a = T(l.search);
146
- return { path: e, query: a };
147
- }, i = s();
148
- const u = x(r, i.path);
149
- o = B({
150
- path: i.path,
151
- params: u.params,
152
- query: i.query
153
- }), c = async (l = !1) => {
154
- const e = s();
155
- await R(e.path, l);
156
- }, window.addEventListener("popstate", () => c(!0)), d = (l) => R(l, !1), w = (l) => R(l, !0), p = () => window.history.back();
145
+ if (typeof window < "u" && typeof document < "u" && typeof h > "u") {
146
+ o = () => {
147
+ const i = new URL(window.location.href), e = i.pathname.replace(t, "") || "/", a = I(i.search), g = i.hash && i.hash.length ? i.hash.slice(1) : "";
148
+ return { path: e, query: a, fragment: g };
149
+ }, s = o();
150
+ const f = C(r, s.path);
151
+ c = D({
152
+ path: s.path,
153
+ params: f.params,
154
+ query: s.query,
155
+ fragment: s.fragment
156
+ }), u = async (i = !1) => {
157
+ const e = o();
158
+ await R(e.path, i);
159
+ }, window.addEventListener("popstate", () => u(!0)), d = (i) => R(i, !1), y = (i) => R(i, !0), p = () => window.history.back();
157
160
  } else {
158
- s = () => {
159
- const e = new URL(f || "/", "http://localhost"), a = e.pathname.replace(t, "") || "/", m = T(e.search);
160
- return { path: a, query: m };
161
- }, i = s();
162
- const u = x(r, i.path);
163
- o = B({
164
- path: i.path,
165
- params: u.params,
166
- query: i.query
167
- }), c = async () => {
168
- const e = s();
169
- await l(e.path);
161
+ o = () => {
162
+ const e = new URL(h || "/", "http://localhost"), a = e.pathname.replace(t, "") || "/", g = I(e.search), l = e.hash && e.hash.length ? e.hash.slice(1) : "";
163
+ return { path: a, query: g, fragment: l };
164
+ }, s = o();
165
+ const f = C(r, s.path);
166
+ c = D({
167
+ path: s.path,
168
+ params: f.params,
169
+ query: s.query,
170
+ fragment: s.fragment
171
+ }), u = async () => {
172
+ const e = o();
173
+ await i(e.path);
170
174
  };
171
- const l = async (e) => {
175
+ const i = async (e) => {
172
176
  try {
173
- const a = {
174
- path: e.replace(t, "") || "/",
175
- query: {}
176
- }, m = x(r, a.path);
177
- if (!m.route) throw new Error(`No route found for ${a.path}`);
178
- const h = o.getState(), v = {
179
- path: a.path,
180
- params: m.params,
181
- query: a.query
182
- }, y = A(r, v.path);
183
- if (y?.beforeEnter) {
184
- const E = await y.beforeEnter(v, h);
185
- if (typeof E == "string") {
186
- await l(E);
177
+ const a = e.indexOf("#"), g = a >= 0 ? e.slice(a + 1) : "", m = {
178
+ path: (a >= 0 ? e.slice(0, a) : e).replace(t, "") || "/",
179
+ query: {},
180
+ fragment: g
181
+ }, v = C(r, m.path);
182
+ if (!v.route) throw new Error(`No route found for ${m.path}`);
183
+ const E = c.getState(), k = {
184
+ path: m.path,
185
+ params: v.params,
186
+ query: m.query,
187
+ fragment: m.fragment
188
+ }, x = L(r, k.path);
189
+ if (x?.beforeEnter) {
190
+ const S = await x.beforeEnter(k, E);
191
+ if (typeof S == "string") {
192
+ await i(S);
187
193
  return;
188
194
  }
189
- if (E === !1) return;
195
+ if (S === !1) return;
190
196
  }
191
- if (y?.onEnter) {
192
- const E = await y.onEnter(v, h);
193
- if (typeof E == "string") {
194
- await l(E);
197
+ if (x?.onEnter) {
198
+ const S = await x.onEnter(k, E);
199
+ if (typeof S == "string") {
200
+ await i(S);
195
201
  return;
196
202
  }
197
- if (E === !1) return;
203
+ if (S === !1) return;
198
204
  }
199
- o.setState(v), y?.afterEnter && y.afterEnter(v, h);
205
+ c.setState(k), x?.afterEnter && x.afterEnter(k, E);
200
206
  } catch (a) {
201
- throw C("SSR navigation error:", a), a;
207
+ throw A("SSR navigation error:", a), a;
202
208
  }
203
209
  };
204
- d = async (e) => l(e), w = async (e) => l(e), p = () => {
210
+ d = async (e) => i(e), y = async (e) => i(e), p = () => {
205
211
  };
206
212
  }
207
213
  return {
208
- store: o,
214
+ store: c,
209
215
  push: d,
210
- replace: w,
216
+ replace: y,
211
217
  back: p,
212
- subscribe: o.subscribe,
213
- matchRoute: (u) => x(r, u),
214
- getCurrent: () => o.getState(),
215
- resolveRouteComponent: H
218
+ subscribe: c.subscribe,
219
+ matchRoute: (f) => C(r, f),
220
+ getCurrent: () => c.getState(),
221
+ resolveRouteComponent: Z
216
222
  };
217
223
  }
218
- function X(n, r) {
219
- return x(n, r);
224
+ function et(n, r) {
225
+ return C(n, r);
220
226
  }
221
- let P = null;
222
- function Y(n) {
223
- const r = I(n);
224
- return P = r, O("router-view", async () => {
225
- const t = P || r;
226
- if (!t) return S`<div>Router not initialized.</div>`;
227
- const f = _(t.getCurrent());
228
- let s;
229
- N(() => {
227
+ let B = null;
228
+ function rt(n) {
229
+ const r = G(n);
230
+ return B = r, T("router-view", async () => {
231
+ const t = B || r;
232
+ if (!t) return P`<div>Router not initialized.</div>`;
233
+ const h = O(t.getCurrent());
234
+ let o;
235
+ U(() => {
230
236
  try {
231
- t && typeof t.subscribe == "function" && (s = t.subscribe((o) => {
237
+ t && typeof t.subscribe == "function" && (o = t.subscribe((c) => {
232
238
  try {
233
- f.value = o;
234
- } catch (c) {
235
- $("router-view subscription update failed", c);
239
+ h.value = c;
240
+ } catch (u) {
241
+ $("router-view subscription update failed", u);
236
242
  }
237
243
  }));
238
- } catch (o) {
239
- $("router-view subscribe failed", o);
244
+ } catch (c) {
245
+ $("router-view subscribe failed", c);
240
246
  }
241
- }), j(() => {
242
- if (typeof s == "function")
247
+ }), W(() => {
248
+ if (typeof o == "function")
243
249
  try {
244
- s();
245
- } catch (o) {
246
- $("router-view unsubscribe failed", o);
250
+ o();
251
+ } catch (c) {
252
+ $("router-view unsubscribe failed", c);
247
253
  }
248
254
  });
249
- const i = t.matchRoute(f.value.path);
250
- if (!i || !i.route) return S`<div>Not found</div>`;
255
+ const s = t.matchRoute(h.value.path);
256
+ if (!s || !s.route) return P`<div>Not found</div>`;
251
257
  try {
252
- const c = await t.resolveRouteComponent(i.route);
253
- if (typeof c == "string")
254
- return { tag: c, props: {}, children: [] };
255
- if (typeof c == "function") {
256
- const d = c();
258
+ const u = await t.resolveRouteComponent(s.route);
259
+ if (typeof u == "string")
260
+ return { tag: u, props: {}, children: [] };
261
+ if (typeof u == "function") {
262
+ const d = u();
257
263
  return (d instanceof Promise ? d : Promise.resolve(d)).then((p) => typeof p == "string" ? { tag: p, props: {}, children: [] } : p);
258
264
  }
259
- return S`<div>Invalid route component</div>`;
265
+ return P`<div>Invalid route component</div>`;
260
266
  } catch {
261
- return S`<div>Invalid route component</div>`;
267
+ return P`<div>Invalid route component</div>`;
262
268
  }
263
- }), O("router-link", () => {
264
- const t = W({
269
+ }), T("router-link", () => {
270
+ const t = M({
265
271
  to: "",
266
272
  tag: "a",
267
273
  replace: !1,
@@ -274,94 +280,106 @@ function Y(n) {
274
280
  // allow host `class` and `style` attributes to be read via useProps
275
281
  class: "",
276
282
  style: ""
277
- }), f = P || r, s = _(f.getCurrent());
278
- let i;
279
- F(() => "a,button{display:inline-block;}");
280
- const o = _(t.class || ""), c = _(t.style || "");
281
- N((m) => {
283
+ }), h = B || r, o = O(h.getCurrent());
284
+ let s;
285
+ V(() => "a,button{display:inline-block;}");
286
+ const c = O(t.class || ""), u = O(t.style || "");
287
+ U((g) => {
282
288
  try {
283
- f && typeof f.subscribe == "function" && (i = f.subscribe((h) => {
289
+ h && typeof h.subscribe == "function" && (s = h.subscribe((l) => {
284
290
  try {
285
- s.value = h;
286
- } catch (v) {
287
- $("router-link subscription update failed", v);
291
+ o.value = l;
292
+ } catch (m) {
293
+ $("router-link subscription update failed", m);
288
294
  }
289
295
  }));
290
- } catch (h) {
291
- $("router-link subscribe failed", h);
296
+ } catch (l) {
297
+ $("router-link subscribe failed", l);
292
298
  }
293
299
  try {
294
- const h = m?._host;
295
- if (h instanceof HTMLElement) {
296
- const v = h.getAttribute("class"), y = h.getAttribute("style");
297
- v && (o.value = v), y && (c.value = y), v !== null && h.removeAttribute("class"), y !== null && h.removeAttribute("style");
300
+ const l = g?._host;
301
+ if (l instanceof HTMLElement) {
302
+ const m = l.getAttribute("class"), v = l.getAttribute("style");
303
+ m && (c.value = m), v && (u.value = v), m !== null && l.removeAttribute("class"), v !== null && l.removeAttribute("style");
298
304
  }
299
- } catch (h) {
300
- $("router-link host migration failed", h);
305
+ } catch (l) {
306
+ $("router-link host migration failed", l);
301
307
  }
302
- }), j(() => {
303
- if (typeof i == "function")
308
+ }), W(() => {
309
+ if (typeof s == "function")
304
310
  try {
305
- i();
306
- } catch (m) {
307
- $("router-link unsubscribe failed", m);
311
+ s();
312
+ } catch (g) {
313
+ $("router-link unsubscribe failed", g);
308
314
  }
309
315
  });
310
- const d = g(
311
- () => s.value.path === t.to
312
- ), w = g(
313
- () => t.exact ? d.value : s.value && typeof s.value.path == "string" ? s.value.path.startsWith(t.to) : !1
314
- ), p = g(() => {
315
- const h = (o && o.value || t.class || "").split(/\s+/).filter(Boolean), v = {};
316
- for (const y of h) v[y] = !0;
317
- return v;
318
- }), b = g(() => ({
316
+ const d = b(() => {
317
+ const l = (t.to || "").split("#")[0];
318
+ try {
319
+ return _(o.value.path) === _(l);
320
+ } catch {
321
+ return o.value.path === l;
322
+ }
323
+ }), y = b(() => {
324
+ const l = (t.to || "").split("#")[0];
325
+ if (t.exact) return d.value;
326
+ try {
327
+ const m = _(o.value.path), v = _(l);
328
+ return m.startsWith(v);
329
+ } catch {
330
+ return o.value && typeof o.value.path == "string" && o.value.path.startsWith(l);
331
+ }
332
+ }), p = b(() => {
333
+ const l = (c && c.value || t.class || "").split(/\s+/).filter(Boolean), m = {};
334
+ for (const v of l) m[v] = !0;
335
+ return m;
336
+ }), w = b(() => ({
319
337
  ...p.value,
320
- [t.activeClass || "active"]: w.value,
338
+ [t.activeClass || "active"]: y.value,
321
339
  [t.exactActiveClass || "exact-active"]: d.value
322
- })), k = g(
323
- () => Object.keys(b.value).filter((m) => b.value[m]).join(" ")
324
- ), q = g(() => t.tag === "button"), R = g(
340
+ })), q = b(
341
+ () => Object.keys(w.value).filter((g) => w.value[g]).join(" ")
342
+ ), N = b(() => t.tag === "button"), R = b(
325
343
  () => d.value ? t.ariaCurrentValue : ""
326
- ), u = g(() => !!t.disabled), l = g(
344
+ ), f = b(() => !!t.disabled), i = b(
327
345
  () => !!t.external && (t.tag === "a" || !t.tag)
328
- ), e = g(
329
- () => c && c.value || t.style || ""
330
- ), a = (m) => {
346
+ ), e = b(
347
+ () => u && u.value || t.style || ""
348
+ ), a = (g) => {
331
349
  if (t.disabled) {
332
- m.preventDefault();
350
+ g.preventDefault();
333
351
  return;
334
352
  }
335
- t.external && (t.tag === "a" || !t.tag) || (m.preventDefault(), t.replace ? f.replace(t.to) : f.push(t.to));
353
+ t.external && (t.tag === "a" || !t.tag) || (g.preventDefault(), t.replace ? h.replace(t.to) : h.push(t.to));
336
354
  };
337
- return S`
338
- ${M().when(
339
- q.value,
340
- S`
355
+ return P`
356
+ ${z().when(
357
+ N.value,
358
+ P`
341
359
  <button
342
360
  part="button"
343
- class="${k.value}"
361
+ class="${q.value}"
344
362
  style="${e.value || null}"
345
363
  aria-current="${R.value}"
346
- disabled="${u.value ? "" : null}"
347
- aria-disabled="${u.value ? "true" : null}"
348
- tabindex="${u.value ? "-1" : null}"
364
+ disabled="${f.value ? "" : null}"
365
+ aria-disabled="${f.value ? "true" : null}"
366
+ tabindex="${f.value ? "-1" : null}"
349
367
  @click="${a}"
350
368
  >
351
369
  <slot></slot>
352
370
  </button>
353
371
  `
354
- ).otherwise(S`
372
+ ).otherwise(P`
355
373
  <a
356
374
  part="link"
357
375
  href="${t.to}"
358
- class="${k.value}"
376
+ class="${q.value}"
359
377
  style="${e.value || null}"
360
378
  aria-current="${R.value}"
361
- aria-disabled="${u.value ? "true" : null}"
362
- tabindex="${u.value ? "-1" : null}"
363
- target="${l.value ? "_blank" : null}"
364
- rel="${l.value ? "noopener noreferrer" : null}"
379
+ aria-disabled="${f.value ? "true" : null}"
380
+ tabindex="${f.value ? "-1" : null}"
381
+ target="${i.value ? "_blank" : null}"
382
+ rel="${i.value ? "noopener noreferrer" : null}"
365
383
  @click="${a}"
366
384
  ><slot></slot
367
385
  ></a>
@@ -370,11 +388,12 @@ function Y(n) {
370
388
  }), r;
371
389
  }
372
390
  export {
373
- Y as initRouter,
374
- x as matchRoute,
375
- X as matchRouteSSR,
376
- T as parseQuery,
377
- H as resolveRouteComponent,
378
- I as useRouter
391
+ rt as initRouter,
392
+ C as matchRoute,
393
+ et as matchRouteSSR,
394
+ _ as normalizePathForRoute,
395
+ I as parseQuery,
396
+ Z as resolveRouteComponent,
397
+ G as useRouter
379
398
  };
380
399
  //# sourceMappingURL=custom-elements-runtime.router.es.js.map