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