@kitbag/router 0.20.1 → 0.20.2

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