likec4 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__app__/src/chunks/{-index-overview-Csw3b-Fk.js → -index-overview-B8hfKX1i.js} +4 -4
- package/__app__/src/chunks/{index-DrdkNxpF.js → index-KI-kE60c.js} +14 -14
- package/__app__/src/chunks/{likec4-fsbHEjF3.js → likec4-B-gfuLMn.js} +2324 -2323
- package/__app__/src/chunks/{main-DbAbBULM.js → main-BJUkPUKs.js} +11045 -10302
- package/__app__/src/chunks/{mantine-BdYO4lQg.js → mantine-pfC7caNp.js} +4060 -4535
- package/__app__/src/chunks/{tanstack-router-H-3IPlI6.js → tanstack-router-CsfoXGgM.js} +730 -730
- package/__app__/src/main.js +1 -1
- package/__app__/src/style.css +1 -1
- package/__app__/webcomponent/webcomponent.js +43 -39161
- package/dist/cli/index.cjs +105 -89
- package/dist/cli/index.mjs +130 -114
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +140 -2
- package/dist/index.d.mts +140 -2
- package/dist/index.d.ts +140 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/likec4.CSvz6V2S.cjs +1782 -0
- package/dist/shared/likec4.DIBfXG6W.mjs +1782 -0
- package/icons/all.d.ts +1 -0
- package/icons/all.js +2 -0
- package/icons/azure/arc-postgre-sql.js +73 -0
- package/package.json +29 -24
- package/react/index.js +7135 -6574
- package/react/style.css +1 -1
- package/dist/chunks/prompt.cjs +0 -45
- package/dist/chunks/prompt.mjs +0 -45
- package/dist/shared/likec4.BH2DNgw1.mjs +0 -1855
- package/dist/shared/likec4.DIyCHEbR.cjs +0 -1855
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as C, jsxs as et, Fragment as Ft } from "react/jsx-runtime";
|
|
2
2
|
import * as b from "react";
|
|
3
|
-
import
|
|
3
|
+
import yt, { useRef as Tt } from "react";
|
|
4
4
|
import { flushSync as Bt } from "react-dom";
|
|
5
5
|
const de = "__TSR_index", dt = "popstate", ht = "beforeunload";
|
|
6
6
|
function St(t) {
|
|
7
7
|
let n = t.getLocation();
|
|
8
|
-
const e = /* @__PURE__ */ new Set(),
|
|
8
|
+
const e = /* @__PURE__ */ new Set(), o = (i) => {
|
|
9
9
|
n = t.getLocation(), e.forEach((a) => a({ location: n, action: i }));
|
|
10
|
-
},
|
|
11
|
-
t.notifyOnIndexChange ?? !0 ?
|
|
10
|
+
}, r = (i) => {
|
|
11
|
+
t.notifyOnIndexChange ?? !0 ? o(i) : n = t.getLocation();
|
|
12
12
|
}, s = async ({
|
|
13
13
|
task: i,
|
|
14
14
|
navigateOpts: a,
|
|
15
|
-
...
|
|
15
|
+
...u
|
|
16
16
|
}) => {
|
|
17
17
|
var c, d;
|
|
18
18
|
if (a?.ignoreBlocker ?? !1) {
|
|
19
19
|
i();
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
const h = ((c = t.getBlockers) == null ? void 0 : c.call(t)) ?? [], f =
|
|
22
|
+
const h = ((c = t.getBlockers) == null ? void 0 : c.call(t)) ?? [], f = u.type === "PUSH" || u.type === "REPLACE";
|
|
23
23
|
if (typeof document < "u" && h.length && f)
|
|
24
24
|
for (const p of h) {
|
|
25
|
-
const S =
|
|
25
|
+
const S = ye(u.path, u.state);
|
|
26
26
|
if (await p.blockerFn({
|
|
27
27
|
currentLocation: n,
|
|
28
28
|
nextLocation: S,
|
|
29
|
-
action:
|
|
29
|
+
action: u.type
|
|
30
30
|
})) {
|
|
31
31
|
(d = t.onBlocked) == null || d.call(t);
|
|
32
32
|
return;
|
|
@@ -45,25 +45,25 @@ function St(t) {
|
|
|
45
45
|
subscribe: (i) => (e.add(i), () => {
|
|
46
46
|
e.delete(i);
|
|
47
47
|
}),
|
|
48
|
-
push: (i, a,
|
|
48
|
+
push: (i, a, u) => {
|
|
49
49
|
const c = n.state[de];
|
|
50
50
|
a = tt(c + 1, a), s({
|
|
51
51
|
task: () => {
|
|
52
|
-
t.pushState(i, a),
|
|
52
|
+
t.pushState(i, a), o({ type: "PUSH" });
|
|
53
53
|
},
|
|
54
|
-
navigateOpts:
|
|
54
|
+
navigateOpts: u,
|
|
55
55
|
type: "PUSH",
|
|
56
56
|
path: i,
|
|
57
57
|
state: a
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
|
-
replace: (i, a,
|
|
60
|
+
replace: (i, a, u) => {
|
|
61
61
|
const c = n.state[de];
|
|
62
62
|
a = tt(c, a), s({
|
|
63
63
|
task: () => {
|
|
64
|
-
t.replaceState(i, a),
|
|
64
|
+
t.replaceState(i, a), o({ type: "REPLACE" });
|
|
65
65
|
},
|
|
66
|
-
navigateOpts:
|
|
66
|
+
navigateOpts: u,
|
|
67
67
|
type: "REPLACE",
|
|
68
68
|
path: i,
|
|
69
69
|
state: a
|
|
@@ -72,7 +72,7 @@ function St(t) {
|
|
|
72
72
|
go: (i, a) => {
|
|
73
73
|
s({
|
|
74
74
|
task: () => {
|
|
75
|
-
t.go(i),
|
|
75
|
+
t.go(i), r({ type: "GO", index: i });
|
|
76
76
|
},
|
|
77
77
|
navigateOpts: a,
|
|
78
78
|
type: "GO"
|
|
@@ -81,7 +81,7 @@ function St(t) {
|
|
|
81
81
|
back: (i) => {
|
|
82
82
|
s({
|
|
83
83
|
task: () => {
|
|
84
|
-
t.back(i?.ignoreBlocker ?? !1),
|
|
84
|
+
t.back(i?.ignoreBlocker ?? !1), r({ type: "BACK" });
|
|
85
85
|
},
|
|
86
86
|
navigateOpts: i,
|
|
87
87
|
type: "BACK"
|
|
@@ -90,7 +90,7 @@ function St(t) {
|
|
|
90
90
|
forward: (i) => {
|
|
91
91
|
s({
|
|
92
92
|
task: () => {
|
|
93
|
-
t.forward(i?.ignoreBlocker ?? !1),
|
|
93
|
+
t.forward(i?.ignoreBlocker ?? !1), r({ type: "FORWARD" });
|
|
94
94
|
},
|
|
95
95
|
navigateOpts: i,
|
|
96
96
|
type: "FORWARD"
|
|
@@ -102,11 +102,11 @@ function St(t) {
|
|
|
102
102
|
var a;
|
|
103
103
|
if (!t.setBlockers) return () => {
|
|
104
104
|
};
|
|
105
|
-
const
|
|
106
|
-
return t.setBlockers([...
|
|
105
|
+
const u = ((a = t.getBlockers) == null ? void 0 : a.call(t)) ?? [];
|
|
106
|
+
return t.setBlockers([...u, i]), () => {
|
|
107
107
|
var c, d;
|
|
108
|
-
const
|
|
109
|
-
(d = t.setBlockers) == null || d.call(t,
|
|
108
|
+
const l = ((c = t.getBlockers) == null ? void 0 : c.call(t)) ?? [];
|
|
109
|
+
(d = t.setBlockers) == null || d.call(t, l.filter((h) => h !== i));
|
|
110
110
|
};
|
|
111
111
|
},
|
|
112
112
|
flush: () => {
|
|
@@ -117,7 +117,7 @@ function St(t) {
|
|
|
117
117
|
var i;
|
|
118
118
|
return (i = t.destroy) == null ? void 0 : i.call(t);
|
|
119
119
|
},
|
|
120
|
-
notify:
|
|
120
|
+
notify: o
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
123
|
function tt(t, n) {
|
|
@@ -128,37 +128,37 @@ function tt(t, n) {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
function _t(t) {
|
|
131
|
-
const n = t?.window ?? (typeof document < "u" ? window : void 0), e = n.history.pushState,
|
|
132
|
-
let
|
|
133
|
-
const s = () =>
|
|
131
|
+
const n = t?.window ?? (typeof document < "u" ? window : void 0), e = n.history.pushState, o = n.history.replaceState;
|
|
132
|
+
let r = [];
|
|
133
|
+
const s = () => r, i = (y) => r = y, a = t?.createHref ?? ((y) => y), u = t?.parseLocation ?? (() => ye(
|
|
134
134
|
`${n.location.pathname}${n.location.search}${n.location.hash}`,
|
|
135
135
|
n.history.state
|
|
136
136
|
));
|
|
137
|
-
let c =
|
|
137
|
+
let c = u(), d, l = !1, h = !1, f = !1, p = !1;
|
|
138
138
|
const S = () => c;
|
|
139
|
-
let
|
|
139
|
+
let g, M;
|
|
140
140
|
const R = () => {
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
g && (F._ignoreSubscribers = !0, (g.isPush ? n.history.pushState : n.history.replaceState)(
|
|
142
|
+
g.state,
|
|
143
143
|
"",
|
|
144
|
-
|
|
145
|
-
), F._ignoreSubscribers = !1,
|
|
146
|
-
}, L = (
|
|
144
|
+
g.href
|
|
145
|
+
), F._ignoreSubscribers = !1, g = void 0, M = void 0, d = void 0);
|
|
146
|
+
}, L = (y, _, E) => {
|
|
147
147
|
const m = a(_);
|
|
148
|
-
M || (d = c), c =
|
|
148
|
+
M || (d = c), c = ye(_, E), g = {
|
|
149
149
|
href: m,
|
|
150
150
|
state: E,
|
|
151
|
-
isPush:
|
|
151
|
+
isPush: g?.isPush || y === "push"
|
|
152
152
|
}, M || (M = Promise.resolve().then(() => R()));
|
|
153
|
-
}, P = (
|
|
154
|
-
c =
|
|
155
|
-
},
|
|
153
|
+
}, P = (y) => {
|
|
154
|
+
c = u(), F.notify({ type: y });
|
|
155
|
+
}, v = async () => {
|
|
156
156
|
if (h) {
|
|
157
157
|
h = !1;
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
|
|
160
|
+
const y = u(), _ = y.state[de] - c.state[de], E = _ === 1, m = _ === -1, w = !E && !m || l;
|
|
161
|
+
l = !1;
|
|
162
162
|
const k = w ? "GO" : m ? "BACK" : "FORWARD", T = w ? {
|
|
163
163
|
type: "GO",
|
|
164
164
|
index: _
|
|
@@ -173,7 +173,7 @@ function _t(t) {
|
|
|
173
173
|
for (const D of I)
|
|
174
174
|
if (await D.blockerFn({
|
|
175
175
|
currentLocation: c,
|
|
176
|
-
nextLocation:
|
|
176
|
+
nextLocation: y,
|
|
177
177
|
action: k
|
|
178
178
|
})) {
|
|
179
179
|
h = !0, n.history.go(1), F.notify(T);
|
|
@@ -181,8 +181,8 @@ function _t(t) {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
c =
|
|
185
|
-
}, x = (
|
|
184
|
+
c = u(), F.notify(T);
|
|
185
|
+
}, x = (y) => {
|
|
186
186
|
if (p) {
|
|
187
187
|
p = !1;
|
|
188
188
|
return;
|
|
@@ -202,25 +202,25 @@ function _t(t) {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
if (_)
|
|
205
|
-
return
|
|
205
|
+
return y.preventDefault(), y.returnValue = "";
|
|
206
206
|
}, F = St({
|
|
207
207
|
getLocation: S,
|
|
208
208
|
getLength: () => n.history.length,
|
|
209
|
-
pushState: (
|
|
210
|
-
replaceState: (
|
|
211
|
-
back: (
|
|
212
|
-
forward: (
|
|
213
|
-
|
|
209
|
+
pushState: (y, _) => L("push", y, _),
|
|
210
|
+
replaceState: (y, _) => L("replace", y, _),
|
|
211
|
+
back: (y) => (y && (f = !0), p = !0, n.history.back()),
|
|
212
|
+
forward: (y) => {
|
|
213
|
+
y && (f = !0), p = !0, n.history.forward();
|
|
214
214
|
},
|
|
215
|
-
go: (
|
|
216
|
-
|
|
215
|
+
go: (y) => {
|
|
216
|
+
l = !0, n.history.go(y);
|
|
217
217
|
},
|
|
218
|
-
createHref: (
|
|
218
|
+
createHref: (y) => a(y),
|
|
219
219
|
flush: R,
|
|
220
220
|
destroy: () => {
|
|
221
|
-
n.history.pushState = e, n.history.replaceState =
|
|
221
|
+
n.history.pushState = e, n.history.replaceState = o, n.removeEventListener(ht, x, {
|
|
222
222
|
capture: !0
|
|
223
|
-
}), n.removeEventListener(dt,
|
|
223
|
+
}), n.removeEventListener(dt, v);
|
|
224
224
|
},
|
|
225
225
|
onBlocked: () => {
|
|
226
226
|
d && c !== d && (c = d);
|
|
@@ -229,21 +229,21 @@ function _t(t) {
|
|
|
229
229
|
setBlockers: i,
|
|
230
230
|
notifyOnIndexChange: !1
|
|
231
231
|
});
|
|
232
|
-
return n.addEventListener(ht, x, { capture: !0 }), n.addEventListener(dt,
|
|
233
|
-
const _ = e.apply(n.history,
|
|
232
|
+
return n.addEventListener(ht, x, { capture: !0 }), n.addEventListener(dt, v), n.history.pushState = function(...y) {
|
|
233
|
+
const _ = e.apply(n.history, y);
|
|
234
234
|
return F._ignoreSubscribers || P("PUSH"), _;
|
|
235
|
-
}, n.history.replaceState = function(...
|
|
236
|
-
const _ =
|
|
235
|
+
}, n.history.replaceState = function(...y) {
|
|
236
|
+
const _ = o.apply(n.history, y);
|
|
237
237
|
return F._ignoreSubscribers || P("REPLACE"), _;
|
|
238
238
|
}, F;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function oo(t) {
|
|
241
241
|
const n = typeof document < "u" ? window : void 0;
|
|
242
242
|
return _t({
|
|
243
243
|
window: n,
|
|
244
244
|
parseLocation: () => {
|
|
245
245
|
const e = n.location.hash.split("#").slice(1).join("#") ?? "/";
|
|
246
|
-
return
|
|
246
|
+
return ye(e, n.history.state);
|
|
247
247
|
},
|
|
248
248
|
createHref: (e) => `${n.location.pathname}${n.location.search}#${e}`
|
|
249
249
|
});
|
|
@@ -253,17 +253,17 @@ function Dt(t = {
|
|
|
253
253
|
}) {
|
|
254
254
|
const n = t.initialEntries;
|
|
255
255
|
let e = t.initialIndex ? Math.min(Math.max(t.initialIndex, 0), n.length - 1) : n.length - 1;
|
|
256
|
-
const
|
|
256
|
+
const o = n.map(
|
|
257
257
|
(s, i) => tt(i, void 0)
|
|
258
258
|
);
|
|
259
259
|
return St({
|
|
260
|
-
getLocation: () =>
|
|
260
|
+
getLocation: () => ye(n[e], o[e]),
|
|
261
261
|
getLength: () => n.length,
|
|
262
262
|
pushState: (s, i) => {
|
|
263
|
-
e < n.length - 1 && (n.splice(e + 1),
|
|
263
|
+
e < n.length - 1 && (n.splice(e + 1), o.splice(e + 1)), o.push(i), n.push(s), e = Math.max(n.length - 1, 0);
|
|
264
264
|
},
|
|
265
265
|
replaceState: (s, i) => {
|
|
266
|
-
|
|
266
|
+
o[e] = i, n[e] = s;
|
|
267
267
|
},
|
|
268
268
|
back: () => {
|
|
269
269
|
e = Math.max(e - 1, 0);
|
|
@@ -277,16 +277,16 @@ function Dt(t = {
|
|
|
277
277
|
createHref: (s) => s
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
const e = t.indexOf("#"),
|
|
280
|
+
function ye(t, n) {
|
|
281
|
+
const e = t.indexOf("#"), o = t.indexOf("?");
|
|
282
282
|
return {
|
|
283
283
|
href: t,
|
|
284
284
|
pathname: t.substring(
|
|
285
285
|
0,
|
|
286
|
-
e > 0 ?
|
|
286
|
+
e > 0 ? o > 0 ? Math.min(e, o) : e : o > 0 ? o : t.length
|
|
287
287
|
),
|
|
288
288
|
hash: e > -1 ? t.substring(e) : "",
|
|
289
|
-
search:
|
|
289
|
+
search: o > -1 ? t.slice(o, e === -1 ? void 0 : e) : "",
|
|
290
290
|
state: n || { [de]: 0 }
|
|
291
291
|
};
|
|
292
292
|
}
|
|
@@ -298,8 +298,8 @@ function te(t, n) {
|
|
|
298
298
|
if (!t) {
|
|
299
299
|
if (Vt)
|
|
300
300
|
throw new Error(We);
|
|
301
|
-
var e = typeof n == "function" ? n() : n,
|
|
302
|
-
throw new Error(
|
|
301
|
+
var e = typeof n == "function" ? n() : n, o = e ? "".concat(We, ": ").concat(e) : We;
|
|
302
|
+
throw new Error(o);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
var At = !0;
|
|
@@ -325,22 +325,22 @@ var st = { exports: {} }, wt = {}, it = { exports: {} }, Pt = {};
|
|
|
325
325
|
* This source code is licensed under the MIT license found in the
|
|
326
326
|
* LICENSE file in the root directory of this source tree.
|
|
327
327
|
*/
|
|
328
|
-
var Se =
|
|
328
|
+
var Se = yt;
|
|
329
329
|
function Nt(t, n) {
|
|
330
330
|
return t === n && (t !== 0 || 1 / t === 1 / n) || t !== t && n !== n;
|
|
331
331
|
}
|
|
332
332
|
var $t = typeof Object.is == "function" ? Object.is : Nt, Kt = Se.useState, Ut = Se.useEffect, zt = Se.useLayoutEffect, Wt = Se.useDebugValue;
|
|
333
333
|
function Ht(t, n) {
|
|
334
|
-
var e = n(),
|
|
334
|
+
var e = n(), o = Kt({ inst: { value: e, getSnapshot: n } }), r = o[0].inst, s = o[1];
|
|
335
335
|
return zt(
|
|
336
336
|
function() {
|
|
337
|
-
|
|
337
|
+
r.value = e, r.getSnapshot = n, He(r) && s({ inst: r });
|
|
338
338
|
},
|
|
339
339
|
[t, e, n]
|
|
340
340
|
), Ut(
|
|
341
341
|
function() {
|
|
342
|
-
return He(
|
|
343
|
-
He(
|
|
342
|
+
return He(r) && s({ inst: r }), t(function() {
|
|
343
|
+
He(r) && s({ inst: r });
|
|
344
344
|
});
|
|
345
345
|
},
|
|
346
346
|
[t]
|
|
@@ -373,12 +373,12 @@ var Xt = it.exports;
|
|
|
373
373
|
* This source code is licensed under the MIT license found in the
|
|
374
374
|
* LICENSE file in the root directory of this source tree.
|
|
375
375
|
*/
|
|
376
|
-
var Ne =
|
|
376
|
+
var Ne = yt, qt = Xt;
|
|
377
377
|
function Jt(t, n) {
|
|
378
378
|
return t === n && (t !== 0 || 1 / t === 1 / n) || t !== t && n !== n;
|
|
379
379
|
}
|
|
380
380
|
var Yt = typeof Object.is == "function" ? Object.is : Jt, Qt = qt.useSyncExternalStore, Zt = Ne.useRef, en = Ne.useEffect, tn = Ne.useMemo, nn = Ne.useDebugValue;
|
|
381
|
-
wt.useSyncExternalStoreWithSelector = function(t, n, e,
|
|
381
|
+
wt.useSyncExternalStoreWithSelector = function(t, n, e, o, r) {
|
|
382
382
|
var s = Zt(null);
|
|
383
383
|
if (s.current === null) {
|
|
384
384
|
var i = { hasValue: !1, value: null };
|
|
@@ -386,30 +386,30 @@ wt.useSyncExternalStoreWithSelector = function(t, n, e, r, o) {
|
|
|
386
386
|
} else i = s.current;
|
|
387
387
|
s = tn(
|
|
388
388
|
function() {
|
|
389
|
-
function
|
|
389
|
+
function u(f) {
|
|
390
390
|
if (!c) {
|
|
391
|
-
if (c = !0, d = f, f =
|
|
391
|
+
if (c = !0, d = f, f = o(f), r !== void 0 && i.hasValue) {
|
|
392
392
|
var p = i.value;
|
|
393
|
-
if (
|
|
394
|
-
return
|
|
393
|
+
if (r(p, f))
|
|
394
|
+
return l = p;
|
|
395
395
|
}
|
|
396
|
-
return
|
|
396
|
+
return l = f;
|
|
397
397
|
}
|
|
398
|
-
if (p =
|
|
399
|
-
var S =
|
|
400
|
-
return
|
|
398
|
+
if (p = l, Yt(d, f)) return p;
|
|
399
|
+
var S = o(f);
|
|
400
|
+
return r !== void 0 && r(p, S) ? (d = f, p) : (d = f, l = S);
|
|
401
401
|
}
|
|
402
|
-
var c = !1, d,
|
|
402
|
+
var c = !1, d, l, h = e === void 0 ? null : e;
|
|
403
403
|
return [
|
|
404
404
|
function() {
|
|
405
|
-
return
|
|
405
|
+
return u(n());
|
|
406
406
|
},
|
|
407
407
|
h === null ? void 0 : function() {
|
|
408
|
-
return
|
|
408
|
+
return u(h());
|
|
409
409
|
}
|
|
410
410
|
];
|
|
411
411
|
},
|
|
412
|
-
[n, e,
|
|
412
|
+
[n, e, o, r]
|
|
413
413
|
);
|
|
414
414
|
var a = Qt(t, s[0], s[1]);
|
|
415
415
|
return en(
|
|
@@ -421,27 +421,27 @@ wt.useSyncExternalStoreWithSelector = function(t, n, e, r, o) {
|
|
|
421
421
|
};
|
|
422
422
|
st.exports;
|
|
423
423
|
st.exports = wt;
|
|
424
|
-
var
|
|
424
|
+
var on = st.exports;
|
|
425
425
|
const me = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), De = {
|
|
426
426
|
current: []
|
|
427
427
|
};
|
|
428
428
|
let je = !1, Ce = 0;
|
|
429
429
|
const be = /* @__PURE__ */ new Set(), Ie = /* @__PURE__ */ new Map();
|
|
430
430
|
function bt(t) {
|
|
431
|
-
const n = Array.from(t).sort((e,
|
|
431
|
+
const n = Array.from(t).sort((e, o) => e instanceof ve && e.options.deps.includes(o) ? 1 : o instanceof ve && o.options.deps.includes(e) ? -1 : 0);
|
|
432
432
|
for (const e of n) {
|
|
433
433
|
if (De.current.includes(e))
|
|
434
434
|
continue;
|
|
435
435
|
De.current.push(e), e.recompute();
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
438
|
-
for (const
|
|
439
|
-
const s = me.get(
|
|
436
|
+
const o = Te.get(e);
|
|
437
|
+
if (o)
|
|
438
|
+
for (const r of o) {
|
|
439
|
+
const s = me.get(r);
|
|
440
440
|
s && bt(s);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function rn(t) {
|
|
445
445
|
t.listeners.forEach(
|
|
446
446
|
(n) => n({
|
|
447
447
|
prevVal: t.prevState,
|
|
@@ -464,18 +464,18 @@ function Rt(t) {
|
|
|
464
464
|
const n = Array.from(be);
|
|
465
465
|
be.clear();
|
|
466
466
|
for (const e of n) {
|
|
467
|
-
const
|
|
468
|
-
e.prevState =
|
|
467
|
+
const o = Ie.get(e) ?? e.prevState;
|
|
468
|
+
e.prevState = o, rn(e);
|
|
469
469
|
}
|
|
470
470
|
for (const e of n) {
|
|
471
|
-
const
|
|
472
|
-
|
|
471
|
+
const o = me.get(e);
|
|
472
|
+
o && (De.current.push(e), bt(o));
|
|
473
473
|
}
|
|
474
474
|
for (const e of n) {
|
|
475
|
-
const
|
|
476
|
-
if (
|
|
477
|
-
for (const
|
|
478
|
-
sn(
|
|
475
|
+
const o = me.get(e);
|
|
476
|
+
if (o)
|
|
477
|
+
for (const r of o)
|
|
478
|
+
sn(r);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
} finally {
|
|
@@ -495,46 +495,46 @@ function Ge(t) {
|
|
|
495
495
|
}
|
|
496
496
|
class nt {
|
|
497
497
|
constructor(n, e) {
|
|
498
|
-
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = (
|
|
499
|
-
var
|
|
500
|
-
this.listeners.add(
|
|
501
|
-
const i = (s = (
|
|
498
|
+
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = (o) => {
|
|
499
|
+
var r, s;
|
|
500
|
+
this.listeners.add(o);
|
|
501
|
+
const i = (s = (r = this.options) == null ? void 0 : r.onSubscribe) == null ? void 0 : s.call(r, o, this);
|
|
502
502
|
return () => {
|
|
503
|
-
this.listeners.delete(
|
|
503
|
+
this.listeners.delete(o), i?.();
|
|
504
504
|
};
|
|
505
|
-
}, this.setState = (
|
|
506
|
-
var
|
|
507
|
-
this.prevState = this.state, this.state = (
|
|
505
|
+
}, this.setState = (o) => {
|
|
506
|
+
var r, s, i;
|
|
507
|
+
this.prevState = this.state, this.state = (r = this.options) != null && r.updateFn ? this.options.updateFn(this.prevState)(o) : o(this.prevState), (i = (s = this.options) == null ? void 0 : s.onUpdate) == null || i.call(s), Rt(this);
|
|
508
508
|
}, this.prevState = n, this.state = n, this.options = e;
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
class
|
|
511
|
+
class ve {
|
|
512
512
|
constructor(n) {
|
|
513
513
|
this.listeners = /* @__PURE__ */ new Set(), this._subscriptions = [], this.lastSeenDepValues = [], this.getDepVals = () => {
|
|
514
|
-
const e = [],
|
|
515
|
-
for (const
|
|
516
|
-
e.push(
|
|
517
|
-
return this.lastSeenDepValues =
|
|
514
|
+
const e = [], o = [];
|
|
515
|
+
for (const r of this.options.deps)
|
|
516
|
+
e.push(r.prevState), o.push(r.state);
|
|
517
|
+
return this.lastSeenDepValues = o, {
|
|
518
518
|
prevDepVals: e,
|
|
519
|
-
currDepVals:
|
|
519
|
+
currDepVals: o,
|
|
520
520
|
prevVal: this.prevState ?? void 0
|
|
521
521
|
};
|
|
522
522
|
}, this.recompute = () => {
|
|
523
|
-
var e,
|
|
523
|
+
var e, o;
|
|
524
524
|
this.prevState = this.state;
|
|
525
|
-
const { prevDepVals:
|
|
525
|
+
const { prevDepVals: r, currDepVals: s, prevVal: i } = this.getDepVals();
|
|
526
526
|
this.state = this.options.fn({
|
|
527
|
-
prevDepVals:
|
|
527
|
+
prevDepVals: r,
|
|
528
528
|
currDepVals: s,
|
|
529
529
|
prevVal: i
|
|
530
|
-
}), (
|
|
530
|
+
}), (o = (e = this.options).onUpdate) == null || o.call(e);
|
|
531
531
|
}, this.checkIfRecalculationNeededDeeply = () => {
|
|
532
532
|
for (const s of this.options.deps)
|
|
533
|
-
s instanceof
|
|
533
|
+
s instanceof ve && s.checkIfRecalculationNeededDeeply();
|
|
534
534
|
let e = !1;
|
|
535
|
-
const
|
|
536
|
-
for (let s = 0; s <
|
|
537
|
-
if (
|
|
535
|
+
const o = this.lastSeenDepValues, { currDepVals: r } = this.getDepVals();
|
|
536
|
+
for (let s = 0; s < r.length; s++)
|
|
537
|
+
if (r[s] !== o[s]) {
|
|
538
538
|
e = !0;
|
|
539
539
|
break;
|
|
540
540
|
}
|
|
@@ -544,9 +544,9 @@ class ge {
|
|
|
544
544
|
for (const e of this._subscriptions)
|
|
545
545
|
e();
|
|
546
546
|
}), this.subscribe = (e) => {
|
|
547
|
-
var
|
|
547
|
+
var o, r;
|
|
548
548
|
this.listeners.add(e);
|
|
549
|
-
const s = (
|
|
549
|
+
const s = (r = (o = this.options).onSubscribe) == null ? void 0 : r.call(o, e, this);
|
|
550
550
|
return () => {
|
|
551
551
|
this.listeners.delete(e), s?.();
|
|
552
552
|
};
|
|
@@ -558,29 +558,29 @@ class ge {
|
|
|
558
558
|
}
|
|
559
559
|
registerOnGraph(n = this.options.deps) {
|
|
560
560
|
for (const e of n)
|
|
561
|
-
if (e instanceof
|
|
561
|
+
if (e instanceof ve)
|
|
562
562
|
e.registerOnGraph(), this.registerOnGraph(e.options.deps);
|
|
563
563
|
else if (e instanceof nt) {
|
|
564
|
-
let
|
|
565
|
-
|
|
566
|
-
let
|
|
567
|
-
|
|
564
|
+
let o = me.get(e);
|
|
565
|
+
o || (o = /* @__PURE__ */ new Set(), me.set(e, o)), o.add(this);
|
|
566
|
+
let r = Te.get(this);
|
|
567
|
+
r || (r = /* @__PURE__ */ new Set(), Te.set(this, r)), r.add(e);
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
unregisterFromGraph(n = this.options.deps) {
|
|
571
571
|
for (const e of n)
|
|
572
|
-
if (e instanceof
|
|
572
|
+
if (e instanceof ve)
|
|
573
573
|
this.unregisterFromGraph(e.options.deps);
|
|
574
574
|
else if (e instanceof nt) {
|
|
575
|
-
const
|
|
576
|
-
|
|
577
|
-
const
|
|
578
|
-
|
|
575
|
+
const o = me.get(e);
|
|
576
|
+
o && o.delete(this);
|
|
577
|
+
const r = Te.get(this);
|
|
578
|
+
r && r.delete(e);
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
function an(t, n = (e) => e) {
|
|
583
|
-
return
|
|
583
|
+
return on.useSyncExternalStoreWithSelector(
|
|
584
584
|
t.subscribe,
|
|
585
585
|
() => t.state,
|
|
586
586
|
() => t.state,
|
|
@@ -595,34 +595,34 @@ function cn(t, n) {
|
|
|
595
595
|
return !1;
|
|
596
596
|
if (t instanceof Map && n instanceof Map) {
|
|
597
597
|
if (t.size !== n.size) return !1;
|
|
598
|
-
for (const [
|
|
599
|
-
if (!n.has(
|
|
598
|
+
for (const [o, r] of t)
|
|
599
|
+
if (!n.has(o) || !Object.is(r, n.get(o))) return !1;
|
|
600
600
|
return !0;
|
|
601
601
|
}
|
|
602
602
|
if (t instanceof Set && n instanceof Set) {
|
|
603
603
|
if (t.size !== n.size) return !1;
|
|
604
|
-
for (const
|
|
605
|
-
if (!n.has(
|
|
604
|
+
for (const o of t)
|
|
605
|
+
if (!n.has(o)) return !1;
|
|
606
606
|
return !0;
|
|
607
607
|
}
|
|
608
608
|
const e = Object.keys(t);
|
|
609
609
|
if (e.length !== Object.keys(n).length)
|
|
610
610
|
return !1;
|
|
611
|
-
for (let
|
|
612
|
-
if (!Object.prototype.hasOwnProperty.call(n, e[
|
|
611
|
+
for (let o = 0; o < e.length; o++)
|
|
612
|
+
if (!Object.prototype.hasOwnProperty.call(n, e[o]) || !Object.is(t[e[o]], n[e[o]]))
|
|
613
613
|
return !1;
|
|
614
614
|
return !0;
|
|
615
615
|
}
|
|
616
616
|
const H = "__root__";
|
|
617
|
-
function
|
|
618
|
-
let e,
|
|
617
|
+
function ln(t, n) {
|
|
618
|
+
let e, o, r, s = "";
|
|
619
619
|
for (e in t)
|
|
620
|
-
if ((
|
|
621
|
-
if (Array.isArray(
|
|
622
|
-
for (
|
|
623
|
-
s && (s += "&"), s += encodeURIComponent(e) + "=" + encodeURIComponent(o
|
|
620
|
+
if ((r = t[e]) !== void 0)
|
|
621
|
+
if (Array.isArray(r))
|
|
622
|
+
for (o = 0; o < r.length; o++)
|
|
623
|
+
s && (s += "&"), s += encodeURIComponent(e) + "=" + encodeURIComponent(r[o]);
|
|
624
624
|
else
|
|
625
|
-
s && (s += "&"), s += encodeURIComponent(e) + "=" + encodeURIComponent(
|
|
625
|
+
s && (s += "&"), s += encodeURIComponent(e) + "=" + encodeURIComponent(r);
|
|
626
626
|
return "" + s;
|
|
627
627
|
}
|
|
628
628
|
function ft(t) {
|
|
@@ -630,19 +630,19 @@ function ft(t) {
|
|
|
630
630
|
const n = decodeURIComponent(t);
|
|
631
631
|
return n === "false" ? !1 : n === "true" ? !0 : +n * 0 === 0 && +n + "" === n ? +n : n;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
let e,
|
|
635
|
-
const
|
|
633
|
+
function un(t, n) {
|
|
634
|
+
let e, o;
|
|
635
|
+
const r = {}, s = t.split("&");
|
|
636
636
|
for (; e = s.shift(); ) {
|
|
637
637
|
const i = e.indexOf("=");
|
|
638
638
|
if (i !== -1) {
|
|
639
|
-
|
|
639
|
+
o = e.slice(0, i), o = decodeURIComponent(o);
|
|
640
640
|
const a = e.slice(i + 1);
|
|
641
|
-
o
|
|
641
|
+
r[o] !== void 0 ? r[o] = [].concat(r[o], ft(a)) : r[o] = ft(a);
|
|
642
642
|
} else
|
|
643
|
-
|
|
643
|
+
o = e, o = decodeURIComponent(o), r[o] = "";
|
|
644
644
|
}
|
|
645
|
-
return
|
|
645
|
+
return r;
|
|
646
646
|
}
|
|
647
647
|
const dn = fn(JSON.parse), hn = pn(
|
|
648
648
|
JSON.stringify,
|
|
@@ -651,12 +651,12 @@ const dn = fn(JSON.parse), hn = pn(
|
|
|
651
651
|
function fn(t) {
|
|
652
652
|
return (n) => {
|
|
653
653
|
n.substring(0, 1) === "?" && (n = n.substring(1));
|
|
654
|
-
const e =
|
|
655
|
-
for (const
|
|
656
|
-
const
|
|
657
|
-
if (typeof
|
|
654
|
+
const e = un(n);
|
|
655
|
+
for (const o in e) {
|
|
656
|
+
const r = e[o];
|
|
657
|
+
if (typeof r == "string")
|
|
658
658
|
try {
|
|
659
|
-
e[
|
|
659
|
+
e[o] = t(r);
|
|
660
660
|
} catch {
|
|
661
661
|
}
|
|
662
662
|
}
|
|
@@ -664,26 +664,26 @@ function fn(t) {
|
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
666
|
function pn(t, n) {
|
|
667
|
-
function e(
|
|
668
|
-
if (typeof
|
|
667
|
+
function e(o) {
|
|
668
|
+
if (typeof o == "object" && o !== null)
|
|
669
669
|
try {
|
|
670
|
-
return t(
|
|
670
|
+
return t(o);
|
|
671
671
|
} catch {
|
|
672
672
|
}
|
|
673
|
-
else if (typeof
|
|
673
|
+
else if (typeof o == "string" && typeof n == "function")
|
|
674
674
|
try {
|
|
675
|
-
return n(
|
|
675
|
+
return n(o), t(o);
|
|
676
676
|
} catch {
|
|
677
677
|
}
|
|
678
|
-
return
|
|
678
|
+
return o;
|
|
679
679
|
}
|
|
680
|
-
return (
|
|
681
|
-
|
|
682
|
-
const i =
|
|
683
|
-
typeof i > "u" || i === void 0 ? delete
|
|
680
|
+
return (o) => {
|
|
681
|
+
o = { ...o }, Object.keys(o).forEach((s) => {
|
|
682
|
+
const i = o[s];
|
|
683
|
+
typeof i > "u" || i === void 0 ? delete o[s] : o[s] = e(i);
|
|
684
684
|
});
|
|
685
|
-
const
|
|
686
|
-
return
|
|
685
|
+
const r = ln(o).toString();
|
|
686
|
+
return r ? `?${r}` : "";
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
689
|
function Le(t) {
|
|
@@ -692,24 +692,24 @@ function Le(t) {
|
|
|
692
692
|
function mn(t) {
|
|
693
693
|
return typeof t == "function";
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function le(t, n) {
|
|
696
696
|
return mn(t) ? t(n) : t;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
return n.reduce((e,
|
|
698
|
+
function ot(t, n) {
|
|
699
|
+
return n.reduce((e, o) => (e[o] = t[o], e), {});
|
|
700
700
|
}
|
|
701
701
|
function X(t, n) {
|
|
702
702
|
if (t === n)
|
|
703
703
|
return t;
|
|
704
|
-
const e = n,
|
|
705
|
-
if (
|
|
706
|
-
const
|
|
704
|
+
const e = n, o = mt(t) && mt(e);
|
|
705
|
+
if (o || Oe(t) && Oe(e)) {
|
|
706
|
+
const r = o ? t : Object.keys(t), s = r.length, i = o ? e : Object.keys(e), a = i.length, u = o ? [] : {};
|
|
707
707
|
let c = 0;
|
|
708
708
|
for (let d = 0; d < a; d++) {
|
|
709
|
-
const
|
|
710
|
-
(!
|
|
709
|
+
const l = o ? d : i[d];
|
|
710
|
+
(!o && r.includes(l) || o) && t[l] === void 0 && e[l] === void 0 ? (u[l] = void 0, c++) : (u[l] = X(t[l], e[l]), u[l] === t[l] && t[l] !== void 0 && c++);
|
|
711
711
|
}
|
|
712
|
-
return s === a && c === s ? t :
|
|
712
|
+
return s === a && c === s ? t : u;
|
|
713
713
|
}
|
|
714
714
|
return e;
|
|
715
715
|
}
|
|
@@ -728,32 +728,32 @@ function pt(t) {
|
|
|
728
728
|
function mt(t) {
|
|
729
729
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function vt(t, n) {
|
|
732
732
|
let e = Object.keys(t);
|
|
733
|
-
return n && (e = e.filter((
|
|
733
|
+
return n && (e = e.filter((o) => t[o] !== void 0)), e;
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function ge(t, n, e) {
|
|
736
736
|
if (t === n)
|
|
737
737
|
return !0;
|
|
738
738
|
if (typeof t != typeof n)
|
|
739
739
|
return !1;
|
|
740
740
|
if (Oe(t) && Oe(n)) {
|
|
741
|
-
const
|
|
742
|
-
return !e?.partial &&
|
|
741
|
+
const o = e?.ignoreUndefined ?? !0, r = vt(t, o), s = vt(n, o);
|
|
742
|
+
return !e?.partial && r.length !== s.length ? !1 : s.every((i) => ge(t[i], n[i], e));
|
|
743
743
|
}
|
|
744
|
-
return Array.isArray(t) && Array.isArray(n) ? t.length !== n.length ? !1 : !t.some((
|
|
744
|
+
return Array.isArray(t) && Array.isArray(n) ? t.length !== n.length ? !1 : !t.some((o, r) => !ge(o, n[r], e)) : !1;
|
|
745
745
|
}
|
|
746
746
|
const Re = typeof window < "u" ? b.useLayoutEffect : b.useEffect;
|
|
747
747
|
function pe(t) {
|
|
748
748
|
let n, e;
|
|
749
|
-
const
|
|
750
|
-
n =
|
|
749
|
+
const o = new Promise((r, s) => {
|
|
750
|
+
n = r, e = s;
|
|
751
751
|
});
|
|
752
|
-
return
|
|
753
|
-
|
|
754
|
-
},
|
|
755
|
-
|
|
756
|
-
},
|
|
752
|
+
return o.status = "pending", o.resolve = (r) => {
|
|
753
|
+
o.status = "resolved", o.value = r, n(r), t?.(r);
|
|
754
|
+
}, o.reject = (r) => {
|
|
755
|
+
o.status = "rejected", e(r);
|
|
756
|
+
}, o;
|
|
757
757
|
}
|
|
758
758
|
function Xe(t) {
|
|
759
759
|
const n = b.useRef({
|
|
@@ -765,27 +765,27 @@ function Xe(t) {
|
|
|
765
765
|
prev: e
|
|
766
766
|
}), n.current.prev;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
const
|
|
768
|
+
function vn(t, n, e = {}, o = {}) {
|
|
769
|
+
const r = b.useRef(
|
|
770
770
|
typeof IntersectionObserver == "function"
|
|
771
771
|
), s = b.useRef(null);
|
|
772
772
|
return b.useEffect(() => {
|
|
773
|
-
if (!(!t.current || !
|
|
773
|
+
if (!(!t.current || !r.current || o.disabled))
|
|
774
774
|
return s.current = new IntersectionObserver(([i]) => {
|
|
775
775
|
n(i);
|
|
776
776
|
}, e), s.current.observe(t.current), () => {
|
|
777
777
|
var i;
|
|
778
778
|
(i = s.current) == null || i.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [n, e,
|
|
780
|
+
}, [n, e, o.disabled, t]), s.current;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function gn(t) {
|
|
783
783
|
const n = b.useRef(null);
|
|
784
784
|
return b.useEffect(() => {
|
|
785
785
|
t && (typeof t == "function" ? t(n.current) : t.current = n.current);
|
|
786
786
|
}), n;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function oe(t) {
|
|
789
789
|
return $e(
|
|
790
790
|
t.filter((n) => n !== void 0).join("/")
|
|
791
791
|
);
|
|
@@ -796,11 +796,11 @@ function $e(t) {
|
|
|
796
796
|
function at(t) {
|
|
797
797
|
return t === "/" ? t : t.replace(/^\/{1,}/, "");
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function ue(t) {
|
|
800
800
|
return t === "/" ? t : t.replace(/\/{1,}$/, "");
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
802
|
+
function yn(t) {
|
|
803
|
+
return ue(at(t));
|
|
804
804
|
}
|
|
805
805
|
function Ve(t, n) {
|
|
806
806
|
return t.endsWith("/") && t !== "/" && t !== `${n}/` ? t.slice(0, -1) : t;
|
|
@@ -812,17 +812,17 @@ function _n({
|
|
|
812
812
|
basepath: t,
|
|
813
813
|
base: n,
|
|
814
814
|
to: e,
|
|
815
|
-
trailingSlash:
|
|
816
|
-
caseSensitive:
|
|
815
|
+
trailingSlash: o = "never",
|
|
816
|
+
caseSensitive: r
|
|
817
817
|
}) {
|
|
818
818
|
var s, i;
|
|
819
|
-
n = Ae(t, n,
|
|
819
|
+
n = Ae(t, n, r), e = Ae(t, e, r);
|
|
820
820
|
let a = _e(n);
|
|
821
|
-
const
|
|
822
|
-
a.length > 1 && ((s = Le(a)) == null ? void 0 : s.value) === "/" && a.pop(),
|
|
823
|
-
d.value === "/" ?
|
|
824
|
-
}), a.length > 1 && (((i = Le(a)) == null ? void 0 : i.value) === "/" ?
|
|
825
|
-
const c =
|
|
821
|
+
const u = _e(e);
|
|
822
|
+
a.length > 1 && ((s = Le(a)) == null ? void 0 : s.value) === "/" && a.pop(), u.forEach((d, l) => {
|
|
823
|
+
d.value === "/" ? l ? l === u.length - 1 && a.push(d) : a = [d] : d.value === ".." ? a.pop() : d.value === "." || a.push(d);
|
|
824
|
+
}), a.length > 1 && (((i = Le(a)) == null ? void 0 : i.value) === "/" ? o === "never" && a.pop() : o === "always" && a.push({ type: "pathname", value: "/" }));
|
|
825
|
+
const c = oe([t, ...a.map((d) => d.value)]);
|
|
826
826
|
return $e(c);
|
|
827
827
|
}
|
|
828
828
|
function _e(t) {
|
|
@@ -837,15 +837,15 @@ function _e(t) {
|
|
|
837
837
|
return n;
|
|
838
838
|
const e = t.split("/").filter(Boolean);
|
|
839
839
|
return n.push(
|
|
840
|
-
...e.map((
|
|
840
|
+
...e.map((o) => o === "$" || o === "*" ? {
|
|
841
841
|
type: "wildcard",
|
|
842
|
-
value:
|
|
843
|
-
} :
|
|
842
|
+
value: o
|
|
843
|
+
} : o.charAt(0) === "$" ? {
|
|
844
844
|
type: "param",
|
|
845
|
-
value:
|
|
845
|
+
value: o
|
|
846
846
|
} : {
|
|
847
847
|
type: "pathname",
|
|
848
|
-
value: decodeURI(
|
|
848
|
+
value: decodeURI(o)
|
|
849
849
|
})
|
|
850
850
|
), t.slice(-1) === "/" && (t = t.substring(1), n.push({
|
|
851
851
|
type: "pathname",
|
|
@@ -856,24 +856,24 @@ function ke({
|
|
|
856
856
|
path: t,
|
|
857
857
|
params: n,
|
|
858
858
|
leaveWildcards: e,
|
|
859
|
-
leaveParams:
|
|
860
|
-
decodeCharMap:
|
|
859
|
+
leaveParams: o,
|
|
860
|
+
decodeCharMap: r
|
|
861
861
|
}) {
|
|
862
862
|
const s = _e(t), i = {};
|
|
863
|
-
for (const [a,
|
|
864
|
-
const c = typeof
|
|
865
|
-
["*", "_splat"].includes(a) ? i[a] = c ? encodeURI(
|
|
863
|
+
for (const [a, u] of Object.entries(n)) {
|
|
864
|
+
const c = typeof u == "string";
|
|
865
|
+
["*", "_splat"].includes(a) ? i[a] = c ? encodeURI(u) : u : i[a] = c ? wn(u, r) : u;
|
|
866
866
|
}
|
|
867
|
-
return
|
|
867
|
+
return oe(
|
|
868
868
|
s.map((a) => {
|
|
869
869
|
if (a.type === "wildcard") {
|
|
870
|
-
const
|
|
871
|
-
return e ? `${a.value}${
|
|
870
|
+
const u = i._splat;
|
|
871
|
+
return e ? `${a.value}${u ?? ""}` : u;
|
|
872
872
|
}
|
|
873
873
|
if (a.type === "param") {
|
|
874
|
-
if (
|
|
875
|
-
const
|
|
876
|
-
return `${a.value}${
|
|
874
|
+
if (o) {
|
|
875
|
+
const u = i[a.value];
|
|
876
|
+
return `${a.value}${u ?? ""}`;
|
|
877
877
|
}
|
|
878
878
|
return i[a.value.substring(1)] ?? "undefined";
|
|
879
879
|
}
|
|
@@ -884,27 +884,27 @@ function ke({
|
|
|
884
884
|
function wn(t, n) {
|
|
885
885
|
let e = encodeURIComponent(t);
|
|
886
886
|
if (n)
|
|
887
|
-
for (const [
|
|
888
|
-
e = e.replaceAll(
|
|
887
|
+
for (const [o, r] of n)
|
|
888
|
+
e = e.replaceAll(o, r);
|
|
889
889
|
return e;
|
|
890
890
|
}
|
|
891
891
|
function Fe(t, n, e) {
|
|
892
|
-
const
|
|
893
|
-
if (!(e.to && !
|
|
894
|
-
return
|
|
892
|
+
const o = Pn(t, n, e);
|
|
893
|
+
if (!(e.to && !o))
|
|
894
|
+
return o ?? {};
|
|
895
895
|
}
|
|
896
896
|
function Ae(t, n, e = !1) {
|
|
897
|
-
const
|
|
897
|
+
const o = e ? t : t.toLowerCase(), r = e ? n : n.toLowerCase();
|
|
898
898
|
switch (!0) {
|
|
899
|
-
case
|
|
899
|
+
case o === "/":
|
|
900
900
|
return n;
|
|
901
|
-
case
|
|
901
|
+
case r === o:
|
|
902
902
|
return "";
|
|
903
903
|
case n.length < t.length:
|
|
904
904
|
return n;
|
|
905
|
-
case o
|
|
905
|
+
case r[o.length] !== "/":
|
|
906
906
|
return n;
|
|
907
|
-
case
|
|
907
|
+
case r.startsWith(o):
|
|
908
908
|
return n.slice(t.length);
|
|
909
909
|
default:
|
|
910
910
|
return n;
|
|
@@ -914,26 +914,26 @@ function Pn(t, n, e) {
|
|
|
914
914
|
if (t !== "/" && !n.startsWith(t))
|
|
915
915
|
return;
|
|
916
916
|
n = Ae(t, n, e.caseSensitive);
|
|
917
|
-
const
|
|
917
|
+
const o = Ae(
|
|
918
918
|
t,
|
|
919
919
|
`${e.to ?? "$"}`,
|
|
920
920
|
e.caseSensitive
|
|
921
|
-
),
|
|
922
|
-
n.startsWith("/") ||
|
|
921
|
+
), r = _e(n), s = _e(o);
|
|
922
|
+
n.startsWith("/") || r.unshift({
|
|
923
923
|
type: "pathname",
|
|
924
924
|
value: "/"
|
|
925
|
-
}),
|
|
925
|
+
}), o.startsWith("/") || s.unshift({
|
|
926
926
|
type: "pathname",
|
|
927
927
|
value: "/"
|
|
928
928
|
});
|
|
929
929
|
const i = {};
|
|
930
930
|
return (() => {
|
|
931
|
-
for (let
|
|
932
|
-
const c =
|
|
931
|
+
for (let u = 0; u < Math.max(r.length, s.length); u++) {
|
|
932
|
+
const c = r[u], d = s[u], l = u >= r.length - 1, h = u >= s.length - 1;
|
|
933
933
|
if (d) {
|
|
934
934
|
if (d.type === "wildcard") {
|
|
935
935
|
const f = decodeURI(
|
|
936
|
-
|
|
936
|
+
oe(r.slice(u).map((p) => p.value))
|
|
937
937
|
);
|
|
938
938
|
return i["*"] = f, i._splat = f, !0;
|
|
939
939
|
}
|
|
@@ -958,8 +958,8 @@ function Pn(t, n, e) {
|
|
|
958
958
|
));
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
|
-
if (!
|
|
962
|
-
return i["**"] =
|
|
961
|
+
if (!l && h)
|
|
962
|
+
return i["**"] = oe(r.slice(u + 1).map((f) => f.value)), !!e.fuzzy && d?.value !== "/";
|
|
963
963
|
}
|
|
964
964
|
return !0;
|
|
965
965
|
})() ? i : void 0;
|
|
@@ -977,9 +977,9 @@ function ct(t) {
|
|
|
977
977
|
{
|
|
978
978
|
getResetKey: t.getResetKey,
|
|
979
979
|
onCatch: t.onCatch,
|
|
980
|
-
children: ({ error: e, reset:
|
|
980
|
+
children: ({ error: e, reset: o }) => e ? b.createElement(n, {
|
|
981
981
|
error: e,
|
|
982
|
-
reset:
|
|
982
|
+
reset: o
|
|
983
983
|
}) : t.children
|
|
984
984
|
}
|
|
985
985
|
);
|
|
@@ -1028,7 +1028,7 @@ function Ke({ error: t }) {
|
|
|
1028
1028
|
fontWeight: "bold",
|
|
1029
1029
|
borderRadius: ".25rem"
|
|
1030
1030
|
},
|
|
1031
|
-
onClick: () => e((
|
|
1031
|
+
onClick: () => e((o) => !o),
|
|
1032
1032
|
children: n ? "Hide Error" : "Show Error"
|
|
1033
1033
|
}
|
|
1034
1034
|
)
|
|
@@ -1054,7 +1054,7 @@ const Je = b.createContext(null);
|
|
|
1054
1054
|
function Ct() {
|
|
1055
1055
|
return typeof document > "u" ? Je : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = Je, Je);
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function re(t) {
|
|
1058
1058
|
const n = b.useContext(Ct());
|
|
1059
1059
|
return Me(
|
|
1060
1060
|
!((t?.warn ?? !0) && !n),
|
|
@@ -1062,24 +1062,24 @@ function oe(t) {
|
|
|
1062
1062
|
), n;
|
|
1063
1063
|
}
|
|
1064
1064
|
function z(t) {
|
|
1065
|
-
const n =
|
|
1065
|
+
const n = re({
|
|
1066
1066
|
warn: t?.router === void 0
|
|
1067
|
-
}), e = t?.router || n,
|
|
1068
|
-
return an(e.__store, (
|
|
1067
|
+
}), e = t?.router || n, o = Tt(void 0);
|
|
1068
|
+
return an(e.__store, (r) => {
|
|
1069
1069
|
if (t?.select) {
|
|
1070
1070
|
if (t.structuralSharing ?? e.options.defaultStructuralSharing) {
|
|
1071
1071
|
const s = X(
|
|
1072
|
-
|
|
1073
|
-
t.select(
|
|
1072
|
+
o.current,
|
|
1073
|
+
t.select(r)
|
|
1074
1074
|
);
|
|
1075
|
-
return
|
|
1075
|
+
return o.current = s, s;
|
|
1076
1076
|
}
|
|
1077
|
-
return t.select(
|
|
1077
|
+
return t.select(r);
|
|
1078
1078
|
}
|
|
1079
|
-
return
|
|
1079
|
+
return r;
|
|
1080
1080
|
});
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function ro(t = {}) {
|
|
1083
1083
|
if (t.isNotFound = !0, t.throw) throw t;
|
|
1084
1084
|
return t;
|
|
1085
1085
|
}
|
|
@@ -1094,17 +1094,17 @@ function Rn(t) {
|
|
|
1094
1094
|
ct,
|
|
1095
1095
|
{
|
|
1096
1096
|
getResetKey: () => n,
|
|
1097
|
-
onCatch: (e,
|
|
1098
|
-
var
|
|
1097
|
+
onCatch: (e, o) => {
|
|
1098
|
+
var r;
|
|
1099
1099
|
if (ee(e))
|
|
1100
|
-
(
|
|
1100
|
+
(r = t.onCatch) == null || r.call(t, e, o);
|
|
1101
1101
|
else
|
|
1102
1102
|
throw e;
|
|
1103
1103
|
},
|
|
1104
1104
|
errorComponent: ({ error: e }) => {
|
|
1105
|
-
var
|
|
1105
|
+
var o;
|
|
1106
1106
|
if (ee(e))
|
|
1107
|
-
return (
|
|
1107
|
+
return (o = t.fallback) == null ? void 0 : o.call(t, e);
|
|
1108
1108
|
throw e;
|
|
1109
1109
|
},
|
|
1110
1110
|
children: t.children
|
|
@@ -1132,14 +1132,14 @@ function Ye(t, n) {
|
|
|
1132
1132
|
if ("~standard" in t) {
|
|
1133
1133
|
const e = t["~standard"].validate(n);
|
|
1134
1134
|
if (e instanceof Promise)
|
|
1135
|
-
throw new
|
|
1135
|
+
throw new rt("Async validation not supported");
|
|
1136
1136
|
if (e.issues)
|
|
1137
|
-
throw new
|
|
1137
|
+
throw new rt(JSON.stringify(e.issues, void 0, 2));
|
|
1138
1138
|
return e.value;
|
|
1139
1139
|
}
|
|
1140
1140
|
return "parse" in t ? t.parse(n) : typeof t == "function" ? t(n) : {};
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function so(t) {
|
|
1143
1143
|
return new Mn(t);
|
|
1144
1144
|
}
|
|
1145
1145
|
class Mn {
|
|
@@ -1150,11 +1150,11 @@ class Mn {
|
|
|
1150
1150
|
this.tempLocationKey = `${Math.round(
|
|
1151
1151
|
Math.random() * 1e7
|
|
1152
1152
|
)}`, this.resetNextScroll = !0, this.shouldViewTransition = void 0, this.isViewTransitionTypesSupported = void 0, this.subscribers = /* @__PURE__ */ new Set(), this.startReactTransition = (e) => e(), this.update = (e) => {
|
|
1153
|
-
var
|
|
1153
|
+
var o;
|
|
1154
1154
|
e.notFoundRoute && console.warn(
|
|
1155
1155
|
"The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info."
|
|
1156
1156
|
);
|
|
1157
|
-
const
|
|
1157
|
+
const r = this.options;
|
|
1158
1158
|
this.options = {
|
|
1159
1159
|
...this.options,
|
|
1160
1160
|
...e
|
|
@@ -1163,7 +1163,7 @@ class Mn {
|
|
|
1163
1163
|
encodeURIComponent(s),
|
|
1164
1164
|
s
|
|
1165
1165
|
])
|
|
1166
|
-
) : void 0, (!this.basepath || e.basepath && e.basepath !==
|
|
1166
|
+
) : void 0, (!this.basepath || e.basepath && e.basepath !== r.basepath) && (e.basepath === void 0 || e.basepath === "" || e.basepath === "/" ? this.basepath = "/" : this.basepath = `/${yn(e.basepath)}`), // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
1167
1167
|
(!this.history || this.options.history && this.options.history !== this.history) && (this.history = this.options.history ?? (this.isServer ? Dt({
|
|
1168
1168
|
initialEntries: [this.basepath || "/"]
|
|
1169
1169
|
}) : _t()), this.latestLocation = this.parseLocation()), this.options.routeTree !== this.routeTree && (this.routeTree = this.options.routeTree, this.buildRouteTree()), this.__store || (this.__store = new nt(En(this.latestLocation), {
|
|
@@ -1176,7 +1176,7 @@ class Mn {
|
|
|
1176
1176
|
};
|
|
1177
1177
|
}
|
|
1178
1178
|
})), typeof window < "u" && "CSS" in window && // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
1179
|
-
typeof ((
|
|
1179
|
+
typeof ((o = window.CSS) == null ? void 0 : o.supports) == "function" && (this.isViewTransitionTypesSupported = window.CSS.supports(
|
|
1180
1180
|
"selector(:active-view-transition-type(a)"
|
|
1181
1181
|
));
|
|
1182
1182
|
}, this.buildRouteTree = () => {
|
|
@@ -1186,10 +1186,10 @@ class Mn {
|
|
|
1186
1186
|
originalIndex: 99999999999,
|
|
1187
1187
|
defaultSsr: this.options.defaultSsr
|
|
1188
1188
|
}), this.routesById[e.id] = e);
|
|
1189
|
-
const
|
|
1190
|
-
i.forEach((a,
|
|
1189
|
+
const o = (i) => {
|
|
1190
|
+
i.forEach((a, u) => {
|
|
1191
1191
|
a.init({
|
|
1192
|
-
originalIndex:
|
|
1192
|
+
originalIndex: u,
|
|
1193
1193
|
defaultSsr: this.options.defaultSsr
|
|
1194
1194
|
});
|
|
1195
1195
|
const c = this.routesById[a.id];
|
|
@@ -1197,109 +1197,109 @@ class Mn {
|
|
|
1197
1197
|
!c,
|
|
1198
1198
|
`Duplicate routes found with id: ${String(a.id)}`
|
|
1199
1199
|
), this.routesById[a.id] = a, !a.isRoot && a.path) {
|
|
1200
|
-
const
|
|
1201
|
-
(!this.routesByPath[
|
|
1200
|
+
const l = ue(a.fullPath);
|
|
1201
|
+
(!this.routesByPath[l] || a.fullPath.endsWith("/")) && (this.routesByPath[l] = a);
|
|
1202
1202
|
}
|
|
1203
1203
|
const d = a.children;
|
|
1204
|
-
d?.length &&
|
|
1204
|
+
d?.length && o(d);
|
|
1205
1205
|
});
|
|
1206
1206
|
};
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1207
|
+
o([this.routeTree]);
|
|
1208
|
+
const r = [];
|
|
1209
1209
|
Object.values(this.routesById).forEach((i, a) => {
|
|
1210
|
-
var
|
|
1210
|
+
var u;
|
|
1211
1211
|
if (i.isRoot || !i.path)
|
|
1212
1212
|
return;
|
|
1213
1213
|
const c = at(i.fullPath), d = _e(c);
|
|
1214
|
-
for (; d.length > 1 && ((
|
|
1214
|
+
for (; d.length > 1 && ((u = d[0]) == null ? void 0 : u.value) === "/"; )
|
|
1215
1215
|
d.shift();
|
|
1216
|
-
const
|
|
1217
|
-
|
|
1218
|
-
}), this.flatRoutes =
|
|
1219
|
-
const
|
|
1220
|
-
for (let c = 0; c <
|
|
1216
|
+
const l = d.map((h) => h.value === "/" ? 0.75 : h.type === "param" ? 0.5 : h.type === "wildcard" ? 0.25 : 1);
|
|
1217
|
+
r.push({ child: i, trimmed: c, parsed: d, index: a, scores: l });
|
|
1218
|
+
}), this.flatRoutes = r.sort((i, a) => {
|
|
1219
|
+
const u = Math.min(i.scores.length, a.scores.length);
|
|
1220
|
+
for (let c = 0; c < u; c++)
|
|
1221
1221
|
if (i.scores[c] !== a.scores[c])
|
|
1222
1222
|
return a.scores[c] - i.scores[c];
|
|
1223
1223
|
if (i.scores.length !== a.scores.length)
|
|
1224
1224
|
return a.scores.length - i.scores.length;
|
|
1225
|
-
for (let c = 0; c <
|
|
1225
|
+
for (let c = 0; c < u; c++)
|
|
1226
1226
|
if (i.parsed[c].value !== a.parsed[c].value)
|
|
1227
1227
|
return i.parsed[c].value > a.parsed[c].value ? 1 : -1;
|
|
1228
1228
|
return i.index - a.index;
|
|
1229
1229
|
}).map((i, a) => (i.child.rank = a, i.child));
|
|
1230
|
-
}, this.subscribe = (e,
|
|
1231
|
-
const
|
|
1230
|
+
}, this.subscribe = (e, o) => {
|
|
1231
|
+
const r = {
|
|
1232
1232
|
eventType: e,
|
|
1233
|
-
fn:
|
|
1233
|
+
fn: o
|
|
1234
1234
|
};
|
|
1235
|
-
return this.subscribers.add(
|
|
1236
|
-
this.subscribers.delete(
|
|
1235
|
+
return this.subscribers.add(r), () => {
|
|
1236
|
+
this.subscribers.delete(r);
|
|
1237
1237
|
};
|
|
1238
1238
|
}, this.emit = (e) => {
|
|
1239
|
-
this.subscribers.forEach((
|
|
1240
|
-
|
|
1239
|
+
this.subscribers.forEach((o) => {
|
|
1240
|
+
o.eventType === e.type && o.fn(e);
|
|
1241
1241
|
});
|
|
1242
|
-
}, this.parseLocation = (e,
|
|
1243
|
-
const
|
|
1244
|
-
pathname:
|
|
1242
|
+
}, this.parseLocation = (e, o) => {
|
|
1243
|
+
const r = ({
|
|
1244
|
+
pathname: u,
|
|
1245
1245
|
search: c,
|
|
1246
1246
|
hash: d,
|
|
1247
|
-
state:
|
|
1247
|
+
state: l
|
|
1248
1248
|
}) => {
|
|
1249
1249
|
const h = this.options.parseSearch(c), f = this.options.stringifySearch(h);
|
|
1250
1250
|
return {
|
|
1251
|
-
pathname:
|
|
1251
|
+
pathname: u,
|
|
1252
1252
|
searchStr: f,
|
|
1253
1253
|
search: X(e?.search, h),
|
|
1254
1254
|
hash: d.split("#").reverse()[0] ?? "",
|
|
1255
|
-
href: `${
|
|
1256
|
-
state: X(e?.state,
|
|
1255
|
+
href: `${u}${f}${d}`,
|
|
1256
|
+
state: X(e?.state, l)
|
|
1257
1257
|
};
|
|
1258
|
-
}, s = o
|
|
1258
|
+
}, s = r(o ?? this.history.location), { __tempLocation: i, __tempKey: a } = s.state;
|
|
1259
1259
|
if (i && (!a || a === this.tempLocationKey)) {
|
|
1260
|
-
const
|
|
1261
|
-
return
|
|
1262
|
-
...
|
|
1260
|
+
const u = r(i);
|
|
1261
|
+
return u.state.key = s.state.key, delete u.state.__tempLocation, {
|
|
1262
|
+
...u,
|
|
1263
1263
|
maskedLocation: s
|
|
1264
1264
|
};
|
|
1265
1265
|
}
|
|
1266
1266
|
return s;
|
|
1267
|
-
}, this.resolvePathWithBase = (e,
|
|
1267
|
+
}, this.resolvePathWithBase = (e, o) => _n({
|
|
1268
1268
|
basepath: this.basepath,
|
|
1269
1269
|
base: e,
|
|
1270
|
-
to: $e(
|
|
1270
|
+
to: $e(o),
|
|
1271
1271
|
trailingSlash: this.options.trailingSlash,
|
|
1272
1272
|
caseSensitive: this.options.caseSensitive
|
|
1273
|
-
}), this.getMatchedRoutes = (e,
|
|
1274
|
-
let
|
|
1275
|
-
const s =
|
|
1273
|
+
}), this.getMatchedRoutes = (e, o) => {
|
|
1274
|
+
let r = {};
|
|
1275
|
+
const s = ue(e.pathname), i = (d) => Fe(this.basepath, s, {
|
|
1276
1276
|
to: d.fullPath,
|
|
1277
1277
|
caseSensitive: d.options.caseSensitive ?? this.options.caseSensitive,
|
|
1278
1278
|
fuzzy: !0
|
|
1279
1279
|
});
|
|
1280
|
-
let a =
|
|
1281
|
-
a ?
|
|
1282
|
-
const
|
|
1283
|
-
return
|
|
1280
|
+
let a = o?.to !== void 0 ? this.routesByPath[o.to] : void 0;
|
|
1281
|
+
a ? r = i(a) : a = this.flatRoutes.find((d) => {
|
|
1282
|
+
const l = i(d);
|
|
1283
|
+
return l ? (r = l, !0) : !1;
|
|
1284
1284
|
});
|
|
1285
|
-
let
|
|
1286
|
-
const c = [
|
|
1287
|
-
for (;
|
|
1288
|
-
|
|
1289
|
-
return { matchedRoutes: c, routeParams:
|
|
1285
|
+
let u = a || this.routesById[H];
|
|
1286
|
+
const c = [u];
|
|
1287
|
+
for (; u.parentRoute; )
|
|
1288
|
+
u = u.parentRoute, c.unshift(u);
|
|
1289
|
+
return { matchedRoutes: c, routeParams: r, foundRoute: a };
|
|
1290
1290
|
}, this.cancelMatch = (e) => {
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1291
|
+
const o = this.getMatch(e);
|
|
1292
|
+
o && (o.abortController.abort(), clearTimeout(o.pendingTimeout));
|
|
1293
1293
|
}, this.cancelMatches = () => {
|
|
1294
1294
|
var e;
|
|
1295
|
-
(e = this.state.pendingMatches) == null || e.forEach((
|
|
1296
|
-
this.cancelMatch(
|
|
1295
|
+
(e = this.state.pendingMatches) == null || e.forEach((o) => {
|
|
1296
|
+
this.cancelMatch(o.id);
|
|
1297
1297
|
});
|
|
1298
1298
|
}, this.buildLocation = (e) => {
|
|
1299
|
-
const
|
|
1300
|
-
var a,
|
|
1299
|
+
const o = (s = {}, i) => {
|
|
1300
|
+
var a, u, c, d, l, h;
|
|
1301
1301
|
const f = s._fromLocation ? this.matchRoutes(s._fromLocation, { _buildLocation: !0 }) : this.state.matches, p = s.from != null ? f.find(
|
|
1302
|
-
(m) => Fe(this.basepath,
|
|
1302
|
+
(m) => Fe(this.basepath, ue(m.pathname), {
|
|
1303
1303
|
to: s.from,
|
|
1304
1304
|
caseSensitive: !1,
|
|
1305
1305
|
fuzzy: !1
|
|
@@ -1309,7 +1309,7 @@ class Mn {
|
|
|
1309
1309
|
s.from == null || p != null,
|
|
1310
1310
|
"Could not find match for from: " + s.from
|
|
1311
1311
|
);
|
|
1312
|
-
const
|
|
1312
|
+
const g = (a = this.state.pendingMatches) != null && a.length ? (u = Le(this.state.pendingMatches)) == null ? void 0 : u.search : ((c = Le(f)) == null ? void 0 : c.search) || this.latestLocation.search, M = i?.matchedRoutes.filter(
|
|
1313
1313
|
(m) => f.find((w) => w.routeId === m.id)
|
|
1314
1314
|
);
|
|
1315
1315
|
let R;
|
|
@@ -1322,17 +1322,17 @@ class Mn {
|
|
|
1322
1322
|
params: i?.routeParams ?? {},
|
|
1323
1323
|
decodeCharMap: this.pathParamsDecodeCharMap
|
|
1324
1324
|
});
|
|
1325
|
-
return
|
|
1325
|
+
return oe([this.basepath, k]) === S;
|
|
1326
1326
|
})) == null ? void 0 : d.id];
|
|
1327
1327
|
R = this.resolvePathWithBase(
|
|
1328
1328
|
S,
|
|
1329
1329
|
m?.to ?? S
|
|
1330
1330
|
);
|
|
1331
1331
|
}
|
|
1332
|
-
const L = { ...(
|
|
1332
|
+
const L = { ...(l = Le(f)) == null ? void 0 : l.params };
|
|
1333
1333
|
let P = (s.params ?? !0) === !0 ? L : {
|
|
1334
1334
|
...L,
|
|
1335
|
-
...
|
|
1335
|
+
...le(s.params, L)
|
|
1336
1336
|
};
|
|
1337
1337
|
Object.keys(P).length > 0 && i?.matchedRoutes.map((m) => {
|
|
1338
1338
|
var w;
|
|
@@ -1346,7 +1346,7 @@ class Mn {
|
|
|
1346
1346
|
leaveParams: e.leaveParams,
|
|
1347
1347
|
decodeCharMap: this.pathParamsDecodeCharMap
|
|
1348
1348
|
});
|
|
1349
|
-
let
|
|
1349
|
+
let v = g;
|
|
1350
1350
|
if (e._includeValidateSearch && ((h = this.options.search) != null && h.strict)) {
|
|
1351
1351
|
let m = {};
|
|
1352
1352
|
i?.matchedRoutes.forEach((w) => {
|
|
@@ -1355,14 +1355,14 @@ class Mn {
|
|
|
1355
1355
|
...m,
|
|
1356
1356
|
...Ye(w.options.validateSearch, {
|
|
1357
1357
|
...m,
|
|
1358
|
-
...
|
|
1358
|
+
...v
|
|
1359
1359
|
}) ?? {}
|
|
1360
1360
|
});
|
|
1361
1361
|
} catch {
|
|
1362
1362
|
}
|
|
1363
|
-
}),
|
|
1363
|
+
}), v = m;
|
|
1364
1364
|
}
|
|
1365
|
-
|
|
1365
|
+
v = ((m) => {
|
|
1366
1366
|
const w = i?.matchedRoutes.reduce(
|
|
1367
1367
|
(I, D) => {
|
|
1368
1368
|
var W;
|
|
@@ -1406,7 +1406,7 @@ class Mn {
|
|
|
1406
1406
|
return I.concat(q);
|
|
1407
1407
|
},
|
|
1408
1408
|
[]
|
|
1409
|
-
) ?? [], k = ({ search: I }) => s.search ? s.search === !0 ? I :
|
|
1409
|
+
) ?? [], k = ({ search: I }) => s.search ? s.search === !0 ? I : le(s.search, I) : {};
|
|
1410
1410
|
w.push(k);
|
|
1411
1411
|
const T = (I, D) => {
|
|
1412
1412
|
if (I >= w.length)
|
|
@@ -1415,26 +1415,26 @@ class Mn {
|
|
|
1415
1415
|
return W({ search: D, next: (J) => T(I + 1, J) });
|
|
1416
1416
|
};
|
|
1417
1417
|
return T(0, m);
|
|
1418
|
-
})(
|
|
1419
|
-
const F = this.options.stringifySearch(
|
|
1420
|
-
let E = s.state === !0 ? this.latestLocation.state : s.state ?
|
|
1418
|
+
})(v), v = X(g, v);
|
|
1419
|
+
const F = this.options.stringifySearch(v), y = s.hash === !0 ? this.latestLocation.hash : s.hash ? le(s.hash, this.latestLocation.hash) : void 0, _ = y ? `#${y}` : "";
|
|
1420
|
+
let E = s.state === !0 ? this.latestLocation.state : s.state ? le(s.state, this.latestLocation.state) : {};
|
|
1421
1421
|
return E = X(this.latestLocation.state, E), {
|
|
1422
1422
|
pathname: R,
|
|
1423
|
-
search:
|
|
1423
|
+
search: v,
|
|
1424
1424
|
searchStr: F,
|
|
1425
1425
|
state: E,
|
|
1426
|
-
hash:
|
|
1426
|
+
hash: y ?? "",
|
|
1427
1427
|
href: `${R}${F}${_}`,
|
|
1428
1428
|
unmaskOnReload: s.unmaskOnReload
|
|
1429
1429
|
};
|
|
1430
|
-
},
|
|
1430
|
+
}, r = (s = {}, i) => {
|
|
1431
1431
|
var a;
|
|
1432
|
-
const
|
|
1433
|
-
let c = i ?
|
|
1432
|
+
const u = o(s);
|
|
1433
|
+
let c = i ? o(i) : void 0;
|
|
1434
1434
|
if (!c) {
|
|
1435
1435
|
let h = {};
|
|
1436
1436
|
const f = (a = this.options.routeMasks) == null ? void 0 : a.find((p) => {
|
|
1437
|
-
const S = Fe(this.basepath,
|
|
1437
|
+
const S = Fe(this.basepath, u.pathname, {
|
|
1438
1438
|
to: p.from,
|
|
1439
1439
|
caseSensitive: !1,
|
|
1440
1440
|
fuzzy: !1
|
|
@@ -1444,43 +1444,43 @@ class Mn {
|
|
|
1444
1444
|
if (f) {
|
|
1445
1445
|
const { from: p, ...S } = f;
|
|
1446
1446
|
i = {
|
|
1447
|
-
...
|
|
1447
|
+
...ot(e, ["from"]),
|
|
1448
1448
|
...S,
|
|
1449
1449
|
params: h
|
|
1450
|
-
}, c =
|
|
1450
|
+
}, c = o(i);
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
|
-
const d = this.getMatchedRoutes(
|
|
1453
|
+
const d = this.getMatchedRoutes(u, s), l = o(s, d);
|
|
1454
1454
|
if (c) {
|
|
1455
|
-
const h = this.getMatchedRoutes(c, i), f =
|
|
1456
|
-
|
|
1455
|
+
const h = this.getMatchedRoutes(c, i), f = o(i, h);
|
|
1456
|
+
l.maskedLocation = f;
|
|
1457
1457
|
}
|
|
1458
|
-
return
|
|
1458
|
+
return l;
|
|
1459
1459
|
};
|
|
1460
|
-
return e.mask ?
|
|
1461
|
-
...
|
|
1460
|
+
return e.mask ? r(e, {
|
|
1461
|
+
...ot(e, ["from"]),
|
|
1462
1462
|
...e.mask
|
|
1463
|
-
}) :
|
|
1463
|
+
}) : r(e);
|
|
1464
1464
|
}, this.commitLocation = ({
|
|
1465
1465
|
viewTransition: e,
|
|
1466
|
-
ignoreBlocker:
|
|
1467
|
-
...
|
|
1466
|
+
ignoreBlocker: o,
|
|
1467
|
+
...r
|
|
1468
1468
|
}) => {
|
|
1469
1469
|
const s = () => {
|
|
1470
|
-
|
|
1471
|
-
const
|
|
1472
|
-
return delete
|
|
1473
|
-
}, i = this.latestLocation.href ===
|
|
1470
|
+
r.state.key = this.latestLocation.state.key;
|
|
1471
|
+
const u = ge(r.state, this.latestLocation.state);
|
|
1472
|
+
return delete r.state.key, u;
|
|
1473
|
+
}, i = this.latestLocation.href === r.href, a = this.commitLocationPromise;
|
|
1474
1474
|
if (this.commitLocationPromise = pe(() => {
|
|
1475
1475
|
a?.resolve();
|
|
1476
1476
|
}), i && s())
|
|
1477
1477
|
this.load();
|
|
1478
1478
|
else {
|
|
1479
|
-
let { maskedLocation:
|
|
1480
|
-
|
|
1481
|
-
...
|
|
1479
|
+
let { maskedLocation: u, hashScrollIntoView: c, ...d } = r;
|
|
1480
|
+
u && (d = {
|
|
1481
|
+
...u,
|
|
1482
1482
|
state: {
|
|
1483
|
-
...
|
|
1483
|
+
...u.state,
|
|
1484
1484
|
__tempKey: void 0,
|
|
1485
1485
|
__tempLocation: {
|
|
1486
1486
|
...d,
|
|
@@ -1493,66 +1493,66 @@ class Mn {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
}, (d.unmaskOnReload ?? this.options.unmaskOnReload ?? !1) && (d.state.__tempKey = this.tempLocationKey)), d.state.__hashScrollIntoViewOptions = c ?? this.options.defaultHashScrollIntoView ?? !0, this.shouldViewTransition = e, this.history[
|
|
1496
|
+
}, (d.unmaskOnReload ?? this.options.unmaskOnReload ?? !1) && (d.state.__tempKey = this.tempLocationKey)), d.state.__hashScrollIntoViewOptions = c ?? this.options.defaultHashScrollIntoView ?? !0, this.shouldViewTransition = e, this.history[r.replace ? "replace" : "push"](
|
|
1497
1497
|
d.href,
|
|
1498
1498
|
d.state,
|
|
1499
|
-
{ ignoreBlocker:
|
|
1499
|
+
{ ignoreBlocker: o }
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
1502
|
-
return this.resetNextScroll =
|
|
1502
|
+
return this.resetNextScroll = r.resetScroll ?? !0, this.history.subscribers.size || this.load(), this.commitLocationPromise;
|
|
1503
1503
|
}, this.buildAndCommitLocation = ({
|
|
1504
1504
|
replace: e,
|
|
1505
|
-
resetScroll:
|
|
1506
|
-
hashScrollIntoView:
|
|
1505
|
+
resetScroll: o,
|
|
1506
|
+
hashScrollIntoView: r,
|
|
1507
1507
|
viewTransition: s,
|
|
1508
1508
|
ignoreBlocker: i,
|
|
1509
1509
|
href: a,
|
|
1510
|
-
...
|
|
1510
|
+
...u
|
|
1511
1511
|
} = {}) => {
|
|
1512
1512
|
if (a) {
|
|
1513
|
-
const d = this.history.location.state.__TSR_index,
|
|
1513
|
+
const d = this.history.location.state.__TSR_index, l = ye(a, {
|
|
1514
1514
|
__TSR_index: e ? d : d + 1
|
|
1515
1515
|
});
|
|
1516
|
-
|
|
1516
|
+
u.to = l.pathname, u.search = this.options.parseSearch(l.search), u.hash = l.hash.slice(1);
|
|
1517
1517
|
}
|
|
1518
1518
|
const c = this.buildLocation({
|
|
1519
|
-
...
|
|
1519
|
+
...u,
|
|
1520
1520
|
_includeValidateSearch: !0
|
|
1521
1521
|
});
|
|
1522
1522
|
return this.commitLocation({
|
|
1523
1523
|
...c,
|
|
1524
1524
|
viewTransition: s,
|
|
1525
1525
|
replace: e,
|
|
1526
|
-
resetScroll:
|
|
1527
|
-
hashScrollIntoView:
|
|
1526
|
+
resetScroll: o,
|
|
1527
|
+
hashScrollIntoView: r,
|
|
1528
1528
|
ignoreBlocker: i
|
|
1529
1529
|
});
|
|
1530
|
-
}, this.navigate = ({ to: e, reloadDocument:
|
|
1531
|
-
if (
|
|
1532
|
-
|
|
1530
|
+
}, this.navigate = ({ to: e, reloadDocument: o, href: r, ...s }) => {
|
|
1531
|
+
if (o) {
|
|
1532
|
+
r || (r = this.buildLocation({ to: e, ...s }).href), s.replace ? window.location.replace(r) : window.location.href = r;
|
|
1533
1533
|
return;
|
|
1534
1534
|
}
|
|
1535
1535
|
return this.buildAndCommitLocation({
|
|
1536
1536
|
...s,
|
|
1537
|
-
href:
|
|
1537
|
+
href: r,
|
|
1538
1538
|
to: e
|
|
1539
1539
|
});
|
|
1540
1540
|
}, this.load = async (e) => {
|
|
1541
1541
|
this.latestLocation = this.parseLocation(this.latestLocation);
|
|
1542
|
-
let
|
|
1542
|
+
let o, r, s;
|
|
1543
1543
|
for (s = new Promise((i) => {
|
|
1544
1544
|
this.startReactTransition(async () => {
|
|
1545
1545
|
var a;
|
|
1546
1546
|
try {
|
|
1547
|
-
const
|
|
1547
|
+
const u = this.latestLocation, c = this.state.resolvedLocation, d = c.href !== u.href, l = c.pathname !== u.pathname;
|
|
1548
1548
|
this.cancelMatches();
|
|
1549
1549
|
let h;
|
|
1550
1550
|
Ge(() => {
|
|
1551
|
-
h = this.matchRoutes(
|
|
1551
|
+
h = this.matchRoutes(u), this.__store.setState((f) => ({
|
|
1552
1552
|
...f,
|
|
1553
1553
|
status: "pending",
|
|
1554
1554
|
isLoading: !0,
|
|
1555
|
-
location:
|
|
1555
|
+
location: u,
|
|
1556
1556
|
pendingMatches: h,
|
|
1557
1557
|
// If a cached moved to pendingMatches, remove it from cachedMatches
|
|
1558
1558
|
cachedMatches: f.cachedMatches.filter((p) => !h.find((S) => S.id === p.id))
|
|
@@ -1560,26 +1560,26 @@ class Mn {
|
|
|
1560
1560
|
}), this.state.redirect || this.emit({
|
|
1561
1561
|
type: "onBeforeNavigate",
|
|
1562
1562
|
fromLocation: c,
|
|
1563
|
-
toLocation:
|
|
1564
|
-
pathChanged:
|
|
1563
|
+
toLocation: u,
|
|
1564
|
+
pathChanged: l,
|
|
1565
1565
|
hrefChanged: d
|
|
1566
1566
|
}), this.emit({
|
|
1567
1567
|
type: "onBeforeLoad",
|
|
1568
1568
|
fromLocation: c,
|
|
1569
|
-
toLocation:
|
|
1570
|
-
pathChanged:
|
|
1569
|
+
toLocation: u,
|
|
1570
|
+
pathChanged: l,
|
|
1571
1571
|
hrefChanged: d
|
|
1572
1572
|
}), await this.loadMatches({
|
|
1573
1573
|
sync: e?.sync,
|
|
1574
1574
|
matches: h,
|
|
1575
|
-
location:
|
|
1575
|
+
location: u,
|
|
1576
1576
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
1577
1577
|
onReady: async () => {
|
|
1578
1578
|
this.startViewTransition(async () => {
|
|
1579
1579
|
let f, p, S;
|
|
1580
1580
|
Ge(() => {
|
|
1581
|
-
this.__store.setState((
|
|
1582
|
-
const M =
|
|
1581
|
+
this.__store.setState((g) => {
|
|
1582
|
+
const M = g.matches, R = g.pendingMatches || g.matches;
|
|
1583
1583
|
return f = M.filter(
|
|
1584
1584
|
(L) => !R.find((P) => P.id === L.id)
|
|
1585
1585
|
), p = R.filter(
|
|
@@ -1587,13 +1587,13 @@ class Mn {
|
|
|
1587
1587
|
), S = M.filter(
|
|
1588
1588
|
(L) => R.find((P) => P.id === L.id)
|
|
1589
1589
|
), {
|
|
1590
|
-
...
|
|
1590
|
+
...g,
|
|
1591
1591
|
isLoading: !1,
|
|
1592
1592
|
loadedAt: Date.now(),
|
|
1593
1593
|
matches: R,
|
|
1594
1594
|
pendingMatches: void 0,
|
|
1595
1595
|
cachedMatches: [
|
|
1596
|
-
...
|
|
1596
|
+
...g.cachedMatches,
|
|
1597
1597
|
...f.filter((L) => L.status !== "error")
|
|
1598
1598
|
]
|
|
1599
1599
|
};
|
|
@@ -1602,8 +1602,8 @@ class Mn {
|
|
|
1602
1602
|
[f, "onLeave"],
|
|
1603
1603
|
[p, "onEnter"],
|
|
1604
1604
|
[S, "onStay"]
|
|
1605
|
-
].forEach(([
|
|
1606
|
-
|
|
1605
|
+
].forEach(([g, M]) => {
|
|
1606
|
+
g.forEach((R) => {
|
|
1607
1607
|
var L, P;
|
|
1608
1608
|
(P = (L = this.looseRoutesById[R.routeId].options)[M]) == null || P.call(L, R);
|
|
1609
1609
|
});
|
|
@@ -1611,15 +1611,15 @@ class Mn {
|
|
|
1611
1611
|
});
|
|
1612
1612
|
}
|
|
1613
1613
|
});
|
|
1614
|
-
} catch (
|
|
1615
|
-
qe(
|
|
1616
|
-
...
|
|
1614
|
+
} catch (u) {
|
|
1615
|
+
qe(u) ? (o = u, this.isServer || this.navigate({
|
|
1616
|
+
...o,
|
|
1617
1617
|
replace: !0,
|
|
1618
1618
|
ignoreBlocker: !0
|
|
1619
|
-
})) : ee(
|
|
1619
|
+
})) : ee(u) && (r = u), this.__store.setState((c) => ({
|
|
1620
1620
|
...c,
|
|
1621
|
-
statusCode:
|
|
1622
|
-
redirect:
|
|
1621
|
+
statusCode: o ? o.statusCode : r ? 404 : c.matches.some((d) => d.status === "error") ? 500 : 200,
|
|
1622
|
+
redirect: o
|
|
1623
1623
|
}));
|
|
1624
1624
|
}
|
|
1625
1625
|
this.latestLoadPromise === s && ((a = this.commitLocationPromise) == null || a.resolve(), this.latestLoadPromise = void 0, this.commitLocationPromise = void 0), i();
|
|
@@ -1627,25 +1627,25 @@ class Mn {
|
|
|
1627
1627
|
}), this.latestLoadPromise = s, await s; this.latestLoadPromise && s !== this.latestLoadPromise; )
|
|
1628
1628
|
await this.latestLoadPromise;
|
|
1629
1629
|
}, this.startViewTransition = (e) => {
|
|
1630
|
-
const
|
|
1631
|
-
if (delete this.shouldViewTransition,
|
|
1632
|
-
let
|
|
1633
|
-
typeof
|
|
1630
|
+
const o = this.shouldViewTransition ?? this.options.defaultViewTransition;
|
|
1631
|
+
if (delete this.shouldViewTransition, o && typeof document < "u" && "startViewTransition" in document && typeof document.startViewTransition == "function") {
|
|
1632
|
+
let r;
|
|
1633
|
+
typeof o == "object" && this.isViewTransitionTypesSupported ? r = {
|
|
1634
1634
|
update: e,
|
|
1635
|
-
types:
|
|
1636
|
-
} :
|
|
1635
|
+
types: o.types
|
|
1636
|
+
} : r = e, document.startViewTransition(r);
|
|
1637
1637
|
} else
|
|
1638
1638
|
e();
|
|
1639
|
-
}, this.updateMatch = (e,
|
|
1640
|
-
var
|
|
1639
|
+
}, this.updateMatch = (e, o) => {
|
|
1640
|
+
var r;
|
|
1641
1641
|
let s;
|
|
1642
|
-
const i = (
|
|
1642
|
+
const i = (r = this.state.pendingMatches) == null ? void 0 : r.find((d) => d.id === e), a = this.state.matches.find((d) => d.id === e), u = this.state.cachedMatches.find((d) => d.id === e), c = i ? "pendingMatches" : a ? "matches" : u ? "cachedMatches" : "";
|
|
1643
1643
|
return c && this.__store.setState((d) => {
|
|
1644
|
-
var
|
|
1644
|
+
var l;
|
|
1645
1645
|
return {
|
|
1646
1646
|
...d,
|
|
1647
|
-
[c]: (
|
|
1648
|
-
(h) => h.id === e ? s =
|
|
1647
|
+
[c]: (l = d[c]) == null ? void 0 : l.map(
|
|
1648
|
+
(h) => h.id === e ? s = o(h) : h
|
|
1649
1649
|
)
|
|
1650
1650
|
};
|
|
1651
1651
|
}), s;
|
|
@@ -1653,21 +1653,21 @@ class Mn {
|
|
|
1653
1653
|
...this.state.cachedMatches,
|
|
1654
1654
|
...this.state.pendingMatches ?? [],
|
|
1655
1655
|
...this.state.matches
|
|
1656
|
-
].find((
|
|
1656
|
+
].find((o) => o.id === e), this.loadMatches = async ({
|
|
1657
1657
|
location: e,
|
|
1658
|
-
matches:
|
|
1659
|
-
preload:
|
|
1658
|
+
matches: o,
|
|
1659
|
+
preload: r,
|
|
1660
1660
|
onReady: s,
|
|
1661
1661
|
updateMatch: i = this.updateMatch,
|
|
1662
1662
|
sync: a
|
|
1663
1663
|
}) => {
|
|
1664
|
-
let
|
|
1664
|
+
let u, c = !1;
|
|
1665
1665
|
const d = async () => {
|
|
1666
1666
|
c || (c = !0, await s?.());
|
|
1667
|
-
},
|
|
1667
|
+
}, l = (f) => !!(r && !this.state.matches.find((p) => p.id === f));
|
|
1668
1668
|
!this.isServer && !this.state.matches.length && d();
|
|
1669
1669
|
const h = (f, p) => {
|
|
1670
|
-
var S,
|
|
1670
|
+
var S, g, M;
|
|
1671
1671
|
if (qe(p) && !p.reloadDocument)
|
|
1672
1672
|
throw p;
|
|
1673
1673
|
if (ce(p) || ee(p)) {
|
|
@@ -1678,10 +1678,10 @@ class Mn {
|
|
|
1678
1678
|
error: p,
|
|
1679
1679
|
beforeLoadPromise: void 0,
|
|
1680
1680
|
loaderPromise: void 0
|
|
1681
|
-
})), p.routeId || (p.routeId = f.routeId), (S = f.beforeLoadPromise) == null || S.resolve(), (
|
|
1681
|
+
})), p.routeId || (p.routeId = f.routeId), (S = f.beforeLoadPromise) == null || S.resolve(), (g = f.loaderPromise) == null || g.resolve(), (M = f.loadPromise) == null || M.resolve(), ce(p))
|
|
1682
1682
|
throw c = !0, p = this.resolveRedirect({ ...p, _fromLocation: e }), p;
|
|
1683
1683
|
if (ee(p))
|
|
1684
|
-
throw this._handleNotFound(
|
|
1684
|
+
throw this._handleNotFound(o, p, {
|
|
1685
1685
|
updateMatch: i
|
|
1686
1686
|
}), p;
|
|
1687
1687
|
}
|
|
@@ -1689,16 +1689,16 @@ class Mn {
|
|
|
1689
1689
|
try {
|
|
1690
1690
|
await new Promise((f, p) => {
|
|
1691
1691
|
(async () => {
|
|
1692
|
-
var S,
|
|
1692
|
+
var S, g, M;
|
|
1693
1693
|
try {
|
|
1694
|
-
const R = (
|
|
1695
|
-
var
|
|
1696
|
-
const { id: E, routeId: m } =
|
|
1694
|
+
const R = (v, x, F) => {
|
|
1695
|
+
var y, _;
|
|
1696
|
+
const { id: E, routeId: m } = o[v], w = this.looseRoutesById[m];
|
|
1697
1697
|
if (x instanceof Promise)
|
|
1698
1698
|
throw x;
|
|
1699
|
-
x.routerCode = F,
|
|
1699
|
+
x.routerCode = F, u = u ?? v, h(this.getMatch(E), x);
|
|
1700
1700
|
try {
|
|
1701
|
-
(_ = (
|
|
1701
|
+
(_ = (y = w.options).onError) == null || _.call(y, x);
|
|
1702
1702
|
} catch (k) {
|
|
1703
1703
|
x = k, h(this.getMatch(E), x);
|
|
1704
1704
|
}
|
|
@@ -1715,18 +1715,18 @@ class Mn {
|
|
|
1715
1715
|
};
|
|
1716
1716
|
});
|
|
1717
1717
|
};
|
|
1718
|
-
for (const [
|
|
1719
|
-
const
|
|
1718
|
+
for (const [v, { id: x, routeId: F }] of o.entries()) {
|
|
1719
|
+
const y = this.getMatch(x), _ = (S = o[v - 1]) == null ? void 0 : S.id, E = this.looseRoutesById[F], m = E.options.pendingMs ?? this.options.defaultPendingMs, w = !!(s && !this.isServer && !l(x) && (E.options.loader || E.options.beforeLoad) && typeof m == "number" && m !== 1 / 0 && (E.options.pendingComponent ?? this.options.defaultPendingComponent));
|
|
1720
1720
|
let k = !0;
|
|
1721
1721
|
if (
|
|
1722
1722
|
// If we are in the middle of a load, either of these will be present
|
|
1723
1723
|
// (not to be confused with `loadPromise`, which is always defined)
|
|
1724
|
-
(
|
|
1724
|
+
(y.beforeLoadPromise || y.loaderPromise) && (w && setTimeout(() => {
|
|
1725
1725
|
try {
|
|
1726
1726
|
d();
|
|
1727
1727
|
} catch {
|
|
1728
1728
|
}
|
|
1729
|
-
}, m), await
|
|
1729
|
+
}, m), await y.beforeLoadPromise, k = this.getMatch(x).status !== "success"), k
|
|
1730
1730
|
) {
|
|
1731
1731
|
try {
|
|
1732
1732
|
i(x, (N) => ({
|
|
@@ -1746,7 +1746,7 @@ class Mn {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
}, m));
|
|
1748
1748
|
const { paramsError: D, searchError: W } = this.getMatch(x);
|
|
1749
|
-
D && R(
|
|
1749
|
+
D && R(v, D, "PARSE_PARAMS"), W && R(v, W, "VALIDATE_SEARCH");
|
|
1750
1750
|
const q = () => _ ? this.getMatch(_).context : this.options.context ?? {};
|
|
1751
1751
|
i(x, (N) => ({
|
|
1752
1752
|
...N,
|
|
@@ -1759,7 +1759,7 @@ class Mn {
|
|
|
1759
1759
|
...N.__routeContext
|
|
1760
1760
|
}
|
|
1761
1761
|
}));
|
|
1762
|
-
const { search: J, params: j, context: ne, cause: O } = this.getMatch(x), K =
|
|
1762
|
+
const { search: J, params: j, context: ne, cause: O } = this.getMatch(x), K = l(x), V = {
|
|
1763
1763
|
search: J,
|
|
1764
1764
|
abortController: T,
|
|
1765
1765
|
params: j,
|
|
@@ -1769,9 +1769,9 @@ class Mn {
|
|
|
1769
1769
|
navigate: (N) => this.navigate({ ...N, _fromLocation: e }),
|
|
1770
1770
|
buildLocation: this.buildLocation,
|
|
1771
1771
|
cause: K ? "preload" : O,
|
|
1772
|
-
matches:
|
|
1773
|
-
}, A = await ((M = (
|
|
1774
|
-
(ce(A) || ee(A)) && R(
|
|
1772
|
+
matches: o
|
|
1773
|
+
}, A = await ((M = (g = E.options).beforeLoad) == null ? void 0 : M.call(g, V)) ?? {};
|
|
1774
|
+
(ce(A) || ee(A)) && R(v, A, "BEFORE_LOAD"), i(x, (N) => ({
|
|
1775
1775
|
...N,
|
|
1776
1776
|
__beforeLoadContext: A,
|
|
1777
1777
|
context: {
|
|
@@ -1782,7 +1782,7 @@ class Mn {
|
|
|
1782
1782
|
abortController: T
|
|
1783
1783
|
}));
|
|
1784
1784
|
} catch (T) {
|
|
1785
|
-
R(
|
|
1785
|
+
R(v, T, "BEFORE_LOAD");
|
|
1786
1786
|
}
|
|
1787
1787
|
i(x, (T) => {
|
|
1788
1788
|
var I;
|
|
@@ -1794,15 +1794,15 @@ class Mn {
|
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
}
|
|
1797
|
-
const L =
|
|
1798
|
-
L.forEach(({ id:
|
|
1797
|
+
const L = o.slice(0, u), P = [];
|
|
1798
|
+
L.forEach(({ id: v, routeId: x }, F) => {
|
|
1799
1799
|
P.push(
|
|
1800
1800
|
(async () => {
|
|
1801
|
-
const { loaderPromise:
|
|
1801
|
+
const { loaderPromise: y } = this.getMatch(v);
|
|
1802
1802
|
let _ = !1, E = !1;
|
|
1803
|
-
if (
|
|
1804
|
-
await
|
|
1805
|
-
const m = this.getMatch(
|
|
1803
|
+
if (y) {
|
|
1804
|
+
await y;
|
|
1805
|
+
const m = this.getMatch(v);
|
|
1806
1806
|
m.error && h(m, m.error);
|
|
1807
1807
|
} else {
|
|
1808
1808
|
const m = P[F - 1], w = this.looseRoutesById[x], k = () => {
|
|
@@ -1812,7 +1812,7 @@ class Mn {
|
|
|
1812
1812
|
abortController: V,
|
|
1813
1813
|
context: A,
|
|
1814
1814
|
cause: N
|
|
1815
|
-
} = this.getMatch(
|
|
1815
|
+
} = this.getMatch(v), G = l(v);
|
|
1816
1816
|
return {
|
|
1817
1817
|
params: O,
|
|
1818
1818
|
deps: K,
|
|
@@ -1825,38 +1825,38 @@ class Mn {
|
|
|
1825
1825
|
cause: G ? "preload" : N,
|
|
1826
1826
|
route: w
|
|
1827
1827
|
};
|
|
1828
|
-
}, T = Date.now() - this.getMatch(
|
|
1829
|
-
i(
|
|
1828
|
+
}, T = Date.now() - this.getMatch(v).updatedAt, I = l(v), D = I ? w.options.preloadStaleTime ?? this.options.defaultPreloadStaleTime ?? 3e4 : w.options.staleTime ?? this.options.defaultStaleTime ?? 0, W = w.options.shouldReload, q = typeof W == "function" ? W(k()) : W;
|
|
1829
|
+
i(v, (O) => ({
|
|
1830
1830
|
...O,
|
|
1831
1831
|
loaderPromise: pe(),
|
|
1832
|
-
preload: !!I && !this.state.matches.find((K) => K.id ===
|
|
1832
|
+
preload: !!I && !this.state.matches.find((K) => K.id === v)
|
|
1833
1833
|
}));
|
|
1834
1834
|
const J = async () => {
|
|
1835
1835
|
var O, K, V, A, N, G, Y, xe, Ee;
|
|
1836
1836
|
try {
|
|
1837
1837
|
const ie = async () => {
|
|
1838
|
-
const U = this.getMatch(
|
|
1838
|
+
const U = this.getMatch(v);
|
|
1839
1839
|
U.minPendingPromise && await U.minPendingPromise;
|
|
1840
1840
|
};
|
|
1841
1841
|
try {
|
|
1842
|
-
this.loadRouteChunk(w), i(
|
|
1842
|
+
this.loadRouteChunk(w), i(v, (fe) => ({
|
|
1843
1843
|
...fe,
|
|
1844
1844
|
isFetching: "loader"
|
|
1845
1845
|
}));
|
|
1846
1846
|
const U = await ((K = (O = w.options).loader) == null ? void 0 : K.call(O, k()));
|
|
1847
1847
|
h(
|
|
1848
|
-
this.getMatch(
|
|
1848
|
+
this.getMatch(v),
|
|
1849
1849
|
U
|
|
1850
1850
|
), await w._lazyPromise, await ie();
|
|
1851
1851
|
const Q = (A = (V = w.options).head) == null ? void 0 : A.call(V, {
|
|
1852
|
-
matches:
|
|
1853
|
-
match: this.getMatch(
|
|
1854
|
-
params: this.getMatch(
|
|
1852
|
+
matches: o,
|
|
1853
|
+
match: this.getMatch(v),
|
|
1854
|
+
params: this.getMatch(v).params,
|
|
1855
1855
|
loaderData: U
|
|
1856
1856
|
}), se = Q?.meta, ae = Q?.links, we = Q?.scripts, Pe = (G = (N = w.options).headers) == null ? void 0 : G.call(N, {
|
|
1857
1857
|
loaderData: U
|
|
1858
1858
|
});
|
|
1859
|
-
i(
|
|
1859
|
+
i(v, (fe) => ({
|
|
1860
1860
|
...fe,
|
|
1861
1861
|
error: void 0,
|
|
1862
1862
|
status: "success",
|
|
@@ -1870,16 +1870,16 @@ class Mn {
|
|
|
1870
1870
|
}));
|
|
1871
1871
|
} catch (U) {
|
|
1872
1872
|
let Q = U;
|
|
1873
|
-
await ie(), h(this.getMatch(
|
|
1873
|
+
await ie(), h(this.getMatch(v), U);
|
|
1874
1874
|
try {
|
|
1875
1875
|
(xe = (Y = w.options).onError) == null || xe.call(Y, U);
|
|
1876
1876
|
} catch (se) {
|
|
1877
1877
|
Q = se, h(
|
|
1878
|
-
this.getMatch(
|
|
1878
|
+
this.getMatch(v),
|
|
1879
1879
|
se
|
|
1880
1880
|
);
|
|
1881
1881
|
}
|
|
1882
|
-
i(
|
|
1882
|
+
i(v, (se) => ({
|
|
1883
1883
|
...se,
|
|
1884
1884
|
error: Q,
|
|
1885
1885
|
status: "error",
|
|
@@ -1888,20 +1888,20 @@ class Mn {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
(Ee = this.serverSsr) == null || Ee.onMatchSettled({
|
|
1890
1890
|
router: this,
|
|
1891
|
-
match: this.getMatch(
|
|
1891
|
+
match: this.getMatch(v)
|
|
1892
1892
|
}), await w._componentsPromise;
|
|
1893
1893
|
} catch (ie) {
|
|
1894
|
-
i(
|
|
1894
|
+
i(v, (U) => ({
|
|
1895
1895
|
...U,
|
|
1896
1896
|
loaderPromise: void 0
|
|
1897
|
-
})), h(this.getMatch(
|
|
1897
|
+
})), h(this.getMatch(v), ie);
|
|
1898
1898
|
}
|
|
1899
|
-
}, { status: j, invalid: ne } = this.getMatch(
|
|
1899
|
+
}, { status: j, invalid: ne } = this.getMatch(v);
|
|
1900
1900
|
_ = j === "success" && (ne || (q ?? T > D)), I && w.options.preload === !1 || (_ && !a ? (E = !0, (async () => {
|
|
1901
1901
|
try {
|
|
1902
1902
|
await J();
|
|
1903
|
-
const { loaderPromise: O, loadPromise: K } = this.getMatch(
|
|
1904
|
-
O?.resolve(), K?.resolve(), i(
|
|
1903
|
+
const { loaderPromise: O, loadPromise: K } = this.getMatch(v);
|
|
1904
|
+
O?.resolve(), K?.resolve(), i(v, (V) => ({
|
|
1905
1905
|
...V,
|
|
1906
1906
|
loaderPromise: void 0
|
|
1907
1907
|
}));
|
|
@@ -1911,15 +1911,15 @@ class Mn {
|
|
|
1911
1911
|
})()) : (j !== "success" || _ && a) && await J());
|
|
1912
1912
|
}
|
|
1913
1913
|
if (!E) {
|
|
1914
|
-
const { loaderPromise: m, loadPromise: w } = this.getMatch(
|
|
1914
|
+
const { loaderPromise: m, loadPromise: w } = this.getMatch(v);
|
|
1915
1915
|
m?.resolve(), w?.resolve();
|
|
1916
1916
|
}
|
|
1917
|
-
return i(
|
|
1917
|
+
return i(v, (m) => ({
|
|
1918
1918
|
...m,
|
|
1919
1919
|
isFetching: E ? m.isFetching : !1,
|
|
1920
1920
|
loaderPromise: E ? m.loaderPromise : void 0,
|
|
1921
1921
|
invalid: !1
|
|
1922
|
-
})), this.getMatch(
|
|
1922
|
+
})), this.getMatch(v);
|
|
1923
1923
|
})()
|
|
1924
1924
|
);
|
|
1925
1925
|
}), await Promise.all(P), f();
|
|
@@ -1930,63 +1930,63 @@ class Mn {
|
|
|
1930
1930
|
}), await d();
|
|
1931
1931
|
} catch (f) {
|
|
1932
1932
|
if (ce(f) || ee(f))
|
|
1933
|
-
throw ee(f) && !
|
|
1933
|
+
throw ee(f) && !r && await d(), f;
|
|
1934
1934
|
}
|
|
1935
|
-
return
|
|
1935
|
+
return o;
|
|
1936
1936
|
}, this.invalidate = (e) => {
|
|
1937
|
-
const
|
|
1937
|
+
const o = (r) => {
|
|
1938
1938
|
var s;
|
|
1939
|
-
return ((s = e?.filter) == null ? void 0 : s.call(e,
|
|
1940
|
-
...
|
|
1939
|
+
return ((s = e?.filter) == null ? void 0 : s.call(e, r)) ?? !0 ? {
|
|
1940
|
+
...r,
|
|
1941
1941
|
invalid: !0,
|
|
1942
|
-
...
|
|
1943
|
-
} :
|
|
1942
|
+
...r.status === "error" ? { status: "pending", error: void 0 } : {}
|
|
1943
|
+
} : r;
|
|
1944
1944
|
};
|
|
1945
|
-
return this.__store.setState((
|
|
1945
|
+
return this.__store.setState((r) => {
|
|
1946
1946
|
var s;
|
|
1947
1947
|
return {
|
|
1948
|
-
...
|
|
1949
|
-
matches:
|
|
1950
|
-
cachedMatches:
|
|
1951
|
-
pendingMatches: (s =
|
|
1948
|
+
...r,
|
|
1949
|
+
matches: r.matches.map(o),
|
|
1950
|
+
cachedMatches: r.cachedMatches.map(o),
|
|
1951
|
+
pendingMatches: (s = r.pendingMatches) == null ? void 0 : s.map(o)
|
|
1952
1952
|
};
|
|
1953
1953
|
}), this.load({ sync: e?.sync });
|
|
1954
1954
|
}, this.resolveRedirect = (e) => {
|
|
1955
|
-
const
|
|
1956
|
-
return
|
|
1955
|
+
const o = e;
|
|
1956
|
+
return o.href || (o.href = this.buildLocation(o).href), o;
|
|
1957
1957
|
}, this.clearCache = (e) => {
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
...
|
|
1961
|
-
cachedMatches:
|
|
1962
|
-
(s) => !
|
|
1958
|
+
const o = e?.filter;
|
|
1959
|
+
o !== void 0 ? this.__store.setState((r) => ({
|
|
1960
|
+
...r,
|
|
1961
|
+
cachedMatches: r.cachedMatches.filter(
|
|
1962
|
+
(s) => !o(s)
|
|
1963
1963
|
)
|
|
1964
|
-
})) : this.__store.setState((
|
|
1965
|
-
...
|
|
1964
|
+
})) : this.__store.setState((r) => ({
|
|
1965
|
+
...r,
|
|
1966
1966
|
cachedMatches: []
|
|
1967
1967
|
}));
|
|
1968
1968
|
}, this.clearExpiredCache = () => {
|
|
1969
|
-
const e = (
|
|
1970
|
-
const
|
|
1971
|
-
if (!
|
|
1969
|
+
const e = (o) => {
|
|
1970
|
+
const r = this.looseRoutesById[o.routeId];
|
|
1971
|
+
if (!r.options.loader)
|
|
1972
1972
|
return !0;
|
|
1973
|
-
const s = (
|
|
1974
|
-
return !(
|
|
1973
|
+
const s = (o.preload ? r.options.preloadGcTime ?? this.options.defaultPreloadGcTime : r.options.gcTime ?? this.options.defaultGcTime) ?? 5 * 60 * 1e3;
|
|
1974
|
+
return !(o.status !== "error" && Date.now() - o.updatedAt < s);
|
|
1975
1975
|
};
|
|
1976
1976
|
this.clearCache({ filter: e });
|
|
1977
|
-
}, this.loadRouteChunk = (e) => (e._lazyPromise === void 0 && (e.lazyFn ? e._lazyPromise = e.lazyFn().then((
|
|
1978
|
-
const { id:
|
|
1977
|
+
}, this.loadRouteChunk = (e) => (e._lazyPromise === void 0 && (e.lazyFn ? e._lazyPromise = e.lazyFn().then((o) => {
|
|
1978
|
+
const { id: r, ...s } = o.options;
|
|
1979
1979
|
Object.assign(e.options, s);
|
|
1980
1980
|
}) : e._lazyPromise = Promise.resolve()), e._componentsPromise === void 0 && (e._componentsPromise = e._lazyPromise.then(
|
|
1981
1981
|
() => Promise.all(
|
|
1982
|
-
Lt.map(async (
|
|
1983
|
-
const
|
|
1984
|
-
|
|
1982
|
+
Lt.map(async (o) => {
|
|
1983
|
+
const r = e.options[o];
|
|
1984
|
+
r?.preload && await r.preload();
|
|
1985
1985
|
})
|
|
1986
1986
|
)
|
|
1987
1987
|
)), e._componentsPromise), this.preloadRoute = async (e) => {
|
|
1988
|
-
const
|
|
1989
|
-
let
|
|
1988
|
+
const o = this.buildLocation(e);
|
|
1989
|
+
let r = this.matchRoutes(o, {
|
|
1990
1990
|
throwOnError: !0,
|
|
1991
1991
|
preload: !0,
|
|
1992
1992
|
dest: e
|
|
@@ -2000,33 +2000,33 @@ class Mn {
|
|
|
2000
2000
|
...this.state.cachedMatches.map((a) => a.id)
|
|
2001
2001
|
]);
|
|
2002
2002
|
Ge(() => {
|
|
2003
|
-
|
|
2004
|
-
i.has(a.id) || this.__store.setState((
|
|
2005
|
-
...
|
|
2006
|
-
cachedMatches: [...
|
|
2003
|
+
r.forEach((a) => {
|
|
2004
|
+
i.has(a.id) || this.__store.setState((u) => ({
|
|
2005
|
+
...u,
|
|
2006
|
+
cachedMatches: [...u.cachedMatches, a]
|
|
2007
2007
|
}));
|
|
2008
2008
|
});
|
|
2009
2009
|
});
|
|
2010
2010
|
try {
|
|
2011
|
-
return
|
|
2012
|
-
matches:
|
|
2013
|
-
location:
|
|
2011
|
+
return r = await this.loadMatches({
|
|
2012
|
+
matches: r,
|
|
2013
|
+
location: o,
|
|
2014
2014
|
preload: !0,
|
|
2015
|
-
updateMatch: (a,
|
|
2016
|
-
s.has(a) ?
|
|
2015
|
+
updateMatch: (a, u) => {
|
|
2016
|
+
s.has(a) ? r = r.map((c) => c.id === a ? u(c) : c) : this.updateMatch(a, u);
|
|
2017
2017
|
}
|
|
2018
|
-
}),
|
|
2018
|
+
}), r;
|
|
2019
2019
|
} catch (a) {
|
|
2020
2020
|
if (ce(a))
|
|
2021
2021
|
return a.reloadDocument ? void 0 : await this.preloadRoute({
|
|
2022
2022
|
...a,
|
|
2023
|
-
_fromLocation:
|
|
2023
|
+
_fromLocation: o
|
|
2024
2024
|
});
|
|
2025
2025
|
console.error(a);
|
|
2026
2026
|
return;
|
|
2027
2027
|
}
|
|
2028
|
-
}, this.matchRoute = (e,
|
|
2029
|
-
const
|
|
2028
|
+
}, this.matchRoute = (e, o) => {
|
|
2029
|
+
const r = {
|
|
2030
2030
|
...e,
|
|
2031
2031
|
to: e.to ? this.resolvePathWithBase(
|
|
2032
2032
|
e.from || "",
|
|
@@ -2034,34 +2034,34 @@ class Mn {
|
|
|
2034
2034
|
) : void 0,
|
|
2035
2035
|
params: e.params || {},
|
|
2036
2036
|
leaveParams: !0
|
|
2037
|
-
}, s = this.buildLocation(
|
|
2038
|
-
if (
|
|
2037
|
+
}, s = this.buildLocation(r);
|
|
2038
|
+
if (o?.pending && this.state.status !== "pending")
|
|
2039
2039
|
return !1;
|
|
2040
|
-
const a = (
|
|
2041
|
-
...
|
|
2040
|
+
const a = (o?.pending === void 0 ? !this.state.isLoading : o.pending) ? this.latestLocation : this.state.resolvedLocation, u = Fe(this.basepath, a.pathname, {
|
|
2041
|
+
...o,
|
|
2042
2042
|
to: s.pathname
|
|
2043
2043
|
});
|
|
2044
|
-
return !
|
|
2045
|
-
}, this._handleNotFound = (e,
|
|
2046
|
-
updateMatch:
|
|
2044
|
+
return !u || e.params && !ge(u, e.params, { partial: !0 }) ? !1 : u && (o?.includeSearch ?? !0) ? ge(a.search, s.search, { partial: !0 }) ? u : !1 : u;
|
|
2045
|
+
}, this._handleNotFound = (e, o, {
|
|
2046
|
+
updateMatch: r = this.updateMatch
|
|
2047
2047
|
} = {}) => {
|
|
2048
2048
|
const s = Object.fromEntries(
|
|
2049
|
-
e.map((
|
|
2049
|
+
e.map((u) => [u.routeId, u])
|
|
2050
2050
|
);
|
|
2051
|
-
let i = (
|
|
2051
|
+
let i = (o.global ? this.looseRoutesById[H] : this.looseRoutesById[o.routeId]) || this.looseRoutesById[H];
|
|
2052
2052
|
for (; !i.options.notFoundComponent && !this.options.defaultNotFoundComponent && i.id !== H; )
|
|
2053
2053
|
i = i.parentRoute, te(
|
|
2054
2054
|
i,
|
|
2055
2055
|
"Found invalid route tree while trying to find not-found handler."
|
|
2056
2056
|
);
|
|
2057
2057
|
const a = s[i.id];
|
|
2058
|
-
te(a, "Could not find match for route: " + i.id),
|
|
2059
|
-
...
|
|
2058
|
+
te(a, "Could not find match for route: " + i.id), r(a.id, (u) => ({
|
|
2059
|
+
...u,
|
|
2060
2060
|
status: "notFound",
|
|
2061
|
-
error:
|
|
2061
|
+
error: o,
|
|
2062
2062
|
isFetching: !1
|
|
2063
|
-
})),
|
|
2064
|
-
updateMatch:
|
|
2063
|
+
})), o.routerCode === "BEFORE_LOAD" && i.parentRoute && (o.routeId = i.parentRoute.id, this._handleNotFound(e, o, {
|
|
2064
|
+
updateMatch: r
|
|
2065
2065
|
}));
|
|
2066
2066
|
}, this.hasNotFoundMatch = () => this.__store.state.matches.some(
|
|
2067
2067
|
(e) => e.status === "notFound" || e.globalNotFound
|
|
@@ -2083,40 +2083,40 @@ class Mn {
|
|
|
2083
2083
|
get looseRoutesById() {
|
|
2084
2084
|
return this.routesById;
|
|
2085
2085
|
}
|
|
2086
|
-
matchRoutes(n, e,
|
|
2086
|
+
matchRoutes(n, e, o) {
|
|
2087
2087
|
return typeof n == "string" ? this.matchRoutesInternal(
|
|
2088
2088
|
{
|
|
2089
2089
|
pathname: n,
|
|
2090
2090
|
search: e
|
|
2091
2091
|
},
|
|
2092
|
-
|
|
2092
|
+
o
|
|
2093
2093
|
) : this.matchRoutesInternal(n, e);
|
|
2094
2094
|
}
|
|
2095
2095
|
matchRoutesInternal(n, e) {
|
|
2096
|
-
const { foundRoute:
|
|
2096
|
+
const { foundRoute: o, matchedRoutes: r, routeParams: s } = this.getMatchedRoutes(
|
|
2097
2097
|
n,
|
|
2098
2098
|
e?.dest
|
|
2099
2099
|
);
|
|
2100
2100
|
let i = !1;
|
|
2101
2101
|
// If we found a route, and it's not an index route and we have left over path
|
|
2102
|
-
(
|
|
2102
|
+
(o ? o.path !== "/" && s["**"] : (
|
|
2103
2103
|
// Or if we didn't find a route and we have left over path
|
|
2104
|
-
|
|
2105
|
-
)) && (this.options.notFoundRoute ?
|
|
2104
|
+
ue(n.pathname)
|
|
2105
|
+
)) && (this.options.notFoundRoute ? r.push(this.options.notFoundRoute) : i = !0);
|
|
2106
2106
|
const a = (() => {
|
|
2107
2107
|
if (i) {
|
|
2108
2108
|
if (this.options.notFoundMode !== "root")
|
|
2109
|
-
for (let
|
|
2110
|
-
const h =
|
|
2109
|
+
for (let l = r.length - 1; l >= 0; l--) {
|
|
2110
|
+
const h = r[l];
|
|
2111
2111
|
if (h.children)
|
|
2112
2112
|
return h.id;
|
|
2113
2113
|
}
|
|
2114
2114
|
return H;
|
|
2115
2115
|
}
|
|
2116
|
-
})(),
|
|
2116
|
+
})(), u = r.map((l) => {
|
|
2117
2117
|
var h;
|
|
2118
2118
|
let f;
|
|
2119
|
-
const p = ((h =
|
|
2119
|
+
const p = ((h = l.options.params) == null ? void 0 : h.parse) ?? l.options.parseParams;
|
|
2120
2120
|
if (p)
|
|
2121
2121
|
try {
|
|
2122
2122
|
const S = p(s);
|
|
@@ -2128,13 +2128,13 @@ class Mn {
|
|
|
2128
2128
|
throw f;
|
|
2129
2129
|
return f;
|
|
2130
2130
|
}
|
|
2131
|
-
}), c = [], d = (
|
|
2132
|
-
return
|
|
2133
|
-
var f, p, S,
|
|
2131
|
+
}), c = [], d = (l) => l?.id ? l.context ?? this.options.context ?? {} : this.options.context ?? {};
|
|
2132
|
+
return r.forEach((l, h) => {
|
|
2133
|
+
var f, p, S, g;
|
|
2134
2134
|
const M = c[h - 1], [R, L] = (() => {
|
|
2135
2135
|
const k = M?.search ?? n.search;
|
|
2136
2136
|
try {
|
|
2137
|
-
const T = Ye(
|
|
2137
|
+
const T = Ye(l.options.validateSearch, k) ?? {};
|
|
2138
2138
|
return [
|
|
2139
2139
|
{
|
|
2140
2140
|
...k,
|
|
@@ -2143,50 +2143,50 @@ class Mn {
|
|
|
2143
2143
|
void 0
|
|
2144
2144
|
];
|
|
2145
2145
|
} catch (T) {
|
|
2146
|
-
const I = new
|
|
2146
|
+
const I = new rt(T.message, {
|
|
2147
2147
|
cause: T
|
|
2148
2148
|
});
|
|
2149
2149
|
if (e?.throwOnError)
|
|
2150
2150
|
throw I;
|
|
2151
2151
|
return [k, I];
|
|
2152
2152
|
}
|
|
2153
|
-
})(), P = ((p = (f =
|
|
2153
|
+
})(), P = ((p = (f = l.options).loaderDeps) == null ? void 0 : p.call(f, {
|
|
2154
2154
|
search: R
|
|
2155
|
-
})) ?? "",
|
|
2156
|
-
path:
|
|
2155
|
+
})) ?? "", v = P ? JSON.stringify(P) : "", x = ke({
|
|
2156
|
+
path: l.fullPath,
|
|
2157
2157
|
params: s,
|
|
2158
2158
|
decodeCharMap: this.pathParamsDecodeCharMap
|
|
2159
2159
|
}), F = ke({
|
|
2160
|
-
path:
|
|
2160
|
+
path: l.id,
|
|
2161
2161
|
params: s,
|
|
2162
2162
|
leaveWildcards: !0,
|
|
2163
2163
|
decodeCharMap: this.pathParamsDecodeCharMap
|
|
2164
|
-
}) +
|
|
2165
|
-
(k) => k.routeId ===
|
|
2164
|
+
}) + v, y = this.getMatch(F), _ = this.state.matches.find(
|
|
2165
|
+
(k) => k.routeId === l.id
|
|
2166
2166
|
), E = _ ? "stay" : "enter";
|
|
2167
2167
|
let m;
|
|
2168
|
-
if (
|
|
2168
|
+
if (y)
|
|
2169
2169
|
m = {
|
|
2170
|
-
...
|
|
2170
|
+
...y,
|
|
2171
2171
|
cause: E,
|
|
2172
2172
|
params: _ ? X(_.params, s) : s,
|
|
2173
|
-
search: X(_ ? _.search :
|
|
2173
|
+
search: X(_ ? _.search : y.search, R)
|
|
2174
2174
|
};
|
|
2175
2175
|
else {
|
|
2176
|
-
const k =
|
|
2176
|
+
const k = l.options.loader || l.options.beforeLoad || l.lazyFn || Ln(l) ? "pending" : "success";
|
|
2177
2177
|
m = {
|
|
2178
2178
|
id: F,
|
|
2179
2179
|
index: h,
|
|
2180
|
-
routeId:
|
|
2180
|
+
routeId: l.id,
|
|
2181
2181
|
params: _ ? X(_.params, s) : s,
|
|
2182
|
-
pathname:
|
|
2182
|
+
pathname: oe([this.basepath, x]),
|
|
2183
2183
|
updatedAt: Date.now(),
|
|
2184
2184
|
search: _ ? X(_.search, R) : R,
|
|
2185
2185
|
searchError: void 0,
|
|
2186
2186
|
status: k,
|
|
2187
2187
|
isFetching: !1,
|
|
2188
2188
|
error: void 0,
|
|
2189
|
-
paramsError:
|
|
2189
|
+
paramsError: u[h],
|
|
2190
2190
|
__routeContext: {},
|
|
2191
2191
|
__beforeLoadContext: {},
|
|
2192
2192
|
context: {},
|
|
@@ -2199,53 +2199,53 @@ class Mn {
|
|
|
2199
2199
|
links: void 0,
|
|
2200
2200
|
scripts: void 0,
|
|
2201
2201
|
meta: void 0,
|
|
2202
|
-
staticData:
|
|
2202
|
+
staticData: l.options.staticData || {},
|
|
2203
2203
|
loadPromise: pe(),
|
|
2204
|
-
fullPath:
|
|
2204
|
+
fullPath: l.fullPath
|
|
2205
2205
|
};
|
|
2206
2206
|
}
|
|
2207
|
-
m.status === "success" && (m.headers = (
|
|
2207
|
+
m.status === "success" && (m.headers = (g = (S = l.options).headers) == null ? void 0 : g.call(S, {
|
|
2208
2208
|
loaderData: m.loaderData
|
|
2209
|
-
})), e?.preload || (m.globalNotFound = a ===
|
|
2209
|
+
})), e?.preload || (m.globalNotFound = a === l.id), m.searchError = L;
|
|
2210
2210
|
const w = d(M);
|
|
2211
2211
|
m.context = {
|
|
2212
2212
|
...w,
|
|
2213
2213
|
...m.__routeContext,
|
|
2214
2214
|
...m.__beforeLoadContext
|
|
2215
2215
|
}, c.push(m);
|
|
2216
|
-
}), c.forEach((
|
|
2217
|
-
var f, p, S,
|
|
2218
|
-
const M = this.looseRoutesById[
|
|
2219
|
-
if (!this.getMatch(
|
|
2220
|
-
const P = c[h - 1],
|
|
2221
|
-
deps:
|
|
2222
|
-
params:
|
|
2223
|
-
context:
|
|
2216
|
+
}), c.forEach((l, h) => {
|
|
2217
|
+
var f, p, S, g;
|
|
2218
|
+
const M = this.looseRoutesById[l.routeId];
|
|
2219
|
+
if (!this.getMatch(l.id) && e?._buildLocation !== !0) {
|
|
2220
|
+
const P = c[h - 1], v = d(P), x = {
|
|
2221
|
+
deps: l.loaderDeps,
|
|
2222
|
+
params: l.params,
|
|
2223
|
+
context: v,
|
|
2224
2224
|
location: n,
|
|
2225
2225
|
navigate: (F) => this.navigate({ ...F, _fromLocation: n }),
|
|
2226
2226
|
buildLocation: this.buildLocation,
|
|
2227
|
-
cause:
|
|
2228
|
-
abortController:
|
|
2229
|
-
preload: !!
|
|
2227
|
+
cause: l.cause,
|
|
2228
|
+
abortController: l.abortController,
|
|
2229
|
+
preload: !!l.preload,
|
|
2230
2230
|
matches: c
|
|
2231
2231
|
};
|
|
2232
|
-
|
|
2233
|
-
...
|
|
2234
|
-
...
|
|
2235
|
-
...
|
|
2232
|
+
l.__routeContext = ((p = (f = M.options).context) == null ? void 0 : p.call(f, x)) ?? {}, l.context = {
|
|
2233
|
+
...v,
|
|
2234
|
+
...l.__routeContext,
|
|
2235
|
+
...l.__beforeLoadContext
|
|
2236
2236
|
};
|
|
2237
2237
|
}
|
|
2238
|
-
const L = (
|
|
2238
|
+
const L = (g = (S = M.options).head) == null ? void 0 : g.call(S, {
|
|
2239
2239
|
matches: c,
|
|
2240
|
-
match:
|
|
2241
|
-
params:
|
|
2242
|
-
loaderData:
|
|
2240
|
+
match: l,
|
|
2241
|
+
params: l.params,
|
|
2242
|
+
loaderData: l.loaderData ?? void 0
|
|
2243
2243
|
});
|
|
2244
|
-
|
|
2244
|
+
l.links = L?.links, l.scripts = L?.scripts, l.meta = L?.meta;
|
|
2245
2245
|
}), c;
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
|
-
class
|
|
2248
|
+
class rt extends Error {
|
|
2249
2249
|
}
|
|
2250
2250
|
class xn extends Error {
|
|
2251
2251
|
}
|
|
@@ -2271,15 +2271,15 @@ function he(t) {
|
|
|
2271
2271
|
t.from ? In : Ue
|
|
2272
2272
|
);
|
|
2273
2273
|
return z({
|
|
2274
|
-
select: (
|
|
2275
|
-
const
|
|
2274
|
+
select: (o) => {
|
|
2275
|
+
const r = o.matches.find(
|
|
2276
2276
|
(s) => t.from ? t.from === s.routeId : s.id === n
|
|
2277
2277
|
);
|
|
2278
2278
|
if (te(
|
|
2279
|
-
!((t.shouldThrow ?? !0) && !
|
|
2279
|
+
!((t.shouldThrow ?? !0) && !r),
|
|
2280
2280
|
`Could not find ${t.from ? `an active match from "${t.from}"` : "a nearest match!"}`
|
|
2281
|
-
),
|
|
2282
|
-
return t.select ? t.select(
|
|
2281
|
+
), r !== void 0)
|
|
2282
|
+
return t.select ? t.select(r) : r;
|
|
2283
2283
|
},
|
|
2284
2284
|
structuralSharing: t.structuralSharing
|
|
2285
2285
|
});
|
|
@@ -2296,7 +2296,7 @@ function Fn(t) {
|
|
|
2296
2296
|
const { select: n, ...e } = t;
|
|
2297
2297
|
return he({
|
|
2298
2298
|
...e,
|
|
2299
|
-
select: (
|
|
2299
|
+
select: (o) => n ? n(o.loaderDeps) : o.loaderDeps
|
|
2300
2300
|
});
|
|
2301
2301
|
}
|
|
2302
2302
|
function Tn(t) {
|
|
@@ -2316,7 +2316,7 @@ function Bn(t) {
|
|
|
2316
2316
|
});
|
|
2317
2317
|
}
|
|
2318
2318
|
function Dn(t) {
|
|
2319
|
-
const { navigate: n } =
|
|
2319
|
+
const { navigate: n } = re();
|
|
2320
2320
|
return b.useCallback(
|
|
2321
2321
|
(e) => n({
|
|
2322
2322
|
...e
|
|
@@ -2330,22 +2330,22 @@ class Mt {
|
|
|
2330
2330
|
*/
|
|
2331
2331
|
constructor(n) {
|
|
2332
2332
|
this.init = (e) => {
|
|
2333
|
-
var
|
|
2333
|
+
var o, r;
|
|
2334
2334
|
this.originalIndex = e.originalIndex;
|
|
2335
2335
|
const s = this.options, i = !s?.path && !s?.id;
|
|
2336
|
-
this.parentRoute = (
|
|
2336
|
+
this.parentRoute = (r = (o = this.options).getParentRoute) == null ? void 0 : r.call(o), i ? this._path = H : te(
|
|
2337
2337
|
this.parentRoute,
|
|
2338
2338
|
"Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance."
|
|
2339
2339
|
);
|
|
2340
2340
|
let a = i ? H : s.path;
|
|
2341
2341
|
a && a !== "/" && (a = at(a));
|
|
2342
|
-
const
|
|
2343
|
-
let c = i ? H :
|
|
2342
|
+
const u = s?.id || a;
|
|
2343
|
+
let c = i ? H : oe([
|
|
2344
2344
|
this.parentRoute.id === H ? "" : this.parentRoute.id,
|
|
2345
|
-
|
|
2345
|
+
u
|
|
2346
2346
|
]);
|
|
2347
|
-
a === H && (a = "/"), c !== H && (c =
|
|
2348
|
-
const d = c === H ? "/" :
|
|
2347
|
+
a === H && (a = "/"), c !== H && (c = oe(["/", c]));
|
|
2348
|
+
const d = c === H ? "/" : oe([this.parentRoute.fullPath, a]);
|
|
2349
2349
|
this._path = a, this._id = c, this._fullPath = d, this._to = d, this._ssr = s?.ssr ?? e.defaultSsr ?? !0;
|
|
2350
2350
|
}, this.updateLoader = (e) => (Object.assign(this.options, e), this), this.update = (e) => (Object.assign(this.options, e), this), this.lazy = (e) => (this.lazyFn = e, this), this.useMatch = (e) => he({
|
|
2351
2351
|
select: e?.select,
|
|
@@ -2354,7 +2354,7 @@ class Mt {
|
|
|
2354
2354
|
}), this.useRouteContext = (e) => he({
|
|
2355
2355
|
...e,
|
|
2356
2356
|
from: this.id,
|
|
2357
|
-
select: (
|
|
2357
|
+
select: (o) => e?.select ? e.select(o.context) : o.context
|
|
2358
2358
|
}), this.useSearch = (e) => Bn({
|
|
2359
2359
|
select: e?.select,
|
|
2360
2360
|
structuralSharing: e?.structuralSharing,
|
|
@@ -2393,7 +2393,7 @@ class Mt {
|
|
|
2393
2393
|
function On(t) {
|
|
2394
2394
|
return new Mt(t);
|
|
2395
2395
|
}
|
|
2396
|
-
function
|
|
2396
|
+
function io() {
|
|
2397
2397
|
return (t) => An(t);
|
|
2398
2398
|
}
|
|
2399
2399
|
class Vn extends Mt {
|
|
@@ -2416,20 +2416,20 @@ class Vn extends Mt {
|
|
|
2416
2416
|
function An(t) {
|
|
2417
2417
|
return new Vn(t);
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function ao(t) {
|
|
2420
2420
|
return new Nn(t, {
|
|
2421
2421
|
silent: !0
|
|
2422
2422
|
}).createRoute;
|
|
2423
2423
|
}
|
|
2424
2424
|
class Nn {
|
|
2425
2425
|
constructor(n, e) {
|
|
2426
|
-
this.path = n, this.createRoute = (
|
|
2426
|
+
this.path = n, this.createRoute = (o) => {
|
|
2427
2427
|
Me(
|
|
2428
2428
|
this.silent,
|
|
2429
2429
|
"FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead."
|
|
2430
2430
|
);
|
|
2431
|
-
const
|
|
2432
|
-
return
|
|
2431
|
+
const r = On(o);
|
|
2432
|
+
return r.isRoot = !1, r;
|
|
2433
2433
|
}, this.silent = e?.silent;
|
|
2434
2434
|
}
|
|
2435
2435
|
}
|
|
@@ -2442,42 +2442,42 @@ function xt(t, n, e) {
|
|
|
2442
2442
|
const Et = b.memo(function({
|
|
2443
2443
|
matchId: n
|
|
2444
2444
|
}) {
|
|
2445
|
-
var e,
|
|
2446
|
-
const
|
|
2447
|
-
select: (
|
|
2445
|
+
var e, o;
|
|
2446
|
+
const r = re(), s = z({
|
|
2447
|
+
select: (g) => {
|
|
2448
2448
|
var M;
|
|
2449
|
-
return (M =
|
|
2449
|
+
return (M = g.matches.find((R) => R.id === n)) == null ? void 0 : M.routeId;
|
|
2450
2450
|
}
|
|
2451
2451
|
});
|
|
2452
2452
|
te(
|
|
2453
2453
|
s,
|
|
2454
2454
|
`Could not find routeId for matchId "${n}". Please file an issue!`
|
|
2455
2455
|
);
|
|
2456
|
-
const i =
|
|
2456
|
+
const i = r.routesById[s], a = i.options.pendingComponent ?? r.options.defaultPendingComponent, u = a ? /* @__PURE__ */ C(a, {}) : null, c = i.options.errorComponent ?? r.options.defaultErrorComponent, d = i.options.onCatch ?? r.options.defaultOnCatch, l = i.isRoot ? (
|
|
2457
2457
|
// If it's the root route, use the globalNotFound option, with fallback to the notFoundRoute's component
|
|
2458
|
-
i.options.notFoundComponent ?? ((e =
|
|
2458
|
+
i.options.notFoundComponent ?? ((e = r.options.notFoundRoute) == null ? void 0 : e.options.component)
|
|
2459
2459
|
) : i.options.notFoundComponent, h = (
|
|
2460
2460
|
// If we're on the root route, allow forcefully wrapping in suspense
|
|
2461
|
-
(!i.isRoot || i.options.wrapInSuspense) && (i.options.wrapInSuspense ?? a ?? ((
|
|
2462
|
-
), f = c ? ct : Be, p =
|
|
2463
|
-
select: (
|
|
2461
|
+
(!i.isRoot || i.options.wrapInSuspense) && (i.options.wrapInSuspense ?? a ?? ((o = i.options.errorComponent) == null ? void 0 : o.preload)) ? b.Suspense : Be
|
|
2462
|
+
), f = c ? ct : Be, p = l ? Rn : Be, S = z({
|
|
2463
|
+
select: (g) => g.loadedAt
|
|
2464
2464
|
});
|
|
2465
|
-
return /* @__PURE__ */ C(Ue.Provider, { value: n, children: /* @__PURE__ */ C(h, { fallback:
|
|
2465
|
+
return /* @__PURE__ */ C(Ue.Provider, { value: n, children: /* @__PURE__ */ C(h, { fallback: u, children: /* @__PURE__ */ C(
|
|
2466
2466
|
f,
|
|
2467
2467
|
{
|
|
2468
2468
|
getResetKey: () => S,
|
|
2469
2469
|
errorComponent: c || Ke,
|
|
2470
|
-
onCatch: (
|
|
2471
|
-
if (ee(
|
|
2472
|
-
Me(!1, `Error in route match: ${n}`), d?.(
|
|
2470
|
+
onCatch: (g, M) => {
|
|
2471
|
+
if (ee(g)) throw g;
|
|
2472
|
+
Me(!1, `Error in route match: ${n}`), d?.(g, M);
|
|
2473
2473
|
},
|
|
2474
2474
|
children: /* @__PURE__ */ C(
|
|
2475
2475
|
p,
|
|
2476
2476
|
{
|
|
2477
|
-
fallback: (
|
|
2478
|
-
if (!
|
|
2479
|
-
throw
|
|
2480
|
-
return b.createElement(
|
|
2477
|
+
fallback: (g) => {
|
|
2478
|
+
if (!l || g.routeId && g.routeId !== s || !g.routeId && !i.isRoot)
|
|
2479
|
+
throw g;
|
|
2480
|
+
return b.createElement(l, g);
|
|
2481
2481
|
},
|
|
2482
2482
|
children: /* @__PURE__ */ C($n, { matchId: n })
|
|
2483
2483
|
}
|
|
@@ -2487,21 +2487,21 @@ const Et = b.memo(function({
|
|
|
2487
2487
|
}), $n = b.memo(function({
|
|
2488
2488
|
matchId: n
|
|
2489
2489
|
}) {
|
|
2490
|
-
var e,
|
|
2491
|
-
const s =
|
|
2490
|
+
var e, o, r;
|
|
2491
|
+
const s = re(), { match: i, matchIndex: a, routeId: u } = z({
|
|
2492
2492
|
select: (h) => {
|
|
2493
|
-
const f = h.matches.findIndex((
|
|
2493
|
+
const f = h.matches.findIndex((g) => g.id === n), p = h.matches[f];
|
|
2494
2494
|
return {
|
|
2495
2495
|
routeId: p.routeId,
|
|
2496
2496
|
matchIndex: f,
|
|
2497
|
-
match:
|
|
2497
|
+
match: ot(p, ["id", "status", "error"])
|
|
2498
2498
|
};
|
|
2499
2499
|
},
|
|
2500
2500
|
structuralSharing: !0
|
|
2501
|
-
}), c = s.routesById[
|
|
2501
|
+
}), c = s.routesById[u], d = b.useMemo(() => {
|
|
2502
2502
|
const h = c.options.component ?? s.options.defaultComponent;
|
|
2503
2503
|
return h ? /* @__PURE__ */ C(h, {}) : /* @__PURE__ */ C(Kn, {});
|
|
2504
|
-
}, [c.options.component, s.options.defaultComponent]),
|
|
2504
|
+
}, [c.options.component, s.options.defaultComponent]), l = (c.options.errorComponent ?? s.options.defaultErrorComponent) || Ke;
|
|
2505
2505
|
if (i.status === "notFound")
|
|
2506
2506
|
return te(ee(i.error), "Expected a notFound error"), xt(s, c, i.error);
|
|
2507
2507
|
if (i.status === "redirected")
|
|
@@ -2509,7 +2509,7 @@ const Et = b.memo(function({
|
|
|
2509
2509
|
if (i.status === "error") {
|
|
2510
2510
|
if (s.isServer)
|
|
2511
2511
|
return /* @__PURE__ */ C(
|
|
2512
|
-
|
|
2512
|
+
l,
|
|
2513
2513
|
{
|
|
2514
2514
|
error: i.error,
|
|
2515
2515
|
info: {
|
|
@@ -2521,7 +2521,7 @@ const Et = b.memo(function({
|
|
|
2521
2521
|
}
|
|
2522
2522
|
if (i.status === "pending") {
|
|
2523
2523
|
const h = c.options.pendingMinMs ?? s.options.defaultPendingMinMs;
|
|
2524
|
-
if (h && !((
|
|
2524
|
+
if (h && !((o = s.getMatch(i.id)) != null && o.minPendingPromise) && !s.isServer) {
|
|
2525
2525
|
const f = pe();
|
|
2526
2526
|
Promise.resolve().then(() => {
|
|
2527
2527
|
s.updateMatch(i.id, (p) => ({
|
|
@@ -2535,59 +2535,59 @@ const Et = b.memo(function({
|
|
|
2535
2535
|
}));
|
|
2536
2536
|
}, h);
|
|
2537
2537
|
}
|
|
2538
|
-
throw (
|
|
2538
|
+
throw (r = s.getMatch(i.id)) == null ? void 0 : r.loadPromise;
|
|
2539
2539
|
}
|
|
2540
2540
|
return d;
|
|
2541
2541
|
}), Kn = b.memo(function() {
|
|
2542
|
-
const n =
|
|
2542
|
+
const n = re(), e = b.useContext(Ue), o = z({
|
|
2543
2543
|
select: (c) => {
|
|
2544
2544
|
var d;
|
|
2545
|
-
return (d = c.matches.find((
|
|
2545
|
+
return (d = c.matches.find((l) => l.id === e)) == null ? void 0 : d.routeId;
|
|
2546
2546
|
}
|
|
2547
|
-
}),
|
|
2547
|
+
}), r = n.routesById[o], s = z({
|
|
2548
2548
|
select: (c) => {
|
|
2549
|
-
const
|
|
2549
|
+
const l = c.matches.find((h) => h.id === e);
|
|
2550
2550
|
return te(
|
|
2551
|
-
|
|
2551
|
+
l,
|
|
2552
2552
|
`Could not find parent match for matchId "${e}"`
|
|
2553
|
-
),
|
|
2553
|
+
), l.globalNotFound;
|
|
2554
2554
|
}
|
|
2555
2555
|
}), i = z({
|
|
2556
2556
|
select: (c) => {
|
|
2557
2557
|
var d;
|
|
2558
|
-
const
|
|
2559
|
-
return (d =
|
|
2558
|
+
const l = c.matches, h = l.findIndex((f) => f.id === e);
|
|
2559
|
+
return (d = l[h + 1]) == null ? void 0 : d.id;
|
|
2560
2560
|
}
|
|
2561
2561
|
});
|
|
2562
2562
|
if (s)
|
|
2563
|
-
return xt(n,
|
|
2563
|
+
return xt(n, r, void 0);
|
|
2564
2564
|
if (!i)
|
|
2565
2565
|
return null;
|
|
2566
|
-
const a = /* @__PURE__ */ C(Et, { matchId: i }),
|
|
2567
|
-
return e === H ? /* @__PURE__ */ C(b.Suspense, { fallback:
|
|
2566
|
+
const a = /* @__PURE__ */ C(Et, { matchId: i }), u = n.options.defaultPendingComponent ? /* @__PURE__ */ C(n.options.defaultPendingComponent, {}) : null;
|
|
2567
|
+
return e === H ? /* @__PURE__ */ C(b.Suspense, { fallback: u, children: a }) : a;
|
|
2568
2568
|
}), Un = "Error preloading route! ☝️";
|
|
2569
2569
|
function zn(t, n) {
|
|
2570
|
-
const e =
|
|
2570
|
+
const e = re(), [o, r] = b.useState(!1), s = b.useRef(!1), i = gn(n), {
|
|
2571
2571
|
// custom props
|
|
2572
2572
|
activeProps: a = () => ({ className: "active" }),
|
|
2573
|
-
inactiveProps:
|
|
2573
|
+
inactiveProps: u = () => ({}),
|
|
2574
2574
|
activeOptions: c,
|
|
2575
2575
|
to: d,
|
|
2576
|
-
preload:
|
|
2576
|
+
preload: l,
|
|
2577
2577
|
preloadDelay: h,
|
|
2578
2578
|
hashScrollIntoView: f,
|
|
2579
2579
|
replace: p,
|
|
2580
2580
|
startTransition: S,
|
|
2581
|
-
resetScroll:
|
|
2581
|
+
resetScroll: g,
|
|
2582
2582
|
viewTransition: M,
|
|
2583
2583
|
// element props
|
|
2584
2584
|
children: R,
|
|
2585
2585
|
target: L,
|
|
2586
2586
|
disabled: P,
|
|
2587
|
-
style:
|
|
2587
|
+
style: v,
|
|
2588
2588
|
className: x,
|
|
2589
2589
|
onClick: F,
|
|
2590
|
-
onFocus:
|
|
2590
|
+
onFocus: y,
|
|
2591
2591
|
onMouseEnter: _,
|
|
2592
2592
|
onMouseLeave: E,
|
|
2593
2593
|
onTouchStart: m,
|
|
@@ -2619,7 +2619,7 @@ function zn(t, n) {
|
|
|
2619
2619
|
const V = b.useMemo(
|
|
2620
2620
|
() => e.buildLocation(t),
|
|
2621
2621
|
[e, t, O]
|
|
2622
|
-
), A = b.useMemo(() => t.reloadDocument ? !1 :
|
|
2622
|
+
), A = b.useMemo(() => t.reloadDocument ? !1 : l ?? e.options.defaultPreload, [e.options.defaultPreload, l, t.reloadDocument]), N = h ?? e.options.defaultPreloadDelay ?? 0, G = z({
|
|
2623
2623
|
select: (B) => {
|
|
2624
2624
|
if (c?.exact) {
|
|
2625
2625
|
if (!Sn(
|
|
@@ -2641,7 +2641,7 @@ function zn(t, n) {
|
|
|
2641
2641
|
))
|
|
2642
2642
|
return !1;
|
|
2643
2643
|
}
|
|
2644
|
-
return (c?.includeSearch ?? !0) && !
|
|
2644
|
+
return (c?.includeSearch ?? !0) && !ge(B.location.search, V.search, {
|
|
2645
2645
|
partial: !c?.exact,
|
|
2646
2646
|
ignoreUndefined: !c?.explicitUndefined
|
|
2647
2647
|
}) ? !1 : c?.includeHash ? B.location.hash === V.hash : !0;
|
|
@@ -2656,7 +2656,7 @@ function zn(t, n) {
|
|
|
2656
2656
|
},
|
|
2657
2657
|
[Y]
|
|
2658
2658
|
);
|
|
2659
|
-
if (
|
|
2659
|
+
if (vn(
|
|
2660
2660
|
i,
|
|
2661
2661
|
xe,
|
|
2662
2662
|
{ rootMargin: "100px" },
|
|
@@ -2672,10 +2672,10 @@ function zn(t, n) {
|
|
|
2672
2672
|
...R && { children: R },
|
|
2673
2673
|
...L && { target: L },
|
|
2674
2674
|
...P && { disabled: P },
|
|
2675
|
-
...
|
|
2675
|
+
...v && { style: v },
|
|
2676
2676
|
...x && { className: x },
|
|
2677
2677
|
...F && { onClick: F },
|
|
2678
|
-
...
|
|
2678
|
+
...y && { onFocus: y },
|
|
2679
2679
|
..._ && { onMouseEnter: _ },
|
|
2680
2680
|
...E && { onMouseLeave: E },
|
|
2681
2681
|
...m && { onTouchStart: m }
|
|
@@ -2683,15 +2683,15 @@ function zn(t, n) {
|
|
|
2683
2683
|
const Ee = (B) => {
|
|
2684
2684
|
if (!P && !Wn(B) && !B.defaultPrevented && (!L || L === "_self") && B.button === 0) {
|
|
2685
2685
|
B.preventDefault(), Bt(() => {
|
|
2686
|
-
|
|
2686
|
+
r(!0);
|
|
2687
2687
|
});
|
|
2688
2688
|
const $ = e.subscribe("onResolved", () => {
|
|
2689
|
-
$(),
|
|
2689
|
+
$(), r(!1);
|
|
2690
2690
|
});
|
|
2691
2691
|
return e.navigate({
|
|
2692
2692
|
...t,
|
|
2693
2693
|
replace: p,
|
|
2694
|
-
resetScroll:
|
|
2694
|
+
resetScroll: g,
|
|
2695
2695
|
hashScrollIntoView: f,
|
|
2696
2696
|
startTransition: S,
|
|
2697
2697
|
viewTransition: M,
|
|
@@ -2716,15 +2716,15 @@ function zn(t, n) {
|
|
|
2716
2716
|
$.preloadTimeout && (clearTimeout($.preloadTimeout), $.preloadTimeout = null);
|
|
2717
2717
|
}, ae = (B) => ($) => {
|
|
2718
2718
|
var ze;
|
|
2719
|
-
(ze = $.persist) == null || ze.call($), B.filter(Boolean).forEach((
|
|
2720
|
-
$.defaultPrevented ||
|
|
2719
|
+
(ze = $.persist) == null || ze.call($), B.filter(Boolean).forEach((ut) => {
|
|
2720
|
+
$.defaultPrevented || ut($);
|
|
2721
2721
|
});
|
|
2722
|
-
}, we = G ?
|
|
2722
|
+
}, we = G ? le(a, {}) ?? {} : {}, Pe = G ? {} : le(u, {}), fe = [
|
|
2723
2723
|
x,
|
|
2724
2724
|
we.className,
|
|
2725
2725
|
Pe.className
|
|
2726
|
-
].filter(Boolean).join(" "),
|
|
2727
|
-
...
|
|
2726
|
+
].filter(Boolean).join(" "), lt = {
|
|
2727
|
+
...v,
|
|
2728
2728
|
...we.style,
|
|
2729
2729
|
...Pe.style
|
|
2730
2730
|
};
|
|
@@ -2735,31 +2735,31 @@ function zn(t, n) {
|
|
|
2735
2735
|
href: P ? void 0 : V.maskedLocation ? e.history.createHref(V.maskedLocation.href) : e.history.createHref(V.href),
|
|
2736
2736
|
ref: i,
|
|
2737
2737
|
onClick: ae([F, Ee]),
|
|
2738
|
-
onFocus: ae([
|
|
2738
|
+
onFocus: ae([y, ie]),
|
|
2739
2739
|
onMouseEnter: ae([_, Q]),
|
|
2740
2740
|
onMouseLeave: ae([E, se]),
|
|
2741
2741
|
onTouchStart: ae([m, U]),
|
|
2742
2742
|
disabled: !!P,
|
|
2743
2743
|
target: L,
|
|
2744
|
-
...Object.keys(
|
|
2744
|
+
...Object.keys(lt).length && { style: lt },
|
|
2745
2745
|
...fe && { className: fe },
|
|
2746
2746
|
...P && {
|
|
2747
2747
|
role: "link",
|
|
2748
2748
|
"aria-disabled": !0
|
|
2749
2749
|
},
|
|
2750
2750
|
...G && { "data-status": "active", "aria-current": "page" },
|
|
2751
|
-
...
|
|
2751
|
+
...o && { "data-transitioning": "transitioning" }
|
|
2752
2752
|
};
|
|
2753
2753
|
}
|
|
2754
|
-
const
|
|
2754
|
+
const co = b.forwardRef(
|
|
2755
2755
|
(t, n) => {
|
|
2756
|
-
const { _asChild: e, ...
|
|
2757
|
-
type:
|
|
2756
|
+
const { _asChild: e, ...o } = t, {
|
|
2757
|
+
type: r,
|
|
2758
2758
|
ref: s,
|
|
2759
2759
|
...i
|
|
2760
|
-
} = zn(
|
|
2760
|
+
} = zn(o, n), a = typeof o.children == "function" ? o.children({
|
|
2761
2761
|
isActive: i["data-status"] === "active"
|
|
2762
|
-
}) :
|
|
2762
|
+
}) : o.children;
|
|
2763
2763
|
return typeof e > "u" && delete i.disabled, b.createElement(
|
|
2764
2764
|
e || "a",
|
|
2765
2765
|
{
|
|
@@ -2774,18 +2774,18 @@ function Wn(t) {
|
|
|
2774
2774
|
return !!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey);
|
|
2775
2775
|
}
|
|
2776
2776
|
function Hn() {
|
|
2777
|
-
const t =
|
|
2778
|
-
select: ({ isLoading:
|
|
2779
|
-
}), [
|
|
2780
|
-
select: (
|
|
2777
|
+
const t = re(), n = b.useRef({ router: t, mounted: !1 }), e = z({
|
|
2778
|
+
select: ({ isLoading: l }) => l
|
|
2779
|
+
}), [o, r] = b.useState(!1), s = z({
|
|
2780
|
+
select: (l) => l.matches.some((h) => h.status === "pending"),
|
|
2781
2781
|
structuralSharing: !0
|
|
2782
|
-
}), i = Xe(e), a = e ||
|
|
2783
|
-
return t.isServer || (t.startReactTransition = (
|
|
2784
|
-
|
|
2785
|
-
|
|
2782
|
+
}), i = Xe(e), a = e || o || s, u = Xe(a), c = e || s, d = Xe(c);
|
|
2783
|
+
return t.isServer || (t.startReactTransition = (l) => {
|
|
2784
|
+
r(!0), b.startTransition(() => {
|
|
2785
|
+
l(), r(!1);
|
|
2786
2786
|
});
|
|
2787
2787
|
}), b.useEffect(() => {
|
|
2788
|
-
const
|
|
2788
|
+
const l = t.history.subscribe(t.load), h = t.buildLocation({
|
|
2789
2789
|
to: t.latestLocation.pathname,
|
|
2790
2790
|
search: !0,
|
|
2791
2791
|
params: !0,
|
|
@@ -2793,8 +2793,8 @@ function Hn() {
|
|
|
2793
2793
|
state: !0,
|
|
2794
2794
|
_includeValidateSearch: !0
|
|
2795
2795
|
});
|
|
2796
|
-
return
|
|
2797
|
-
|
|
2796
|
+
return ue(t.latestLocation.href) !== ue(h.href) && t.commitLocation({ ...h, replace: !0 }), () => {
|
|
2797
|
+
l();
|
|
2798
2798
|
};
|
|
2799
2799
|
}, [t, t.history]), Re(() => {
|
|
2800
2800
|
if (typeof window < "u" && t.clientSsr || n.current.router === t && n.current.mounted)
|
|
@@ -2808,34 +2808,34 @@ function Hn() {
|
|
|
2808
2808
|
})();
|
|
2809
2809
|
}, [t]), Re(() => {
|
|
2810
2810
|
if (i && !e) {
|
|
2811
|
-
const
|
|
2811
|
+
const l = t.state.location, h = t.state.resolvedLocation, f = h.pathname !== l.pathname, p = h.href !== l.href;
|
|
2812
2812
|
t.emit({
|
|
2813
2813
|
type: "onLoad",
|
|
2814
2814
|
// When the new URL has committed, when the new matches have been loaded into state.matches
|
|
2815
2815
|
fromLocation: h,
|
|
2816
|
-
toLocation:
|
|
2816
|
+
toLocation: l,
|
|
2817
2817
|
pathChanged: f,
|
|
2818
2818
|
hrefChanged: p
|
|
2819
2819
|
});
|
|
2820
2820
|
}
|
|
2821
2821
|
}, [i, t, e]), Re(() => {
|
|
2822
2822
|
if (d && !c) {
|
|
2823
|
-
const
|
|
2823
|
+
const l = t.state.location, h = t.state.resolvedLocation, f = h.pathname !== l.pathname, p = h.href !== l.href;
|
|
2824
2824
|
t.emit({
|
|
2825
2825
|
type: "onBeforeRouteMount",
|
|
2826
2826
|
fromLocation: h,
|
|
2827
|
-
toLocation:
|
|
2827
|
+
toLocation: l,
|
|
2828
2828
|
pathChanged: f,
|
|
2829
2829
|
hrefChanged: p
|
|
2830
2830
|
});
|
|
2831
2831
|
}
|
|
2832
2832
|
}, [c, d, t]), Re(() => {
|
|
2833
|
-
if (
|
|
2834
|
-
const
|
|
2833
|
+
if (u && !a) {
|
|
2834
|
+
const l = t.state.location, h = t.state.resolvedLocation, f = h.pathname !== l.pathname, p = h.href !== l.href;
|
|
2835
2835
|
if (t.emit({
|
|
2836
2836
|
type: "onResolved",
|
|
2837
2837
|
fromLocation: h,
|
|
2838
|
-
toLocation:
|
|
2838
|
+
toLocation: l,
|
|
2839
2839
|
pathChanged: f,
|
|
2840
2840
|
hrefChanged: p
|
|
2841
2841
|
}), t.__store.setState((S) => ({
|
|
@@ -2845,25 +2845,25 @@ function Hn() {
|
|
|
2845
2845
|
})), typeof document < "u" && document.querySelector) {
|
|
2846
2846
|
const S = t.state.location.state.__hashScrollIntoViewOptions ?? !0;
|
|
2847
2847
|
if (S && t.state.location.hash !== "") {
|
|
2848
|
-
const
|
|
2849
|
-
|
|
2848
|
+
const g = document.getElementById(t.state.location.hash);
|
|
2849
|
+
g && g.scrollIntoView(S);
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
2852
|
}
|
|
2853
|
-
}, [a,
|
|
2853
|
+
}, [a, u, t]), null;
|
|
2854
2854
|
}
|
|
2855
2855
|
function jn() {
|
|
2856
|
-
const t =
|
|
2856
|
+
const t = re(), n = t.options.defaultPendingComponent ? /* @__PURE__ */ C(t.options.defaultPendingComponent, {}) : null, e = t.isServer || typeof document < "u" && t.clientSsr ? Be : b.Suspense, o = /* @__PURE__ */ et(e, { fallback: n, children: [
|
|
2857
2857
|
/* @__PURE__ */ C(Hn, {}),
|
|
2858
2858
|
/* @__PURE__ */ C(Gn, {})
|
|
2859
2859
|
] });
|
|
2860
|
-
return t.options.InnerWrap ? /* @__PURE__ */ C(t.options.InnerWrap, { children:
|
|
2860
|
+
return t.options.InnerWrap ? /* @__PURE__ */ C(t.options.InnerWrap, { children: o }) : o;
|
|
2861
2861
|
}
|
|
2862
2862
|
function Gn() {
|
|
2863
2863
|
const t = z({
|
|
2864
2864
|
select: (e) => {
|
|
2865
|
-
var
|
|
2866
|
-
return (
|
|
2865
|
+
var o;
|
|
2866
|
+
return (o = e.matches[0]) == null ? void 0 : o.id;
|
|
2867
2867
|
}
|
|
2868
2868
|
}), n = z({
|
|
2869
2869
|
select: (e) => e.loadedAt
|
|
@@ -2896,13 +2896,13 @@ function Xn({
|
|
|
2896
2896
|
...e.context
|
|
2897
2897
|
}
|
|
2898
2898
|
});
|
|
2899
|
-
const
|
|
2900
|
-
return t.options.Wrap ? /* @__PURE__ */ C(t.options.Wrap, { children:
|
|
2899
|
+
const o = Ct(), r = /* @__PURE__ */ C(o.Provider, { value: t, children: n });
|
|
2900
|
+
return t.options.Wrap ? /* @__PURE__ */ C(t.options.Wrap, { children: r }) : r;
|
|
2901
2901
|
}
|
|
2902
|
-
function
|
|
2902
|
+
function lo({ router: t, ...n }) {
|
|
2903
2903
|
return /* @__PURE__ */ C(Xn, { router: t, ...n, children: /* @__PURE__ */ C(jn, {}) });
|
|
2904
2904
|
}
|
|
2905
|
-
const qn = typeof window < "u" ? b.useLayoutEffect : b.useEffect, Qe = "window",
|
|
2905
|
+
const qn = typeof window < "u" ? b.useLayoutEffect : b.useEffect, Qe = "window", gt = "___";
|
|
2906
2906
|
let Ze = /* @__PURE__ */ new WeakSet();
|
|
2907
2907
|
const Jn = typeof window < "u" && window.sessionStorage, Z = Jn ? (() => {
|
|
2908
2908
|
const t = "tsr-scroll-restoration-v2";
|
|
@@ -2911,58 +2911,58 @@ const Jn = typeof window < "u" && window.sessionStorage, Z = Jn ? (() => {
|
|
|
2911
2911
|
window.sessionStorage.getItem(t) || "null"
|
|
2912
2912
|
) || { cached: {}, next: {} },
|
|
2913
2913
|
set: (e) => {
|
|
2914
|
-
Z.state =
|
|
2914
|
+
Z.state = le(e, Z.state), window.sessionStorage.setItem(t, JSON.stringify(Z.state));
|
|
2915
2915
|
}
|
|
2916
2916
|
};
|
|
2917
2917
|
})() : void 0, Yn = (t) => t.state.key || t.href;
|
|
2918
2918
|
function Qn(t) {
|
|
2919
|
-
const n =
|
|
2919
|
+
const n = re();
|
|
2920
2920
|
qn(() => {
|
|
2921
|
-
const e = t?.getKey || Yn, { history:
|
|
2922
|
-
|
|
2923
|
-
const
|
|
2921
|
+
const e = t?.getKey || Yn, { history: o } = window;
|
|
2922
|
+
o.scrollRestoration = "manual";
|
|
2923
|
+
const r = (a) => {
|
|
2924
2924
|
if (Ze.has(a.target)) return;
|
|
2925
2925
|
Ze.add(a.target);
|
|
2926
|
-
let
|
|
2926
|
+
let u = "";
|
|
2927
2927
|
if (a.target === document || a.target === window)
|
|
2928
|
-
|
|
2928
|
+
u = Qe;
|
|
2929
2929
|
else {
|
|
2930
2930
|
const c = a.target.getAttribute(
|
|
2931
2931
|
"data-scroll-restoration-id"
|
|
2932
2932
|
);
|
|
2933
|
-
c ?
|
|
2933
|
+
c ? u = `[data-scroll-restoration-id="${c}"]` : u = Zn(a.target);
|
|
2934
2934
|
}
|
|
2935
|
-
Z.state.next[
|
|
2935
|
+
Z.state.next[u] || Z.set((c) => ({
|
|
2936
2936
|
...c,
|
|
2937
2937
|
next: {
|
|
2938
2938
|
...c.next,
|
|
2939
|
-
[
|
|
2939
|
+
[u]: {
|
|
2940
2940
|
scrollX: NaN,
|
|
2941
2941
|
scrollY: NaN
|
|
2942
2942
|
}
|
|
2943
2943
|
}
|
|
2944
2944
|
}));
|
|
2945
2945
|
};
|
|
2946
|
-
typeof document < "u" && document.addEventListener("scroll",
|
|
2946
|
+
typeof document < "u" && document.addEventListener("scroll", r, !0);
|
|
2947
2947
|
const s = n.subscribe("onBeforeLoad", (a) => {
|
|
2948
2948
|
if (a.hrefChanged) {
|
|
2949
|
-
const
|
|
2949
|
+
const u = e(a.fromLocation);
|
|
2950
2950
|
for (const c in Z.state.next) {
|
|
2951
2951
|
const d = Z.state.next[c];
|
|
2952
2952
|
if (c === Qe)
|
|
2953
2953
|
d.scrollX = window.scrollX || 0, d.scrollY = window.scrollY || 0;
|
|
2954
2954
|
else if (c) {
|
|
2955
|
-
const
|
|
2956
|
-
d.scrollX =
|
|
2955
|
+
const l = document.querySelector(c);
|
|
2956
|
+
d.scrollX = l?.scrollLeft || 0, d.scrollY = l?.scrollTop || 0;
|
|
2957
2957
|
}
|
|
2958
|
-
Z.set((
|
|
2959
|
-
const h = { ...
|
|
2958
|
+
Z.set((l) => {
|
|
2959
|
+
const h = { ...l.next };
|
|
2960
2960
|
return delete h[c], {
|
|
2961
|
-
...
|
|
2961
|
+
...l,
|
|
2962
2962
|
next: h,
|
|
2963
2963
|
cached: {
|
|
2964
|
-
...
|
|
2965
|
-
[[
|
|
2964
|
+
...l.cached,
|
|
2965
|
+
[[u, c].join(gt)]: d
|
|
2966
2966
|
}
|
|
2967
2967
|
};
|
|
2968
2968
|
});
|
|
@@ -2975,20 +2975,20 @@ function Qn(t) {
|
|
|
2975
2975
|
if (!n.resetNextScroll)
|
|
2976
2976
|
return;
|
|
2977
2977
|
n.resetNextScroll = !0;
|
|
2978
|
-
const
|
|
2978
|
+
const u = e(a.toLocation);
|
|
2979
2979
|
let c = !1;
|
|
2980
2980
|
for (const d in Z.state.cached) {
|
|
2981
|
-
const
|
|
2982
|
-
if (h ===
|
|
2981
|
+
const l = Z.state.cached[d], [h, f] = d.split(gt);
|
|
2982
|
+
if (h === u) {
|
|
2983
2983
|
if (f === Qe)
|
|
2984
2984
|
c = !0, window.scrollTo({
|
|
2985
|
-
top:
|
|
2986
|
-
left:
|
|
2985
|
+
top: l.scrollY,
|
|
2986
|
+
left: l.scrollX,
|
|
2987
2987
|
behavior: t?.scrollBehavior
|
|
2988
2988
|
});
|
|
2989
2989
|
else if (f) {
|
|
2990
2990
|
const p = document.querySelector(f);
|
|
2991
|
-
p && (p.scrollLeft =
|
|
2991
|
+
p && (p.scrollLeft = l.scrollX, p.scrollTop = l.scrollY);
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
@@ -2997,11 +2997,11 @@ function Qn(t) {
|
|
|
2997
2997
|
}
|
|
2998
2998
|
);
|
|
2999
2999
|
return () => {
|
|
3000
|
-
document.removeEventListener("scroll",
|
|
3000
|
+
document.removeEventListener("scroll", r), s(), i();
|
|
3001
3001
|
};
|
|
3002
3002
|
}, [t?.getKey, n]);
|
|
3003
3003
|
}
|
|
3004
|
-
function
|
|
3004
|
+
function uo(t) {
|
|
3005
3005
|
return Qn(t), null;
|
|
3006
3006
|
}
|
|
3007
3007
|
function Zn(t) {
|
|
@@ -3014,19 +3014,19 @@ function Zn(t) {
|
|
|
3014
3014
|
return `${n.join(" > ")}`.toLowerCase();
|
|
3015
3015
|
}
|
|
3016
3016
|
export {
|
|
3017
|
-
|
|
3017
|
+
co as L,
|
|
3018
3018
|
Kn as O,
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3019
|
+
lo as R,
|
|
3020
|
+
uo as S,
|
|
3021
|
+
ao as a,
|
|
3022
3022
|
Tn as b,
|
|
3023
|
-
|
|
3023
|
+
io as c,
|
|
3024
3024
|
z as d,
|
|
3025
|
-
|
|
3026
|
-
|
|
3025
|
+
so as e,
|
|
3026
|
+
oo as f,
|
|
3027
3027
|
_t as g,
|
|
3028
3028
|
ee as i,
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3029
|
+
ro as n,
|
|
3030
|
+
re as u,
|
|
3031
|
+
on as w
|
|
3032
3032
|
};
|