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