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