@kitbag/router 0.6.0 → 0.7.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,8 +1,8 @@
1
- var Le = Object.defineProperty;
2
- var Be = (t, e, n) => e in t ? Le(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var V = (t, e, n) => (Be(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { inject as ht, computed as H, toValue as mt, toRefs as Ue, reactive as Tt, watch as $e, onUnmounted as It, defineComponent as et, openBlock as Jt, createElementBlock as Ne, normalizeClass as He, renderSlot as Ft, normalizeProps as Qt, guardReactiveProps as Kt, unref as ot, provide as je, defineAsyncComponent as Ve, createBlock as Ce, resolveDynamicComponent as _e, h as at, ref as qe, markRaw as st } from "vue";
5
- class Oe extends Error {
1
+ var Ae = Object.defineProperty;
2
+ var Le = (t, e, r) => e in t ? Ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
+ var V = (t, e, r) => (Le(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { inject as ht, computed as H, toValue as mt, toRefs as Be, reactive as Ft, watch as Ue, onUnmounted as Qt, defineComponent as et, openBlock as Kt, createElementBlock as $e, normalizeClass as Ne, renderSlot as Gt, normalizeProps as zt, guardReactiveProps as He, unref as ot, h as at, resolveComponent as je, provide as Ve, mergeProps as Ce, createBlock as _e, resolveDynamicComponent as qe, createCommentVNode as Oe, ref as We, markRaw as st } from "vue";
5
+ class Me extends Error {
6
6
  /**
7
7
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
8
8
  * @param paramName - The name of the parameter that was duplicated.
@@ -16,20 +16,20 @@ class vt extends Error {
16
16
  super("Router not installed");
17
17
  }
18
18
  }
19
- class We extends Error {
19
+ class De extends Error {
20
20
  /**
21
21
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
22
22
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
23
23
  * @param routeName - The route name that was incorrectly used.
24
24
  * @param actualRouteName - The expected route name that should have been used.
25
25
  */
26
- constructor(e, n) {
27
- super(`useRoute called with incorrect route. Given ${e}, expected ${n}`);
26
+ constructor(e, r) {
27
+ super(`useRoute called with incorrect route. Given ${e}, expected ${r}`);
28
28
  }
29
29
  }
30
- const Gt = Symbol();
30
+ const Yt = Symbol();
31
31
  function wt() {
32
- const t = ht(Gt);
32
+ const t = ht(Yt);
33
33
  if (!t)
34
34
  throw new vt();
35
35
  return t;
@@ -39,106 +39,106 @@ class z extends Error {
39
39
  function J(t) {
40
40
  return typeof t != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(t);
41
41
  }
42
- function Me(t, e = {}, n = {}) {
43
- const r = wt(), o = H(() => mt(t)), s = H(() => mt(e)), a = H(() => mt(n)), c = H(() => {
44
- if (J(o.value))
45
- return o.value;
42
+ function Te(t, e = {}, r = {}) {
43
+ const o = wt(), n = H(() => mt(t)), s = H(() => mt(e)), a = H(() => mt(r)), c = H(() => {
44
+ if (J(n.value))
45
+ return n.value;
46
46
  try {
47
- return r.resolve(o.value, s.value, a.value);
48
- } catch (m) {
49
- throw m instanceof z && console.error(`Failed to resolve route "${o.value.toString()}" in RouterLink.`, m), m;
47
+ return o.resolve(n.value, s.value, a.value);
48
+ } catch (f) {
49
+ throw f instanceof z && console.error(`Failed to resolve route "${n.value.toString()}" in RouterLink.`, f), f;
50
50
  }
51
- }), u = H(() => r.find(c.value, a.value)), f = H(() => !!u.value && r.route.matches.includes(u.value.matched)), h = H(() => !!u.value && r.route.matched === u.value.matched);
51
+ }), u = H(() => o.find(c.value, a.value)), l = H(() => !!u.value && o.route.matches.includes(u.value.matched)), p = H(() => !!u.value && o.route.matched === u.value.matched);
52
52
  return {
53
53
  route: u,
54
54
  href: c,
55
- isMatch: f,
56
- isExactMatch: h,
57
- push: (m) => r.push(c.value, {}, { ...a.value, ...m }),
58
- replace: (m) => r.replace(c.value, {}, { ...a.value, ...m })
55
+ isMatch: l,
56
+ isExactMatch: p,
57
+ push: (f) => o.push(c.value, {}, { ...a.value, ...f }),
58
+ replace: (f) => o.replace(c.value, {}, { ...a.value, ...f })
59
59
  };
60
60
  }
61
- const zt = Symbol();
62
- function De() {
63
- const t = ht(zt);
61
+ const Xt = Symbol();
62
+ function Ie() {
63
+ const t = ht(Xt);
64
64
  if (!t)
65
65
  throw new vt();
66
66
  return t;
67
67
  }
68
- function Yt(t, e) {
69
- return [t, e].filter((n) => !!n).join(".");
68
+ function Zt(t, e) {
69
+ return [t, e].filter((r) => !!r).join(".");
70
70
  }
71
- const Xt = Symbol("isRouterRouteSymbol");
72
- function Te(t) {
73
- return typeof t == "object" && t !== null && Xt in t;
71
+ const te = Symbol("isRouterRouteSymbol");
72
+ function Je(t) {
73
+ return typeof t == "object" && t !== null && te in t;
74
74
  }
75
- function Ie(t, e) {
76
- function n(f, h, m) {
77
- if (typeof f == "object") {
78
- const R = {
75
+ function Fe(t, e) {
76
+ function r(l, p, f) {
77
+ if (typeof l == "object") {
78
+ const d = {
79
79
  ...t.params,
80
- ...f
80
+ ...l
81
81
  };
82
- return e(t.key, R, h);
82
+ return e(t.key, d, p);
83
83
  }
84
- const P = {
84
+ const E = {
85
85
  ...t.params,
86
- [f]: h
86
+ [l]: p
87
87
  };
88
- return e(t.key, P, m);
88
+ return e(t.key, E, f);
89
89
  }
90
- const { matched: r, matches: o, key: s, query: a, params: c } = Ue(t), u = Tt({
91
- matched: r,
92
- matches: o,
90
+ const { matched: o, matches: n, key: s, query: a, params: c } = Be(t), u = Ft({
91
+ matched: o,
92
+ matches: n,
93
93
  query: a,
94
94
  params: c,
95
95
  key: s,
96
- update: n,
97
- [Xt]: !0
96
+ update: r,
97
+ [te]: !0
98
98
  });
99
99
  return new Proxy(u, {
100
- get: (f, h, m) => h === "params" ? new Proxy(t.params, {
101
- set(P, R, x) {
102
- return n(R, x), !0;
100
+ get: (l, p, f) => p === "params" ? new Proxy(t.params, {
101
+ set(E, d, k) {
102
+ return r(d, k), !0;
103
103
  }
104
- }) : Reflect.get(f, h, m)
104
+ }) : Reflect.get(l, p, f)
105
105
  });
106
106
  }
107
- function Je(t, e, { exact: n } = {}) {
108
- if (!Te(t))
107
+ function Qe(t, e, { exact: r } = {}) {
108
+ if (!Je(t))
109
109
  return !1;
110
110
  if (e === void 0)
111
111
  return !0;
112
- const r = Fe(t);
113
- if (n) {
114
- const o = r.at(-1);
115
- return e === o;
116
- }
117
- return r.includes(e);
118
- }
119
- function Fe(t) {
120
- return t.matches.map((n) => n.name).reduce((n, r) => {
121
- const o = n.pop(), s = r ? [Yt(o, r)] : [];
122
- return o ? [
123
- ...n,
124
- o,
112
+ const o = Ke(t);
113
+ if (r) {
114
+ const n = o.at(-1);
115
+ return e === n;
116
+ }
117
+ return o.includes(e);
118
+ }
119
+ function Ke(t) {
120
+ return t.matches.map((r) => r.name).reduce((r, o) => {
121
+ const n = r.pop(), s = o ? [Zt(n, o)] : [];
122
+ return n ? [
123
+ ...r,
124
+ n,
125
125
  ...s
126
126
  ] : s;
127
127
  }, []);
128
128
  }
129
- function Qe(t, e) {
130
- const n = wt();
131
- function r() {
129
+ function Ge(t, e) {
130
+ const r = wt();
131
+ function o() {
132
132
  if (!t)
133
133
  return;
134
- if (!Je(n.route, t, e))
135
- throw new We(t, n.route.key);
134
+ if (!Qe(r.route, t, e))
135
+ throw new De(t, r.route.key);
136
136
  }
137
- return $e(n.route, r, { immediate: !0, deep: !0 }), n.route;
137
+ return Ue(r.route, o, { immediate: !0, deep: !0 }), r.route;
138
138
  }
139
- const Zt = Symbol();
139
+ const ee = Symbol();
140
140
  function Et() {
141
- return ht(Zt, 0);
141
+ return ht(ee, 0);
142
142
  }
143
143
  class ct {
144
144
  constructor() {
@@ -153,143 +153,143 @@ class ct {
153
153
  class Ht extends Error {
154
154
  }
155
155
  class Z extends Error {
156
- constructor(n) {
156
+ constructor(r) {
157
157
  super("Error occurred during a router push operation.");
158
158
  V(this, "to");
159
- this.to = n;
159
+ this.to = r;
160
160
  }
161
161
  }
162
- class Rt extends Error {
163
- constructor(n) {
164
- super(`Routing action rejected: ${n}`);
162
+ class gt extends Error {
163
+ constructor(r) {
164
+ super(`Routing action rejected: ${r}`);
165
165
  V(this, "type");
166
- this.type = n;
166
+ this.type = r;
167
167
  }
168
168
  }
169
169
  function G(t) {
170
170
  return Array.isArray(t) ? t : [t];
171
171
  }
172
- function Ke(t, e) {
173
- const n = new ct();
174
- return t.matches.forEach((r, o) => {
175
- r.onBeforeRouteEnter && Pt(t, e, o) && G(r.onBeforeRouteEnter).forEach((s) => n.onBeforeRouteEnter.add(s)), r.onBeforeRouteUpdate && St(t, e, o) && G(r.onBeforeRouteUpdate).forEach((s) => n.onBeforeRouteUpdate.add(s));
176
- }), e.matches.forEach((r, o) => {
177
- r.onBeforeRouteLeave && bt(t, e, o) && G(r.onBeforeRouteLeave).forEach((s) => n.onBeforeRouteLeave.add(s));
178
- }), n;
172
+ function ze(t, e) {
173
+ const r = new ct();
174
+ return t.matches.forEach((o, n) => {
175
+ o.onBeforeRouteEnter && Pt(t, e, n) && G(o.onBeforeRouteEnter).forEach((s) => r.onBeforeRouteEnter.add(s)), o.onBeforeRouteUpdate && bt(t, e, n) && G(o.onBeforeRouteUpdate).forEach((s) => r.onBeforeRouteUpdate.add(s));
176
+ }), e.matches.forEach((o, n) => {
177
+ o.onBeforeRouteLeave && St(t, e, n) && G(o.onBeforeRouteLeave).forEach((s) => r.onBeforeRouteLeave.add(s));
178
+ }), r;
179
+ }
180
+ function Ye(t, e) {
181
+ const r = new ct();
182
+ return t.matches.forEach((o, n) => {
183
+ o.onAfterRouteEnter && Pt(t, e, n) && G(o.onAfterRouteEnter).forEach((s) => r.onAfterRouteEnter.add(s)), o.onAfterRouteUpdate && bt(t, e, n) && G(o.onAfterRouteUpdate).forEach((s) => r.onAfterRouteUpdate.add(s));
184
+ }), e.matches.forEach((o, n) => {
185
+ o.onAfterRouteLeave && St(t, e, n) && G(o.onAfterRouteLeave).forEach((s) => r.onAfterRouteLeave.add(s));
186
+ }), r;
179
187
  }
180
- function Ge(t, e) {
181
- const n = new ct();
182
- return t.matches.forEach((r, o) => {
183
- r.onAfterRouteEnter && Pt(t, e, o) && G(r.onAfterRouteEnter).forEach((s) => n.onAfterRouteEnter.add(s)), r.onAfterRouteUpdate && St(t, e, o) && G(r.onAfterRouteUpdate).forEach((s) => n.onAfterRouteUpdate.add(s));
184
- }), e.matches.forEach((r, o) => {
185
- r.onAfterRouteLeave && bt(t, e, o) && G(r.onAfterRouteLeave).forEach((s) => n.onAfterRouteLeave.add(s));
186
- }), n;
187
- }
188
- function ze() {
188
+ function Xe() {
189
189
  const t = (a) => {
190
- throw new Rt(a);
190
+ throw new gt(a);
191
191
  }, e = (...a) => {
192
192
  throw new Z(a);
193
- }, n = (a, c, u) => {
193
+ }, r = (a, c, u) => {
194
194
  if (J(a)) {
195
- const m = c ?? {};
196
- throw new Z([a, { ...m, replace: !0 }]);
195
+ const f = c ?? {};
196
+ throw new Z([a, { ...f, replace: !0 }]);
197
197
  }
198
- const f = c, h = u ?? {};
199
- throw new Z([a, f, { ...h, replace: !0 }]);
200
- }, r = () => {
198
+ const l = c, p = u ?? {};
199
+ throw new Z([a, l, { ...p, replace: !0 }]);
200
+ }, o = () => {
201
201
  throw new Ht();
202
202
  };
203
- async function o({ to: a, from: c, hooks: u }) {
204
- const { global: f, component: h } = u, m = Ke(a, c), P = [
203
+ async function n({ to: a, from: c, hooks: u }) {
204
+ const { global: l, component: p } = u, f = ze(a, c), E = [
205
+ ...l.onBeforeRouteEnter,
205
206
  ...f.onBeforeRouteEnter,
206
- ...m.onBeforeRouteEnter,
207
+ ...l.onBeforeRouteUpdate,
207
208
  ...f.onBeforeRouteUpdate,
208
- ...m.onBeforeRouteUpdate,
209
- ...h.onBeforeRouteUpdate,
209
+ ...p.onBeforeRouteUpdate,
210
+ ...l.onBeforeRouteLeave,
210
211
  ...f.onBeforeRouteLeave,
211
- ...m.onBeforeRouteLeave,
212
- ...h.onBeforeRouteLeave
212
+ ...p.onBeforeRouteLeave
213
213
  ];
214
214
  try {
215
- const R = P.map((x) => x(a, {
215
+ const d = E.map((k) => k(a, {
216
216
  from: c,
217
217
  reject: t,
218
218
  push: e,
219
- replace: n,
220
- abort: r
219
+ replace: r,
220
+ abort: o
221
221
  }));
222
- await Promise.all(R);
223
- } catch (R) {
224
- if (R instanceof Z)
222
+ await Promise.all(d);
223
+ } catch (d) {
224
+ if (d instanceof Z)
225
225
  return {
226
226
  status: "PUSH",
227
- to: R.to
227
+ to: d.to
228
228
  };
229
- if (R instanceof Rt)
229
+ if (d instanceof gt)
230
230
  return {
231
231
  status: "REJECT",
232
- type: R.type
232
+ type: d.type
233
233
  };
234
- if (R instanceof Ht)
234
+ if (d instanceof Ht)
235
235
  return {
236
236
  status: "ABORT"
237
237
  };
238
- throw R;
238
+ throw d;
239
239
  }
240
240
  return {
241
241
  status: "SUCCESS"
242
242
  };
243
243
  }
244
244
  async function s({ to: a, from: c, hooks: u }) {
245
- const { global: f, component: h } = u, m = Ge(a, c), P = [
246
- ...h.onAfterRouteLeave,
247
- ...m.onAfterRouteLeave,
245
+ const { global: l, component: p } = u, f = Ye(a, c), E = [
246
+ ...p.onAfterRouteLeave,
248
247
  ...f.onAfterRouteLeave,
249
- ...h.onAfterRouteUpdate,
250
- ...m.onAfterRouteUpdate,
248
+ ...l.onAfterRouteLeave,
249
+ ...p.onAfterRouteUpdate,
251
250
  ...f.onAfterRouteUpdate,
252
- ...h.onAfterRouteEnter,
253
- ...m.onAfterRouteEnter,
254
- ...f.onAfterRouteEnter
251
+ ...l.onAfterRouteUpdate,
252
+ ...p.onAfterRouteEnter,
253
+ ...f.onAfterRouteEnter,
254
+ ...l.onAfterRouteEnter
255
255
  ];
256
256
  try {
257
- const R = P.map((x) => x(a, {
257
+ const d = E.map((k) => k(a, {
258
258
  from: c,
259
259
  reject: t,
260
260
  push: e,
261
- replace: n
261
+ replace: r
262
262
  }));
263
- await Promise.all(R);
264
- } catch (R) {
265
- if (R instanceof Z)
263
+ await Promise.all(d);
264
+ } catch (d) {
265
+ if (d instanceof Z)
266
266
  return {
267
267
  status: "PUSH",
268
- to: R.to
268
+ to: d.to
269
269
  };
270
- if (R instanceof Rt)
270
+ if (d instanceof gt)
271
271
  return {
272
272
  status: "REJECT",
273
- type: R.type
273
+ type: d.type
274
274
  };
275
- throw R;
275
+ throw d;
276
276
  }
277
277
  return {
278
278
  status: "SUCCESS"
279
279
  };
280
280
  }
281
281
  return {
282
- runBeforeRouteHooks: o,
282
+ runBeforeRouteHooks: n,
283
283
  runAfterRouteHooks: s
284
284
  };
285
285
  }
286
- const Pt = (t, e, n) => {
287
- const r = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
288
- return r.length < n || r[n] !== o[n];
289
- }, bt = (t, e, n) => {
290
- const r = t.matches, o = (e == null ? void 0 : e.matches) ?? [];
291
- return r.length < n || r[n] !== o[n];
292
- }, St = (t, e, n) => t.matches[n] === (e == null ? void 0 : e.matches[n]);
286
+ const Pt = (t, e, r) => {
287
+ const o = t.matches, n = (e == null ? void 0 : e.matches) ?? [];
288
+ return o.length < r || o[r] !== n[r];
289
+ }, St = (t, e, r) => {
290
+ const o = t.matches, n = (e == null ? void 0 : e.matches) ?? [];
291
+ return o.length < r || o[r] !== n[r];
292
+ }, bt = (t, e, r) => t.matches[r] === (e == null ? void 0 : e.matches[r]);
293
293
  function jt(t) {
294
294
  switch (t) {
295
295
  case "onBeforeRouteEnter":
@@ -297,37 +297,37 @@ function jt(t) {
297
297
  return Pt;
298
298
  case "onBeforeRouteUpdate":
299
299
  case "onAfterRouteUpdate":
300
- return St;
300
+ return bt;
301
301
  case "onBeforeRouteLeave":
302
302
  case "onAfterRouteLeave":
303
- return bt;
303
+ return St;
304
304
  default:
305
305
  throw new Error(`Switch is not exhaustive for lifecycle: ${t}`);
306
306
  }
307
307
  }
308
- class Ye {
308
+ class Ze {
309
309
  constructor() {
310
310
  V(this, "global", new ct());
311
311
  V(this, "component", new ct());
312
312
  }
313
- addBeforeRouteHook({ lifecycle: e, timing: n, depth: r, hook: o }) {
314
- const s = jt(e), a = this[n][e], c = (u, f) => {
315
- if (s(u, f.from, r))
316
- return o(u, f);
313
+ addBeforeRouteHook({ lifecycle: e, timing: r, depth: o, hook: n }) {
314
+ const s = jt(e), a = this[r][e], c = (u, l) => {
315
+ if (s(u, l.from, o))
316
+ return n(u, l);
317
317
  };
318
318
  return a.add(c), () => a.delete(c);
319
319
  }
320
- addAfterRouteHook({ lifecycle: e, timing: n, depth: r, hook: o }) {
321
- const s = jt(e), a = this[n][e], c = (u, f) => {
322
- if (s(u, f.from, r))
323
- return o(u, f);
320
+ addAfterRouteHook({ lifecycle: e, timing: r, depth: o, hook: n }) {
321
+ const s = jt(e), a = this[r][e], c = (u, l) => {
322
+ if (s(u, l.from, o))
323
+ return n(u, l);
324
324
  };
325
325
  return a.add(c), () => a.delete(c);
326
326
  }
327
327
  }
328
- const te = Symbol();
329
- function Xe() {
330
- const t = new Ye();
328
+ const re = Symbol();
329
+ function tr() {
330
+ const t = new Ze();
331
331
  return {
332
332
  onBeforeRouteEnter: (c) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
333
333
  onBeforeRouteUpdate: (c) => t.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
@@ -338,25 +338,25 @@ function Xe() {
338
338
  hooks: t
339
339
  };
340
340
  }
341
- function ee() {
342
- const t = ht(te);
341
+ function ne() {
342
+ const t = ht(re);
343
343
  if (!t)
344
344
  throw new vt();
345
345
  return t;
346
346
  }
347
- function ne(t) {
347
+ function oe(t) {
348
348
  return (e) => {
349
- const n = Et(), o = ee().addBeforeRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
350
- return It(o), o;
349
+ const r = Et(), n = ne().addBeforeRouteHook({ lifecycle: t, hook: e, depth: r, timing: "component" });
350
+ return Qt(n), n;
351
351
  };
352
352
  }
353
- function xt(t) {
353
+ function kt(t) {
354
354
  return (e) => {
355
- const n = Et(), o = ee().addAfterRouteHook({ lifecycle: t, hook: e, depth: n, timing: "component" });
356
- return It(o), o;
355
+ const r = Et(), n = ne().addAfterRouteHook({ lifecycle: t, hook: e, depth: r, timing: "component" });
356
+ return Qt(n), n;
357
357
  };
358
358
  }
359
- const rr = ne("onBeforeRouteUpdate"), or = ne("onBeforeRouteLeave"), ar = xt("onAfterRouteEnter"), sr = xt("onAfterRouteUpdate"), cr = xt("onAfterRouteLeave"), Ze = ["href"], tn = /* @__PURE__ */ et({
359
+ const nn = oe("onBeforeRouteUpdate"), on = oe("onBeforeRouteLeave"), an = kt("onAfterRouteEnter"), sn = kt("onAfterRouteUpdate"), cn = kt("onAfterRouteLeave"), er = ["href"], rr = /* @__PURE__ */ et({
360
360
  __name: "routerLink",
361
361
  props: {
362
362
  to: { type: [String, Function] },
@@ -364,157 +364,165 @@ const rr = ne("onBeforeRouteUpdate"), or = ne("onBeforeRouteLeave"), ar = xt("on
364
364
  replace: { type: Boolean }
365
365
  },
366
366
  setup(t) {
367
- const e = t, n = wt(), r = H(() => J(e.to) ? e.to : e.to(n.resolve)), o = H(() => {
368
- const { to: m, ...P } = e;
369
- return P;
370
- }), { href: s, isMatch: a, isExactMatch: c } = Me(r), u = H(() => ({
367
+ const e = t, r = wt(), o = H(() => J(e.to) ? e.to : e.to(r.resolve)), n = H(() => {
368
+ const { to: f, ...E } = e;
369
+ return E;
370
+ }), { href: s, isMatch: a, isExactMatch: c } = Te(o), u = H(() => ({
371
371
  "router-link--match": a.value,
372
372
  "router-link--exact-match": c.value
373
- })), f = H(() => n.isExternal(r.value));
374
- function h(m) {
375
- m.preventDefault(), n.push(s.value, o.value);
373
+ })), l = H(() => r.isExternal(o.value));
374
+ function p(f) {
375
+ f.preventDefault(), r.push(s.value, n.value);
376
376
  }
377
- return (m, P) => (Jt(), Ne("a", {
378
- href: r.value,
379
- class: He(["router-link", u.value]),
380
- onClick: h
377
+ return (f, E) => (Kt(), $e("a", {
378
+ href: o.value,
379
+ class: Ne(["router-link", u.value]),
380
+ onClick: p
381
381
  }, [
382
- Ft(m.$slots, "default", Qt(Kt({ resolved: r.value, isMatch: ot(a), isExactMatch: ot(c), isExternal: f.value })))
383
- ], 10, Ze));
382
+ Gt(f.$slots, "default", zt(He({ resolved: o.value, isMatch: ot(a), isExactMatch: ot(c), isExternal: l.value })))
383
+ ], 10, er));
384
384
  }
385
385
  });
386
- function nt(...t) {
387
- const e = t.flatMap((n) => Array.isArray(n) ? n : Object.keys(n).map(nn));
388
- for (const n of e)
389
- if (en(e, n) > 1)
390
- throw new Oe(n);
386
+ function nr(t, e) {
387
+ return et({
388
+ name: "PropsWrapper",
389
+ expose: [],
390
+ setup() {
391
+ const r = e();
392
+ return "then" in r ? () => at(or(t, r)) : () => at(t, r);
393
+ }
394
+ });
395
+ }
396
+ function or(t, e) {
397
+ return et({
398
+ name: "AsyncPropsWrapper",
399
+ expose: [],
400
+ async setup() {
401
+ const r = await e;
402
+ return () => at(t, r);
403
+ }
404
+ });
391
405
  }
392
- function en(t, e) {
393
- return t.filter((n) => e === n).length;
406
+ function rt(...t) {
407
+ const e = t.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(sr));
408
+ for (const r of e)
409
+ if (ar(e, r) > 1)
410
+ throw new Me(r);
394
411
  }
395
- function nn(t) {
412
+ function ar(t, e) {
413
+ return t.filter((r) => e === r).length;
414
+ }
415
+ function sr(t) {
396
416
  return t.startsWith("?") ? t.slice(1) : t;
397
417
  }
398
- function rn(t, e) {
399
- nt(t.params, e.params);
400
- const n = `${t.path}${e.path}`;
418
+ function cr(t, e) {
419
+ rt(t.params, e.params);
420
+ const r = `${t.path}${e.path}`;
401
421
  return {
402
- path: n,
422
+ path: r,
403
423
  params: { ...t.params, ...e.params },
404
- toString: () => n
424
+ toString: () => r
405
425
  };
406
426
  }
407
- function kt(t) {
427
+ function xt(t) {
408
428
  return typeof t == "string" && t.length > 0;
409
429
  }
410
- function on(t, e) {
411
- nt(t.params, e.params);
412
- const n = [t.query, e.query].filter(kt).join("&");
430
+ function ur(t, e) {
431
+ rt(t.params, e.params);
432
+ const r = [t.query, e.query].filter(xt).join("&");
413
433
  return {
414
- query: n,
434
+ query: r,
415
435
  params: { ...t.params, ...e.params },
416
- toString: () => n
436
+ toString: () => r
417
437
  };
418
438
  }
419
- function re(t) {
420
- return "parent" in t;
421
- }
422
- function oe(t) {
423
- return "component" in t;
439
+ function ir(t) {
440
+ return "host" in t && !!t.host;
424
441
  }
425
442
  function ae(t) {
426
- return "components" in t;
443
+ return "parent" in t && !!t.parent;
444
+ }
445
+ function Vt(t) {
446
+ return "component" in t && !!t.component;
427
447
  }
428
- function an(t) {
429
- return !oe(t) && !ae(t);
448
+ function Ct(t) {
449
+ return "components" in t && !!t.components;
430
450
  }
431
451
  function se(t, e) {
432
452
  return {
433
453
  ...e,
434
- key: Yt(t.key, e.key),
435
- path: rn(t.path, e.path),
436
- query: on(t.query, e.query),
454
+ key: Zt(t.key, e.key),
455
+ path: cr(t.path, e.path),
456
+ query: ur(t.query, e.query),
437
457
  matches: [...t.matches, e.matched],
438
458
  host: t.host,
439
459
  depth: t.depth + 1
440
460
  };
441
461
  }
442
- const ce = /* @__PURE__ */ et({
462
+ const fr = /* @__PURE__ */ et({
443
463
  __name: "routerView",
444
464
  props: {
445
465
  name: {}
446
466
  },
447
467
  setup(t) {
448
- const { name: e = "default" } = t, n = Qe(), r = De(), o = Et();
449
- je(Zt, o + 1);
450
- const s = H(() => {
451
- if (r.value)
452
- return r.value.component;
453
- const c = n.matches.at(o);
454
- if (!c)
468
+ const { name: e = "default" } = t, r = Ge(), o = Ie(), n = Et(), s = je("RouterView", !0);
469
+ Ve(ee, n + 1);
470
+ const a = H(() => {
471
+ if (o.value)
472
+ return o.value.component;
473
+ const f = r.matches.at(n);
474
+ if (!f)
455
475
  return null;
456
- const f = a(c)[e];
457
- return f ? typeof f == "function" ? Ve(f) : f : null;
476
+ const E = c(f), d = l(f);
477
+ return E ? d ? nr(E, () => d(r.params)) : E : null;
458
478
  });
459
- function a(c) {
460
- return ae(c) ? c.components : oe(c) ? { default: c.component } : {};
479
+ function c(f) {
480
+ return u(f)[e];
461
481
  }
462
- return (c, u) => Ft(c.$slots, "default", Qt(Kt({ route: ot(n), component: s.value, rejection: ot(r) })), () => [
463
- (Jt(), Ce(_e(s.value)))
464
- ]);
465
- }
466
- });
467
- function ur(t, e) {
468
- return et({
469
- name: "PropsWrapper",
470
- expose: [],
471
- setup() {
472
- const n = e();
473
- return "then" in n ? () => at(sn(t, n)) : () => at(t, n);
482
+ function u(f) {
483
+ return Ct(f) ? f.components : Vt(f) ? { default: f.component } : typeof s == "string" ? {} : { default: s };
474
484
  }
475
- });
476
- }
477
- function sn(t, e) {
478
- return et({
479
- name: "AsyncPropsWrapper",
480
- expose: [],
481
- async setup() {
482
- const n = await e;
483
- return () => at(t, n);
485
+ function l(f) {
486
+ return p(f)[e];
484
487
  }
485
- });
486
- }
487
- const O = "[", D = "]";
488
- function cn(t) {
488
+ function p(f) {
489
+ return Ct(f) ? f.props ?? {} : Vt(f) ? { default: f.props } : {};
490
+ }
491
+ return (f, E) => a.value ? Gt(f.$slots, "default", zt(Ce({ key: 0 }, { route: ot(r), component: a.value, rejection: ot(o) })), () => [
492
+ (Kt(), _e(qe(a.value)))
493
+ ]) : Oe("", !0);
494
+ }
495
+ }), O = "[", D = "]";
496
+ function lr(t) {
489
497
  return t !== String && t !== Boolean && t !== Number && t !== Date;
490
498
  }
491
- function un(t) {
492
- return typeof t == "function" && cn(t);
499
+ function hr(t) {
500
+ return typeof t == "function" && lr(t);
493
501
  }
494
502
  function pt(t) {
495
503
  return typeof t == "object" && "get" in t && typeof t.get == "function" && "set" in t && typeof t.set == "function";
496
504
  }
497
- function fn(t) {
505
+ function pr(t) {
498
506
  return pt(t) && t.defaultValue !== void 0;
499
507
  }
500
- function ir(t, e) {
501
- return pn(t, e);
508
+ function un(t, e) {
509
+ return gr(t, e);
502
510
  }
503
- function ln(t, e) {
511
+ function dr(t, e) {
504
512
  return t[e] ?? String;
505
513
  }
506
514
  const j = {
507
515
  invalid: (t) => {
508
516
  throw new z(t);
509
517
  }
510
- }, hn = {
518
+ }, mr = {
511
519
  get: (t) => t,
512
520
  set: (t, { invalid: e }) => {
513
521
  if (typeof t != "string")
514
522
  throw e();
515
523
  return t;
516
524
  }
517
- }, ue = {
525
+ }, ce = {
518
526
  get: (t, { invalid: e }) => {
519
527
  if (t === "true")
520
528
  return !0;
@@ -527,31 +535,31 @@ const j = {
527
535
  throw e();
528
536
  return t.toString();
529
537
  }
530
- }, ie = {
538
+ }, ue = {
531
539
  get: (t, { invalid: e }) => {
532
- const n = Number(t);
533
- if (isNaN(n))
540
+ const r = Number(t);
541
+ if (isNaN(r))
534
542
  throw e();
535
- return n;
543
+ return r;
536
544
  },
537
545
  set: (t, { invalid: e }) => {
538
546
  if (typeof t != "number")
539
547
  throw e();
540
548
  return t.toString();
541
549
  }
542
- }, fe = {
550
+ }, ie = {
543
551
  get: (t, { invalid: e }) => {
544
- const n = new Date(t);
545
- if (isNaN(n.getTime()))
552
+ const r = new Date(t);
553
+ if (isNaN(r.getTime()))
546
554
  throw e();
547
- return n;
555
+ return r;
548
556
  },
549
557
  set: (t, { invalid: e }) => {
550
558
  if (typeof t != "object" || !(t instanceof Date))
551
559
  throw e();
552
560
  return t.toISOString();
553
561
  }
554
- }, le = {
562
+ }, fe = {
555
563
  get: (t, { invalid: e }) => {
556
564
  try {
557
565
  return JSON.parse(t);
@@ -567,25 +575,25 @@ const j = {
567
575
  }
568
576
  }
569
577
  };
570
- function At(t, e, n = !1) {
571
- if (t === void 0 || !kt(t)) {
572
- if (fn(e))
578
+ function At(t, e, r = !1) {
579
+ if (t === void 0 || !xt(t)) {
580
+ if (pr(e))
573
581
  return e.defaultValue;
574
- if (n)
582
+ if (r)
575
583
  return;
576
584
  throw new z();
577
585
  }
578
586
  if (e === String)
579
- return hn.get(t, j);
587
+ return mr.get(t, j);
580
588
  if (e === Boolean)
581
- return ue.get(t, j);
589
+ return ce.get(t, j);
582
590
  if (e === Number)
583
- return ie.get(t, j);
591
+ return ue.get(t, j);
584
592
  if (e === Date)
585
- return fe.get(t, j);
593
+ return ie.get(t, j);
586
594
  if (e === JSON)
587
- return le.get(t, j);
588
- if (un(e))
595
+ return fe.get(t, j);
596
+ if (hr(e))
589
597
  return e(t, j);
590
598
  if (pt(e))
591
599
  return e.get(t, j);
@@ -596,20 +604,20 @@ function At(t, e, n = !1) {
596
604
  }
597
605
  return t;
598
606
  }
599
- function Lt(t, e, n = !1) {
607
+ function Lt(t, e, r = !1) {
600
608
  if (t === void 0) {
601
- if (n)
609
+ if (r)
602
610
  return "";
603
611
  throw new z();
604
612
  }
605
613
  if (e === Boolean)
606
- return ue.set(t, j);
614
+ return ce.set(t, j);
607
615
  if (e === Number)
608
- return ie.set(t, j);
616
+ return ue.set(t, j);
609
617
  if (e === Date)
610
- return fe.set(t, j);
618
+ return ie.set(t, j);
611
619
  if (e === JSON)
612
- return le.set(t, j);
620
+ return fe.set(t, j);
613
621
  if (pt(e))
614
622
  return e.set(t, j);
615
623
  try {
@@ -618,19 +626,19 @@ function Lt(t, e, n = !1) {
618
626
  throw new z();
619
627
  }
620
628
  }
621
- function pn(t, e) {
629
+ function gr(t, e) {
622
630
  return pt(t) ? { ...t, defaultValue: e ?? t.defaultValue } : {
623
- get: (n) => At(n, t),
624
- set: (n) => Lt(n, t),
631
+ get: (r) => At(r, t),
632
+ set: (r) => Lt(r, t),
625
633
  defaultValue: e
626
634
  };
627
635
  }
628
636
  function M() {
629
637
  return M = Object.assign ? Object.assign.bind() : function(t) {
630
638
  for (var e = 1; e < arguments.length; e++) {
631
- var n = arguments[e];
632
- for (var r in n)
633
- Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
639
+ var r = arguments[e];
640
+ for (var o in r)
641
+ Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
634
642
  }
635
643
  return t;
636
644
  }, M.apply(this, arguments);
@@ -653,16 +661,16 @@ function F(t, e) {
653
661
  }
654
662
  }
655
663
  }
656
- var ut = "beforeunload", dn = "hashchange", he = "popstate";
657
- function Vt(t) {
664
+ var ut = "beforeunload", yr = "hashchange", le = "popstate";
665
+ function _t(t) {
658
666
  t === void 0 && (t = {});
659
- var e = t, n = e.window, r = n === void 0 ? document.defaultView : n, o = r.history;
667
+ var e = t, r = e.window, o = r === void 0 ? document.defaultView : r, n = o.history;
660
668
  function s() {
661
- var p = r.location, i = p.pathname, l = p.search, y = p.hash, w = o.state || {};
669
+ var m = o.location, i = m.pathname, h = m.search, R = m.hash, w = n.state || {};
662
670
  return [w.idx, Y({
663
671
  pathname: i,
664
- search: l,
665
- hash: y,
672
+ search: h,
673
+ hash: R,
666
674
  state: w.usr || null,
667
675
  key: w.key || "default"
668
676
  })];
@@ -670,19 +678,19 @@ function Vt(t) {
670
678
  var a = null;
671
679
  function c() {
672
680
  if (a)
673
- R.call(a), a = null;
681
+ d.call(a), a = null;
674
682
  else {
675
- var p = L.Pop, i = s(), l = i[0], y = i[1];
676
- if (R.length)
677
- if (l != null) {
678
- var w = h - l;
683
+ var m = L.Pop, i = s(), h = i[0], R = i[1];
684
+ if (d.length)
685
+ if (h != null) {
686
+ var w = p - h;
679
687
  w && (a = {
680
- action: p,
681
- location: y,
688
+ action: m,
689
+ location: R,
682
690
  retry: function() {
683
- E(w * -1);
691
+ P(w * -1);
684
692
  }
685
- }, E(w));
693
+ }, P(w));
686
694
  } else
687
695
  process.env.NODE_ENV !== "production" && F(
688
696
  !1,
@@ -692,114 +700,114 @@ function Vt(t) {
692
700
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
693
701
  );
694
702
  else
695
- _(p);
703
+ _(m);
696
704
  }
697
705
  }
698
- r.addEventListener(he, c);
699
- var u = L.Pop, f = s(), h = f[0], m = f[1], P = X(), R = X();
700
- h == null && (h = 0, o.replaceState(M({}, o.state, {
701
- idx: h
706
+ o.addEventListener(le, c);
707
+ var u = L.Pop, l = s(), p = l[0], f = l[1], E = X(), d = X();
708
+ p == null && (p = 0, n.replaceState(M({}, n.state, {
709
+ idx: p
702
710
  }), ""));
703
- function x(p) {
704
- return typeof p == "string" ? p : Q(p);
711
+ function k(m) {
712
+ return typeof m == "string" ? m : Q(m);
705
713
  }
706
- function k(p, i) {
714
+ function x(m, i) {
707
715
  return i === void 0 && (i = null), Y(M({
708
- pathname: m.pathname,
716
+ pathname: f.pathname,
709
717
  hash: "",
710
718
  search: ""
711
- }, typeof p == "string" ? tt(p) : p, {
719
+ }, typeof m == "string" ? tt(m) : m, {
712
720
  state: i,
713
721
  key: ft()
714
722
  }));
715
723
  }
716
- function C(p, i) {
724
+ function C(m, i) {
717
725
  return [{
718
- usr: p.state,
719
- key: p.key,
726
+ usr: m.state,
727
+ key: m.key,
720
728
  idx: i
721
- }, x(p)];
729
+ }, k(m)];
722
730
  }
723
- function B(p, i, l) {
724
- return !R.length || (R.call({
725
- action: p,
731
+ function B(m, i, h) {
732
+ return !d.length || (d.call({
733
+ action: m,
726
734
  location: i,
727
- retry: l
735
+ retry: h
728
736
  }), !1);
729
737
  }
730
- function _(p) {
731
- u = p;
738
+ function _(m) {
739
+ u = m;
732
740
  var i = s();
733
- h = i[0], m = i[1], P.call({
741
+ p = i[0], f = i[1], E.call({
734
742
  action: u,
735
- location: m
743
+ location: f
736
744
  });
737
745
  }
738
- function d(p, i) {
739
- var l = L.Push, y = k(p, i);
746
+ function g(m, i) {
747
+ var h = L.Push, R = x(m, i);
740
748
  function w() {
741
- d(p, i);
749
+ g(m, i);
742
750
  }
743
- if (B(l, y, w)) {
744
- var S = C(y, h + 1), A = S[0], U = S[1];
751
+ if (B(h, R, w)) {
752
+ var b = C(R, p + 1), A = b[0], U = b[1];
745
753
  try {
746
- o.pushState(A, "", U);
754
+ n.pushState(A, "", U);
747
755
  } catch {
748
- r.location.assign(U);
756
+ o.location.assign(U);
749
757
  }
750
- _(l);
758
+ _(h);
751
759
  }
752
760
  }
753
- function g(p, i) {
754
- var l = L.Replace, y = k(p, i);
761
+ function y(m, i) {
762
+ var h = L.Replace, R = x(m, i);
755
763
  function w() {
756
- g(p, i);
764
+ y(m, i);
757
765
  }
758
- if (B(l, y, w)) {
759
- var S = C(y, h), A = S[0], U = S[1];
760
- o.replaceState(A, "", U), _(l);
766
+ if (B(h, R, w)) {
767
+ var b = C(R, p), A = b[0], U = b[1];
768
+ n.replaceState(A, "", U), _(h);
761
769
  }
762
770
  }
763
- function E(p) {
764
- o.go(p);
771
+ function P(m) {
772
+ n.go(m);
765
773
  }
766
- var b = {
774
+ var S = {
767
775
  get action() {
768
776
  return u;
769
777
  },
770
778
  get location() {
771
- return m;
779
+ return f;
772
780
  },
773
- createHref: x,
774
- push: d,
775
- replace: g,
776
- go: E,
781
+ createHref: k,
782
+ push: g,
783
+ replace: y,
784
+ go: P,
777
785
  back: function() {
778
- E(-1);
786
+ P(-1);
779
787
  },
780
788
  forward: function() {
781
- E(1);
789
+ P(1);
782
790
  },
783
791
  listen: function(i) {
784
- return P.push(i);
792
+ return E.push(i);
785
793
  },
786
794
  block: function(i) {
787
- var l = R.push(i);
788
- return R.length === 1 && r.addEventListener(ut, it), function() {
789
- l(), R.length || r.removeEventListener(ut, it);
795
+ var h = d.push(i);
796
+ return d.length === 1 && o.addEventListener(ut, it), function() {
797
+ h(), d.length || o.removeEventListener(ut, it);
790
798
  };
791
799
  }
792
800
  };
793
- return b;
801
+ return S;
794
802
  }
795
- function mn(t) {
803
+ function Rr(t) {
796
804
  t === void 0 && (t = {});
797
- var e = t, n = e.window, r = n === void 0 ? document.defaultView : n, o = r.history;
805
+ var e = t, r = e.window, o = r === void 0 ? document.defaultView : r, n = o.history;
798
806
  function s() {
799
- var i = tt(r.location.hash.substr(1)), l = i.pathname, y = l === void 0 ? "/" : l, w = i.search, S = w === void 0 ? "" : w, A = i.hash, U = A === void 0 ? "" : A, $ = o.state || {};
807
+ var i = tt(o.location.hash.substr(1)), h = i.pathname, R = h === void 0 ? "/" : h, w = i.search, b = w === void 0 ? "" : w, A = i.hash, U = A === void 0 ? "" : A, $ = n.state || {};
800
808
  return [$.idx, Y({
801
- pathname: y,
802
- search: S,
809
+ pathname: R,
810
+ search: b,
803
811
  hash: U,
804
812
  state: $.usr || null,
805
813
  key: $.key || "default"
@@ -808,19 +816,19 @@ function mn(t) {
808
816
  var a = null;
809
817
  function c() {
810
818
  if (a)
811
- R.call(a), a = null;
819
+ d.call(a), a = null;
812
820
  else {
813
- var i = L.Pop, l = s(), y = l[0], w = l[1];
814
- if (R.length)
815
- if (y != null) {
816
- var S = h - y;
817
- S && (a = {
821
+ var i = L.Pop, h = s(), R = h[0], w = h[1];
822
+ if (d.length)
823
+ if (R != null) {
824
+ var b = p - R;
825
+ b && (a = {
818
826
  action: i,
819
827
  location: w,
820
828
  retry: function() {
821
- b(S * -1);
829
+ S(b * -1);
822
830
  }
823
- }, b(S));
831
+ }, S(b));
824
832
  } else
825
833
  process.env.NODE_ENV !== "production" && F(
826
834
  !1,
@@ -830,175 +838,175 @@ function mn(t) {
830
838
  "You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation."
831
839
  );
832
840
  else
833
- d(i);
841
+ g(i);
834
842
  }
835
843
  }
836
- r.addEventListener(he, c), r.addEventListener(dn, function() {
837
- var i = s(), l = i[1];
838
- Q(l) !== Q(m) && c();
844
+ o.addEventListener(le, c), o.addEventListener(yr, function() {
845
+ var i = s(), h = i[1];
846
+ Q(h) !== Q(f) && c();
839
847
  });
840
- var u = L.Pop, f = s(), h = f[0], m = f[1], P = X(), R = X();
841
- h == null && (h = 0, o.replaceState(M({}, o.state, {
842
- idx: h
848
+ var u = L.Pop, l = s(), p = l[0], f = l[1], E = X(), d = X();
849
+ p == null && (p = 0, n.replaceState(M({}, n.state, {
850
+ idx: p
843
851
  }), ""));
844
- function x() {
845
- var i = document.querySelector("base"), l = "";
852
+ function k() {
853
+ var i = document.querySelector("base"), h = "";
846
854
  if (i && i.getAttribute("href")) {
847
- var y = r.location.href, w = y.indexOf("#");
848
- l = w === -1 ? y : y.slice(0, w);
855
+ var R = o.location.href, w = R.indexOf("#");
856
+ h = w === -1 ? R : R.slice(0, w);
849
857
  }
850
- return l;
858
+ return h;
851
859
  }
852
- function k(i) {
853
- return x() + "#" + (typeof i == "string" ? i : Q(i));
860
+ function x(i) {
861
+ return k() + "#" + (typeof i == "string" ? i : Q(i));
854
862
  }
855
- function C(i, l) {
856
- return l === void 0 && (l = null), Y(M({
857
- pathname: m.pathname,
863
+ function C(i, h) {
864
+ return h === void 0 && (h = null), Y(M({
865
+ pathname: f.pathname,
858
866
  hash: "",
859
867
  search: ""
860
868
  }, typeof i == "string" ? tt(i) : i, {
861
- state: l,
869
+ state: h,
862
870
  key: ft()
863
871
  }));
864
872
  }
865
- function B(i, l) {
873
+ function B(i, h) {
866
874
  return [{
867
875
  usr: i.state,
868
876
  key: i.key,
869
- idx: l
870
- }, k(i)];
877
+ idx: h
878
+ }, x(i)];
871
879
  }
872
- function _(i, l, y) {
873
- return !R.length || (R.call({
880
+ function _(i, h, R) {
881
+ return !d.length || (d.call({
874
882
  action: i,
875
- location: l,
876
- retry: y
883
+ location: h,
884
+ retry: R
877
885
  }), !1);
878
886
  }
879
- function d(i) {
887
+ function g(i) {
880
888
  u = i;
881
- var l = s();
882
- h = l[0], m = l[1], P.call({
889
+ var h = s();
890
+ p = h[0], f = h[1], E.call({
883
891
  action: u,
884
- location: m
892
+ location: f
885
893
  });
886
894
  }
887
- function g(i, l) {
888
- var y = L.Push, w = C(i, l);
889
- function S() {
890
- g(i, l);
895
+ function y(i, h) {
896
+ var R = L.Push, w = C(i, h);
897
+ function b() {
898
+ y(i, h);
891
899
  }
892
- if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(i) + ")"), _(y, w, S)) {
893
- var A = B(w, h + 1), U = A[0], $ = A[1];
900
+ if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(i) + ")"), _(R, w, b)) {
901
+ var A = B(w, p + 1), U = A[0], $ = A[1];
894
902
  try {
895
- o.pushState(U, "", $);
903
+ n.pushState(U, "", $);
896
904
  } catch {
897
- r.location.assign($);
905
+ o.location.assign($);
898
906
  }
899
- d(y);
907
+ g(R);
900
908
  }
901
909
  }
902
- function E(i, l) {
903
- var y = L.Replace, w = C(i, l);
904
- function S() {
905
- E(i, l);
910
+ function P(i, h) {
911
+ var R = L.Replace, w = C(i, h);
912
+ function b() {
913
+ P(i, h);
906
914
  }
907
- if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(i) + ")"), _(y, w, S)) {
908
- var A = B(w, h), U = A[0], $ = A[1];
909
- o.replaceState(U, "", $), d(y);
915
+ if (process.env.NODE_ENV !== "production" && F(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(i) + ")"), _(R, w, b)) {
916
+ var A = B(w, p), U = A[0], $ = A[1];
917
+ n.replaceState(U, "", $), g(R);
910
918
  }
911
919
  }
912
- function b(i) {
913
- o.go(i);
920
+ function S(i) {
921
+ n.go(i);
914
922
  }
915
- var p = {
923
+ var m = {
916
924
  get action() {
917
925
  return u;
918
926
  },
919
927
  get location() {
920
- return m;
928
+ return f;
921
929
  },
922
- createHref: k,
923
- push: g,
924
- replace: E,
925
- go: b,
930
+ createHref: x,
931
+ push: y,
932
+ replace: P,
933
+ go: S,
926
934
  back: function() {
927
- b(-1);
935
+ S(-1);
928
936
  },
929
937
  forward: function() {
930
- b(1);
938
+ S(1);
931
939
  },
932
- listen: function(l) {
933
- return P.push(l);
940
+ listen: function(h) {
941
+ return E.push(h);
934
942
  },
935
- block: function(l) {
936
- var y = R.push(l);
937
- return R.length === 1 && r.addEventListener(ut, it), function() {
938
- y(), R.length || r.removeEventListener(ut, it);
943
+ block: function(h) {
944
+ var R = d.push(h);
945
+ return d.length === 1 && o.addEventListener(ut, it), function() {
946
+ R(), d.length || o.removeEventListener(ut, it);
939
947
  };
940
948
  }
941
949
  };
942
- return p;
950
+ return m;
943
951
  }
944
- function Ct(t) {
952
+ function qt(t) {
945
953
  t === void 0 && (t = {});
946
- var e = t, n = e.initialEntries, r = n === void 0 ? ["/"] : n, o = e.initialIndex, s = r.map(function(d) {
947
- var g = Y(M({
954
+ var e = t, r = e.initialEntries, o = r === void 0 ? ["/"] : r, n = e.initialIndex, s = o.map(function(g) {
955
+ var y = Y(M({
948
956
  pathname: "/",
949
957
  search: "",
950
958
  hash: "",
951
959
  state: null,
952
960
  key: ft()
953
- }, typeof d == "string" ? tt(d) : d));
954
- return process.env.NODE_ENV !== "production" && F(g.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(d) + ")"), g;
955
- }), a = _t(o ?? s.length - 1, 0, s.length - 1), c = L.Pop, u = s[a], f = X(), h = X();
956
- function m(d) {
957
- return typeof d == "string" ? d : Q(d);
958
- }
959
- function P(d, g) {
960
- return g === void 0 && (g = null), Y(M({
961
+ }, typeof g == "string" ? tt(g) : g));
962
+ return process.env.NODE_ENV !== "production" && F(y.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(g) + ")"), y;
963
+ }), a = Ot(n ?? s.length - 1, 0, s.length - 1), c = L.Pop, u = s[a], l = X(), p = X();
964
+ function f(g) {
965
+ return typeof g == "string" ? g : Q(g);
966
+ }
967
+ function E(g, y) {
968
+ return y === void 0 && (y = null), Y(M({
961
969
  pathname: u.pathname,
962
970
  search: "",
963
971
  hash: ""
964
- }, typeof d == "string" ? tt(d) : d, {
965
- state: g,
972
+ }, typeof g == "string" ? tt(g) : g, {
973
+ state: y,
966
974
  key: ft()
967
975
  }));
968
976
  }
969
- function R(d, g, E) {
970
- return !h.length || (h.call({
971
- action: d,
972
- location: g,
973
- retry: E
977
+ function d(g, y, P) {
978
+ return !p.length || (p.call({
979
+ action: g,
980
+ location: y,
981
+ retry: P
974
982
  }), !1);
975
983
  }
976
- function x(d, g) {
977
- c = d, u = g, f.call({
984
+ function k(g, y) {
985
+ c = g, u = y, l.call({
978
986
  action: c,
979
987
  location: u
980
988
  });
981
989
  }
982
- function k(d, g) {
983
- var E = L.Push, b = P(d, g);
984
- function p() {
985
- k(d, g);
990
+ function x(g, y) {
991
+ var P = L.Push, S = E(g, y);
992
+ function m() {
993
+ x(g, y);
986
994
  }
987
- process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(d) + ")"), R(E, b, p) && (a += 1, s.splice(a, s.length, b), x(E, b));
995
+ process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(g) + ")"), d(P, S, m) && (a += 1, s.splice(a, s.length, S), k(P, S));
988
996
  }
989
- function C(d, g) {
990
- var E = L.Replace, b = P(d, g);
991
- function p() {
992
- C(d, g);
997
+ function C(g, y) {
998
+ var P = L.Replace, S = E(g, y);
999
+ function m() {
1000
+ C(g, y);
993
1001
  }
994
- process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(d) + ")"), R(E, b, p) && (s[a] = b, x(E, b));
1002
+ process.env.NODE_ENV !== "production" && F(u.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(g) + ")"), d(P, S, m) && (s[a] = S, k(P, S));
995
1003
  }
996
- function B(d) {
997
- var g = _t(a + d, 0, s.length - 1), E = L.Pop, b = s[g];
998
- function p() {
999
- B(d);
1004
+ function B(g) {
1005
+ var y = Ot(a + g, 0, s.length - 1), P = L.Pop, S = s[y];
1006
+ function m() {
1007
+ B(g);
1000
1008
  }
1001
- R(E, b, p) && (a = g, x(E, b));
1009
+ d(P, S, m) && (a = y, k(P, S));
1002
1010
  }
1003
1011
  var _ = {
1004
1012
  get index() {
@@ -1010,8 +1018,8 @@ function Ct(t) {
1010
1018
  get location() {
1011
1019
  return u;
1012
1020
  },
1013
- createHref: m,
1014
- push: k,
1021
+ createHref: f,
1022
+ push: x,
1015
1023
  replace: C,
1016
1024
  go: B,
1017
1025
  back: function() {
@@ -1020,17 +1028,17 @@ function Ct(t) {
1020
1028
  forward: function() {
1021
1029
  B(1);
1022
1030
  },
1023
- listen: function(g) {
1024
- return f.push(g);
1031
+ listen: function(y) {
1032
+ return l.push(y);
1025
1033
  },
1026
- block: function(g) {
1027
- return h.push(g);
1034
+ block: function(y) {
1035
+ return p.push(y);
1028
1036
  }
1029
1037
  };
1030
1038
  return _;
1031
1039
  }
1032
- function _t(t, e, n) {
1033
- return Math.min(Math.max(t, e), n);
1040
+ function Ot(t, e, r) {
1041
+ return Math.min(Math.max(t, e), r);
1034
1042
  }
1035
1043
  function it(t) {
1036
1044
  t.preventDefault(), t.returnValue = "";
@@ -1041,16 +1049,16 @@ function X() {
1041
1049
  get length() {
1042
1050
  return t.length;
1043
1051
  },
1044
- push: function(n) {
1045
- return t.push(n), function() {
1046
- t = t.filter(function(r) {
1047
- return r !== n;
1052
+ push: function(r) {
1053
+ return t.push(r), function() {
1054
+ t = t.filter(function(o) {
1055
+ return o !== r;
1048
1056
  });
1049
1057
  };
1050
1058
  },
1051
- call: function(n) {
1052
- t.forEach(function(r) {
1053
- return r && r(n);
1059
+ call: function(r) {
1060
+ t.forEach(function(o) {
1061
+ return o && o(r);
1054
1062
  });
1055
1063
  }
1056
1064
  };
@@ -1059,121 +1067,121 @@ function ft() {
1059
1067
  return Math.random().toString(36).substr(2, 8);
1060
1068
  }
1061
1069
  function Q(t) {
1062
- var e = t.pathname, n = e === void 0 ? "/" : e, r = t.search, o = r === void 0 ? "" : r, s = t.hash, a = s === void 0 ? "" : s;
1063
- return o && o !== "?" && (n += o.charAt(0) === "?" ? o : "?" + o), a && a !== "#" && (n += a.charAt(0) === "#" ? a : "#" + a), n;
1070
+ var e = t.pathname, r = e === void 0 ? "/" : e, o = t.search, n = o === void 0 ? "" : o, s = t.hash, a = s === void 0 ? "" : s;
1071
+ return n && n !== "?" && (r += n.charAt(0) === "?" ? n : "?" + n), a && a !== "#" && (r += a.charAt(0) === "#" ? a : "#" + a), r;
1064
1072
  }
1065
1073
  function tt(t) {
1066
1074
  var e = {};
1067
1075
  if (t) {
1068
- var n = t.indexOf("#");
1069
- n >= 0 && (e.hash = t.substr(n), t = t.substr(0, n));
1070
- var r = t.indexOf("?");
1071
- r >= 0 && (e.search = t.substr(r), t = t.substr(0, r)), t && (e.pathname = t);
1076
+ var r = t.indexOf("#");
1077
+ r >= 0 && (e.hash = t.substr(r), t = t.substr(0, r));
1078
+ var o = t.indexOf("?");
1079
+ o >= 0 && (e.search = t.substr(o), t = t.substr(0, o)), t && (e.pathname = t);
1072
1080
  }
1073
1081
  return e;
1074
1082
  }
1075
- function Rn(t, e) {
1076
- const n = Tt({ ...t }), r = (a) => {
1077
- Object.assign(n, { ...a });
1078
- }, o = n, s = Ie(o, e);
1083
+ function vr(t, e) {
1084
+ const r = Ft({ ...t }), o = (a) => {
1085
+ Object.assign(r, { ...a });
1086
+ }, n = r, s = Fe(n, e);
1079
1087
  return {
1080
- currentRoute: o,
1088
+ currentRoute: n,
1081
1089
  routerRoute: s,
1082
- updateRoute: r
1090
+ updateRoute: o
1083
1091
  };
1084
1092
  }
1085
1093
  function K(t) {
1086
- return !t.startsWith("http") ? yn(t) : gn(t);
1094
+ return !t.startsWith("http") ? Er(t) : wr(t);
1087
1095
  }
1088
- function gn(t) {
1089
- const { protocol: e, host: n, pathname: r, search: o, searchParams: s, hash: a } = new URL(t, t);
1096
+ function wr(t) {
1097
+ const { protocol: e, host: r, pathname: o, search: n, searchParams: s, hash: a } = new URL(t, t);
1090
1098
  return {
1091
1099
  protocol: e,
1092
- host: n,
1093
- pathname: r,
1094
- search: o,
1100
+ host: r,
1101
+ pathname: o,
1102
+ search: n,
1095
1103
  searchParams: s,
1096
1104
  hash: a
1097
1105
  };
1098
1106
  }
1099
- function yn(t) {
1100
- const { pathname: e, search: n, searchParams: r, hash: o } = new URL(t, "https://localhost");
1107
+ function Er(t) {
1108
+ const { pathname: e, search: r, searchParams: o, hash: n } = new URL(t, "https://localhost");
1101
1109
  return {
1102
1110
  pathname: e,
1103
- search: n,
1104
- searchParams: r,
1105
- hash: o
1111
+ search: r,
1112
+ searchParams: o,
1113
+ hash: n
1106
1114
  };
1107
1115
  }
1108
- function vn(t) {
1116
+ function Pr(t) {
1109
1117
  return (e) => {
1110
- const { host: n } = K(e);
1111
- return !(n === void 0 || n === t);
1118
+ const { host: r } = K(e);
1119
+ return !(r === void 0 || r === t);
1112
1120
  };
1113
1121
  }
1114
- function pe() {
1122
+ function he() {
1115
1123
  return typeof window < "u" && typeof window.document < "u";
1116
1124
  }
1117
- function wn({ mode: t, listener: e }) {
1118
- const n = En(t), r = (u, f) => {
1119
- if (f != null && f.replace)
1120
- return n.replace(u);
1121
- n.push(u);
1122
- }, o = () => {
1123
- const u = Q(n.location);
1124
- return n.replace(u);
1125
+ function Sr({ mode: t, listener: e }) {
1126
+ const r = br(t), o = (u, l) => {
1127
+ if (l != null && l.replace)
1128
+ return r.replace(u);
1129
+ r.push(u);
1130
+ }, n = () => {
1131
+ const u = Q(r.location);
1132
+ return r.replace(u);
1125
1133
  };
1126
1134
  let s;
1127
1135
  return {
1128
- ...n,
1129
- update: r,
1130
- refresh: o,
1136
+ ...r,
1137
+ update: o,
1138
+ refresh: n,
1131
1139
  startListening: () => {
1132
- s == null || s(), s = n.listen(e);
1140
+ s == null || s(), s = r.listen(e);
1133
1141
  },
1134
1142
  stopListening: () => {
1135
1143
  s == null || s();
1136
1144
  }
1137
1145
  };
1138
1146
  }
1139
- function En(t = "auto") {
1147
+ function br(t = "auto") {
1140
1148
  switch (t) {
1141
1149
  case "auto":
1142
- return pe() ? Vt() : Ct();
1150
+ return he() ? _t() : qt();
1143
1151
  case "browser":
1144
- return Vt();
1152
+ return _t();
1145
1153
  case "memory":
1146
- return Ct();
1154
+ return qt();
1147
1155
  case "hash":
1148
- return mn();
1156
+ return Rr();
1149
1157
  default:
1150
1158
  const e = t;
1151
1159
  throw new Error(`Switch is not exhaustive for mode: ${e}`);
1152
1160
  }
1153
1161
  }
1154
- function Pn(t) {
1162
+ function kr(t) {
1155
1163
  return et(() => () => at("h1", t), {
1156
1164
  name: t,
1157
1165
  props: []
1158
1166
  });
1159
1167
  }
1160
- function de(t) {
1168
+ function pe(t) {
1161
1169
  const e = new URLSearchParams(t);
1162
1170
  return {
1163
- get: (n) => e.get(n),
1164
- getAll: (n) => e.getAll(n)
1171
+ get: (r) => e.get(r),
1172
+ getAll: (r) => e.getAll(r)
1165
1173
  };
1166
1174
  }
1167
- const qt = Symbol();
1168
- function bn({
1175
+ const Wt = Symbol();
1176
+ function xr({
1169
1177
  rejections: t
1170
1178
  }) {
1171
1179
  const e = (a) => {
1172
1180
  const c = {
1173
1181
  ...t
1174
1182
  };
1175
- return st(c[a] ?? Pn(a));
1176
- }, n = (a) => {
1183
+ return st(c[a] ?? kr(a));
1184
+ }, r = (a) => {
1177
1185
  const c = st(e(a)), u = {
1178
1186
  name: a,
1179
1187
  component: c,
@@ -1183,31 +1191,26 @@ function bn({
1183
1191
  matched: u,
1184
1192
  matches: [u],
1185
1193
  key: a,
1186
- query: de(""),
1194
+ query: pe(""),
1187
1195
  params: {},
1188
- [qt]: !0
1196
+ [Wt]: !0
1189
1197
  };
1190
- }, r = (a) => qt in a, o = (a) => {
1198
+ }, o = (a) => Wt in a, n = (a) => {
1191
1199
  if (!a) {
1192
1200
  s.value = null;
1193
1201
  return;
1194
1202
  }
1195
1203
  const c = e(a);
1196
1204
  s.value = { type: a, component: c };
1197
- }, s = qe(null);
1205
+ }, s = We(null);
1198
1206
  return {
1199
- setRejection: o,
1207
+ setRejection: n,
1200
1208
  rejection: s,
1201
- getRejectionRoute: n,
1202
- isRejectionRoute: r
1209
+ getRejectionRoute: r,
1210
+ isRejectionRoute: o
1203
1211
  };
1204
1212
  }
1205
- class Sn extends Error {
1206
- constructor(e) {
1207
- super(`Route disabled: "${e}"`);
1208
- }
1209
- }
1210
- class xn extends Error {
1213
+ class Ar extends Error {
1211
1214
  constructor(e) {
1212
1215
  super(`Route not found: "${e}"`);
1213
1216
  }
@@ -1215,219 +1218,217 @@ class xn extends Error {
1215
1218
  function Bt(t) {
1216
1219
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1217
1220
  }
1218
- function kn(t, e) {
1219
- const n = Array.from(t.matchAll(e));
1220
- if (n.length === 0)
1221
+ function Lr(t, e) {
1222
+ const r = Array.from(t.matchAll(e));
1223
+ if (r.length === 0)
1221
1224
  return [t];
1222
- let r = 0;
1223
- const o = n.reduce((a, c) => {
1224
- const u = Bt(t.slice(r, c.index));
1225
+ let o = 0;
1226
+ const n = r.reduce((a, c) => {
1227
+ const u = Bt(t.slice(o, c.index));
1225
1228
  u.length && a.push(u);
1226
- const [f] = c;
1227
- return a.push(f), r = c.index + f.length, a;
1228
- }, []), s = t.slice(r);
1229
- return s && o.push(s), o;
1229
+ const [l] = c;
1230
+ return a.push(l), o = c.index + l.length, a;
1231
+ }, []), s = t.slice(o);
1232
+ return s && n.push(s), n;
1230
1233
  }
1231
- function An(t) {
1232
- const e = me(t.path.toString());
1234
+ function Br(t) {
1235
+ const e = de(t.path.toString());
1233
1236
  return new RegExp(`^${e}$`, "i");
1234
1237
  }
1235
- function Ln(t) {
1238
+ function Ur(t) {
1236
1239
  const e = new URLSearchParams(t.query.toString());
1237
- return Array.from(e.entries()).filter(([, n]) => !yt(n)).map(([n, r]) => {
1238
- const o = me(r);
1239
- return new RegExp(`${Bt(n)}=${o}(&|$)`, "i");
1240
+ return Array.from(e.entries()).filter(([, r]) => !Rt(r)).map(([r, o]) => {
1241
+ const n = de(o);
1242
+ return new RegExp(`${Bt(r)}=${n}(&|$)`, "i");
1240
1243
  });
1241
1244
  }
1242
- function me(t) {
1243
- return kn(t, new RegExp(Bn, "g")).map((e) => e.startsWith(O) ? Re(e) : Bt(e)).join("");
1245
+ function de(t) {
1246
+ return Lr(t, new RegExp($r, "g")).map((e) => e.startsWith(O) ? me(e) : Bt(e)).join("");
1244
1247
  }
1245
- function Re(t) {
1248
+ function me(t) {
1246
1249
  return [
1247
- Un,
1248
- $n
1249
- ].reduce((e, n) => n(e), t);
1250
+ Nr,
1251
+ Hr
1252
+ ].reduce((e, r) => r(e), t);
1250
1253
  }
1251
- const Bn = `\\${O}\\??([\\w-_]+)\\${D}`, Ut = `\\${O}\\?([\\w-_]+)\\${D}`, ge = `\\${O}([\\w-_]+)\\${D}`;
1252
- function Un(t) {
1254
+ const $r = `\\${O}\\??([\\w-_]+)\\${D}`, Ut = `\\${O}\\?([\\w-_]+)\\${D}`, ge = `\\${O}([\\w-_]+)\\${D}`;
1255
+ function Nr(t) {
1253
1256
  return t.replace(new RegExp(Ut, "g"), ".*");
1254
1257
  }
1255
- function yt(t) {
1258
+ function Rt(t) {
1256
1259
  return new RegExp(Ut, "g").test(t);
1257
1260
  }
1258
- function $n(t) {
1261
+ function Hr(t) {
1259
1262
  return t.replace(new RegExp(ge, "g"), ".+");
1260
1263
  }
1261
1264
  function dt(t) {
1262
- const [e] = lt(t, new RegExp(Ut, "g")), [n] = lt(t, new RegExp(ge, "g"));
1263
- return e ?? n;
1265
+ const [e] = lt(t, new RegExp(Ut, "g")), [r] = lt(t, new RegExp(ge, "g"));
1266
+ return e ?? r;
1264
1267
  }
1265
1268
  function lt(t, e) {
1266
- return Array.from(t.matchAll(e)).flatMap(([, ...r]) => r.map((o) => kt(o) ? o : ""));
1269
+ return Array.from(t.matchAll(e)).flatMap(([, ...o]) => o.map((n) => xt(n) ? n : ""));
1267
1270
  }
1268
- function ye(t, e, n) {
1269
- const r = we(e, n), [o] = lt(t, r);
1270
- return o;
1271
+ function ye(t, e, r) {
1272
+ const o = ve(e, r), [n] = lt(t, o);
1273
+ return n;
1271
1274
  }
1272
- function ve(t, e) {
1275
+ function Re(t, e) {
1273
1276
  if (!e)
1274
1277
  return t;
1275
- const { name: n, param: r, value: o } = e, s = we(t, n);
1276
- return lt(t, s).reduce((c, u) => u === void 0 ? c : c.replace(u, () => Lt(o, r, n.startsWith("?"))), t);
1277
- }
1278
- function we(t, e) {
1279
- const n = [
1280
- Nn,
1281
- Hn,
1282
- Re
1283
- ].reduce((r, o) => o(r, e), t);
1284
- return new RegExp(n, "g");
1285
- }
1286
- function Nn(t, e) {
1278
+ const { name: r, param: o, value: n } = e, s = ve(t, r);
1279
+ return lt(t, s).reduce((c, u) => u === void 0 ? c : c.replace(u, () => Lt(n, o, r.startsWith("?"))), t);
1280
+ }
1281
+ function ve(t, e) {
1282
+ const r = [
1283
+ jr,
1284
+ Vr,
1285
+ me
1286
+ ].reduce((o, n) => n(o, e), t);
1287
+ return new RegExp(r, "g");
1288
+ }
1289
+ function jr(t, e) {
1287
1290
  if (!e.startsWith("?"))
1288
1291
  return t;
1289
- const n = new RegExp(`\\${O}\\${e}\\${D}`, "g");
1290
- return t.replace(n, "(.*)");
1292
+ const r = new RegExp(`\\${O}\\${e}\\${D}`, "g");
1293
+ return t.replace(r, "(.*)");
1291
1294
  }
1292
- function Hn(t, e) {
1295
+ function Vr(t, e) {
1293
1296
  if (e.startsWith("?"))
1294
1297
  return t;
1295
- const n = new RegExp(`\\${O}${e}\\${D}`, "g");
1296
- return t.replace(n, "(.+)");
1297
- }
1298
- function Ee(t, ...e) {
1299
- return e.reduce((n, r) => {
1300
- if (!r)
1301
- return n;
1302
- const o = new URLSearchParams(r).toString();
1303
- return Object.keys(o).length === 0 ? n : n.includes("?") ? `${n}&${o}` : `${n}?${o}`;
1298
+ const r = new RegExp(`\\${O}${e}\\${D}`, "g");
1299
+ return t.replace(r, "(.+)");
1300
+ }
1301
+ function we(t, ...e) {
1302
+ return e.reduce((r, o) => {
1303
+ if (!o)
1304
+ return r;
1305
+ const n = new URLSearchParams(o).toString();
1306
+ return Object.keys(n).length === 0 ? r : r.includes("?") ? `${r}&${n}` : `${r}?${n}`;
1304
1307
  }, t);
1305
1308
  }
1306
- function jn(t, e = {}) {
1307
- const { params: n = {}, query: r } = e, o = Vn(t.host, n), s = Cn(t.path, n), a = _n(t.query, n);
1308
- return Ee(`${o}${s}`, a, r);
1309
- }
1310
- function Vn(t, e) {
1311
- const n = t.toString();
1312
- return Object.entries(t.params).reduce((r, [o, s]) => {
1313
- const a = dt(`${O}${o}${D}`);
1314
- return a ? ve(r, { name: o, param: s, value: e[a] }) : r;
1315
- }, n);
1316
- }
1317
- function Cn(t, e) {
1318
- const n = t.toString();
1319
- return Object.entries(t.params).reduce((r, [o, s]) => {
1320
- const a = dt(`${O}${o}${D}`);
1321
- return a ? ve(r, { name: o, param: s, value: e[a] }) : r;
1322
- }, n);
1323
- }
1324
- function _n(t, e) {
1325
- const n = t.toString();
1326
- if (!n)
1309
+ function Cr(t, e = {}) {
1310
+ const { params: r = {}, query: o } = e, n = _r(t.host, r), s = qr(t.path, r), a = Or(t.query, r);
1311
+ return we(`${n}${s}`, a, o);
1312
+ }
1313
+ function _r(t, e) {
1314
+ const r = t.toString();
1315
+ return Object.entries(t.params).reduce((o, [n, s]) => {
1316
+ const a = dt(`${O}${n}${D}`);
1317
+ return a ? Re(o, { name: n, param: s, value: e[a] }) : o;
1318
+ }, r);
1319
+ }
1320
+ function qr(t, e) {
1321
+ const r = t.toString();
1322
+ return Object.entries(t.params).reduce((o, [n, s]) => {
1323
+ const a = dt(`${O}${n}${D}`);
1324
+ return a ? Re(o, { name: n, param: s, value: e[a] }) : o;
1325
+ }, r);
1326
+ }
1327
+ function Or(t, e) {
1328
+ const r = t.toString();
1329
+ if (!r)
1327
1330
  return {};
1328
- const r = new URLSearchParams(n);
1329
- return Array.from(r.entries()).reduce((o, [s, a]) => {
1331
+ const o = new URLSearchParams(r);
1332
+ return Array.from(o.entries()).reduce((n, [s, a]) => {
1330
1333
  const c = dt(a);
1331
1334
  if (!c)
1332
- return { ...o, [s]: a };
1333
- const f = Lt(e[c], t.params[c], yt(a)), h = e[c] === void 0 && f === "";
1334
- return yt(a) && h ? o : { ...o, [s]: f };
1335
+ return { ...n, [s]: a };
1336
+ const l = Lt(e[c], t.params[c], Rt(a)), p = e[c] === void 0 && l === "";
1337
+ return Rt(a) && p ? n : { ...n, [s]: l };
1335
1338
  }, {});
1336
1339
  }
1337
- function qn(t) {
1338
- return (e, n, r) => {
1340
+ function Wr(t) {
1341
+ return (e, r, o) => {
1339
1342
  if (J(e))
1340
- return Ee(e, (n ?? {}).query);
1341
- const o = n ?? {}, s = r ?? {}, a = t.find((u) => u.key === e);
1343
+ return we(e, (r ?? {}).query);
1344
+ const n = r ?? {}, s = o ?? {}, a = t.find((u) => u.key === e);
1342
1345
  if (!a)
1343
- throw new xn(String(e));
1344
- if (a.matched.disabled)
1345
- throw new Sn(String(e));
1346
- return jn(a, {
1347
- params: o,
1346
+ throw new Ar(String(e));
1347
+ return Cr(a, {
1348
+ params: n,
1348
1349
  query: s.query
1349
1350
  });
1350
1351
  };
1351
1352
  }
1352
- class On extends Error {
1353
+ class Mr extends Error {
1353
1354
  constructor() {
1354
1355
  super("initialUrl must be set if window.location is unavailable");
1355
1356
  }
1356
1357
  }
1357
- function Wn(t) {
1358
+ function Dr(t) {
1358
1359
  if (t)
1359
1360
  return t;
1360
- if (pe())
1361
+ if (he())
1361
1362
  return window.location.toString();
1362
- throw new On();
1363
+ throw new Mr();
1363
1364
  }
1364
- const Mn = (t, e) => {
1365
+ const Tr = (t, e) => {
1365
1366
  try {
1366
- Pe(t, e);
1367
+ Ee(t, e);
1367
1368
  } catch {
1368
1369
  return !1;
1369
1370
  }
1370
1371
  return !0;
1371
- }, Pe = (t, e) => {
1372
- const { pathname: n, search: r } = K(e);
1372
+ }, Ee = (t, e) => {
1373
+ const { pathname: r, search: o } = K(e);
1373
1374
  return {
1374
- ...Dn(t.path, n),
1375
- ...Tn(t.query, r)
1375
+ ...Ir(t.path, r),
1376
+ ...Jr(t.query, o)
1376
1377
  };
1377
1378
  };
1378
- function Dn(t, e) {
1379
- const n = {}, r = decodeURIComponent(e);
1380
- for (const [o, s] of Object.entries(t.params)) {
1381
- const a = o.startsWith("?"), c = a ? o.slice(1) : o, u = ye(r, t.toString(), o), f = At(u, s, a);
1382
- n[c] = f;
1383
- }
1384
- return n;
1385
- }
1386
- function Tn(t, e) {
1387
- const n = {}, r = new URLSearchParams(e);
1388
- for (const [o, s] of Object.entries(t.params)) {
1389
- const a = o.startsWith("?"), c = a ? o.slice(1) : o, u = r.get(c) ?? void 0, f = At(u, s, a);
1390
- n[c] = f;
1391
- }
1392
- return n;
1393
- }
1394
- const In = (t) => "name" in t.matched && !!t.matched.name, Jn = (t, e) => {
1395
- const { pathname: n } = K(e);
1396
- return An(t).test(n);
1397
- }, Fn = (t, e) => {
1398
- const { search: n } = K(e);
1399
- return Ln(t).every((o) => o.test(n));
1379
+ function Ir(t, e) {
1380
+ const r = {}, o = decodeURIComponent(e);
1381
+ for (const [n, s] of Object.entries(t.params)) {
1382
+ const a = n.startsWith("?"), c = a ? n.slice(1) : n, u = ye(o, t.toString(), n), l = At(u, s, a);
1383
+ r[c] = l;
1384
+ }
1385
+ return r;
1386
+ }
1387
+ function Jr(t, e) {
1388
+ const r = {}, o = new URLSearchParams(e);
1389
+ for (const [n, s] of Object.entries(t.params)) {
1390
+ const a = n.startsWith("?"), c = a ? n.slice(1) : n, u = o.get(c) ?? void 0, l = At(u, s, a);
1391
+ r[c] = l;
1392
+ }
1393
+ return r;
1394
+ }
1395
+ const Fr = (t) => "name" in t.matched && !!t.matched.name, Qr = (t, e) => {
1396
+ const { pathname: r } = K(e);
1397
+ return Br(t).test(r);
1398
+ }, Kr = (t, e) => {
1399
+ const { search: r } = K(e);
1400
+ return Ur(t).every((n) => n.test(r));
1400
1401
  };
1401
- function Qn(t) {
1402
- const { searchParams: e, pathname: n } = K(t), r = -1, o = 1;
1402
+ function Gr(t) {
1403
+ const { searchParams: e, pathname: r } = K(t), o = -1, n = 1;
1403
1404
  return (s, a) => {
1404
- const c = Wt(s, e), u = Ot(s, n), f = Wt(a, e), h = Ot(a, n);
1405
- return s.depth > a.depth ? r : s.depth < a.depth ? o : c + u > f + h ? r : c + u < f + h ? o : 0;
1405
+ const c = Dt(s, e), u = Mt(s, r), l = Dt(a, e), p = Mt(a, r);
1406
+ return s.depth > a.depth ? o : s.depth < a.depth ? n : c + u > l + p ? o : c + u < l + p ? n : 0;
1406
1407
  };
1407
1408
  }
1408
- function Ot(t, e) {
1409
- const n = Object.keys(t.path.params).filter((o) => o.startsWith("?")).map((o) => o), r = n.filter((o) => ye(e, t.path.toString(), o) === void 0);
1410
- return n.length - r.length;
1411
- }
1412
- function Wt(t, e) {
1413
- const n = new URLSearchParams(t.query.toString()), r = Array.from(n.keys()), o = r.filter((s) => !e.has(s));
1409
+ function Mt(t, e) {
1410
+ const r = Object.keys(t.path.params).filter((n) => n.startsWith("?")).map((n) => n), o = r.filter((n) => ye(e, t.path.toString(), n) === void 0);
1414
1411
  return r.length - o.length;
1415
1412
  }
1416
- const Kn = [
1417
- In,
1418
- Jn,
1419
- Fn,
1420
- Mn
1413
+ function Dt(t, e) {
1414
+ const r = new URLSearchParams(t.query.toString()), o = Array.from(r.keys()), n = o.filter((s) => !e.has(s));
1415
+ return o.length - n.length;
1416
+ }
1417
+ const zr = [
1418
+ Fr,
1419
+ Qr,
1420
+ Kr,
1421
+ Tr
1421
1422
  ];
1422
- function gt(t, e) {
1423
- const n = Qn(e), r = t.filter((u) => Kn.every((f) => f(u, e))).sort(n);
1424
- if (r.length === 0)
1423
+ function yt(t, e) {
1424
+ const r = Gr(e), o = t.filter((u) => zr.every((l) => l(u, e))).sort(r);
1425
+ if (o.length === 0)
1425
1426
  return;
1426
- const [o] = r, { search: s } = K(e), a = de(s), c = Pe(o, e);
1427
+ const [n] = o, { search: s } = K(e), a = pe(s), c = Ee(n, e);
1427
1428
  return {
1428
- matched: o.matched,
1429
- matches: o.matches,
1430
- key: o.key,
1429
+ matched: n.matched,
1430
+ matches: n.matches,
1431
+ key: n.key,
1431
1432
  query: a,
1432
1433
  params: c
1433
1434
  };
@@ -1435,40 +1436,40 @@ function gt(t, e) {
1435
1436
  function $t(t) {
1436
1437
  return typeof t == "object" && t !== null && !Array.isArray(t);
1437
1438
  }
1438
- function Gn(t) {
1439
+ function Yr(t) {
1439
1440
  return t.every((e) => Array.isArray(e));
1440
1441
  }
1441
- function fr(t, e = {}) {
1442
- const n = Gn(t) ? t.flat() : t, r = qn(n), o = wn({
1442
+ function fn(t, e = {}) {
1443
+ const r = Yr(t) ? t.flat() : t, o = Wr(r), n = Sr({
1443
1444
  mode: e.historyMode,
1444
1445
  listener: () => {
1445
1446
  const v = Q(location);
1446
- x(v);
1447
+ k(v);
1447
1448
  }
1448
- }), { runBeforeRouteHooks: s, runAfterRouteHooks: a } = ze(), {
1449
+ }), { runBeforeRouteHooks: s, runAfterRouteHooks: a } = Xe(), {
1449
1450
  hooks: c,
1450
1451
  onBeforeRouteEnter: u,
1451
- onAfterRouteUpdate: f,
1452
- onBeforeRouteLeave: h,
1453
- onAfterRouteEnter: m,
1454
- onBeforeRouteUpdate: P,
1455
- onAfterRouteLeave: R
1456
- } = Xe();
1457
- async function x(v, { replace: N } = {}) {
1458
- if (o.stopListening(), S(v))
1459
- return o.update(v, { replace: N });
1460
- const q = gt(n, v) ?? E("NotFound"), T = { ...p }, I = await s({ to: q, from: T, hooks: c });
1452
+ onAfterRouteUpdate: l,
1453
+ onBeforeRouteLeave: p,
1454
+ onAfterRouteEnter: f,
1455
+ onBeforeRouteUpdate: E,
1456
+ onAfterRouteLeave: d
1457
+ } = tr();
1458
+ async function k(v, { replace: N } = {}) {
1459
+ if (n.stopListening(), b(v))
1460
+ return n.update(v, { replace: N });
1461
+ const q = yt(r, v) ?? P("NotFound"), T = { ...m }, I = await s({ to: q, from: T, hooks: c });
1461
1462
  switch (I.status) {
1462
1463
  case "ABORT":
1463
1464
  return;
1464
1465
  case "PUSH":
1465
- o.update(v, { replace: N }), await k(...I.to);
1466
+ n.update(v, { replace: N }), await x(...I.to);
1466
1467
  return;
1467
1468
  case "REJECT":
1468
- o.update(v, { replace: N }), d(I.type), l(q);
1469
+ n.update(v, { replace: N }), g(I.type), h(q);
1469
1470
  break;
1470
1471
  case "SUCCESS":
1471
- o.update(v, { replace: N }), d(null), l(q);
1472
+ n.update(v, { replace: N }), g(null), h(q);
1472
1473
  break;
1473
1474
  default:
1474
1475
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(I)}`);
@@ -1476,94 +1477,94 @@ function fr(t, e = {}) {
1476
1477
  const W = await a({ to: q, from: T, hooks: c });
1477
1478
  switch (W.status) {
1478
1479
  case "PUSH":
1479
- await k(...W.to);
1480
+ await x(...W.to);
1480
1481
  break;
1481
1482
  case "REJECT":
1482
- d(W.type);
1483
+ g(W.type);
1483
1484
  break;
1484
1485
  case "SUCCESS":
1485
1486
  break;
1486
1487
  default:
1487
- const rt = W;
1488
- throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(rt)}`);
1488
+ const nt = W;
1489
+ throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(nt)}`);
1489
1490
  }
1490
- o.startListening();
1491
+ n.startListening();
1491
1492
  }
1492
- const k = (v, N, q) => {
1493
+ const x = (v, N, q) => {
1493
1494
  if (J(v)) {
1494
- const rt = { ...N }, Ae = r(v, rt);
1495
- return x(Ae, { replace: rt.replace });
1495
+ const nt = { ...N }, xe = o(v, nt);
1496
+ return k(xe, { replace: nt.replace });
1496
1497
  }
1497
- const T = { ...q }, W = r(v, N ?? {}, T);
1498
- return x(W, { replace: T.replace });
1498
+ const T = { ...q }, W = o(v, N ?? {}, T);
1499
+ return k(W, { replace: T.replace });
1499
1500
  }, C = (v, N, q) => {
1500
1501
  if (J(v)) {
1501
1502
  const W = { ...N, replace: !0 };
1502
- return k(v, W);
1503
+ return x(v, W);
1503
1504
  }
1504
1505
  const T = N ?? {}, I = { ...q, replace: !0 };
1505
- return k(v, T, I);
1506
- }, B = (v) => d(v), _ = (v, N = {}) => {
1506
+ return x(v, T, I);
1507
+ }, B = (v) => g(v), _ = (v, N = {}) => {
1507
1508
  if (!J(v)) {
1508
- const q = r(v, N);
1509
- return gt(n, q);
1509
+ const q = o(v, N);
1510
+ return yt(r, q);
1510
1511
  }
1511
- if (!S(v))
1512
- return gt(n, v);
1513
- }, { setRejection: d, rejection: g, getRejectionRoute: E } = bn(e), b = E("NotFound"), { currentRoute: p, routerRoute: i, updateRoute: l } = Rn(b, k);
1514
- o.startListening();
1515
- const y = Wn(e.initialUrl), { host: w } = K(y), S = vn(w), A = x(y, { replace: !0 });
1512
+ if (!b(v))
1513
+ return yt(r, v);
1514
+ }, { setRejection: g, rejection: y, getRejectionRoute: P } = xr(e), S = P("NotFound"), { currentRoute: m, routerRoute: i, updateRoute: h } = vr(S, x);
1515
+ n.startListening();
1516
+ const R = Dr(e.initialUrl), { host: w } = K(R), b = Pr(w), A = k(R, { replace: !0 });
1516
1517
  function U(v) {
1517
- v.component("RouterView", ce), v.component("RouterLink", tn), v.provide(zt, g), v.provide(te, c), v.provide(Gt, $);
1518
+ v.component("RouterView", fr), v.component("RouterLink", rr), v.provide(Xt, y), v.provide(re, c), v.provide(Yt, $);
1518
1519
  }
1519
1520
  const $ = {
1520
1521
  route: i,
1521
- resolve: r,
1522
- push: k,
1522
+ resolve: o,
1523
+ push: x,
1523
1524
  replace: C,
1524
1525
  reject: B,
1525
1526
  find: _,
1526
- refresh: o.refresh,
1527
- forward: o.forward,
1528
- back: o.back,
1529
- go: o.go,
1527
+ refresh: n.refresh,
1528
+ forward: n.forward,
1529
+ back: n.back,
1530
+ go: n.go,
1530
1531
  install: U,
1531
1532
  initialized: A,
1532
- isExternal: S,
1533
+ isExternal: b,
1533
1534
  onBeforeRouteEnter: u,
1534
- onAfterRouteUpdate: f,
1535
- onBeforeRouteLeave: h,
1536
- onAfterRouteEnter: m,
1537
- onBeforeRouteUpdate: P,
1538
- onAfterRouteLeave: R
1535
+ onAfterRouteUpdate: l,
1536
+ onBeforeRouteLeave: p,
1537
+ onAfterRouteEnter: f,
1538
+ onBeforeRouteUpdate: E,
1539
+ onAfterRouteLeave: d
1539
1540
  };
1540
1541
  return $;
1541
1542
  }
1542
1543
  function Nt(t, e) {
1543
- const n = new RegExp(`\\${O}(\\??[\\w-_]+)\\${D}`, "g");
1544
- return Array.from(t.matchAll(n)).reduce((o, [s, a]) => {
1544
+ const r = new RegExp(`\\${O}(\\??[\\w-_]+)\\${D}`, "g");
1545
+ return Array.from(t.matchAll(r)).reduce((n, [s, a]) => {
1545
1546
  const c = dt(s);
1546
1547
  if (!c)
1547
- return o;
1548
- const u = ln(e, c);
1549
- return nt([c], o), o[a] = u, o;
1548
+ return n;
1549
+ const u = dr(e, c);
1550
+ return rt([c], n), n[a] = u, n;
1550
1551
  }, {});
1551
1552
  }
1552
- function Mt(t, e) {
1553
+ function Tt(t, e) {
1553
1554
  return {
1554
1555
  path: t,
1555
1556
  params: Nt(t, e),
1556
1557
  toString: () => t
1557
1558
  };
1558
1559
  }
1559
- function Dt(t, e) {
1560
+ function It(t, e) {
1560
1561
  return {
1561
1562
  query: t,
1562
1563
  params: Nt(t, e),
1563
1564
  toString: () => t
1564
1565
  };
1565
1566
  }
1566
- function be(t, e) {
1567
+ function Pe(t, e) {
1567
1568
  return {
1568
1569
  host: t,
1569
1570
  params: Nt(t, e),
@@ -1573,78 +1574,73 @@ function be(t, e) {
1573
1574
  function Se(t) {
1574
1575
  return t === void 0 ? "" : t;
1575
1576
  }
1576
- function zn(t) {
1577
+ function Xr(t) {
1577
1578
  return $t(t) && typeof t.path == "string";
1578
1579
  }
1579
- function xe(t) {
1580
- return t === void 0 ? Mt("", {}) : zn(t) ? t : Mt(t, {});
1580
+ function be(t) {
1581
+ return t === void 0 ? Tt("", {}) : Xr(t) ? t : Tt(t, {});
1581
1582
  }
1582
- function Yn(t) {
1583
+ function Zr(t) {
1583
1584
  return $t(t) && typeof t.query == "string";
1584
1585
  }
1585
1586
  function ke(t) {
1586
- return t === void 0 ? Dt("", {}) : Yn(t) ? t : Dt(t, {});
1587
+ return t === void 0 ? It("", {}) : Zr(t) ? t : It(t, {});
1587
1588
  }
1588
- function lr(t) {
1589
- const e = Xn(t), n = Se(t.name), r = xe(t.path), o = ke(t.query), s = st({ meta: {}, ...e }), a = {
1590
- matched: s,
1591
- matches: [s],
1592
- key: n,
1589
+ function ln(t) {
1590
+ const e = Se(t.name), r = be(t.path), o = ke(t.query), n = st({ meta: {}, ...t }), s = {
1591
+ matched: n,
1592
+ matches: [n],
1593
+ key: e,
1593
1594
  path: r,
1594
1595
  query: o,
1595
1596
  depth: 1,
1596
- disabled: t.disabled ?? !1,
1597
- host: be("", {})
1598
- }, c = re(t) ? se(t.parent, a) : a;
1599
- return nt(c.path.params, c.query.params), c;
1597
+ host: Pe("", {})
1598
+ }, a = ae(t) ? se(t.parent, s) : s;
1599
+ return rt(a.path.params, a.query.params), a;
1600
1600
  }
1601
- function Xn(t) {
1602
- return an(t) ? { ...t, component: ce } : t;
1603
- }
1604
- function Zn(t) {
1601
+ function tn(t) {
1605
1602
  return $t(t) && typeof t.host == "string";
1606
1603
  }
1607
- function tr(t) {
1608
- return Zn(t) ? t : be(t, {});
1604
+ function Jt(t) {
1605
+ return tn(t) ? t : Pe(t, {});
1609
1606
  }
1610
- function hr(t) {
1611
- const e = Se(t.name), n = xe(t.path), r = ke(t.query), o = tr(t.host ?? ""), s = st({ meta: {}, ...t }), a = {
1607
+ function hn(t) {
1608
+ const e = Se(t.name), r = be(t.path), o = ke(t.query), n = ir(t) ? Jt(t.host) : Jt(""), s = st({ meta: {}, ...t }), a = {
1612
1609
  matched: s,
1613
1610
  matches: [s],
1614
1611
  key: e,
1615
- host: o,
1616
- path: n,
1617
- query: r,
1618
- depth: 1,
1619
- disabled: t.disabled ?? !1
1620
- }, c = re(t) ? se(t.parent, a) : a;
1621
- return nt(c.path.params, c.query.params, c.host.params), c;
1612
+ host: n,
1613
+ path: r,
1614
+ query: o,
1615
+ depth: 1
1616
+ }, c = ae(t) ? se(t.parent, a) : a;
1617
+ return rt(c.path.params, c.query.params, c.host.params), c;
1622
1618
  }
1623
1619
  export {
1624
- Oe as DuplicateParamsError,
1625
- tn as RouterLink,
1620
+ Me as DuplicateParamsError,
1621
+ rr as RouterLink,
1626
1622
  vt as RouterNotInstalledError,
1627
- ce as RouterView,
1628
- We as UseRouteInvalidError,
1629
- ur as component,
1630
- hr as createExternalRoute,
1631
- pn as createParam,
1632
- lr as createRoute,
1633
- fr as createRouter,
1634
- fn as isParamWithDefault,
1635
- Je as isRoute,
1636
- ar as onAfterRouteEnter,
1637
- sr as onAfterRouteLeave,
1638
- cr as onAfterRouteUpdate,
1639
- rr as onBeforeRouteLeave,
1640
- or as onBeforeRouteUpdate,
1641
- Mt as path,
1642
- Dt as query,
1643
- Gt as routerInjectionKey,
1644
- zt as routerRejectionKey,
1645
- Me as useLink,
1646
- De as useRejection,
1647
- Qe as useRoute,
1623
+ fr as RouterView,
1624
+ De as UseRouteInvalidError,
1625
+ nr as component,
1626
+ hn as createExternalRoute,
1627
+ gr as createParam,
1628
+ ln as createRoute,
1629
+ fn as createRouter,
1630
+ pr as isParamWithDefault,
1631
+ Qe as isRoute,
1632
+ an as onAfterRouteEnter,
1633
+ sn as onAfterRouteLeave,
1634
+ cn as onAfterRouteUpdate,
1635
+ nn as onBeforeRouteLeave,
1636
+ on as onBeforeRouteUpdate,
1637
+ Tt as path,
1638
+ It as query,
1639
+ Yt as routerInjectionKey,
1640
+ Xt as routerRejectionKey,
1641
+ Te as useLink,
1642
+ Ie as useRejection,
1643
+ Ge as useRoute,
1648
1644
  wt as useRouter,
1649
- ir as withDefault
1645
+ un as withDefault
1650
1646
  };