@hari_digitus/sms-ui-library 5.0.8 → 5.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SideNavBar.cjs.js +41 -1
- package/dist/SideNavBar.es.js +2336 -0
- package/dist/types/components/SideNavBar.d.ts +5 -22
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/SideNavBar.es.js
CHANGED
|
@@ -1 +1,2337 @@
|
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import wt from "react";
|
|
3
|
+
var he = { exports: {} }, ae = {};
|
|
4
|
+
/**
|
|
5
|
+
* @license React
|
|
6
|
+
* react-jsx-runtime.production.min.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
var vt;
|
|
14
|
+
function gr() {
|
|
15
|
+
if (vt) return ae;
|
|
16
|
+
vt = 1;
|
|
17
|
+
var e = wt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function l(c, s, m) {
|
|
19
|
+
var f, h = {}, v = null, y = null;
|
|
20
|
+
m !== void 0 && (v = "" + m), s.key !== void 0 && (v = "" + s.key), s.ref !== void 0 && (y = s.ref);
|
|
21
|
+
for (f in s) a.call(s, f) && !o.hasOwnProperty(f) && (h[f] = s[f]);
|
|
22
|
+
if (c && c.defaultProps) for (f in s = c.defaultProps, s) h[f] === void 0 && (h[f] = s[f]);
|
|
23
|
+
return { $$typeof: t, type: c, key: v, ref: y, props: h, _owner: i.current };
|
|
24
|
+
}
|
|
25
|
+
return ae.Fragment = n, ae.jsx = l, ae.jsxs = l, ae;
|
|
26
|
+
}
|
|
27
|
+
var ie = {};
|
|
28
|
+
/**
|
|
29
|
+
* @license React
|
|
30
|
+
* react-jsx-runtime.development.js
|
|
31
|
+
*
|
|
32
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the MIT license found in the
|
|
35
|
+
* LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/
|
|
37
|
+
var gt;
|
|
38
|
+
function yr() {
|
|
39
|
+
return gt || (gt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
40
|
+
var e = wt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), c = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), b = Symbol.iterator, E = "@@iterator";
|
|
41
|
+
function g(r) {
|
|
42
|
+
if (r === null || typeof r != "object")
|
|
43
|
+
return null;
|
|
44
|
+
var d = b && r[b] || r[E];
|
|
45
|
+
return typeof d == "function" ? d : null;
|
|
46
|
+
}
|
|
47
|
+
var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
48
|
+
function R(r) {
|
|
49
|
+
{
|
|
50
|
+
for (var d = arguments.length, p = new Array(d > 1 ? d - 1 : 0), x = 1; x < d; x++)
|
|
51
|
+
p[x - 1] = arguments[x];
|
|
52
|
+
_("error", r, p);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function _(r, d, p) {
|
|
56
|
+
{
|
|
57
|
+
var x = w.ReactDebugCurrentFrame, T = x.getStackAddendum();
|
|
58
|
+
T !== "" && (d += "%s", p = p.concat([T]));
|
|
59
|
+
var k = p.map(function(S) {
|
|
60
|
+
return String(S);
|
|
61
|
+
});
|
|
62
|
+
k.unshift("Warning: " + d), Function.prototype.apply.call(console[r], console, k);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
var $ = !1, j = !1, A = !1, H = !1, z = !1, K;
|
|
66
|
+
K = Symbol.for("react.module.reference");
|
|
67
|
+
function re(r) {
|
|
68
|
+
return !!(typeof r == "string" || typeof r == "function" || r === a || r === o || z || r === i || r === m || r === f || H || r === y || $ || j || A || typeof r == "object" && r !== null && (r.$$typeof === v || r.$$typeof === h || r.$$typeof === l || r.$$typeof === c || r.$$typeof === s || // This needs to include all possible module reference object
|
|
69
|
+
// types supported by any Flight configuration anywhere since
|
|
70
|
+
// we don't know which Flight build this will end up being used
|
|
71
|
+
// with.
|
|
72
|
+
r.$$typeof === K || r.getModuleId !== void 0));
|
|
73
|
+
}
|
|
74
|
+
function we(r, d, p) {
|
|
75
|
+
var x = r.displayName;
|
|
76
|
+
if (x)
|
|
77
|
+
return x;
|
|
78
|
+
var T = d.displayName || d.name || "";
|
|
79
|
+
return T !== "" ? p + "(" + T + ")" : p;
|
|
80
|
+
}
|
|
81
|
+
function se(r) {
|
|
82
|
+
return r.displayName || "Context";
|
|
83
|
+
}
|
|
84
|
+
function W(r) {
|
|
85
|
+
if (r == null)
|
|
86
|
+
return null;
|
|
87
|
+
if (typeof r.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
88
|
+
return r.displayName || r.name || null;
|
|
89
|
+
if (typeof r == "string")
|
|
90
|
+
return r;
|
|
91
|
+
switch (r) {
|
|
92
|
+
case a:
|
|
93
|
+
return "Fragment";
|
|
94
|
+
case n:
|
|
95
|
+
return "Portal";
|
|
96
|
+
case o:
|
|
97
|
+
return "Profiler";
|
|
98
|
+
case i:
|
|
99
|
+
return "StrictMode";
|
|
100
|
+
case m:
|
|
101
|
+
return "Suspense";
|
|
102
|
+
case f:
|
|
103
|
+
return "SuspenseList";
|
|
104
|
+
}
|
|
105
|
+
if (typeof r == "object")
|
|
106
|
+
switch (r.$$typeof) {
|
|
107
|
+
case c:
|
|
108
|
+
var d = r;
|
|
109
|
+
return se(d) + ".Consumer";
|
|
110
|
+
case l:
|
|
111
|
+
var p = r;
|
|
112
|
+
return se(p._context) + ".Provider";
|
|
113
|
+
case s:
|
|
114
|
+
return we(r, r.render, "ForwardRef");
|
|
115
|
+
case h:
|
|
116
|
+
var x = r.displayName || null;
|
|
117
|
+
return x !== null ? x : W(r.type) || "Memo";
|
|
118
|
+
case v: {
|
|
119
|
+
var T = r, k = T._payload, S = T._init;
|
|
120
|
+
try {
|
|
121
|
+
return W(S(k));
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
var V = Object.assign, N = 0, qe, ze, Ke, Ge, Xe, Ze, Qe;
|
|
130
|
+
function et() {
|
|
131
|
+
}
|
|
132
|
+
et.__reactDisabledLog = !0;
|
|
133
|
+
function Vt() {
|
|
134
|
+
{
|
|
135
|
+
if (N === 0) {
|
|
136
|
+
qe = console.log, ze = console.info, Ke = console.warn, Ge = console.error, Xe = console.group, Ze = console.groupCollapsed, Qe = console.groupEnd;
|
|
137
|
+
var r = {
|
|
138
|
+
configurable: !0,
|
|
139
|
+
enumerable: !0,
|
|
140
|
+
value: et,
|
|
141
|
+
writable: !0
|
|
142
|
+
};
|
|
143
|
+
Object.defineProperties(console, {
|
|
144
|
+
info: r,
|
|
145
|
+
log: r,
|
|
146
|
+
warn: r,
|
|
147
|
+
error: r,
|
|
148
|
+
group: r,
|
|
149
|
+
groupCollapsed: r,
|
|
150
|
+
groupEnd: r
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
N++;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function Yt() {
|
|
157
|
+
{
|
|
158
|
+
if (N--, N === 0) {
|
|
159
|
+
var r = {
|
|
160
|
+
configurable: !0,
|
|
161
|
+
enumerable: !0,
|
|
162
|
+
writable: !0
|
|
163
|
+
};
|
|
164
|
+
Object.defineProperties(console, {
|
|
165
|
+
log: V({}, r, {
|
|
166
|
+
value: qe
|
|
167
|
+
}),
|
|
168
|
+
info: V({}, r, {
|
|
169
|
+
value: ze
|
|
170
|
+
}),
|
|
171
|
+
warn: V({}, r, {
|
|
172
|
+
value: Ke
|
|
173
|
+
}),
|
|
174
|
+
error: V({}, r, {
|
|
175
|
+
value: Ge
|
|
176
|
+
}),
|
|
177
|
+
group: V({}, r, {
|
|
178
|
+
value: Xe
|
|
179
|
+
}),
|
|
180
|
+
groupCollapsed: V({}, r, {
|
|
181
|
+
value: Ze
|
|
182
|
+
}),
|
|
183
|
+
groupEnd: V({}, r, {
|
|
184
|
+
value: Qe
|
|
185
|
+
})
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
N < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
var Ce = w.ReactCurrentDispatcher, Se;
|
|
192
|
+
function ue(r, d, p) {
|
|
193
|
+
{
|
|
194
|
+
if (Se === void 0)
|
|
195
|
+
try {
|
|
196
|
+
throw Error();
|
|
197
|
+
} catch (T) {
|
|
198
|
+
var x = T.stack.trim().match(/\n( *(at )?)/);
|
|
199
|
+
Se = x && x[1] || "";
|
|
200
|
+
}
|
|
201
|
+
return `
|
|
202
|
+
` + Se + r;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
var Pe = !1, ce;
|
|
206
|
+
{
|
|
207
|
+
var Jt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
|
+
ce = new Jt();
|
|
209
|
+
}
|
|
210
|
+
function tt(r, d) {
|
|
211
|
+
if (!r || Pe)
|
|
212
|
+
return "";
|
|
213
|
+
{
|
|
214
|
+
var p = ce.get(r);
|
|
215
|
+
if (p !== void 0)
|
|
216
|
+
return p;
|
|
217
|
+
}
|
|
218
|
+
var x;
|
|
219
|
+
Pe = !0;
|
|
220
|
+
var T = Error.prepareStackTrace;
|
|
221
|
+
Error.prepareStackTrace = void 0;
|
|
222
|
+
var k;
|
|
223
|
+
k = Ce.current, Ce.current = null, Vt();
|
|
224
|
+
try {
|
|
225
|
+
if (d) {
|
|
226
|
+
var S = function() {
|
|
227
|
+
throw Error();
|
|
228
|
+
};
|
|
229
|
+
if (Object.defineProperty(S.prototype, "props", {
|
|
230
|
+
set: function() {
|
|
231
|
+
throw Error();
|
|
232
|
+
}
|
|
233
|
+
}), typeof Reflect == "object" && Reflect.construct) {
|
|
234
|
+
try {
|
|
235
|
+
Reflect.construct(S, []);
|
|
236
|
+
} catch (I) {
|
|
237
|
+
x = I;
|
|
238
|
+
}
|
|
239
|
+
Reflect.construct(r, [], S);
|
|
240
|
+
} else {
|
|
241
|
+
try {
|
|
242
|
+
S.call();
|
|
243
|
+
} catch (I) {
|
|
244
|
+
x = I;
|
|
245
|
+
}
|
|
246
|
+
r.call(S.prototype);
|
|
247
|
+
}
|
|
248
|
+
} else {
|
|
249
|
+
try {
|
|
250
|
+
throw Error();
|
|
251
|
+
} catch (I) {
|
|
252
|
+
x = I;
|
|
253
|
+
}
|
|
254
|
+
r();
|
|
255
|
+
}
|
|
256
|
+
} catch (I) {
|
|
257
|
+
if (I && x && typeof I.stack == "string") {
|
|
258
|
+
for (var C = I.stack.split(`
|
|
259
|
+
`), F = x.stack.split(`
|
|
260
|
+
`), L = C.length - 1, O = F.length - 1; L >= 1 && O >= 0 && C[L] !== F[O]; )
|
|
261
|
+
O--;
|
|
262
|
+
for (; L >= 1 && O >= 0; L--, O--)
|
|
263
|
+
if (C[L] !== F[O]) {
|
|
264
|
+
if (L !== 1 || O !== 1)
|
|
265
|
+
do
|
|
266
|
+
if (L--, O--, O < 0 || C[L] !== F[O]) {
|
|
267
|
+
var M = `
|
|
268
|
+
` + C[L].replace(" at new ", " at ");
|
|
269
|
+
return r.displayName && M.includes("<anonymous>") && (M = M.replace("<anonymous>", r.displayName)), typeof r == "function" && ce.set(r, M), M;
|
|
270
|
+
}
|
|
271
|
+
while (L >= 1 && O >= 0);
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
} finally {
|
|
276
|
+
Pe = !1, Ce.current = k, Yt(), Error.prepareStackTrace = T;
|
|
277
|
+
}
|
|
278
|
+
var ee = r ? r.displayName || r.name : "", X = ee ? ue(ee) : "";
|
|
279
|
+
return typeof r == "function" && ce.set(r, X), X;
|
|
280
|
+
}
|
|
281
|
+
function qt(r, d, p) {
|
|
282
|
+
return tt(r, !1);
|
|
283
|
+
}
|
|
284
|
+
function zt(r) {
|
|
285
|
+
var d = r.prototype;
|
|
286
|
+
return !!(d && d.isReactComponent);
|
|
287
|
+
}
|
|
288
|
+
function fe(r, d, p) {
|
|
289
|
+
if (r == null)
|
|
290
|
+
return "";
|
|
291
|
+
if (typeof r == "function")
|
|
292
|
+
return tt(r, zt(r));
|
|
293
|
+
if (typeof r == "string")
|
|
294
|
+
return ue(r);
|
|
295
|
+
switch (r) {
|
|
296
|
+
case m:
|
|
297
|
+
return ue("Suspense");
|
|
298
|
+
case f:
|
|
299
|
+
return ue("SuspenseList");
|
|
300
|
+
}
|
|
301
|
+
if (typeof r == "object")
|
|
302
|
+
switch (r.$$typeof) {
|
|
303
|
+
case s:
|
|
304
|
+
return qt(r.render);
|
|
305
|
+
case h:
|
|
306
|
+
return fe(r.type, d, p);
|
|
307
|
+
case v: {
|
|
308
|
+
var x = r, T = x._payload, k = x._init;
|
|
309
|
+
try {
|
|
310
|
+
return fe(k(T), d, p);
|
|
311
|
+
} catch {
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return "";
|
|
316
|
+
}
|
|
317
|
+
var ne = Object.prototype.hasOwnProperty, rt = {}, nt = w.ReactDebugCurrentFrame;
|
|
318
|
+
function de(r) {
|
|
319
|
+
if (r) {
|
|
320
|
+
var d = r._owner, p = fe(r.type, r._source, d ? d.type : null);
|
|
321
|
+
nt.setExtraStackFrame(p);
|
|
322
|
+
} else
|
|
323
|
+
nt.setExtraStackFrame(null);
|
|
324
|
+
}
|
|
325
|
+
function Kt(r, d, p, x, T) {
|
|
326
|
+
{
|
|
327
|
+
var k = Function.call.bind(ne);
|
|
328
|
+
for (var S in r)
|
|
329
|
+
if (k(r, S)) {
|
|
330
|
+
var C = void 0;
|
|
331
|
+
try {
|
|
332
|
+
if (typeof r[S] != "function") {
|
|
333
|
+
var F = Error((x || "React class") + ": " + p + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
334
|
+
throw F.name = "Invariant Violation", F;
|
|
335
|
+
}
|
|
336
|
+
C = r[S](d, S, x, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
337
|
+
} catch (L) {
|
|
338
|
+
C = L;
|
|
339
|
+
}
|
|
340
|
+
C && !(C instanceof Error) && (de(T), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", x || "React class", p, S, typeof C), de(null)), C instanceof Error && !(C.message in rt) && (rt[C.message] = !0, de(T), R("Failed %s type: %s", p, C.message), de(null));
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
var Gt = Array.isArray;
|
|
345
|
+
function _e(r) {
|
|
346
|
+
return Gt(r);
|
|
347
|
+
}
|
|
348
|
+
function Xt(r) {
|
|
349
|
+
{
|
|
350
|
+
var d = typeof Symbol == "function" && Symbol.toStringTag, p = d && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
351
|
+
return p;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
function Zt(r) {
|
|
355
|
+
try {
|
|
356
|
+
return at(r), !1;
|
|
357
|
+
} catch {
|
|
358
|
+
return !0;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
function at(r) {
|
|
362
|
+
return "" + r;
|
|
363
|
+
}
|
|
364
|
+
function it(r) {
|
|
365
|
+
if (Zt(r))
|
|
366
|
+
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xt(r)), at(r);
|
|
367
|
+
}
|
|
368
|
+
var ot = w.ReactCurrentOwner, Qt = {
|
|
369
|
+
key: !0,
|
|
370
|
+
ref: !0,
|
|
371
|
+
__self: !0,
|
|
372
|
+
__source: !0
|
|
373
|
+
}, lt, st;
|
|
374
|
+
function er(r) {
|
|
375
|
+
if (ne.call(r, "ref")) {
|
|
376
|
+
var d = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
377
|
+
if (d && d.isReactWarning)
|
|
378
|
+
return !1;
|
|
379
|
+
}
|
|
380
|
+
return r.ref !== void 0;
|
|
381
|
+
}
|
|
382
|
+
function tr(r) {
|
|
383
|
+
if (ne.call(r, "key")) {
|
|
384
|
+
var d = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
385
|
+
if (d && d.isReactWarning)
|
|
386
|
+
return !1;
|
|
387
|
+
}
|
|
388
|
+
return r.key !== void 0;
|
|
389
|
+
}
|
|
390
|
+
function rr(r, d) {
|
|
391
|
+
typeof r.ref == "string" && ot.current;
|
|
392
|
+
}
|
|
393
|
+
function nr(r, d) {
|
|
394
|
+
{
|
|
395
|
+
var p = function() {
|
|
396
|
+
lt || (lt = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
397
|
+
};
|
|
398
|
+
p.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
399
|
+
get: p,
|
|
400
|
+
configurable: !0
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
function ar(r, d) {
|
|
405
|
+
{
|
|
406
|
+
var p = function() {
|
|
407
|
+
st || (st = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
408
|
+
};
|
|
409
|
+
p.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
410
|
+
get: p,
|
|
411
|
+
configurable: !0
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
var ir = function(r, d, p, x, T, k, S) {
|
|
416
|
+
var C = {
|
|
417
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
418
|
+
$$typeof: t,
|
|
419
|
+
// Built-in properties that belong on the element
|
|
420
|
+
type: r,
|
|
421
|
+
key: d,
|
|
422
|
+
ref: p,
|
|
423
|
+
props: S,
|
|
424
|
+
// Record the component responsible for creating this element.
|
|
425
|
+
_owner: k
|
|
426
|
+
};
|
|
427
|
+
return C._store = {}, Object.defineProperty(C._store, "validated", {
|
|
428
|
+
configurable: !1,
|
|
429
|
+
enumerable: !1,
|
|
430
|
+
writable: !0,
|
|
431
|
+
value: !1
|
|
432
|
+
}), Object.defineProperty(C, "_self", {
|
|
433
|
+
configurable: !1,
|
|
434
|
+
enumerable: !1,
|
|
435
|
+
writable: !1,
|
|
436
|
+
value: x
|
|
437
|
+
}), Object.defineProperty(C, "_source", {
|
|
438
|
+
configurable: !1,
|
|
439
|
+
enumerable: !1,
|
|
440
|
+
writable: !1,
|
|
441
|
+
value: T
|
|
442
|
+
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
443
|
+
};
|
|
444
|
+
function or(r, d, p, x, T) {
|
|
445
|
+
{
|
|
446
|
+
var k, S = {}, C = null, F = null;
|
|
447
|
+
p !== void 0 && (it(p), C = "" + p), tr(d) && (it(d.key), C = "" + d.key), er(d) && (F = d.ref, rr(d, T));
|
|
448
|
+
for (k in d)
|
|
449
|
+
ne.call(d, k) && !Qt.hasOwnProperty(k) && (S[k] = d[k]);
|
|
450
|
+
if (r && r.defaultProps) {
|
|
451
|
+
var L = r.defaultProps;
|
|
452
|
+
for (k in L)
|
|
453
|
+
S[k] === void 0 && (S[k] = L[k]);
|
|
454
|
+
}
|
|
455
|
+
if (C || F) {
|
|
456
|
+
var O = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
457
|
+
C && nr(S, O), F && ar(S, O);
|
|
458
|
+
}
|
|
459
|
+
return ir(r, C, F, T, x, ot.current, S);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
var Te = w.ReactCurrentOwner, ut = w.ReactDebugCurrentFrame;
|
|
463
|
+
function Q(r) {
|
|
464
|
+
if (r) {
|
|
465
|
+
var d = r._owner, p = fe(r.type, r._source, d ? d.type : null);
|
|
466
|
+
ut.setExtraStackFrame(p);
|
|
467
|
+
} else
|
|
468
|
+
ut.setExtraStackFrame(null);
|
|
469
|
+
}
|
|
470
|
+
var ke;
|
|
471
|
+
ke = !1;
|
|
472
|
+
function je(r) {
|
|
473
|
+
return typeof r == "object" && r !== null && r.$$typeof === t;
|
|
474
|
+
}
|
|
475
|
+
function ct() {
|
|
476
|
+
{
|
|
477
|
+
if (Te.current) {
|
|
478
|
+
var r = W(Te.current.type);
|
|
479
|
+
if (r)
|
|
480
|
+
return `
|
|
1
481
|
|
|
482
|
+
Check the render method of \`` + r + "`.";
|
|
483
|
+
}
|
|
484
|
+
return "";
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function lr(r) {
|
|
488
|
+
return "";
|
|
489
|
+
}
|
|
490
|
+
var ft = {};
|
|
491
|
+
function sr(r) {
|
|
492
|
+
{
|
|
493
|
+
var d = ct();
|
|
494
|
+
if (!d) {
|
|
495
|
+
var p = typeof r == "string" ? r : r.displayName || r.name;
|
|
496
|
+
p && (d = `
|
|
497
|
+
|
|
498
|
+
Check the top-level render call using <` + p + ">.");
|
|
499
|
+
}
|
|
500
|
+
return d;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function dt(r, d) {
|
|
504
|
+
{
|
|
505
|
+
if (!r._store || r._store.validated || r.key != null)
|
|
506
|
+
return;
|
|
507
|
+
r._store.validated = !0;
|
|
508
|
+
var p = sr(d);
|
|
509
|
+
if (ft[p])
|
|
510
|
+
return;
|
|
511
|
+
ft[p] = !0;
|
|
512
|
+
var x = "";
|
|
513
|
+
r && r._owner && r._owner !== Te.current && (x = " It was passed a child from " + W(r._owner.type) + "."), Q(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, x), Q(null);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
function ht(r, d) {
|
|
517
|
+
{
|
|
518
|
+
if (typeof r != "object")
|
|
519
|
+
return;
|
|
520
|
+
if (_e(r))
|
|
521
|
+
for (var p = 0; p < r.length; p++) {
|
|
522
|
+
var x = r[p];
|
|
523
|
+
je(x) && dt(x, d);
|
|
524
|
+
}
|
|
525
|
+
else if (je(r))
|
|
526
|
+
r._store && (r._store.validated = !0);
|
|
527
|
+
else if (r) {
|
|
528
|
+
var T = g(r);
|
|
529
|
+
if (typeof T == "function" && T !== r.entries)
|
|
530
|
+
for (var k = T.call(r), S; !(S = k.next()).done; )
|
|
531
|
+
je(S.value) && dt(S.value, d);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
function ur(r) {
|
|
536
|
+
{
|
|
537
|
+
var d = r.type;
|
|
538
|
+
if (d == null || typeof d == "string")
|
|
539
|
+
return;
|
|
540
|
+
var p;
|
|
541
|
+
if (typeof d == "function")
|
|
542
|
+
p = d.propTypes;
|
|
543
|
+
else if (typeof d == "object" && (d.$$typeof === s || // Note: Memo only checks outer props here.
|
|
544
|
+
// Inner props are checked in the reconciler.
|
|
545
|
+
d.$$typeof === h))
|
|
546
|
+
p = d.propTypes;
|
|
547
|
+
else
|
|
548
|
+
return;
|
|
549
|
+
if (p) {
|
|
550
|
+
var x = W(d);
|
|
551
|
+
Kt(p, r.props, "prop", x, r);
|
|
552
|
+
} else if (d.PropTypes !== void 0 && !ke) {
|
|
553
|
+
ke = !0;
|
|
554
|
+
var T = W(d);
|
|
555
|
+
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
|
|
556
|
+
}
|
|
557
|
+
typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
function cr(r) {
|
|
561
|
+
{
|
|
562
|
+
for (var d = Object.keys(r.props), p = 0; p < d.length; p++) {
|
|
563
|
+
var x = d[p];
|
|
564
|
+
if (x !== "children" && x !== "key") {
|
|
565
|
+
Q(r), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), Q(null);
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
r.ref !== null && (Q(r), R("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
var mt = {};
|
|
573
|
+
function pt(r, d, p, x, T, k) {
|
|
574
|
+
{
|
|
575
|
+
var S = re(r);
|
|
576
|
+
if (!S) {
|
|
577
|
+
var C = "";
|
|
578
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
579
|
+
var F = lr();
|
|
580
|
+
F ? C += F : C += ct();
|
|
581
|
+
var L;
|
|
582
|
+
r === null ? L = "null" : _e(r) ? L = "array" : r !== void 0 && r.$$typeof === t ? (L = "<" + (W(r.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : L = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, C);
|
|
583
|
+
}
|
|
584
|
+
var O = or(r, d, p, T, k);
|
|
585
|
+
if (O == null)
|
|
586
|
+
return O;
|
|
587
|
+
if (S) {
|
|
588
|
+
var M = d.children;
|
|
589
|
+
if (M !== void 0)
|
|
590
|
+
if (x)
|
|
591
|
+
if (_e(M)) {
|
|
592
|
+
for (var ee = 0; ee < M.length; ee++)
|
|
593
|
+
ht(M[ee], r);
|
|
594
|
+
Object.freeze && Object.freeze(M);
|
|
595
|
+
} else
|
|
596
|
+
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
597
|
+
else
|
|
598
|
+
ht(M, r);
|
|
599
|
+
}
|
|
600
|
+
if (ne.call(d, "key")) {
|
|
601
|
+
var X = W(r), I = Object.keys(d).filter(function(vr) {
|
|
602
|
+
return vr !== "key";
|
|
603
|
+
}), Le = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
604
|
+
if (!mt[X + Le]) {
|
|
605
|
+
var pr = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
|
|
606
|
+
R(`A props object containing a "key" prop is being spread into JSX:
|
|
607
|
+
let props = %s;
|
|
608
|
+
<%s {...props} />
|
|
609
|
+
React keys must be passed directly to JSX without using spread:
|
|
610
|
+
let props = %s;
|
|
611
|
+
<%s key={someKey} {...props} />`, Le, X, pr, X), mt[X + Le] = !0;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
return r === a ? cr(O) : ur(O), O;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
function fr(r, d, p) {
|
|
618
|
+
return pt(r, d, p, !0);
|
|
619
|
+
}
|
|
620
|
+
function dr(r, d, p) {
|
|
621
|
+
return pt(r, d, p, !1);
|
|
622
|
+
}
|
|
623
|
+
var hr = dr, mr = fr;
|
|
624
|
+
ie.Fragment = a, ie.jsx = hr, ie.jsxs = mr;
|
|
625
|
+
})()), ie;
|
|
626
|
+
}
|
|
627
|
+
var yt;
|
|
628
|
+
function xr() {
|
|
629
|
+
return yt || (yt = 1, process.env.NODE_ENV === "production" ? he.exports = gr() : he.exports = yr()), he.exports;
|
|
630
|
+
}
|
|
631
|
+
var P = xr();
|
|
632
|
+
/**
|
|
633
|
+
* react-router v7.18.0
|
|
634
|
+
*
|
|
635
|
+
* Copyright (c) Remix Software Inc.
|
|
636
|
+
*
|
|
637
|
+
* This source code is licensed under the MIT license found in the
|
|
638
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
639
|
+
*
|
|
640
|
+
* @license MIT
|
|
641
|
+
*/
|
|
642
|
+
var Ie = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, Rr = /^[\\/]{2}/;
|
|
643
|
+
function br(e, t) {
|
|
644
|
+
return t + e.replace(/\\/g, "/");
|
|
645
|
+
}
|
|
646
|
+
function D(e, t) {
|
|
647
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
648
|
+
throw new Error(t);
|
|
649
|
+
}
|
|
650
|
+
function Y(e, t) {
|
|
651
|
+
if (!e) {
|
|
652
|
+
typeof console < "u" && console.warn(t);
|
|
653
|
+
try {
|
|
654
|
+
throw new Error(t);
|
|
655
|
+
} catch {
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function Fe({
|
|
660
|
+
pathname: e = "/",
|
|
661
|
+
search: t = "",
|
|
662
|
+
hash: n = ""
|
|
663
|
+
}) {
|
|
664
|
+
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
|
|
665
|
+
}
|
|
666
|
+
function Ae(e) {
|
|
667
|
+
let t = {};
|
|
668
|
+
if (e) {
|
|
669
|
+
let n = e.indexOf("#");
|
|
670
|
+
n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
|
|
671
|
+
let a = e.indexOf("?");
|
|
672
|
+
a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
|
|
673
|
+
}
|
|
674
|
+
return t;
|
|
675
|
+
}
|
|
676
|
+
function Ct(e, t, n = "/") {
|
|
677
|
+
return Er(e, t, n, !1);
|
|
678
|
+
}
|
|
679
|
+
function Er(e, t, n, a, i) {
|
|
680
|
+
let o = typeof t == "string" ? Ae(t) : t, l = G(o.pathname || "/", n);
|
|
681
|
+
if (l == null)
|
|
682
|
+
return null;
|
|
683
|
+
let c = wr(e), s = null, m = Dr(l);
|
|
684
|
+
for (let f = 0; s == null && f < c.length; ++f)
|
|
685
|
+
s = Or(
|
|
686
|
+
c[f],
|
|
687
|
+
m,
|
|
688
|
+
a
|
|
689
|
+
);
|
|
690
|
+
return s;
|
|
691
|
+
}
|
|
692
|
+
function wr(e) {
|
|
693
|
+
let t = St(e);
|
|
694
|
+
return Cr(t), t;
|
|
695
|
+
}
|
|
696
|
+
function St(e, t = [], n = [], a = "", i = !1) {
|
|
697
|
+
let o = (l, c, s = i, m) => {
|
|
698
|
+
let f = {
|
|
699
|
+
relativePath: m === void 0 ? l.path || "" : m,
|
|
700
|
+
caseSensitive: l.caseSensitive === !0,
|
|
701
|
+
childrenIndex: c,
|
|
702
|
+
route: l
|
|
703
|
+
};
|
|
704
|
+
if (f.relativePath.startsWith("/")) {
|
|
705
|
+
if (!f.relativePath.startsWith(a) && s)
|
|
706
|
+
return;
|
|
707
|
+
D(
|
|
708
|
+
f.relativePath.startsWith(a),
|
|
709
|
+
`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
710
|
+
), f.relativePath = f.relativePath.slice(a.length);
|
|
711
|
+
}
|
|
712
|
+
let h = B([a, f.relativePath]), v = n.concat(f);
|
|
713
|
+
l.children && l.children.length > 0 && (D(
|
|
714
|
+
// Our types know better, but runtime JS may not!
|
|
715
|
+
// @ts-expect-error
|
|
716
|
+
l.index !== !0,
|
|
717
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${h}".`
|
|
718
|
+
), St(
|
|
719
|
+
l.children,
|
|
720
|
+
t,
|
|
721
|
+
v,
|
|
722
|
+
h,
|
|
723
|
+
s
|
|
724
|
+
)), !(l.path == null && !l.index) && t.push({
|
|
725
|
+
path: h,
|
|
726
|
+
score: Lr(h, l.index),
|
|
727
|
+
routesMeta: v.map((y, b) => {
|
|
728
|
+
let [E, g] = Tt(
|
|
729
|
+
y.relativePath,
|
|
730
|
+
y.caseSensitive,
|
|
731
|
+
b === v.length - 1
|
|
732
|
+
);
|
|
733
|
+
return {
|
|
734
|
+
...y,
|
|
735
|
+
matcher: E,
|
|
736
|
+
compiledParams: g
|
|
737
|
+
};
|
|
738
|
+
})
|
|
739
|
+
});
|
|
740
|
+
};
|
|
741
|
+
return e.forEach((l, c) => {
|
|
742
|
+
var s;
|
|
743
|
+
if (l.path === "" || !((s = l.path) != null && s.includes("?")))
|
|
744
|
+
o(l, c);
|
|
745
|
+
else
|
|
746
|
+
for (let m of Pt(l.path))
|
|
747
|
+
o(l, c, !0, m);
|
|
748
|
+
}), t;
|
|
749
|
+
}
|
|
750
|
+
function Pt(e) {
|
|
751
|
+
let t = e.split("/");
|
|
752
|
+
if (t.length === 0) return [];
|
|
753
|
+
let [n, ...a] = t, i = n.endsWith("?"), o = n.replace(/\?$/, "");
|
|
754
|
+
if (a.length === 0)
|
|
755
|
+
return i ? [o, ""] : [o];
|
|
756
|
+
let l = Pt(a.join("/")), c = [];
|
|
757
|
+
return c.push(
|
|
758
|
+
...l.map(
|
|
759
|
+
(s) => s === "" ? o : [o, s].join("/")
|
|
760
|
+
)
|
|
761
|
+
), i && c.push(...l), c.map(
|
|
762
|
+
(s) => e.startsWith("/") && s === "" ? "/" : s
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
function Cr(e) {
|
|
766
|
+
e.sort(
|
|
767
|
+
(t, n) => t.score !== n.score ? n.score - t.score : $r(
|
|
768
|
+
t.routesMeta.map((a) => a.childrenIndex),
|
|
769
|
+
n.routesMeta.map((a) => a.childrenIndex)
|
|
770
|
+
)
|
|
771
|
+
);
|
|
772
|
+
}
|
|
773
|
+
var Sr = /^:[\w-]+$/, Pr = 3, _r = 2, Tr = 1, kr = 10, jr = -2, xt = (e) => e === "*";
|
|
774
|
+
function Lr(e, t) {
|
|
775
|
+
let n = e.split("/"), a = n.length;
|
|
776
|
+
return n.some(xt) && (a += jr), t && (a += _r), n.filter((i) => !xt(i)).reduce(
|
|
777
|
+
(i, o) => i + (Sr.test(o) ? Pr : o === "" ? Tr : kr),
|
|
778
|
+
a
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
function $r(e, t) {
|
|
782
|
+
return e.length === t.length && e.slice(0, -1).every((a, i) => a === t[i]) ? (
|
|
783
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
784
|
+
// first. This allows people to have fine-grained control over the matching
|
|
785
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
786
|
+
// want them tried.
|
|
787
|
+
e[e.length - 1] - t[t.length - 1]
|
|
788
|
+
) : (
|
|
789
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
790
|
+
// so they sort equally.
|
|
791
|
+
0
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
function Or(e, t, n = !1) {
|
|
795
|
+
let { routesMeta: a } = e, i = {}, o = "/", l = [];
|
|
796
|
+
for (let c = 0; c < a.length; ++c) {
|
|
797
|
+
let s = a[c], m = c === a.length - 1, f = o === "/" ? t : t.slice(o.length) || "/", h = {
|
|
798
|
+
path: s.relativePath,
|
|
799
|
+
caseSensitive: s.caseSensitive,
|
|
800
|
+
end: m
|
|
801
|
+
}, v = (
|
|
802
|
+
// Use precomputed matcher if it exists
|
|
803
|
+
s.matcher && s.compiledParams ? _t(
|
|
804
|
+
h,
|
|
805
|
+
f,
|
|
806
|
+
s.matcher,
|
|
807
|
+
s.compiledParams
|
|
808
|
+
) : ge(h, f)
|
|
809
|
+
), y = s.route;
|
|
810
|
+
if (!v && m && n && !a[a.length - 1].route.index && (v = ge(
|
|
811
|
+
{
|
|
812
|
+
path: s.relativePath,
|
|
813
|
+
caseSensitive: s.caseSensitive,
|
|
814
|
+
end: !1
|
|
815
|
+
},
|
|
816
|
+
f
|
|
817
|
+
)), !v)
|
|
818
|
+
return null;
|
|
819
|
+
Object.assign(i, v.params), l.push({
|
|
820
|
+
// TODO: Can this as be avoided?
|
|
821
|
+
params: i,
|
|
822
|
+
pathname: B([o, v.pathname]),
|
|
823
|
+
pathnameBase: Ir(
|
|
824
|
+
B([o, v.pathnameBase])
|
|
825
|
+
),
|
|
826
|
+
route: y
|
|
827
|
+
}), v.pathnameBase !== "/" && (o = B([o, v.pathnameBase]));
|
|
828
|
+
}
|
|
829
|
+
return l;
|
|
830
|
+
}
|
|
831
|
+
function ge(e, t) {
|
|
832
|
+
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
833
|
+
let [n, a] = Tt(
|
|
834
|
+
e.path,
|
|
835
|
+
e.caseSensitive,
|
|
836
|
+
e.end
|
|
837
|
+
);
|
|
838
|
+
return _t(e, t, n, a);
|
|
839
|
+
}
|
|
840
|
+
function _t(e, t, n, a) {
|
|
841
|
+
let i = t.match(n);
|
|
842
|
+
if (!i) return null;
|
|
843
|
+
let o = i[0], l = o.replace(/(.)\/+$/, "$1"), c = i.slice(1);
|
|
844
|
+
return {
|
|
845
|
+
params: a.reduce(
|
|
846
|
+
(m, { paramName: f, isOptional: h }, v) => {
|
|
847
|
+
if (f === "*") {
|
|
848
|
+
let b = c[v] || "";
|
|
849
|
+
l = o.slice(0, o.length - b.length).replace(/(.)\/+$/, "$1");
|
|
850
|
+
}
|
|
851
|
+
const y = c[v];
|
|
852
|
+
return h && !y ? m[f] = void 0 : m[f] = (y || "").replace(/%2F/g, "/"), m;
|
|
853
|
+
},
|
|
854
|
+
{}
|
|
855
|
+
),
|
|
856
|
+
pathname: o,
|
|
857
|
+
pathnameBase: l,
|
|
858
|
+
pattern: e
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
function Tt(e, t = !1, n = !0) {
|
|
862
|
+
Y(
|
|
863
|
+
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
864
|
+
`Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
|
|
865
|
+
);
|
|
866
|
+
let a = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
867
|
+
/\/:([\w-]+)(\?)?/g,
|
|
868
|
+
(l, c, s, m, f) => {
|
|
869
|
+
if (a.push({ paramName: c, isOptional: s != null }), s) {
|
|
870
|
+
let h = f.charAt(m + l.length);
|
|
871
|
+
return h && h !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
872
|
+
}
|
|
873
|
+
return "/([^\\/]+)";
|
|
874
|
+
}
|
|
875
|
+
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
876
|
+
return e.endsWith("*") ? (a.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), a];
|
|
877
|
+
}
|
|
878
|
+
function Dr(e) {
|
|
879
|
+
try {
|
|
880
|
+
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
881
|
+
} catch (t) {
|
|
882
|
+
return Y(
|
|
883
|
+
!1,
|
|
884
|
+
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
885
|
+
), e;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
function G(e, t) {
|
|
889
|
+
if (t === "/") return e;
|
|
890
|
+
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
891
|
+
return null;
|
|
892
|
+
let n = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(n);
|
|
893
|
+
return a && a !== "/" ? null : e.slice(n) || "/";
|
|
894
|
+
}
|
|
895
|
+
function Fr(e, t = "/") {
|
|
896
|
+
let {
|
|
897
|
+
pathname: n,
|
|
898
|
+
search: a = "",
|
|
899
|
+
hash: i = ""
|
|
900
|
+
} = typeof e == "string" ? Ae(e) : e, o;
|
|
901
|
+
return n ? (n = jt(n), n.startsWith("/") ? o = Rt(n.substring(1), "/") : o = Rt(n, t)) : o = t, {
|
|
902
|
+
pathname: o,
|
|
903
|
+
search: Ar(a),
|
|
904
|
+
hash: Mr(i)
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
function Rt(e, t) {
|
|
908
|
+
let n = ye(t).split("/");
|
|
909
|
+
return e.split("/").forEach((i) => {
|
|
910
|
+
i === ".." ? n.length > 1 && n.pop() : i !== "." && n.push(i);
|
|
911
|
+
}), n.length > 1 ? n.join("/") : "/";
|
|
912
|
+
}
|
|
913
|
+
function $e(e, t, n, a) {
|
|
914
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
915
|
+
a
|
|
916
|
+
)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
917
|
+
}
|
|
918
|
+
function Nr(e) {
|
|
919
|
+
return e.filter(
|
|
920
|
+
(t, n) => n === 0 || t.route.path && t.route.path.length > 0
|
|
921
|
+
);
|
|
922
|
+
}
|
|
923
|
+
function kt(e) {
|
|
924
|
+
let t = Nr(e);
|
|
925
|
+
return t.map(
|
|
926
|
+
(n, a) => a === t.length - 1 ? n.pathname : n.pathnameBase
|
|
927
|
+
);
|
|
928
|
+
}
|
|
929
|
+
function Me(e, t, n, a = !1) {
|
|
930
|
+
let i;
|
|
931
|
+
typeof e == "string" ? i = Ae(e) : (i = { ...e }, D(
|
|
932
|
+
!i.pathname || !i.pathname.includes("?"),
|
|
933
|
+
$e("?", "pathname", "search", i)
|
|
934
|
+
), D(
|
|
935
|
+
!i.pathname || !i.pathname.includes("#"),
|
|
936
|
+
$e("#", "pathname", "hash", i)
|
|
937
|
+
), D(
|
|
938
|
+
!i.search || !i.search.includes("#"),
|
|
939
|
+
$e("#", "search", "hash", i)
|
|
940
|
+
));
|
|
941
|
+
let o = e === "" || i.pathname === "", l = o ? "/" : i.pathname, c;
|
|
942
|
+
if (l == null)
|
|
943
|
+
c = n;
|
|
944
|
+
else {
|
|
945
|
+
let h = t.length - 1;
|
|
946
|
+
if (!a && l.startsWith("..")) {
|
|
947
|
+
let v = l.split("/");
|
|
948
|
+
for (; v[0] === ".."; )
|
|
949
|
+
v.shift(), h -= 1;
|
|
950
|
+
i.pathname = v.join("/");
|
|
951
|
+
}
|
|
952
|
+
c = h >= 0 ? t[h] : "/";
|
|
953
|
+
}
|
|
954
|
+
let s = Fr(i, c), m = l && l !== "/" && l.endsWith("/"), f = (o || l === ".") && n.endsWith("/");
|
|
955
|
+
return !s.pathname.endsWith("/") && (m || f) && (s.pathname += "/"), s;
|
|
956
|
+
}
|
|
957
|
+
var jt = (e) => e.replace(/[\\/]{2,}/g, "/"), B = (e) => jt(e.join("/")), ye = (e) => e.replace(/\/+$/, ""), Ir = (e) => ye(e).replace(/^\/*/, "/"), Ar = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Mr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, Wr = class {
|
|
958
|
+
constructor(e, t, n, a = !1) {
|
|
959
|
+
this.status = e, this.statusText = t || "", this.internal = a, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
function Br(e) {
|
|
963
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
964
|
+
}
|
|
965
|
+
function Ur(e) {
|
|
966
|
+
let t = e.map((n) => n.route.path).filter(Boolean);
|
|
967
|
+
return B(t) || "/";
|
|
968
|
+
}
|
|
969
|
+
var Lt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
970
|
+
function $t(e, t) {
|
|
971
|
+
let n = e;
|
|
972
|
+
if (typeof n != "string" || !Ie.test(n))
|
|
973
|
+
return {
|
|
974
|
+
absoluteURL: void 0,
|
|
975
|
+
isExternal: !1,
|
|
976
|
+
to: n
|
|
977
|
+
};
|
|
978
|
+
let a = n, i = !1;
|
|
979
|
+
if (Lt)
|
|
980
|
+
try {
|
|
981
|
+
let o = new URL(window.location.href), l = Rr.test(n) ? new URL(br(n, o.protocol)) : new URL(n), c = G(l.pathname, t);
|
|
982
|
+
l.origin === o.origin && c != null ? n = c + l.search + l.hash : i = !0;
|
|
983
|
+
} catch {
|
|
984
|
+
Y(
|
|
985
|
+
!1,
|
|
986
|
+
`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
987
|
+
);
|
|
988
|
+
}
|
|
989
|
+
return {
|
|
990
|
+
absoluteURL: a,
|
|
991
|
+
isExternal: i,
|
|
992
|
+
to: n
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
996
|
+
var Ot = [
|
|
997
|
+
"POST",
|
|
998
|
+
"PUT",
|
|
999
|
+
"PATCH",
|
|
1000
|
+
"DELETE"
|
|
1001
|
+
];
|
|
1002
|
+
new Set(
|
|
1003
|
+
Ot
|
|
1004
|
+
);
|
|
1005
|
+
var Hr = [
|
|
1006
|
+
"GET",
|
|
1007
|
+
...Ot
|
|
1008
|
+
];
|
|
1009
|
+
new Set(Hr);
|
|
1010
|
+
var Vr = [
|
|
1011
|
+
"about:",
|
|
1012
|
+
"blob:",
|
|
1013
|
+
"chrome:",
|
|
1014
|
+
"chrome-untrusted:",
|
|
1015
|
+
"content:",
|
|
1016
|
+
"data:",
|
|
1017
|
+
"devtools:",
|
|
1018
|
+
"file:",
|
|
1019
|
+
"filesystem:",
|
|
1020
|
+
// eslint-disable-next-line no-script-url
|
|
1021
|
+
"javascript:"
|
|
1022
|
+
];
|
|
1023
|
+
function Yr(e) {
|
|
1024
|
+
try {
|
|
1025
|
+
return Vr.includes(new URL(e).protocol);
|
|
1026
|
+
} catch {
|
|
1027
|
+
return !1;
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
var te = u.createContext(null);
|
|
1031
|
+
te.displayName = "DataRouter";
|
|
1032
|
+
var xe = u.createContext(null);
|
|
1033
|
+
xe.displayName = "DataRouterState";
|
|
1034
|
+
var Dt = u.createContext(!1);
|
|
1035
|
+
function Jr() {
|
|
1036
|
+
return u.useContext(Dt);
|
|
1037
|
+
}
|
|
1038
|
+
var Ft = u.createContext({
|
|
1039
|
+
isTransitioning: !1
|
|
1040
|
+
});
|
|
1041
|
+
Ft.displayName = "ViewTransition";
|
|
1042
|
+
var qr = u.createContext(
|
|
1043
|
+
/* @__PURE__ */ new Map()
|
|
1044
|
+
);
|
|
1045
|
+
qr.displayName = "Fetchers";
|
|
1046
|
+
var zr = u.createContext(null);
|
|
1047
|
+
zr.displayName = "Await";
|
|
1048
|
+
var U = u.createContext(
|
|
1049
|
+
null
|
|
1050
|
+
);
|
|
1051
|
+
U.displayName = "Navigation";
|
|
1052
|
+
var We = u.createContext(
|
|
1053
|
+
null
|
|
1054
|
+
);
|
|
1055
|
+
We.displayName = "Location";
|
|
1056
|
+
var J = u.createContext({
|
|
1057
|
+
outlet: null,
|
|
1058
|
+
matches: [],
|
|
1059
|
+
isDataRoute: !1
|
|
1060
|
+
});
|
|
1061
|
+
J.displayName = "Route";
|
|
1062
|
+
var Be = u.createContext(null);
|
|
1063
|
+
Be.displayName = "RouteError";
|
|
1064
|
+
var Nt = "REACT_ROUTER_ERROR", Kr = "REDIRECT", Gr = "ROUTE_ERROR_RESPONSE";
|
|
1065
|
+
function Xr(e) {
|
|
1066
|
+
if (e.startsWith(`${Nt}:${Kr}:{`))
|
|
1067
|
+
try {
|
|
1068
|
+
let t = JSON.parse(e.slice(28));
|
|
1069
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean")
|
|
1070
|
+
return t;
|
|
1071
|
+
} catch {
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
function Zr(e) {
|
|
1075
|
+
if (e.startsWith(
|
|
1076
|
+
`${Nt}:${Gr}:{`
|
|
1077
|
+
))
|
|
1078
|
+
try {
|
|
1079
|
+
let t = JSON.parse(e.slice(40));
|
|
1080
|
+
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string")
|
|
1081
|
+
return new Wr(
|
|
1082
|
+
t.status,
|
|
1083
|
+
t.statusText,
|
|
1084
|
+
t.data
|
|
1085
|
+
);
|
|
1086
|
+
} catch {
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
function Qr(e, { relative: t } = {}) {
|
|
1090
|
+
D(
|
|
1091
|
+
Re(),
|
|
1092
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1093
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1094
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
1095
|
+
);
|
|
1096
|
+
let { basename: n, navigator: a } = u.useContext(U), { hash: i, pathname: o, search: l } = le(e, { relative: t }), c = o;
|
|
1097
|
+
return n !== "/" && (c = o === "/" ? n : B([n, o])), a.createHref({ pathname: c, search: l, hash: i });
|
|
1098
|
+
}
|
|
1099
|
+
function Re() {
|
|
1100
|
+
return u.useContext(We) != null;
|
|
1101
|
+
}
|
|
1102
|
+
function q() {
|
|
1103
|
+
return D(
|
|
1104
|
+
Re(),
|
|
1105
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1106
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1107
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
1108
|
+
), u.useContext(We).location;
|
|
1109
|
+
}
|
|
1110
|
+
var It = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
1111
|
+
function At(e) {
|
|
1112
|
+
u.useContext(U).static || u.useLayoutEffect(e);
|
|
1113
|
+
}
|
|
1114
|
+
function en() {
|
|
1115
|
+
let { isDataRoute: e } = u.useContext(J);
|
|
1116
|
+
return e ? mn() : tn();
|
|
1117
|
+
}
|
|
1118
|
+
function tn() {
|
|
1119
|
+
D(
|
|
1120
|
+
Re(),
|
|
1121
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1122
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1123
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
1124
|
+
);
|
|
1125
|
+
let e = u.useContext(te), { basename: t, navigator: n } = u.useContext(U), { matches: a } = u.useContext(J), { pathname: i } = q(), o = JSON.stringify(kt(a)), l = u.useRef(!1);
|
|
1126
|
+
return At(() => {
|
|
1127
|
+
l.current = !0;
|
|
1128
|
+
}), u.useCallback(
|
|
1129
|
+
(s, m = {}) => {
|
|
1130
|
+
if (Y(l.current, It), !l.current) return;
|
|
1131
|
+
if (typeof s == "number") {
|
|
1132
|
+
n.go(s);
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
let f = Me(
|
|
1136
|
+
s,
|
|
1137
|
+
JSON.parse(o),
|
|
1138
|
+
i,
|
|
1139
|
+
m.relative === "path"
|
|
1140
|
+
);
|
|
1141
|
+
e == null && t !== "/" && (f.pathname = f.pathname === "/" ? t : B([t, f.pathname])), (m.replace ? n.replace : n.push)(
|
|
1142
|
+
f,
|
|
1143
|
+
m.state,
|
|
1144
|
+
m
|
|
1145
|
+
);
|
|
1146
|
+
},
|
|
1147
|
+
[
|
|
1148
|
+
t,
|
|
1149
|
+
n,
|
|
1150
|
+
o,
|
|
1151
|
+
i,
|
|
1152
|
+
e
|
|
1153
|
+
]
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
u.createContext(null);
|
|
1157
|
+
function le(e, { relative: t } = {}) {
|
|
1158
|
+
let { matches: n } = u.useContext(J), { pathname: a } = q(), i = JSON.stringify(kt(n));
|
|
1159
|
+
return u.useMemo(
|
|
1160
|
+
() => Me(
|
|
1161
|
+
e,
|
|
1162
|
+
JSON.parse(i),
|
|
1163
|
+
a,
|
|
1164
|
+
t === "path"
|
|
1165
|
+
),
|
|
1166
|
+
[e, i, a, t]
|
|
1167
|
+
);
|
|
1168
|
+
}
|
|
1169
|
+
function rn(e, t, n) {
|
|
1170
|
+
D(
|
|
1171
|
+
Re(),
|
|
1172
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1173
|
+
// router loaded. We can help them understand how to avoid that.
|
|
1174
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
1175
|
+
);
|
|
1176
|
+
let { navigator: a } = u.useContext(U), { matches: i } = u.useContext(J), o = i[i.length - 1], l = o ? o.params : {}, c = o ? o.pathname : "/", s = o ? o.pathnameBase : "/", m = o && o.route;
|
|
1177
|
+
{
|
|
1178
|
+
let g = m && m.path || "";
|
|
1179
|
+
Wt(
|
|
1180
|
+
c,
|
|
1181
|
+
!m || g.endsWith("*") || g.endsWith("*?"),
|
|
1182
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1183
|
+
|
|
1184
|
+
Please change the parent <Route path="${g}"> to <Route path="${g === "/" ? "*" : `${g}/*`}">.`
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
let f = q(), h;
|
|
1188
|
+
h = f;
|
|
1189
|
+
let v = h.pathname || "/", y = v;
|
|
1190
|
+
if (s !== "/") {
|
|
1191
|
+
let g = s.replace(/^\//, "").split("/");
|
|
1192
|
+
y = "/" + v.replace(/^\//, "").split("/").slice(g.length).join("/");
|
|
1193
|
+
}
|
|
1194
|
+
let b = n && n.state.matches.length ? (
|
|
1195
|
+
// If we're in a data router, use the matches we've already identified but ensure
|
|
1196
|
+
// we have the latest route instances from the manifest in case elements have changed
|
|
1197
|
+
n.state.matches.map(
|
|
1198
|
+
(g) => Object.assign(g, {
|
|
1199
|
+
route: n.manifest[g.route.id] || g.route
|
|
1200
|
+
})
|
|
1201
|
+
)
|
|
1202
|
+
) : Ct(e, { pathname: y });
|
|
1203
|
+
return Y(
|
|
1204
|
+
m || b != null,
|
|
1205
|
+
`No routes matched location "${h.pathname}${h.search}${h.hash}" `
|
|
1206
|
+
), Y(
|
|
1207
|
+
b == null || b[b.length - 1].route.element !== void 0 || b[b.length - 1].route.Component !== void 0 || b[b.length - 1].route.lazy !== void 0,
|
|
1208
|
+
`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
1209
|
+
), sn(
|
|
1210
|
+
b && b.map(
|
|
1211
|
+
(g) => Object.assign({}, g, {
|
|
1212
|
+
params: Object.assign({}, l, g.params),
|
|
1213
|
+
pathname: B([
|
|
1214
|
+
s,
|
|
1215
|
+
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
1216
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
1217
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
1218
|
+
// them as separators
|
|
1219
|
+
a.encodeLocation ? a.encodeLocation(
|
|
1220
|
+
g.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
1221
|
+
).pathname : g.pathname
|
|
1222
|
+
]),
|
|
1223
|
+
pathnameBase: g.pathnameBase === "/" ? s : B([
|
|
1224
|
+
s,
|
|
1225
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
1226
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
1227
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
1228
|
+
// them as separators
|
|
1229
|
+
a.encodeLocation ? a.encodeLocation(
|
|
1230
|
+
g.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
1231
|
+
).pathname : g.pathnameBase
|
|
1232
|
+
])
|
|
1233
|
+
})
|
|
1234
|
+
),
|
|
1235
|
+
i,
|
|
1236
|
+
n
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
function nn() {
|
|
1240
|
+
let e = hn(), t = Br(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", i = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, l = null;
|
|
1241
|
+
return console.error(
|
|
1242
|
+
"Error handled by React Router default ErrorBoundary:",
|
|
1243
|
+
e
|
|
1244
|
+
), l = /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ u.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ u.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ u.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ u.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ u.createElement("pre", { style: i }, n) : null, l);
|
|
1245
|
+
}
|
|
1246
|
+
var an = /* @__PURE__ */ u.createElement(nn, null), Mt = class extends u.Component {
|
|
1247
|
+
constructor(e) {
|
|
1248
|
+
super(e), this.state = {
|
|
1249
|
+
location: e.location,
|
|
1250
|
+
revalidation: e.revalidation,
|
|
1251
|
+
error: e.error
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
static getDerivedStateFromError(e) {
|
|
1255
|
+
return { error: e };
|
|
1256
|
+
}
|
|
1257
|
+
static getDerivedStateFromProps(e, t) {
|
|
1258
|
+
return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
1259
|
+
error: e.error,
|
|
1260
|
+
location: e.location,
|
|
1261
|
+
revalidation: e.revalidation
|
|
1262
|
+
} : {
|
|
1263
|
+
error: e.error !== void 0 ? e.error : t.error,
|
|
1264
|
+
location: t.location,
|
|
1265
|
+
revalidation: e.revalidation || t.revalidation
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
componentDidCatch(e, t) {
|
|
1269
|
+
this.props.onError ? this.props.onError(e, t) : console.error(
|
|
1270
|
+
"React Router caught the following error during render",
|
|
1271
|
+
e
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
render() {
|
|
1275
|
+
let e = this.state.error;
|
|
1276
|
+
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
1277
|
+
const n = Zr(e.digest);
|
|
1278
|
+
n && (e = n);
|
|
1279
|
+
}
|
|
1280
|
+
let t = e !== void 0 ? /* @__PURE__ */ u.createElement(J.Provider, { value: this.props.routeContext }, /* @__PURE__ */ u.createElement(
|
|
1281
|
+
Be.Provider,
|
|
1282
|
+
{
|
|
1283
|
+
value: e,
|
|
1284
|
+
children: this.props.component
|
|
1285
|
+
}
|
|
1286
|
+
)) : this.props.children;
|
|
1287
|
+
return this.context ? /* @__PURE__ */ u.createElement(on, { error: e }, t) : t;
|
|
1288
|
+
}
|
|
1289
|
+
};
|
|
1290
|
+
Mt.contextType = Dt;
|
|
1291
|
+
var Oe = /* @__PURE__ */ new WeakMap();
|
|
1292
|
+
function on({
|
|
1293
|
+
children: e,
|
|
1294
|
+
error: t
|
|
1295
|
+
}) {
|
|
1296
|
+
let { basename: n } = u.useContext(U);
|
|
1297
|
+
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
1298
|
+
let a = Xr(t.digest);
|
|
1299
|
+
if (a) {
|
|
1300
|
+
let i = Oe.get(t);
|
|
1301
|
+
if (i) throw i;
|
|
1302
|
+
let o = $t(a.location, n), l = o.absoluteURL || o.to;
|
|
1303
|
+
if (Yr(l))
|
|
1304
|
+
throw new Error("Invalid redirect location");
|
|
1305
|
+
if (Lt && !Oe.get(t))
|
|
1306
|
+
if (o.isExternal || a.reloadDocument)
|
|
1307
|
+
window.location.href = l;
|
|
1308
|
+
else {
|
|
1309
|
+
const c = Promise.resolve().then(
|
|
1310
|
+
() => window.__reactRouterDataRouter.navigate(o.to, {
|
|
1311
|
+
replace: a.replace
|
|
1312
|
+
})
|
|
1313
|
+
);
|
|
1314
|
+
throw Oe.set(t, c), c;
|
|
1315
|
+
}
|
|
1316
|
+
return /* @__PURE__ */ u.createElement("meta", { httpEquiv: "refresh", content: `0;url=${l}` });
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
return e;
|
|
1320
|
+
}
|
|
1321
|
+
function ln({ routeContext: e, match: t, children: n }) {
|
|
1322
|
+
let a = u.useContext(te);
|
|
1323
|
+
return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ u.createElement(J.Provider, { value: e }, n);
|
|
1324
|
+
}
|
|
1325
|
+
function sn(e, t = [], n) {
|
|
1326
|
+
let a = n == null ? void 0 : n.state;
|
|
1327
|
+
if (e == null) {
|
|
1328
|
+
if (!a)
|
|
1329
|
+
return null;
|
|
1330
|
+
if (a.errors)
|
|
1331
|
+
e = a.matches;
|
|
1332
|
+
else if (t.length === 0 && !a.initialized && a.matches.length > 0)
|
|
1333
|
+
e = a.matches;
|
|
1334
|
+
else
|
|
1335
|
+
return null;
|
|
1336
|
+
}
|
|
1337
|
+
let i = e, o = a == null ? void 0 : a.errors;
|
|
1338
|
+
if (o != null) {
|
|
1339
|
+
let f = i.findIndex(
|
|
1340
|
+
(h) => h.route.id && (o == null ? void 0 : o[h.route.id]) !== void 0
|
|
1341
|
+
);
|
|
1342
|
+
D(
|
|
1343
|
+
f >= 0,
|
|
1344
|
+
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
1345
|
+
o
|
|
1346
|
+
).join(",")}`
|
|
1347
|
+
), i = i.slice(
|
|
1348
|
+
0,
|
|
1349
|
+
Math.min(i.length, f + 1)
|
|
1350
|
+
);
|
|
1351
|
+
}
|
|
1352
|
+
let l = !1, c = -1;
|
|
1353
|
+
if (n && a) {
|
|
1354
|
+
l = a.renderFallback;
|
|
1355
|
+
for (let f = 0; f < i.length; f++) {
|
|
1356
|
+
let h = i[f];
|
|
1357
|
+
if ((h.route.HydrateFallback || h.route.hydrateFallbackElement) && (c = f), h.route.id) {
|
|
1358
|
+
let { loaderData: v, errors: y } = a, b = h.route.loader && !v.hasOwnProperty(h.route.id) && (!y || y[h.route.id] === void 0);
|
|
1359
|
+
if (h.route.lazy || b) {
|
|
1360
|
+
n.isStatic && (l = !0), c >= 0 ? i = i.slice(0, c + 1) : i = [i[0]];
|
|
1361
|
+
break;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
let s = n == null ? void 0 : n.onError, m = a && s ? (f, h) => {
|
|
1367
|
+
var v, y;
|
|
1368
|
+
s(f, {
|
|
1369
|
+
location: a.location,
|
|
1370
|
+
params: ((y = (v = a.matches) == null ? void 0 : v[0]) == null ? void 0 : y.params) ?? {},
|
|
1371
|
+
pattern: Ur(a.matches),
|
|
1372
|
+
errorInfo: h
|
|
1373
|
+
});
|
|
1374
|
+
} : void 0;
|
|
1375
|
+
return i.reduceRight(
|
|
1376
|
+
(f, h, v) => {
|
|
1377
|
+
let y, b = !1, E = null, g = null;
|
|
1378
|
+
a && (y = o && h.route.id ? o[h.route.id] : void 0, E = h.route.errorElement || an, l && (c < 0 && v === 0 ? (Wt(
|
|
1379
|
+
"route-fallback",
|
|
1380
|
+
!1,
|
|
1381
|
+
"No `HydrateFallback` element provided to render during initial hydration"
|
|
1382
|
+
), b = !0, g = null) : c === v && (b = !0, g = h.route.hydrateFallbackElement || null)));
|
|
1383
|
+
let w = t.concat(i.slice(0, v + 1)), R = () => {
|
|
1384
|
+
let _;
|
|
1385
|
+
return y ? _ = E : b ? _ = g : h.route.Component ? _ = /* @__PURE__ */ u.createElement(h.route.Component, null) : h.route.element ? _ = h.route.element : _ = f, /* @__PURE__ */ u.createElement(
|
|
1386
|
+
ln,
|
|
1387
|
+
{
|
|
1388
|
+
match: h,
|
|
1389
|
+
routeContext: {
|
|
1390
|
+
outlet: f,
|
|
1391
|
+
matches: w,
|
|
1392
|
+
isDataRoute: a != null
|
|
1393
|
+
},
|
|
1394
|
+
children: _
|
|
1395
|
+
}
|
|
1396
|
+
);
|
|
1397
|
+
};
|
|
1398
|
+
return a && (h.route.ErrorBoundary || h.route.errorElement || v === 0) ? /* @__PURE__ */ u.createElement(
|
|
1399
|
+
Mt,
|
|
1400
|
+
{
|
|
1401
|
+
location: a.location,
|
|
1402
|
+
revalidation: a.revalidation,
|
|
1403
|
+
component: E,
|
|
1404
|
+
error: y,
|
|
1405
|
+
children: R(),
|
|
1406
|
+
routeContext: { outlet: null, matches: w, isDataRoute: !0 },
|
|
1407
|
+
onError: m
|
|
1408
|
+
}
|
|
1409
|
+
) : R();
|
|
1410
|
+
},
|
|
1411
|
+
null
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
function Ue(e) {
|
|
1415
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1416
|
+
}
|
|
1417
|
+
function un(e) {
|
|
1418
|
+
let t = u.useContext(te);
|
|
1419
|
+
return D(t, Ue(e)), t;
|
|
1420
|
+
}
|
|
1421
|
+
function cn(e) {
|
|
1422
|
+
let t = u.useContext(xe);
|
|
1423
|
+
return D(t, Ue(e)), t;
|
|
1424
|
+
}
|
|
1425
|
+
function fn(e) {
|
|
1426
|
+
let t = u.useContext(J);
|
|
1427
|
+
return D(t, Ue(e)), t;
|
|
1428
|
+
}
|
|
1429
|
+
function He(e) {
|
|
1430
|
+
let t = fn(e), n = t.matches[t.matches.length - 1];
|
|
1431
|
+
return D(
|
|
1432
|
+
n.route.id,
|
|
1433
|
+
`${e} can only be used on routes that contain a unique "id"`
|
|
1434
|
+
), n.route.id;
|
|
1435
|
+
}
|
|
1436
|
+
function dn() {
|
|
1437
|
+
return He(
|
|
1438
|
+
"useRouteId"
|
|
1439
|
+
/* UseRouteId */
|
|
1440
|
+
);
|
|
1441
|
+
}
|
|
1442
|
+
function hn() {
|
|
1443
|
+
var a;
|
|
1444
|
+
let e = u.useContext(Be), t = cn(
|
|
1445
|
+
"useRouteError"
|
|
1446
|
+
/* UseRouteError */
|
|
1447
|
+
), n = He(
|
|
1448
|
+
"useRouteError"
|
|
1449
|
+
/* UseRouteError */
|
|
1450
|
+
);
|
|
1451
|
+
return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[n];
|
|
1452
|
+
}
|
|
1453
|
+
function mn() {
|
|
1454
|
+
let { router: e } = un(
|
|
1455
|
+
"useNavigate"
|
|
1456
|
+
/* UseNavigateStable */
|
|
1457
|
+
), t = He(
|
|
1458
|
+
"useNavigate"
|
|
1459
|
+
/* UseNavigateStable */
|
|
1460
|
+
), n = u.useRef(!1);
|
|
1461
|
+
return At(() => {
|
|
1462
|
+
n.current = !0;
|
|
1463
|
+
}), u.useCallback(
|
|
1464
|
+
async (i, o = {}) => {
|
|
1465
|
+
Y(n.current, It), n.current && (typeof i == "number" ? await e.navigate(i) : await e.navigate(i, { fromRouteId: t, ...o }));
|
|
1466
|
+
},
|
|
1467
|
+
[e, t]
|
|
1468
|
+
);
|
|
1469
|
+
}
|
|
1470
|
+
var bt = {};
|
|
1471
|
+
function Wt(e, t, n) {
|
|
1472
|
+
!t && !bt[e] && (bt[e] = !0, Y(!1, n));
|
|
1473
|
+
}
|
|
1474
|
+
u.memo(pn);
|
|
1475
|
+
function pn({
|
|
1476
|
+
routes: e,
|
|
1477
|
+
manifest: t,
|
|
1478
|
+
future: n,
|
|
1479
|
+
state: a,
|
|
1480
|
+
isStatic: i,
|
|
1481
|
+
onError: o
|
|
1482
|
+
}) {
|
|
1483
|
+
return rn(e, void 0, {
|
|
1484
|
+
manifest: t,
|
|
1485
|
+
state: a,
|
|
1486
|
+
isStatic: i,
|
|
1487
|
+
onError: o
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
var pe = "get", ve = "application/x-www-form-urlencoded";
|
|
1491
|
+
function be(e) {
|
|
1492
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1493
|
+
}
|
|
1494
|
+
function vn(e) {
|
|
1495
|
+
return be(e) && e.tagName.toLowerCase() === "button";
|
|
1496
|
+
}
|
|
1497
|
+
function gn(e) {
|
|
1498
|
+
return be(e) && e.tagName.toLowerCase() === "form";
|
|
1499
|
+
}
|
|
1500
|
+
function yn(e) {
|
|
1501
|
+
return be(e) && e.tagName.toLowerCase() === "input";
|
|
1502
|
+
}
|
|
1503
|
+
function xn(e) {
|
|
1504
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1505
|
+
}
|
|
1506
|
+
function Rn(e, t) {
|
|
1507
|
+
return e.button === 0 && // Ignore everything but left clicks
|
|
1508
|
+
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
1509
|
+
!xn(e);
|
|
1510
|
+
}
|
|
1511
|
+
var me = null;
|
|
1512
|
+
function bn() {
|
|
1513
|
+
if (me === null)
|
|
1514
|
+
try {
|
|
1515
|
+
new FormData(
|
|
1516
|
+
document.createElement("form"),
|
|
1517
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1518
|
+
0
|
|
1519
|
+
), me = !1;
|
|
1520
|
+
} catch {
|
|
1521
|
+
me = !0;
|
|
1522
|
+
}
|
|
1523
|
+
return me;
|
|
1524
|
+
}
|
|
1525
|
+
var En = /* @__PURE__ */ new Set([
|
|
1526
|
+
"application/x-www-form-urlencoded",
|
|
1527
|
+
"multipart/form-data",
|
|
1528
|
+
"text/plain"
|
|
1529
|
+
]);
|
|
1530
|
+
function De(e) {
|
|
1531
|
+
return e != null && !En.has(e) ? (Y(
|
|
1532
|
+
!1,
|
|
1533
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ve}"`
|
|
1534
|
+
), null) : e;
|
|
1535
|
+
}
|
|
1536
|
+
function wn(e, t) {
|
|
1537
|
+
let n, a, i, o, l;
|
|
1538
|
+
if (gn(e)) {
|
|
1539
|
+
let c = e.getAttribute("action");
|
|
1540
|
+
a = c ? G(c, t) : null, n = e.getAttribute("method") || pe, i = De(e.getAttribute("enctype")) || ve, o = new FormData(e);
|
|
1541
|
+
} else if (vn(e) || yn(e) && (e.type === "submit" || e.type === "image")) {
|
|
1542
|
+
let c = e.form;
|
|
1543
|
+
if (c == null)
|
|
1544
|
+
throw new Error(
|
|
1545
|
+
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1546
|
+
);
|
|
1547
|
+
let s = e.getAttribute("formaction") || c.getAttribute("action");
|
|
1548
|
+
if (a = s ? G(s, t) : null, n = e.getAttribute("formmethod") || c.getAttribute("method") || pe, i = De(e.getAttribute("formenctype")) || De(c.getAttribute("enctype")) || ve, o = new FormData(c, e), !bn()) {
|
|
1549
|
+
let { name: m, type: f, value: h } = e;
|
|
1550
|
+
if (f === "image") {
|
|
1551
|
+
let v = m ? `${m}.` : "";
|
|
1552
|
+
o.append(`${v}x`, "0"), o.append(`${v}y`, "0");
|
|
1553
|
+
} else m && o.append(m, h);
|
|
1554
|
+
}
|
|
1555
|
+
} else {
|
|
1556
|
+
if (be(e))
|
|
1557
|
+
throw new Error(
|
|
1558
|
+
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1559
|
+
);
|
|
1560
|
+
n = pe, a = null, i = ve, l = e;
|
|
1561
|
+
}
|
|
1562
|
+
return o && i === "text/plain" && (l = o, o = void 0), { action: a, method: n.toLowerCase(), encType: i, formData: o, body: l };
|
|
1563
|
+
}
|
|
1564
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1565
|
+
function Ve(e, t) {
|
|
1566
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
1567
|
+
throw new Error(t);
|
|
1568
|
+
}
|
|
1569
|
+
function Bt(e, t, n, a) {
|
|
1570
|
+
let i = typeof e == "string" ? new URL(
|
|
1571
|
+
e,
|
|
1572
|
+
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1573
|
+
// don't assume window is available
|
|
1574
|
+
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1575
|
+
) : e;
|
|
1576
|
+
return n ? i.pathname.endsWith("/") ? i.pathname = `${i.pathname}_.${a}` : i.pathname = `${i.pathname}.${a}` : i.pathname === "/" ? i.pathname = `_root.${a}` : t && G(i.pathname, t) === "/" ? i.pathname = `${ye(t)}/_root.${a}` : i.pathname = `${ye(i.pathname)}.${a}`, i;
|
|
1577
|
+
}
|
|
1578
|
+
async function Cn(e, t) {
|
|
1579
|
+
if (e.id in t)
|
|
1580
|
+
return t[e.id];
|
|
1581
|
+
try {
|
|
1582
|
+
let n = await import(
|
|
1583
|
+
/* @vite-ignore */
|
|
1584
|
+
/* webpackIgnore: true */
|
|
1585
|
+
e.module
|
|
1586
|
+
);
|
|
1587
|
+
return t[e.id] = n, n;
|
|
1588
|
+
} catch (n) {
|
|
1589
|
+
return console.error(
|
|
1590
|
+
`Error loading route module \`${e.module}\`, reloading page...`
|
|
1591
|
+
), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
1592
|
+
});
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
function Sn(e) {
|
|
1596
|
+
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
1597
|
+
}
|
|
1598
|
+
async function Pn(e, t, n) {
|
|
1599
|
+
let a = await Promise.all(
|
|
1600
|
+
e.map(async (i) => {
|
|
1601
|
+
let o = t.routes[i.route.id];
|
|
1602
|
+
if (o) {
|
|
1603
|
+
let l = await Cn(o, n);
|
|
1604
|
+
return l.links ? l.links() : [];
|
|
1605
|
+
}
|
|
1606
|
+
return [];
|
|
1607
|
+
})
|
|
1608
|
+
);
|
|
1609
|
+
return jn(
|
|
1610
|
+
a.flat(1).filter(Sn).filter((i) => i.rel === "stylesheet" || i.rel === "preload").map(
|
|
1611
|
+
(i) => i.rel === "stylesheet" ? { ...i, rel: "prefetch", as: "style" } : { ...i, rel: "prefetch" }
|
|
1612
|
+
)
|
|
1613
|
+
);
|
|
1614
|
+
}
|
|
1615
|
+
function Et(e, t, n, a, i, o) {
|
|
1616
|
+
let l = (s, m) => n[m] ? s.route.id !== n[m].route.id : !0, c = (s, m) => {
|
|
1617
|
+
var f;
|
|
1618
|
+
return (
|
|
1619
|
+
// param change, /users/123 -> /users/456
|
|
1620
|
+
n[m].pathname !== s.pathname || // splat param changed, which is not present in match.path
|
|
1621
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1622
|
+
((f = n[m].route.path) == null ? void 0 : f.endsWith("*")) && n[m].params["*"] !== s.params["*"]
|
|
1623
|
+
);
|
|
1624
|
+
};
|
|
1625
|
+
return o === "assets" ? t.filter(
|
|
1626
|
+
(s, m) => l(s, m) || c(s, m)
|
|
1627
|
+
) : o === "data" ? t.filter((s, m) => {
|
|
1628
|
+
var h;
|
|
1629
|
+
let f = a.routes[s.route.id];
|
|
1630
|
+
if (!f || !f.hasLoader)
|
|
1631
|
+
return !1;
|
|
1632
|
+
if (l(s, m) || c(s, m))
|
|
1633
|
+
return !0;
|
|
1634
|
+
if (s.route.shouldRevalidate) {
|
|
1635
|
+
let v = s.route.shouldRevalidate({
|
|
1636
|
+
currentUrl: new URL(
|
|
1637
|
+
i.pathname + i.search + i.hash,
|
|
1638
|
+
window.origin
|
|
1639
|
+
),
|
|
1640
|
+
currentParams: ((h = n[0]) == null ? void 0 : h.params) || {},
|
|
1641
|
+
nextUrl: new URL(e, window.origin),
|
|
1642
|
+
nextParams: s.params,
|
|
1643
|
+
defaultShouldRevalidate: !0
|
|
1644
|
+
});
|
|
1645
|
+
if (typeof v == "boolean")
|
|
1646
|
+
return v;
|
|
1647
|
+
}
|
|
1648
|
+
return !0;
|
|
1649
|
+
}) : [];
|
|
1650
|
+
}
|
|
1651
|
+
function _n(e, t, { includeHydrateFallback: n } = {}) {
|
|
1652
|
+
return Tn(
|
|
1653
|
+
e.map((a) => {
|
|
1654
|
+
let i = t.routes[a.route.id];
|
|
1655
|
+
if (!i) return [];
|
|
1656
|
+
let o = [i.module];
|
|
1657
|
+
return i.clientActionModule && (o = o.concat(i.clientActionModule)), i.clientLoaderModule && (o = o.concat(i.clientLoaderModule)), n && i.hydrateFallbackModule && (o = o.concat(i.hydrateFallbackModule)), i.imports && (o = o.concat(i.imports)), o;
|
|
1658
|
+
}).flat(1)
|
|
1659
|
+
);
|
|
1660
|
+
}
|
|
1661
|
+
function Tn(e) {
|
|
1662
|
+
return [...new Set(e)];
|
|
1663
|
+
}
|
|
1664
|
+
function kn(e) {
|
|
1665
|
+
let t = {}, n = Object.keys(e).sort();
|
|
1666
|
+
for (let a of n)
|
|
1667
|
+
t[a] = e[a];
|
|
1668
|
+
return t;
|
|
1669
|
+
}
|
|
1670
|
+
function jn(e, t) {
|
|
1671
|
+
let n = /* @__PURE__ */ new Set();
|
|
1672
|
+
return new Set(t), e.reduce((a, i) => {
|
|
1673
|
+
let o = JSON.stringify(kn(i));
|
|
1674
|
+
return n.has(o) || (n.add(o), a.push({ key: o, link: i })), a;
|
|
1675
|
+
}, []);
|
|
1676
|
+
}
|
|
1677
|
+
function Ye() {
|
|
1678
|
+
let e = u.useContext(te);
|
|
1679
|
+
return Ve(
|
|
1680
|
+
e,
|
|
1681
|
+
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1682
|
+
), e;
|
|
1683
|
+
}
|
|
1684
|
+
function Ln() {
|
|
1685
|
+
let e = u.useContext(xe);
|
|
1686
|
+
return Ve(
|
|
1687
|
+
e,
|
|
1688
|
+
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1689
|
+
), e;
|
|
1690
|
+
}
|
|
1691
|
+
var Je = u.createContext(void 0);
|
|
1692
|
+
Je.displayName = "FrameworkContext";
|
|
1693
|
+
function Ee() {
|
|
1694
|
+
let e = u.useContext(Je);
|
|
1695
|
+
return Ve(
|
|
1696
|
+
e,
|
|
1697
|
+
"You must render this element inside a <HydratedRouter> element"
|
|
1698
|
+
), e;
|
|
1699
|
+
}
|
|
1700
|
+
function $n(e, t) {
|
|
1701
|
+
let n = u.useContext(Je), [a, i] = u.useState(!1), [o, l] = u.useState(!1), { onFocus: c, onBlur: s, onMouseEnter: m, onMouseLeave: f, onTouchStart: h } = t, v = u.useRef(null);
|
|
1702
|
+
u.useEffect(() => {
|
|
1703
|
+
if (e === "render" && l(!0), e === "viewport") {
|
|
1704
|
+
let E = (w) => {
|
|
1705
|
+
w.forEach((R) => {
|
|
1706
|
+
l(R.isIntersecting);
|
|
1707
|
+
});
|
|
1708
|
+
}, g = new IntersectionObserver(E, { threshold: 0.5 });
|
|
1709
|
+
return v.current && g.observe(v.current), () => {
|
|
1710
|
+
g.disconnect();
|
|
1711
|
+
};
|
|
1712
|
+
}
|
|
1713
|
+
}, [e]), u.useEffect(() => {
|
|
1714
|
+
if (a) {
|
|
1715
|
+
let E = setTimeout(() => {
|
|
1716
|
+
l(!0);
|
|
1717
|
+
}, 100);
|
|
1718
|
+
return () => {
|
|
1719
|
+
clearTimeout(E);
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
}, [a]);
|
|
1723
|
+
let y = () => {
|
|
1724
|
+
i(!0);
|
|
1725
|
+
}, b = () => {
|
|
1726
|
+
i(!1), l(!1);
|
|
1727
|
+
};
|
|
1728
|
+
return n ? e !== "intent" ? [o, v, {}] : [
|
|
1729
|
+
o,
|
|
1730
|
+
v,
|
|
1731
|
+
{
|
|
1732
|
+
onFocus: oe(c, y),
|
|
1733
|
+
onBlur: oe(s, b),
|
|
1734
|
+
onMouseEnter: oe(m, y),
|
|
1735
|
+
onMouseLeave: oe(f, b),
|
|
1736
|
+
onTouchStart: oe(h, y)
|
|
1737
|
+
}
|
|
1738
|
+
] : [!1, v, {}];
|
|
1739
|
+
}
|
|
1740
|
+
function oe(e, t) {
|
|
1741
|
+
return (n) => {
|
|
1742
|
+
e && e(n), n.defaultPrevented || t(n);
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
function On({ page: e, ...t }) {
|
|
1746
|
+
let n = Jr(), { nonce: a } = Ee(), { router: i } = Ye(), o = u.useMemo(
|
|
1747
|
+
() => Ct(i.routes, e, i.basename),
|
|
1748
|
+
[i.routes, e, i.basename]
|
|
1749
|
+
);
|
|
1750
|
+
return o ? (t.nonce == null && a && (t = { ...t, nonce: a }), n ? /* @__PURE__ */ u.createElement(Fn, { page: e, matches: o, ...t }) : /* @__PURE__ */ u.createElement(Nn, { page: e, matches: o, ...t })) : null;
|
|
1751
|
+
}
|
|
1752
|
+
function Dn(e) {
|
|
1753
|
+
let { manifest: t, routeModules: n } = Ee(), [a, i] = u.useState([]);
|
|
1754
|
+
return u.useEffect(() => {
|
|
1755
|
+
let o = !1;
|
|
1756
|
+
return Pn(e, t, n).then(
|
|
1757
|
+
(l) => {
|
|
1758
|
+
o || i(l);
|
|
1759
|
+
}
|
|
1760
|
+
), () => {
|
|
1761
|
+
o = !0;
|
|
1762
|
+
};
|
|
1763
|
+
}, [e, t, n]), a;
|
|
1764
|
+
}
|
|
1765
|
+
function Fn({
|
|
1766
|
+
page: e,
|
|
1767
|
+
matches: t,
|
|
1768
|
+
...n
|
|
1769
|
+
}) {
|
|
1770
|
+
let a = q(), { future: i } = Ee(), { basename: o } = Ye(), l = u.useMemo(() => {
|
|
1771
|
+
if (e === a.pathname + a.search + a.hash)
|
|
1772
|
+
return [];
|
|
1773
|
+
let c = Bt(
|
|
1774
|
+
e,
|
|
1775
|
+
o,
|
|
1776
|
+
i.v8_trailingSlashAwareDataRequests,
|
|
1777
|
+
"rsc"
|
|
1778
|
+
), s = !1, m = [];
|
|
1779
|
+
for (let f of t)
|
|
1780
|
+
typeof f.route.shouldRevalidate == "function" ? s = !0 : m.push(f.route.id);
|
|
1781
|
+
return s && m.length > 0 && c.searchParams.set("_routes", m.join(",")), [c.pathname + c.search];
|
|
1782
|
+
}, [
|
|
1783
|
+
o,
|
|
1784
|
+
i.v8_trailingSlashAwareDataRequests,
|
|
1785
|
+
e,
|
|
1786
|
+
a,
|
|
1787
|
+
t
|
|
1788
|
+
]);
|
|
1789
|
+
return /* @__PURE__ */ u.createElement(u.Fragment, null, l.map((c) => /* @__PURE__ */ u.createElement("link", { key: c, rel: "prefetch", as: "fetch", href: c, ...n })));
|
|
1790
|
+
}
|
|
1791
|
+
function Nn({
|
|
1792
|
+
page: e,
|
|
1793
|
+
matches: t,
|
|
1794
|
+
...n
|
|
1795
|
+
}) {
|
|
1796
|
+
let a = q(), { future: i, manifest: o, routeModules: l } = Ee(), { basename: c } = Ye(), { loaderData: s, matches: m } = Ln(), f = u.useMemo(
|
|
1797
|
+
() => Et(
|
|
1798
|
+
e,
|
|
1799
|
+
t,
|
|
1800
|
+
m,
|
|
1801
|
+
o,
|
|
1802
|
+
a,
|
|
1803
|
+
"data"
|
|
1804
|
+
),
|
|
1805
|
+
[e, t, m, o, a]
|
|
1806
|
+
), h = u.useMemo(
|
|
1807
|
+
() => Et(
|
|
1808
|
+
e,
|
|
1809
|
+
t,
|
|
1810
|
+
m,
|
|
1811
|
+
o,
|
|
1812
|
+
a,
|
|
1813
|
+
"assets"
|
|
1814
|
+
),
|
|
1815
|
+
[e, t, m, o, a]
|
|
1816
|
+
), v = u.useMemo(() => {
|
|
1817
|
+
if (e === a.pathname + a.search + a.hash)
|
|
1818
|
+
return [];
|
|
1819
|
+
let E = /* @__PURE__ */ new Set(), g = !1;
|
|
1820
|
+
if (t.forEach((R) => {
|
|
1821
|
+
var $;
|
|
1822
|
+
let _ = o.routes[R.route.id];
|
|
1823
|
+
!_ || !_.hasLoader || (!f.some((j) => j.route.id === R.route.id) && R.route.id in s && (($ = l[R.route.id]) != null && $.shouldRevalidate) || _.hasClientLoader ? g = !0 : E.add(R.route.id));
|
|
1824
|
+
}), E.size === 0)
|
|
1825
|
+
return [];
|
|
1826
|
+
let w = Bt(
|
|
1827
|
+
e,
|
|
1828
|
+
c,
|
|
1829
|
+
i.v8_trailingSlashAwareDataRequests,
|
|
1830
|
+
"data"
|
|
1831
|
+
);
|
|
1832
|
+
return g && E.size > 0 && w.searchParams.set(
|
|
1833
|
+
"_routes",
|
|
1834
|
+
t.filter((R) => E.has(R.route.id)).map((R) => R.route.id).join(",")
|
|
1835
|
+
), [w.pathname + w.search];
|
|
1836
|
+
}, [
|
|
1837
|
+
c,
|
|
1838
|
+
i.v8_trailingSlashAwareDataRequests,
|
|
1839
|
+
s,
|
|
1840
|
+
a,
|
|
1841
|
+
o,
|
|
1842
|
+
f,
|
|
1843
|
+
t,
|
|
1844
|
+
e,
|
|
1845
|
+
l
|
|
1846
|
+
]), y = u.useMemo(
|
|
1847
|
+
() => _n(h, o),
|
|
1848
|
+
[h, o]
|
|
1849
|
+
), b = Dn(h);
|
|
1850
|
+
return /* @__PURE__ */ u.createElement(u.Fragment, null, v.map((E) => /* @__PURE__ */ u.createElement("link", { key: E, rel: "prefetch", as: "fetch", href: E, ...n })), y.map((E) => /* @__PURE__ */ u.createElement("link", { key: E, rel: "modulepreload", href: E, ...n })), b.map(({ key: E, link: g }) => (
|
|
1851
|
+
// these don't spread `linkProps` because they are full link descriptors
|
|
1852
|
+
// already with their own props
|
|
1853
|
+
/* @__PURE__ */ u.createElement(
|
|
1854
|
+
"link",
|
|
1855
|
+
{
|
|
1856
|
+
key: E,
|
|
1857
|
+
nonce: n.nonce,
|
|
1858
|
+
...g,
|
|
1859
|
+
crossOrigin: g.crossOrigin ?? n.crossOrigin
|
|
1860
|
+
}
|
|
1861
|
+
)
|
|
1862
|
+
)));
|
|
1863
|
+
}
|
|
1864
|
+
function In(...e) {
|
|
1865
|
+
return (t) => {
|
|
1866
|
+
e.forEach((n) => {
|
|
1867
|
+
typeof n == "function" ? n(t) : n != null && (n.current = t);
|
|
1868
|
+
});
|
|
1869
|
+
};
|
|
1870
|
+
}
|
|
1871
|
+
var An = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1872
|
+
try {
|
|
1873
|
+
An && (window.__reactRouterVersion = // @ts-expect-error
|
|
1874
|
+
"7.18.0");
|
|
1875
|
+
} catch {
|
|
1876
|
+
}
|
|
1877
|
+
var Ut = u.forwardRef(
|
|
1878
|
+
function({
|
|
1879
|
+
onClick: t,
|
|
1880
|
+
discover: n = "render",
|
|
1881
|
+
prefetch: a = "none",
|
|
1882
|
+
relative: i,
|
|
1883
|
+
reloadDocument: o,
|
|
1884
|
+
replace: l,
|
|
1885
|
+
mask: c,
|
|
1886
|
+
state: s,
|
|
1887
|
+
target: m,
|
|
1888
|
+
to: f,
|
|
1889
|
+
preventScrollReset: h,
|
|
1890
|
+
viewTransition: v,
|
|
1891
|
+
defaultShouldRevalidate: y,
|
|
1892
|
+
...b
|
|
1893
|
+
}, E) {
|
|
1894
|
+
let { basename: g, navigator: w, useTransitions: R } = u.useContext(U), _ = typeof f == "string" && Ie.test(f), $ = $t(f, g);
|
|
1895
|
+
f = $.to;
|
|
1896
|
+
let j = Qr(f, { relative: i }), A = q(), H = null;
|
|
1897
|
+
if (c) {
|
|
1898
|
+
let N = Me(
|
|
1899
|
+
c,
|
|
1900
|
+
[],
|
|
1901
|
+
A.mask ? A.mask.pathname : "/",
|
|
1902
|
+
!0
|
|
1903
|
+
);
|
|
1904
|
+
g !== "/" && (N.pathname = N.pathname === "/" ? g : B([g, N.pathname])), H = w.createHref(N);
|
|
1905
|
+
}
|
|
1906
|
+
let [z, K, re] = $n(
|
|
1907
|
+
a,
|
|
1908
|
+
b
|
|
1909
|
+
), we = Bn(f, {
|
|
1910
|
+
replace: l,
|
|
1911
|
+
mask: c,
|
|
1912
|
+
state: s,
|
|
1913
|
+
target: m,
|
|
1914
|
+
preventScrollReset: h,
|
|
1915
|
+
relative: i,
|
|
1916
|
+
viewTransition: v,
|
|
1917
|
+
defaultShouldRevalidate: y,
|
|
1918
|
+
useTransitions: R
|
|
1919
|
+
});
|
|
1920
|
+
function se(N) {
|
|
1921
|
+
t && t(N), N.defaultPrevented || we(N);
|
|
1922
|
+
}
|
|
1923
|
+
let W = !($.isExternal || o), V = (
|
|
1924
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1925
|
+
/* @__PURE__ */ u.createElement(
|
|
1926
|
+
"a",
|
|
1927
|
+
{
|
|
1928
|
+
...b,
|
|
1929
|
+
...re,
|
|
1930
|
+
href: (W ? H : void 0) || $.absoluteURL || j,
|
|
1931
|
+
onClick: W ? se : t,
|
|
1932
|
+
ref: In(E, K),
|
|
1933
|
+
target: m,
|
|
1934
|
+
"data-discover": !_ && n === "render" ? "true" : void 0
|
|
1935
|
+
}
|
|
1936
|
+
)
|
|
1937
|
+
);
|
|
1938
|
+
return z && !_ ? /* @__PURE__ */ u.createElement(u.Fragment, null, V, /* @__PURE__ */ u.createElement(On, { page: j })) : V;
|
|
1939
|
+
}
|
|
1940
|
+
);
|
|
1941
|
+
Ut.displayName = "Link";
|
|
1942
|
+
var Ne = u.forwardRef(
|
|
1943
|
+
function({
|
|
1944
|
+
"aria-current": t = "page",
|
|
1945
|
+
caseSensitive: n = !1,
|
|
1946
|
+
className: a = "",
|
|
1947
|
+
end: i = !1,
|
|
1948
|
+
style: o,
|
|
1949
|
+
to: l,
|
|
1950
|
+
viewTransition: c,
|
|
1951
|
+
children: s,
|
|
1952
|
+
...m
|
|
1953
|
+
}, f) {
|
|
1954
|
+
let h = le(l, { relative: m.relative }), v = q(), y = u.useContext(xe), { navigator: b, basename: E } = u.useContext(U), g = y != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1955
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1956
|
+
Jn(h) && c === !0, w = b.encodeLocation ? b.encodeLocation(h).pathname : h.pathname, R = v.pathname, _ = y && y.navigation && y.navigation.location ? y.navigation.location.pathname : null;
|
|
1957
|
+
n || (R = R.toLowerCase(), _ = _ ? _.toLowerCase() : null, w = w.toLowerCase()), _ && E && (_ = G(_, E) || _);
|
|
1958
|
+
const $ = w !== "/" && w.endsWith("/") ? w.length - 1 : w.length;
|
|
1959
|
+
let j = R === w || !i && R.startsWith(w) && R.charAt($) === "/", A = _ != null && (_ === w || !i && _.startsWith(w) && _.charAt(w.length) === "/"), H = {
|
|
1960
|
+
isActive: j,
|
|
1961
|
+
isPending: A,
|
|
1962
|
+
isTransitioning: g
|
|
1963
|
+
}, z = j ? t : void 0, K;
|
|
1964
|
+
typeof a == "function" ? K = a(H) : K = [
|
|
1965
|
+
a,
|
|
1966
|
+
j ? "active" : null,
|
|
1967
|
+
A ? "pending" : null,
|
|
1968
|
+
g ? "transitioning" : null
|
|
1969
|
+
].filter(Boolean).join(" ");
|
|
1970
|
+
let re = typeof o == "function" ? o(H) : o;
|
|
1971
|
+
return /* @__PURE__ */ u.createElement(
|
|
1972
|
+
Ut,
|
|
1973
|
+
{
|
|
1974
|
+
...m,
|
|
1975
|
+
"aria-current": z,
|
|
1976
|
+
className: K,
|
|
1977
|
+
ref: f,
|
|
1978
|
+
style: re,
|
|
1979
|
+
to: l,
|
|
1980
|
+
viewTransition: c
|
|
1981
|
+
},
|
|
1982
|
+
typeof s == "function" ? s(H) : s
|
|
1983
|
+
);
|
|
1984
|
+
}
|
|
1985
|
+
);
|
|
1986
|
+
Ne.displayName = "NavLink";
|
|
1987
|
+
var Mn = u.forwardRef(
|
|
1988
|
+
({
|
|
1989
|
+
discover: e = "render",
|
|
1990
|
+
fetcherKey: t,
|
|
1991
|
+
navigate: n,
|
|
1992
|
+
reloadDocument: a,
|
|
1993
|
+
replace: i,
|
|
1994
|
+
state: o,
|
|
1995
|
+
method: l = pe,
|
|
1996
|
+
action: c,
|
|
1997
|
+
onSubmit: s,
|
|
1998
|
+
relative: m,
|
|
1999
|
+
preventScrollReset: f,
|
|
2000
|
+
viewTransition: h,
|
|
2001
|
+
defaultShouldRevalidate: v,
|
|
2002
|
+
...y
|
|
2003
|
+
}, b) => {
|
|
2004
|
+
let { useTransitions: E } = u.useContext(U), g = Vn(), w = Yn(c, { relative: m }), R = l.toLowerCase() === "get" ? "get" : "post", _ = typeof c == "string" && Ie.test(c), $ = (j) => {
|
|
2005
|
+
if (s && s(j), j.defaultPrevented) return;
|
|
2006
|
+
j.preventDefault();
|
|
2007
|
+
let A = j.nativeEvent.submitter, H = (A == null ? void 0 : A.getAttribute("formmethod")) || l, z = () => g(A || j.currentTarget, {
|
|
2008
|
+
fetcherKey: t,
|
|
2009
|
+
method: H,
|
|
2010
|
+
navigate: n,
|
|
2011
|
+
replace: i,
|
|
2012
|
+
state: o,
|
|
2013
|
+
relative: m,
|
|
2014
|
+
preventScrollReset: f,
|
|
2015
|
+
viewTransition: h,
|
|
2016
|
+
defaultShouldRevalidate: v
|
|
2017
|
+
});
|
|
2018
|
+
E && n !== !1 ? u.startTransition(() => z()) : z();
|
|
2019
|
+
};
|
|
2020
|
+
return /* @__PURE__ */ u.createElement(
|
|
2021
|
+
"form",
|
|
2022
|
+
{
|
|
2023
|
+
ref: b,
|
|
2024
|
+
method: R,
|
|
2025
|
+
action: w,
|
|
2026
|
+
onSubmit: a ? s : $,
|
|
2027
|
+
...y,
|
|
2028
|
+
"data-discover": !_ && e === "render" ? "true" : void 0
|
|
2029
|
+
}
|
|
2030
|
+
);
|
|
2031
|
+
}
|
|
2032
|
+
);
|
|
2033
|
+
Mn.displayName = "Form";
|
|
2034
|
+
function Wn(e) {
|
|
2035
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
2036
|
+
}
|
|
2037
|
+
function Ht(e) {
|
|
2038
|
+
let t = u.useContext(te);
|
|
2039
|
+
return D(t, Wn(e)), t;
|
|
2040
|
+
}
|
|
2041
|
+
function Bn(e, {
|
|
2042
|
+
target: t,
|
|
2043
|
+
replace: n,
|
|
2044
|
+
mask: a,
|
|
2045
|
+
state: i,
|
|
2046
|
+
preventScrollReset: o,
|
|
2047
|
+
relative: l,
|
|
2048
|
+
viewTransition: c,
|
|
2049
|
+
defaultShouldRevalidate: s,
|
|
2050
|
+
useTransitions: m
|
|
2051
|
+
} = {}) {
|
|
2052
|
+
let f = en(), h = q(), v = le(e, { relative: l });
|
|
2053
|
+
return u.useCallback(
|
|
2054
|
+
(y) => {
|
|
2055
|
+
if (Rn(y, t)) {
|
|
2056
|
+
y.preventDefault();
|
|
2057
|
+
let b = n !== void 0 ? n : Fe(h) === Fe(v), E = () => f(e, {
|
|
2058
|
+
replace: b,
|
|
2059
|
+
mask: a,
|
|
2060
|
+
state: i,
|
|
2061
|
+
preventScrollReset: o,
|
|
2062
|
+
relative: l,
|
|
2063
|
+
viewTransition: c,
|
|
2064
|
+
defaultShouldRevalidate: s
|
|
2065
|
+
});
|
|
2066
|
+
m ? u.startTransition(() => E()) : E();
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
[
|
|
2070
|
+
h,
|
|
2071
|
+
f,
|
|
2072
|
+
v,
|
|
2073
|
+
n,
|
|
2074
|
+
a,
|
|
2075
|
+
i,
|
|
2076
|
+
t,
|
|
2077
|
+
e,
|
|
2078
|
+
o,
|
|
2079
|
+
l,
|
|
2080
|
+
c,
|
|
2081
|
+
s,
|
|
2082
|
+
m
|
|
2083
|
+
]
|
|
2084
|
+
);
|
|
2085
|
+
}
|
|
2086
|
+
var Un = 0, Hn = () => `__${String(++Un)}__`;
|
|
2087
|
+
function Vn() {
|
|
2088
|
+
let { router: e } = Ht(
|
|
2089
|
+
"useSubmit"
|
|
2090
|
+
/* UseSubmit */
|
|
2091
|
+
), { basename: t } = u.useContext(U), n = dn(), a = e.fetch, i = e.navigate;
|
|
2092
|
+
return u.useCallback(
|
|
2093
|
+
async (o, l = {}) => {
|
|
2094
|
+
let { action: c, method: s, encType: m, formData: f, body: h } = wn(
|
|
2095
|
+
o,
|
|
2096
|
+
t
|
|
2097
|
+
);
|
|
2098
|
+
if (l.navigate === !1) {
|
|
2099
|
+
let v = l.fetcherKey || Hn();
|
|
2100
|
+
await a(v, n, l.action || c, {
|
|
2101
|
+
defaultShouldRevalidate: l.defaultShouldRevalidate,
|
|
2102
|
+
preventScrollReset: l.preventScrollReset,
|
|
2103
|
+
formData: f,
|
|
2104
|
+
body: h,
|
|
2105
|
+
formMethod: l.method || s,
|
|
2106
|
+
formEncType: l.encType || m,
|
|
2107
|
+
flushSync: l.flushSync
|
|
2108
|
+
});
|
|
2109
|
+
} else
|
|
2110
|
+
await i(l.action || c, {
|
|
2111
|
+
defaultShouldRevalidate: l.defaultShouldRevalidate,
|
|
2112
|
+
preventScrollReset: l.preventScrollReset,
|
|
2113
|
+
formData: f,
|
|
2114
|
+
body: h,
|
|
2115
|
+
formMethod: l.method || s,
|
|
2116
|
+
formEncType: l.encType || m,
|
|
2117
|
+
replace: l.replace,
|
|
2118
|
+
state: l.state,
|
|
2119
|
+
fromRouteId: n,
|
|
2120
|
+
flushSync: l.flushSync,
|
|
2121
|
+
viewTransition: l.viewTransition
|
|
2122
|
+
});
|
|
2123
|
+
},
|
|
2124
|
+
[a, i, t, n]
|
|
2125
|
+
);
|
|
2126
|
+
}
|
|
2127
|
+
function Yn(e, { relative: t } = {}) {
|
|
2128
|
+
let { basename: n } = u.useContext(U), a = u.useContext(J);
|
|
2129
|
+
D(a, "useFormAction must be used inside a RouteContext");
|
|
2130
|
+
let [i] = a.matches.slice(-1), o = { ...le(e || ".", { relative: t }) }, l = q();
|
|
2131
|
+
if (e == null) {
|
|
2132
|
+
o.search = l.search;
|
|
2133
|
+
let c = new URLSearchParams(o.search), s = c.getAll("index");
|
|
2134
|
+
if (s.some((f) => f === "")) {
|
|
2135
|
+
c.delete("index"), s.filter((h) => h).forEach((h) => c.append("index", h));
|
|
2136
|
+
let f = c.toString();
|
|
2137
|
+
o.search = f ? `?${f}` : "";
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
return (!e || e === ".") && i.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (o.pathname = o.pathname === "/" ? n : B([n, o.pathname])), Fe(o);
|
|
2141
|
+
}
|
|
2142
|
+
function Jn(e, { relative: t } = {}) {
|
|
2143
|
+
let n = u.useContext(Ft);
|
|
2144
|
+
D(
|
|
2145
|
+
n != null,
|
|
2146
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
2147
|
+
);
|
|
2148
|
+
let { basename: a } = Ht(
|
|
2149
|
+
"useViewTransitionState"
|
|
2150
|
+
/* useViewTransitionState */
|
|
2151
|
+
), i = le(e, { relative: t });
|
|
2152
|
+
if (!n.isTransitioning)
|
|
2153
|
+
return !1;
|
|
2154
|
+
let o = G(n.currentLocation.pathname, a) || n.currentLocation.pathname, l = G(n.nextLocation.pathname, a) || n.nextLocation.pathname;
|
|
2155
|
+
return ge(i.pathname, l) != null || ge(i.pathname, o) != null;
|
|
2156
|
+
}
|
|
2157
|
+
const Z = (...e) => e.filter(Boolean).join(" "), qn = () => /* @__PURE__ */ P.jsx("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: /* @__PURE__ */ P.jsx(
|
|
2158
|
+
"path",
|
|
2159
|
+
{
|
|
2160
|
+
d: "M2 4h14M2 9h14M2 14h14",
|
|
2161
|
+
stroke: "currentColor",
|
|
2162
|
+
strokeWidth: "1.5",
|
|
2163
|
+
strokeLinecap: "round"
|
|
2164
|
+
}
|
|
2165
|
+
) });
|
|
2166
|
+
function zn(e, t) {
|
|
2167
|
+
return e ? {
|
|
2168
|
+
activeBg: `bg-${e}/20`,
|
|
2169
|
+
hoverBg: `hover:bg-${e}/10`,
|
|
2170
|
+
textClass: `text-${e}`,
|
|
2171
|
+
hoverTextClass: `hover:text-${e}`,
|
|
2172
|
+
borderColor: t ?? "#4ade80"
|
|
2173
|
+
} : {
|
|
2174
|
+
activeBg: "bg-green-500/20",
|
|
2175
|
+
hoverBg: "hover:bg-green-500/10",
|
|
2176
|
+
textClass: "text-green-400",
|
|
2177
|
+
hoverTextClass: "hover:text-green-400",
|
|
2178
|
+
borderColor: t ?? "#4ade80"
|
|
2179
|
+
};
|
|
2180
|
+
}
|
|
2181
|
+
function Gn({
|
|
2182
|
+
open: e,
|
|
2183
|
+
onToggle: t,
|
|
2184
|
+
navConfig: n,
|
|
2185
|
+
logo: a,
|
|
2186
|
+
cta: i,
|
|
2187
|
+
user: o,
|
|
2188
|
+
footerLinks: l = [],
|
|
2189
|
+
bgColor: c = "bg-[#1a1f2e]"
|
|
2190
|
+
}) {
|
|
2191
|
+
return /* @__PURE__ */ P.jsxs(
|
|
2192
|
+
"aside",
|
|
2193
|
+
{
|
|
2194
|
+
className: Z(
|
|
2195
|
+
"h-screen flex flex-col transition-all duration-300 ease-in-out flex-shrink-0",
|
|
2196
|
+
c,
|
|
2197
|
+
e ? "w-64" : "w-16"
|
|
2198
|
+
),
|
|
2199
|
+
children: [
|
|
2200
|
+
/* @__PURE__ */ P.jsxs(
|
|
2201
|
+
"div",
|
|
2202
|
+
{
|
|
2203
|
+
className: Z(
|
|
2204
|
+
"flex items-center gap-3 py-4 border-b border-white/10 min-h-[64px]",
|
|
2205
|
+
e ? "px-3" : "px-0 justify-center"
|
|
2206
|
+
),
|
|
2207
|
+
children: [
|
|
2208
|
+
/* @__PURE__ */ P.jsx(
|
|
2209
|
+
"div",
|
|
2210
|
+
{
|
|
2211
|
+
className: "w-8 h-8 flex-shrink-0 cursor-pointer",
|
|
2212
|
+
onClick: t,
|
|
2213
|
+
title: e ? "Collapse sidebar" : "Expand sidebar",
|
|
2214
|
+
children: (a == null ? void 0 : a.icon) ?? /* @__PURE__ */ P.jsx("div", { className: "w-8 h-8 bg-green-500 rounded-full flex items-center justify-center text-white text-xs font-bold", children: "A" })
|
|
2215
|
+
}
|
|
2216
|
+
),
|
|
2217
|
+
e && /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
|
|
2218
|
+
/* @__PURE__ */ P.jsxs("div", { className: "overflow-hidden flex-1", children: [
|
|
2219
|
+
(a == null ? void 0 : a.name) && /* @__PURE__ */ P.jsx("div", { className: "text-white font-bold text-sm truncate", children: a.name }),
|
|
2220
|
+
(a == null ? void 0 : a.subLabel) && /* @__PURE__ */ P.jsx("div", { className: "text-gray-400 text-[10px] font-semibold whitespace-nowrap", children: a.subLabel })
|
|
2221
|
+
] }),
|
|
2222
|
+
/* @__PURE__ */ P.jsx(
|
|
2223
|
+
"button",
|
|
2224
|
+
{
|
|
2225
|
+
onClick: t,
|
|
2226
|
+
className: "text-gray-400 hover:text-white flex-shrink-0",
|
|
2227
|
+
title: "Collapse sidebar",
|
|
2228
|
+
children: /* @__PURE__ */ P.jsx(qn, {})
|
|
2229
|
+
}
|
|
2230
|
+
)
|
|
2231
|
+
] })
|
|
2232
|
+
]
|
|
2233
|
+
}
|
|
2234
|
+
),
|
|
2235
|
+
i && /* @__PURE__ */ P.jsx("div", { className: "px-3 py-4", children: /* @__PURE__ */ P.jsxs(
|
|
2236
|
+
Ne,
|
|
2237
|
+
{
|
|
2238
|
+
to: i.to,
|
|
2239
|
+
className: Z(
|
|
2240
|
+
"w-full text-white rounded-md flex items-center gap-2 transition-colors font-medium text-sm",
|
|
2241
|
+
i.color ?? "bg-[#059669] hover:bg-green-600",
|
|
2242
|
+
e ? "px-3 py-2 justify-start" : "p-2 justify-center"
|
|
2243
|
+
),
|
|
2244
|
+
title: e ? void 0 : i.label,
|
|
2245
|
+
children: [
|
|
2246
|
+
/* @__PURE__ */ P.jsx("span", { className: "flex-shrink-0", children: i.icon }),
|
|
2247
|
+
e && /* @__PURE__ */ P.jsx("span", { children: i.label })
|
|
2248
|
+
]
|
|
2249
|
+
}
|
|
2250
|
+
) }),
|
|
2251
|
+
/* @__PURE__ */ P.jsx("nav", { className: "flex-1 overflow-y-auto px-2 space-y-1", children: n.map(({ section: s, color: m, rawColor: f, items: h }) => {
|
|
2252
|
+
const { activeBg: v, hoverBg: y, textClass: b, hoverTextClass: E, borderColor: g } = zn(m, f);
|
|
2253
|
+
return /* @__PURE__ */ P.jsxs("div", { className: "mb-4", children: [
|
|
2254
|
+
e ? /* @__PURE__ */ P.jsx("p", { className: "text-gray-500 text-[10px] font-semibold uppercase tracking-widest px-2 mb-1", children: s }) : /* @__PURE__ */ P.jsx("div", { className: "border-t border-white/10 my-2" }),
|
|
2255
|
+
h.map(({ label: w, icon: R, to: _ }) => /* @__PURE__ */ P.jsxs(
|
|
2256
|
+
Ne,
|
|
2257
|
+
{
|
|
2258
|
+
to: _,
|
|
2259
|
+
title: e ? void 0 : w,
|
|
2260
|
+
className: ({ isActive: $ }) => Z(
|
|
2261
|
+
// base
|
|
2262
|
+
"group w-full flex items-center gap-3 rounded-md px-2 py-2 text-sm transition-all duration-200 mb-0.5",
|
|
2263
|
+
// always reserve 2px on the left for the border — prevents layout shift
|
|
2264
|
+
"border-l-2",
|
|
2265
|
+
$ ? `${v} ${b}` : `text-[#DAE2FD] ${y} ${E}`,
|
|
2266
|
+
!e && "justify-center"
|
|
2267
|
+
),
|
|
2268
|
+
style: ({ isActive: $ }) => ({
|
|
2269
|
+
borderColor: $ ? g : "transparent"
|
|
2270
|
+
}),
|
|
2271
|
+
onMouseEnter: ($) => {
|
|
2272
|
+
const j = $.currentTarget;
|
|
2273
|
+
j.getAttribute("aria-current") !== "page" && (j.style.borderColor = g);
|
|
2274
|
+
},
|
|
2275
|
+
onMouseLeave: ($) => {
|
|
2276
|
+
const j = $.currentTarget;
|
|
2277
|
+
j.getAttribute("aria-current") !== "page" && (j.style.borderColor = "transparent");
|
|
2278
|
+
},
|
|
2279
|
+
children: [
|
|
2280
|
+
/* @__PURE__ */ P.jsx("span", { className: "flex-shrink-0", children: R }),
|
|
2281
|
+
e && /* @__PURE__ */ P.jsx("span", { children: w })
|
|
2282
|
+
]
|
|
2283
|
+
},
|
|
2284
|
+
w
|
|
2285
|
+
))
|
|
2286
|
+
] }, s);
|
|
2287
|
+
}) }),
|
|
2288
|
+
/* @__PURE__ */ P.jsxs("div", { className: "border-t border-white/10 px-2 py-3 space-y-0.5", children: [
|
|
2289
|
+
l.map(({ label: s, icon: m, onClick: f }) => /* @__PURE__ */ P.jsxs(
|
|
2290
|
+
"button",
|
|
2291
|
+
{
|
|
2292
|
+
onClick: f,
|
|
2293
|
+
title: e ? void 0 : s,
|
|
2294
|
+
className: Z(
|
|
2295
|
+
"w-full flex items-center gap-3 rounded-md px-2 py-2 text-sm text-gray-400 hover:bg-white/5 hover:text-white",
|
|
2296
|
+
!e && "justify-center"
|
|
2297
|
+
),
|
|
2298
|
+
children: [
|
|
2299
|
+
/* @__PURE__ */ P.jsx("span", { className: "flex-shrink-0", children: m }),
|
|
2300
|
+
e && /* @__PURE__ */ P.jsx("span", { children: s })
|
|
2301
|
+
]
|
|
2302
|
+
},
|
|
2303
|
+
s
|
|
2304
|
+
)),
|
|
2305
|
+
o && /* @__PURE__ */ P.jsxs(
|
|
2306
|
+
"div",
|
|
2307
|
+
{
|
|
2308
|
+
className: Z(
|
|
2309
|
+
"flex items-center gap-3 px-2 py-2",
|
|
2310
|
+
!e && "justify-center"
|
|
2311
|
+
),
|
|
2312
|
+
children: [
|
|
2313
|
+
/* @__PURE__ */ P.jsx(
|
|
2314
|
+
"div",
|
|
2315
|
+
{
|
|
2316
|
+
className: Z(
|
|
2317
|
+
"w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-bold flex-shrink-0",
|
|
2318
|
+
o.avatarColor ?? "bg-green-600"
|
|
2319
|
+
),
|
|
2320
|
+
children: o.initials
|
|
2321
|
+
}
|
|
2322
|
+
),
|
|
2323
|
+
e && /* @__PURE__ */ P.jsxs("div", { className: "overflow-hidden", children: [
|
|
2324
|
+
/* @__PURE__ */ P.jsx("div", { className: "text-white text-sm font-medium truncate", children: o.name }),
|
|
2325
|
+
o.role && /* @__PURE__ */ P.jsx("div", { className: "text-gray-400 text-xs truncate", children: o.role })
|
|
2326
|
+
] })
|
|
2327
|
+
]
|
|
2328
|
+
}
|
|
2329
|
+
)
|
|
2330
|
+
] })
|
|
2331
|
+
]
|
|
2332
|
+
}
|
|
2333
|
+
);
|
|
2334
|
+
}
|
|
2335
|
+
export {
|
|
2336
|
+
Gn as Sidebar
|
|
2337
|
+
};
|