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