@kitbag/router 0.18.2 → 0.19.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,14 +1,14 @@
1
- var Ar = Object.defineProperty;
2
- var kr = (e, t, r) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => kr(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as xr, watch as te, onUnmounted as Ze, computed as Z, ref as je, toValue as O, toRefs as Ur, defineComponent as me, createElementBlock as Lr, openBlock as xt, normalizeClass as Br, renderSlot as Ut, normalizeProps as Lt, guardReactiveProps as Cr, unref as Re, h as ue, getCurrentInstance as Nr, provide as Vr, createCommentVNode as Zr, mergeProps as jr, createBlock as Or, resolveDynamicComponent as $r } from "vue";
1
+ var Sr = Object.defineProperty;
2
+ var Ar = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var T = (e, t, r) => Ar(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { inject as ae, markRaw as Ae, reactive as Ve, defineAsyncComponent as kr, watch as te, onUnmounted as Ze, computed as Z, ref as je, toValue as $, toRefs as xr, defineComponent as me, createElementBlock as Ur, openBlock as kt, normalizeClass as Lr, renderSlot as xt, normalizeProps as Ut, guardReactiveProps as Br, unref as Re, h as ue, getCurrentInstance as Cr, provide as Nr, createCommentVNode as Vr, mergeProps as Zr, createBlock as jr, resolveDynamicComponent as Or } from "vue";
5
5
  function M(e) {
6
6
  return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
7
7
  }
8
- function Bt(e) {
8
+ function Lt(e) {
9
9
  return M(e) ? e : `/${e}`;
10
10
  }
11
- class Hr extends Error {
11
+ class $r extends Error {
12
12
  /**
13
13
  * Constructs a new DuplicateParamsError instance with a message indicating the problematic parameter.
14
14
  * @param paramName - The name of the parameter that was duplicated.
@@ -17,7 +17,7 @@ class Hr extends Error {
17
17
  super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
18
18
  }
19
19
  }
20
- class _r extends Error {
20
+ class Hr extends Error {
21
21
  constructor(t) {
22
22
  super(`Child property on meta for ${t} conflicts with the parent meta.`);
23
23
  }
@@ -27,7 +27,7 @@ class ye extends Error {
27
27
  super("Router not installed");
28
28
  }
29
29
  }
30
- class qr extends Error {
30
+ class _r extends Error {
31
31
  /**
32
32
  * Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names.
33
33
  * This detailed error message aids in quickly identifying and resolving mismatches in route usage.
@@ -38,9 +38,9 @@ class qr extends Error {
38
38
  super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
39
39
  }
40
40
  }
41
- const Ct = Symbol();
42
- function ze() {
43
- const e = ae(Ct);
41
+ const Bt = Symbol();
42
+ function Ge() {
43
+ const e = ae(Bt);
44
44
  if (!e)
45
45
  throw new ye();
46
46
  return e;
@@ -48,51 +48,51 @@ function ze() {
48
48
  function fe(e) {
49
49
  return Array.isArray(e) ? e : [e];
50
50
  }
51
- function Nt(e, t) {
51
+ function Ct(e, t) {
52
52
  return e.filter((r) => t === r).length;
53
53
  }
54
54
  function ge(...e) {
55
55
  const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r));
56
56
  for (const r of t)
57
- if (Nt(t, r) > 1)
58
- throw new Hr(r);
57
+ if (Ct(t, r) > 1)
58
+ throw new $r(r);
59
59
  }
60
60
  class G extends Error {
61
61
  }
62
62
  const ve = "[", Oe = "]";
63
- function Ir(e) {
63
+ function qr(e) {
64
64
  return e !== String && e !== Boolean && e !== Number && e !== Date;
65
65
  }
66
- function Dr(e) {
67
- return typeof e == "function" && Ir(e);
66
+ function Ir(e) {
67
+ return typeof e == "function" && qr(e);
68
68
  }
69
69
  function $e(e) {
70
70
  return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
71
71
  }
72
- function Vt(e) {
72
+ function Nt(e) {
73
73
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean";
74
74
  }
75
- function Fr(e, t) {
75
+ function Dr(e, t) {
76
76
  return $e(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
77
77
  get: (r) => re(r, e),
78
78
  set: (r) => ne(r, e),
79
79
  defaultValue: t
80
80
  };
81
81
  }
82
- function Tr(e) {
82
+ function Fr(e) {
83
83
  return $e(e) && e.defaultValue !== void 0;
84
84
  }
85
- function Ao(e, t) {
86
- return Fr(e, t);
85
+ function ko(e, t) {
86
+ return Dr(e, t);
87
87
  }
88
- function Zt(e) {
88
+ function Vt(e) {
89
89
  return typeof e == "object" && e !== null && !Array.isArray(e);
90
90
  }
91
91
  function J(e) {
92
92
  return typeof e == "string" && e.length > 0;
93
93
  }
94
94
  let v = null;
95
- async function Mr() {
95
+ async function Tr() {
96
96
  const {
97
97
  ZodSchema: e,
98
98
  ZodString: t,
@@ -101,18 +101,18 @@ async function Mr() {
101
101
  ZodNumber: o,
102
102
  ZodLiteral: a,
103
103
  ZodObject: s,
104
- ZodEnum: f,
104
+ ZodEnum: l,
105
105
  ZodNativeEnum: p,
106
- ZodArray: h,
107
- ZodTuple: l,
108
- ZodUnion: S,
109
- ZodDiscriminatedUnion: U,
110
- ZodRecord: k,
111
- ZodMap: g,
112
- ZodSet: d,
113
- ZodIntersection: c,
114
- ZodPromise: u,
115
- ZodFunction: b
106
+ ZodArray: c,
107
+ ZodTuple: y,
108
+ ZodUnion: b,
109
+ ZodDiscriminatedUnion: L,
110
+ ZodRecord: S,
111
+ ZodMap: w,
112
+ ZodSet: m,
113
+ ZodIntersection: h,
114
+ ZodPromise: R,
115
+ ZodFunction: f
116
116
  } = await import("zod");
117
117
  return {
118
118
  ZodSchema: e,
@@ -122,37 +122,37 @@ async function Mr() {
122
122
  ZodNumber: o,
123
123
  ZodLiteral: a,
124
124
  ZodObject: s,
125
- ZodEnum: f,
125
+ ZodEnum: l,
126
126
  ZodNativeEnum: p,
127
- ZodArray: h,
128
- ZodTuple: l,
129
- ZodUnion: S,
130
- ZodDiscriminatedUnion: U,
131
- ZodRecord: k,
132
- ZodMap: g,
133
- ZodSet: d,
134
- ZodIntersection: c,
135
- ZodPromise: u,
136
- ZodFunction: b
127
+ ZodArray: c,
128
+ ZodTuple: y,
129
+ ZodUnion: b,
130
+ ZodDiscriminatedUnion: L,
131
+ ZodRecord: S,
132
+ ZodMap: w,
133
+ ZodSet: m,
134
+ ZodIntersection: h,
135
+ ZodPromise: R,
136
+ ZodFunction: f
137
137
  };
138
138
  }
139
- function Jr(e) {
139
+ function Mr(e) {
140
140
  return Object.values(e).some((t) => Object.values(t.host.params).some((r) => De(r)) || Object.values(t.path.params).some((r) => De(r)) || Object.values(t.query.params).some((r) => De(r)));
141
141
  }
142
142
  function De(e) {
143
143
  return typeof e == "object" && "parse" in e && typeof e.parse == "function";
144
144
  }
145
- async function Wr() {
145
+ async function Jr() {
146
146
  try {
147
- v = await Mr();
147
+ v = await Tr();
148
148
  } catch {
149
149
  throw new Error("Failed to initialize Zod");
150
150
  }
151
151
  }
152
- function jt(e) {
152
+ function Zt(e) {
153
153
  return v ? e instanceof v.ZodSchema : !1;
154
154
  }
155
- function Ot(e) {
155
+ function jt(e) {
156
156
  return {
157
157
  get: (t, { invalid: r }) => {
158
158
  try {
@@ -170,9 +170,9 @@ function Ot(e) {
170
170
  }
171
171
  };
172
172
  }
173
- const Gr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
173
+ const Wr = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
174
174
  function se(e, t) {
175
- if (typeof t == "string" && Gr.test(t)) {
175
+ if (typeof t == "string" && Wr.test(t)) {
176
176
  const r = new Date(t);
177
177
  return isNaN(r.getTime()) ? t : r;
178
178
  }
@@ -287,21 +287,21 @@ function Je(e, t) {
287
287
  throw new Error("Function schemas are not supported");
288
288
  return JSON.stringify(t.parse(e));
289
289
  }
290
- function zr(e, t) {
290
+ function Gr(e, t) {
291
291
  return e[t] ?? String;
292
292
  }
293
293
  const N = {
294
294
  invalid: (e) => {
295
295
  throw new G(e);
296
296
  }
297
- }, $t = {
297
+ }, Ot = {
298
298
  get: (e) => e,
299
299
  set: (e, { invalid: t }) => {
300
300
  if (typeof e != "string")
301
301
  throw t();
302
302
  return e;
303
303
  }
304
- }, Qe = {
304
+ }, ze = {
305
305
  get: (e, { invalid: t }) => {
306
306
  if (e === "true")
307
307
  return !0;
@@ -314,7 +314,7 @@ const N = {
314
314
  throw t();
315
315
  return e.toString();
316
316
  }
317
- }, Ke = {
317
+ }, Qe = {
318
318
  get: (e, { invalid: t }) => {
319
319
  const r = Number(e);
320
320
  if (isNaN(r))
@@ -326,7 +326,7 @@ const N = {
326
326
  throw t();
327
327
  return e.toString();
328
328
  }
329
- }, Ht = {
329
+ }, $t = {
330
330
  get: (e, { invalid: t }) => {
331
331
  const r = new Date(e);
332
332
  if (isNaN(r.getTime()))
@@ -338,7 +338,7 @@ const N = {
338
338
  throw t();
339
339
  return e.toISOString();
340
340
  }
341
- }, _t = {
341
+ }, Ht = {
342
342
  get: (e, { invalid: t }) => {
343
343
  try {
344
344
  return JSON.parse(e);
@@ -354,37 +354,37 @@ const N = {
354
354
  }
355
355
  }
356
356
  };
357
- function Qr(e, t) {
357
+ function zr(e, t) {
358
358
  switch (typeof t) {
359
359
  case "string":
360
- return $t.get(e, N) === t;
360
+ return Ot.get(e, N) === t;
361
361
  case "number":
362
- return Ke.get(e, N) === t;
363
- case "boolean":
364
362
  return Qe.get(e, N) === t;
363
+ case "boolean":
364
+ return ze.get(e, N) === t;
365
365
  default:
366
366
  return !1;
367
367
  }
368
368
  }
369
369
  function re(e, t, r = !1) {
370
370
  if (e === void 0 || !J(e)) {
371
- if (Tr(t))
371
+ if (Fr(t))
372
372
  return t.defaultValue;
373
373
  if (r)
374
374
  return;
375
375
  throw new G();
376
376
  }
377
377
  if (t === String)
378
- return $t.get(e, N);
378
+ return Ot.get(e, N);
379
379
  if (t === Boolean)
380
- return Qe.get(e, N);
380
+ return ze.get(e, N);
381
381
  if (t === Number)
382
- return Ke.get(e, N);
382
+ return Qe.get(e, N);
383
383
  if (t === Date)
384
- return Ht.get(e, N);
384
+ return $t.get(e, N);
385
385
  if (t === JSON)
386
- return _t.get(e, N);
387
- if (Dr(t))
386
+ return Ht.get(e, N);
387
+ if (Ir(t))
388
388
  return t(e, N);
389
389
  if ($e(t))
390
390
  return t.get(e, N);
@@ -393,14 +393,14 @@ function re(e, t, r = !1) {
393
393
  return e;
394
394
  throw new G();
395
395
  }
396
- if (Vt(t)) {
397
- if (Qr(e, t))
396
+ if (Nt(t)) {
397
+ if (zr(e, t))
398
398
  return t;
399
399
  throw new G();
400
400
  }
401
- return jt(t) ? Ot(t).get(e, N) : e;
401
+ return Zt(t) ? jt(t).get(e, N) : e;
402
402
  }
403
- function Kr(e, t, r = !1) {
403
+ function Qr(e, t, r = !1) {
404
404
  try {
405
405
  return re(e, t, r);
406
406
  } catch (n) {
@@ -409,7 +409,7 @@ function Kr(e, t, r = !1) {
409
409
  throw n;
410
410
  }
411
411
  }
412
- function Yr(e, t, r = !1) {
412
+ function Kr(e, t, r = !1) {
413
413
  try {
414
414
  return ne(e, t, r);
415
415
  } catch (n) {
@@ -425,162 +425,162 @@ function ne(e, t, r = !1) {
425
425
  throw new G();
426
426
  }
427
427
  if (t === Boolean)
428
- return Qe.set(e, N);
428
+ return ze.set(e, N);
429
429
  if (t === Number)
430
- return Ke.set(e, N);
430
+ return Qe.set(e, N);
431
431
  if (t === Date)
432
- return Ht.set(e, N);
432
+ return $t.set(e, N);
433
433
  if (t === JSON)
434
- return _t.set(e, N);
434
+ return Ht.set(e, N);
435
435
  if ($e(t))
436
436
  return t.set(e, N);
437
- if (Vt(t)) {
437
+ if (Nt(t)) {
438
438
  if (t !== e)
439
439
  throw new G();
440
440
  return e.toString();
441
441
  }
442
- if (jt(t))
443
- return Ot(t).set(e, N);
442
+ if (Zt(t))
443
+ return jt(t).set(e, N);
444
444
  try {
445
445
  return e.toString();
446
446
  } catch {
447
447
  throw new G();
448
448
  }
449
449
  }
450
- function Ye(e) {
450
+ function Ke(e) {
451
451
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
452
452
  }
453
- function Xr(e, t) {
453
+ function Yr(e, t) {
454
454
  const r = Array.from(e.matchAll(t));
455
455
  if (r.length === 0)
456
456
  return [e];
457
457
  let n = 0;
458
- const o = r.reduce((s, f) => {
459
- const p = Ye(e.slice(n, f.index));
458
+ const o = r.reduce((s, l) => {
459
+ const p = Ke(e.slice(n, l.index));
460
460
  p.length && s.push(p);
461
- const [h] = f;
462
- return s.push(h), n = f.index + h.length, s;
461
+ const [c] = l;
462
+ return s.push(c), n = l.index + c.length, s;
463
463
  }, []), a = e.slice(n);
464
464
  return a && o.push(a), o;
465
465
  }
466
- function en(e) {
467
- const t = qt(e.path.value);
466
+ function Xr(e) {
467
+ const t = _t(e.path.value);
468
468
  return new RegExp(`^${t}$`, "i");
469
469
  }
470
- function tn(e) {
470
+ function en(e) {
471
471
  const t = new URLSearchParams(e.query.value);
472
- return Array.from(t.entries()).filter(([, r]) => !et(r)).map(([r, n]) => {
473
- const o = qt(n);
474
- return new RegExp(`${Ye(r)}=${o}(&|$)`, "i");
472
+ return Array.from(t.entries()).filter(([, r]) => !Xe(r)).map(([r, n]) => {
473
+ const o = _t(n);
474
+ return new RegExp(`${Ke(r)}=${o}(&|$)`, "i");
475
475
  });
476
476
  }
477
- function qt(e) {
478
- return Xr(e, new RegExp(He, "g")).map((t) => t.startsWith(ve) ? It(t) : Ye(t)).join("");
477
+ function _t(e) {
478
+ return Yr(e, new RegExp(He, "g")).map((t) => t.startsWith(ve) ? qt(t) : Ke(t)).join("");
479
479
  }
480
- function It(e) {
480
+ function qt(e) {
481
481
  return e.replace(new RegExp(He, "g"), ".+");
482
482
  }
483
- function rn(e, t) {
484
- const r = Dt(t);
483
+ function tn(e, t) {
484
+ const r = It(t);
485
485
  return e.replace(r, "(.*)");
486
486
  }
487
- function Xe(e, t) {
488
- return on(t).test(e.value);
487
+ function Ye(e, t) {
488
+ return nn(t).test(e.value);
489
489
  }
490
- function et(e) {
491
- return new RegExp(nn, "g").test(e);
490
+ function Xe(e) {
491
+ return new RegExp(rn, "g").test(e);
492
492
  }
493
- const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`, nn = `\\${ve}\\?([\\w-_]+)\\${Oe}`;
494
- function tt(e) {
495
- const [t] = Ft(e, new RegExp(He, "g"));
493
+ const He = `\\${ve}\\??([\\w-_]+)\\${Oe}`, rn = `\\${ve}\\?([\\w-_]+)\\${Oe}`;
494
+ function et(e) {
495
+ const [t] = Dt(e, new RegExp(He, "g"));
496
496
  return t;
497
497
  }
498
- function Dt(e) {
498
+ function It(e) {
499
499
  return new RegExp(`\\${ve}\\??${e}\\${Oe}`, "g");
500
500
  }
501
- function on(e) {
501
+ function nn(e) {
502
502
  return new RegExp(`\\${ve}\\?${e}\\${Oe}`, "g");
503
503
  }
504
- function Ft(e, t) {
504
+ function Dt(e, t) {
505
505
  return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => J(o) ? o : ""));
506
506
  }
507
- function an(e = "", t = {}) {
507
+ function on(e = "", t = {}) {
508
508
  return J(e) ? Array.from(e.matchAll(new RegExp(He, "g"))).reduce((n, [o, a]) => {
509
- const s = tt(o);
509
+ const s = et(o);
510
510
  if (!s)
511
511
  return n;
512
- const f = zr(t, s);
513
- return ge([s], n), n[a] = f, n;
512
+ const l = Gr(t, s);
513
+ return ge([s], n), n[a] = l, n;
514
514
  }, {}) : {};
515
515
  }
516
- function sn(e) {
517
- return Zt(e) && typeof e.value == "string";
516
+ function an(e) {
517
+ return Vt(e) && typeof e.value == "string";
518
518
  }
519
519
  function Y(e) {
520
- return e === void 0 ? z() : sn(e) ? e : z(e, {});
520
+ return e === void 0 ? z() : an(e) ? e : z(e, {});
521
521
  }
522
522
  function z(e, t) {
523
523
  return {
524
524
  value: e ?? "",
525
- params: an(e, t)
525
+ params: on(e, t)
526
526
  };
527
527
  }
528
- function Tt(e, t) {
528
+ function Ft(e, t) {
529
529
  ge(e.params, t.params);
530
530
  const r = `${e.value}${t.value}`;
531
531
  return z(r, { ...e.params, ...t.params });
532
532
  }
533
+ function sn(e, t) {
534
+ return Ft(e, t);
535
+ }
533
536
  function cn(e, t) {
534
- return Tt(e, t);
537
+ return un(e, t), { ...e, ...t };
535
538
  }
536
539
  function un(e, t) {
537
- return fn(e, t), { ...e, ...t };
538
- }
539
- function fn(e, t) {
540
540
  const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
541
541
  if (r)
542
- throw new _r(r);
542
+ throw new Hr(r);
543
543
  }
544
- function ln(e, t) {
544
+ function fn(e, t) {
545
545
  ge(e.params, t.params);
546
546
  const r = [e.value, t.value].filter(J).join("&");
547
547
  return z(r, { ...e.params, ...t.params });
548
548
  }
549
- function hn(e, t) {
549
+ function ln(e, t) {
550
550
  return ge(e, t), { ...e, ...t };
551
551
  }
552
- function Mt(e) {
552
+ function Tt(e) {
553
553
  return "parent" in e && !!e.parent;
554
554
  }
555
- function Jt(e) {
555
+ function Mt(e) {
556
556
  return "component" in e && !!e.component;
557
557
  }
558
- function ht(e) {
558
+ function lt(e) {
559
559
  return "props" in e && typeof e.props == "function";
560
560
  }
561
- function Wt(e) {
561
+ function Jt(e) {
562
562
  return "components" in e && !!e.components;
563
563
  }
564
- function pt(e) {
564
+ function ht(e) {
565
565
  return "props" in e && typeof e.props == "object";
566
566
  }
567
- function Gt(e, t) {
567
+ function Wt(e, t) {
568
568
  return {
569
569
  ...t,
570
- path: Tt(e.path, t.path),
571
- query: ln(e.query, t.query),
572
- meta: un(e.meta, t.meta),
573
- state: hn(e.state, t.state),
574
- hash: cn(e.hash, t.hash),
570
+ path: Ft(e.path, t.path),
571
+ query: fn(e.query, t.query),
572
+ meta: cn(e.meta, t.meta),
573
+ state: ln(e.state, t.state),
574
+ hash: sn(e.hash, t.hash),
575
575
  matches: [...e.matches, t.matched],
576
576
  host: e.host,
577
577
  depth: e.depth + 1
578
578
  };
579
579
  }
580
- function rt() {
580
+ function tt() {
581
581
  return typeof window < "u" && typeof window.document < "u";
582
582
  }
583
- function nt(e) {
583
+ function rt(e) {
584
584
  const t = new URLSearchParams(e);
585
585
  return {
586
586
  get: (...r) => t.get(...r),
@@ -609,49 +609,49 @@ function nt(e) {
609
609
  [Symbol.iterator]: () => t[Symbol.iterator]()
610
610
  };
611
611
  }
612
- function ot() {
612
+ function nt() {
613
613
  let e = 0;
614
614
  return () => (++e).toString();
615
615
  }
616
- const pn = ot()();
617
- function dn(e) {
618
- return e === pn;
616
+ const hn = nt()();
617
+ function pn(e) {
618
+ return e === hn;
619
619
  }
620
- const at = ot();
621
- function zt(e) {
620
+ const ot = nt();
621
+ function Gt(e) {
622
622
  return e === void 0 ? "" : e;
623
623
  }
624
624
  function he(e, t) {
625
- const r = at(), n = zt(e.name), o = Y(e.path), a = Y(e.query), s = Y(e.hash), f = e.meta ?? {}, p = e.state ?? {}, h = Ae({ id: r, meta: f, state: p, ...e, props: t }), l = {
625
+ const r = ot(), n = Gt(e.name), o = Y(e.path), a = Y(e.query), s = Y(e.hash), l = e.meta ?? {}, p = e.state ?? {}, c = Ae({ id: r, meta: l, state: p, ...e, props: t }), y = {
626
626
  id: r,
627
- matched: h,
628
- matches: [h],
627
+ matched: c,
628
+ matches: [c],
629
629
  name: n,
630
630
  path: o,
631
631
  query: a,
632
632
  hash: s,
633
- meta: f,
633
+ meta: l,
634
634
  state: p,
635
635
  depth: 1,
636
636
  host: z(),
637
637
  prefetch: e.prefetch
638
- }, S = Mt(e) ? Gt(e.parent, l) : l;
639
- return ge(S.path.params, S.query.params, S.hash.params), S;
638
+ }, b = Tt(e) ? Wt(e.parent, y) : y;
639
+ return ge(b.path.params, b.query.params, b.hash.params), b;
640
640
  }
641
- const xe = { template: "<div>This is component</div>" }, st = he({
641
+ const xe = { template: "<div>This is component</div>" }, at = he({
642
642
  name: "parentA",
643
643
  path: "/parentA/[paramA]"
644
- }), Qt = he({
645
- parent: st,
644
+ }), zt = he({
645
+ parent: at,
646
646
  name: "parentA.childA",
647
647
  path: "/childA/[?paramB]"
648
- }), mn = he({
649
- parent: st,
648
+ }), dn = he({
649
+ parent: at,
650
650
  name: "parentA.childB",
651
651
  path: "/childB/[paramD]",
652
652
  component: xe
653
- }), yn = he({
654
- parent: Qt,
653
+ }), mn = he({
654
+ parent: zt,
655
655
  name: "parentA.childA.grandChildA",
656
656
  path: "/[paramC]",
657
657
  component: xe
@@ -665,27 +665,27 @@ he({
665
665
  path: "/",
666
666
  component: xe
667
667
  });
668
- const gn = "lazy", Rn = {
668
+ const yn = "lazy", gn = {
669
669
  components: !0,
670
670
  props: !1
671
671
  };
672
672
  function Se(e) {
673
673
  return ["eager", "lazy", "intent"].includes(e);
674
674
  }
675
- function Kt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
676
- const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n), f = [
675
+ function Qt({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
676
+ const o = Fe(r, n), a = Fe(t, n), s = Fe(e, n), l = [
677
677
  o,
678
678
  a,
679
679
  s,
680
- Rn[n],
681
- gn
682
- ].reduce((p, h) => Se(p) ? p : p === !0 && Se(h) ? h : p === !0 && !Se(h) ? p : p === void 0 ? h : p, void 0);
683
- return Se(f) ? f : !1;
680
+ gn[n],
681
+ yn
682
+ ].reduce((p, c) => Se(p) ? p : p === !0 && Se(c) ? c : p === !0 && !Se(c) ? p : p === void 0 ? c : p, void 0);
683
+ return Se(l) ? l : !1;
684
684
  }
685
685
  function Fe(e, t) {
686
- return Zt(e) ? e[t] : e;
686
+ return Vt(e) ? e[t] : e;
687
687
  }
688
- class Yt extends Error {
688
+ class Kt extends Error {
689
689
  constructor() {
690
690
  super("Uncaught CallbackContextAbortError");
691
691
  T(this, "response");
@@ -706,141 +706,148 @@ class Ue extends Error {
706
706
  this.response = { status: "REJECT", type: r };
707
707
  }
708
708
  }
709
- function Xt() {
709
+ function Yt() {
710
710
  return { reject: (o) => {
711
711
  throw new Ue(o);
712
712
  }, push: (...o) => {
713
713
  throw new le(o);
714
714
  }, replace: (o, a, s) => {
715
715
  if (M(o)) {
716
- const h = a ?? {};
717
- throw new le([o, { ...h, replace: !0 }]);
716
+ const c = a ?? {};
717
+ throw new le([o, { ...c, replace: !0 }]);
718
718
  }
719
- const f = a, p = s ?? {};
720
- throw new le([o, f, { ...p, replace: !0 }]);
719
+ const l = a, p = s ?? {};
720
+ throw new le([o, l, { ...p, replace: !0 }]);
721
721
  }, abort: () => {
722
- throw new Yt();
722
+ throw new Kt();
723
723
  } };
724
724
  }
725
- function er(e) {
725
+ function Xt(e) {
726
726
  return typeof e == "object" && e !== null && "then" in e;
727
727
  }
728
- function We(e, t) {
729
- return t ? t.runWithContext(e) : e();
730
- }
731
- function dt(e, t) {
728
+ function pt(e) {
732
729
  try {
733
- const r = We(e, t);
734
- return er(r) ? r.catch((n) => n) : r;
735
- } catch (r) {
736
- return r;
730
+ const t = e();
731
+ return Xt(t) ? t.catch((r) => r) : t;
732
+ } catch (t) {
733
+ return t;
737
734
  }
738
735
  }
739
- const tr = Symbol();
740
- function wn() {
736
+ function er() {
741
737
  let e = null;
742
- const t = Ve(/* @__PURE__ */ new Map()), { push: r, replace: n, reject: o } = Xt(), a = (d, c, u) => c.matches.filter((b) => Kt({ ...u, routePrefetch: b.prefetch }, "props") === d).flatMap((b) => k(b)).reduce((b, { id: m, name: R, props: P }) => {
743
- if (!P)
744
- return b;
745
- const A = U(m, R, c), y = dt(() => P(c, {
746
- push: r,
747
- replace: n,
748
- reject: o,
749
- parent: l(c, !0)
750
- }), e);
751
- return b[A] = y, b;
752
- }, {}), s = (d) => {
753
- Object.entries(d).forEach(([c, u]) => {
754
- t.set(c, u);
738
+ function t(n) {
739
+ e = n;
740
+ }
741
+ function r(n) {
742
+ return e ? e.runWithContext(n) : n();
743
+ }
744
+ return {
745
+ setVueApp: t,
746
+ runWithContext: r
747
+ };
748
+ }
749
+ const tr = Symbol();
750
+ function Rn() {
751
+ const { setVueApp: e, runWithContext: t } = er(), r = Ve(/* @__PURE__ */ new Map()), { push: n, replace: o, reject: a } = Yt(), s = (m, h, R) => h.matches.filter((f) => Qt({ ...R, routePrefetch: f.prefetch }, "props") === m).flatMap((f) => S(f)).reduce((f, { id: i, name: E, props: k }) => {
752
+ if (!k)
753
+ return f;
754
+ const A = L(i, E, h), g = t(() => pt(() => k(h, {
755
+ push: n,
756
+ replace: o,
757
+ reject: a,
758
+ parent: y(h, !0)
759
+ })));
760
+ return f[A] = g, f;
761
+ }, {}), l = (m) => {
762
+ Object.entries(m).forEach(([h, R]) => {
763
+ r.set(h, R);
755
764
  });
756
- }, f = async (d) => {
757
- const c = d.matches.flatMap(k), u = [], b = [];
758
- for (const { id: m, name: R, props: P } of c) {
759
- if (!P)
765
+ }, p = async (m) => {
766
+ const h = m.matches.flatMap(S), R = [], f = [];
767
+ for (const { id: i, name: E, props: k } of h) {
768
+ if (!k)
760
769
  continue;
761
- const A = U(m, R, d);
762
- if (u.push(A), !t.has(A)) {
763
- const y = dt(() => P(d, {
764
- push: r,
765
- replace: n,
766
- reject: o,
767
- parent: l(d)
768
- }), e);
769
- t.set(A, y);
770
+ const A = L(i, E, m);
771
+ if (R.push(A), !r.has(A)) {
772
+ const g = t(() => pt(() => k(m, {
773
+ push: n,
774
+ replace: o,
775
+ reject: a,
776
+ parent: y(m)
777
+ })));
778
+ r.set(A, g);
770
779
  }
771
- b.push((async () => {
772
- const y = await t.get(A);
773
- if (y instanceof Error)
774
- throw y;
780
+ f.push((async () => {
781
+ const g = await r.get(A);
782
+ if (g instanceof Error)
783
+ throw g;
775
784
  })());
776
785
  }
777
- g(u);
786
+ w(R);
778
787
  try {
779
- return await Promise.all(b), { status: "SUCCESS" };
780
- } catch (m) {
781
- if (m instanceof le || m instanceof Ue)
782
- return m.response;
783
- throw m;
788
+ return await Promise.all(f), { status: "SUCCESS" };
789
+ } catch (i) {
790
+ if (i instanceof le || i instanceof Ue)
791
+ return i.response;
792
+ throw i;
784
793
  }
785
- }, p = (d, c, u) => {
786
- const b = U(d, c, u);
787
- return t.get(b);
788
- }, h = (d) => {
789
- e = d;
794
+ }, c = (m, h, R) => {
795
+ const f = L(m, h, R);
796
+ return r.get(f);
790
797
  };
791
- function l(d, c = !1) {
792
- const u = d.matches.at(-2);
793
- if (u)
794
- return ht(u) ? {
795
- name: u.name ?? "",
798
+ function y(m, h = !1) {
799
+ const R = m.matches.at(-2);
800
+ if (R)
801
+ return lt(R) ? {
802
+ name: R.name ?? "",
796
803
  get props() {
797
- return S(u, "default", d, c);
804
+ return b(R, "default", m, h);
798
805
  }
799
- } : pt(u) ? {
800
- name: u.name ?? "",
806
+ } : ht(R) ? {
807
+ name: R.name ?? "",
801
808
  props: new Proxy({}, {
802
- get(b, m) {
803
- return typeof m != "string" ? Reflect.get(b, m) : S(u, m, d, c);
809
+ get(f, i) {
810
+ return typeof i != "string" ? Reflect.get(f, i) : b(R, i, m, h);
804
811
  }
805
812
  })
806
813
  } : {
807
- name: u.name ?? "",
814
+ name: R.name ?? "",
808
815
  props: void 0
809
816
  };
810
817
  }
811
- function S(d, c, u, b = !1) {
812
- const m = p(d.id, c, u);
813
- if (b && !m) {
814
- const R = d.name ?? "unknown", P = u.name || "unknown";
818
+ function b(m, h, R, f = !1) {
819
+ const i = c(m.id, h, R);
820
+ if (f && !i) {
821
+ const E = m.name ?? "unknown", k = R.name || "unknown";
815
822
  console.warn(`
816
- Unable to access parent props "${c}" from route "${R}" while prefetching props for route "${P}".
823
+ Unable to access parent props "${h}" from route "${E}" while prefetching props for route "${k}".
817
824
  This may occur if the parent route's props were not also prefetched.
818
825
  `);
819
826
  }
820
- return m;
827
+ return i;
821
828
  }
822
- function U(d, c, u) {
823
- return [d, c, u.id, JSON.stringify(u.params)].join("-");
829
+ function L(m, h, R) {
830
+ return [m, h, R.id, JSON.stringify(R.params)].join("-");
824
831
  }
825
- function k(d) {
826
- return ht(d) ? [
832
+ function S(m) {
833
+ return lt(m) ? [
827
834
  {
828
- id: d.id,
835
+ id: m.id,
829
836
  name: "default",
830
- props: d.props
837
+ props: m.props
831
838
  }
832
- ] : pt(d) ? Object.entries(d.props).map(([c, u]) => ({ id: d.id, name: c, props: u })) : [];
839
+ ] : ht(m) ? Object.entries(m.props).map(([h, R]) => ({ id: m.id, name: h, props: R })) : [];
833
840
  }
834
- function g(d) {
835
- for (const c of t.keys())
836
- d.includes(c) || t.delete(c);
841
+ function w(m) {
842
+ for (const h of r.keys())
843
+ m.includes(h) || r.delete(h);
837
844
  }
838
845
  return {
839
- getPrefetchProps: a,
840
- setPrefetchProps: s,
841
- getProps: p,
842
- setProps: f,
843
- setVueApp: h
846
+ getPrefetchProps: s,
847
+ setPrefetchProps: l,
848
+ getProps: c,
849
+ setProps: p,
850
+ setVueApp: e
844
851
  };
845
852
  }
846
853
  function rr() {
@@ -849,14 +856,14 @@ function rr() {
849
856
  throw new ye();
850
857
  return e;
851
858
  }
852
- const vn = xr(() => new Promise((e) => {
859
+ const wn = kr(() => new Promise((e) => {
853
860
  e({ default: { template: "foo" } });
854
861
  }));
855
- function mt(e) {
856
- return e.name === vn.name && "__asyncLoader" in e;
862
+ function dt(e) {
863
+ return e.name === wn.name && "__asyncLoader" in e;
857
864
  }
858
865
  const nr = Symbol("visibilityObserver");
859
- function En(e) {
866
+ function vn(e) {
860
867
  const t = ae(nr);
861
868
  if (!t)
862
869
  throw new ye();
@@ -868,90 +875,90 @@ function En(e) {
868
875
  isElementVisible: Z(() => e.value ? t.isElementVisible(e.value) : !1)
869
876
  };
870
877
  }
871
- function yt(e, t, r) {
878
+ function mt(e, t, r) {
872
879
  te(e, (n, o) => {
873
880
  n && n.addEventListener(t, r), o && o.removeEventListener(t, r);
874
881
  }, { immediate: !0 }), Ze(() => {
875
882
  e.value && e.value.removeEventListener(t, r);
876
883
  });
877
884
  }
878
- function bn(e) {
879
- const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = En(r), s = () => {
880
- const h = Array.from(t.values()).reduce((l, S) => (Object.assign(l, S), l), {});
881
- o(h);
885
+ function En(e) {
886
+ const t = /* @__PURE__ */ new Map(), r = je(), { getPrefetchProps: n, setPrefetchProps: o } = rr(), { isElementVisible: a } = vn(r), s = () => {
887
+ const c = Array.from(t.values()).reduce((y, b) => (Object.assign(y, b), y), {});
888
+ o(c);
882
889
  };
883
- te(() => O(e), ({ route: h, ...l }) => {
884
- t.clear(), h && p("eager", h, l);
885
- }, { immediate: !0 }), te(a, (h) => {
886
- const { route: l, ...S } = O(e);
887
- !l || !h || p("lazy", l, S);
888
- }, { immediate: !0 }), yt(r, "focusin", f), yt(r, "mouseover", f);
889
- function f() {
890
- const { route: h, ...l } = O(e);
891
- h && p("intent", h, l);
892
- }
893
- function p(h, l, S) {
894
- Pn(h, l, S), t.has(h) || t.set(h, n(h, l, S));
890
+ te(() => $(e), ({ route: c, ...y }) => {
891
+ t.clear(), c && p("eager", c, y);
892
+ }, { immediate: !0 }), te(a, (c) => {
893
+ const { route: y, ...b } = $(e);
894
+ !y || !c || p("lazy", y, b);
895
+ }, { immediate: !0 }), mt(r, "focusin", l), mt(r, "mouseover", l);
896
+ function l() {
897
+ const { route: c, ...y } = $(e);
898
+ c && p("intent", c, y);
899
+ }
900
+ function p(c, y, b) {
901
+ bn(c, y, b), t.has(c) || t.set(c, n(c, y, b));
895
902
  }
896
903
  return {
897
904
  element: r,
898
905
  commit: s
899
906
  };
900
907
  }
901
- function Pn(e, t, r) {
908
+ function bn(e, t, r) {
902
909
  t.matches.forEach((n) => {
903
- Kt({
910
+ Qt({
904
911
  ...r,
905
912
  routePrefetch: n.prefetch
906
- }, "components") === e && (Jt(n) && mt(n.component) && n.component.__asyncLoader(), Wt(n) && Object.values(n.components).forEach((a) => {
907
- mt(a) && a.__asyncLoader();
913
+ }, "components") === e && (Mt(n) && dt(n.component) && n.component.__asyncLoader(), Jt(n) && Object.values(n.components).forEach((a) => {
914
+ dt(a) && a.__asyncLoader();
908
915
  }));
909
916
  });
910
917
  }
911
918
  const or = Symbol("isRouterRouteSymbol");
912
- function Sn(e) {
919
+ function Pn(e) {
913
920
  return typeof e == "object" && e !== null && or in e;
914
921
  }
915
- function An(e, t) {
916
- function r(c, u, b) {
917
- if (typeof c == "object") {
918
- const R = {
922
+ function Sn(e, t) {
923
+ function r(h, R, f) {
924
+ if (typeof h == "object") {
925
+ const E = {
919
926
  ...e.params,
920
- ...c
927
+ ...h
921
928
  };
922
- return t(e.name, R, u);
929
+ return t(e.name, E, R);
923
930
  }
924
- const m = {
931
+ const i = {
925
932
  ...e.params,
926
- [c]: u
933
+ [h]: R
927
934
  };
928
- return t(e.name, m, b);
929
- }
930
- const n = (...c) => {
931
- const u = new URLSearchParams(e.query);
932
- u.set(...c), r({}, { query: u });
933
- }, o = (...c) => {
934
- const u = new URLSearchParams(e.query);
935
- u.append(...c), r({}, { query: u });
936
- }, a = (...c) => {
937
- const u = new URLSearchParams(e.query);
938
- u.delete(...c), r({}, { query: u });
939
- }, { id: s, matched: f, matches: p, name: h, hash: l, href: S } = Ur(e), U = Z({
935
+ return t(e.name, i, f);
936
+ }
937
+ const n = (...h) => {
938
+ const R = new URLSearchParams(e.query);
939
+ R.set(...h), r({}, { query: R });
940
+ }, o = (...h) => {
941
+ const R = new URLSearchParams(e.query);
942
+ R.append(...h), r({}, { query: R });
943
+ }, a = (...h) => {
944
+ const R = new URLSearchParams(e.query);
945
+ R.delete(...h), r({}, { query: R });
946
+ }, { id: s, matched: l, matches: p, name: c, hash: y, href: b } = xr(e), L = Z({
940
947
  get() {
941
948
  return new Proxy(e.params, {
942
- set(c, u, b) {
943
- return r(u, b), !0;
949
+ set(h, R, f) {
950
+ return r(R, f), !0;
944
951
  }
945
952
  });
946
953
  },
947
- set(c) {
948
- r(c);
954
+ set(h) {
955
+ r(h);
949
956
  }
950
- }), k = Z({
957
+ }), S = Z({
951
958
  get() {
952
959
  return new Proxy(e.query, {
953
- get(c, u, b) {
954
- switch (u) {
960
+ get(h, R, f) {
961
+ switch (R) {
955
962
  case "append":
956
963
  return o;
957
964
  case "set":
@@ -959,44 +966,44 @@ function An(e, t) {
959
966
  case "delete":
960
967
  return a;
961
968
  default:
962
- return Reflect.get(c, u, b);
969
+ return Reflect.get(h, R, f);
963
970
  }
964
971
  }
965
972
  });
966
973
  },
967
- set(c) {
968
- r({}, { query: c });
974
+ set(h) {
975
+ r({}, { query: h });
969
976
  }
970
- }), g = Z({
977
+ }), w = Z({
971
978
  get() {
972
979
  return new Proxy(e.state, {
973
- set(c, u, b) {
974
- return r({}, { state: { ...e.state, [u]: b } }), !0;
980
+ set(h, R, f) {
981
+ return r({}, { state: { ...e.state, [R]: f } }), !0;
975
982
  }
976
983
  });
977
984
  },
978
- set(c) {
979
- r({}, { state: c });
985
+ set(h) {
986
+ r({}, { state: h });
980
987
  }
981
988
  });
982
989
  return Ve({
983
990
  id: s,
984
- matched: f,
991
+ matched: l,
985
992
  matches: p,
986
- state: g,
987
- query: k,
988
- hash: l,
989
- params: U,
990
- name: h,
991
- href: S,
993
+ state: w,
994
+ query: S,
995
+ hash: y,
996
+ params: L,
997
+ name: c,
998
+ href: b,
992
999
  update: r,
993
1000
  [or]: !0
994
1001
  });
995
1002
  }
996
1003
  function ar(e, t, { exact: r } = {}) {
997
- return Sn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
1004
+ return Pn(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
998
1005
  }
999
- function ct(...e) {
1006
+ function st(...e) {
1000
1007
  const t = new URLSearchParams();
1001
1008
  for (const r of e) {
1002
1009
  const n = new URLSearchParams(r);
@@ -1005,52 +1012,52 @@ function ct(...e) {
1005
1012
  }
1006
1013
  return t;
1007
1014
  }
1008
- function kn(e, t = {}, r = {}) {
1009
- const n = ze(), o = Z(() => {
1010
- const g = O(e);
1011
- return typeof g != "string" ? g : M(g) ? n.find(g, O(r)) : n.resolve(g, O(t), O(r));
1015
+ function An(e, t = {}, r = {}) {
1016
+ const n = Ge(), o = Z(() => {
1017
+ const w = $(e);
1018
+ return typeof w != "string" ? w : M(w) ? n.find(w, $(r)) : n.resolve(w, $(t), $(r));
1012
1019
  }), a = Z(() => {
1013
1020
  if (o.value)
1014
1021
  return o.value.href;
1015
- const g = O(e);
1016
- if (M(g))
1017
- return g;
1022
+ const w = $(e);
1023
+ if (M(w))
1024
+ return w;
1018
1025
  console.error(new Error("Failed to resolve route in RouterLink."));
1019
- }), s = Z(() => ar(n.route) && n.route.matches.some((g) => {
1020
- var d;
1021
- return g.id === ((d = o.value) == null ? void 0 : d.id);
1022
- })), f = Z(() => {
1023
- var g;
1024
- return n.route.id === ((g = o.value) == null ? void 0 : g.id);
1025
- }), p = Z(() => !!a.value && n.isExternal(a.value)), h = Z(() => {
1026
- const g = O(e);
1027
- return typeof g != "string" || M(g) ? O(t) : O(r);
1028
- }), { element: l, commit: S } = bn(() => ({
1026
+ }), s = Z(() => ar(n.route) && n.route.matches.some((w) => {
1027
+ var m;
1028
+ return w.id === ((m = o.value) == null ? void 0 : m.id);
1029
+ })), l = Z(() => {
1030
+ var w;
1031
+ return n.route.id === ((w = o.value) == null ? void 0 : w.id);
1032
+ }), p = Z(() => !!a.value && n.isExternal(a.value)), c = Z(() => {
1033
+ const w = $(e);
1034
+ return typeof w != "string" || M(w) ? $(t) : $(r);
1035
+ }), { element: y, commit: b } = En(() => ({
1029
1036
  route: o.value,
1030
1037
  routerPrefetch: n.prefetch,
1031
- linkPrefetch: h.value.prefetch
1032
- })), U = (g) => {
1033
- S();
1034
- const d = {
1035
- replace: (g == null ? void 0 : g.replace) ?? h.value.replace,
1036
- query: ct(h.value.query, g == null ? void 0 : g.query),
1037
- hash: (g == null ? void 0 : g.hash) ?? h.value.hash,
1038
- state: { ...h.value.state, ...g == null ? void 0 : g.state }
1039
- }, c = O(e);
1040
- return M(c) || typeof c == "object" ? n.push(c, d) : n.push(c, O(t), d);
1038
+ linkPrefetch: c.value.prefetch
1039
+ })), L = (w) => {
1040
+ b();
1041
+ const m = {
1042
+ replace: (w == null ? void 0 : w.replace) ?? c.value.replace,
1043
+ query: st(c.value.query, w == null ? void 0 : w.query),
1044
+ hash: (w == null ? void 0 : w.hash) ?? c.value.hash,
1045
+ state: { ...c.value.state, ...w == null ? void 0 : w.state }
1046
+ }, h = $(e);
1047
+ return M(h) || typeof h == "object" ? n.push(h, m) : n.push(h, $(t), m);
1041
1048
  };
1042
1049
  return {
1043
- element: l,
1050
+ element: y,
1044
1051
  route: o,
1045
1052
  href: a,
1046
1053
  isMatch: s,
1047
- isExactMatch: f,
1054
+ isExactMatch: l,
1048
1055
  isExternal: p,
1049
- push: U,
1050
- replace: (g) => U({ ...g, replace: !0 })
1056
+ push: L,
1057
+ replace: (w) => L({ ...w, replace: !0 })
1051
1058
  };
1052
1059
  }
1053
- const xn = ["href"], Un = /* @__PURE__ */ me({
1060
+ const kn = ["href"], xn = /* @__PURE__ */ me({
1054
1061
  __name: "routerLink",
1055
1062
  props: {
1056
1063
  to: {},
@@ -1061,82 +1068,82 @@ const xn = ["href"], Un = /* @__PURE__ */ me({
1061
1068
  state: {}
1062
1069
  },
1063
1070
  setup(e) {
1064
- const t = e, r = ze(), n = Z(() => U(t.to)), o = Z(() => k(t.to)), a = Z(() => {
1065
- const { to: d, ...c } = t;
1066
- return c;
1067
- }), { element: s, isMatch: f, isExactMatch: p, isExternal: h, push: l } = kn(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), S = Z(() => ({
1068
- "router-link--match": f.value,
1071
+ const t = e, r = Ge(), n = Z(() => L(t.to)), o = Z(() => S(t.to)), a = Z(() => {
1072
+ const { to: m, ...h } = t;
1073
+ return h;
1074
+ }), { element: s, isMatch: l, isExactMatch: p, isExternal: c, push: y } = An(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), b = Z(() => ({
1075
+ "router-link--match": l.value,
1069
1076
  "router-link--exact-match": p.value
1070
1077
  }));
1071
- function U(d) {
1072
- if (typeof d == "function") {
1073
- const c = d(r.resolve);
1074
- return U(c);
1078
+ function L(m) {
1079
+ if (typeof m == "function") {
1080
+ const h = m(r.resolve);
1081
+ return L(h);
1075
1082
  }
1076
- return M(d) ? r.find(d) : d;
1083
+ return M(m) ? r.find(m) : m;
1077
1084
  }
1078
- function k(d) {
1079
- if (typeof d == "function") {
1080
- const c = d(r.resolve);
1081
- return k(c);
1085
+ function S(m) {
1086
+ if (typeof m == "function") {
1087
+ const h = m(r.resolve);
1088
+ return S(h);
1082
1089
  }
1083
- return M(d) ? d : d == null ? void 0 : d.href;
1090
+ return M(m) ? m : m == null ? void 0 : m.href;
1084
1091
  }
1085
- function g(d) {
1086
- d.preventDefault(), l();
1092
+ function w(m) {
1093
+ m.preventDefault(), y();
1087
1094
  }
1088
- return (d, c) => (xt(), Lr("a", {
1095
+ return (m, h) => (kt(), Ur("a", {
1089
1096
  ref_key: "element",
1090
1097
  ref: s,
1091
1098
  href: o.value,
1092
- class: Br(["router-link", S.value]),
1093
- onClick: g
1099
+ class: Lr(["router-link", b.value]),
1100
+ onClick: w
1094
1101
  }, [
1095
- Ut(d.$slots, "default", Lt(Cr({ route: n.value, isMatch: Re(f), isExactMatch: Re(p), isExternal: Re(h) })))
1096
- ], 10, xn));
1102
+ xt(m.$slots, "default", Ut(Br({ route: n.value, isMatch: Re(l), isExactMatch: Re(p), isExternal: Re(c) })))
1103
+ ], 10, kn));
1097
1104
  }
1098
1105
  }), sr = Symbol();
1099
- function Ln() {
1106
+ function Un() {
1100
1107
  const e = ae(sr);
1101
1108
  if (!e)
1102
1109
  throw new ye();
1103
1110
  return e;
1104
1111
  }
1105
1112
  function cr(e, t) {
1106
- const r = ze();
1113
+ const r = Ge();
1107
1114
  function n() {
1108
1115
  if (!e)
1109
1116
  return;
1110
1117
  if (!ar(r.route, e, t))
1111
- throw new qr(e, r.route.name);
1118
+ throw new _r(e, r.route.name);
1112
1119
  }
1113
1120
  return te(r.route, n, { immediate: !0, deep: !0 }), r.route;
1114
1121
  }
1115
1122
  const ir = Symbol();
1116
- function it() {
1123
+ function ct() {
1117
1124
  return ae(ir, 0);
1118
1125
  }
1119
- function Bn(e, t, r) {
1126
+ function Ln(e, t, r) {
1120
1127
  return me({
1121
1128
  name: "PropsWrapper",
1122
1129
  expose: [],
1123
1130
  setup() {
1124
- const n = Nr(), o = rr(), a = cr();
1131
+ const n = Cr(), o = rr(), a = cr();
1125
1132
  return () => {
1126
1133
  const s = o.getProps(e.id, t, a);
1127
- return s instanceof Error ? "" : er(s) ? n != null && n.suspense ? ue(Nn, { component: r, props: s }) : ue(Cn, { component: r, props: s }) : ue(r, s);
1134
+ return s instanceof Error ? "" : Xt(s) ? n != null && n.suspense ? ue(Cn, { component: r, props: s }) : ue(Bn, { component: r, props: s }) : ue(r, s);
1128
1135
  };
1129
1136
  }
1130
1137
  });
1131
1138
  }
1132
- const Cn = me((e) => {
1139
+ const Bn = me((e) => {
1133
1140
  const t = je();
1134
1141
  return te(() => e.props, async (r) => {
1135
1142
  t.value = await r;
1136
1143
  }, { immediate: !0, deep: !0 }), () => t.value instanceof Error ? "" : t.value ? ue(e.component, t.value) : "";
1137
1144
  }, {
1138
1145
  props: ["component", "props"]
1139
- }), Nn = me(async (e) => {
1146
+ }), Cn = me(async (e) => {
1140
1147
  const t = je();
1141
1148
  return t.value = await e.props, te(() => t.value, async (r) => {
1142
1149
  t.value = await r;
@@ -1144,27 +1151,27 @@ const Cn = me((e) => {
1144
1151
  }, {
1145
1152
  props: ["component", "props"]
1146
1153
  }), ur = Symbol();
1147
- function Vn() {
1154
+ function Nn() {
1148
1155
  const e = /* @__PURE__ */ new Map();
1149
1156
  return {
1150
1157
  getRouteComponents: (r) => {
1151
1158
  const n = e.get(r.id);
1152
1159
  if (n)
1153
1160
  return n;
1154
- const o = Zn(r);
1161
+ const o = Vn(r);
1155
1162
  return e.set(r.id, o), o;
1156
1163
  }
1157
1164
  };
1158
1165
  }
1159
- function Zn(e) {
1160
- return Wt(e) ? gt(e, e.components) : Jt(e) ? gt(e, { default: e.component }) : { default: fr };
1166
+ function Vn(e) {
1167
+ return Jt(e) ? yt(e, e.components) : Mt(e) ? yt(e, { default: e.component }) : { default: fr };
1161
1168
  }
1162
- function gt(e, t) {
1169
+ function yt(e, t) {
1163
1170
  return Object.fromEntries(
1164
- Object.entries(t).map(([r, n]) => [r, Bn(e, r, n)])
1171
+ Object.entries(t).map(([r, n]) => [r, Ln(e, r, n)])
1165
1172
  );
1166
1173
  }
1167
- function jn() {
1174
+ function Zn() {
1168
1175
  const e = ae(ur);
1169
1176
  if (!e)
1170
1177
  throw new ye();
@@ -1176,17 +1183,17 @@ const fr = /* @__PURE__ */ me({
1176
1183
  name: { default: "default" }
1177
1184
  },
1178
1185
  setup(e) {
1179
- const t = cr(), r = Ln(), n = it(), { getRouteComponents: o } = jn();
1180
- Vr(ir, n + 1);
1186
+ const t = cr(), r = Un(), n = ct(), { getRouteComponents: o } = Zn();
1187
+ Nr(ir, n + 1);
1181
1188
  const a = Z(() => {
1182
1189
  if (r.value)
1183
1190
  return r.value.component;
1184
1191
  const s = t.matches.at(n);
1185
1192
  return s ? o(s)[e.name] : null;
1186
1193
  });
1187
- return (s, f) => a.value ? Ut(s.$slots, "default", Lt(jr({ key: 0 }, { route: Re(t), component: a.value, rejection: Re(r) })), () => [
1188
- (xt(), Or($r(a.value)))
1189
- ]) : Zr("", !0);
1194
+ return (s, l) => a.value ? xt(s.$slots, "default", Ut(Zr({ key: 0 }, { route: Re(t), component: a.value, rejection: Re(r) })), () => [
1195
+ (kt(), jr(Or(a.value)))
1196
+ ]) : Vr("", !0);
1190
1197
  }
1191
1198
  });
1192
1199
  class oe {
@@ -1211,7 +1218,7 @@ const Ee = (e, t, r) => {
1211
1218
  var n, o;
1212
1219
  return ((n = e.matches.at(r)) == null ? void 0 : n.id) === ((o = t == null ? void 0 : t.matches.at(r)) == null ? void 0 : o.id);
1213
1220
  };
1214
- function Rt(e) {
1221
+ function gt(e) {
1215
1222
  switch (e) {
1216
1223
  case "onBeforeRouteEnter":
1217
1224
  case "onAfterRouteEnter":
@@ -1226,7 +1233,7 @@ function Rt(e) {
1226
1233
  throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
1227
1234
  }
1228
1235
  }
1229
- function On(e, t) {
1236
+ function jn(e, t) {
1230
1237
  const r = new oe();
1231
1238
  return e.matches.forEach((n, o) => {
1232
1239
  n.onBeforeRouteEnter && Ee(e, t, o) && fe(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Pe(e, t, o) && fe(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
@@ -1234,7 +1241,7 @@ function On(e, t) {
1234
1241
  n.onBeforeRouteLeave && be(e, t, o) && fe(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
1235
1242
  }), r;
1236
1243
  }
1237
- function $n(e, t) {
1244
+ function On(e, t) {
1238
1245
  const r = new oe();
1239
1246
  return e.matches.forEach((n, o) => {
1240
1247
  n.onAfterRouteEnter && Ee(e, t, o) && fe(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Pe(e, t, o) && fe(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
@@ -1242,7 +1249,7 @@ function $n(e, t) {
1242
1249
  n.onAfterRouteLeave && be(e, t, o) && fe(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
1243
1250
  }), r;
1244
1251
  }
1245
- function Hn(e, t, r) {
1252
+ function $n(e, t, r) {
1246
1253
  const n = new oe();
1247
1254
  return e.matches.forEach((o, a) => {
1248
1255
  Ee(e, t, a) && r.onBeforeRouteEnter.forEach((s) => n.onBeforeRouteEnter.add(s)), Pe(e, t, a) && r.onBeforeRouteUpdate.forEach((s) => n.onBeforeRouteUpdate.add(s));
@@ -1250,7 +1257,7 @@ function Hn(e, t, r) {
1250
1257
  be(e, t, a) && r.onBeforeRouteLeave.forEach((s) => n.onBeforeRouteLeave.add(s));
1251
1258
  }), n;
1252
1259
  }
1253
- function _n(e, t, r) {
1260
+ function Hn(e, t, r) {
1254
1261
  const n = new oe();
1255
1262
  return e.matches.forEach((o, a) => {
1256
1263
  Ee(e, t, a) && r.onAfterRouteEnter.forEach((s) => n.onAfterRouteEnter.add(s)), Pe(e, t, a) && r.onAfterRouteUpdate.forEach((s) => n.onAfterRouteUpdate.add(s));
@@ -1259,64 +1266,64 @@ function _n(e, t, r) {
1259
1266
  }), n;
1260
1267
  }
1261
1268
  const lr = Symbol();
1262
- function qn() {
1263
- const e = {
1269
+ function _n() {
1270
+ const { setVueApp: e, runWithContext: t } = er(), r = {
1264
1271
  global: new oe(),
1265
1272
  component: new oe()
1266
- }, { reject: t, push: r, replace: n, abort: o } = Xt(), a = (c) => (e.global.onBeforeRouteEnter.add(c), () => e.global.onBeforeRouteEnter.delete(c)), s = (c) => (e.global.onBeforeRouteUpdate.add(c), () => e.global.onBeforeRouteUpdate.delete(c)), f = (c) => (e.global.onBeforeRouteLeave.add(c), () => e.global.onBeforeRouteLeave.delete(c)), p = (c) => (e.global.onAfterRouteEnter.add(c), () => e.global.onAfterRouteEnter.delete(c)), h = (c) => (e.global.onAfterRouteUpdate.add(c), () => e.global.onAfterRouteUpdate.delete(c)), l = (c) => (e.global.onAfterRouteLeave.add(c), () => e.global.onAfterRouteLeave.delete(c));
1267
- async function S({ to: c, from: u, app: b }) {
1268
- const { global: m, component: R } = e, P = On(c, u), A = Hn(c, u, m), y = [
1273
+ }, { reject: n, push: o, replace: a, abort: s } = Yt(), l = (f) => (r.global.onBeforeRouteEnter.add(f), () => r.global.onBeforeRouteEnter.delete(f)), p = (f) => (r.global.onBeforeRouteUpdate.add(f), () => r.global.onBeforeRouteUpdate.delete(f)), c = (f) => (r.global.onBeforeRouteLeave.add(f), () => r.global.onBeforeRouteLeave.delete(f)), y = (f) => (r.global.onAfterRouteEnter.add(f), () => r.global.onAfterRouteEnter.delete(f)), b = (f) => (r.global.onAfterRouteUpdate.add(f), () => r.global.onAfterRouteUpdate.delete(f)), L = (f) => (r.global.onAfterRouteLeave.add(f), () => r.global.onAfterRouteLeave.delete(f));
1274
+ async function S({ to: f, from: i }) {
1275
+ const { global: E, component: k } = r, A = jn(f, i), g = $n(f, i, E), u = [
1276
+ ...g.onBeforeRouteEnter,
1269
1277
  ...A.onBeforeRouteEnter,
1270
- ...P.onBeforeRouteEnter,
1278
+ ...g.onBeforeRouteUpdate,
1271
1279
  ...A.onBeforeRouteUpdate,
1272
- ...P.onBeforeRouteUpdate,
1273
- ...R.onBeforeRouteUpdate,
1280
+ ...k.onBeforeRouteUpdate,
1281
+ ...g.onBeforeRouteLeave,
1274
1282
  ...A.onBeforeRouteLeave,
1275
- ...P.onBeforeRouteLeave,
1276
- ...R.onBeforeRouteLeave
1283
+ ...k.onBeforeRouteLeave
1277
1284
  ];
1278
1285
  try {
1279
- const i = y.map((w) => We(() => w(c, {
1280
- from: u,
1281
- reject: t,
1282
- push: r,
1283
- replace: n,
1284
- abort: o
1285
- }), b));
1286
- await Promise.all(i);
1287
- } catch (i) {
1288
- if (i instanceof le || i instanceof Ue || i instanceof Yt)
1289
- return i.response;
1290
- throw i;
1286
+ const d = u.map((x) => t(() => x(f, {
1287
+ from: i,
1288
+ reject: n,
1289
+ push: o,
1290
+ replace: a,
1291
+ abort: s
1292
+ })));
1293
+ await Promise.all(d);
1294
+ } catch (d) {
1295
+ if (d instanceof le || d instanceof Ue || d instanceof Kt)
1296
+ return d.response;
1297
+ throw d;
1291
1298
  }
1292
1299
  return {
1293
1300
  status: "SUCCESS"
1294
1301
  };
1295
1302
  }
1296
- async function U({ to: c, from: u, app: b }) {
1297
- const { global: m, component: R } = e, P = $n(c, u), A = _n(c, u, m), y = [
1298
- ...R.onAfterRouteLeave,
1299
- ...P.onAfterRouteLeave,
1303
+ async function w({ to: f, from: i }) {
1304
+ const { global: E, component: k } = r, A = On(f, i), g = Hn(f, i, E), u = [
1305
+ ...k.onAfterRouteLeave,
1300
1306
  ...A.onAfterRouteLeave,
1301
- ...R.onAfterRouteUpdate,
1302
- ...P.onAfterRouteUpdate,
1307
+ ...g.onAfterRouteLeave,
1308
+ ...k.onAfterRouteUpdate,
1303
1309
  ...A.onAfterRouteUpdate,
1304
- ...R.onAfterRouteEnter,
1305
- ...P.onAfterRouteEnter,
1306
- ...A.onAfterRouteEnter
1310
+ ...g.onAfterRouteUpdate,
1311
+ ...k.onAfterRouteEnter,
1312
+ ...A.onAfterRouteEnter,
1313
+ ...g.onAfterRouteEnter
1307
1314
  ];
1308
1315
  try {
1309
- const i = y.map((w) => We(() => w(c, {
1310
- from: u,
1311
- reject: t,
1312
- push: r,
1313
- replace: n
1314
- }), b));
1315
- await Promise.all(i);
1316
- } catch (i) {
1317
- if (i instanceof le || i instanceof Ue)
1318
- return i.response;
1319
- throw i;
1316
+ const d = u.map((x) => t(() => x(f, {
1317
+ from: i,
1318
+ reject: n,
1319
+ push: o,
1320
+ replace: a
1321
+ })));
1322
+ await Promise.all(d);
1323
+ } catch (d) {
1324
+ if (d instanceof le || d instanceof Ue)
1325
+ return d.response;
1326
+ throw d;
1320
1327
  }
1321
1328
  return {
1322
1329
  status: "SUCCESS"
@@ -1324,30 +1331,31 @@ function qn() {
1324
1331
  }
1325
1332
  return {
1326
1333
  runBeforeRouteHooks: S,
1327
- runAfterRouteHooks: U,
1328
- addComponentBeforeRouteHook: ({ lifecycle: c, depth: u, hook: b }) => {
1329
- const m = Rt(c), R = e.component[c], P = (A, y) => {
1330
- if (m(A, y.from, u))
1331
- return b(A, y);
1334
+ runAfterRouteHooks: w,
1335
+ addComponentBeforeRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1336
+ const k = gt(f), A = r.component[f], g = (u, d) => {
1337
+ if (k(u, d.from, i))
1338
+ return E(u, d);
1332
1339
  };
1333
- return R.add(P), () => R.delete(P);
1340
+ return A.add(g), () => A.delete(g);
1334
1341
  },
1335
- addComponentAfterRouteHook: ({ lifecycle: c, depth: u, hook: b }) => {
1336
- const m = Rt(c), R = e.component[c], P = (A, y) => {
1337
- if (m(A, y.from, u))
1338
- return b(A, y);
1342
+ addComponentAfterRouteHook: ({ lifecycle: f, depth: i, hook: E }) => {
1343
+ const k = gt(f), A = r.component[f], g = (u, d) => {
1344
+ if (k(u, d.from, i))
1345
+ return E(u, d);
1339
1346
  };
1340
- return R.add(P), () => R.delete(P);
1347
+ return A.add(g), () => A.delete(g);
1341
1348
  },
1342
- addGlobalRouteHooks: (c) => {
1343
- c.onBeforeRouteEnter.forEach((u) => a(u)), c.onBeforeRouteUpdate.forEach((u) => s(u)), c.onBeforeRouteLeave.forEach((u) => f(u)), c.onAfterRouteEnter.forEach((u) => p(u)), c.onAfterRouteUpdate.forEach((u) => h(u)), c.onAfterRouteLeave.forEach((u) => l(u));
1349
+ addGlobalRouteHooks: (f) => {
1350
+ f.onBeforeRouteEnter.forEach((i) => l(i)), f.onBeforeRouteUpdate.forEach((i) => p(i)), f.onBeforeRouteLeave.forEach((i) => c(i)), f.onAfterRouteEnter.forEach((i) => y(i)), f.onAfterRouteUpdate.forEach((i) => b(i)), f.onAfterRouteLeave.forEach((i) => L(i));
1344
1351
  },
1345
- onBeforeRouteEnter: a,
1346
- onBeforeRouteUpdate: s,
1347
- onBeforeRouteLeave: f,
1348
- onAfterRouteEnter: p,
1349
- onAfterRouteUpdate: h,
1350
- onAfterRouteLeave: l
1352
+ onBeforeRouteEnter: l,
1353
+ onBeforeRouteUpdate: p,
1354
+ onBeforeRouteLeave: c,
1355
+ onAfterRouteEnter: y,
1356
+ onAfterRouteUpdate: b,
1357
+ onAfterRouteLeave: L,
1358
+ setVueApp: e
1351
1359
  };
1352
1360
  }
1353
1361
  function hr() {
@@ -1358,17 +1366,17 @@ function hr() {
1358
1366
  }
1359
1367
  function pr(e) {
1360
1368
  return (t) => {
1361
- const r = it(), o = hr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1369
+ const r = ct(), o = hr().addComponentBeforeRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1362
1370
  return Ze(o), o;
1363
1371
  };
1364
1372
  }
1365
1373
  function dr(e) {
1366
1374
  return (t) => {
1367
- const r = it(), o = hr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1375
+ const r = ct(), o = hr().addComponentAfterRouteHook({ lifecycle: e, hook: t, depth: r - 1 });
1368
1376
  return Ze(o), o;
1369
1377
  };
1370
1378
  }
1371
- const ko = pr("onBeforeRouteLeave"), xo = pr("onBeforeRouteUpdate"), Uo = dr("onAfterRouteLeave"), Lo = dr("onAfterRouteUpdate");
1379
+ const xo = pr("onBeforeRouteLeave"), Uo = pr("onBeforeRouteUpdate"), Lo = dr("onAfterRouteLeave"), Bo = dr("onAfterRouteUpdate");
1372
1380
  function K() {
1373
1381
  return K = Object.assign ? Object.assign.bind() : function(e) {
1374
1382
  for (var t = 1; t < arguments.length; t++) {
@@ -1396,36 +1404,36 @@ function X(e, t) {
1396
1404
  }
1397
1405
  }
1398
1406
  }
1399
- var Le = "beforeunload", In = "hashchange", mr = "popstate";
1400
- function wt(e) {
1407
+ var Le = "beforeunload", qn = "hashchange", mr = "popstate";
1408
+ function Rt(e) {
1401
1409
  e === void 0 && (e = {});
1402
1410
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1403
1411
  function a() {
1404
- var y = n.location, i = y.pathname, w = y.search, x = y.hash, L = o.state || {};
1405
- return [L.idx, pe({
1406
- pathname: i,
1407
- search: w,
1412
+ var g = n.location, u = g.pathname, d = g.search, x = g.hash, U = o.state || {};
1413
+ return [U.idx, pe({
1414
+ pathname: u,
1415
+ search: d,
1408
1416
  hash: x,
1409
- state: L.usr || null,
1410
- key: L.key || "default"
1417
+ state: U.usr || null,
1418
+ key: U.key || "default"
1411
1419
  })];
1412
1420
  }
1413
1421
  var s = null;
1414
- function f() {
1422
+ function l() {
1415
1423
  if (s)
1416
- k.call(s), s = null;
1424
+ S.call(s), s = null;
1417
1425
  else {
1418
- var y = j.Pop, i = a(), w = i[0], x = i[1];
1419
- if (k.length)
1420
- if (w != null) {
1421
- var L = l - w;
1422
- L && (s = {
1423
- action: y,
1426
+ var g = j.Pop, u = a(), d = u[0], x = u[1];
1427
+ if (S.length)
1428
+ if (d != null) {
1429
+ var U = y - d;
1430
+ U && (s = {
1431
+ action: g,
1424
1432
  location: x,
1425
1433
  retry: function() {
1426
- P(L * -1);
1434
+ k(U * -1);
1427
1435
  }
1428
- }, P(L));
1436
+ }, k(U));
1429
1437
  } else
1430
1438
  process.env.NODE_ENV !== "production" && X(
1431
1439
  !1,
@@ -1435,131 +1443,131 @@ function wt(e) {
1435
1443
  "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."
1436
1444
  );
1437
1445
  else
1438
- b(y);
1446
+ f(g);
1439
1447
  }
1440
1448
  }
1441
- n.addEventListener(mr, f);
1442
- var p = j.Pop, h = a(), l = h[0], S = h[1], U = de(), k = de();
1443
- l == null && (l = 0, o.replaceState(K({}, o.state, {
1444
- idx: l
1449
+ n.addEventListener(mr, l);
1450
+ var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1451
+ y == null && (y = 0, o.replaceState(K({}, o.state, {
1452
+ idx: y
1445
1453
  }), ""));
1446
- function g(y) {
1447
- return typeof y == "string" ? y : ee(y);
1454
+ function w(g) {
1455
+ return typeof g == "string" ? g : ee(g);
1448
1456
  }
1449
- function d(y, i) {
1450
- return i === void 0 && (i = null), pe(K({
1451
- pathname: S.pathname,
1457
+ function m(g, u) {
1458
+ return u === void 0 && (u = null), pe(K({
1459
+ pathname: b.pathname,
1452
1460
  hash: "",
1453
1461
  search: ""
1454
- }, typeof y == "string" ? we(y) : y, {
1455
- state: i,
1462
+ }, typeof g == "string" ? we(g) : g, {
1463
+ state: u,
1456
1464
  key: Ce()
1457
1465
  }));
1458
1466
  }
1459
- function c(y, i) {
1467
+ function h(g, u) {
1460
1468
  return [{
1461
- usr: y.state,
1462
- key: y.key,
1463
- idx: i
1464
- }, g(y)];
1465
- }
1466
- function u(y, i, w) {
1467
- return !k.length || (k.call({
1468
- action: y,
1469
- location: i,
1470
- retry: w
1469
+ usr: g.state,
1470
+ key: g.key,
1471
+ idx: u
1472
+ }, w(g)];
1473
+ }
1474
+ function R(g, u, d) {
1475
+ return !S.length || (S.call({
1476
+ action: g,
1477
+ location: u,
1478
+ retry: d
1471
1479
  }), !1);
1472
1480
  }
1473
- function b(y) {
1474
- p = y;
1475
- var i = a();
1476
- l = i[0], S = i[1], U.call({
1481
+ function f(g) {
1482
+ p = g;
1483
+ var u = a();
1484
+ y = u[0], b = u[1], L.call({
1477
1485
  action: p,
1478
- location: S
1486
+ location: b
1479
1487
  });
1480
1488
  }
1481
- function m(y, i) {
1482
- var w = j.Push, x = d(y, i);
1483
- function L() {
1484
- m(y, i);
1489
+ function i(g, u) {
1490
+ var d = j.Push, x = m(g, u);
1491
+ function U() {
1492
+ i(g, u);
1485
1493
  }
1486
- if (u(w, x, L)) {
1487
- var C = c(x, l + 1), V = C[0], $ = C[1];
1494
+ if (R(d, x, U)) {
1495
+ var C = h(x, y + 1), V = C[0], O = C[1];
1488
1496
  try {
1489
- o.pushState(V, "", $);
1497
+ o.pushState(V, "", O);
1490
1498
  } catch {
1491
- n.location.assign($);
1499
+ n.location.assign(O);
1492
1500
  }
1493
- b(w);
1501
+ f(d);
1494
1502
  }
1495
1503
  }
1496
- function R(y, i) {
1497
- var w = j.Replace, x = d(y, i);
1498
- function L() {
1499
- R(y, i);
1504
+ function E(g, u) {
1505
+ var d = j.Replace, x = m(g, u);
1506
+ function U() {
1507
+ E(g, u);
1500
1508
  }
1501
- if (u(w, x, L)) {
1502
- var C = c(x, l), V = C[0], $ = C[1];
1503
- o.replaceState(V, "", $), b(w);
1509
+ if (R(d, x, U)) {
1510
+ var C = h(x, y), V = C[0], O = C[1];
1511
+ o.replaceState(V, "", O), f(d);
1504
1512
  }
1505
1513
  }
1506
- function P(y) {
1507
- o.go(y);
1514
+ function k(g) {
1515
+ o.go(g);
1508
1516
  }
1509
1517
  var A = {
1510
1518
  get action() {
1511
1519
  return p;
1512
1520
  },
1513
1521
  get location() {
1514
- return S;
1522
+ return b;
1515
1523
  },
1516
- createHref: g,
1517
- push: m,
1518
- replace: R,
1519
- go: P,
1524
+ createHref: w,
1525
+ push: i,
1526
+ replace: E,
1527
+ go: k,
1520
1528
  back: function() {
1521
- P(-1);
1529
+ k(-1);
1522
1530
  },
1523
1531
  forward: function() {
1524
- P(1);
1532
+ k(1);
1525
1533
  },
1526
- listen: function(i) {
1527
- return U.push(i);
1534
+ listen: function(u) {
1535
+ return L.push(u);
1528
1536
  },
1529
- block: function(i) {
1530
- var w = k.push(i);
1531
- return k.length === 1 && n.addEventListener(Le, Be), function() {
1532
- w(), k.length || n.removeEventListener(Le, Be);
1537
+ block: function(u) {
1538
+ var d = S.push(u);
1539
+ return S.length === 1 && n.addEventListener(Le, Be), function() {
1540
+ d(), S.length || n.removeEventListener(Le, Be);
1533
1541
  };
1534
1542
  }
1535
1543
  };
1536
1544
  return A;
1537
1545
  }
1538
- function Dn(e) {
1546
+ function In(e) {
1539
1547
  e === void 0 && (e = {});
1540
1548
  var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
1541
1549
  function a() {
1542
- var i = we(n.location.hash.substr(1)), w = i.pathname, x = w === void 0 ? "/" : w, L = i.search, C = L === void 0 ? "" : L, V = i.hash, $ = V === void 0 ? "" : V, H = o.state || {};
1543
- return [H.idx, pe({
1550
+ var u = we(n.location.hash.substr(1)), d = u.pathname, x = d === void 0 ? "/" : d, U = u.search, C = U === void 0 ? "" : U, V = u.hash, O = V === void 0 ? "" : V, q = o.state || {};
1551
+ return [q.idx, pe({
1544
1552
  pathname: x,
1545
1553
  search: C,
1546
- hash: $,
1547
- state: H.usr || null,
1548
- key: H.key || "default"
1554
+ hash: O,
1555
+ state: q.usr || null,
1556
+ key: q.key || "default"
1549
1557
  })];
1550
1558
  }
1551
1559
  var s = null;
1552
- function f() {
1560
+ function l() {
1553
1561
  if (s)
1554
- k.call(s), s = null;
1562
+ S.call(s), s = null;
1555
1563
  else {
1556
- var i = j.Pop, w = a(), x = w[0], L = w[1];
1557
- if (k.length)
1564
+ var u = j.Pop, d = a(), x = d[0], U = d[1];
1565
+ if (S.length)
1558
1566
  if (x != null) {
1559
- var C = l - x;
1567
+ var C = y - x;
1560
1568
  C && (s = {
1561
- action: i,
1562
- location: L,
1569
+ action: u,
1570
+ location: U,
1563
1571
  retry: function() {
1564
1572
  A(C * -1);
1565
1573
  }
@@ -1573,98 +1581,98 @@ function Dn(e) {
1573
1581
  "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."
1574
1582
  );
1575
1583
  else
1576
- m(i);
1584
+ i(u);
1577
1585
  }
1578
1586
  }
1579
- n.addEventListener(mr, f), n.addEventListener(In, function() {
1580
- var i = a(), w = i[1];
1581
- ee(w) !== ee(S) && f();
1587
+ n.addEventListener(mr, l), n.addEventListener(qn, function() {
1588
+ var u = a(), d = u[1];
1589
+ ee(d) !== ee(b) && l();
1582
1590
  });
1583
- var p = j.Pop, h = a(), l = h[0], S = h[1], U = de(), k = de();
1584
- l == null && (l = 0, o.replaceState(K({}, o.state, {
1585
- idx: l
1591
+ var p = j.Pop, c = a(), y = c[0], b = c[1], L = de(), S = de();
1592
+ y == null && (y = 0, o.replaceState(K({}, o.state, {
1593
+ idx: y
1586
1594
  }), ""));
1587
- function g() {
1588
- var i = document.querySelector("base"), w = "";
1589
- if (i && i.getAttribute("href")) {
1590
- var x = n.location.href, L = x.indexOf("#");
1591
- w = L === -1 ? x : x.slice(0, L);
1595
+ function w() {
1596
+ var u = document.querySelector("base"), d = "";
1597
+ if (u && u.getAttribute("href")) {
1598
+ var x = n.location.href, U = x.indexOf("#");
1599
+ d = U === -1 ? x : x.slice(0, U);
1592
1600
  }
1593
- return w;
1601
+ return d;
1594
1602
  }
1595
- function d(i) {
1596
- return g() + "#" + (typeof i == "string" ? i : ee(i));
1603
+ function m(u) {
1604
+ return w() + "#" + (typeof u == "string" ? u : ee(u));
1597
1605
  }
1598
- function c(i, w) {
1599
- return w === void 0 && (w = null), pe(K({
1600
- pathname: S.pathname,
1606
+ function h(u, d) {
1607
+ return d === void 0 && (d = null), pe(K({
1608
+ pathname: b.pathname,
1601
1609
  hash: "",
1602
1610
  search: ""
1603
- }, typeof i == "string" ? we(i) : i, {
1604
- state: w,
1611
+ }, typeof u == "string" ? we(u) : u, {
1612
+ state: d,
1605
1613
  key: Ce()
1606
1614
  }));
1607
1615
  }
1608
- function u(i, w) {
1616
+ function R(u, d) {
1609
1617
  return [{
1610
- usr: i.state,
1611
- key: i.key,
1612
- idx: w
1613
- }, d(i)];
1614
- }
1615
- function b(i, w, x) {
1616
- return !k.length || (k.call({
1617
- action: i,
1618
- location: w,
1618
+ usr: u.state,
1619
+ key: u.key,
1620
+ idx: d
1621
+ }, m(u)];
1622
+ }
1623
+ function f(u, d, x) {
1624
+ return !S.length || (S.call({
1625
+ action: u,
1626
+ location: d,
1619
1627
  retry: x
1620
1628
  }), !1);
1621
1629
  }
1622
- function m(i) {
1623
- p = i;
1624
- var w = a();
1625
- l = w[0], S = w[1], U.call({
1630
+ function i(u) {
1631
+ p = u;
1632
+ var d = a();
1633
+ y = d[0], b = d[1], L.call({
1626
1634
  action: p,
1627
- location: S
1635
+ location: b
1628
1636
  });
1629
1637
  }
1630
- function R(i, w) {
1631
- var x = j.Push, L = c(i, w);
1638
+ function E(u, d) {
1639
+ var x = j.Push, U = h(u, d);
1632
1640
  function C() {
1633
- R(i, w);
1641
+ E(u, d);
1634
1642
  }
1635
- if (process.env.NODE_ENV !== "production" && X(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(i) + ")"), b(x, L, C)) {
1636
- var V = u(L, l + 1), $ = V[0], H = V[1];
1643
+ if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1644
+ var V = R(U, y + 1), O = V[0], q = V[1];
1637
1645
  try {
1638
- o.pushState($, "", H);
1646
+ o.pushState(O, "", q);
1639
1647
  } catch {
1640
- n.location.assign(H);
1648
+ n.location.assign(q);
1641
1649
  }
1642
- m(x);
1650
+ i(x);
1643
1651
  }
1644
1652
  }
1645
- function P(i, w) {
1646
- var x = j.Replace, L = c(i, w);
1653
+ function k(u, d) {
1654
+ var x = j.Replace, U = h(u, d);
1647
1655
  function C() {
1648
- P(i, w);
1656
+ k(u, d);
1649
1657
  }
1650
- if (process.env.NODE_ENV !== "production" && X(L.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(i) + ")"), b(x, L, C)) {
1651
- var V = u(L, l), $ = V[0], H = V[1];
1652
- o.replaceState($, "", H), m(x);
1658
+ if (process.env.NODE_ENV !== "production" && X(U.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(u) + ")"), f(x, U, C)) {
1659
+ var V = R(U, y), O = V[0], q = V[1];
1660
+ o.replaceState(O, "", q), i(x);
1653
1661
  }
1654
1662
  }
1655
- function A(i) {
1656
- o.go(i);
1663
+ function A(u) {
1664
+ o.go(u);
1657
1665
  }
1658
- var y = {
1666
+ var g = {
1659
1667
  get action() {
1660
1668
  return p;
1661
1669
  },
1662
1670
  get location() {
1663
- return S;
1671
+ return b;
1664
1672
  },
1665
- createHref: d,
1666
- push: R,
1667
- replace: P,
1673
+ createHref: m,
1674
+ push: E,
1675
+ replace: k,
1668
1676
  go: A,
1669
1677
  back: function() {
1670
1678
  A(-1);
@@ -1672,107 +1680,107 @@ function Dn(e) {
1672
1680
  forward: function() {
1673
1681
  A(1);
1674
1682
  },
1675
- listen: function(w) {
1676
- return U.push(w);
1683
+ listen: function(d) {
1684
+ return L.push(d);
1677
1685
  },
1678
- block: function(w) {
1679
- var x = k.push(w);
1680
- return k.length === 1 && n.addEventListener(Le, Be), function() {
1681
- x(), k.length || n.removeEventListener(Le, Be);
1686
+ block: function(d) {
1687
+ var x = S.push(d);
1688
+ return S.length === 1 && n.addEventListener(Le, Be), function() {
1689
+ x(), S.length || n.removeEventListener(Le, Be);
1682
1690
  };
1683
1691
  }
1684
1692
  };
1685
- return y;
1693
+ return g;
1686
1694
  }
1687
- function vt(e) {
1695
+ function wt(e) {
1688
1696
  e === void 0 && (e = {});
1689
- var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(m) {
1690
- var R = pe(K({
1697
+ var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(i) {
1698
+ var E = pe(K({
1691
1699
  pathname: "/",
1692
1700
  search: "",
1693
1701
  hash: "",
1694
1702
  state: null,
1695
1703
  key: Ce()
1696
- }, typeof m == "string" ? we(m) : m));
1697
- return process.env.NODE_ENV !== "production" && X(R.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(m) + ")"), R;
1698
- }), s = Et(o ?? a.length - 1, 0, a.length - 1), f = j.Pop, p = a[s], h = de(), l = de();
1699
- function S(m) {
1700
- return typeof m == "string" ? m : ee(m);
1701
- }
1702
- function U(m, R) {
1703
- return R === void 0 && (R = null), pe(K({
1704
+ }, typeof i == "string" ? we(i) : i));
1705
+ return process.env.NODE_ENV !== "production" && X(E.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(i) + ")"), E;
1706
+ }), s = vt(o ?? a.length - 1, 0, a.length - 1), l = j.Pop, p = a[s], c = de(), y = de();
1707
+ function b(i) {
1708
+ return typeof i == "string" ? i : ee(i);
1709
+ }
1710
+ function L(i, E) {
1711
+ return E === void 0 && (E = null), pe(K({
1704
1712
  pathname: p.pathname,
1705
1713
  search: "",
1706
1714
  hash: ""
1707
- }, typeof m == "string" ? we(m) : m, {
1708
- state: R,
1715
+ }, typeof i == "string" ? we(i) : i, {
1716
+ state: E,
1709
1717
  key: Ce()
1710
1718
  }));
1711
1719
  }
1712
- function k(m, R, P) {
1713
- return !l.length || (l.call({
1714
- action: m,
1715
- location: R,
1716
- retry: P
1720
+ function S(i, E, k) {
1721
+ return !y.length || (y.call({
1722
+ action: i,
1723
+ location: E,
1724
+ retry: k
1717
1725
  }), !1);
1718
1726
  }
1719
- function g(m, R) {
1720
- f = m, p = R, h.call({
1721
- action: f,
1727
+ function w(i, E) {
1728
+ l = i, p = E, c.call({
1729
+ action: l,
1722
1730
  location: p
1723
1731
  });
1724
1732
  }
1725
- function d(m, R) {
1726
- var P = j.Push, A = U(m, R);
1727
- function y() {
1728
- d(m, R);
1733
+ function m(i, E) {
1734
+ var k = j.Push, A = L(i, E);
1735
+ function g() {
1736
+ m(i, E);
1729
1737
  }
1730
- process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), k(P, A, y) && (s += 1, a.splice(s, a.length, A), g(P, A));
1738
+ process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(i) + ")"), S(k, A, g) && (s += 1, a.splice(s, a.length, A), w(k, A));
1731
1739
  }
1732
- function c(m, R) {
1733
- var P = j.Replace, A = U(m, R);
1734
- function y() {
1735
- c(m, R);
1740
+ function h(i, E) {
1741
+ var k = j.Replace, A = L(i, E);
1742
+ function g() {
1743
+ h(i, E);
1736
1744
  }
1737
- process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), k(P, A, y) && (a[s] = A, g(P, A));
1745
+ process.env.NODE_ENV !== "production" && X(p.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(i) + ")"), S(k, A, g) && (a[s] = A, w(k, A));
1738
1746
  }
1739
- function u(m) {
1740
- var R = Et(s + m, 0, a.length - 1), P = j.Pop, A = a[R];
1741
- function y() {
1742
- u(m);
1747
+ function R(i) {
1748
+ var E = vt(s + i, 0, a.length - 1), k = j.Pop, A = a[E];
1749
+ function g() {
1750
+ R(i);
1743
1751
  }
1744
- k(P, A, y) && (s = R, g(P, A));
1752
+ S(k, A, g) && (s = E, w(k, A));
1745
1753
  }
1746
- var b = {
1754
+ var f = {
1747
1755
  get index() {
1748
1756
  return s;
1749
1757
  },
1750
1758
  get action() {
1751
- return f;
1759
+ return l;
1752
1760
  },
1753
1761
  get location() {
1754
1762
  return p;
1755
1763
  },
1756
- createHref: S,
1757
- push: d,
1758
- replace: c,
1759
- go: u,
1764
+ createHref: b,
1765
+ push: m,
1766
+ replace: h,
1767
+ go: R,
1760
1768
  back: function() {
1761
- u(-1);
1769
+ R(-1);
1762
1770
  },
1763
1771
  forward: function() {
1764
- u(1);
1772
+ R(1);
1765
1773
  },
1766
- listen: function(R) {
1767
- return h.push(R);
1774
+ listen: function(E) {
1775
+ return c.push(E);
1768
1776
  },
1769
- block: function(R) {
1770
- return l.push(R);
1777
+ block: function(E) {
1778
+ return y.push(E);
1771
1779
  }
1772
1780
  };
1773
- return b;
1781
+ return f;
1774
1782
  }
1775
- function Et(e, t, r) {
1783
+ function vt(e, t, r) {
1776
1784
  return Math.min(Math.max(e, t), r);
1777
1785
  }
1778
1786
  function Be(e) {
@@ -1816,23 +1824,23 @@ function we(e) {
1816
1824
  return t;
1817
1825
  }
1818
1826
  const yr = Symbol();
1819
- function Fn(e, t) {
1827
+ function Dn(e, t) {
1820
1828
  const r = Ve({ ...e }), n = (s) => {
1821
1829
  Object.assign(r, {
1822
1830
  [yr]: !1,
1823
1831
  ...s
1824
1832
  });
1825
- }, o = r, a = An(o, t);
1833
+ }, o = r, a = Sn(o, t);
1826
1834
  return {
1827
1835
  currentRoute: o,
1828
1836
  routerRoute: a,
1829
1837
  updateRoute: n
1830
1838
  };
1831
1839
  }
1832
- function q(e) {
1833
- return !e.startsWith("http") ? Mn(e) : Tn(e);
1840
+ function _(e) {
1841
+ return !e.startsWith("http") ? Tn(e) : Fn(e);
1834
1842
  }
1835
- function Tn(e) {
1843
+ function Fn(e) {
1836
1844
  const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
1837
1845
  return {
1838
1846
  protocol: t,
@@ -1843,7 +1851,7 @@ function Tn(e) {
1843
1851
  hash: s
1844
1852
  };
1845
1853
  }
1846
- function Mn(e) {
1854
+ function Tn(e) {
1847
1855
  const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
1848
1856
  return {
1849
1857
  pathname: t,
@@ -1852,19 +1860,19 @@ function Mn(e) {
1852
1860
  hash: o
1853
1861
  };
1854
1862
  }
1855
- function Jn(e) {
1863
+ function Mn(e) {
1856
1864
  return (t) => {
1857
- const { host: r } = q(t);
1865
+ const { host: r } = _(t);
1858
1866
  return !(r === void 0 || r === e);
1859
1867
  };
1860
1868
  }
1861
- function Wn({ mode: e, listener: t }) {
1862
- const r = Gn(e), n = (p, h) => {
1863
- if (h != null && h.replace) {
1864
- r.replace(p, h.state);
1869
+ function Jn({ mode: e, listener: t }) {
1870
+ const r = Wn(e), n = (p, c) => {
1871
+ if (c != null && c.replace) {
1872
+ r.replace(p, c.state);
1865
1873
  return;
1866
1874
  }
1867
- r.push(p, h == null ? void 0 : h.state);
1875
+ r.push(p, c == null ? void 0 : c.state);
1868
1876
  }, o = () => {
1869
1877
  const p = ee(r.location);
1870
1878
  r.replace(p);
@@ -1882,41 +1890,41 @@ function Wn({ mode: e, listener: t }) {
1882
1890
  }
1883
1891
  };
1884
1892
  }
1885
- function Gn(e = "auto") {
1893
+ function Wn(e = "auto") {
1886
1894
  switch (e) {
1887
1895
  case "auto":
1888
- return rt() ? wt() : vt();
1896
+ return tt() ? Rt() : wt();
1889
1897
  case "browser":
1890
- return wt();
1898
+ return Rt();
1891
1899
  case "memory":
1892
- return vt();
1900
+ return wt();
1893
1901
  case "hash":
1894
- return Dn();
1902
+ return In();
1895
1903
  default:
1896
1904
  const t = e;
1897
1905
  throw new Error(`Switch is not exhaustive for mode: ${t}`);
1898
1906
  }
1899
1907
  }
1900
- function zn(e) {
1908
+ function Gn(e) {
1901
1909
  return me(() => () => ue("h1", e), {
1902
1910
  name: e,
1903
1911
  props: []
1904
1912
  });
1905
1913
  }
1906
- function Qn(e) {
1907
- const t = (a) => Ae(e[a] ?? zn(a)), r = (a) => {
1908
- const s = Ae(t(a)), f = {
1909
- id: at(),
1914
+ function zn(e) {
1915
+ const t = (a) => Ae(e[a] ?? Gn(a)), r = (a) => {
1916
+ const s = Ae(t(a)), l = {
1917
+ id: ot(),
1910
1918
  component: s,
1911
1919
  meta: {},
1912
1920
  state: {}
1913
1921
  };
1914
1922
  return {
1915
- id: f.id,
1916
- matched: f,
1917
- matches: [f],
1923
+ id: l.id,
1924
+ matched: l,
1925
+ matches: [l],
1918
1926
  name: a,
1919
- query: nt(""),
1927
+ query: rt(""),
1920
1928
  params: {},
1921
1929
  state: {},
1922
1930
  href: "/",
@@ -1937,23 +1945,23 @@ function Qn(e) {
1937
1945
  getRejectionRoute: r
1938
1946
  };
1939
1947
  }
1940
- class Kn extends Error {
1948
+ class Qn extends Error {
1941
1949
  constructor() {
1942
1950
  super("initialUrl must be set if window.location is unavailable");
1943
1951
  }
1944
1952
  }
1945
- function Yn(e) {
1953
+ function Kn(e) {
1946
1954
  if (e)
1947
1955
  return e;
1948
- if (rt())
1956
+ if (tt())
1949
1957
  return window.location.toString();
1950
- throw new Kn();
1958
+ throw new Qn();
1951
1959
  }
1952
1960
  function gr(e) {
1953
1961
  return !!e && typeof e == "object";
1954
1962
  }
1955
1963
  const Ne = !0;
1956
- function Xn(e, t, r) {
1964
+ function Yn(e, t, r) {
1957
1965
  if (gr(e) && t in e) {
1958
1966
  const n = e[t];
1959
1967
  return typeof n == "string" ? re(n, r, Ne) : n;
@@ -1963,37 +1971,37 @@ function Xn(e, t, r) {
1963
1971
  function Rr(e, t) {
1964
1972
  const r = {};
1965
1973
  for (const [n, o] of Object.entries(e)) {
1966
- const a = Xn(t, n, o);
1974
+ const a = Yn(t, n, o);
1967
1975
  r[n] = a;
1968
1976
  }
1969
1977
  return r;
1970
1978
  }
1971
- function eo(e, t, r) {
1979
+ function Xn(e, t, r) {
1972
1980
  if (gr(e) && t in e) {
1973
1981
  const n = e[t];
1974
1982
  return ne(n, r, Ne);
1975
1983
  }
1976
1984
  return ne(void 0, r, Ne);
1977
1985
  }
1978
- const bt = (e, t) => {
1986
+ const Et = (e, t) => {
1979
1987
  const r = {};
1980
1988
  for (const [n, o] of Object.entries(e)) {
1981
- const a = eo(t, n, o);
1989
+ const a = Xn(t, n, o);
1982
1990
  r[n] = a;
1983
1991
  }
1984
1992
  return r;
1985
1993
  };
1986
- function to() {
1987
- const e = Ve(/* @__PURE__ */ new Map()), t = rt() ? s() : null, r = (f) => {
1988
- e.set(f, !1), t == null || t.observe(f);
1989
- }, n = (f) => {
1990
- e.delete(f), t == null || t.unobserve(f);
1994
+ function eo() {
1995
+ const e = Ve(/* @__PURE__ */ new Map()), t = tt() ? s() : null, r = (l) => {
1996
+ e.set(l, !1), t == null || t.observe(l);
1997
+ }, n = (l) => {
1998
+ e.delete(l), t == null || t.unobserve(l);
1991
1999
  }, o = () => {
1992
2000
  t == null || t.disconnect();
1993
- }, a = (f) => e.get(f) ?? !1;
2001
+ }, a = (l) => e.get(l) ?? !1;
1994
2002
  function s() {
1995
- return new IntersectionObserver((f) => {
1996
- f.forEach((p) => {
2003
+ return new IntersectionObserver((l) => {
2004
+ l.forEach((p) => {
1997
2005
  e.set(p.target, p.isIntersecting);
1998
2006
  });
1999
2007
  });
@@ -2005,166 +2013,166 @@ function to() {
2005
2013
  isElementVisible: a
2006
2014
  };
2007
2015
  }
2008
- class ro extends Error {
2016
+ class to extends Error {
2009
2017
  constructor(t) {
2010
2018
  super(`Route not found: "${t}"`);
2011
2019
  }
2012
2020
  }
2013
2021
  function wr(e, t, r) {
2014
- const n = rn(t.value, r), o = It(n), [a] = Ft(e, new RegExp(o, "g"));
2022
+ const n = tn(t.value, r), o = qt(n), [a] = Dt(e, new RegExp(o, "g"));
2015
2023
  return a;
2016
2024
  }
2017
2025
  function vr(e, t, r, n) {
2018
- const o = Xe(t, r), a = ne(n, t.params[r], o);
2019
- return e.replace(Dt(r), a);
2026
+ const o = Ye(t, r), a = ne(n, t.params[r], o);
2027
+ return e.replace(It(r), a);
2020
2028
  }
2021
2029
  function Er({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
2022
2030
  const s = new URL("https://localhost");
2023
2031
  e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
2024
- const f = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2025
- return Bt(f);
2032
+ const l = s.toString().replace(/^https:\/\/localhost\/*/, "/");
2033
+ return Lt(l);
2026
2034
  }
2027
- function no(e, t = {}) {
2028
- const { params: r = {}, query: n } = t, o = ao(e.query, r), a = ct(o, n), s = Pt(e.path, r), f = e.hash.value ? Pt(e.hash, r) : t.hash, p = oo(e.host, r), { protocol: h, host: l } = q(p);
2029
- return Er({ protocol: h, host: l, pathname: s, searchParams: a, hash: f });
2035
+ function ro(e, t = {}) {
2036
+ const { params: r = {}, query: n } = t, o = oo(e.query, r), a = st(o, n), s = bt(e.path, r), l = e.hash.value ? bt(e.hash, r) : t.hash, p = no(e.host, r), { protocol: c, host: y } = _(p);
2037
+ return Er({ protocol: c, host: y, pathname: s, searchParams: a, hash: l });
2030
2038
  }
2031
- function oo(e, t) {
2039
+ function no(e, t) {
2032
2040
  const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
2033
2041
  return Object.keys(e.params).reduce((n, o) => vr(n, e, o, t[o]), r);
2034
2042
  }
2035
- function Pt(e, t) {
2043
+ function bt(e, t) {
2036
2044
  return Object.keys(e.params).reduce((r, n) => vr(r, e, n, t[n]), e.value);
2037
2045
  }
2038
- function ao(e, t) {
2046
+ function oo(e, t) {
2039
2047
  const r = new URLSearchParams(e.value);
2040
2048
  if (!e.value)
2041
2049
  return r;
2042
2050
  for (const [n, o] of Array.from(r.entries())) {
2043
- const a = tt(o);
2051
+ const a = et(o);
2044
2052
  if (!a)
2045
2053
  continue;
2046
- const f = et(o), p = ne(t[a], e.params[a], f), h = t[a] === void 0 && p === "";
2047
- f && h ? r.delete(n, o) : r.set(n, p);
2054
+ const l = Xe(o), p = ne(t[a], e.params[a], l), c = t[a] === void 0 && p === "";
2055
+ l && c ? r.delete(n, o) : r.set(n, p);
2048
2056
  }
2049
2057
  return r;
2050
2058
  }
2051
- const so = (e, t) => {
2059
+ const ao = (e, t) => {
2052
2060
  try {
2053
- ut(e, t);
2061
+ it(e, t);
2054
2062
  } catch {
2055
2063
  return !1;
2056
2064
  }
2057
2065
  return !0;
2058
- }, ut = (e, t) => {
2059
- const { protocol: r, host: n, pathname: o, search: a, hash: s } = q(t);
2066
+ }, it = (e, t) => {
2067
+ const { protocol: r, host: n, pathname: o, search: a, hash: s } = _(t);
2060
2068
  return {
2061
2069
  ...Te(e.host, `${r}//${n}`),
2062
2070
  ...Te(e.path, o),
2063
- ...co(e.query, a),
2071
+ ...so(e.query, a),
2064
2072
  ...Te(e.hash, s)
2065
2073
  };
2066
2074
  };
2067
2075
  function Te(e, t) {
2068
2076
  const r = {}, n = decodeURIComponent(t);
2069
2077
  for (const [o, a] of Object.entries(e.params)) {
2070
- const s = wr(n, e, o), f = Xe(e, o), p = re(s, a, f);
2078
+ const s = wr(n, e, o), l = Ye(e, o), p = re(s, a, l);
2071
2079
  r[o] = p;
2072
2080
  }
2073
2081
  return r;
2074
2082
  }
2075
- function co(e, t) {
2083
+ function so(e, t) {
2076
2084
  const r = {}, n = new URLSearchParams(e.value), o = new URLSearchParams(t);
2077
2085
  for (const [a, s] of Array.from(n.entries())) {
2078
- const f = tt(s);
2079
- if (!f)
2086
+ const l = et(s);
2087
+ if (!l)
2080
2088
  continue;
2081
- const h = et(s), l = o.get(a) ?? void 0, S = re(l, e.params[f], h);
2082
- r[f] = S;
2089
+ const c = Xe(s), y = o.get(a) ?? void 0, b = re(y, e.params[l], c);
2090
+ r[l] = b;
2083
2091
  }
2084
2092
  return r;
2085
2093
  }
2086
- function io(e, t = {}, r = {}) {
2087
- const n = no(e, {
2094
+ function co(e, t = {}, r = {}) {
2095
+ const n = ro(e, {
2088
2096
  params: t,
2089
2097
  query: r.query,
2090
2098
  hash: r.hash
2091
- }), { search: o, hash: a } = q(n);
2099
+ }), { search: o, hash: a } = _(n);
2092
2100
  return {
2093
2101
  id: e.id,
2094
2102
  matched: e.matched,
2095
2103
  matches: e.matches,
2096
2104
  name: e.name,
2097
- query: nt(o),
2098
- params: ut(e, n),
2105
+ query: rt(o),
2106
+ params: it(e, n),
2099
2107
  state: Rr(e.state, r.state),
2100
2108
  hash: a,
2101
2109
  href: n
2102
2110
  };
2103
2111
  }
2104
- const uo = (e) => "name" in e.matched && !!e.matched.name, fo = (e, t) => {
2105
- const { pathname: r } = q(t);
2106
- return en(e).test(r);
2107
- }, lo = (e, t) => {
2108
- const { search: r } = q(t);
2109
- return tn(e).every((o) => o.test(r));
2110
- }, Ge = (e, t) => {
2111
- const { hash: r } = q(t), { value: n } = e.hash;
2112
+ const io = (e) => "name" in e.matched && !!e.matched.name, uo = (e, t) => {
2113
+ const { pathname: r } = _(t);
2114
+ return Xr(e).test(r);
2115
+ }, fo = (e, t) => {
2116
+ const { search: r } = _(t);
2117
+ return en(e).every((o) => o.test(r));
2118
+ }, We = (e, t) => {
2119
+ const { hash: r } = _(t), { value: n } = e.hash;
2112
2120
  return J(n) ? `#${n.replace(/^#*/, "")}`.toLowerCase() === r.toLowerCase() : !0;
2113
2121
  };
2114
- function ho(e) {
2115
- const { searchParams: t, pathname: r } = q(e), n = -1, o = 1;
2122
+ function lo(e) {
2123
+ const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
2116
2124
  return (a, s) => {
2117
- const f = At(a, t), p = St(a, r), h = At(s, t), l = St(s, r);
2118
- return a.depth > s.depth ? n : a.depth < s.depth ? o : f + p > h + l ? n : f + p < h + l ? o : Ge(a, e) ? n : Ge(s, e) ? o : 0;
2125
+ const l = St(a, t), p = Pt(a, r), c = St(s, t), y = Pt(s, r);
2126
+ return a.depth > s.depth ? n : a.depth < s.depth ? o : l + p > c + y ? n : l + p < c + y ? o : We(a, e) ? n : We(s, e) ? o : 0;
2119
2127
  };
2120
2128
  }
2121
- function St(e, t) {
2122
- const r = Object.keys(e.path.params).filter((o) => Xe(e.path, o)).map((o) => o), n = r.filter((o) => wr(t, e.path, o) === void 0);
2129
+ function Pt(e, t) {
2130
+ const r = Object.keys(e.path.params).filter((o) => Ye(e.path, o)).map((o) => o), n = r.filter((o) => wr(t, e.path, o) === void 0);
2123
2131
  return r.length - n.length;
2124
2132
  }
2125
- function At(e, t) {
2133
+ function St(e, t) {
2126
2134
  const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
2127
2135
  return o.length - a.length;
2128
2136
  }
2129
- const po = [
2137
+ const ho = [
2138
+ io,
2130
2139
  uo,
2131
2140
  fo,
2132
- lo,
2133
- Ge,
2134
- so
2141
+ We,
2142
+ ao
2135
2143
  ];
2136
- function mo(e, t) {
2137
- const r = ho(t);
2138
- return e.filter((n) => po.every((o) => o(n, t))).sort(r);
2144
+ function po(e, t) {
2145
+ const r = lo(t);
2146
+ return e.filter((n) => ho.every((o) => o(n, t))).sort(r);
2139
2147
  }
2140
- function yo(e, t, r) {
2141
- const n = mo(e, t);
2148
+ function mo(e, t, r) {
2149
+ const n = po(e, t);
2142
2150
  if (!n.length)
2143
2151
  return;
2144
- const [o] = n, { searchParams: a, hash: s } = q(t);
2152
+ const [o] = n, { searchParams: a, hash: s } = _(t);
2145
2153
  return {
2146
2154
  id: o.id,
2147
2155
  matched: o.matched,
2148
2156
  matches: o.matches,
2149
2157
  name: o.name,
2150
- query: nt(a),
2151
- params: ut(o, t),
2158
+ query: rt(a),
2159
+ params: it(o, t),
2152
2160
  state: Rr(o.state, r),
2153
2161
  hash: s,
2154
- href: Bt(t)
2162
+ href: Lt(t)
2155
2163
  };
2156
2164
  }
2157
- function kt(e, t) {
2158
- const r = typeof e == "string" ? q(e) : e, n = typeof t == "string" ? q(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2165
+ function At(e, t) {
2166
+ const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
2159
2167
  return Er({
2160
2168
  protocol: J(n.protocol) ? n.protocol : r.protocol,
2161
2169
  host: J(n.host) ? n.host : r.host,
2162
2170
  pathname: J(n.pathname) ? n.pathname : r.pathname,
2163
- searchParams: ct(a, o),
2171
+ searchParams: st(a, o),
2164
2172
  hash: J(n.hash) ? n.hash : r.hash
2165
2173
  });
2166
2174
  }
2167
- function go(e, t) {
2175
+ function yo(e, t) {
2168
2176
  return J(t) ? e.map((r) => {
2169
2177
  const n = `${t}${r.path.value}`;
2170
2178
  return {
@@ -2173,7 +2181,7 @@ function go(e, t) {
2173
2181
  };
2174
2182
  }) : e;
2175
2183
  }
2176
- class Ro extends Error {
2184
+ class go extends Error {
2177
2185
  /**
2178
2186
  * Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
2179
2187
  * @param name - The name of the name that was duplicated.
@@ -2182,20 +2190,20 @@ class Ro extends Error {
2182
2190
  super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
2183
2191
  }
2184
2192
  }
2185
- function wo(e) {
2193
+ function Ro(e) {
2186
2194
  const t = e.map(({ name: r }) => r);
2187
2195
  for (const r of t)
2188
- if (Nt(t, r) > 1)
2189
- throw new Ro(r);
2196
+ if (Ct(t, r) > 1)
2197
+ throw new go(r);
2190
2198
  }
2191
- function vo(e, t = [], r) {
2199
+ function wo(e, t = [], r) {
2192
2200
  const n = [
2193
2201
  ...e,
2194
2202
  ...t.map((o) => o.routes)
2195
2203
  ].flat();
2196
- return wo(n), go(n, r);
2204
+ return Ro(n), yo(n, r);
2197
2205
  }
2198
- function Eo(e = {}, t = []) {
2206
+ function vo(e = {}, t = []) {
2199
2207
  const r = new oe();
2200
2208
  return ce("onBeforeRouteEnter", e, t).forEach((n) => r.onBeforeRouteEnter.add(n)), ce("onBeforeRouteUpdate", e, t).forEach((n) => r.onBeforeRouteUpdate.add(n)), ce("onBeforeRouteLeave", e, t).forEach((n) => r.onBeforeRouteLeave.add(n)), ce("onAfterRouteEnter", e, t).forEach((n) => r.onAfterRouteEnter.add(n)), ce("onAfterRouteUpdate", e, t).forEach((n) => r.onAfterRouteUpdate.add(n)), ce("onAfterRouteLeave", e, t).forEach((n) => r.onAfterRouteLeave.add(n)), r;
2201
2209
  }
@@ -2205,70 +2213,69 @@ function ce(e, t, r) {
2205
2213
  ...r.map((o) => o[e])
2206
2214
  ].flat().filter((o) => o !== void 0);
2207
2215
  }
2208
- function Bo(e, t, r = []) {
2209
- let n = null;
2210
- const o = vo(e, r, t == null ? void 0 : t.base), a = qn();
2211
- a.addGlobalRouteHooks(Eo(t, r));
2212
- const s = ot(), f = wn(), p = Vn(), h = to(), l = Wn({
2216
+ function Co(e, t, r = []) {
2217
+ const n = wo(e, r, t == null ? void 0 : t.base), o = _n();
2218
+ o.addGlobalRouteHooks(vo(t, r));
2219
+ const a = nt(), s = Rn(), l = Nn(), p = eo(), c = Jn({
2213
2220
  mode: t == null ? void 0 : t.historyMode,
2214
- listener: ({ location: E }) => {
2215
- const B = ee(E);
2216
- U(B, { state: E.state, replace: !0 });
2221
+ listener: ({ location: P }) => {
2222
+ const B = ee(P);
2223
+ b(B, { state: P.state, replace: !0 });
2217
2224
  }
2218
2225
  });
2219
- function S(E, B = {}) {
2220
- return yo(o, E, B.state);
2226
+ function y(P, B = {}) {
2227
+ return mo(n, P, B.state);
2221
2228
  }
2222
- async function U(E, B = {}) {
2223
- const W = s();
2224
- if (l.stopListening(), L(E)) {
2225
- l.update(E, B);
2229
+ async function b(P, B = {}) {
2230
+ const W = a();
2231
+ if (c.stopListening(), x(P)) {
2232
+ c.update(P, B);
2226
2233
  return;
2227
2234
  }
2228
- const I = S(E, B) ?? m("NotFound"), _ = br(W), Q = await a.runBeforeRouteHooks({ to: I, from: _, app: n });
2235
+ const I = y(P, B) ?? f("NotFound"), H = ut(W), Q = await o.runBeforeRouteHooks({ to: I, from: H });
2229
2236
  switch (Q.status) {
2230
2237
  // On abort do nothing
2231
2238
  case "ABORT":
2232
2239
  return;
2233
2240
  // On push update the history, and push new route, and return
2234
2241
  case "PUSH":
2235
- l.update(E, B), await g(...Q.to);
2242
+ c.update(P, B), await S(...Q.to);
2236
2243
  return;
2237
2244
  // On reject update the history, the route, and set the rejection type
2238
2245
  case "REJECT":
2239
- l.update(E, B), u(Q.type);
2246
+ c.update(P, B), h(Q.type);
2240
2247
  break;
2241
2248
  // On success update history, set the route, and clear the rejection
2242
2249
  case "SUCCESS":
2243
- l.update(E, B), u(null);
2250
+ c.update(P, B), h(null);
2244
2251
  break;
2245
2252
  default:
2246
2253
  throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(Q)}`);
2247
2254
  }
2248
2255
  const _e = W;
2249
- f.setProps(I).then((D) => {
2256
+ s.setProps(I).then((D) => {
2250
2257
  if (_e === W)
2251
2258
  switch (D.status) {
2252
2259
  case "SUCCESS":
2253
2260
  break;
2254
2261
  case "PUSH":
2255
- g(...D.to);
2262
+ S(...D.to);
2256
2263
  break;
2257
2264
  case "REJECT":
2258
- u(D.type);
2265
+ h(D.type);
2259
2266
  break;
2260
2267
  default:
2261
2268
  const qe = D;
2262
2269
  throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(qe)}`);
2263
2270
  }
2264
- }), y(I);
2265
- const F = await a.runAfterRouteHooks({ to: I, from: _, app: n });
2271
+ }), A(I);
2272
+ const F = await o.runAfterRouteHooks({ to: I, from: H });
2266
2273
  switch (F.status) {
2267
2274
  case "PUSH":
2268
- await g(...F.to);
2275
+ await S(...F.to);
2269
2276
  break;
2270
2277
  case "REJECT":
2271
- u(F.type);
2278
+ h(F.type);
2272
2279
  break;
2273
2280
  case "SUCCESS":
2274
2281
  break;
@@ -2276,100 +2283,100 @@ function Bo(e, t, r = []) {
2276
2283
  const D = F;
2277
2284
  throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
2278
2285
  }
2279
- l.startListening();
2286
+ c.startListening();
2280
2287
  }
2281
- const k = (E, B = {}, W = {}) => {
2282
- const I = o.find((_) => _.name === E);
2288
+ const L = (P, B = {}, W = {}) => {
2289
+ const I = n.find((H) => H.name === P);
2283
2290
  if (!I)
2284
- throw new ro(String(E));
2285
- return io(I, B, W);
2286
- }, g = (E, B, W) => {
2287
- if (M(E)) {
2288
- const F = { ...B }, D = kt(E, {
2291
+ throw new to(String(P));
2292
+ return co(I, B, W);
2293
+ }, S = (P, B, W) => {
2294
+ if (M(P)) {
2295
+ const F = { ...B }, D = At(P, {
2289
2296
  searchParams: F.query,
2290
2297
  hash: F.hash
2291
2298
  });
2292
- return U(D, F);
2299
+ return b(D, F);
2293
2300
  }
2294
- if (typeof E == "string") {
2295
- const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie = k(E, qe, D), Sr = bt({ ...Ie.matched.state }, { ...Ie.state, ...D.state });
2296
- return U(Ie.href, { replace: F, state: Sr });
2301
+ if (typeof P == "string") {
2302
+ const { replace: F, ...D } = { ...W }, qe = { ...B }, Ie = L(P, qe, D), Pr = Et({ ...Ie.matched.state }, { ...Ie.state, ...D.state });
2303
+ return b(Ie.href, { replace: F, state: Pr });
2297
2304
  }
2298
- const { replace: I, ..._ } = { ...B }, Q = bt({ ...E.matched.state }, { ...E.state, ..._.state }), _e = kt(E.href, {
2299
- searchParams: _.query,
2300
- hash: _.hash
2305
+ const { replace: I, ...H } = { ...B }, Q = Et({ ...P.matched.state }, { ...P.state, ...H.state }), _e = At(P.href, {
2306
+ searchParams: H.query,
2307
+ hash: H.hash
2301
2308
  });
2302
- return U(_e, { replace: I, state: Q });
2303
- }, d = (E, B, W) => {
2304
- if (M(E)) {
2305
- const _ = { ...B, replace: !0 };
2306
- return g(E, _);
2309
+ return b(_e, { replace: I, state: Q });
2310
+ }, w = (P, B, W) => {
2311
+ if (M(P)) {
2312
+ const H = { ...B, replace: !0 };
2313
+ return S(P, H);
2307
2314
  }
2308
- if (typeof E == "string") {
2309
- const _ = { ...W, replace: !0 }, Q = { ...B };
2310
- return g(E, Q, _);
2315
+ if (typeof P == "string") {
2316
+ const H = { ...W, replace: !0 }, Q = { ...B };
2317
+ return S(P, Q, H);
2311
2318
  }
2312
2319
  const I = { ...B, replace: !0 };
2313
- return g(E, I);
2314
- }, c = (E) => {
2315
- u(E);
2316
- }, { setRejection: u, rejection: b, getRejectionRoute: m } = Qn({
2317
- ...r.reduce((E, B) => ({ ...E, ...B.rejections }), {}),
2320
+ return S(P, I);
2321
+ }, m = (P) => {
2322
+ h(P);
2323
+ }, { setRejection: h, rejection: R, getRejectionRoute: f } = zn({
2324
+ ...r.reduce((P, B) => ({ ...P, ...B.rejections }), {}),
2318
2325
  ...t == null ? void 0 : t.rejections
2319
- }), R = m("NotFound"), { currentRoute: P, routerRoute: A, updateRoute: y } = Fn(R, g), i = Yn(t == null ? void 0 : t.initialUrl), w = l.location.state, { host: x } = q(i), L = Jn(x);
2320
- let C = !1;
2321
- const { promise: V, resolve: $ } = Promise.withResolvers();
2322
- async function H() {
2323
- if (C)
2324
- return V;
2325
- Jr(o) && await Wr(), C = !0, await U(i, { replace: !0, state: w }), l.startListening(), $();
2326
- }
2327
- function ft() {
2328
- l.stopListening();
2329
- }
2330
- function br(E) {
2331
- return dn(E) ? null : { ...P };
2332
- }
2333
- function Pr(E) {
2334
- n = E, f.setVueApp(E), E.component("RouterView", fr), E.component("RouterLink", Un), E.provide(sr, b), E.provide(lr, a), E.provide(tr, f), E.provide(ur, p), E.provide(nr, h), E.provide(Ct, lt), H();
2335
- }
2336
- const lt = {
2337
- route: A,
2338
- resolve: k,
2339
- find: S,
2340
- push: g,
2341
- replace: d,
2342
- reject: c,
2343
- refresh: l.refresh,
2344
- forward: l.forward,
2345
- back: l.back,
2346
- go: l.go,
2347
- install: Pr,
2348
- isExternal: L,
2349
- onBeforeRouteEnter: a.onBeforeRouteEnter,
2350
- onBeforeRouteUpdate: a.onBeforeRouteUpdate,
2351
- onBeforeRouteLeave: a.onBeforeRouteLeave,
2352
- onAfterRouteEnter: a.onAfterRouteEnter,
2353
- onAfterRouteUpdate: a.onAfterRouteUpdate,
2354
- onAfterRouteLeave: a.onAfterRouteLeave,
2326
+ }), i = f("NotFound"), { currentRoute: E, routerRoute: k, updateRoute: A } = Dn(i, S), g = Kn(t == null ? void 0 : t.initialUrl), u = c.location.state, { host: d } = _(g), x = Mn(d);
2327
+ let U = !1;
2328
+ const { promise: C, resolve: V } = Promise.withResolvers();
2329
+ async function O() {
2330
+ if (U)
2331
+ return C;
2332
+ Mr(n) && await Jr(), U = !0, await b(g, { replace: !0, state: u }), c.startListening(), V();
2333
+ }
2334
+ function q() {
2335
+ c.stopListening();
2336
+ }
2337
+ function ut(P) {
2338
+ return pn(P) ? null : { ...E };
2339
+ }
2340
+ function br(P) {
2341
+ o.setVueApp(P), s.setVueApp(P), P.component("RouterView", fr), P.component("RouterLink", xn), P.provide(sr, R), P.provide(lr, o), P.provide(tr, s), P.provide(ur, l), P.provide(nr, p), P.provide(Bt, ft), O();
2342
+ }
2343
+ const ft = {
2344
+ route: k,
2345
+ resolve: L,
2346
+ find: y,
2347
+ push: S,
2348
+ replace: w,
2349
+ reject: m,
2350
+ refresh: c.refresh,
2351
+ forward: c.forward,
2352
+ back: c.back,
2353
+ go: c.go,
2354
+ install: br,
2355
+ isExternal: x,
2356
+ onBeforeRouteEnter: o.onBeforeRouteEnter,
2357
+ onBeforeRouteUpdate: o.onBeforeRouteUpdate,
2358
+ onBeforeRouteLeave: o.onBeforeRouteLeave,
2359
+ onAfterRouteEnter: o.onAfterRouteEnter,
2360
+ onAfterRouteUpdate: o.onAfterRouteUpdate,
2361
+ onAfterRouteLeave: o.onAfterRouteLeave,
2355
2362
  prefetch: t == null ? void 0 : t.prefetch,
2356
- start: H,
2357
- stop: ft
2363
+ start: O,
2364
+ stop: q
2358
2365
  };
2359
- return lt;
2366
+ return ft;
2360
2367
  }
2361
- function Co(e) {
2368
+ function No(e) {
2362
2369
  return {
2363
2370
  routes: e.routes ?? [],
2364
2371
  rejections: e.rejections ?? {},
2365
2372
  ...e
2366
2373
  };
2367
2374
  }
2368
- function bo(...e) {
2375
+ function Eo(e) {
2369
2376
  return {
2370
2377
  get: (t, { invalid: r }) => {
2371
2378
  for (const n of e) {
2372
- const o = Kr(t, n);
2379
+ const o = Qr(t, n);
2373
2380
  if (o !== void 0)
2374
2381
  return o;
2375
2382
  }
@@ -2377,7 +2384,7 @@ function bo(...e) {
2377
2384
  },
2378
2385
  set: (t, { invalid: r }) => {
2379
2386
  for (const n of e) {
2380
- const o = Yr(t, n);
2387
+ const o = Kr(t, n);
2381
2388
  if (o !== void 0)
2382
2389
  return o;
2383
2390
  }
@@ -2385,77 +2392,84 @@ function bo(...e) {
2385
2392
  }
2386
2393
  };
2387
2394
  }
2388
- function No(...e) {
2389
- const t = bo(...e);
2395
+ const bo = {
2396
+ separator: ","
2397
+ };
2398
+ function Vo(e, t = {}) {
2399
+ const { separator: r } = { ...bo, ...t }, n = Eo(e);
2390
2400
  return {
2391
- get: (r, n) => r.split(",").map((o) => t.get(o, n)),
2392
- set: (r, n) => {
2393
- if (!Array.isArray(r))
2394
- throw n.invalid("Expected an array");
2395
- return r.map((o) => t.set(o, n)).join(",");
2401
+ get: (o, a) => o.split(r).map((s) => n.get(s, a)),
2402
+ set: (o, a) => {
2403
+ if (!Array.isArray(o))
2404
+ throw a.invalid("Expected an array");
2405
+ return o.map((s) => n.set(s, a)).join(r);
2396
2406
  }
2397
2407
  };
2398
2408
  }
2399
- function Vo(...e) {
2409
+ const Po = {
2410
+ separator: ","
2411
+ };
2412
+ function Zo(e, t = {}) {
2413
+ const { separator: r } = { ...Po, ...t };
2400
2414
  return {
2401
- get: (t) => {
2402
- const r = t.split(",");
2403
- return e.map((n, o) => re(r.at(o), n));
2415
+ get: (n) => {
2416
+ const o = n.split(r);
2417
+ return e.map((a, s) => re(o.at(s), a));
2404
2418
  },
2405
- set: (t, { invalid: r }) => {
2406
- if (!Array.isArray(t))
2407
- throw r("Expected a tuple");
2408
- if (t.length !== e.length)
2409
- throw r(`Expected tuple with ${e.length} values but received ${t.length} values`);
2410
- return e.map((n, o) => ne(t.at(o), n)).join(",");
2419
+ set: (n, { invalid: o }) => {
2420
+ if (!Array.isArray(n))
2421
+ throw o("Expected a tuple");
2422
+ if (n.length !== e.length)
2423
+ throw o(`Expected tuple with ${e.length} values but received ${n.length} values`);
2424
+ return e.map((a, s) => ne(n.at(s), a)).join(r);
2411
2425
  }
2412
2426
  };
2413
2427
  }
2414
- const Zo = z, jo = z, Oo = z;
2415
- function $o(e) {
2416
- const t = at(), r = zt(e.name), n = Y(e.path), o = Y(e.query), a = Y(e.hash), s = e.meta ?? {}, f = Y(e.host), p = Ae({ id: t, meta: {}, state: {}, ...e }), h = {
2428
+ const jo = z, Oo = z, $o = z;
2429
+ function Ho(e) {
2430
+ const t = ot(), r = Gt(e.name), n = Y(e.path), o = Y(e.query), a = Y(e.hash), s = e.meta ?? {}, l = Y(e.host), p = Ae({ id: t, meta: {}, state: {}, ...e }), c = {
2417
2431
  id: t,
2418
2432
  matched: p,
2419
2433
  matches: [p],
2420
2434
  name: r,
2421
- host: f,
2435
+ host: l,
2422
2436
  path: n,
2423
2437
  query: o,
2424
2438
  hash: a,
2425
2439
  meta: s,
2426
2440
  depth: 1,
2427
2441
  state: {}
2428
- }, l = Mt(e) ? Gt(e.parent, h) : h;
2429
- return ge(l.path.params, l.query.params, l.host.params, l.hash.params), l;
2442
+ }, y = Tt(e) ? Wt(e.parent, c) : c;
2443
+ return ge(y.path.params, y.query.params, y.host.params, y.hash.params), y;
2430
2444
  }
2431
2445
  export {
2432
- Hr as DuplicateParamsError,
2433
- _r as MetaPropertyConflict,
2434
- Un as RouterLink,
2446
+ $r as DuplicateParamsError,
2447
+ Hr as MetaPropertyConflict,
2448
+ xn as RouterLink,
2435
2449
  ye as RouterNotInstalledError,
2436
2450
  fr as RouterView,
2437
- qr as UseRouteInvalidError,
2438
- No as arrayOf,
2439
- Bt as asUrl,
2440
- $o as createExternalRoute,
2441
- Fr as createParam,
2451
+ _r as UseRouteInvalidError,
2452
+ Vo as arrayOf,
2453
+ Lt as asUrl,
2454
+ Ho as createExternalRoute,
2455
+ Dr as createParam,
2442
2456
  he as createRoute,
2443
- Bo as createRouter,
2444
- Co as createRouterPlugin,
2445
- jo as host,
2457
+ Co as createRouter,
2458
+ No as createRouterPlugin,
2459
+ Oo as host,
2446
2460
  ar as isRoute,
2447
2461
  M as isUrl,
2448
- Uo as onAfterRouteLeave,
2449
- Lo as onAfterRouteUpdate,
2450
- ko as onBeforeRouteLeave,
2451
- xo as onBeforeRouteUpdate,
2452
- Zo as path,
2453
- Oo as query,
2454
- Vo as tupleOf,
2455
- bo as unionOf,
2456
- kn as useLink,
2462
+ Lo as onAfterRouteLeave,
2463
+ Bo as onAfterRouteUpdate,
2464
+ xo as onBeforeRouteLeave,
2465
+ Uo as onBeforeRouteUpdate,
2466
+ jo as path,
2467
+ $o as query,
2468
+ Zo as tupleOf,
2469
+ Eo as unionOf,
2470
+ An as useLink,
2457
2471
  cr as useRoute,
2458
- ze as useRouter,
2459
- Ao as withDefault,
2472
+ Ge as useRouter,
2473
+ ko as withDefault,
2460
2474
  z as withParams
2461
2475
  };