@kitbag/router 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kitbag-router.d.ts +15 -26
- package/dist/kitbag-router.js +1153 -1117
- package/dist/kitbag-router.umd.cjs +1 -1
- package/package.json +4 -4
package/dist/kitbag-router.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { inject as ae, toRefs as
|
|
1
|
+
var lr = Object.defineProperty;
|
|
2
|
+
var hr = (e, t, r) => t in e ? lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var T = (e, t, r) => hr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { inject as ae, toRefs as pr, computed as N, reactive as xe, defineComponent as se, h as Z, ref as qe, markRaw as ye, watch as ge, defineAsyncComponent as dr, toValue as $, openBlock as vt, createElementBlock as mr, normalizeClass as yr, renderSlot as Rt, normalizeProps as wt, guardReactiveProps as gr, unref as ue, getCurrentInstance as vr, resolveComponent as Rr, provide as wr, mergeProps as Pr, createBlock as Er, resolveDynamicComponent as br, createCommentVNode as Sr, onUnmounted as Pt } from "vue";
|
|
5
5
|
function I(e) {
|
|
6
6
|
return typeof e != "string" ? !1 : /^(https?:\/\/|\/).*/g.test(e);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function Et(e) {
|
|
9
9
|
return I(e) ? e : `/${e}`;
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class kr 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 kn extends Error {
|
|
|
17
17
|
super(`Invalid Param "${t}": Router does not support multiple params by the same name. All param names must be unique.`);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class Ar extends Error {
|
|
21
21
|
constructor(t) {
|
|
22
22
|
super(`Child property on meta for ${t} conflicts with the parent meta.`);
|
|
23
23
|
}
|
|
@@ -27,20 +27,20 @@ class pe extends Error {
|
|
|
27
27
|
super("Router not installed");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
class
|
|
30
|
+
class xr 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.
|
|
34
34
|
* @param routeName - The route name that was incorrectly used.
|
|
35
35
|
* @param actualRouteName - The expected route name that should have been used.
|
|
36
36
|
*/
|
|
37
|
-
constructor(t,
|
|
38
|
-
super(`useRoute called with incorrect route. Given ${t}, expected ${
|
|
37
|
+
constructor(t, r) {
|
|
38
|
+
super(`useRoute called with incorrect route. Given ${t}, expected ${r}`);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
const e = ae(
|
|
41
|
+
const bt = Symbol();
|
|
42
|
+
function _e() {
|
|
43
|
+
const e = ae(bt);
|
|
44
44
|
if (!e)
|
|
45
45
|
throw new pe();
|
|
46
46
|
return e;
|
|
@@ -48,81 +48,81 @@ function qe() {
|
|
|
48
48
|
function de(e) {
|
|
49
49
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ur(e) {
|
|
52
52
|
return e.every((t) => Array.isArray(t));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function F(e) {
|
|
55
55
|
return typeof e == "string" && e.length > 0;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function ve(e) {
|
|
58
58
|
return {
|
|
59
|
-
value:
|
|
59
|
+
value: F(e) ? e.replace(/^#*/, "") : void 0
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
62
|
+
function Lr(e, t) {
|
|
63
|
+
return ve(`${e.value ?? ""}${t.value ?? ""}`);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function Cr(e, t) {
|
|
66
|
+
return Br(e, t), { ...e, ...t };
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
throw new
|
|
68
|
+
function Br(e, t) {
|
|
69
|
+
const r = Object.keys(e).find((n) => n in t && typeof t[n] != typeof e[n]);
|
|
70
|
+
if (r)
|
|
71
|
+
throw new Ar(r);
|
|
72
72
|
}
|
|
73
73
|
function ee(e) {
|
|
74
74
|
return Array.isArray(e) ? e : [e];
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
return e.filter((
|
|
76
|
+
function St(e, t) {
|
|
77
|
+
return e.filter((r) => t === r).length;
|
|
78
78
|
}
|
|
79
79
|
function ce(...e) {
|
|
80
|
-
const t = e.flatMap((
|
|
81
|
-
for (const
|
|
82
|
-
if (
|
|
83
|
-
throw new
|
|
80
|
+
const t = e.flatMap((r) => Array.isArray(r) ? r : Object.keys(r).map(Nr));
|
|
81
|
+
for (const r of t)
|
|
82
|
+
if (St(t, r) > 1)
|
|
83
|
+
throw new kr(r);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Nr(e) {
|
|
86
86
|
return e.startsWith("?") ? e.slice(1) : e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Vr(e, t) {
|
|
89
89
|
return ce(e.params, t.params), {
|
|
90
90
|
value: `${e.value}${t.value}`,
|
|
91
91
|
params: { ...e.params, ...t.params }
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Hr(e, t) {
|
|
95
95
|
return ce(e.params, t.params), {
|
|
96
|
-
value: [e.value, t.value].filter(
|
|
96
|
+
value: [e.value, t.value].filter(F).join("&"),
|
|
97
97
|
params: { ...e.params, ...t.params }
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function jr(e, t) {
|
|
101
101
|
return ce(e, t), { ...e, ...t };
|
|
102
102
|
}
|
|
103
|
-
function $
|
|
103
|
+
function $r(e) {
|
|
104
104
|
return "host" in e && !!e.host;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function kt(e) {
|
|
107
107
|
return "parent" in e && !!e.parent;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Me(e) {
|
|
110
110
|
return "component" in e && !!e.component;
|
|
111
111
|
}
|
|
112
112
|
function We(e) {
|
|
113
113
|
return "components" in e && !!e.components;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function qr(e) {
|
|
116
116
|
return "state" in e && !!e.state;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function At(e, t) {
|
|
119
119
|
return {
|
|
120
120
|
...t,
|
|
121
|
-
path:
|
|
122
|
-
query:
|
|
123
|
-
meta:
|
|
124
|
-
state:
|
|
125
|
-
hash:
|
|
121
|
+
path: Vr(e.path, t.path),
|
|
122
|
+
query: Hr(e.query, t.query),
|
|
123
|
+
meta: Cr(e.meta, t.meta),
|
|
124
|
+
state: jr(e.state, t.state),
|
|
125
|
+
hash: Lr(e.hash, t.hash),
|
|
126
126
|
matches: [...e.matches, t.matched],
|
|
127
127
|
host: e.host,
|
|
128
128
|
depth: e.depth + 1
|
|
@@ -133,37 +133,37 @@ function De() {
|
|
|
133
133
|
}
|
|
134
134
|
class ie extends Error {
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
function
|
|
136
|
+
const J = "[", K = "]";
|
|
137
|
+
function _r(e) {
|
|
138
138
|
return e !== String && e !== Boolean && e !== Number && e !== Date;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
141
|
-
return typeof e == "function" &&
|
|
140
|
+
function Mr(e) {
|
|
141
|
+
return typeof e == "function" && _r(e);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Ue(e) {
|
|
144
144
|
return typeof e == "object" && "get" in e && typeof e.get == "function" && "set" in e && typeof e.set == "function";
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
return
|
|
146
|
+
function Wr(e) {
|
|
147
|
+
return Ue(e) && e.defaultValue !== void 0;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return
|
|
149
|
+
function fo(e, t) {
|
|
150
|
+
return Tr(e, t);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Dr(e, t) {
|
|
153
153
|
return e[t] ?? String;
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const q = {
|
|
156
156
|
invalid: (e) => {
|
|
157
157
|
throw new ie(e);
|
|
158
158
|
}
|
|
159
|
-
},
|
|
159
|
+
}, Or = {
|
|
160
160
|
get: (e) => e,
|
|
161
161
|
set: (e, { invalid: t }) => {
|
|
162
162
|
if (typeof e != "string")
|
|
163
163
|
throw t();
|
|
164
164
|
return e;
|
|
165
165
|
}
|
|
166
|
-
},
|
|
166
|
+
}, xt = {
|
|
167
167
|
get: (e, { invalid: t }) => {
|
|
168
168
|
if (e === "true")
|
|
169
169
|
return !0;
|
|
@@ -176,31 +176,31 @@ const _ = {
|
|
|
176
176
|
throw t();
|
|
177
177
|
return e.toString();
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, Ut = {
|
|
180
180
|
get: (e, { invalid: t }) => {
|
|
181
|
-
const
|
|
182
|
-
if (isNaN(
|
|
181
|
+
const r = Number(e);
|
|
182
|
+
if (isNaN(r))
|
|
183
183
|
throw t();
|
|
184
|
-
return
|
|
184
|
+
return r;
|
|
185
185
|
},
|
|
186
186
|
set: (e, { invalid: t }) => {
|
|
187
187
|
if (typeof e != "number")
|
|
188
188
|
throw t();
|
|
189
189
|
return e.toString();
|
|
190
190
|
}
|
|
191
|
-
},
|
|
191
|
+
}, Lt = {
|
|
192
192
|
get: (e, { invalid: t }) => {
|
|
193
|
-
const
|
|
194
|
-
if (isNaN(
|
|
193
|
+
const r = new Date(e);
|
|
194
|
+
if (isNaN(r.getTime()))
|
|
195
195
|
throw t();
|
|
196
|
-
return
|
|
196
|
+
return r;
|
|
197
197
|
},
|
|
198
198
|
set: (e, { invalid: t }) => {
|
|
199
199
|
if (typeof e != "object" || !(e instanceof Date))
|
|
200
200
|
throw t();
|
|
201
201
|
return e.toISOString();
|
|
202
202
|
}
|
|
203
|
-
},
|
|
203
|
+
}, Ct = {
|
|
204
204
|
get: (e, { invalid: t }) => {
|
|
205
205
|
try {
|
|
206
206
|
return JSON.parse(e);
|
|
@@ -216,28 +216,28 @@ const _ = {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
function fe(e, t,
|
|
220
|
-
if (e === void 0 || !
|
|
221
|
-
if (
|
|
219
|
+
function fe(e, t, r = !1) {
|
|
220
|
+
if (e === void 0 || !F(e)) {
|
|
221
|
+
if (Wr(t))
|
|
222
222
|
return t.defaultValue;
|
|
223
|
-
if (
|
|
223
|
+
if (r)
|
|
224
224
|
return;
|
|
225
225
|
throw new ie();
|
|
226
226
|
}
|
|
227
227
|
if (t === String)
|
|
228
|
-
return
|
|
228
|
+
return Or.get(e, q);
|
|
229
229
|
if (t === Boolean)
|
|
230
|
-
return
|
|
230
|
+
return xt.get(e, q);
|
|
231
231
|
if (t === Number)
|
|
232
|
-
return
|
|
232
|
+
return Ut.get(e, q);
|
|
233
233
|
if (t === Date)
|
|
234
|
-
return
|
|
234
|
+
return Lt.get(e, q);
|
|
235
235
|
if (t === JSON)
|
|
236
|
-
return
|
|
237
|
-
if (
|
|
238
|
-
return t(e,
|
|
239
|
-
if (
|
|
240
|
-
return t.get(e,
|
|
236
|
+
return Ct.get(e, q);
|
|
237
|
+
if (Mr(t))
|
|
238
|
+
return t(e, q);
|
|
239
|
+
if (Ue(t))
|
|
240
|
+
return t.get(e, q);
|
|
241
241
|
if (t instanceof RegExp) {
|
|
242
242
|
if (t.test(e))
|
|
243
243
|
return e;
|
|
@@ -245,50 +245,50 @@ function fe(e, t, n = !1) {
|
|
|
245
245
|
}
|
|
246
246
|
return e;
|
|
247
247
|
}
|
|
248
|
-
function le(e, t,
|
|
248
|
+
function le(e, t, r = !1) {
|
|
249
249
|
if (e === void 0) {
|
|
250
|
-
if (
|
|
250
|
+
if (r)
|
|
251
251
|
return "";
|
|
252
252
|
throw new ie();
|
|
253
253
|
}
|
|
254
254
|
if (t === Boolean)
|
|
255
|
-
return
|
|
255
|
+
return xt.set(e, q);
|
|
256
256
|
if (t === Number)
|
|
257
|
-
return
|
|
257
|
+
return Ut.set(e, q);
|
|
258
258
|
if (t === Date)
|
|
259
|
-
return
|
|
259
|
+
return Lt.set(e, q);
|
|
260
260
|
if (t === JSON)
|
|
261
|
-
return
|
|
262
|
-
if (
|
|
263
|
-
return t.set(e,
|
|
261
|
+
return Ct.set(e, q);
|
|
262
|
+
if (Ue(t))
|
|
263
|
+
return t.set(e, q);
|
|
264
264
|
try {
|
|
265
265
|
return e.toString();
|
|
266
266
|
} catch {
|
|
267
267
|
throw new ie();
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
271
|
-
return
|
|
272
|
-
get: (
|
|
273
|
-
set: (
|
|
270
|
+
function Tr(e, t) {
|
|
271
|
+
return Ue(e) ? { ...e, defaultValue: t ?? e.defaultValue } : {
|
|
272
|
+
get: (r) => fe(r, e),
|
|
273
|
+
set: (r) => le(r, e),
|
|
274
274
|
defaultValue: t
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
function G() {
|
|
278
278
|
return G = Object.assign ? Object.assign.bind() : function(e) {
|
|
279
279
|
for (var t = 1; t < arguments.length; t++) {
|
|
280
|
-
var
|
|
281
|
-
for (var
|
|
282
|
-
Object.prototype.hasOwnProperty.call(
|
|
280
|
+
var r = arguments[t];
|
|
281
|
+
for (var n in r)
|
|
282
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
283
283
|
}
|
|
284
284
|
return e;
|
|
285
285
|
}, G.apply(this, arguments);
|
|
286
286
|
}
|
|
287
|
-
var
|
|
287
|
+
var V;
|
|
288
288
|
(function(e) {
|
|
289
289
|
e.Pop = "POP", e.Push = "PUSH", e.Replace = "REPLACE";
|
|
290
|
-
})(
|
|
291
|
-
var
|
|
290
|
+
})(V || (V = {}));
|
|
291
|
+
var re = process.env.NODE_ENV !== "production" ? function(e) {
|
|
292
292
|
return Object.freeze(e);
|
|
293
293
|
} : function(e) {
|
|
294
294
|
return e;
|
|
@@ -302,36 +302,36 @@ function Y(e, t) {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
var
|
|
306
|
-
function
|
|
305
|
+
var Re = "beforeunload", Ir = "hashchange", Bt = "popstate";
|
|
306
|
+
function st(e) {
|
|
307
307
|
e === void 0 && (e = {});
|
|
308
|
-
var t = e,
|
|
308
|
+
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
309
309
|
function a() {
|
|
310
|
-
var g =
|
|
311
|
-
return [
|
|
310
|
+
var g = n.location, l = g.pathname, y = g.search, S = g.hash, A = o.state || {};
|
|
311
|
+
return [A.idx, re({
|
|
312
312
|
pathname: l,
|
|
313
313
|
search: y,
|
|
314
314
|
hash: S,
|
|
315
|
-
state:
|
|
316
|
-
key:
|
|
315
|
+
state: A.usr || null,
|
|
316
|
+
key: A.key || "default"
|
|
317
317
|
})];
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
321
|
-
if (
|
|
322
|
-
|
|
319
|
+
var s = null;
|
|
320
|
+
function c() {
|
|
321
|
+
if (s)
|
|
322
|
+
p.call(s), s = null;
|
|
323
323
|
else {
|
|
324
|
-
var g =
|
|
325
|
-
if (
|
|
324
|
+
var g = V.Pop, l = a(), y = l[0], S = l[1];
|
|
325
|
+
if (p.length)
|
|
326
326
|
if (y != null) {
|
|
327
|
-
var
|
|
328
|
-
|
|
327
|
+
var A = f - y;
|
|
328
|
+
A && (s = {
|
|
329
329
|
action: g,
|
|
330
330
|
location: S,
|
|
331
331
|
retry: function() {
|
|
332
|
-
|
|
332
|
+
x(A * -1);
|
|
333
333
|
}
|
|
334
|
-
},
|
|
334
|
+
}, x(A));
|
|
335
335
|
} else
|
|
336
336
|
process.env.NODE_ENV !== "production" && Y(
|
|
337
337
|
!1,
|
|
@@ -341,135 +341,135 @@ function rt(e) {
|
|
|
341
341
|
"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."
|
|
342
342
|
);
|
|
343
343
|
else
|
|
344
|
-
|
|
344
|
+
k(g);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
|
|
348
|
-
var
|
|
347
|
+
n.addEventListener(Bt, c);
|
|
348
|
+
var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
|
|
349
349
|
f == null && (f = 0, o.replaceState(G({}, o.state, {
|
|
350
350
|
idx: f
|
|
351
351
|
}), ""));
|
|
352
|
-
function
|
|
352
|
+
function h(g) {
|
|
353
353
|
return typeof g == "string" ? g : X(g);
|
|
354
354
|
}
|
|
355
355
|
function v(g, l) {
|
|
356
|
-
return l === void 0 && (l = null),
|
|
357
|
-
pathname:
|
|
356
|
+
return l === void 0 && (l = null), re(G({
|
|
357
|
+
pathname: d.pathname,
|
|
358
358
|
hash: "",
|
|
359
359
|
search: ""
|
|
360
360
|
}, typeof g == "string" ? he(g) : g, {
|
|
361
361
|
state: l,
|
|
362
|
-
key:
|
|
362
|
+
key: Pe()
|
|
363
363
|
}));
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function R(g, l) {
|
|
366
366
|
return [{
|
|
367
367
|
usr: g.state,
|
|
368
368
|
key: g.key,
|
|
369
369
|
idx: l
|
|
370
|
-
},
|
|
370
|
+
}, h(g)];
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
return !
|
|
372
|
+
function E(g, l, y) {
|
|
373
|
+
return !p.length || (p.call({
|
|
374
374
|
action: g,
|
|
375
375
|
location: l,
|
|
376
376
|
retry: y
|
|
377
377
|
}), !1);
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
|
|
379
|
+
function k(g) {
|
|
380
|
+
i = g;
|
|
381
381
|
var l = a();
|
|
382
|
-
f = l[0],
|
|
383
|
-
action:
|
|
384
|
-
location:
|
|
382
|
+
f = l[0], d = l[1], P.call({
|
|
383
|
+
action: i,
|
|
384
|
+
location: d
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
var y =
|
|
389
|
-
function
|
|
390
|
-
|
|
387
|
+
function m(g, l) {
|
|
388
|
+
var y = V.Push, S = v(g, l);
|
|
389
|
+
function A() {
|
|
390
|
+
m(g, l);
|
|
391
391
|
}
|
|
392
|
-
if (
|
|
393
|
-
var
|
|
392
|
+
if (E(y, S, A)) {
|
|
393
|
+
var C = R(S, f + 1), B = C[0], H = C[1];
|
|
394
394
|
try {
|
|
395
|
-
o.pushState(
|
|
395
|
+
o.pushState(B, "", H);
|
|
396
396
|
} catch {
|
|
397
|
-
|
|
397
|
+
n.location.assign(H);
|
|
398
398
|
}
|
|
399
|
-
|
|
399
|
+
k(y);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
var y =
|
|
404
|
-
function
|
|
405
|
-
|
|
402
|
+
function w(g, l) {
|
|
403
|
+
var y = V.Replace, S = v(g, l);
|
|
404
|
+
function A() {
|
|
405
|
+
w(g, l);
|
|
406
406
|
}
|
|
407
|
-
if (
|
|
408
|
-
var
|
|
409
|
-
o.replaceState(
|
|
407
|
+
if (E(y, S, A)) {
|
|
408
|
+
var C = R(S, f), B = C[0], H = C[1];
|
|
409
|
+
o.replaceState(B, "", H), k(y);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function x(g) {
|
|
413
413
|
o.go(g);
|
|
414
414
|
}
|
|
415
|
-
var
|
|
415
|
+
var U = {
|
|
416
416
|
get action() {
|
|
417
|
-
return
|
|
417
|
+
return i;
|
|
418
418
|
},
|
|
419
419
|
get location() {
|
|
420
|
-
return
|
|
420
|
+
return d;
|
|
421
421
|
},
|
|
422
|
-
createHref:
|
|
423
|
-
push:
|
|
424
|
-
replace:
|
|
425
|
-
go:
|
|
422
|
+
createHref: h,
|
|
423
|
+
push: m,
|
|
424
|
+
replace: w,
|
|
425
|
+
go: x,
|
|
426
426
|
back: function() {
|
|
427
|
-
|
|
427
|
+
x(-1);
|
|
428
428
|
},
|
|
429
429
|
forward: function() {
|
|
430
|
-
|
|
430
|
+
x(1);
|
|
431
431
|
},
|
|
432
432
|
listen: function(l) {
|
|
433
433
|
return P.push(l);
|
|
434
434
|
},
|
|
435
435
|
block: function(l) {
|
|
436
|
-
var y =
|
|
437
|
-
return
|
|
438
|
-
y(),
|
|
436
|
+
var y = p.push(l);
|
|
437
|
+
return p.length === 1 && n.addEventListener(Re, we), function() {
|
|
438
|
+
y(), p.length || n.removeEventListener(Re, we);
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
|
-
return
|
|
442
|
+
return U;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Fr(e) {
|
|
445
445
|
e === void 0 && (e = {});
|
|
446
|
-
var t = e,
|
|
446
|
+
var t = e, r = t.window, n = r === void 0 ? document.defaultView : r, o = n.history;
|
|
447
447
|
function a() {
|
|
448
|
-
var l = he(
|
|
449
|
-
return [
|
|
448
|
+
var l = he(n.location.hash.substr(1)), y = l.pathname, S = y === void 0 ? "/" : y, A = l.search, C = A === void 0 ? "" : A, B = l.hash, H = B === void 0 ? "" : B, M = o.state || {};
|
|
449
|
+
return [M.idx, re({
|
|
450
450
|
pathname: S,
|
|
451
|
-
search:
|
|
452
|
-
hash:
|
|
453
|
-
state:
|
|
454
|
-
key:
|
|
451
|
+
search: C,
|
|
452
|
+
hash: H,
|
|
453
|
+
state: M.usr || null,
|
|
454
|
+
key: M.key || "default"
|
|
455
455
|
})];
|
|
456
456
|
}
|
|
457
|
-
var
|
|
458
|
-
function
|
|
459
|
-
if (
|
|
460
|
-
|
|
457
|
+
var s = null;
|
|
458
|
+
function c() {
|
|
459
|
+
if (s)
|
|
460
|
+
p.call(s), s = null;
|
|
461
461
|
else {
|
|
462
|
-
var l =
|
|
463
|
-
if (
|
|
462
|
+
var l = V.Pop, y = a(), S = y[0], A = y[1];
|
|
463
|
+
if (p.length)
|
|
464
464
|
if (S != null) {
|
|
465
|
-
var
|
|
466
|
-
|
|
465
|
+
var C = f - S;
|
|
466
|
+
C && (s = {
|
|
467
467
|
action: l,
|
|
468
|
-
location:
|
|
468
|
+
location: A,
|
|
469
469
|
retry: function() {
|
|
470
|
-
|
|
470
|
+
U(C * -1);
|
|
471
471
|
}
|
|
472
|
-
},
|
|
472
|
+
}, U(C));
|
|
473
473
|
} else
|
|
474
474
|
process.env.NODE_ENV !== "production" && Y(
|
|
475
475
|
!1,
|
|
@@ -479,540 +479,540 @@ function Fn(e) {
|
|
|
479
479
|
"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."
|
|
480
480
|
);
|
|
481
481
|
else
|
|
482
|
-
|
|
482
|
+
m(l);
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
n.addEventListener(Bt, c), n.addEventListener(Ir, function() {
|
|
486
486
|
var l = a(), y = l[1];
|
|
487
|
-
X(y) !== X(
|
|
487
|
+
X(y) !== X(d) && c();
|
|
488
488
|
});
|
|
489
|
-
var
|
|
489
|
+
var i = V.Pop, u = a(), f = u[0], d = u[1], P = ne(), p = ne();
|
|
490
490
|
f == null && (f = 0, o.replaceState(G({}, o.state, {
|
|
491
491
|
idx: f
|
|
492
492
|
}), ""));
|
|
493
|
-
function
|
|
493
|
+
function h() {
|
|
494
494
|
var l = document.querySelector("base"), y = "";
|
|
495
495
|
if (l && l.getAttribute("href")) {
|
|
496
|
-
var S =
|
|
497
|
-
y =
|
|
496
|
+
var S = n.location.href, A = S.indexOf("#");
|
|
497
|
+
y = A === -1 ? S : S.slice(0, A);
|
|
498
498
|
}
|
|
499
499
|
return y;
|
|
500
500
|
}
|
|
501
501
|
function v(l) {
|
|
502
|
-
return
|
|
502
|
+
return h() + "#" + (typeof l == "string" ? l : X(l));
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
return y === void 0 && (y = null),
|
|
506
|
-
pathname:
|
|
504
|
+
function R(l, y) {
|
|
505
|
+
return y === void 0 && (y = null), re(G({
|
|
506
|
+
pathname: d.pathname,
|
|
507
507
|
hash: "",
|
|
508
508
|
search: ""
|
|
509
509
|
}, typeof l == "string" ? he(l) : l, {
|
|
510
510
|
state: y,
|
|
511
|
-
key:
|
|
511
|
+
key: Pe()
|
|
512
512
|
}));
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function E(l, y) {
|
|
515
515
|
return [{
|
|
516
516
|
usr: l.state,
|
|
517
517
|
key: l.key,
|
|
518
518
|
idx: y
|
|
519
519
|
}, v(l)];
|
|
520
520
|
}
|
|
521
|
-
function
|
|
522
|
-
return !
|
|
521
|
+
function k(l, y, S) {
|
|
522
|
+
return !p.length || (p.call({
|
|
523
523
|
action: l,
|
|
524
524
|
location: y,
|
|
525
525
|
retry: S
|
|
526
526
|
}), !1);
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
528
|
+
function m(l) {
|
|
529
|
+
i = l;
|
|
530
530
|
var y = a();
|
|
531
|
-
f = y[0],
|
|
532
|
-
action:
|
|
533
|
-
location:
|
|
531
|
+
f = y[0], d = y[1], P.call({
|
|
532
|
+
action: i,
|
|
533
|
+
location: d
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
var S =
|
|
538
|
-
function
|
|
539
|
-
|
|
536
|
+
function w(l, y) {
|
|
537
|
+
var S = V.Push, A = R(l, y);
|
|
538
|
+
function C() {
|
|
539
|
+
w(l, y);
|
|
540
540
|
}
|
|
541
|
-
if (process.env.NODE_ENV !== "production" && Y(
|
|
542
|
-
var
|
|
541
|
+
if (process.env.NODE_ENV !== "production" && Y(A.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.push(" + JSON.stringify(l) + ")"), k(S, A, C)) {
|
|
542
|
+
var B = E(A, f + 1), H = B[0], M = B[1];
|
|
543
543
|
try {
|
|
544
|
-
o.pushState(
|
|
544
|
+
o.pushState(H, "", M);
|
|
545
545
|
} catch {
|
|
546
|
-
|
|
546
|
+
n.location.assign(M);
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
m(S);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
var S =
|
|
553
|
-
function
|
|
554
|
-
|
|
551
|
+
function x(l, y) {
|
|
552
|
+
var S = V.Replace, A = R(l, y);
|
|
553
|
+
function C() {
|
|
554
|
+
x(l, y);
|
|
555
555
|
}
|
|
556
|
-
if (process.env.NODE_ENV !== "production" && Y(
|
|
557
|
-
var
|
|
558
|
-
o.replaceState(
|
|
556
|
+
if (process.env.NODE_ENV !== "production" && Y(A.pathname.charAt(0) === "/", "Relative pathnames are not supported in hash history.replace(" + JSON.stringify(l) + ")"), k(S, A, C)) {
|
|
557
|
+
var B = E(A, f), H = B[0], M = B[1];
|
|
558
|
+
o.replaceState(H, "", M), m(S);
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function U(l) {
|
|
562
562
|
o.go(l);
|
|
563
563
|
}
|
|
564
564
|
var g = {
|
|
565
565
|
get action() {
|
|
566
|
-
return
|
|
566
|
+
return i;
|
|
567
567
|
},
|
|
568
568
|
get location() {
|
|
569
|
-
return
|
|
569
|
+
return d;
|
|
570
570
|
},
|
|
571
571
|
createHref: v,
|
|
572
|
-
push:
|
|
573
|
-
replace:
|
|
574
|
-
go:
|
|
572
|
+
push: w,
|
|
573
|
+
replace: x,
|
|
574
|
+
go: U,
|
|
575
575
|
back: function() {
|
|
576
|
-
|
|
576
|
+
U(-1);
|
|
577
577
|
},
|
|
578
578
|
forward: function() {
|
|
579
|
-
|
|
579
|
+
U(1);
|
|
580
580
|
},
|
|
581
581
|
listen: function(y) {
|
|
582
582
|
return P.push(y);
|
|
583
583
|
},
|
|
584
584
|
block: function(y) {
|
|
585
|
-
var S =
|
|
586
|
-
return
|
|
587
|
-
S(),
|
|
585
|
+
var S = p.push(y);
|
|
586
|
+
return p.length === 1 && n.addEventListener(Re, we), function() {
|
|
587
|
+
S(), p.length || n.removeEventListener(Re, we);
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
591
|
return g;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function ct(e) {
|
|
594
594
|
e === void 0 && (e = {});
|
|
595
|
-
var t = e,
|
|
596
|
-
var
|
|
595
|
+
var t = e, r = t.initialEntries, n = r === void 0 ? ["/"] : r, o = t.initialIndex, a = n.map(function(m) {
|
|
596
|
+
var w = re(G({
|
|
597
597
|
pathname: "/",
|
|
598
598
|
search: "",
|
|
599
599
|
hash: "",
|
|
600
600
|
state: null,
|
|
601
|
-
key:
|
|
602
|
-
}, typeof
|
|
603
|
-
return process.env.NODE_ENV !== "production" && Y(
|
|
604
|
-
}),
|
|
605
|
-
function
|
|
606
|
-
return typeof
|
|
607
|
-
}
|
|
608
|
-
function P(
|
|
609
|
-
return
|
|
610
|
-
pathname:
|
|
601
|
+
key: Pe()
|
|
602
|
+
}, typeof m == "string" ? he(m) : m));
|
|
603
|
+
return process.env.NODE_ENV !== "production" && Y(w.pathname.charAt(0) === "/", "Relative pathnames are not supported in createMemoryHistory({ initialEntries }) (invalid entry: " + JSON.stringify(m) + ")"), w;
|
|
604
|
+
}), s = ut(o ?? a.length - 1, 0, a.length - 1), c = V.Pop, i = a[s], u = ne(), f = ne();
|
|
605
|
+
function d(m) {
|
|
606
|
+
return typeof m == "string" ? m : X(m);
|
|
607
|
+
}
|
|
608
|
+
function P(m, w) {
|
|
609
|
+
return w === void 0 && (w = null), re(G({
|
|
610
|
+
pathname: i.pathname,
|
|
611
611
|
search: "",
|
|
612
612
|
hash: ""
|
|
613
|
-
}, typeof
|
|
614
|
-
state:
|
|
615
|
-
key:
|
|
613
|
+
}, typeof m == "string" ? he(m) : m, {
|
|
614
|
+
state: w,
|
|
615
|
+
key: Pe()
|
|
616
616
|
}));
|
|
617
617
|
}
|
|
618
|
-
function
|
|
618
|
+
function p(m, w, x) {
|
|
619
619
|
return !f.length || (f.call({
|
|
620
|
-
action:
|
|
621
|
-
location:
|
|
622
|
-
retry:
|
|
620
|
+
action: m,
|
|
621
|
+
location: w,
|
|
622
|
+
retry: x
|
|
623
623
|
}), !1);
|
|
624
624
|
}
|
|
625
|
-
function m
|
|
626
|
-
|
|
627
|
-
action:
|
|
628
|
-
location:
|
|
625
|
+
function h(m, w) {
|
|
626
|
+
c = m, i = w, u.call({
|
|
627
|
+
action: c,
|
|
628
|
+
location: i
|
|
629
629
|
});
|
|
630
630
|
}
|
|
631
|
-
function v(
|
|
632
|
-
var
|
|
631
|
+
function v(m, w) {
|
|
632
|
+
var x = V.Push, U = P(m, w);
|
|
633
633
|
function g() {
|
|
634
|
-
v(
|
|
634
|
+
v(m, w);
|
|
635
635
|
}
|
|
636
|
-
process.env.NODE_ENV !== "production" && Y(
|
|
636
|
+
process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.push(" + JSON.stringify(m) + ")"), p(x, U, g) && (s += 1, a.splice(s, a.length, U), h(x, U));
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
var
|
|
638
|
+
function R(m, w) {
|
|
639
|
+
var x = V.Replace, U = P(m, w);
|
|
640
640
|
function g() {
|
|
641
|
-
|
|
641
|
+
R(m, w);
|
|
642
642
|
}
|
|
643
|
-
process.env.NODE_ENV !== "production" && Y(
|
|
643
|
+
process.env.NODE_ENV !== "production" && Y(i.pathname.charAt(0) === "/", "Relative pathnames are not supported in memory history.replace(" + JSON.stringify(m) + ")"), p(x, U, g) && (a[s] = U, h(x, U));
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
var
|
|
645
|
+
function E(m) {
|
|
646
|
+
var w = ut(s + m, 0, a.length - 1), x = V.Pop, U = a[w];
|
|
647
647
|
function g() {
|
|
648
|
-
|
|
648
|
+
E(m);
|
|
649
649
|
}
|
|
650
|
-
|
|
650
|
+
p(x, U, g) && (s = w, h(x, U));
|
|
651
651
|
}
|
|
652
|
-
var
|
|
652
|
+
var k = {
|
|
653
653
|
get index() {
|
|
654
|
-
return
|
|
654
|
+
return s;
|
|
655
655
|
},
|
|
656
656
|
get action() {
|
|
657
|
-
return
|
|
657
|
+
return c;
|
|
658
658
|
},
|
|
659
659
|
get location() {
|
|
660
|
-
return
|
|
660
|
+
return i;
|
|
661
661
|
},
|
|
662
|
-
createHref:
|
|
662
|
+
createHref: d,
|
|
663
663
|
push: v,
|
|
664
|
-
replace:
|
|
665
|
-
go:
|
|
664
|
+
replace: R,
|
|
665
|
+
go: E,
|
|
666
666
|
back: function() {
|
|
667
|
-
|
|
667
|
+
E(-1);
|
|
668
668
|
},
|
|
669
669
|
forward: function() {
|
|
670
|
-
|
|
670
|
+
E(1);
|
|
671
671
|
},
|
|
672
|
-
listen: function(
|
|
673
|
-
return
|
|
672
|
+
listen: function(w) {
|
|
673
|
+
return u.push(w);
|
|
674
674
|
},
|
|
675
|
-
block: function(
|
|
676
|
-
return f.push(
|
|
675
|
+
block: function(w) {
|
|
676
|
+
return f.push(w);
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
|
-
return
|
|
679
|
+
return k;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
return Math.min(Math.max(e, t),
|
|
681
|
+
function ut(e, t, r) {
|
|
682
|
+
return Math.min(Math.max(e, t), r);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function we(e) {
|
|
685
685
|
e.preventDefault(), e.returnValue = "";
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function ne() {
|
|
688
688
|
var e = [];
|
|
689
689
|
return {
|
|
690
690
|
get length() {
|
|
691
691
|
return e.length;
|
|
692
692
|
},
|
|
693
|
-
push: function(
|
|
694
|
-
return e.push(
|
|
695
|
-
e = e.filter(function(
|
|
696
|
-
return
|
|
693
|
+
push: function(r) {
|
|
694
|
+
return e.push(r), function() {
|
|
695
|
+
e = e.filter(function(n) {
|
|
696
|
+
return n !== r;
|
|
697
697
|
});
|
|
698
698
|
};
|
|
699
699
|
},
|
|
700
|
-
call: function(
|
|
701
|
-
e.forEach(function(
|
|
702
|
-
return
|
|
700
|
+
call: function(r) {
|
|
701
|
+
e.forEach(function(n) {
|
|
702
|
+
return n && n(r);
|
|
703
703
|
});
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
707
|
+
function Pe() {
|
|
708
708
|
return Math.random().toString(36).substr(2, 8);
|
|
709
709
|
}
|
|
710
710
|
function X(e) {
|
|
711
|
-
var t = e.pathname,
|
|
712
|
-
return o && o !== "?" && (
|
|
711
|
+
var t = e.pathname, r = t === void 0 ? "/" : t, n = e.search, o = n === void 0 ? "" : n, a = e.hash, s = a === void 0 ? "" : a;
|
|
712
|
+
return o && o !== "?" && (r += o.charAt(0) === "?" ? o : "?" + o), s && s !== "#" && (r += s.charAt(0) === "#" ? s : "#" + s), r;
|
|
713
713
|
}
|
|
714
714
|
function he(e) {
|
|
715
715
|
var t = {};
|
|
716
716
|
if (e) {
|
|
717
|
-
var
|
|
718
|
-
|
|
719
|
-
var
|
|
720
|
-
|
|
717
|
+
var r = e.indexOf("#");
|
|
718
|
+
r >= 0 && (t.hash = e.substr(r), e = e.substr(0, r));
|
|
719
|
+
var n = e.indexOf("?");
|
|
720
|
+
n >= 0 && (t.search = e.substr(n), e = e.substr(0, n)), e && (t.pathname = e);
|
|
721
721
|
}
|
|
722
722
|
return t;
|
|
723
723
|
}
|
|
724
|
-
const
|
|
725
|
-
function
|
|
726
|
-
const e = ae(
|
|
724
|
+
const Nt = Symbol();
|
|
725
|
+
function Jr() {
|
|
726
|
+
const e = ae(Nt);
|
|
727
727
|
if (!e)
|
|
728
728
|
throw new pe();
|
|
729
729
|
return e;
|
|
730
730
|
}
|
|
731
|
-
const
|
|
732
|
-
function
|
|
733
|
-
return typeof e == "object" && e !== null &&
|
|
731
|
+
const Vt = Symbol("isRouterRouteSymbol");
|
|
732
|
+
function Qr(e) {
|
|
733
|
+
return typeof e == "object" && e !== null && Vt in e;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
736
|
-
function
|
|
737
|
-
if (typeof
|
|
738
|
-
const
|
|
735
|
+
function zr(e, t) {
|
|
736
|
+
function r(R, E, k) {
|
|
737
|
+
if (typeof R == "object") {
|
|
738
|
+
const w = {
|
|
739
739
|
...e.params,
|
|
740
|
-
...
|
|
740
|
+
...R
|
|
741
741
|
};
|
|
742
|
-
return t(e.name,
|
|
742
|
+
return t(e.name, w, E);
|
|
743
743
|
}
|
|
744
|
-
const
|
|
744
|
+
const m = {
|
|
745
745
|
...e.params,
|
|
746
|
-
[
|
|
746
|
+
[R]: E
|
|
747
747
|
};
|
|
748
|
-
return t(e.name,
|
|
749
|
-
}
|
|
750
|
-
const
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
}, o = (...
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
}, a = (...
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
}, { id:
|
|
748
|
+
return t(e.name, m, k);
|
|
749
|
+
}
|
|
750
|
+
const n = (...R) => {
|
|
751
|
+
const E = new URLSearchParams(e.query);
|
|
752
|
+
E.set(...R), r({}, { query: E });
|
|
753
|
+
}, o = (...R) => {
|
|
754
|
+
const E = new URLSearchParams(e.query);
|
|
755
|
+
E.append(...R), r({}, { query: E });
|
|
756
|
+
}, a = (...R) => {
|
|
757
|
+
const E = new URLSearchParams(e.query);
|
|
758
|
+
E.delete(...R), r({}, { query: E });
|
|
759
|
+
}, { id: s, matched: c, matches: i, name: u, hash: f, href: d } = pr(e), P = N({
|
|
760
760
|
get() {
|
|
761
761
|
return new Proxy(e.params, {
|
|
762
|
-
set(
|
|
763
|
-
return
|
|
762
|
+
set(R, E, k) {
|
|
763
|
+
return r(E, k), !0;
|
|
764
764
|
}
|
|
765
765
|
});
|
|
766
766
|
},
|
|
767
|
-
set(
|
|
768
|
-
|
|
767
|
+
set(R) {
|
|
768
|
+
r(R);
|
|
769
769
|
}
|
|
770
|
-
}),
|
|
770
|
+
}), p = N({
|
|
771
771
|
get() {
|
|
772
772
|
return new Proxy(e.query, {
|
|
773
|
-
get(
|
|
774
|
-
switch (
|
|
773
|
+
get(R, E, k) {
|
|
774
|
+
switch (E) {
|
|
775
775
|
case "append":
|
|
776
776
|
return o;
|
|
777
777
|
case "set":
|
|
778
|
-
return
|
|
778
|
+
return n;
|
|
779
779
|
case "delete":
|
|
780
780
|
return a;
|
|
781
781
|
default:
|
|
782
|
-
return Reflect.get(
|
|
782
|
+
return Reflect.get(R, E, k);
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
786
|
},
|
|
787
|
-
set(
|
|
788
|
-
|
|
787
|
+
set(R) {
|
|
788
|
+
r({}, { query: R });
|
|
789
789
|
}
|
|
790
|
-
}),
|
|
790
|
+
}), h = N({
|
|
791
791
|
get() {
|
|
792
792
|
return new Proxy(e.state, {
|
|
793
|
-
set(
|
|
794
|
-
return
|
|
793
|
+
set(R, E, k) {
|
|
794
|
+
return r({}, { state: { ...e.state, [E]: k } }), !0;
|
|
795
795
|
}
|
|
796
796
|
});
|
|
797
797
|
},
|
|
798
|
-
set(
|
|
799
|
-
|
|
798
|
+
set(R) {
|
|
799
|
+
r({}, { state: R });
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
|
-
return
|
|
803
|
-
id:
|
|
804
|
-
matched:
|
|
805
|
-
matches:
|
|
806
|
-
state:
|
|
807
|
-
query:
|
|
802
|
+
return xe({
|
|
803
|
+
id: s,
|
|
804
|
+
matched: c,
|
|
805
|
+
matches: i,
|
|
806
|
+
state: h,
|
|
807
|
+
query: p,
|
|
808
808
|
hash: f,
|
|
809
809
|
params: P,
|
|
810
|
-
name:
|
|
811
|
-
href:
|
|
812
|
-
update:
|
|
813
|
-
[
|
|
810
|
+
name: u,
|
|
811
|
+
href: d,
|
|
812
|
+
update: r,
|
|
813
|
+
[Vt]: !0
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
const
|
|
819
|
-
Object.assign(
|
|
820
|
-
[
|
|
821
|
-
...
|
|
816
|
+
const Ht = Symbol();
|
|
817
|
+
function Gr(e, t) {
|
|
818
|
+
const r = xe({ ...e }), n = (s) => {
|
|
819
|
+
Object.assign(r, {
|
|
820
|
+
[Ht]: !1,
|
|
821
|
+
...s
|
|
822
822
|
});
|
|
823
|
-
}, o =
|
|
823
|
+
}, o = r, a = zr(o, t);
|
|
824
824
|
return {
|
|
825
825
|
currentRoute: o,
|
|
826
826
|
routerRoute: a,
|
|
827
|
-
updateRoute:
|
|
827
|
+
updateRoute: n
|
|
828
828
|
};
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
return !e.startsWith("http") ?
|
|
830
|
+
function _(e) {
|
|
831
|
+
return !e.startsWith("http") ? Yr(e) : Kr(e);
|
|
832
832
|
}
|
|
833
|
-
function
|
|
834
|
-
const { protocol: t, host:
|
|
833
|
+
function Kr(e) {
|
|
834
|
+
const { protocol: t, host: r, pathname: n, search: o, searchParams: a, hash: s } = new URL(e, e);
|
|
835
835
|
return {
|
|
836
836
|
protocol: t,
|
|
837
|
-
host:
|
|
838
|
-
pathname:
|
|
837
|
+
host: r,
|
|
838
|
+
pathname: n,
|
|
839
839
|
search: o,
|
|
840
840
|
searchParams: a,
|
|
841
|
-
hash:
|
|
841
|
+
hash: s
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
function
|
|
845
|
-
const { pathname: t, search:
|
|
844
|
+
function Yr(e) {
|
|
845
|
+
const { pathname: t, search: r, searchParams: n, hash: o } = new URL(e, "https://localhost");
|
|
846
846
|
return {
|
|
847
847
|
pathname: t,
|
|
848
|
-
search:
|
|
849
|
-
searchParams:
|
|
848
|
+
search: r,
|
|
849
|
+
searchParams: n,
|
|
850
850
|
hash: o
|
|
851
851
|
};
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Xr(e) {
|
|
854
854
|
return (t) => {
|
|
855
|
-
const { host:
|
|
856
|
-
return !(
|
|
855
|
+
const { host: r } = _(t);
|
|
856
|
+
return !(r === void 0 || r === e);
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
const
|
|
861
|
-
if (
|
|
862
|
-
|
|
859
|
+
function Zr({ mode: e, listener: t }) {
|
|
860
|
+
const r = en(e), n = (i, u) => {
|
|
861
|
+
if (u != null && u.replace) {
|
|
862
|
+
r.replace(i, u.state);
|
|
863
863
|
return;
|
|
864
864
|
}
|
|
865
|
-
|
|
865
|
+
r.push(i, u == null ? void 0 : u.state);
|
|
866
866
|
}, o = () => {
|
|
867
|
-
const
|
|
868
|
-
|
|
867
|
+
const i = X(r.location);
|
|
868
|
+
r.replace(i);
|
|
869
869
|
};
|
|
870
870
|
let a;
|
|
871
871
|
return {
|
|
872
|
-
...
|
|
873
|
-
update:
|
|
872
|
+
...r,
|
|
873
|
+
update: n,
|
|
874
874
|
refresh: o,
|
|
875
875
|
startListening: () => {
|
|
876
|
-
a == null || a(), a =
|
|
876
|
+
a == null || a(), a = r.listen(t);
|
|
877
877
|
},
|
|
878
878
|
stopListening: () => {
|
|
879
879
|
a == null || a();
|
|
880
880
|
}
|
|
881
881
|
};
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function en(e = "auto") {
|
|
884
884
|
switch (e) {
|
|
885
885
|
case "auto":
|
|
886
|
-
return De() ?
|
|
886
|
+
return De() ? st() : ct();
|
|
887
887
|
case "browser":
|
|
888
|
-
return
|
|
888
|
+
return st();
|
|
889
889
|
case "memory":
|
|
890
|
-
return
|
|
890
|
+
return ct();
|
|
891
891
|
case "hash":
|
|
892
|
-
return
|
|
892
|
+
return Fr();
|
|
893
893
|
default:
|
|
894
894
|
const t = e;
|
|
895
895
|
throw new Error(`Switch is not exhaustive for mode: ${t}`);
|
|
896
896
|
}
|
|
897
897
|
}
|
|
898
|
-
class
|
|
898
|
+
class Ee {
|
|
899
899
|
constructor() {
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
900
|
+
T(this, "onBeforeRouteEnter", /* @__PURE__ */ new Set());
|
|
901
|
+
T(this, "onBeforeRouteUpdate", /* @__PURE__ */ new Set());
|
|
902
|
+
T(this, "onBeforeRouteLeave", /* @__PURE__ */ new Set());
|
|
903
|
+
T(this, "onAfterRouteEnter", /* @__PURE__ */ new Set());
|
|
904
|
+
T(this, "onAfterRouteUpdate", /* @__PURE__ */ new Set());
|
|
905
|
+
T(this, "onAfterRouteLeave", /* @__PURE__ */ new Set());
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
class
|
|
908
|
+
class jt extends Error {
|
|
909
909
|
constructor() {
|
|
910
910
|
super("Uncaught CallbackContextAbortError");
|
|
911
|
-
|
|
911
|
+
T(this, "response");
|
|
912
912
|
this.response = { status: "ABORT" };
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
915
|
class te extends Error {
|
|
916
|
-
constructor(
|
|
916
|
+
constructor(r) {
|
|
917
917
|
super("Uncaught CallbackContextPushError");
|
|
918
|
-
|
|
919
|
-
this.response = { status: "PUSH", to:
|
|
918
|
+
T(this, "response");
|
|
919
|
+
this.response = { status: "PUSH", to: r };
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
|
-
class
|
|
923
|
-
constructor(
|
|
922
|
+
class be extends Error {
|
|
923
|
+
constructor(r) {
|
|
924
924
|
super("Uncaught CallbackContextRejectionError");
|
|
925
|
-
|
|
926
|
-
this.response = { status: "REJECT", type:
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
function
|
|
930
|
-
const
|
|
931
|
-
return e.matches.forEach((
|
|
932
|
-
|
|
933
|
-
}), t.matches.forEach((
|
|
934
|
-
|
|
935
|
-
}),
|
|
936
|
-
}
|
|
937
|
-
function
|
|
938
|
-
const
|
|
939
|
-
return e.matches.forEach((
|
|
940
|
-
|
|
941
|
-
}), t.matches.forEach((
|
|
942
|
-
|
|
943
|
-
}),
|
|
944
|
-
}
|
|
945
|
-
function
|
|
925
|
+
T(this, "response");
|
|
926
|
+
this.response = { status: "REJECT", type: r };
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
function tn(e, t) {
|
|
930
|
+
const r = new Ee();
|
|
931
|
+
return e.matches.forEach((n, o) => {
|
|
932
|
+
n.onBeforeRouteEnter && Oe(e, t, o) && ee(n.onBeforeRouteEnter).forEach((a) => r.onBeforeRouteEnter.add(a)), n.onBeforeRouteUpdate && Ie(e, t, o) && ee(n.onBeforeRouteUpdate).forEach((a) => r.onBeforeRouteUpdate.add(a));
|
|
933
|
+
}), t.matches.forEach((n, o) => {
|
|
934
|
+
n.onBeforeRouteLeave && Te(e, t, o) && ee(n.onBeforeRouteLeave).forEach((a) => r.onBeforeRouteLeave.add(a));
|
|
935
|
+
}), r;
|
|
936
|
+
}
|
|
937
|
+
function rn(e, t) {
|
|
938
|
+
const r = new Ee();
|
|
939
|
+
return e.matches.forEach((n, o) => {
|
|
940
|
+
n.onAfterRouteEnter && Oe(e, t, o) && ee(n.onAfterRouteEnter).forEach((a) => r.onAfterRouteEnter.add(a)), n.onAfterRouteUpdate && Ie(e, t, o) && ee(n.onAfterRouteUpdate).forEach((a) => r.onAfterRouteUpdate.add(a));
|
|
941
|
+
}), t.matches.forEach((n, o) => {
|
|
942
|
+
n.onAfterRouteLeave && Te(e, t, o) && ee(n.onAfterRouteLeave).forEach((a) => r.onAfterRouteLeave.add(a));
|
|
943
|
+
}), r;
|
|
944
|
+
}
|
|
945
|
+
function $t() {
|
|
946
946
|
return { reject: (o) => {
|
|
947
|
-
throw new
|
|
947
|
+
throw new be(o);
|
|
948
948
|
}, push: (...o) => {
|
|
949
949
|
throw new te(o);
|
|
950
|
-
}, replace: (o, a,
|
|
950
|
+
}, replace: (o, a, s) => {
|
|
951
951
|
if (I(o)) {
|
|
952
|
-
const
|
|
953
|
-
throw new te([o, { ...
|
|
952
|
+
const u = a ?? {};
|
|
953
|
+
throw new te([o, { ...u, replace: !0 }]);
|
|
954
954
|
}
|
|
955
|
-
const
|
|
956
|
-
throw new te([o,
|
|
955
|
+
const c = a, i = s ?? {};
|
|
956
|
+
throw new te([o, c, { ...i, replace: !0 }]);
|
|
957
957
|
}, abort: () => {
|
|
958
|
-
throw new
|
|
958
|
+
throw new jt();
|
|
959
959
|
} };
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
const { reject: e, push: t, replace:
|
|
963
|
-
async function o({ to:
|
|
964
|
-
const { global:
|
|
965
|
-
...
|
|
966
|
-
...
|
|
967
|
-
...
|
|
968
|
-
...
|
|
961
|
+
function nn() {
|
|
962
|
+
const { reject: e, push: t, replace: r, abort: n } = $t();
|
|
963
|
+
async function o({ to: s, from: c, hooks: i }) {
|
|
964
|
+
const { global: u, component: f } = i, d = tn(s, c), P = [
|
|
965
|
+
...u.onBeforeRouteEnter,
|
|
966
|
+
...d.onBeforeRouteEnter,
|
|
967
|
+
...u.onBeforeRouteUpdate,
|
|
968
|
+
...d.onBeforeRouteUpdate,
|
|
969
969
|
...f.onBeforeRouteUpdate,
|
|
970
|
-
...
|
|
971
|
-
...
|
|
970
|
+
...u.onBeforeRouteLeave,
|
|
971
|
+
...d.onBeforeRouteLeave,
|
|
972
972
|
...f.onBeforeRouteLeave
|
|
973
973
|
];
|
|
974
974
|
try {
|
|
975
|
-
const
|
|
976
|
-
from:
|
|
975
|
+
const p = P.map((h) => h(s, {
|
|
976
|
+
from: c,
|
|
977
977
|
reject: e,
|
|
978
978
|
push: t,
|
|
979
|
-
replace:
|
|
980
|
-
abort:
|
|
979
|
+
replace: r,
|
|
980
|
+
abort: n
|
|
981
981
|
}));
|
|
982
|
-
await Promise.all(
|
|
983
|
-
} catch (
|
|
984
|
-
if (
|
|
985
|
-
return
|
|
986
|
-
throw
|
|
982
|
+
await Promise.all(p);
|
|
983
|
+
} catch (p) {
|
|
984
|
+
if (p instanceof te || p instanceof be || p instanceof jt)
|
|
985
|
+
return p.response;
|
|
986
|
+
throw p;
|
|
987
987
|
}
|
|
988
988
|
return {
|
|
989
989
|
status: "SUCCESS"
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
async function a({ to:
|
|
993
|
-
const { global:
|
|
992
|
+
async function a({ to: s, from: c, hooks: i }) {
|
|
993
|
+
const { global: u, component: f } = i, d = rn(s, c), P = [
|
|
994
994
|
...f.onAfterRouteLeave,
|
|
995
|
-
...
|
|
996
|
-
...
|
|
995
|
+
...d.onAfterRouteLeave,
|
|
996
|
+
...u.onAfterRouteLeave,
|
|
997
997
|
...f.onAfterRouteUpdate,
|
|
998
|
-
...
|
|
999
|
-
...
|
|
998
|
+
...d.onAfterRouteUpdate,
|
|
999
|
+
...u.onAfterRouteUpdate,
|
|
1000
1000
|
...f.onAfterRouteEnter,
|
|
1001
|
-
...
|
|
1002
|
-
...
|
|
1001
|
+
...d.onAfterRouteEnter,
|
|
1002
|
+
...u.onAfterRouteEnter
|
|
1003
1003
|
];
|
|
1004
1004
|
try {
|
|
1005
|
-
const
|
|
1006
|
-
from:
|
|
1005
|
+
const p = P.map((h) => h(s, {
|
|
1006
|
+
from: c,
|
|
1007
1007
|
reject: e,
|
|
1008
1008
|
push: t,
|
|
1009
|
-
replace:
|
|
1009
|
+
replace: r
|
|
1010
1010
|
}));
|
|
1011
|
-
await Promise.all(
|
|
1012
|
-
} catch (
|
|
1013
|
-
if (
|
|
1014
|
-
return
|
|
1015
|
-
throw
|
|
1011
|
+
await Promise.all(p);
|
|
1012
|
+
} catch (p) {
|
|
1013
|
+
if (p instanceof te || p instanceof be)
|
|
1014
|
+
return p.response;
|
|
1015
|
+
throw p;
|
|
1016
1016
|
}
|
|
1017
1017
|
return {
|
|
1018
1018
|
status: "SUCCESS"
|
|
@@ -1023,23 +1023,23 @@ function rr() {
|
|
|
1023
1023
|
runAfterRouteHooks: a
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1026
|
+
const Oe = (e, t, r) => {
|
|
1027
1027
|
var a;
|
|
1028
|
-
const
|
|
1029
|
-
return
|
|
1030
|
-
}, Te = (e, t,
|
|
1028
|
+
const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
|
|
1029
|
+
return n.length < r || n[r].id !== ((a = o[r]) == null ? void 0 : a.id);
|
|
1030
|
+
}, Te = (e, t, r) => {
|
|
1031
1031
|
var a;
|
|
1032
|
-
const
|
|
1033
|
-
return
|
|
1034
|
-
}, Ie = (e, t,
|
|
1035
|
-
var
|
|
1036
|
-
return e.matches[
|
|
1032
|
+
const n = e.matches, o = (t == null ? void 0 : t.matches) ?? [];
|
|
1033
|
+
return n.length < r || n[r].id !== ((a = o[r]) == null ? void 0 : a.id);
|
|
1034
|
+
}, Ie = (e, t, r) => {
|
|
1035
|
+
var n;
|
|
1036
|
+
return e.matches[r].id === ((n = t == null ? void 0 : t.matches[r]) == null ? void 0 : n.id);
|
|
1037
1037
|
};
|
|
1038
|
-
function
|
|
1038
|
+
function it(e) {
|
|
1039
1039
|
switch (e) {
|
|
1040
1040
|
case "onBeforeRouteEnter":
|
|
1041
1041
|
case "onAfterRouteEnter":
|
|
1042
|
-
return
|
|
1042
|
+
return Oe;
|
|
1043
1043
|
case "onBeforeRouteUpdate":
|
|
1044
1044
|
case "onAfterRouteUpdate":
|
|
1045
1045
|
return Ie;
|
|
@@ -1050,41 +1050,41 @@ function st(e) {
|
|
|
1050
1050
|
throw new Error(`Switch is not exhaustive for lifecycle: ${e}`);
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function on() {
|
|
1054
1054
|
const e = {
|
|
1055
|
-
global: new
|
|
1056
|
-
component: new
|
|
1055
|
+
global: new Ee(),
|
|
1056
|
+
component: new Ee()
|
|
1057
1057
|
};
|
|
1058
|
-
function t({ lifecycle:
|
|
1059
|
-
const
|
|
1060
|
-
if (
|
|
1061
|
-
return
|
|
1058
|
+
function t({ lifecycle: n, timing: o, depth: a, hook: s }) {
|
|
1059
|
+
const c = it(n), i = e[o][n], u = (f, d) => {
|
|
1060
|
+
if (c(f, d.from, a))
|
|
1061
|
+
return s(f, d);
|
|
1062
1062
|
};
|
|
1063
|
-
return
|
|
1063
|
+
return i.add(u), () => i.delete(u);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const
|
|
1067
|
-
if (
|
|
1068
|
-
return
|
|
1065
|
+
function r({ lifecycle: n, timing: o, depth: a, hook: s }) {
|
|
1066
|
+
const c = it(n), i = e[o][n], u = (f, d) => {
|
|
1067
|
+
if (c(f, d.from, a))
|
|
1068
|
+
return s(f, d);
|
|
1069
1069
|
};
|
|
1070
|
-
return
|
|
1070
|
+
return i.add(u), () => i.delete(u);
|
|
1071
1071
|
}
|
|
1072
|
-
return { ...e, addBeforeRouteHook: t, addAfterRouteHook:
|
|
1072
|
+
return { ...e, addBeforeRouteHook: t, addAfterRouteHook: r };
|
|
1073
1073
|
}
|
|
1074
|
-
const
|
|
1075
|
-
function
|
|
1076
|
-
const e =
|
|
1074
|
+
const qt = Symbol();
|
|
1075
|
+
function an() {
|
|
1076
|
+
const e = on();
|
|
1077
1077
|
return {
|
|
1078
|
-
onBeforeRouteEnter: (
|
|
1079
|
-
onBeforeRouteUpdate: (
|
|
1080
|
-
onBeforeRouteLeave: (
|
|
1081
|
-
onAfterRouteEnter: (
|
|
1082
|
-
onAfterRouteUpdate: (
|
|
1083
|
-
onAfterRouteLeave: (
|
|
1078
|
+
onBeforeRouteEnter: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteEnter", hook: c, timing: "global", depth: 0 }),
|
|
1079
|
+
onBeforeRouteUpdate: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteUpdate", hook: c, timing: "global", depth: 0 }),
|
|
1080
|
+
onBeforeRouteLeave: (c) => e.addBeforeRouteHook({ lifecycle: "onBeforeRouteLeave", hook: c, timing: "global", depth: 0 }),
|
|
1081
|
+
onAfterRouteEnter: (c) => e.addAfterRouteHook({ lifecycle: "onAfterRouteEnter", hook: c, timing: "global", depth: 0 }),
|
|
1082
|
+
onAfterRouteUpdate: (c) => e.addAfterRouteHook({ lifecycle: "onAfterRouteUpdate", hook: c, timing: "global", depth: 0 }),
|
|
1083
|
+
onAfterRouteLeave: (c) => e.addAfterRouteHook({ lifecycle: "onAfterRouteLeave", hook: c, timing: "global", depth: 0 }),
|
|
1084
1084
|
hooks: e
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
|
-
function
|
|
1087
|
+
function sn(e) {
|
|
1088
1088
|
return se(() => () => Z("h1", e), {
|
|
1089
1089
|
name: e,
|
|
1090
1090
|
props: []
|
|
@@ -1093,306 +1093,203 @@ function sr(e) {
|
|
|
1093
1093
|
function Fe(e) {
|
|
1094
1094
|
const t = new URLSearchParams(e);
|
|
1095
1095
|
return {
|
|
1096
|
-
get: (...
|
|
1097
|
-
getAll: (...
|
|
1098
|
-
set: (...
|
|
1099
|
-
t.set(...
|
|
1096
|
+
get: (...r) => t.get(...r),
|
|
1097
|
+
getAll: (...r) => t.getAll(...r),
|
|
1098
|
+
set: (...r) => {
|
|
1099
|
+
t.set(...r);
|
|
1100
1100
|
},
|
|
1101
|
-
append: (...
|
|
1102
|
-
t.append(...
|
|
1101
|
+
append: (...r) => {
|
|
1102
|
+
t.append(...r);
|
|
1103
1103
|
},
|
|
1104
|
-
delete: (...
|
|
1105
|
-
t.delete(...
|
|
1104
|
+
delete: (...r) => {
|
|
1105
|
+
t.delete(...r);
|
|
1106
1106
|
},
|
|
1107
|
-
toString: (...
|
|
1108
|
-
forEach: (...
|
|
1109
|
-
t.forEach(...
|
|
1107
|
+
toString: (...r) => t.toString(...r),
|
|
1108
|
+
forEach: (...r) => {
|
|
1109
|
+
t.forEach(...r);
|
|
1110
1110
|
},
|
|
1111
|
-
entries: (...
|
|
1112
|
-
keys: (...
|
|
1113
|
-
values: (...
|
|
1114
|
-
has: (...
|
|
1111
|
+
entries: (...r) => t.entries(...r),
|
|
1112
|
+
keys: (...r) => t.keys(...r),
|
|
1113
|
+
values: (...r) => t.values(...r),
|
|
1114
|
+
has: (...r) => t.has(...r),
|
|
1115
|
+
size: t.size,
|
|
1116
|
+
sort: () => {
|
|
1117
|
+
t.sort();
|
|
1118
|
+
},
|
|
1119
|
+
[Symbol.iterator]: () => t[Symbol.iterator]()
|
|
1115
1120
|
};
|
|
1116
1121
|
}
|
|
1117
|
-
function
|
|
1122
|
+
function _t() {
|
|
1118
1123
|
let e = 0;
|
|
1119
1124
|
return () => (++e).toString();
|
|
1120
1125
|
}
|
|
1121
|
-
const Je =
|
|
1122
|
-
function
|
|
1126
|
+
const Je = _t();
|
|
1127
|
+
function cn({
|
|
1123
1128
|
rejections: e
|
|
1124
1129
|
}) {
|
|
1125
1130
|
const t = (a) => {
|
|
1126
|
-
const
|
|
1131
|
+
const s = {
|
|
1127
1132
|
...e
|
|
1128
1133
|
};
|
|
1129
|
-
return
|
|
1130
|
-
},
|
|
1131
|
-
const
|
|
1134
|
+
return ye(s[a] ?? sn(a));
|
|
1135
|
+
}, r = (a) => {
|
|
1136
|
+
const s = ye(t(a)), c = {
|
|
1132
1137
|
id: Je(),
|
|
1133
|
-
component:
|
|
1138
|
+
component: s,
|
|
1134
1139
|
meta: {},
|
|
1135
1140
|
state: {}
|
|
1136
1141
|
};
|
|
1137
1142
|
return {
|
|
1138
|
-
id:
|
|
1139
|
-
matched:
|
|
1140
|
-
matches: [
|
|
1143
|
+
id: c.id,
|
|
1144
|
+
matched: c,
|
|
1145
|
+
matches: [c],
|
|
1141
1146
|
name: a,
|
|
1142
1147
|
query: Fe(""),
|
|
1143
1148
|
params: {},
|
|
1144
1149
|
state: {},
|
|
1145
1150
|
href: "/",
|
|
1146
|
-
|
|
1151
|
+
hash: "",
|
|
1152
|
+
[Ht]: !0
|
|
1147
1153
|
};
|
|
1148
|
-
},
|
|
1154
|
+
}, n = (a) => {
|
|
1149
1155
|
if (!a) {
|
|
1150
1156
|
o.value = null;
|
|
1151
1157
|
return;
|
|
1152
1158
|
}
|
|
1153
|
-
const
|
|
1154
|
-
o.value = { type: a, component:
|
|
1155
|
-
}, o =
|
|
1159
|
+
const s = t(a);
|
|
1160
|
+
o.value = { type: a, component: s };
|
|
1161
|
+
}, o = qe(null);
|
|
1156
1162
|
return {
|
|
1157
|
-
setRejection:
|
|
1163
|
+
setRejection: n,
|
|
1158
1164
|
rejection: o,
|
|
1159
|
-
getRejectionRoute:
|
|
1165
|
+
getRejectionRoute: r
|
|
1160
1166
|
};
|
|
1161
1167
|
}
|
|
1162
|
-
class
|
|
1168
|
+
class un extends Error {
|
|
1163
1169
|
constructor() {
|
|
1164
1170
|
super("initialUrl must be set if window.location is unavailable");
|
|
1165
1171
|
}
|
|
1166
1172
|
}
|
|
1167
|
-
function
|
|
1173
|
+
function fn(e) {
|
|
1168
1174
|
if (e)
|
|
1169
1175
|
return e;
|
|
1170
1176
|
if (De())
|
|
1171
1177
|
return window.location.toString();
|
|
1172
|
-
throw new
|
|
1178
|
+
throw new un();
|
|
1173
1179
|
}
|
|
1174
1180
|
function Qe(e) {
|
|
1175
1181
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1176
1182
|
}
|
|
1177
|
-
function
|
|
1178
|
-
const
|
|
1179
|
-
if (
|
|
1183
|
+
function ln(e, t) {
|
|
1184
|
+
const r = Array.from(e.matchAll(t));
|
|
1185
|
+
if (r.length === 0)
|
|
1180
1186
|
return [e];
|
|
1181
|
-
let
|
|
1182
|
-
const o =
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1185
|
-
const [
|
|
1186
|
-
return
|
|
1187
|
-
}, []), a = e.slice(
|
|
1187
|
+
let n = 0;
|
|
1188
|
+
const o = r.reduce((s, c) => {
|
|
1189
|
+
const i = Qe(e.slice(n, c.index));
|
|
1190
|
+
i.length && s.push(i);
|
|
1191
|
+
const [u] = c;
|
|
1192
|
+
return s.push(u), n = c.index + u.length, s;
|
|
1193
|
+
}, []), a = e.slice(n);
|
|
1188
1194
|
return a && o.push(a), o;
|
|
1189
1195
|
}
|
|
1190
|
-
function
|
|
1191
|
-
const t =
|
|
1196
|
+
function hn(e) {
|
|
1197
|
+
const t = Mt(e.path.value);
|
|
1192
1198
|
return new RegExp(`^${t}$`, "i");
|
|
1193
1199
|
}
|
|
1194
|
-
function
|
|
1200
|
+
function pn(e) {
|
|
1195
1201
|
const t = new URLSearchParams(e.query.value);
|
|
1196
|
-
return Array.from(t.entries()).filter(([,
|
|
1197
|
-
const o =
|
|
1198
|
-
return new RegExp(`${Qe(
|
|
1202
|
+
return Array.from(t.entries()).filter(([, r]) => !He(r)).map(([r, n]) => {
|
|
1203
|
+
const o = Mt(n);
|
|
1204
|
+
return new RegExp(`${Qe(r)}=${o}(&|$)`, "i");
|
|
1199
1205
|
});
|
|
1200
1206
|
}
|
|
1201
|
-
function
|
|
1202
|
-
return
|
|
1207
|
+
function Mt(e) {
|
|
1208
|
+
return ln(e, new RegExp(dn, "g")).map((t) => t.startsWith(J) ? Wt(t) : Qe(t)).join("");
|
|
1203
1209
|
}
|
|
1204
|
-
function
|
|
1210
|
+
function Wt(e) {
|
|
1205
1211
|
return [
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
].reduce((t,
|
|
1212
|
+
mn,
|
|
1213
|
+
yn
|
|
1214
|
+
].reduce((t, r) => r(t), e);
|
|
1209
1215
|
}
|
|
1210
|
-
const
|
|
1211
|
-
function
|
|
1212
|
-
return e.replace(new RegExp(
|
|
1216
|
+
const dn = `\\${J}\\??([\\w-_]+)\\${K}`, ze = `\\${J}\\?([\\w-_]+)\\${K}`, Dt = `\\${J}([\\w-_]+)\\${K}`;
|
|
1217
|
+
function mn(e) {
|
|
1218
|
+
return e.replace(new RegExp(ze, "g"), ".*");
|
|
1213
1219
|
}
|
|
1214
1220
|
function He(e) {
|
|
1215
|
-
return new RegExp(
|
|
1216
|
-
}
|
|
1217
|
-
function mr(e) {
|
|
1218
|
-
return e.replace(new RegExp(_t, "g"), ".+");
|
|
1219
|
-
}
|
|
1220
|
-
function Be(e) {
|
|
1221
|
-
const [t] = Ae(e, new RegExp(Ge, "g")), [n] = Ae(e, new RegExp(_t, "g"));
|
|
1222
|
-
return t ?? n;
|
|
1223
|
-
}
|
|
1224
|
-
function Ae(e, t) {
|
|
1225
|
-
return Array.from(e.matchAll(t)).flatMap(([, ...r]) => r.map((o) => me(o) ? o : ""));
|
|
1226
|
-
}
|
|
1227
|
-
function Wt(e, t, n) {
|
|
1228
|
-
const r = Mt(t, n), [o] = Ae(e, r);
|
|
1229
|
-
return o;
|
|
1230
|
-
}
|
|
1231
|
-
function Dt(e, t) {
|
|
1232
|
-
if (!t)
|
|
1233
|
-
return e;
|
|
1234
|
-
const { name: n, param: r, value: o } = t, a = Mt(e, n);
|
|
1235
|
-
return Ae(e, a).reduce((s, u) => u === void 0 ? s : s.replace(u, () => le(o, r, n.startsWith("?"))), e);
|
|
1236
|
-
}
|
|
1237
|
-
function Mt(e, t) {
|
|
1238
|
-
const n = [
|
|
1239
|
-
yr,
|
|
1240
|
-
gr,
|
|
1241
|
-
qt
|
|
1242
|
-
].reduce((r, o) => o(r, t), e);
|
|
1243
|
-
return new RegExp(n, "g");
|
|
1244
|
-
}
|
|
1245
|
-
function yr(e, t) {
|
|
1246
|
-
if (!t.startsWith("?"))
|
|
1247
|
-
return e;
|
|
1248
|
-
const n = new RegExp(`\\${F}\\${t}\\${K}`, "g");
|
|
1249
|
-
return e.replace(n, "(.*)");
|
|
1250
|
-
}
|
|
1251
|
-
function gr(e, t) {
|
|
1252
|
-
if (t.startsWith("?"))
|
|
1253
|
-
return e;
|
|
1254
|
-
const n = new RegExp(`\\${F}${t}\\${K}`, "g");
|
|
1255
|
-
return e.replace(n, "(.+)");
|
|
1256
|
-
}
|
|
1257
|
-
const vr = (e, t) => {
|
|
1258
|
-
try {
|
|
1259
|
-
Ke(e, t);
|
|
1260
|
-
} catch {
|
|
1261
|
-
return !1;
|
|
1262
|
-
}
|
|
1263
|
-
return !0;
|
|
1264
|
-
}, Ke = (e, t) => {
|
|
1265
|
-
const { pathname: n, search: r } = D(t);
|
|
1266
|
-
return {
|
|
1267
|
-
...Rr(e.path, n),
|
|
1268
|
-
...wr(e.query, r)
|
|
1269
|
-
};
|
|
1270
|
-
};
|
|
1271
|
-
function Rr(e, t) {
|
|
1272
|
-
const n = {}, r = decodeURIComponent(t);
|
|
1273
|
-
for (const [o, a] of Object.entries(e.params)) {
|
|
1274
|
-
const c = o.startsWith("?"), s = c ? o.slice(1) : o, u = Wt(r, e.value, o), i = fe(u, a, c);
|
|
1275
|
-
n[s] = i;
|
|
1276
|
-
}
|
|
1277
|
-
return n;
|
|
1278
|
-
}
|
|
1279
|
-
function wr(e, t) {
|
|
1280
|
-
const n = {}, r = new URLSearchParams(t);
|
|
1281
|
-
for (const [o, a] of Object.entries(e.params)) {
|
|
1282
|
-
const c = o.startsWith("?"), s = c ? o.slice(1) : o, u = r.get(s) ?? void 0, i = fe(u, a, c);
|
|
1283
|
-
n[s] = i;
|
|
1284
|
-
}
|
|
1285
|
-
return n;
|
|
1286
|
-
}
|
|
1287
|
-
const Pr = (e) => "name" in e.matched && !!e.matched.name, Er = (e, t) => {
|
|
1288
|
-
const { pathname: n } = D(t);
|
|
1289
|
-
return lr(e).test(n);
|
|
1290
|
-
}, br = (e, t) => {
|
|
1291
|
-
const { search: n } = D(t);
|
|
1292
|
-
return hr(e).every((o) => o.test(n));
|
|
1293
|
-
}, je = (e, t) => {
|
|
1294
|
-
const { hash: n } = D(t), { value: r } = e.hash;
|
|
1295
|
-
return r === void 0 || `#${r.toLowerCase()}` === n.toLowerCase();
|
|
1296
|
-
};
|
|
1297
|
-
function Sr(e) {
|
|
1298
|
-
const { searchParams: t, pathname: n } = D(e), r = -1, o = 1;
|
|
1299
|
-
return (a, c) => {
|
|
1300
|
-
const s = ut(a, t), u = ct(a, n), i = ut(c, t), f = ct(c, n);
|
|
1301
|
-
return a.depth > c.depth ? r : a.depth < c.depth ? o : s + u > i + f ? r : s + u < i + f ? o : je(a, e) ? r : je(c, e) ? o : 0;
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
function ct(e, t) {
|
|
1305
|
-
const n = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), r = n.filter((o) => Wt(t, e.path.value, o) === void 0);
|
|
1306
|
-
return n.length - r.length;
|
|
1221
|
+
return new RegExp(ze, "g").test(e);
|
|
1307
1222
|
}
|
|
1308
|
-
function
|
|
1309
|
-
|
|
1310
|
-
return r.length - o.length;
|
|
1223
|
+
function yn(e) {
|
|
1224
|
+
return e.replace(new RegExp(Dt, "g"), ".+");
|
|
1311
1225
|
}
|
|
1312
|
-
function
|
|
1313
|
-
|
|
1226
|
+
function Le(e) {
|
|
1227
|
+
const [t] = Se(e, new RegExp(ze, "g")), [r] = Se(e, new RegExp(Dt, "g"));
|
|
1228
|
+
return t ?? r;
|
|
1314
1229
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
if (Tt(e) && t in e) {
|
|
1318
|
-
const r = e[t];
|
|
1319
|
-
if (typeof r == "string")
|
|
1320
|
-
return fe(r, n, xe);
|
|
1321
|
-
}
|
|
1322
|
-
return fe(void 0, n, xe);
|
|
1323
|
-
}
|
|
1324
|
-
function It(e, t) {
|
|
1325
|
-
const n = {};
|
|
1326
|
-
for (const [r, o] of Object.entries(e)) {
|
|
1327
|
-
const a = kr(t, r, o);
|
|
1328
|
-
n[r] = a;
|
|
1329
|
-
}
|
|
1330
|
-
return n;
|
|
1331
|
-
}
|
|
1332
|
-
function Ar(e, t, n) {
|
|
1333
|
-
if (Tt(e) && t in e) {
|
|
1334
|
-
const r = e[t];
|
|
1335
|
-
return le(r, n, xe);
|
|
1336
|
-
}
|
|
1337
|
-
return le(void 0, n, xe);
|
|
1338
|
-
}
|
|
1339
|
-
const it = (e, t) => {
|
|
1340
|
-
const n = {};
|
|
1341
|
-
for (const [r, o] of Object.entries(e)) {
|
|
1342
|
-
const a = Ar(t, r, o);
|
|
1343
|
-
n[r] = a;
|
|
1344
|
-
}
|
|
1345
|
-
return n;
|
|
1346
|
-
}, xr = [
|
|
1347
|
-
Pr,
|
|
1348
|
-
Er,
|
|
1349
|
-
br,
|
|
1350
|
-
je,
|
|
1351
|
-
vr
|
|
1352
|
-
];
|
|
1353
|
-
function ft(e, t, n) {
|
|
1354
|
-
const r = Sr(t), o = e.filter((u) => xr.every((i) => i(u, t))).sort(r);
|
|
1355
|
-
if (o.length === 0)
|
|
1356
|
-
return;
|
|
1357
|
-
const [a] = o, { search: c, hash: s } = D(t);
|
|
1358
|
-
return {
|
|
1359
|
-
id: a.id,
|
|
1360
|
-
matched: a.matched,
|
|
1361
|
-
matches: a.matches,
|
|
1362
|
-
name: a.name,
|
|
1363
|
-
query: Fe(c),
|
|
1364
|
-
params: Ke(a, t),
|
|
1365
|
-
state: It(a.state, n),
|
|
1366
|
-
hash: s,
|
|
1367
|
-
href: wt(t)
|
|
1368
|
-
};
|
|
1230
|
+
function Se(e, t) {
|
|
1231
|
+
return Array.from(e.matchAll(t)).flatMap(([, ...n]) => n.map((o) => F(o) ? o : ""));
|
|
1369
1232
|
}
|
|
1370
|
-
function
|
|
1371
|
-
const
|
|
1372
|
-
return Array.from(e.matchAll(
|
|
1373
|
-
const
|
|
1374
|
-
if (!
|
|
1233
|
+
function Ge(e, t) {
|
|
1234
|
+
const r = new RegExp(`\\${J}(\\??[\\w-_]+)\\${K}`, "g");
|
|
1235
|
+
return Array.from(e.matchAll(r)).reduce((o, [a, s]) => {
|
|
1236
|
+
const c = Le(a);
|
|
1237
|
+
if (!c)
|
|
1375
1238
|
return o;
|
|
1376
|
-
const
|
|
1377
|
-
return ce([
|
|
1239
|
+
const i = Dr(t, c);
|
|
1240
|
+
return ce([c], o), o[s] = i, o;
|
|
1378
1241
|
}, {});
|
|
1379
1242
|
}
|
|
1380
|
-
function
|
|
1243
|
+
function je(e, t) {
|
|
1381
1244
|
return {
|
|
1382
1245
|
value: e,
|
|
1383
|
-
params:
|
|
1246
|
+
params: Ge(e, t)
|
|
1384
1247
|
};
|
|
1385
1248
|
}
|
|
1386
|
-
function
|
|
1387
|
-
return
|
|
1388
|
-
const
|
|
1249
|
+
function gn(e, t) {
|
|
1250
|
+
return F(t) ? e.map((r) => {
|
|
1251
|
+
const n = `${t}${r.path.value}`;
|
|
1389
1252
|
return {
|
|
1390
|
-
...
|
|
1391
|
-
path:
|
|
1253
|
+
...r,
|
|
1254
|
+
path: je(n, r.path.params)
|
|
1392
1255
|
};
|
|
1393
1256
|
}) : e;
|
|
1394
1257
|
}
|
|
1395
|
-
|
|
1258
|
+
function Ot(e) {
|
|
1259
|
+
return !!e && typeof e == "object";
|
|
1260
|
+
}
|
|
1261
|
+
const ke = !0;
|
|
1262
|
+
function vn(e, t, r) {
|
|
1263
|
+
if (Ot(e) && t in e) {
|
|
1264
|
+
const n = e[t];
|
|
1265
|
+
return typeof n == "string" ? fe(n, r, ke) : n;
|
|
1266
|
+
}
|
|
1267
|
+
return fe(void 0, r, ke);
|
|
1268
|
+
}
|
|
1269
|
+
function Tt(e, t) {
|
|
1270
|
+
const r = {};
|
|
1271
|
+
for (const [n, o] of Object.entries(e)) {
|
|
1272
|
+
const a = vn(t, n, o);
|
|
1273
|
+
r[n] = a;
|
|
1274
|
+
}
|
|
1275
|
+
return r;
|
|
1276
|
+
}
|
|
1277
|
+
function Rn(e, t, r) {
|
|
1278
|
+
if (Ot(e) && t in e) {
|
|
1279
|
+
const n = e[t];
|
|
1280
|
+
return le(n, r, ke);
|
|
1281
|
+
}
|
|
1282
|
+
return le(void 0, r, ke);
|
|
1283
|
+
}
|
|
1284
|
+
const ft = (e, t) => {
|
|
1285
|
+
const r = {};
|
|
1286
|
+
for (const [n, o] of Object.entries(e)) {
|
|
1287
|
+
const a = Rn(t, n, o);
|
|
1288
|
+
r[n] = a;
|
|
1289
|
+
}
|
|
1290
|
+
return r;
|
|
1291
|
+
};
|
|
1292
|
+
class wn extends Error {
|
|
1396
1293
|
/**
|
|
1397
1294
|
* Constructs a new DuplicateNamesError instance with a message indicating the problematic name.
|
|
1398
1295
|
* @param name - The name of the name that was duplicated.
|
|
@@ -1401,514 +1298,653 @@ class Ur extends Error {
|
|
|
1401
1298
|
super(`Invalid Name "${t}": Router does not support multiple routes with the same name. All name names must be unique.`);
|
|
1402
1299
|
}
|
|
1403
1300
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const t = e.map(({ name:
|
|
1406
|
-
for (const
|
|
1407
|
-
if (
|
|
1408
|
-
throw new
|
|
1301
|
+
function Pn(e) {
|
|
1302
|
+
const t = e.map(({ name: r }) => r);
|
|
1303
|
+
for (const r of t)
|
|
1304
|
+
if (St(t, r) > 1)
|
|
1305
|
+
throw new wn(r);
|
|
1409
1306
|
}
|
|
1410
|
-
function
|
|
1411
|
-
const e =
|
|
1412
|
-
e.set(
|
|
1413
|
-
},
|
|
1414
|
-
e.delete(
|
|
1307
|
+
function En() {
|
|
1308
|
+
const e = xe(/* @__PURE__ */ new Map()), t = De() ? s() : null, r = (c) => {
|
|
1309
|
+
e.set(c, !1), t == null || t.observe(c);
|
|
1310
|
+
}, n = (c) => {
|
|
1311
|
+
e.delete(c), t == null || t.unobserve(c);
|
|
1415
1312
|
}, o = () => {
|
|
1416
1313
|
t == null || t.disconnect();
|
|
1417
|
-
}, a = (
|
|
1418
|
-
function
|
|
1419
|
-
return new IntersectionObserver((
|
|
1420
|
-
|
|
1421
|
-
e.set(
|
|
1314
|
+
}, a = (c) => e.get(c) ?? !1;
|
|
1315
|
+
function s() {
|
|
1316
|
+
return new IntersectionObserver((c) => {
|
|
1317
|
+
c.forEach((i) => {
|
|
1318
|
+
e.set(i.target, i.isIntersecting);
|
|
1422
1319
|
});
|
|
1423
1320
|
});
|
|
1424
1321
|
}
|
|
1425
1322
|
return {
|
|
1426
|
-
observe:
|
|
1427
|
-
unobserve:
|
|
1323
|
+
observe: r,
|
|
1324
|
+
unobserve: n,
|
|
1428
1325
|
disconnect: o,
|
|
1429
1326
|
isElementVisible: a
|
|
1430
1327
|
};
|
|
1431
1328
|
}
|
|
1432
|
-
const
|
|
1433
|
-
function
|
|
1434
|
-
const t = ae(
|
|
1329
|
+
const It = Symbol("visibilityObserver");
|
|
1330
|
+
function bn(e) {
|
|
1331
|
+
const t = ae(It);
|
|
1435
1332
|
if (!t)
|
|
1436
1333
|
throw new pe();
|
|
1437
|
-
return
|
|
1438
|
-
|
|
1334
|
+
return ge(e, (n, o) => {
|
|
1335
|
+
n && t.observe(n), o && t.unobserve(o);
|
|
1439
1336
|
}, { immediate: !0 }), {
|
|
1440
1337
|
isElementVisible: N(() => e.value ? t.isElementVisible(e.value) : !1)
|
|
1441
1338
|
};
|
|
1442
1339
|
}
|
|
1443
|
-
class
|
|
1340
|
+
class Sn extends Error {
|
|
1444
1341
|
constructor(t) {
|
|
1445
1342
|
super(`Route not found: "${t}"`);
|
|
1446
1343
|
}
|
|
1447
1344
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1345
|
+
function Ft(e, t, r) {
|
|
1346
|
+
const n = Qt(t, r), [o] = Se(e, n);
|
|
1347
|
+
return o;
|
|
1348
|
+
}
|
|
1349
|
+
function Jt(e, t) {
|
|
1350
|
+
if (!t)
|
|
1351
|
+
return e;
|
|
1352
|
+
const { name: r, param: n, value: o } = t, a = Qt(e, r);
|
|
1353
|
+
return Se(e, a).reduce((c, i) => i === void 0 ? c : c.replace(i, () => le(o, n, r.startsWith("?"))), e);
|
|
1453
1354
|
}
|
|
1454
1355
|
function Qt(e, t) {
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1356
|
+
const r = [
|
|
1357
|
+
kn,
|
|
1358
|
+
An,
|
|
1359
|
+
Wt
|
|
1360
|
+
].reduce((n, o) => o(n, t), e);
|
|
1361
|
+
return new RegExp(r, "g");
|
|
1362
|
+
}
|
|
1363
|
+
function kn(e, t) {
|
|
1364
|
+
if (!t.startsWith("?"))
|
|
1365
|
+
return e;
|
|
1366
|
+
const r = new RegExp(`\\${J}\\${t}\\${K}`, "g");
|
|
1367
|
+
return e.replace(r, "(.*)");
|
|
1459
1368
|
}
|
|
1460
|
-
function
|
|
1461
|
-
|
|
1462
|
-
|
|
1369
|
+
function An(e, t) {
|
|
1370
|
+
if (t.startsWith("?"))
|
|
1371
|
+
return e;
|
|
1372
|
+
const r = new RegExp(`\\${J}${t}\\${K}`, "g");
|
|
1373
|
+
return e.replace(r, "(.+)");
|
|
1374
|
+
}
|
|
1375
|
+
function zt({ protocol: e, host: t, pathname: r, search: n, searchParams: o, hash: a }) {
|
|
1376
|
+
const s = new URL("https://localhost");
|
|
1377
|
+
e && (s.protocol = e), t && (s.host = t), r && (s.pathname = r), o ? s.search = new URLSearchParams(o).toString() : n && (s.search = n), a && (s.hash = a);
|
|
1378
|
+
const c = s.toString().replace(/^https:\/\/localhost\/*/, "/");
|
|
1379
|
+
return Et(c);
|
|
1380
|
+
}
|
|
1381
|
+
function Ke(...e) {
|
|
1382
|
+
const t = new URLSearchParams();
|
|
1383
|
+
for (const r of e) {
|
|
1384
|
+
const n = new URLSearchParams(r);
|
|
1385
|
+
for (const [o, a] of n.entries())
|
|
1386
|
+
t.append(o, a);
|
|
1387
|
+
}
|
|
1388
|
+
return t;
|
|
1463
1389
|
}
|
|
1464
|
-
function
|
|
1465
|
-
const { params:
|
|
1466
|
-
return
|
|
1390
|
+
function xn(e, t = {}) {
|
|
1391
|
+
const { params: r = {}, query: n } = t, o = Cn(e.query, r), a = Ke(o, n), s = Ln(e.path, r), c = ve(e.hash.value ?? t.hash).value, i = Un(e.host, r), { protocol: u, host: f } = _(i);
|
|
1392
|
+
return zt({ protocol: u, host: f, pathname: s, searchParams: a, hash: c });
|
|
1467
1393
|
}
|
|
1468
|
-
function
|
|
1469
|
-
const
|
|
1470
|
-
return Object.entries(e.params).reduce((
|
|
1471
|
-
const
|
|
1472
|
-
return
|
|
1473
|
-
},
|
|
1474
|
-
}
|
|
1475
|
-
function
|
|
1476
|
-
return Object.entries(e.params).reduce((
|
|
1477
|
-
const a =
|
|
1478
|
-
return a ?
|
|
1394
|
+
function Un(e, t) {
|
|
1395
|
+
const r = e.value && !e.value.startsWith("http") ? `https://${e.value}` : e.value;
|
|
1396
|
+
return Object.entries(e.params).reduce((n, [o, a]) => {
|
|
1397
|
+
const s = Le(`${J}${o}${K}`);
|
|
1398
|
+
return s ? Jt(n, { name: o, param: a, value: t[s] }) : n;
|
|
1399
|
+
}, r);
|
|
1400
|
+
}
|
|
1401
|
+
function Ln(e, t) {
|
|
1402
|
+
return Object.entries(e.params).reduce((r, [n, o]) => {
|
|
1403
|
+
const a = Le(`${J}${n}${K}`);
|
|
1404
|
+
return a ? Jt(r, { name: n, param: o, value: t[a] }) : r;
|
|
1479
1405
|
}, e.value);
|
|
1480
1406
|
}
|
|
1481
|
-
function
|
|
1482
|
-
const
|
|
1407
|
+
function Cn(e, t) {
|
|
1408
|
+
const r = new URLSearchParams(e.value);
|
|
1483
1409
|
if (!e.value)
|
|
1484
|
-
return
|
|
1485
|
-
for (const [
|
|
1486
|
-
const a =
|
|
1410
|
+
return r;
|
|
1411
|
+
for (const [n, o] of Array.from(r.entries())) {
|
|
1412
|
+
const a = Le(o);
|
|
1487
1413
|
if (!a)
|
|
1488
1414
|
continue;
|
|
1489
|
-
const
|
|
1490
|
-
He(o) &&
|
|
1415
|
+
const c = le(t[a], e.params[a], He(o)), i = t[a] === void 0 && c === "";
|
|
1416
|
+
He(o) && i ? r.delete(n, o) : r.set(n, c);
|
|
1417
|
+
}
|
|
1418
|
+
return r;
|
|
1419
|
+
}
|
|
1420
|
+
const Bn = (e, t) => {
|
|
1421
|
+
try {
|
|
1422
|
+
Ye(e, t);
|
|
1423
|
+
} catch {
|
|
1424
|
+
return !1;
|
|
1425
|
+
}
|
|
1426
|
+
return !0;
|
|
1427
|
+
}, Ye = (e, t) => {
|
|
1428
|
+
const { pathname: r, search: n } = _(t);
|
|
1429
|
+
return {
|
|
1430
|
+
...Nn(e.path, r),
|
|
1431
|
+
...Vn(e.query, n)
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
function Nn(e, t) {
|
|
1435
|
+
const r = {}, n = decodeURIComponent(t);
|
|
1436
|
+
for (const [o, a] of Object.entries(e.params)) {
|
|
1437
|
+
const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = Ft(n, e.value, o), u = fe(i, a, s);
|
|
1438
|
+
r[c] = u;
|
|
1439
|
+
}
|
|
1440
|
+
return r;
|
|
1441
|
+
}
|
|
1442
|
+
function Vn(e, t) {
|
|
1443
|
+
const r = {}, n = new URLSearchParams(t);
|
|
1444
|
+
for (const [o, a] of Object.entries(e.params)) {
|
|
1445
|
+
const s = o.startsWith("?"), c = s ? o.slice(1) : o, i = n.get(c) ?? void 0, u = fe(i, a, s);
|
|
1446
|
+
r[c] = u;
|
|
1491
1447
|
}
|
|
1492
|
-
return
|
|
1448
|
+
return r;
|
|
1493
1449
|
}
|
|
1494
|
-
function
|
|
1495
|
-
const
|
|
1450
|
+
function Hn(e, t = {}, r = {}) {
|
|
1451
|
+
const n = xn(e, {
|
|
1496
1452
|
params: t,
|
|
1497
|
-
query:
|
|
1498
|
-
hash:
|
|
1499
|
-
}), { search: o, hash: a } =
|
|
1453
|
+
query: r.query,
|
|
1454
|
+
hash: r.hash
|
|
1455
|
+
}), { search: o, hash: a } = _(n);
|
|
1500
1456
|
return {
|
|
1501
1457
|
id: e.id,
|
|
1502
1458
|
matched: e.matched,
|
|
1503
1459
|
matches: e.matches,
|
|
1504
1460
|
name: e.name,
|
|
1505
1461
|
query: Fe(o),
|
|
1506
|
-
params:
|
|
1507
|
-
state:
|
|
1462
|
+
params: Ye(e, n),
|
|
1463
|
+
state: Tt(e.state, r.state),
|
|
1508
1464
|
hash: a,
|
|
1509
|
-
href:
|
|
1465
|
+
href: n
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
const jn = (e) => "name" in e.matched && !!e.matched.name, $n = (e, t) => {
|
|
1469
|
+
const { pathname: r } = _(t);
|
|
1470
|
+
return hn(e).test(r);
|
|
1471
|
+
}, qn = (e, t) => {
|
|
1472
|
+
const { search: r } = _(t);
|
|
1473
|
+
return pn(e).every((o) => o.test(r));
|
|
1474
|
+
}, $e = (e, t) => {
|
|
1475
|
+
const { hash: r } = _(t), { value: n } = e.hash;
|
|
1476
|
+
return n === void 0 || `#${n.toLowerCase()}` === r.toLowerCase();
|
|
1477
|
+
};
|
|
1478
|
+
function _n(e) {
|
|
1479
|
+
const { searchParams: t, pathname: r } = _(e), n = -1, o = 1;
|
|
1480
|
+
return (a, s) => {
|
|
1481
|
+
const c = ht(a, t), i = lt(a, r), u = ht(s, t), f = lt(s, r);
|
|
1482
|
+
return a.depth > s.depth ? n : a.depth < s.depth ? o : c + i > u + f ? n : c + i < u + f ? o : $e(a, e) ? n : $e(s, e) ? o : 0;
|
|
1510
1483
|
};
|
|
1511
1484
|
}
|
|
1512
|
-
function
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1515
|
-
|
|
1485
|
+
function lt(e, t) {
|
|
1486
|
+
const r = Object.keys(e.path.params).filter((o) => o.startsWith("?")).map((o) => o), n = r.filter((o) => Ft(t, e.path.value, o) === void 0);
|
|
1487
|
+
return r.length - n.length;
|
|
1488
|
+
}
|
|
1489
|
+
function ht(e, t) {
|
|
1490
|
+
const r = new URLSearchParams(t), n = new URLSearchParams(e.query.value), o = Array.from(n.keys()), a = o.filter((s) => !r.has(s));
|
|
1491
|
+
return o.length - a.length;
|
|
1492
|
+
}
|
|
1493
|
+
const Mn = [
|
|
1494
|
+
jn,
|
|
1495
|
+
$n,
|
|
1496
|
+
qn,
|
|
1497
|
+
$e,
|
|
1498
|
+
Bn
|
|
1499
|
+
];
|
|
1500
|
+
function Wn(e, t) {
|
|
1501
|
+
const r = _n(t);
|
|
1502
|
+
return e.filter((n) => Mn.every((o) => o(n, t))).sort(r);
|
|
1503
|
+
}
|
|
1504
|
+
function Dn(e, t, r) {
|
|
1505
|
+
const n = Wn(e, t);
|
|
1506
|
+
if (!n.length)
|
|
1507
|
+
return;
|
|
1508
|
+
const [o] = n, { searchParams: a, hash: s } = _(t);
|
|
1509
|
+
return {
|
|
1510
|
+
id: o.id,
|
|
1511
|
+
matched: o.matched,
|
|
1512
|
+
matches: o.matches,
|
|
1513
|
+
name: o.name,
|
|
1514
|
+
query: Fe(a),
|
|
1515
|
+
params: Ye(o, t),
|
|
1516
|
+
state: Tt(o.state, r),
|
|
1517
|
+
hash: s,
|
|
1518
|
+
href: Et(t)
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
function pt(e, t) {
|
|
1522
|
+
const r = typeof e == "string" ? _(e) : e, n = typeof t == "string" ? _(t) : t, o = r.searchParams ?? new URLSearchParams(r.search), a = n.searchParams ?? new URLSearchParams(n.search);
|
|
1523
|
+
return zt({
|
|
1524
|
+
protocol: F(n.protocol) ? n.protocol : r.protocol,
|
|
1525
|
+
host: F(n.host) ? n.host : r.host,
|
|
1526
|
+
pathname: F(n.pathname) ? n.pathname : r.pathname,
|
|
1527
|
+
searchParams: Ke(a, o),
|
|
1528
|
+
hash: F(n.hash) ? n.hash : r.hash
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
function lo(e, t) {
|
|
1532
|
+
const r = Ur(e) ? e.flat() : e, n = gn(r, t == null ? void 0 : t.base);
|
|
1533
|
+
Pn(n);
|
|
1534
|
+
const o = _t(), a = Gn(), s = En(), c = Zr({
|
|
1516
1535
|
mode: t == null ? void 0 : t.historyMode,
|
|
1517
|
-
listener: ({ location:
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1536
|
+
listener: ({ location: b }) => {
|
|
1537
|
+
const L = X(b);
|
|
1538
|
+
k(L, { state: b.state, replace: !0 });
|
|
1520
1539
|
}
|
|
1521
|
-
}), { runBeforeRouteHooks:
|
|
1540
|
+
}), { runBeforeRouteHooks: i, runAfterRouteHooks: u } = nn(), {
|
|
1522
1541
|
hooks: f,
|
|
1523
|
-
onBeforeRouteEnter:
|
|
1542
|
+
onBeforeRouteEnter: d,
|
|
1524
1543
|
onAfterRouteUpdate: P,
|
|
1525
|
-
onBeforeRouteLeave:
|
|
1526
|
-
onAfterRouteEnter:
|
|
1544
|
+
onBeforeRouteLeave: p,
|
|
1545
|
+
onAfterRouteEnter: h,
|
|
1527
1546
|
onBeforeRouteUpdate: v,
|
|
1528
|
-
onAfterRouteLeave:
|
|
1529
|
-
} =
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1547
|
+
onAfterRouteLeave: R
|
|
1548
|
+
} = an();
|
|
1549
|
+
function E(b, L = {}) {
|
|
1550
|
+
return Dn(n, b, L.state);
|
|
1551
|
+
}
|
|
1552
|
+
async function k(b, L = {}) {
|
|
1553
|
+
const Q = o();
|
|
1554
|
+
if (c.stopListening(), rt(b)) {
|
|
1555
|
+
c.update(b, L);
|
|
1534
1556
|
return;
|
|
1535
1557
|
}
|
|
1536
|
-
const
|
|
1537
|
-
switch (
|
|
1558
|
+
const W = E(b, L) ?? y("NotFound"), j = { ...A }, z = await i({ to: W, from: j, hooks: f });
|
|
1559
|
+
switch (z.status) {
|
|
1538
1560
|
// On abort do nothing
|
|
1539
1561
|
case "ABORT":
|
|
1540
1562
|
return;
|
|
1541
1563
|
// On push update the history, and push new route, and return
|
|
1542
1564
|
case "PUSH":
|
|
1543
|
-
|
|
1565
|
+
c.update(b, L), await w(...z.to);
|
|
1544
1566
|
return;
|
|
1545
1567
|
// On reject update the history, the route, and set the rejection type
|
|
1546
1568
|
case "REJECT":
|
|
1547
|
-
|
|
1569
|
+
c.update(b, L), g(z.type);
|
|
1548
1570
|
break;
|
|
1549
1571
|
// On success update history, set the route, and clear the rejection
|
|
1550
1572
|
case "SUCCESS":
|
|
1551
|
-
|
|
1573
|
+
c.update(b, L), g(null);
|
|
1552
1574
|
break;
|
|
1553
1575
|
default:
|
|
1554
|
-
throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(
|
|
1576
|
+
throw new Error(`Switch is not exhaustive for before hook response status: ${JSON.stringify(z)}`);
|
|
1555
1577
|
}
|
|
1556
|
-
const
|
|
1557
|
-
a.setProps(
|
|
1558
|
-
if (
|
|
1559
|
-
switch (
|
|
1578
|
+
const Ce = Q;
|
|
1579
|
+
a.setProps(W).then((D) => {
|
|
1580
|
+
if (Ce === Q)
|
|
1581
|
+
switch (D.status) {
|
|
1560
1582
|
case "SUCCESS":
|
|
1561
1583
|
break;
|
|
1562
1584
|
case "PUSH":
|
|
1563
|
-
|
|
1585
|
+
w(...D.to);
|
|
1564
1586
|
break;
|
|
1565
1587
|
case "REJECT":
|
|
1566
|
-
|
|
1588
|
+
g(D.type);
|
|
1567
1589
|
break;
|
|
1568
1590
|
default:
|
|
1569
|
-
const
|
|
1570
|
-
throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(
|
|
1591
|
+
const Be = D;
|
|
1592
|
+
throw new Error(`Switch is not exhaustive for prop store response status: ${JSON.stringify(Be)}`);
|
|
1571
1593
|
}
|
|
1572
|
-
}),
|
|
1573
|
-
const
|
|
1574
|
-
switch (
|
|
1594
|
+
}), B(W);
|
|
1595
|
+
const O = await u({ to: W, from: j, hooks: f });
|
|
1596
|
+
switch (O.status) {
|
|
1575
1597
|
case "PUSH":
|
|
1576
|
-
await
|
|
1598
|
+
await w(...O.to);
|
|
1577
1599
|
break;
|
|
1578
1600
|
case "REJECT":
|
|
1579
|
-
|
|
1601
|
+
g(O.type);
|
|
1580
1602
|
break;
|
|
1581
1603
|
case "SUCCESS":
|
|
1582
1604
|
break;
|
|
1583
1605
|
default:
|
|
1584
|
-
const
|
|
1585
|
-
throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(
|
|
1606
|
+
const D = O;
|
|
1607
|
+
throw new Error(`Switch is not exhaustive for after hook response status: ${JSON.stringify(D)}`);
|
|
1586
1608
|
}
|
|
1587
|
-
|
|
1588
|
-
}
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1609
|
+
c.startListening();
|
|
1610
|
+
}
|
|
1611
|
+
const m = (b, L = {}, Q = {}) => {
|
|
1612
|
+
const W = n.find((j) => j.name === b);
|
|
1613
|
+
if (!W)
|
|
1614
|
+
throw new Sn(String(b));
|
|
1615
|
+
return Hn(W, L, Q);
|
|
1616
|
+
}, w = (b, L, Q) => {
|
|
1617
|
+
if (I(b)) {
|
|
1618
|
+
const O = { ...L }, D = pt(b, {
|
|
1619
|
+
searchParams: O.query,
|
|
1620
|
+
hash: O.hash
|
|
1621
|
+
});
|
|
1622
|
+
return k(D, O);
|
|
1593
1623
|
}
|
|
1594
|
-
if (
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
return ft(r, Q);
|
|
1598
|
-
}, d = (E, B, J) => {
|
|
1599
|
-
if (I(E)) {
|
|
1600
|
-
const $ = { ...B }, q = Ne(E, $.query);
|
|
1601
|
-
return R(q, $);
|
|
1624
|
+
if (typeof b == "string") {
|
|
1625
|
+
const { replace: O, ...D } = { ...Q }, Be = { ...L }, Ne = m(b, Be, D), fr = ft({ ...Ne.matched.state }, { ...Ne.state, ...D.state });
|
|
1626
|
+
return k(Ne.href, { replace: O, state: fr });
|
|
1602
1627
|
}
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
return
|
|
1608
|
-
},
|
|
1609
|
-
if (I(
|
|
1610
|
-
const
|
|
1611
|
-
return
|
|
1628
|
+
const { replace: W, ...j } = { ...L }, z = ft({ ...b.matched.state }, { ...b.state, ...j.state }), Ce = pt(b.href, {
|
|
1629
|
+
searchParams: j.query,
|
|
1630
|
+
hash: j.hash
|
|
1631
|
+
});
|
|
1632
|
+
return k(Ce, { replace: W, state: z });
|
|
1633
|
+
}, x = (b, L, Q) => {
|
|
1634
|
+
if (I(b)) {
|
|
1635
|
+
const j = { ...L, replace: !0 };
|
|
1636
|
+
return w(b, j);
|
|
1637
|
+
}
|
|
1638
|
+
if (typeof b == "string") {
|
|
1639
|
+
const j = { ...Q, replace: !0 }, z = { ...L };
|
|
1640
|
+
return w(b, z, j);
|
|
1612
1641
|
}
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
isExternal: ye,
|
|
1642
|
-
onBeforeRouteEnter: p,
|
|
1642
|
+
const W = { ...L, replace: !0 };
|
|
1643
|
+
return w(b, W);
|
|
1644
|
+
}, U = (b) => {
|
|
1645
|
+
g(b);
|
|
1646
|
+
}, { setRejection: g, rejection: l, getRejectionRoute: y } = cn(t ?? {}), S = y("NotFound"), { currentRoute: A, routerRoute: C, updateRoute: B } = Gr(S, w);
|
|
1647
|
+
c.startListening();
|
|
1648
|
+
const H = fn(t == null ? void 0 : t.initialUrl), M = c.location.state, { host: tt } = _(H), rt = Xr(tt);
|
|
1649
|
+
let nt = !1;
|
|
1650
|
+
async function ot() {
|
|
1651
|
+
nt || (await k(H, { replace: !0, state: M }), nt = !0);
|
|
1652
|
+
}
|
|
1653
|
+
function ir(b) {
|
|
1654
|
+
b.component("RouterView", so), b.component("RouterLink", to), b.provide(Nt, l), b.provide(qt, f), b.provide(nr, a), b.provide(It, s), b.provide(bt, at), ot();
|
|
1655
|
+
}
|
|
1656
|
+
const at = {
|
|
1657
|
+
route: C,
|
|
1658
|
+
resolve: m,
|
|
1659
|
+
find: E,
|
|
1660
|
+
push: w,
|
|
1661
|
+
replace: x,
|
|
1662
|
+
reject: U,
|
|
1663
|
+
refresh: c.refresh,
|
|
1664
|
+
forward: c.forward,
|
|
1665
|
+
back: c.back,
|
|
1666
|
+
go: c.go,
|
|
1667
|
+
install: ir,
|
|
1668
|
+
isExternal: rt,
|
|
1669
|
+
onBeforeRouteEnter: d,
|
|
1643
1670
|
onAfterRouteUpdate: P,
|
|
1644
|
-
onBeforeRouteLeave:
|
|
1645
|
-
onAfterRouteEnter:
|
|
1671
|
+
onBeforeRouteLeave: p,
|
|
1672
|
+
onAfterRouteEnter: h,
|
|
1646
1673
|
onBeforeRouteUpdate: v,
|
|
1647
|
-
onAfterRouteLeave:
|
|
1674
|
+
onAfterRouteLeave: R,
|
|
1648
1675
|
prefetch: t == null ? void 0 : t.prefetch,
|
|
1649
|
-
start:
|
|
1676
|
+
start: ot
|
|
1650
1677
|
};
|
|
1651
|
-
return
|
|
1678
|
+
return at;
|
|
1652
1679
|
}
|
|
1653
|
-
function
|
|
1680
|
+
function dt(e, t) {
|
|
1654
1681
|
return {
|
|
1655
1682
|
value: e,
|
|
1656
|
-
params:
|
|
1683
|
+
params: Ge(e, t)
|
|
1657
1684
|
};
|
|
1658
1685
|
}
|
|
1659
1686
|
function Gt(e, t) {
|
|
1660
1687
|
return {
|
|
1661
1688
|
value: e,
|
|
1662
|
-
params:
|
|
1689
|
+
params: Ge(e, t)
|
|
1663
1690
|
};
|
|
1664
1691
|
}
|
|
1665
|
-
function
|
|
1692
|
+
function On(e) {
|
|
1666
1693
|
return de(e) && typeof e.hash == "string";
|
|
1667
1694
|
}
|
|
1668
1695
|
function Kt(e) {
|
|
1669
|
-
return e === void 0 ?
|
|
1696
|
+
return e === void 0 ? ve() : On(e) ? e : ve(e);
|
|
1670
1697
|
}
|
|
1671
|
-
function
|
|
1698
|
+
function Yt(e) {
|
|
1672
1699
|
return e === void 0 ? "" : e;
|
|
1673
1700
|
}
|
|
1674
|
-
function
|
|
1701
|
+
function Tn(e) {
|
|
1675
1702
|
return de(e) && typeof e.value == "string";
|
|
1676
1703
|
}
|
|
1677
|
-
function
|
|
1678
|
-
return e === void 0 ?
|
|
1704
|
+
function Xt(e) {
|
|
1705
|
+
return e === void 0 ? je("", {}) : Tn(e) ? e : je(e, {});
|
|
1679
1706
|
}
|
|
1680
|
-
function
|
|
1707
|
+
function In(e) {
|
|
1681
1708
|
return de(e) && typeof e.value == "string";
|
|
1682
1709
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return e === void 0 ?
|
|
1710
|
+
function Zt(e) {
|
|
1711
|
+
return e === void 0 ? dt("", {}) : In(e) ? e : dt(e, {});
|
|
1685
1712
|
}
|
|
1686
1713
|
function oe(e) {
|
|
1687
|
-
const t = Je(),
|
|
1714
|
+
const t = Je(), r = Yt(e.name), n = Xt(e.path), o = Zt(e.query), a = Kt(e.hash), s = e.meta ?? {}, c = qr(e) ? e.state : {}, i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
|
|
1688
1715
|
id: t,
|
|
1689
|
-
matched:
|
|
1690
|
-
matches: [
|
|
1691
|
-
name:
|
|
1692
|
-
path:
|
|
1716
|
+
matched: i,
|
|
1717
|
+
matches: [i],
|
|
1718
|
+
name: r,
|
|
1719
|
+
path: n,
|
|
1693
1720
|
query: o,
|
|
1694
1721
|
hash: a,
|
|
1695
|
-
meta:
|
|
1696
|
-
state:
|
|
1722
|
+
meta: s,
|
|
1723
|
+
state: c,
|
|
1697
1724
|
depth: 1,
|
|
1698
1725
|
host: Gt("", {}),
|
|
1699
1726
|
prefetch: e.prefetch
|
|
1700
|
-
}, f =
|
|
1727
|
+
}, f = kt(e) ? At(e.parent, u) : u;
|
|
1701
1728
|
return ce(f.path.params, f.query.params), f;
|
|
1702
1729
|
}
|
|
1703
|
-
const
|
|
1730
|
+
const Ae = { template: "<div>This is component</div>" }, Xe = oe({
|
|
1704
1731
|
name: "parentA",
|
|
1705
1732
|
path: "/parentA/[paramA]"
|
|
1706
|
-
}),
|
|
1707
|
-
parent:
|
|
1733
|
+
}), er = oe({
|
|
1734
|
+
parent: Xe,
|
|
1708
1735
|
name: "parentA.childA",
|
|
1709
1736
|
path: "/[?paramB]"
|
|
1710
|
-
}),
|
|
1711
|
-
parent:
|
|
1737
|
+
}), Fn = oe({
|
|
1738
|
+
parent: Xe,
|
|
1712
1739
|
name: "parentA.childB",
|
|
1713
1740
|
path: "/[paramD]",
|
|
1714
|
-
component:
|
|
1715
|
-
}),
|
|
1716
|
-
parent:
|
|
1741
|
+
component: Ae
|
|
1742
|
+
}), Jn = oe({
|
|
1743
|
+
parent: er,
|
|
1717
1744
|
name: "parentA.childA.grandChildA",
|
|
1718
1745
|
path: "/[paramC]",
|
|
1719
|
-
component:
|
|
1746
|
+
component: Ae
|
|
1720
1747
|
});
|
|
1721
1748
|
oe({
|
|
1722
1749
|
name: "parentB",
|
|
1723
1750
|
path: "/parentB",
|
|
1724
|
-
component:
|
|
1751
|
+
component: Ae
|
|
1725
1752
|
}), oe({
|
|
1726
1753
|
name: "parentC",
|
|
1727
1754
|
path: "/",
|
|
1728
|
-
component:
|
|
1755
|
+
component: Ae
|
|
1729
1756
|
});
|
|
1730
|
-
const
|
|
1757
|
+
const Qn = "lazy", zn = {
|
|
1731
1758
|
components: !0,
|
|
1732
1759
|
props: !1
|
|
1733
1760
|
};
|
|
1734
|
-
function
|
|
1761
|
+
function me(e) {
|
|
1735
1762
|
return ["eager", "lazy"].includes(e);
|
|
1736
1763
|
}
|
|
1737
|
-
function
|
|
1738
|
-
const o = Ve(
|
|
1764
|
+
function tr({ routerPrefetch: e, routePrefetch: t, linkPrefetch: r }, n) {
|
|
1765
|
+
const o = Ve(r, n), a = Ve(t, n), s = Ve(e, n), c = [
|
|
1739
1766
|
o,
|
|
1740
1767
|
a,
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
].reduce((
|
|
1745
|
-
return
|
|
1768
|
+
s,
|
|
1769
|
+
zn[n],
|
|
1770
|
+
Qn
|
|
1771
|
+
].reduce((i, u) => me(i) ? i : i === !0 && me(u) ? u : i === !0 && !me(u) ? i : i === void 0 ? u : i, void 0);
|
|
1772
|
+
return me(c) ? c : !1;
|
|
1746
1773
|
}
|
|
1747
1774
|
function Ve(e, t) {
|
|
1748
1775
|
return de(e) ? e[t] : e;
|
|
1749
1776
|
}
|
|
1750
|
-
function
|
|
1777
|
+
function rr(e) {
|
|
1751
1778
|
return typeof e == "object" && e !== null && "then" in e;
|
|
1752
1779
|
}
|
|
1753
|
-
function
|
|
1780
|
+
function mt(e) {
|
|
1754
1781
|
try {
|
|
1755
1782
|
const t = e();
|
|
1756
|
-
return
|
|
1783
|
+
return rr(t) ? t.catch((r) => r) : t;
|
|
1757
1784
|
} catch (t) {
|
|
1758
1785
|
return t;
|
|
1759
1786
|
}
|
|
1760
1787
|
}
|
|
1761
|
-
const
|
|
1762
|
-
function
|
|
1763
|
-
const e =
|
|
1764
|
-
if (!
|
|
1765
|
-
return
|
|
1766
|
-
const
|
|
1788
|
+
const nr = Symbol();
|
|
1789
|
+
function Gn() {
|
|
1790
|
+
const e = xe(/* @__PURE__ */ new Map()), { push: t, replace: r, reject: n } = $t(), o = (d, P, p) => P.matches.filter((h) => tr({ ...p, routePrefetch: h.prefetch }, "props") === d).flatMap((h) => u(h)).reduce((h, { id: v, name: R, props: E }) => {
|
|
1791
|
+
if (!E)
|
|
1792
|
+
return h;
|
|
1793
|
+
const k = i(v, R, P), m = mt(() => E(P, {
|
|
1767
1794
|
push: t,
|
|
1768
|
-
replace:
|
|
1769
|
-
reject:
|
|
1795
|
+
replace: r,
|
|
1796
|
+
reject: n
|
|
1770
1797
|
}));
|
|
1771
|
-
return
|
|
1772
|
-
}, {}), a = (
|
|
1773
|
-
Object.entries(
|
|
1774
|
-
e.set(P,
|
|
1798
|
+
return h[k] = m, h;
|
|
1799
|
+
}, {}), a = (d) => {
|
|
1800
|
+
Object.entries(d).forEach(([P, p]) => {
|
|
1801
|
+
e.set(P, p);
|
|
1775
1802
|
});
|
|
1776
|
-
},
|
|
1777
|
-
const P =
|
|
1778
|
-
for (const { id: v, name:
|
|
1779
|
-
if (!
|
|
1803
|
+
}, s = async (d) => {
|
|
1804
|
+
const P = d.matches.flatMap(u), p = [], h = [];
|
|
1805
|
+
for (const { id: v, name: R, props: E } of P) {
|
|
1806
|
+
if (!E)
|
|
1780
1807
|
continue;
|
|
1781
|
-
const
|
|
1782
|
-
if (
|
|
1783
|
-
const
|
|
1808
|
+
const k = i(v, R, d);
|
|
1809
|
+
if (p.push(k), !e.has(k)) {
|
|
1810
|
+
const m = mt(() => E(d, {
|
|
1784
1811
|
push: t,
|
|
1785
|
-
replace:
|
|
1786
|
-
reject:
|
|
1812
|
+
replace: r,
|
|
1813
|
+
reject: n
|
|
1787
1814
|
}));
|
|
1788
|
-
e.set(
|
|
1815
|
+
e.set(k, m);
|
|
1789
1816
|
}
|
|
1790
|
-
|
|
1791
|
-
const
|
|
1792
|
-
if (
|
|
1793
|
-
throw
|
|
1817
|
+
h.push((async () => {
|
|
1818
|
+
const m = await e.get(k);
|
|
1819
|
+
if (m instanceof Error)
|
|
1820
|
+
throw m;
|
|
1794
1821
|
})());
|
|
1795
1822
|
}
|
|
1796
|
-
f(
|
|
1823
|
+
f(p);
|
|
1797
1824
|
try {
|
|
1798
|
-
return await Promise.all(
|
|
1825
|
+
return await Promise.all(h), { status: "SUCCESS" };
|
|
1799
1826
|
} catch (v) {
|
|
1800
|
-
if (v instanceof te || v instanceof
|
|
1827
|
+
if (v instanceof te || v instanceof be)
|
|
1801
1828
|
return v.response;
|
|
1802
1829
|
throw v;
|
|
1803
1830
|
}
|
|
1804
|
-
},
|
|
1805
|
-
const
|
|
1806
|
-
return e.get(
|
|
1831
|
+
}, c = (d, P, p) => {
|
|
1832
|
+
const h = i(d, P, p);
|
|
1833
|
+
return e.get(h);
|
|
1807
1834
|
};
|
|
1808
|
-
function
|
|
1809
|
-
return [
|
|
1835
|
+
function i(d, P, p) {
|
|
1836
|
+
return [d, P, p.id, JSON.stringify(p.params)].join("-");
|
|
1810
1837
|
}
|
|
1811
|
-
function
|
|
1812
|
-
return We(
|
|
1838
|
+
function u(d) {
|
|
1839
|
+
return We(d) ? Object.entries(d.props ?? {}).map(([P, p]) => ({ id: d.id, name: P, props: p })) : Me(d) ? [
|
|
1813
1840
|
{
|
|
1814
|
-
id:
|
|
1841
|
+
id: d.id,
|
|
1815
1842
|
name: "default",
|
|
1816
|
-
props:
|
|
1843
|
+
props: d.props
|
|
1817
1844
|
}
|
|
1818
1845
|
] : [];
|
|
1819
1846
|
}
|
|
1820
|
-
function f(
|
|
1847
|
+
function f(d) {
|
|
1821
1848
|
for (const P in e.keys())
|
|
1822
|
-
|
|
1849
|
+
d.includes(P) || e.delete(P);
|
|
1823
1850
|
}
|
|
1824
1851
|
return {
|
|
1825
1852
|
getPrefetchProps: o,
|
|
1826
1853
|
setPrefetchProps: a,
|
|
1827
|
-
getProps:
|
|
1828
|
-
setProps:
|
|
1854
|
+
getProps: c,
|
|
1855
|
+
setProps: s
|
|
1829
1856
|
};
|
|
1830
1857
|
}
|
|
1831
|
-
function
|
|
1832
|
-
const e = ae(
|
|
1858
|
+
function or() {
|
|
1859
|
+
const e = ae(nr);
|
|
1833
1860
|
if (!e)
|
|
1834
1861
|
throw new pe();
|
|
1835
1862
|
return e;
|
|
1836
1863
|
}
|
|
1837
|
-
const
|
|
1864
|
+
const Kn = dr(() => new Promise((e) => {
|
|
1838
1865
|
e({ default: { template: "foo" } });
|
|
1839
1866
|
}));
|
|
1840
|
-
function
|
|
1841
|
-
return e.name ===
|
|
1867
|
+
function yt(e) {
|
|
1868
|
+
return e.name === Kn.name && "__asyncLoader" in e;
|
|
1842
1869
|
}
|
|
1843
|
-
function
|
|
1844
|
-
const t = /* @__PURE__ */ new Map(),
|
|
1845
|
-
const
|
|
1846
|
-
o(
|
|
1870
|
+
function Yn(e) {
|
|
1871
|
+
const t = /* @__PURE__ */ new Map(), r = qe(), { getPrefetchProps: n, setPrefetchProps: o } = or(), { isElementVisible: a } = bn(r), s = () => {
|
|
1872
|
+
const i = Array.from(t.values()).reduce((u, f) => (Object.assign(u, f), u), {});
|
|
1873
|
+
o(i);
|
|
1847
1874
|
};
|
|
1848
|
-
|
|
1849
|
-
t.clear(),
|
|
1850
|
-
}, { immediate: !0 }),
|
|
1851
|
-
const { route:
|
|
1852
|
-
!
|
|
1875
|
+
ge(() => $(e), ({ route: i, ...u }) => {
|
|
1876
|
+
t.clear(), i && c("eager", i, u);
|
|
1877
|
+
}, { immediate: !0 }), ge(a, (i) => {
|
|
1878
|
+
const { route: u, ...f } = $(e);
|
|
1879
|
+
!u || !i || c("lazy", u, f);
|
|
1853
1880
|
}, { immediate: !0 });
|
|
1854
|
-
function
|
|
1855
|
-
|
|
1881
|
+
function c(i, u, f) {
|
|
1882
|
+
Xn(i, u, f), t.has(i) || t.set(i, n(i, u, f));
|
|
1856
1883
|
}
|
|
1857
1884
|
return {
|
|
1858
|
-
element:
|
|
1859
|
-
commit:
|
|
1885
|
+
element: r,
|
|
1886
|
+
commit: s
|
|
1860
1887
|
};
|
|
1861
1888
|
}
|
|
1862
|
-
function
|
|
1863
|
-
t.matches.forEach((
|
|
1864
|
-
|
|
1865
|
-
...
|
|
1866
|
-
routePrefetch:
|
|
1867
|
-
}, "components") === e && (
|
|
1868
|
-
|
|
1889
|
+
function Xn(e, t, r) {
|
|
1890
|
+
t.matches.forEach((n) => {
|
|
1891
|
+
tr({
|
|
1892
|
+
...r,
|
|
1893
|
+
routePrefetch: n.prefetch
|
|
1894
|
+
}, "components") === e && (Me(n) && yt(n.component) && n.component.__asyncLoader(), We(n) && Object.values(n.components).forEach((a) => {
|
|
1895
|
+
yt(a) && a.__asyncLoader();
|
|
1869
1896
|
}));
|
|
1870
1897
|
});
|
|
1871
1898
|
}
|
|
1872
|
-
function
|
|
1873
|
-
return
|
|
1899
|
+
function ar(e, t, { exact: r } = {}) {
|
|
1900
|
+
return Qr(e) ? t === void 0 ? !0 : r ? e.matched.name === t : e.matches.map((n) => n.name).includes(t) : !1;
|
|
1874
1901
|
}
|
|
1875
|
-
function
|
|
1876
|
-
const
|
|
1877
|
-
const
|
|
1878
|
-
return typeof
|
|
1902
|
+
function Zn(e, t = {}, r = {}) {
|
|
1903
|
+
const n = _e(), o = N(() => {
|
|
1904
|
+
const h = $(e);
|
|
1905
|
+
return typeof h != "string" ? h : I(h) ? n.find(h, $(r)) : n.resolve(h, $(t), $(r));
|
|
1879
1906
|
}), a = N(() => {
|
|
1880
1907
|
if (o.value)
|
|
1881
1908
|
return o.value.href;
|
|
1882
|
-
const
|
|
1883
|
-
if (I(
|
|
1884
|
-
return
|
|
1909
|
+
const h = $(e);
|
|
1910
|
+
if (I(h))
|
|
1911
|
+
return h;
|
|
1885
1912
|
console.error(new Error("Failed to resolve route in RouterLink."));
|
|
1886
|
-
}),
|
|
1913
|
+
}), s = N(() => ar(n.route) && n.route.matches.some((h) => {
|
|
1887
1914
|
var v;
|
|
1888
|
-
return
|
|
1889
|
-
})),
|
|
1890
|
-
var
|
|
1891
|
-
return
|
|
1892
|
-
}),
|
|
1893
|
-
const
|
|
1894
|
-
return typeof
|
|
1895
|
-
}), { element: f, commit:
|
|
1915
|
+
return h.id === ((v = o.value) == null ? void 0 : v.id);
|
|
1916
|
+
})), c = N(() => {
|
|
1917
|
+
var h;
|
|
1918
|
+
return n.route.id === ((h = o.value) == null ? void 0 : h.id);
|
|
1919
|
+
}), i = N(() => !!a.value && n.isExternal(a.value)), u = N(() => {
|
|
1920
|
+
const h = $(e);
|
|
1921
|
+
return typeof h != "string" || I(h) ? $(t) : $(r);
|
|
1922
|
+
}), { element: f, commit: d } = Yn(() => ({
|
|
1896
1923
|
route: o.value,
|
|
1897
|
-
routerPrefetch:
|
|
1898
|
-
linkPrefetch:
|
|
1899
|
-
})), P = (
|
|
1924
|
+
routerPrefetch: n.prefetch,
|
|
1925
|
+
linkPrefetch: u.value.prefetch
|
|
1926
|
+
})), P = (h) => {
|
|
1927
|
+
d();
|
|
1928
|
+
const v = {
|
|
1929
|
+
replace: (h == null ? void 0 : h.replace) ?? u.value.replace,
|
|
1930
|
+
query: Ke(u.value.query, h == null ? void 0 : h.query),
|
|
1931
|
+
hash: (h == null ? void 0 : h.hash) ?? u.value.hash,
|
|
1932
|
+
state: { ...u.value.state, ...h == null ? void 0 : h.state }
|
|
1933
|
+
}, R = $(e);
|
|
1934
|
+
return I(R) || typeof R == "object" ? n.push(R, v) : n.push(R, $(t), v);
|
|
1935
|
+
};
|
|
1900
1936
|
return {
|
|
1901
1937
|
element: f,
|
|
1902
1938
|
route: o,
|
|
1903
1939
|
href: a,
|
|
1904
|
-
isMatch:
|
|
1905
|
-
isExactMatch:
|
|
1906
|
-
isExternal:
|
|
1940
|
+
isMatch: s,
|
|
1941
|
+
isExactMatch: c,
|
|
1942
|
+
isExternal: i,
|
|
1907
1943
|
push: P,
|
|
1908
|
-
replace: (
|
|
1944
|
+
replace: (h) => P({ ...h, replace: !0 })
|
|
1909
1945
|
};
|
|
1910
1946
|
}
|
|
1911
|
-
const
|
|
1947
|
+
const eo = ["href"], to = /* @__PURE__ */ se({
|
|
1912
1948
|
__name: "routerLink",
|
|
1913
1949
|
props: {
|
|
1914
1950
|
to: {},
|
|
@@ -1919,177 +1955,177 @@ const zr = ["href"], Yr = /* @__PURE__ */ se({
|
|
|
1919
1955
|
state: {}
|
|
1920
1956
|
},
|
|
1921
1957
|
setup(e) {
|
|
1922
|
-
const t = e,
|
|
1923
|
-
const { to: v, ...
|
|
1924
|
-
return
|
|
1925
|
-
}), { element:
|
|
1926
|
-
"router-link--match":
|
|
1927
|
-
"router-link--exact-match":
|
|
1958
|
+
const t = e, r = _e(), n = N(() => P(t.to)), o = N(() => p(t.to)), a = N(() => {
|
|
1959
|
+
const { to: v, ...R } = t;
|
|
1960
|
+
return R;
|
|
1961
|
+
}), { element: s, isMatch: c, isExactMatch: i, isExternal: u, push: f } = Zn(() => typeof t.to == "function" ? t.to(r.resolve) : t.to, a), d = N(() => ({
|
|
1962
|
+
"router-link--match": c.value,
|
|
1963
|
+
"router-link--exact-match": i.value
|
|
1928
1964
|
}));
|
|
1929
1965
|
function P(v) {
|
|
1930
1966
|
if (typeof v == "function") {
|
|
1931
|
-
const
|
|
1932
|
-
return P(
|
|
1967
|
+
const R = v(r.resolve);
|
|
1968
|
+
return P(R);
|
|
1933
1969
|
}
|
|
1934
|
-
return I(v) ?
|
|
1970
|
+
return I(v) ? r.find(v) : v;
|
|
1935
1971
|
}
|
|
1936
|
-
function
|
|
1972
|
+
function p(v) {
|
|
1937
1973
|
if (typeof v == "function") {
|
|
1938
|
-
const
|
|
1939
|
-
return
|
|
1974
|
+
const R = v(r.resolve);
|
|
1975
|
+
return p(R);
|
|
1940
1976
|
}
|
|
1941
1977
|
return I(v) ? v : v == null ? void 0 : v.href;
|
|
1942
1978
|
}
|
|
1943
|
-
function
|
|
1979
|
+
function h(v) {
|
|
1944
1980
|
v.preventDefault(), f();
|
|
1945
1981
|
}
|
|
1946
|
-
return (v,
|
|
1982
|
+
return (v, R) => (vt(), mr("a", {
|
|
1947
1983
|
ref_key: "element",
|
|
1948
|
-
ref:
|
|
1984
|
+
ref: s,
|
|
1949
1985
|
href: o.value,
|
|
1950
|
-
class:
|
|
1951
|
-
onClick:
|
|
1986
|
+
class: yr(["router-link", d.value]),
|
|
1987
|
+
onClick: h
|
|
1952
1988
|
}, [
|
|
1953
|
-
|
|
1954
|
-
], 10,
|
|
1989
|
+
Rt(v.$slots, "default", wt(gr({ route: n.value, isMatch: ue(c), isExactMatch: ue(i), isExternal: ue(u) })))
|
|
1990
|
+
], 10, eo));
|
|
1955
1991
|
}
|
|
1956
1992
|
});
|
|
1957
|
-
function
|
|
1958
|
-
const
|
|
1959
|
-
function
|
|
1993
|
+
function ro(e, t) {
|
|
1994
|
+
const r = _e();
|
|
1995
|
+
function n() {
|
|
1960
1996
|
if (!e)
|
|
1961
1997
|
return;
|
|
1962
|
-
if (!
|
|
1963
|
-
throw new
|
|
1998
|
+
if (!ar(r.route, e, t))
|
|
1999
|
+
throw new xr(e, r.route.name);
|
|
1964
2000
|
}
|
|
1965
|
-
return
|
|
2001
|
+
return ge(r.route, n, { immediate: !0, deep: !0 }), r.route;
|
|
1966
2002
|
}
|
|
1967
|
-
const
|
|
1968
|
-
function
|
|
1969
|
-
return ae(
|
|
2003
|
+
const sr = Symbol();
|
|
2004
|
+
function Ze() {
|
|
2005
|
+
return ae(sr, 0);
|
|
1970
2006
|
}
|
|
1971
|
-
function
|
|
2007
|
+
function no(e, t) {
|
|
1972
2008
|
return se({
|
|
1973
2009
|
name: "PropsWrapper",
|
|
1974
2010
|
expose: [],
|
|
1975
2011
|
setup() {
|
|
1976
|
-
const
|
|
1977
|
-
return () =>
|
|
2012
|
+
const r = t(), n = vr();
|
|
2013
|
+
return () => r instanceof Error ? "" : rr(r) ? n != null && n.suspense ? Z(ao(e, r)) : Z(oo(e, r)) : Z(e, r);
|
|
1978
2014
|
}
|
|
1979
2015
|
});
|
|
1980
2016
|
}
|
|
1981
|
-
function
|
|
2017
|
+
function oo(e, t) {
|
|
1982
2018
|
return se({
|
|
1983
2019
|
name: "AsyncPropsWrapper",
|
|
1984
2020
|
expose: [],
|
|
1985
2021
|
setup() {
|
|
1986
|
-
const
|
|
1987
|
-
return (async () =>
|
|
2022
|
+
const r = qe();
|
|
2023
|
+
return (async () => r.value = await t)(), () => r.value instanceof Error ? "" : r.value ? Z(e, r.value) : "";
|
|
1988
2024
|
}
|
|
1989
2025
|
});
|
|
1990
2026
|
}
|
|
1991
|
-
function
|
|
2027
|
+
function ao(e, t) {
|
|
1992
2028
|
return se({
|
|
1993
2029
|
name: "SuspenseAsyncPropsWrapper",
|
|
1994
2030
|
expose: [],
|
|
1995
2031
|
async setup() {
|
|
1996
|
-
const
|
|
1997
|
-
return () => Z(e,
|
|
2032
|
+
const r = await t;
|
|
2033
|
+
return () => Z(e, r);
|
|
1998
2034
|
}
|
|
1999
2035
|
});
|
|
2000
2036
|
}
|
|
2001
|
-
const
|
|
2037
|
+
const so = /* @__PURE__ */ se({
|
|
2002
2038
|
__name: "routerView",
|
|
2003
2039
|
props: {
|
|
2004
2040
|
name: { default: "default" }
|
|
2005
2041
|
},
|
|
2006
2042
|
setup(e) {
|
|
2007
|
-
const t =
|
|
2008
|
-
|
|
2009
|
-
const
|
|
2010
|
-
if (
|
|
2011
|
-
return
|
|
2012
|
-
const
|
|
2013
|
-
if (!
|
|
2043
|
+
const t = ro(), r = Jr(), n = Ze(), { getProps: o } = or(), a = Rr("RouterView", !0);
|
|
2044
|
+
wr(sr, n + 1);
|
|
2045
|
+
const s = N(() => {
|
|
2046
|
+
if (r.value)
|
|
2047
|
+
return r.value.component;
|
|
2048
|
+
const u = t.matches.at(n);
|
|
2049
|
+
if (!u)
|
|
2014
2050
|
return null;
|
|
2015
|
-
const f =
|
|
2016
|
-
return f ?
|
|
2051
|
+
const f = c(u), d = o(u.id, e.name, t);
|
|
2052
|
+
return f ? d ? no(f, () => d) : f : null;
|
|
2017
2053
|
});
|
|
2018
|
-
function
|
|
2019
|
-
return u
|
|
2054
|
+
function c(u) {
|
|
2055
|
+
return i(u)[e.name];
|
|
2020
2056
|
}
|
|
2021
|
-
function u
|
|
2022
|
-
return We(
|
|
2057
|
+
function i(u) {
|
|
2058
|
+
return We(u) ? u.components : Me(u) ? { default: u.component } : typeof a == "string" ? {} : { default: a };
|
|
2023
2059
|
}
|
|
2024
|
-
return (
|
|
2025
|
-
(
|
|
2026
|
-
]) :
|
|
2060
|
+
return (u, f) => s.value ? Rt(u.$slots, "default", wt(Pr({ key: 0 }, { route: ue(t), component: s.value, rejection: ue(r) })), () => [
|
|
2061
|
+
(vt(), Er(br(s.value)))
|
|
2062
|
+
]) : Sr("", !0);
|
|
2027
2063
|
}
|
|
2028
2064
|
});
|
|
2029
|
-
function
|
|
2030
|
-
const e = ae(
|
|
2065
|
+
function cr() {
|
|
2066
|
+
const e = ae(qt);
|
|
2031
2067
|
if (!e)
|
|
2032
2068
|
throw new pe();
|
|
2033
2069
|
return e;
|
|
2034
2070
|
}
|
|
2035
|
-
function
|
|
2071
|
+
function ur(e) {
|
|
2036
2072
|
return (t) => {
|
|
2037
|
-
const
|
|
2038
|
-
return
|
|
2073
|
+
const r = Ze(), o = cr().addBeforeRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
|
|
2074
|
+
return Pt(o), o;
|
|
2039
2075
|
};
|
|
2040
2076
|
}
|
|
2041
|
-
function
|
|
2077
|
+
function et(e) {
|
|
2042
2078
|
return (t) => {
|
|
2043
|
-
const
|
|
2044
|
-
return
|
|
2079
|
+
const r = Ze(), o = cr().addAfterRouteHook({ lifecycle: e, hook: t, depth: r, timing: "component" });
|
|
2080
|
+
return Pt(o), o;
|
|
2045
2081
|
};
|
|
2046
2082
|
}
|
|
2047
|
-
const
|
|
2048
|
-
function
|
|
2083
|
+
const ho = ur("onBeforeRouteUpdate"), po = ur("onBeforeRouteLeave"), mo = et("onAfterRouteEnter"), yo = et("onAfterRouteUpdate"), go = et("onAfterRouteLeave");
|
|
2084
|
+
function co(e) {
|
|
2049
2085
|
return de(e) && typeof e.value == "string";
|
|
2050
2086
|
}
|
|
2051
|
-
function
|
|
2052
|
-
return
|
|
2087
|
+
function gt(e) {
|
|
2088
|
+
return co(e) ? e : Gt(e, {});
|
|
2053
2089
|
}
|
|
2054
|
-
function
|
|
2055
|
-
const t = Je(),
|
|
2090
|
+
function vo(e) {
|
|
2091
|
+
const t = Je(), r = Yt(e.name), n = Xt(e.path), o = Zt(e.query), a = Kt(e.hash), s = e.meta ?? {}, c = $r(e) ? gt(e.host) : gt(""), i = ye({ id: t, meta: {}, state: {}, ...e }), u = {
|
|
2056
2092
|
id: t,
|
|
2057
|
-
matched:
|
|
2058
|
-
matches: [
|
|
2059
|
-
name:
|
|
2060
|
-
host:
|
|
2061
|
-
path:
|
|
2093
|
+
matched: i,
|
|
2094
|
+
matches: [i],
|
|
2095
|
+
name: r,
|
|
2096
|
+
host: c,
|
|
2097
|
+
path: n,
|
|
2062
2098
|
query: o,
|
|
2063
2099
|
hash: a,
|
|
2064
|
-
meta:
|
|
2100
|
+
meta: s,
|
|
2065
2101
|
depth: 1,
|
|
2066
2102
|
state: {}
|
|
2067
|
-
}, f =
|
|
2103
|
+
}, f = kt(e) ? At(e.parent, u) : u;
|
|
2068
2104
|
return ce(f.path.params, f.query.params, f.host.params), f;
|
|
2069
2105
|
}
|
|
2070
2106
|
export {
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2107
|
+
kr as DuplicateParamsError,
|
|
2108
|
+
Ar as MetaPropertyConflict,
|
|
2109
|
+
to as RouterLink,
|
|
2074
2110
|
pe as RouterNotInstalledError,
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2111
|
+
so as RouterView,
|
|
2112
|
+
xr as UseRouteInvalidError,
|
|
2113
|
+
Et as asUrl,
|
|
2114
|
+
vo as createExternalRoute,
|
|
2115
|
+
Tr as createParam,
|
|
2080
2116
|
oe as createRoute,
|
|
2081
|
-
|
|
2082
|
-
|
|
2117
|
+
lo as createRouter,
|
|
2118
|
+
ar as isRoute,
|
|
2083
2119
|
I as isUrl,
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2120
|
+
mo as onAfterRouteEnter,
|
|
2121
|
+
yo as onAfterRouteLeave,
|
|
2122
|
+
go as onAfterRouteUpdate,
|
|
2123
|
+
ho as onBeforeRouteLeave,
|
|
2124
|
+
po as onBeforeRouteUpdate,
|
|
2125
|
+
je as path,
|
|
2126
|
+
dt as query,
|
|
2127
|
+
Zn as useLink,
|
|
2128
|
+
ro as useRoute,
|
|
2129
|
+
_e as useRouter,
|
|
2130
|
+
fo as withDefault
|
|
2095
2131
|
};
|