@kitbag/router 0.20.7 → 0.20.8

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