@raspberrypifoundation/design-system-react 2.2.0-beta.3 → 2.2.0-beta.4
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as q, jsx as C, Fragment as Me } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as f from "react";
|
|
3
3
|
import Tt from "react";
|
|
4
4
|
function st(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -58,25 +58,25 @@ var Je;
|
|
|
58
58
|
function _t() {
|
|
59
59
|
if (Je) return M;
|
|
60
60
|
Je = 1;
|
|
61
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110,
|
|
61
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, R = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
|
|
62
62
|
function S(g) {
|
|
63
63
|
if (typeof g == "object" && g !== null) {
|
|
64
64
|
var U = g.$$typeof;
|
|
65
65
|
switch (U) {
|
|
66
66
|
case t:
|
|
67
67
|
switch (g = g.type, g) {
|
|
68
|
-
case u:
|
|
69
68
|
case c:
|
|
69
|
+
case u:
|
|
70
70
|
case i:
|
|
71
71
|
case a:
|
|
72
72
|
case n:
|
|
73
|
-
case
|
|
73
|
+
case p:
|
|
74
74
|
return g;
|
|
75
75
|
default:
|
|
76
76
|
switch (g = g && g.$$typeof, g) {
|
|
77
77
|
case o:
|
|
78
|
-
case
|
|
79
|
-
case
|
|
78
|
+
case d:
|
|
79
|
+
case y:
|
|
80
80
|
case v:
|
|
81
81
|
case l:
|
|
82
82
|
return g;
|
|
@@ -90,10 +90,10 @@ function _t() {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
function N(g) {
|
|
93
|
-
return S(g) ===
|
|
93
|
+
return S(g) === u;
|
|
94
94
|
}
|
|
95
|
-
return M.AsyncMode =
|
|
96
|
-
return N(g) || S(g) ===
|
|
95
|
+
return M.AsyncMode = c, M.ConcurrentMode = u, M.ContextConsumer = o, M.ContextProvider = l, M.Element = t, M.ForwardRef = d, M.Fragment = i, M.Lazy = y, M.Memo = v, M.Portal = r, M.Profiler = a, M.StrictMode = n, M.Suspense = p, M.isAsyncMode = function(g) {
|
|
96
|
+
return N(g) || S(g) === c;
|
|
97
97
|
}, M.isConcurrentMode = N, M.isContextConsumer = function(g) {
|
|
98
98
|
return S(g) === o;
|
|
99
99
|
}, M.isContextProvider = function(g) {
|
|
@@ -101,11 +101,11 @@ function _t() {
|
|
|
101
101
|
}, M.isElement = function(g) {
|
|
102
102
|
return typeof g == "object" && g !== null && g.$$typeof === t;
|
|
103
103
|
}, M.isForwardRef = function(g) {
|
|
104
|
-
return S(g) ===
|
|
104
|
+
return S(g) === d;
|
|
105
105
|
}, M.isFragment = function(g) {
|
|
106
106
|
return S(g) === i;
|
|
107
107
|
}, M.isLazy = function(g) {
|
|
108
|
-
return S(g) ===
|
|
108
|
+
return S(g) === y;
|
|
109
109
|
}, M.isMemo = function(g) {
|
|
110
110
|
return S(g) === v;
|
|
111
111
|
}, M.isPortal = function(g) {
|
|
@@ -115,9 +115,9 @@ function _t() {
|
|
|
115
115
|
}, M.isStrictMode = function(g) {
|
|
116
116
|
return S(g) === n;
|
|
117
117
|
}, M.isSuspense = function(g) {
|
|
118
|
-
return S(g) ===
|
|
118
|
+
return S(g) === p;
|
|
119
119
|
}, M.isValidElementType = function(g) {
|
|
120
|
-
return typeof g == "string" || typeof g == "function" || g === i || g ===
|
|
120
|
+
return typeof g == "string" || typeof g == "function" || g === i || g === u || g === a || g === n || g === p || g === h || typeof g == "object" && g !== null && (g.$$typeof === y || g.$$typeof === v || g.$$typeof === l || g.$$typeof === o || g.$$typeof === d || g.$$typeof === R || g.$$typeof === b || g.$$typeof === T || g.$$typeof === x);
|
|
121
121
|
}, M.typeOf = S, M;
|
|
122
122
|
}
|
|
123
123
|
var j = {};
|
|
@@ -132,10 +132,10 @@ var j = {};
|
|
|
132
132
|
var Ke;
|
|
133
133
|
function Ot() {
|
|
134
134
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
135
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110,
|
|
135
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, n = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, R = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, T = e ? Symbol.for("react.scope") : 60119;
|
|
136
136
|
function S(E) {
|
|
137
137
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
138
|
-
E === i || E ===
|
|
138
|
+
E === i || E === u || E === a || E === n || E === p || E === h || typeof E == "object" && E !== null && (E.$$typeof === y || E.$$typeof === v || E.$$typeof === l || E.$$typeof === o || E.$$typeof === d || E.$$typeof === R || E.$$typeof === b || E.$$typeof === T || E.$$typeof === x);
|
|
139
139
|
}
|
|
140
140
|
function N(E) {
|
|
141
141
|
if (typeof E == "object" && E !== null) {
|
|
@@ -144,19 +144,19 @@ function Ot() {
|
|
|
144
144
|
case t:
|
|
145
145
|
var ce = E.type;
|
|
146
146
|
switch (ce) {
|
|
147
|
-
case u:
|
|
148
147
|
case c:
|
|
148
|
+
case u:
|
|
149
149
|
case i:
|
|
150
150
|
case a:
|
|
151
151
|
case n:
|
|
152
|
-
case
|
|
152
|
+
case p:
|
|
153
153
|
return ce;
|
|
154
154
|
default:
|
|
155
155
|
var He = ce && ce.$$typeof;
|
|
156
156
|
switch (He) {
|
|
157
157
|
case o:
|
|
158
|
-
case
|
|
159
|
-
case
|
|
158
|
+
case d:
|
|
159
|
+
case y:
|
|
160
160
|
case v:
|
|
161
161
|
case l:
|
|
162
162
|
return He;
|
|
@@ -169,12 +169,12 @@ function Ot() {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var g =
|
|
172
|
+
var g = c, U = u, Y = o, V = l, F = t, H = d, ee = i, we = y, xe = v, ae = r, Re = a, J = n, te = p, ue = !1;
|
|
173
173
|
function Ce(E) {
|
|
174
|
-
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
174
|
+
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(E) || N(E) === c;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
return N(E) ===
|
|
176
|
+
function m(E) {
|
|
177
|
+
return N(E) === u;
|
|
178
178
|
}
|
|
179
179
|
function w(E) {
|
|
180
180
|
return N(E) === o;
|
|
@@ -186,13 +186,13 @@ function Ot() {
|
|
|
186
186
|
return typeof E == "object" && E !== null && E.$$typeof === t;
|
|
187
187
|
}
|
|
188
188
|
function P(E) {
|
|
189
|
-
return N(E) ===
|
|
189
|
+
return N(E) === d;
|
|
190
190
|
}
|
|
191
191
|
function I(E) {
|
|
192
192
|
return N(E) === i;
|
|
193
193
|
}
|
|
194
194
|
function _(E) {
|
|
195
|
-
return N(E) ===
|
|
195
|
+
return N(E) === y;
|
|
196
196
|
}
|
|
197
197
|
function k(E) {
|
|
198
198
|
return N(E) === v;
|
|
@@ -207,9 +207,9 @@ function Ot() {
|
|
|
207
207
|
return N(E) === n;
|
|
208
208
|
}
|
|
209
209
|
function z(E) {
|
|
210
|
-
return N(E) ===
|
|
210
|
+
return N(E) === p;
|
|
211
211
|
}
|
|
212
|
-
j.AsyncMode = g, j.ConcurrentMode = U, j.ContextConsumer = Y, j.ContextProvider = V, j.Element = F, j.ForwardRef = H, j.Fragment = ee, j.Lazy = we, j.Memo = xe, j.Portal = ae, j.Profiler = Re, j.StrictMode = J, j.Suspense = te, j.isAsyncMode = Ce, j.isConcurrentMode =
|
|
212
|
+
j.AsyncMode = g, j.ConcurrentMode = U, j.ContextConsumer = Y, j.ContextProvider = V, j.Element = F, j.ForwardRef = H, j.Fragment = ee, j.Lazy = we, j.Memo = xe, j.Portal = ae, j.Profiler = Re, j.StrictMode = J, j.Suspense = te, j.isAsyncMode = Ce, j.isConcurrentMode = m, j.isContextConsumer = w, j.isContextProvider = $, j.isElement = O, j.isForwardRef = P, j.isFragment = I, j.isLazy = _, j.isMemo = k, j.isPortal = A, j.isProfiler = D, j.isStrictMode = L, j.isSuspense = z, j.isValidElementType = S, j.typeOf = N;
|
|
213
213
|
}()), j;
|
|
214
214
|
}
|
|
215
215
|
var Ge;
|
|
@@ -240,31 +240,31 @@ function kt() {
|
|
|
240
240
|
return !1;
|
|
241
241
|
for (var l = {}, o = 0; o < 10; o++)
|
|
242
242
|
l["_" + String.fromCharCode(o)] = o;
|
|
243
|
-
var
|
|
244
|
-
return l[
|
|
243
|
+
var c = Object.getOwnPropertyNames(l).map(function(d) {
|
|
244
|
+
return l[d];
|
|
245
245
|
});
|
|
246
|
-
if (
|
|
246
|
+
if (c.join("") !== "0123456789")
|
|
247
247
|
return !1;
|
|
248
|
-
var
|
|
249
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
250
|
-
|
|
251
|
-
}), Object.keys(Object.assign({},
|
|
248
|
+
var u = {};
|
|
249
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
250
|
+
u[d] = d;
|
|
251
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
252
252
|
} catch {
|
|
253
253
|
return !1;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
return Se = n() ? Object.assign : function(a, l) {
|
|
257
|
-
for (var o,
|
|
258
|
-
o = Object(arguments[
|
|
259
|
-
for (var
|
|
260
|
-
t.call(o,
|
|
257
|
+
for (var o, c = i(a), u, d = 1; d < arguments.length; d++) {
|
|
258
|
+
o = Object(arguments[d]);
|
|
259
|
+
for (var p in o)
|
|
260
|
+
t.call(o, p) && (c[p] = o[p]);
|
|
261
261
|
if (e) {
|
|
262
|
-
|
|
263
|
-
for (var
|
|
264
|
-
r.call(o,
|
|
262
|
+
u = e(o);
|
|
263
|
+
for (var h = 0; h < u.length; h++)
|
|
264
|
+
r.call(o, u[h]) && (c[u[h]] = o[u[h]]);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
return
|
|
267
|
+
return c;
|
|
268
268
|
}, Se;
|
|
269
269
|
}
|
|
270
270
|
var Pe, Ze;
|
|
@@ -295,29 +295,29 @@ function $t() {
|
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
function n(a, l, o,
|
|
298
|
+
function n(a, l, o, c, u) {
|
|
299
299
|
if (process.env.NODE_ENV !== "production") {
|
|
300
|
-
for (var
|
|
301
|
-
if (i(a,
|
|
302
|
-
var
|
|
300
|
+
for (var d in a)
|
|
301
|
+
if (i(a, d)) {
|
|
302
|
+
var p;
|
|
303
303
|
try {
|
|
304
|
-
if (typeof a[
|
|
305
|
-
var
|
|
306
|
-
(
|
|
304
|
+
if (typeof a[d] != "function") {
|
|
305
|
+
var h = Error(
|
|
306
|
+
(c || "React class") + ": " + o + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
307
307
|
);
|
|
308
|
-
throw
|
|
308
|
+
throw h.name = "Invariant Violation", h;
|
|
309
309
|
}
|
|
310
|
-
|
|
311
|
-
} catch (
|
|
312
|
-
|
|
310
|
+
p = a[d](l, d, c, o, null, t);
|
|
311
|
+
} catch (y) {
|
|
312
|
+
p = y;
|
|
313
313
|
}
|
|
314
|
-
if (
|
|
315
|
-
(
|
|
316
|
-
),
|
|
317
|
-
r[
|
|
318
|
-
var v =
|
|
314
|
+
if (p && !(p instanceof Error) && e(
|
|
315
|
+
(c || "React class") + ": type specification of " + o + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
316
|
+
), p instanceof Error && !(p.message in r)) {
|
|
317
|
+
r[p.message] = !0;
|
|
318
|
+
var v = u ? u() : "";
|
|
319
319
|
e(
|
|
320
|
-
"Failed " + o + " type: " +
|
|
320
|
+
"Failed " + o + " type: " + p.message + (v ?? "")
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
323
|
}
|
|
@@ -334,24 +334,24 @@ function Nt() {
|
|
|
334
334
|
var e = ut(), t = kt(), r = /* @__PURE__ */ je(), i = /* @__PURE__ */ ct(), n = /* @__PURE__ */ $t(), a = function() {
|
|
335
335
|
};
|
|
336
336
|
process.env.NODE_ENV !== "production" && (a = function(o) {
|
|
337
|
-
var
|
|
338
|
-
typeof console < "u" && console.error(
|
|
337
|
+
var c = "Warning: " + o;
|
|
338
|
+
typeof console < "u" && console.error(c);
|
|
339
339
|
try {
|
|
340
|
-
throw new Error(
|
|
340
|
+
throw new Error(c);
|
|
341
341
|
} catch {
|
|
342
342
|
}
|
|
343
343
|
});
|
|
344
344
|
function l() {
|
|
345
345
|
return null;
|
|
346
346
|
}
|
|
347
|
-
return ke = function(o,
|
|
348
|
-
var
|
|
349
|
-
function
|
|
350
|
-
var w =
|
|
347
|
+
return ke = function(o, c) {
|
|
348
|
+
var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
349
|
+
function p(m) {
|
|
350
|
+
var w = m && (u && m[u] || m[d]);
|
|
351
351
|
if (typeof w == "function")
|
|
352
352
|
return w;
|
|
353
353
|
}
|
|
354
|
-
var
|
|
354
|
+
var h = "<<anonymous>>", v = {
|
|
355
355
|
array: b("array"),
|
|
356
356
|
bigint: b("bigint"),
|
|
357
357
|
bool: b("boolean"),
|
|
@@ -372,19 +372,19 @@ function Nt() {
|
|
|
372
372
|
shape: we,
|
|
373
373
|
exact: xe
|
|
374
374
|
};
|
|
375
|
-
function m
|
|
376
|
-
return
|
|
375
|
+
function y(m, w) {
|
|
376
|
+
return m === w ? m !== 0 || 1 / m === 1 / w : m !== m && w !== w;
|
|
377
377
|
}
|
|
378
|
-
function x(
|
|
379
|
-
this.message =
|
|
378
|
+
function x(m, w) {
|
|
379
|
+
this.message = m, this.data = w && typeof w == "object" ? w : {}, this.stack = "";
|
|
380
380
|
}
|
|
381
381
|
x.prototype = Error.prototype;
|
|
382
|
-
function R(
|
|
382
|
+
function R(m) {
|
|
383
383
|
if (process.env.NODE_ENV !== "production")
|
|
384
384
|
var w = {}, $ = 0;
|
|
385
385
|
function O(I, _, k, A, D, L, z) {
|
|
386
|
-
if (A = A ||
|
|
387
|
-
if (
|
|
386
|
+
if (A = A || h, L = L || k, z !== r) {
|
|
387
|
+
if (c) {
|
|
388
388
|
var E = new Error(
|
|
389
389
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
390
390
|
);
|
|
@@ -397,19 +397,19 @@ function Nt() {
|
|
|
397
397
|
), w[K] = !0, $++);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
|
-
return _[k] == null ? I ? _[k] === null ? new x("The " + D + " `" + L + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new x("The " + D + " `" + L + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null :
|
|
400
|
+
return _[k] == null ? I ? _[k] === null ? new x("The " + D + " `" + L + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new x("The " + D + " `" + L + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : m(_, k, A, D, L);
|
|
401
401
|
}
|
|
402
402
|
var P = O.bind(null, !1);
|
|
403
403
|
return P.isRequired = O.bind(null, !0), P;
|
|
404
404
|
}
|
|
405
|
-
function b(
|
|
405
|
+
function b(m) {
|
|
406
406
|
function w($, O, P, I, _, k) {
|
|
407
407
|
var A = $[O], D = J(A);
|
|
408
|
-
if (D !==
|
|
408
|
+
if (D !== m) {
|
|
409
409
|
var L = te(A);
|
|
410
410
|
return new x(
|
|
411
|
-
"Invalid " + I + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + P + "`, expected ") + ("`" +
|
|
412
|
-
{ expectedType:
|
|
411
|
+
"Invalid " + I + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + P + "`, expected ") + ("`" + m + "`."),
|
|
412
|
+
{ expectedType: m }
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
return null;
|
|
@@ -419,9 +419,9 @@ function Nt() {
|
|
|
419
419
|
function T() {
|
|
420
420
|
return R(l);
|
|
421
421
|
}
|
|
422
|
-
function S(
|
|
422
|
+
function S(m) {
|
|
423
423
|
function w($, O, P, I, _) {
|
|
424
|
-
if (typeof
|
|
424
|
+
if (typeof m != "function")
|
|
425
425
|
return new x("Property `" + _ + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
426
426
|
var k = $[O];
|
|
427
427
|
if (!Array.isArray(k)) {
|
|
@@ -429,7 +429,7 @@ function Nt() {
|
|
|
429
429
|
return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an array."));
|
|
430
430
|
}
|
|
431
431
|
for (var D = 0; D < k.length; D++) {
|
|
432
|
-
var L =
|
|
432
|
+
var L = m(k, D, P, I, _ + "[" + D + "]", r);
|
|
433
433
|
if (L instanceof Error)
|
|
434
434
|
return L;
|
|
435
435
|
}
|
|
@@ -438,7 +438,7 @@ function Nt() {
|
|
|
438
438
|
return R(w);
|
|
439
439
|
}
|
|
440
440
|
function N() {
|
|
441
|
-
function
|
|
441
|
+
function m(w, $, O, P, I) {
|
|
442
442
|
var _ = w[$];
|
|
443
443
|
if (!o(_)) {
|
|
444
444
|
var k = J(_);
|
|
@@ -446,10 +446,10 @@ function Nt() {
|
|
|
446
446
|
}
|
|
447
447
|
return null;
|
|
448
448
|
}
|
|
449
|
-
return R(
|
|
449
|
+
return R(m);
|
|
450
450
|
}
|
|
451
451
|
function g() {
|
|
452
|
-
function
|
|
452
|
+
function m(w, $, O, P, I) {
|
|
453
453
|
var _ = w[$];
|
|
454
454
|
if (!e.isValidElementType(_)) {
|
|
455
455
|
var k = J(_);
|
|
@@ -457,28 +457,28 @@ function Nt() {
|
|
|
457
457
|
}
|
|
458
458
|
return null;
|
|
459
459
|
}
|
|
460
|
-
return R(
|
|
460
|
+
return R(m);
|
|
461
461
|
}
|
|
462
|
-
function U(
|
|
462
|
+
function U(m) {
|
|
463
463
|
function w($, O, P, I, _) {
|
|
464
|
-
if (!($[O] instanceof
|
|
465
|
-
var k =
|
|
464
|
+
if (!($[O] instanceof m)) {
|
|
465
|
+
var k = m.name || h, A = Ce($[O]);
|
|
466
466
|
return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("instance of `" + k + "`."));
|
|
467
467
|
}
|
|
468
468
|
return null;
|
|
469
469
|
}
|
|
470
470
|
return R(w);
|
|
471
471
|
}
|
|
472
|
-
function Y(
|
|
473
|
-
if (!Array.isArray(
|
|
472
|
+
function Y(m) {
|
|
473
|
+
if (!Array.isArray(m))
|
|
474
474
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
475
475
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
476
476
|
) : a("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
477
477
|
function w($, O, P, I, _) {
|
|
478
|
-
for (var k = $[O], A = 0; A <
|
|
479
|
-
if (
|
|
478
|
+
for (var k = $[O], A = 0; A < m.length; A++)
|
|
479
|
+
if (y(k, m[A]))
|
|
480
480
|
return null;
|
|
481
|
-
var D = JSON.stringify(
|
|
481
|
+
var D = JSON.stringify(m, function(z, E) {
|
|
482
482
|
var K = te(E);
|
|
483
483
|
return K === "symbol" ? String(E) : E;
|
|
484
484
|
});
|
|
@@ -486,16 +486,16 @@ function Nt() {
|
|
|
486
486
|
}
|
|
487
487
|
return R(w);
|
|
488
488
|
}
|
|
489
|
-
function V(
|
|
489
|
+
function V(m) {
|
|
490
490
|
function w($, O, P, I, _) {
|
|
491
|
-
if (typeof
|
|
491
|
+
if (typeof m != "function")
|
|
492
492
|
return new x("Property `" + _ + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
493
493
|
var k = $[O], A = J(k);
|
|
494
494
|
if (A !== "object")
|
|
495
495
|
return new x("Invalid " + I + " `" + _ + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected an object."));
|
|
496
496
|
for (var D in k)
|
|
497
497
|
if (i(k, D)) {
|
|
498
|
-
var L =
|
|
498
|
+
var L = m(k, D, P, I, _ + "." + D, r);
|
|
499
499
|
if (L instanceof Error)
|
|
500
500
|
return L;
|
|
501
501
|
}
|
|
@@ -503,19 +503,19 @@ function Nt() {
|
|
|
503
503
|
}
|
|
504
504
|
return R(w);
|
|
505
505
|
}
|
|
506
|
-
function F(
|
|
507
|
-
if (!Array.isArray(
|
|
506
|
+
function F(m) {
|
|
507
|
+
if (!Array.isArray(m))
|
|
508
508
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
509
|
-
for (var w = 0; w <
|
|
510
|
-
var $ =
|
|
509
|
+
for (var w = 0; w < m.length; w++) {
|
|
510
|
+
var $ = m[w];
|
|
511
511
|
if (typeof $ != "function")
|
|
512
512
|
return a(
|
|
513
513
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue($) + " at index " + w + "."
|
|
514
514
|
), l;
|
|
515
515
|
}
|
|
516
516
|
function O(P, I, _, k, A) {
|
|
517
|
-
for (var D = [], L = 0; L <
|
|
518
|
-
var z =
|
|
517
|
+
for (var D = [], L = 0; L < m.length; L++) {
|
|
518
|
+
var z = m[L], E = z(P, I, _, k, A, r);
|
|
519
519
|
if (E == null)
|
|
520
520
|
return null;
|
|
521
521
|
E.data && i(E.data, "expectedType") && D.push(E.data.expectedType);
|
|
@@ -526,23 +526,23 @@ function Nt() {
|
|
|
526
526
|
return R(O);
|
|
527
527
|
}
|
|
528
528
|
function H() {
|
|
529
|
-
function
|
|
529
|
+
function m(w, $, O, P, I) {
|
|
530
530
|
return ae(w[$]) ? null : new x("Invalid " + P + " `" + I + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
|
|
531
531
|
}
|
|
532
|
-
return R(
|
|
532
|
+
return R(m);
|
|
533
533
|
}
|
|
534
|
-
function ee(
|
|
534
|
+
function ee(m, w, $, O, P) {
|
|
535
535
|
return new x(
|
|
536
|
-
(
|
|
536
|
+
(m || "React class") + ": " + w + " type `" + $ + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
537
537
|
);
|
|
538
538
|
}
|
|
539
|
-
function we(
|
|
539
|
+
function we(m) {
|
|
540
540
|
function w($, O, P, I, _) {
|
|
541
541
|
var k = $[O], A = J(k);
|
|
542
542
|
if (A !== "object")
|
|
543
543
|
return new x("Invalid " + I + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
544
|
-
for (var D in
|
|
545
|
-
var L =
|
|
544
|
+
for (var D in m) {
|
|
545
|
+
var L = m[D];
|
|
546
546
|
if (typeof L != "function")
|
|
547
547
|
return ee(P, I, _, D, te(L));
|
|
548
548
|
var z = L(k, D, P, I, _ + "." + D, r);
|
|
@@ -553,20 +553,20 @@ function Nt() {
|
|
|
553
553
|
}
|
|
554
554
|
return R(w);
|
|
555
555
|
}
|
|
556
|
-
function xe(
|
|
556
|
+
function xe(m) {
|
|
557
557
|
function w($, O, P, I, _) {
|
|
558
558
|
var k = $[O], A = J(k);
|
|
559
559
|
if (A !== "object")
|
|
560
560
|
return new x("Invalid " + I + " `" + _ + "` of type `" + A + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
561
|
-
var D = t({}, $[O],
|
|
561
|
+
var D = t({}, $[O], m);
|
|
562
562
|
for (var L in D) {
|
|
563
|
-
var z =
|
|
564
|
-
if (i(
|
|
563
|
+
var z = m[L];
|
|
564
|
+
if (i(m, L) && typeof z != "function")
|
|
565
565
|
return ee(P, I, _, L, te(z));
|
|
566
566
|
if (!z)
|
|
567
567
|
return new x(
|
|
568
568
|
"Invalid " + I + " `" + _ + "` key `" + L + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify($[O], null, " ") + `
|
|
569
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
569
|
+
Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
570
570
|
);
|
|
571
571
|
var E = z(k, L, P, I, _ + "." + L, r);
|
|
572
572
|
if (E)
|
|
@@ -576,23 +576,23 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
576
576
|
}
|
|
577
577
|
return R(w);
|
|
578
578
|
}
|
|
579
|
-
function ae(
|
|
580
|
-
switch (typeof
|
|
579
|
+
function ae(m) {
|
|
580
|
+
switch (typeof m) {
|
|
581
581
|
case "number":
|
|
582
582
|
case "string":
|
|
583
583
|
case "undefined":
|
|
584
584
|
return !0;
|
|
585
585
|
case "boolean":
|
|
586
|
-
return !
|
|
586
|
+
return !m;
|
|
587
587
|
case "object":
|
|
588
|
-
if (Array.isArray(
|
|
589
|
-
return
|
|
590
|
-
if (
|
|
588
|
+
if (Array.isArray(m))
|
|
589
|
+
return m.every(ae);
|
|
590
|
+
if (m === null || o(m))
|
|
591
591
|
return !0;
|
|
592
|
-
var w =
|
|
592
|
+
var w = p(m);
|
|
593
593
|
if (w) {
|
|
594
|
-
var $ = w.call(
|
|
595
|
-
if (w !==
|
|
594
|
+
var $ = w.call(m), O;
|
|
595
|
+
if (w !== m.entries) {
|
|
596
596
|
for (; !(O = $.next()).done; )
|
|
597
597
|
if (!ae(O.value))
|
|
598
598
|
return !1;
|
|
@@ -609,27 +609,27 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
609
609
|
return !1;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function Re(
|
|
613
|
-
return
|
|
612
|
+
function Re(m, w) {
|
|
613
|
+
return m === "symbol" ? !0 : w ? w["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && w instanceof Symbol : !1;
|
|
614
614
|
}
|
|
615
|
-
function J(
|
|
616
|
-
var w = typeof
|
|
617
|
-
return Array.isArray(
|
|
615
|
+
function J(m) {
|
|
616
|
+
var w = typeof m;
|
|
617
|
+
return Array.isArray(m) ? "array" : m instanceof RegExp ? "object" : Re(w, m) ? "symbol" : w;
|
|
618
618
|
}
|
|
619
|
-
function te(
|
|
620
|
-
if (typeof
|
|
621
|
-
return "" +
|
|
622
|
-
var w = J(
|
|
619
|
+
function te(m) {
|
|
620
|
+
if (typeof m > "u" || m === null)
|
|
621
|
+
return "" + m;
|
|
622
|
+
var w = J(m);
|
|
623
623
|
if (w === "object") {
|
|
624
|
-
if (
|
|
624
|
+
if (m instanceof Date)
|
|
625
625
|
return "date";
|
|
626
|
-
if (
|
|
626
|
+
if (m instanceof RegExp)
|
|
627
627
|
return "regexp";
|
|
628
628
|
}
|
|
629
629
|
return w;
|
|
630
630
|
}
|
|
631
|
-
function ue(
|
|
632
|
-
var w = te(
|
|
631
|
+
function ue(m) {
|
|
632
|
+
var w = te(m);
|
|
633
633
|
switch (w) {
|
|
634
634
|
case "array":
|
|
635
635
|
case "object":
|
|
@@ -642,8 +642,8 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
642
642
|
return w;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
function Ce(
|
|
646
|
-
return !
|
|
645
|
+
function Ce(m) {
|
|
646
|
+
return !m.constructor || !m.constructor.name ? h : m.constructor.name;
|
|
647
647
|
}
|
|
648
648
|
return v.checkPropTypes = n, v.resetWarningCache = n.resetWarningCache, v.PropTypes = v, v;
|
|
649
649
|
}, ke;
|
|
@@ -658,12 +658,12 @@ function It() {
|
|
|
658
658
|
function r() {
|
|
659
659
|
}
|
|
660
660
|
return r.resetWarningCache = t, $e = function() {
|
|
661
|
-
function i(l, o,
|
|
662
|
-
if (
|
|
663
|
-
var
|
|
661
|
+
function i(l, o, c, u, d, p) {
|
|
662
|
+
if (p !== e) {
|
|
663
|
+
var h = new Error(
|
|
664
664
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
665
665
|
);
|
|
666
|
-
throw
|
|
666
|
+
throw h.name = "Invariant Violation", h;
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
i.isRequired = i;
|
|
@@ -726,85 +726,85 @@ Mt.propTypes = {
|
|
|
726
726
|
var oe = {}, at;
|
|
727
727
|
function jt() {
|
|
728
728
|
if (at) return oe;
|
|
729
|
-
at = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.parse = l, oe.serialize =
|
|
729
|
+
at = 1, Object.defineProperty(oe, "__esModule", { value: !0 }), oe.parse = l, oe.serialize = u;
|
|
730
730
|
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, i = /^[\u0020-\u003A\u003D-\u007E]*$/, n = Object.prototype.toString, a = /* @__PURE__ */ (() => {
|
|
731
|
-
const
|
|
731
|
+
const h = function() {
|
|
732
732
|
};
|
|
733
|
-
return
|
|
733
|
+
return h.prototype = /* @__PURE__ */ Object.create(null), h;
|
|
734
734
|
})();
|
|
735
|
-
function l(
|
|
736
|
-
const
|
|
735
|
+
function l(h, v) {
|
|
736
|
+
const y = new a(), x = h.length;
|
|
737
737
|
if (x < 2)
|
|
738
|
-
return
|
|
739
|
-
const R =
|
|
738
|
+
return y;
|
|
739
|
+
const R = v?.decode || d;
|
|
740
740
|
let b = 0;
|
|
741
741
|
do {
|
|
742
|
-
const T =
|
|
742
|
+
const T = h.indexOf("=", b);
|
|
743
743
|
if (T === -1)
|
|
744
744
|
break;
|
|
745
|
-
const S =
|
|
745
|
+
const S = h.indexOf(";", b), N = S === -1 ? x : S;
|
|
746
746
|
if (T > N) {
|
|
747
|
-
b =
|
|
747
|
+
b = h.lastIndexOf(";", T - 1) + 1;
|
|
748
748
|
continue;
|
|
749
749
|
}
|
|
750
|
-
const g = o(
|
|
751
|
-
if (
|
|
752
|
-
let V = o(
|
|
753
|
-
const H = R(
|
|
754
|
-
|
|
750
|
+
const g = o(h, b, T), U = c(h, T, g), Y = h.slice(g, U);
|
|
751
|
+
if (y[Y] === void 0) {
|
|
752
|
+
let V = o(h, T + 1, N), F = c(h, N, V);
|
|
753
|
+
const H = R(h.slice(V, F));
|
|
754
|
+
y[Y] = H;
|
|
755
755
|
}
|
|
756
756
|
b = N + 1;
|
|
757
757
|
} while (b < x);
|
|
758
|
-
return
|
|
758
|
+
return y;
|
|
759
759
|
}
|
|
760
|
-
function o(
|
|
760
|
+
function o(h, v, y) {
|
|
761
761
|
do {
|
|
762
|
-
const x =
|
|
762
|
+
const x = h.charCodeAt(v);
|
|
763
763
|
if (x !== 32 && x !== 9)
|
|
764
764
|
return v;
|
|
765
|
-
} while (++v <
|
|
766
|
-
return
|
|
765
|
+
} while (++v < y);
|
|
766
|
+
return y;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
769
|
-
for (; v >
|
|
770
|
-
const x =
|
|
768
|
+
function c(h, v, y) {
|
|
769
|
+
for (; v > y; ) {
|
|
770
|
+
const x = h.charCodeAt(--v);
|
|
771
771
|
if (x !== 32 && x !== 9)
|
|
772
772
|
return v + 1;
|
|
773
773
|
}
|
|
774
|
-
return
|
|
774
|
+
return y;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
777
|
-
const x =
|
|
778
|
-
if (!e.test(
|
|
779
|
-
throw new TypeError(`argument name is invalid: ${
|
|
776
|
+
function u(h, v, y) {
|
|
777
|
+
const x = y?.encode || encodeURIComponent;
|
|
778
|
+
if (!e.test(h))
|
|
779
|
+
throw new TypeError(`argument name is invalid: ${h}`);
|
|
780
780
|
const R = x(v);
|
|
781
781
|
if (!t.test(R))
|
|
782
782
|
throw new TypeError(`argument val is invalid: ${v}`);
|
|
783
|
-
let b =
|
|
784
|
-
if (!
|
|
783
|
+
let b = h + "=" + R;
|
|
784
|
+
if (!y)
|
|
785
785
|
return b;
|
|
786
|
-
if (
|
|
787
|
-
if (!Number.isInteger(
|
|
788
|
-
throw new TypeError(`option maxAge is invalid: ${
|
|
789
|
-
b += "; Max-Age=" +
|
|
790
|
-
}
|
|
791
|
-
if (
|
|
792
|
-
if (!r.test(
|
|
793
|
-
throw new TypeError(`option domain is invalid: ${
|
|
794
|
-
b += "; Domain=" +
|
|
795
|
-
}
|
|
796
|
-
if (
|
|
797
|
-
if (!i.test(
|
|
798
|
-
throw new TypeError(`option path is invalid: ${
|
|
799
|
-
b += "; Path=" +
|
|
800
|
-
}
|
|
801
|
-
if (
|
|
802
|
-
if (!
|
|
803
|
-
throw new TypeError(`option expires is invalid: ${
|
|
804
|
-
b += "; Expires=" +
|
|
805
|
-
}
|
|
806
|
-
if (
|
|
807
|
-
switch (typeof
|
|
786
|
+
if (y.maxAge !== void 0) {
|
|
787
|
+
if (!Number.isInteger(y.maxAge))
|
|
788
|
+
throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);
|
|
789
|
+
b += "; Max-Age=" + y.maxAge;
|
|
790
|
+
}
|
|
791
|
+
if (y.domain) {
|
|
792
|
+
if (!r.test(y.domain))
|
|
793
|
+
throw new TypeError(`option domain is invalid: ${y.domain}`);
|
|
794
|
+
b += "; Domain=" + y.domain;
|
|
795
|
+
}
|
|
796
|
+
if (y.path) {
|
|
797
|
+
if (!i.test(y.path))
|
|
798
|
+
throw new TypeError(`option path is invalid: ${y.path}`);
|
|
799
|
+
b += "; Path=" + y.path;
|
|
800
|
+
}
|
|
801
|
+
if (y.expires) {
|
|
802
|
+
if (!p(y.expires) || !Number.isFinite(y.expires.valueOf()))
|
|
803
|
+
throw new TypeError(`option expires is invalid: ${y.expires}`);
|
|
804
|
+
b += "; Expires=" + y.expires.toUTCString();
|
|
805
|
+
}
|
|
806
|
+
if (y.httpOnly && (b += "; HttpOnly"), y.secure && (b += "; Secure"), y.partitioned && (b += "; Partitioned"), y.priority)
|
|
807
|
+
switch (typeof y.priority == "string" ? y.priority.toLowerCase() : void 0) {
|
|
808
808
|
case "low":
|
|
809
809
|
b += "; Priority=Low";
|
|
810
810
|
break;
|
|
@@ -815,10 +815,10 @@ function jt() {
|
|
|
815
815
|
b += "; Priority=High";
|
|
816
816
|
break;
|
|
817
817
|
default:
|
|
818
|
-
throw new TypeError(`option priority is invalid: ${
|
|
818
|
+
throw new TypeError(`option priority is invalid: ${y.priority}`);
|
|
819
819
|
}
|
|
820
|
-
if (
|
|
821
|
-
switch (typeof
|
|
820
|
+
if (y.sameSite)
|
|
821
|
+
switch (typeof y.sameSite == "string" ? y.sameSite.toLowerCase() : y.sameSite) {
|
|
822
822
|
case !0:
|
|
823
823
|
case "strict":
|
|
824
824
|
b += "; SameSite=Strict";
|
|
@@ -830,21 +830,21 @@ function jt() {
|
|
|
830
830
|
b += "; SameSite=None";
|
|
831
831
|
break;
|
|
832
832
|
default:
|
|
833
|
-
throw new TypeError(`option sameSite is invalid: ${
|
|
833
|
+
throw new TypeError(`option sameSite is invalid: ${y.sameSite}`);
|
|
834
834
|
}
|
|
835
835
|
return b;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
if (
|
|
839
|
-
return
|
|
837
|
+
function d(h) {
|
|
838
|
+
if (h.indexOf("%") === -1)
|
|
839
|
+
return h;
|
|
840
840
|
try {
|
|
841
|
-
return decodeURIComponent(
|
|
841
|
+
return decodeURIComponent(h);
|
|
842
842
|
} catch {
|
|
843
|
-
return
|
|
843
|
+
return h;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
function h
|
|
847
|
-
return n.call(
|
|
846
|
+
function p(h) {
|
|
847
|
+
return n.call(h) === "[object Date]";
|
|
848
848
|
}
|
|
849
849
|
return oe;
|
|
850
850
|
}
|
|
@@ -899,11 +899,11 @@ function Dt(e, t, r, i) {
|
|
|
899
899
|
let l = dt(e);
|
|
900
900
|
qt(l);
|
|
901
901
|
let o = null;
|
|
902
|
-
for (let
|
|
903
|
-
let
|
|
902
|
+
for (let c = 0; o == null && c < l.length; ++c) {
|
|
903
|
+
let u = Gt(a);
|
|
904
904
|
o = Jt(
|
|
905
|
-
l[
|
|
906
|
-
|
|
905
|
+
l[c],
|
|
906
|
+
u,
|
|
907
907
|
i
|
|
908
908
|
);
|
|
909
909
|
}
|
|
@@ -911,35 +911,34 @@ function Dt(e, t, r, i) {
|
|
|
911
911
|
}
|
|
912
912
|
function dt(e, t = [], r = [], i = "") {
|
|
913
913
|
let n = (a, l, o) => {
|
|
914
|
-
let
|
|
914
|
+
let c = {
|
|
915
915
|
relativePath: o === void 0 ? a.path || "" : o,
|
|
916
916
|
caseSensitive: a.caseSensitive === !0,
|
|
917
917
|
childrenIndex: l,
|
|
918
918
|
route: a
|
|
919
919
|
};
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
`Absolute route path "${
|
|
923
|
-
),
|
|
924
|
-
let
|
|
920
|
+
c.relativePath.startsWith("/") && (W(
|
|
921
|
+
c.relativePath.startsWith(i),
|
|
922
|
+
`Absolute route path "${c.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
923
|
+
), c.relativePath = c.relativePath.slice(i.length));
|
|
924
|
+
let u = G([i, c.relativePath]), d = r.concat(c);
|
|
925
925
|
a.children && a.children.length > 0 && (W(
|
|
926
926
|
// Our types know better, but runtime JS may not!
|
|
927
927
|
// @ts-expect-error
|
|
928
928
|
a.index !== !0,
|
|
929
|
-
`Index routes must not have child routes. Please remove all child routes from route path "${
|
|
930
|
-
), dt(a.children, t,
|
|
931
|
-
path:
|
|
932
|
-
score: Ht(
|
|
933
|
-
routesMeta:
|
|
929
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${u}".`
|
|
930
|
+
), dt(a.children, t, d, u)), !(a.path == null && !a.index) && t.push({
|
|
931
|
+
path: u,
|
|
932
|
+
score: Ht(u, a.index),
|
|
933
|
+
routesMeta: d
|
|
934
934
|
});
|
|
935
935
|
};
|
|
936
936
|
return e.forEach((a, l) => {
|
|
937
|
-
|
|
938
|
-
if (a.path === "" || !((o = a.path) != null && o.includes("?")))
|
|
937
|
+
if (a.path === "" || !a.path?.includes("?"))
|
|
939
938
|
n(a, l);
|
|
940
939
|
else
|
|
941
|
-
for (let
|
|
942
|
-
n(a, l,
|
|
940
|
+
for (let o of pt(a.path))
|
|
941
|
+
n(a, l, o);
|
|
943
942
|
}), t;
|
|
944
943
|
}
|
|
945
944
|
function pt(e) {
|
|
@@ -951,10 +950,10 @@ function pt(e) {
|
|
|
951
950
|
let l = pt(i.join("/")), o = [];
|
|
952
951
|
return o.push(
|
|
953
952
|
...l.map(
|
|
954
|
-
(
|
|
953
|
+
(c) => c === "" ? a : [a, c].join("/")
|
|
955
954
|
)
|
|
956
955
|
), n && o.push(...l), o.map(
|
|
957
|
-
(
|
|
956
|
+
(c) => e.startsWith("/") && c === "" ? "/" : c
|
|
958
957
|
);
|
|
959
958
|
}
|
|
960
959
|
function qt(e) {
|
|
@@ -989,28 +988,28 @@ function Vt(e, t) {
|
|
|
989
988
|
function Jt(e, t, r = !1) {
|
|
990
989
|
let { routesMeta: i } = e, n = {}, a = "/", l = [];
|
|
991
990
|
for (let o = 0; o < i.length; ++o) {
|
|
992
|
-
let
|
|
993
|
-
{ path:
|
|
994
|
-
|
|
995
|
-
),
|
|
996
|
-
if (!
|
|
991
|
+
let c = i[o], u = o === i.length - 1, d = a === "/" ? t : t.slice(a.length) || "/", p = ye(
|
|
992
|
+
{ path: c.relativePath, caseSensitive: c.caseSensitive, end: u },
|
|
993
|
+
d
|
|
994
|
+
), h = c.route;
|
|
995
|
+
if (!p && u && r && !i[i.length - 1].route.index && (p = ye(
|
|
997
996
|
{
|
|
998
|
-
path:
|
|
999
|
-
caseSensitive:
|
|
997
|
+
path: c.relativePath,
|
|
998
|
+
caseSensitive: c.caseSensitive,
|
|
1000
999
|
end: !1
|
|
1001
1000
|
},
|
|
1002
|
-
|
|
1003
|
-
)), !
|
|
1001
|
+
d
|
|
1002
|
+
)), !p)
|
|
1004
1003
|
return null;
|
|
1005
|
-
Object.assign(n,
|
|
1004
|
+
Object.assign(n, p.params), l.push({
|
|
1006
1005
|
// TODO: Can this as be avoided?
|
|
1007
1006
|
params: n,
|
|
1008
|
-
pathname: G([a,
|
|
1007
|
+
pathname: G([a, p.pathname]),
|
|
1009
1008
|
pathnameBase: er(
|
|
1010
|
-
G([a,
|
|
1009
|
+
G([a, p.pathnameBase])
|
|
1011
1010
|
),
|
|
1012
|
-
route:
|
|
1013
|
-
}),
|
|
1011
|
+
route: h
|
|
1012
|
+
}), p.pathnameBase !== "/" && (a = G([a, p.pathnameBase]));
|
|
1014
1013
|
}
|
|
1015
1014
|
return l;
|
|
1016
1015
|
}
|
|
@@ -1025,13 +1024,13 @@ function ye(e, t) {
|
|
|
1025
1024
|
let a = n[0], l = a.replace(/(.)\/+$/, "$1"), o = n.slice(1);
|
|
1026
1025
|
return {
|
|
1027
1026
|
params: i.reduce(
|
|
1028
|
-
(
|
|
1029
|
-
if (
|
|
1030
|
-
let
|
|
1031
|
-
l = a.slice(0, a.length -
|
|
1027
|
+
(u, { paramName: d, isOptional: p }, h) => {
|
|
1028
|
+
if (d === "*") {
|
|
1029
|
+
let y = o[h] || "";
|
|
1030
|
+
l = a.slice(0, a.length - y.length).replace(/(.)\/+$/, "$1");
|
|
1032
1031
|
}
|
|
1033
|
-
const v = o[
|
|
1034
|
-
return
|
|
1032
|
+
const v = o[h];
|
|
1033
|
+
return p && !v ? u[d] = void 0 : u[d] = (v || "").replace(/%2F/g, "/"), u;
|
|
1035
1034
|
},
|
|
1036
1035
|
{}
|
|
1037
1036
|
),
|
|
@@ -1047,7 +1046,7 @@ function Kt(e, t = !1, r = !0) {
|
|
|
1047
1046
|
);
|
|
1048
1047
|
let i = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
1049
1048
|
/\/:([\w-]+)(\?)?/g,
|
|
1050
|
-
(l, o,
|
|
1049
|
+
(l, o, c) => (i.push({ paramName: o, isOptional: c != null }), c ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
1051
1050
|
);
|
|
1052
1051
|
return e.endsWith("*") ? (i.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), i];
|
|
1053
1052
|
}
|
|
@@ -1118,17 +1117,17 @@ function mt(e, t, r, i = !1) {
|
|
|
1118
1117
|
if (l == null)
|
|
1119
1118
|
o = r;
|
|
1120
1119
|
else {
|
|
1121
|
-
let
|
|
1120
|
+
let p = t.length - 1;
|
|
1122
1121
|
if (!i && l.startsWith("..")) {
|
|
1123
|
-
let
|
|
1124
|
-
for (;
|
|
1125
|
-
|
|
1126
|
-
n.pathname =
|
|
1122
|
+
let h = l.split("/");
|
|
1123
|
+
for (; h[0] === ".."; )
|
|
1124
|
+
h.shift(), p -= 1;
|
|
1125
|
+
n.pathname = h.join("/");
|
|
1127
1126
|
}
|
|
1128
|
-
o =
|
|
1127
|
+
o = p >= 0 ? t[p] : "/";
|
|
1129
1128
|
}
|
|
1130
|
-
let
|
|
1131
|
-
return !
|
|
1129
|
+
let c = Xt(n, o), u = l && l !== "/" && l.endsWith("/"), d = (a || l === ".") && r.endsWith("/");
|
|
1130
|
+
return !c.pathname.endsWith("/") && (u || d) && (c.pathname += "/"), c;
|
|
1132
1131
|
}
|
|
1133
1132
|
var G = (e) => e.join("/").replace(/\/\/+/g, "/"), er = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), tr = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, rr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
1134
1133
|
function nr(e) {
|
|
@@ -1148,35 +1147,35 @@ var ar = [
|
|
|
1148
1147
|
...yt
|
|
1149
1148
|
];
|
|
1150
1149
|
new Set(ar);
|
|
1151
|
-
var ie =
|
|
1150
|
+
var ie = f.createContext(null);
|
|
1152
1151
|
ie.displayName = "DataRouter";
|
|
1153
|
-
var ve =
|
|
1152
|
+
var ve = f.createContext(null);
|
|
1154
1153
|
ve.displayName = "DataRouterState";
|
|
1155
|
-
var vt =
|
|
1154
|
+
var vt = f.createContext({
|
|
1156
1155
|
isTransitioning: !1
|
|
1157
1156
|
});
|
|
1158
1157
|
vt.displayName = "ViewTransition";
|
|
1159
|
-
var ir =
|
|
1158
|
+
var ir = f.createContext(
|
|
1160
1159
|
/* @__PURE__ */ new Map()
|
|
1161
1160
|
);
|
|
1162
1161
|
ir.displayName = "Fetchers";
|
|
1163
|
-
var or =
|
|
1162
|
+
var or = f.createContext(null);
|
|
1164
1163
|
or.displayName = "Await";
|
|
1165
|
-
var Z =
|
|
1164
|
+
var Z = f.createContext(
|
|
1166
1165
|
null
|
|
1167
1166
|
);
|
|
1168
1167
|
Z.displayName = "Navigation";
|
|
1169
|
-
var qe =
|
|
1168
|
+
var qe = f.createContext(
|
|
1170
1169
|
null
|
|
1171
1170
|
);
|
|
1172
1171
|
qe.displayName = "Location";
|
|
1173
|
-
var Q =
|
|
1172
|
+
var Q = f.createContext({
|
|
1174
1173
|
outlet: null,
|
|
1175
1174
|
matches: [],
|
|
1176
1175
|
isDataRoute: !1
|
|
1177
1176
|
});
|
|
1178
1177
|
Q.displayName = "Route";
|
|
1179
|
-
var Fe =
|
|
1178
|
+
var Fe = f.createContext(null);
|
|
1180
1179
|
Fe.displayName = "RouteError";
|
|
1181
1180
|
function lr(e, { relative: t } = {}) {
|
|
1182
1181
|
W(
|
|
@@ -1185,11 +1184,11 @@ function lr(e, { relative: t } = {}) {
|
|
|
1185
1184
|
// router loaded. We can help them understand how to avoid that.
|
|
1186
1185
|
"useHref() may be used only in the context of a <Router> component."
|
|
1187
1186
|
);
|
|
1188
|
-
let { basename: r, navigator: i } =
|
|
1187
|
+
let { basename: r, navigator: i } = f.useContext(Z), { hash: n, pathname: a, search: l } = se(e, { relative: t }), o = a;
|
|
1189
1188
|
return r !== "/" && (o = a === "/" ? r : G([r, a])), i.createHref({ pathname: o, search: l, hash: n });
|
|
1190
1189
|
}
|
|
1191
1190
|
function ge() {
|
|
1192
|
-
return
|
|
1191
|
+
return f.useContext(qe) != null;
|
|
1193
1192
|
}
|
|
1194
1193
|
function ne() {
|
|
1195
1194
|
return W(
|
|
@@ -1197,14 +1196,14 @@ function ne() {
|
|
|
1197
1196
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
1198
1197
|
// router loaded. We can help them understand how to avoid that.
|
|
1199
1198
|
"useLocation() may be used only in the context of a <Router> component."
|
|
1200
|
-
),
|
|
1199
|
+
), f.useContext(qe).location;
|
|
1201
1200
|
}
|
|
1202
1201
|
var gt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
1203
1202
|
function bt(e) {
|
|
1204
|
-
|
|
1203
|
+
f.useContext(Z).static || f.useLayoutEffect(e);
|
|
1205
1204
|
}
|
|
1206
1205
|
function sr() {
|
|
1207
|
-
let { isDataRoute: e } =
|
|
1206
|
+
let { isDataRoute: e } = f.useContext(Q);
|
|
1208
1207
|
return e ? wr() : ur();
|
|
1209
1208
|
}
|
|
1210
1209
|
function ur() {
|
|
@@ -1214,26 +1213,26 @@ function ur() {
|
|
|
1214
1213
|
// router loaded. We can help them understand how to avoid that.
|
|
1215
1214
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
1216
1215
|
);
|
|
1217
|
-
let e =
|
|
1216
|
+
let e = f.useContext(ie), { basename: t, navigator: r } = f.useContext(Z), { matches: i } = f.useContext(Q), { pathname: n } = ne(), a = JSON.stringify(ht(i)), l = f.useRef(!1);
|
|
1218
1217
|
return bt(() => {
|
|
1219
1218
|
l.current = !0;
|
|
1220
|
-
}),
|
|
1221
|
-
(
|
|
1219
|
+
}), f.useCallback(
|
|
1220
|
+
(c, u = {}) => {
|
|
1222
1221
|
if (X(l.current, gt), !l.current) return;
|
|
1223
|
-
if (typeof
|
|
1224
|
-
r.go(
|
|
1222
|
+
if (typeof c == "number") {
|
|
1223
|
+
r.go(c);
|
|
1225
1224
|
return;
|
|
1226
1225
|
}
|
|
1227
|
-
let
|
|
1228
|
-
|
|
1226
|
+
let d = mt(
|
|
1227
|
+
c,
|
|
1229
1228
|
JSON.parse(a),
|
|
1230
1229
|
n,
|
|
1231
|
-
|
|
1230
|
+
u.relative === "path"
|
|
1232
1231
|
);
|
|
1233
|
-
e == null && t !== "/" && (
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1232
|
+
e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : G([t, d.pathname])), (u.replace ? r.replace : r.push)(
|
|
1233
|
+
d,
|
|
1234
|
+
u.state,
|
|
1235
|
+
u
|
|
1237
1236
|
);
|
|
1238
1237
|
},
|
|
1239
1238
|
[
|
|
@@ -1245,10 +1244,10 @@ function ur() {
|
|
|
1245
1244
|
]
|
|
1246
1245
|
);
|
|
1247
1246
|
}
|
|
1248
|
-
|
|
1247
|
+
f.createContext(null);
|
|
1249
1248
|
function se(e, { relative: t } = {}) {
|
|
1250
|
-
let { matches: r } =
|
|
1251
|
-
return
|
|
1249
|
+
let { matches: r } = f.useContext(Q), { pathname: i } = ne(), n = JSON.stringify(ht(r));
|
|
1250
|
+
return f.useMemo(
|
|
1252
1251
|
() => mt(
|
|
1253
1252
|
e,
|
|
1254
1253
|
JSON.parse(n),
|
|
@@ -1265,27 +1264,27 @@ function cr(e, t, r, i) {
|
|
|
1265
1264
|
// router loaded. We can help them understand how to avoid that.
|
|
1266
1265
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
1267
1266
|
);
|
|
1268
|
-
let { navigator: n, static: a } =
|
|
1267
|
+
let { navigator: n, static: a } = f.useContext(Z), { matches: l } = f.useContext(Q), o = l[l.length - 1], c = o ? o.params : {}, u = o ? o.pathname : "/", d = o ? o.pathnameBase : "/", p = o && o.route;
|
|
1269
1268
|
{
|
|
1270
|
-
let T =
|
|
1269
|
+
let T = p && p.path || "";
|
|
1271
1270
|
Et(
|
|
1272
|
-
|
|
1273
|
-
!
|
|
1274
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${
|
|
1271
|
+
u,
|
|
1272
|
+
!p || T.endsWith("*") || T.endsWith("*?"),
|
|
1273
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${T}">) 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.
|
|
1275
1274
|
|
|
1276
1275
|
Please change the parent <Route path="${T}"> to <Route path="${T === "/" ? "*" : `${T}/*`}">.`
|
|
1277
1276
|
);
|
|
1278
1277
|
}
|
|
1279
|
-
let
|
|
1280
|
-
v =
|
|
1281
|
-
let
|
|
1282
|
-
if (
|
|
1283
|
-
let T =
|
|
1284
|
-
x = "/" +
|
|
1278
|
+
let h = ne(), v;
|
|
1279
|
+
v = h;
|
|
1280
|
+
let y = v.pathname || "/", x = y;
|
|
1281
|
+
if (d !== "/") {
|
|
1282
|
+
let T = d.replace(/^\//, "").split("/");
|
|
1283
|
+
x = "/" + y.replace(/^\//, "").split("/").slice(T.length).join("/");
|
|
1285
1284
|
}
|
|
1286
1285
|
let R = !a && r && r.matches && r.matches.length > 0 ? r.matches : ft(e, { pathname: x });
|
|
1287
1286
|
return X(
|
|
1288
|
-
|
|
1287
|
+
p || R != null,
|
|
1289
1288
|
`No routes matched location "${v.pathname}${v.search}${v.hash}" `
|
|
1290
1289
|
), X(
|
|
1291
1290
|
R == null || R[R.length - 1].route.element !== void 0 || R[R.length - 1].route.Component !== void 0 || R[R.length - 1].route.lazy !== void 0,
|
|
@@ -1293,14 +1292,14 @@ Please change the parent <Route path="${T}"> to <Route path="${T === "/" ? "*" :
|
|
|
1293
1292
|
), mr(
|
|
1294
1293
|
R && R.map(
|
|
1295
1294
|
(T) => Object.assign({}, T, {
|
|
1296
|
-
params: Object.assign({},
|
|
1295
|
+
params: Object.assign({}, c, T.params),
|
|
1297
1296
|
pathname: G([
|
|
1298
|
-
|
|
1297
|
+
d,
|
|
1299
1298
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
1300
1299
|
n.encodeLocation ? n.encodeLocation(T.pathname).pathname : T.pathname
|
|
1301
1300
|
]),
|
|
1302
|
-
pathnameBase: T.pathnameBase === "/" ?
|
|
1303
|
-
|
|
1301
|
+
pathnameBase: T.pathnameBase === "/" ? d : G([
|
|
1302
|
+
d,
|
|
1304
1303
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
1305
1304
|
n.encodeLocation ? n.encodeLocation(T.pathnameBase).pathname : T.pathnameBase
|
|
1306
1305
|
])
|
|
@@ -1316,9 +1315,9 @@ function fr() {
|
|
|
1316
1315
|
return console.error(
|
|
1317
1316
|
"Error handled by React Router default ErrorBoundary:",
|
|
1318
1317
|
e
|
|
1319
|
-
), l = /* @__PURE__ */
|
|
1318
|
+
), l = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: a }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: a }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ f.createElement("pre", { style: n }, r) : null, l);
|
|
1320
1319
|
}
|
|
1321
|
-
var dr = /* @__PURE__ */
|
|
1320
|
+
var dr = /* @__PURE__ */ f.createElement(fr, null), pr = class extends f.Component {
|
|
1322
1321
|
constructor(e) {
|
|
1323
1322
|
super(e), this.state = {
|
|
1324
1323
|
location: e.location,
|
|
@@ -1348,7 +1347,7 @@ var dr = /* @__PURE__ */ d.createElement(fr, null), pr = class extends d.Compone
|
|
|
1348
1347
|
);
|
|
1349
1348
|
}
|
|
1350
1349
|
render() {
|
|
1351
|
-
return this.state.error !== void 0 ? /* @__PURE__ */
|
|
1350
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(Q.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
|
|
1352
1351
|
Fe.Provider,
|
|
1353
1352
|
{
|
|
1354
1353
|
value: this.state.error,
|
|
@@ -1358,8 +1357,8 @@ var dr = /* @__PURE__ */ d.createElement(fr, null), pr = class extends d.Compone
|
|
|
1358
1357
|
}
|
|
1359
1358
|
};
|
|
1360
1359
|
function hr({ routeContext: e, match: t, children: r }) {
|
|
1361
|
-
let i =
|
|
1362
|
-
return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */
|
|
1360
|
+
let i = f.useContext(ie);
|
|
1361
|
+
return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ f.createElement(Q.Provider, { value: e }, r);
|
|
1363
1362
|
}
|
|
1364
1363
|
function mr(e, t = [], r = null, i = null) {
|
|
1365
1364
|
if (e == null) {
|
|
@@ -1372,48 +1371,48 @@ function mr(e, t = [], r = null, i = null) {
|
|
|
1372
1371
|
else
|
|
1373
1372
|
return null;
|
|
1374
1373
|
}
|
|
1375
|
-
let n = e, a = r
|
|
1374
|
+
let n = e, a = r?.errors;
|
|
1376
1375
|
if (a != null) {
|
|
1377
|
-
let
|
|
1378
|
-
(
|
|
1376
|
+
let c = n.findIndex(
|
|
1377
|
+
(u) => u.route.id && a?.[u.route.id] !== void 0
|
|
1379
1378
|
);
|
|
1380
1379
|
W(
|
|
1381
|
-
|
|
1380
|
+
c >= 0,
|
|
1382
1381
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
1383
1382
|
a
|
|
1384
1383
|
).join(",")}`
|
|
1385
1384
|
), n = n.slice(
|
|
1386
1385
|
0,
|
|
1387
|
-
Math.min(n.length,
|
|
1386
|
+
Math.min(n.length, c + 1)
|
|
1388
1387
|
);
|
|
1389
1388
|
}
|
|
1390
1389
|
let l = !1, o = -1;
|
|
1391
1390
|
if (r)
|
|
1392
|
-
for (let
|
|
1393
|
-
let
|
|
1394
|
-
if ((
|
|
1395
|
-
let { loaderData:
|
|
1396
|
-
if (
|
|
1391
|
+
for (let c = 0; c < n.length; c++) {
|
|
1392
|
+
let u = n[c];
|
|
1393
|
+
if ((u.route.HydrateFallback || u.route.hydrateFallbackElement) && (o = c), u.route.id) {
|
|
1394
|
+
let { loaderData: d, errors: p } = r, h = u.route.loader && !d.hasOwnProperty(u.route.id) && (!p || p[u.route.id] === void 0);
|
|
1395
|
+
if (u.route.lazy || h) {
|
|
1397
1396
|
l = !0, o >= 0 ? n = n.slice(0, o + 1) : n = [n[0]];
|
|
1398
1397
|
break;
|
|
1399
1398
|
}
|
|
1400
1399
|
}
|
|
1401
1400
|
}
|
|
1402
|
-
return n.reduceRight((
|
|
1403
|
-
let
|
|
1404
|
-
r && (
|
|
1401
|
+
return n.reduceRight((c, u, d) => {
|
|
1402
|
+
let p, h = !1, v = null, y = null;
|
|
1403
|
+
r && (p = a && u.route.id ? a[u.route.id] : void 0, v = u.route.errorElement || dr, l && (o < 0 && d === 0 ? (Et(
|
|
1405
1404
|
"route-fallback",
|
|
1406
1405
|
!1,
|
|
1407
1406
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
1408
|
-
),
|
|
1409
|
-
let x = t.concat(n.slice(0,
|
|
1407
|
+
), h = !0, y = null) : o === d && (h = !0, y = u.route.hydrateFallbackElement || null)));
|
|
1408
|
+
let x = t.concat(n.slice(0, d + 1)), R = () => {
|
|
1410
1409
|
let b;
|
|
1411
|
-
return
|
|
1410
|
+
return p ? b = v : h ? b = y : u.route.Component ? b = /* @__PURE__ */ f.createElement(u.route.Component, null) : u.route.element ? b = u.route.element : b = c, /* @__PURE__ */ f.createElement(
|
|
1412
1411
|
hr,
|
|
1413
1412
|
{
|
|
1414
|
-
match:
|
|
1413
|
+
match: u,
|
|
1415
1414
|
routeContext: {
|
|
1416
|
-
outlet:
|
|
1415
|
+
outlet: c,
|
|
1417
1416
|
matches: x,
|
|
1418
1417
|
isDataRoute: r != null
|
|
1419
1418
|
},
|
|
@@ -1421,13 +1420,13 @@ function mr(e, t = [], r = null, i = null) {
|
|
|
1421
1420
|
}
|
|
1422
1421
|
);
|
|
1423
1422
|
};
|
|
1424
|
-
return r && (
|
|
1423
|
+
return r && (u.route.ErrorBoundary || u.route.errorElement || d === 0) ? /* @__PURE__ */ f.createElement(
|
|
1425
1424
|
pr,
|
|
1426
1425
|
{
|
|
1427
1426
|
location: r.location,
|
|
1428
1427
|
revalidation: r.revalidation,
|
|
1429
1428
|
component: v,
|
|
1430
|
-
error:
|
|
1429
|
+
error: p,
|
|
1431
1430
|
children: R(),
|
|
1432
1431
|
routeContext: { outlet: null, matches: x, isDataRoute: !0 }
|
|
1433
1432
|
}
|
|
@@ -1438,15 +1437,15 @@ function We(e) {
|
|
|
1438
1437
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1439
1438
|
}
|
|
1440
1439
|
function yr(e) {
|
|
1441
|
-
let t =
|
|
1440
|
+
let t = f.useContext(ie);
|
|
1442
1441
|
return W(t, We(e)), t;
|
|
1443
1442
|
}
|
|
1444
1443
|
function vr(e) {
|
|
1445
|
-
let t =
|
|
1444
|
+
let t = f.useContext(ve);
|
|
1446
1445
|
return W(t, We(e)), t;
|
|
1447
1446
|
}
|
|
1448
1447
|
function gr(e) {
|
|
1449
|
-
let t =
|
|
1448
|
+
let t = f.useContext(Q);
|
|
1450
1449
|
return W(t, We(e)), t;
|
|
1451
1450
|
}
|
|
1452
1451
|
function Be(e) {
|
|
@@ -1463,15 +1462,14 @@ function br() {
|
|
|
1463
1462
|
);
|
|
1464
1463
|
}
|
|
1465
1464
|
function Er() {
|
|
1466
|
-
|
|
1467
|
-
let e = d.useContext(Fe), t = vr(
|
|
1465
|
+
let e = f.useContext(Fe), t = vr(
|
|
1468
1466
|
"useRouteError"
|
|
1469
1467
|
/* UseRouteError */
|
|
1470
1468
|
), r = Be(
|
|
1471
1469
|
"useRouteError"
|
|
1472
1470
|
/* UseRouteError */
|
|
1473
1471
|
);
|
|
1474
|
-
return e !== void 0 ? e :
|
|
1472
|
+
return e !== void 0 ? e : t.errors?.[r];
|
|
1475
1473
|
}
|
|
1476
1474
|
function wr() {
|
|
1477
1475
|
let { router: e } = yr(
|
|
@@ -1480,10 +1478,10 @@ function wr() {
|
|
|
1480
1478
|
), t = Be(
|
|
1481
1479
|
"useNavigate"
|
|
1482
1480
|
/* UseNavigateStable */
|
|
1483
|
-
), r =
|
|
1481
|
+
), r = f.useRef(!1);
|
|
1484
1482
|
return bt(() => {
|
|
1485
1483
|
r.current = !0;
|
|
1486
|
-
}),
|
|
1484
|
+
}), f.useCallback(
|
|
1487
1485
|
async (n, a = {}) => {
|
|
1488
1486
|
X(r.current, gt), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...a }));
|
|
1489
1487
|
},
|
|
@@ -1494,7 +1492,7 @@ var ot = {};
|
|
|
1494
1492
|
function Et(e, t, r) {
|
|
1495
1493
|
!t && !ot[e] && (ot[e] = !0, X(!1, r));
|
|
1496
1494
|
}
|
|
1497
|
-
|
|
1495
|
+
f.memo(xr);
|
|
1498
1496
|
function xr({
|
|
1499
1497
|
routes: e,
|
|
1500
1498
|
future: t,
|
|
@@ -1559,13 +1557,13 @@ function kr(e, t) {
|
|
|
1559
1557
|
throw new Error(
|
|
1560
1558
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1561
1559
|
);
|
|
1562
|
-
let
|
|
1563
|
-
if (i =
|
|
1564
|
-
let { name:
|
|
1565
|
-
if (
|
|
1566
|
-
let
|
|
1567
|
-
a.append(`${
|
|
1568
|
-
} else
|
|
1560
|
+
let c = e.getAttribute("formaction") || o.getAttribute("action");
|
|
1561
|
+
if (i = c ? re(c, t) : null, r = e.getAttribute("formmethod") || o.getAttribute("method") || he, n = Ie(e.getAttribute("formenctype")) || Ie(o.getAttribute("enctype")) || me, a = new FormData(o, e), !_r()) {
|
|
1562
|
+
let { name: u, type: d, value: p } = e;
|
|
1563
|
+
if (d === "image") {
|
|
1564
|
+
let h = u ? `${u}.` : "";
|
|
1565
|
+
a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
|
|
1566
|
+
} else u && a.append(u, p);
|
|
1569
1567
|
}
|
|
1570
1568
|
} else {
|
|
1571
1569
|
if (be(e))
|
|
@@ -1618,33 +1616,29 @@ async function Ir(e, t, r) {
|
|
|
1618
1616
|
);
|
|
1619
1617
|
}
|
|
1620
1618
|
function lt(e, t, r, i, n, a) {
|
|
1621
|
-
let l = (
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
((f = r[c].route.path) == null ? void 0 : f.endsWith("*")) && r[c].params["*"] !== u.params["*"]
|
|
1628
|
-
);
|
|
1629
|
-
};
|
|
1619
|
+
let l = (c, u) => r[u] ? c.route.id !== r[u].route.id : !0, o = (c, u) => (
|
|
1620
|
+
// param change, /users/123 -> /users/456
|
|
1621
|
+
r[u].pathname !== c.pathname || // splat param changed, which is not present in match.path
|
|
1622
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1623
|
+
r[u].route.path?.endsWith("*") && r[u].params["*"] !== c.params["*"]
|
|
1624
|
+
);
|
|
1630
1625
|
return a === "assets" ? t.filter(
|
|
1631
|
-
(
|
|
1632
|
-
) : a === "data" ? t.filter((
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
if (!f || !f.hasLoader)
|
|
1626
|
+
(c, u) => l(c, u) || o(c, u)
|
|
1627
|
+
) : a === "data" ? t.filter((c, u) => {
|
|
1628
|
+
let d = i.routes[c.route.id];
|
|
1629
|
+
if (!d || !d.hasLoader)
|
|
1636
1630
|
return !1;
|
|
1637
|
-
if (l(
|
|
1631
|
+
if (l(c, u) || o(c, u))
|
|
1638
1632
|
return !0;
|
|
1639
|
-
if (
|
|
1640
|
-
let p =
|
|
1633
|
+
if (c.route.shouldRevalidate) {
|
|
1634
|
+
let p = c.route.shouldRevalidate({
|
|
1641
1635
|
currentUrl: new URL(
|
|
1642
1636
|
n.pathname + n.search + n.hash,
|
|
1643
1637
|
window.origin
|
|
1644
1638
|
),
|
|
1645
|
-
currentParams:
|
|
1639
|
+
currentParams: r[0]?.params || {},
|
|
1646
1640
|
nextUrl: new URL(e, window.origin),
|
|
1647
|
-
nextParams:
|
|
1641
|
+
nextParams: c.params,
|
|
1648
1642
|
defaultShouldRevalidate: !0
|
|
1649
1643
|
});
|
|
1650
1644
|
if (typeof p == "boolean")
|
|
@@ -1689,42 +1683,42 @@ function Dr(e) {
|
|
|
1689
1683
|
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
1690
1684
|
}
|
|
1691
1685
|
function qr() {
|
|
1692
|
-
let e =
|
|
1686
|
+
let e = f.useContext(ie);
|
|
1693
1687
|
return Ue(
|
|
1694
1688
|
e,
|
|
1695
1689
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1696
1690
|
), e;
|
|
1697
1691
|
}
|
|
1698
1692
|
function Fr() {
|
|
1699
|
-
let e =
|
|
1693
|
+
let e = f.useContext(ve);
|
|
1700
1694
|
return Ue(
|
|
1701
1695
|
e,
|
|
1702
1696
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1703
1697
|
), e;
|
|
1704
1698
|
}
|
|
1705
|
-
var ze =
|
|
1699
|
+
var ze = f.createContext(void 0);
|
|
1706
1700
|
ze.displayName = "FrameworkContext";
|
|
1707
1701
|
function wt() {
|
|
1708
|
-
let e =
|
|
1702
|
+
let e = f.useContext(ze);
|
|
1709
1703
|
return Ue(
|
|
1710
1704
|
e,
|
|
1711
1705
|
"You must render this element inside a <HydratedRouter> element"
|
|
1712
1706
|
), e;
|
|
1713
1707
|
}
|
|
1714
1708
|
function Wr(e, t) {
|
|
1715
|
-
let r =
|
|
1716
|
-
|
|
1709
|
+
let r = f.useContext(ze), [i, n] = f.useState(!1), [a, l] = f.useState(!1), { onFocus: o, onBlur: c, onMouseEnter: u, onMouseLeave: d, onTouchStart: p } = t, h = f.useRef(null);
|
|
1710
|
+
f.useEffect(() => {
|
|
1717
1711
|
if (e === "render" && l(!0), e === "viewport") {
|
|
1718
1712
|
let x = (b) => {
|
|
1719
1713
|
b.forEach((T) => {
|
|
1720
1714
|
l(T.isIntersecting);
|
|
1721
1715
|
});
|
|
1722
1716
|
}, R = new IntersectionObserver(x, { threshold: 0.5 });
|
|
1723
|
-
return
|
|
1717
|
+
return h.current && R.observe(h.current), () => {
|
|
1724
1718
|
R.disconnect();
|
|
1725
1719
|
};
|
|
1726
1720
|
}
|
|
1727
|
-
}, [e]),
|
|
1721
|
+
}, [e]), f.useEffect(() => {
|
|
1728
1722
|
if (i) {
|
|
1729
1723
|
let x = setTimeout(() => {
|
|
1730
1724
|
l(!0);
|
|
@@ -1736,20 +1730,20 @@ function Wr(e, t) {
|
|
|
1736
1730
|
}, [i]);
|
|
1737
1731
|
let v = () => {
|
|
1738
1732
|
n(!0);
|
|
1739
|
-
},
|
|
1733
|
+
}, y = () => {
|
|
1740
1734
|
n(!1), l(!1);
|
|
1741
1735
|
};
|
|
1742
|
-
return r ? e !== "intent" ? [a,
|
|
1736
|
+
return r ? e !== "intent" ? [a, h, {}] : [
|
|
1743
1737
|
a,
|
|
1744
|
-
|
|
1738
|
+
h,
|
|
1745
1739
|
{
|
|
1746
1740
|
onFocus: le(o, v),
|
|
1747
|
-
onBlur: le(
|
|
1748
|
-
onMouseEnter: le(
|
|
1749
|
-
onMouseLeave: le(
|
|
1750
|
-
onTouchStart: le(
|
|
1741
|
+
onBlur: le(c, y),
|
|
1742
|
+
onMouseEnter: le(u, v),
|
|
1743
|
+
onMouseLeave: le(d, y),
|
|
1744
|
+
onTouchStart: le(p, v)
|
|
1751
1745
|
}
|
|
1752
|
-
] : [!1,
|
|
1746
|
+
] : [!1, h, {}];
|
|
1753
1747
|
}
|
|
1754
1748
|
function le(e, t) {
|
|
1755
1749
|
return (r) => {
|
|
@@ -1760,15 +1754,15 @@ function Br({
|
|
|
1760
1754
|
page: e,
|
|
1761
1755
|
...t
|
|
1762
1756
|
}) {
|
|
1763
|
-
let { router: r } = qr(), i =
|
|
1757
|
+
let { router: r } = qr(), i = f.useMemo(
|
|
1764
1758
|
() => ft(r.routes, e, r.basename),
|
|
1765
1759
|
[r.routes, e, r.basename]
|
|
1766
1760
|
);
|
|
1767
|
-
return i ? /* @__PURE__ */
|
|
1761
|
+
return i ? /* @__PURE__ */ f.createElement(zr, { page: e, matches: i, ...t }) : null;
|
|
1768
1762
|
}
|
|
1769
1763
|
function Ur(e) {
|
|
1770
|
-
let { manifest: t, routeModules: r } = wt(), [i, n] =
|
|
1771
|
-
return
|
|
1764
|
+
let { manifest: t, routeModules: r } = wt(), [i, n] = f.useState([]);
|
|
1765
|
+
return f.useEffect(() => {
|
|
1772
1766
|
let a = !1;
|
|
1773
1767
|
return Ir(e, t, r).then(
|
|
1774
1768
|
(l) => {
|
|
@@ -1784,7 +1778,7 @@ function zr({
|
|
|
1784
1778
|
matches: t,
|
|
1785
1779
|
...r
|
|
1786
1780
|
}) {
|
|
1787
|
-
let i = ne(), { manifest: n, routeModules: a } = wt(), { loaderData: l, matches: o } = Fr(),
|
|
1781
|
+
let i = ne(), { manifest: n, routeModules: a } = wt(), { loaderData: l, matches: o } = Fr(), c = f.useMemo(
|
|
1788
1782
|
() => lt(
|
|
1789
1783
|
e,
|
|
1790
1784
|
t,
|
|
@@ -1794,7 +1788,7 @@ function zr({
|
|
|
1794
1788
|
"data"
|
|
1795
1789
|
),
|
|
1796
1790
|
[e, t, o, n, i]
|
|
1797
|
-
),
|
|
1791
|
+
), u = f.useMemo(
|
|
1798
1792
|
() => lt(
|
|
1799
1793
|
e,
|
|
1800
1794
|
t,
|
|
@@ -1804,18 +1798,17 @@ function zr({
|
|
|
1804
1798
|
"assets"
|
|
1805
1799
|
),
|
|
1806
1800
|
[e, t, o, n, i]
|
|
1807
|
-
),
|
|
1801
|
+
), d = f.useMemo(() => {
|
|
1808
1802
|
if (e === i.pathname + i.search + i.hash)
|
|
1809
1803
|
return [];
|
|
1810
|
-
let v = /* @__PURE__ */ new Set(),
|
|
1804
|
+
let v = /* @__PURE__ */ new Set(), y = !1;
|
|
1811
1805
|
if (t.forEach((R) => {
|
|
1812
|
-
var T;
|
|
1813
1806
|
let b = n.routes[R.route.id];
|
|
1814
|
-
!b || !b.hasLoader || (!
|
|
1807
|
+
!b || !b.hasLoader || (!c.some((T) => T.route.id === R.route.id) && R.route.id in l && a[R.route.id]?.shouldRevalidate || b.hasClientLoader ? y = !0 : v.add(R.route.id));
|
|
1815
1808
|
}), v.size === 0)
|
|
1816
1809
|
return [];
|
|
1817
1810
|
let x = Dr(e);
|
|
1818
|
-
return
|
|
1811
|
+
return y && v.size > 0 && x.searchParams.set(
|
|
1819
1812
|
"_routes",
|
|
1820
1813
|
t.filter((R) => v.has(R.route.id)).map((R) => R.route.id).join(",")
|
|
1821
1814
|
), [x.pathname + x.search];
|
|
@@ -1823,18 +1816,18 @@ function zr({
|
|
|
1823
1816
|
l,
|
|
1824
1817
|
i,
|
|
1825
1818
|
n,
|
|
1826
|
-
|
|
1819
|
+
c,
|
|
1827
1820
|
t,
|
|
1828
1821
|
e,
|
|
1829
1822
|
a
|
|
1830
|
-
]),
|
|
1831
|
-
() => Ar(
|
|
1832
|
-
[
|
|
1833
|
-
),
|
|
1834
|
-
return /* @__PURE__ */
|
|
1823
|
+
]), p = f.useMemo(
|
|
1824
|
+
() => Ar(u, n),
|
|
1825
|
+
[u, n]
|
|
1826
|
+
), h = Ur(u);
|
|
1827
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, d.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "prefetch", as: "fetch", href: v, ...r })), p.map((v) => /* @__PURE__ */ f.createElement("link", { key: v, rel: "modulepreload", href: v, ...r })), h.map(({ key: v, link: y }) => (
|
|
1835
1828
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1836
1829
|
// already with their own props
|
|
1837
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ f.createElement("link", { key: v, ...y })
|
|
1838
1831
|
)));
|
|
1839
1832
|
}
|
|
1840
1833
|
function Yr(...e) {
|
|
@@ -1849,7 +1842,7 @@ try {
|
|
|
1849
1842
|
xt && (window.__reactRouterVersion = "7.2.0");
|
|
1850
1843
|
} catch {
|
|
1851
1844
|
}
|
|
1852
|
-
var Rt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye =
|
|
1845
|
+
var Rt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye = f.forwardRef(
|
|
1853
1846
|
function({
|
|
1854
1847
|
onClick: t,
|
|
1855
1848
|
discover: r = "render",
|
|
@@ -1858,57 +1851,57 @@ var Rt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ye = d.forwardRef(
|
|
|
1858
1851
|
reloadDocument: a,
|
|
1859
1852
|
replace: l,
|
|
1860
1853
|
state: o,
|
|
1861
|
-
target:
|
|
1862
|
-
to:
|
|
1863
|
-
preventScrollReset:
|
|
1864
|
-
viewTransition:
|
|
1865
|
-
...
|
|
1854
|
+
target: c,
|
|
1855
|
+
to: u,
|
|
1856
|
+
preventScrollReset: d,
|
|
1857
|
+
viewTransition: p,
|
|
1858
|
+
...h
|
|
1866
1859
|
}, v) {
|
|
1867
|
-
let { basename:
|
|
1868
|
-
if (typeof
|
|
1860
|
+
let { basename: y } = f.useContext(Z), x = typeof u == "string" && Rt.test(u), R, b = !1;
|
|
1861
|
+
if (typeof u == "string" && x && (R = u, xt))
|
|
1869
1862
|
try {
|
|
1870
|
-
let F = new URL(window.location.href), H =
|
|
1871
|
-
H.origin === F.origin && ee != null ?
|
|
1863
|
+
let F = new URL(window.location.href), H = u.startsWith("//") ? new URL(F.protocol + u) : new URL(u), ee = re(H.pathname, y);
|
|
1864
|
+
H.origin === F.origin && ee != null ? u = ee + H.search + H.hash : b = !0;
|
|
1872
1865
|
} catch {
|
|
1873
1866
|
X(
|
|
1874
1867
|
!1,
|
|
1875
|
-
`<Link to="${
|
|
1868
|
+
`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1876
1869
|
);
|
|
1877
1870
|
}
|
|
1878
|
-
let T = lr(
|
|
1871
|
+
let T = lr(u, { relative: n }), [S, N, g] = Wr(
|
|
1879
1872
|
i,
|
|
1880
|
-
|
|
1881
|
-
), U = Kr(
|
|
1873
|
+
h
|
|
1874
|
+
), U = Kr(u, {
|
|
1882
1875
|
replace: l,
|
|
1883
1876
|
state: o,
|
|
1884
|
-
target:
|
|
1885
|
-
preventScrollReset:
|
|
1877
|
+
target: c,
|
|
1878
|
+
preventScrollReset: d,
|
|
1886
1879
|
relative: n,
|
|
1887
|
-
viewTransition:
|
|
1880
|
+
viewTransition: p
|
|
1888
1881
|
});
|
|
1889
1882
|
function Y(F) {
|
|
1890
1883
|
t && t(F), F.defaultPrevented || U(F);
|
|
1891
1884
|
}
|
|
1892
1885
|
let V = (
|
|
1893
1886
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1894
|
-
/* @__PURE__ */
|
|
1887
|
+
/* @__PURE__ */ f.createElement(
|
|
1895
1888
|
"a",
|
|
1896
1889
|
{
|
|
1897
|
-
...
|
|
1890
|
+
...h,
|
|
1898
1891
|
...g,
|
|
1899
1892
|
href: R || T,
|
|
1900
1893
|
onClick: b || a ? t : Y,
|
|
1901
1894
|
ref: Yr(v, N),
|
|
1902
|
-
target:
|
|
1895
|
+
target: c,
|
|
1903
1896
|
"data-discover": !x && r === "render" ? "true" : void 0
|
|
1904
1897
|
}
|
|
1905
1898
|
)
|
|
1906
1899
|
);
|
|
1907
|
-
return S && !x ? /* @__PURE__ */
|
|
1900
|
+
return S && !x ? /* @__PURE__ */ f.createElement(f.Fragment, null, V, /* @__PURE__ */ f.createElement(Br, { page: T })) : V;
|
|
1908
1901
|
}
|
|
1909
1902
|
);
|
|
1910
1903
|
Ye.displayName = "Link";
|
|
1911
|
-
var Hr =
|
|
1904
|
+
var Hr = f.forwardRef(
|
|
1912
1905
|
function({
|
|
1913
1906
|
"aria-current": t = "page",
|
|
1914
1907
|
caseSensitive: r = !1,
|
|
@@ -1917,12 +1910,12 @@ var Hr = d.forwardRef(
|
|
|
1917
1910
|
style: a,
|
|
1918
1911
|
to: l,
|
|
1919
1912
|
viewTransition: o,
|
|
1920
|
-
children:
|
|
1921
|
-
...
|
|
1922
|
-
},
|
|
1923
|
-
let
|
|
1913
|
+
children: c,
|
|
1914
|
+
...u
|
|
1915
|
+
}, d) {
|
|
1916
|
+
let p = se(l, { relative: u.relative }), h = ne(), v = f.useContext(ve), { navigator: y, basename: x } = f.useContext(Z), R = v != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1924
1917
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1925
|
-
en(
|
|
1918
|
+
en(p) && o === !0, b = y.encodeLocation ? y.encodeLocation(p).pathname : p.pathname, T = h.pathname, S = v && v.navigation && v.navigation.location ? v.navigation.location.pathname : null;
|
|
1926
1919
|
r || (T = T.toLowerCase(), S = S ? S.toLowerCase() : null, b = b.toLowerCase()), S && x && (S = re(S, x) || S);
|
|
1927
1920
|
const N = b !== "/" && b.endsWith("/") ? b.length - 1 : b.length;
|
|
1928
1921
|
let g = T === b || !n && T.startsWith(b) && T.charAt(N) === "/", U = S != null && (S === b || !n && S.startsWith(b) && S.charAt(b.length) === "/"), Y = {
|
|
@@ -1937,23 +1930,23 @@ var Hr = d.forwardRef(
|
|
|
1937
1930
|
R ? "transitioning" : null
|
|
1938
1931
|
].filter(Boolean).join(" ");
|
|
1939
1932
|
let H = typeof a == "function" ? a(Y) : a;
|
|
1940
|
-
return /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ f.createElement(
|
|
1941
1934
|
Ye,
|
|
1942
1935
|
{
|
|
1943
|
-
...
|
|
1936
|
+
...u,
|
|
1944
1937
|
"aria-current": V,
|
|
1945
1938
|
className: F,
|
|
1946
|
-
ref:
|
|
1939
|
+
ref: d,
|
|
1947
1940
|
style: H,
|
|
1948
1941
|
to: l,
|
|
1949
1942
|
viewTransition: o
|
|
1950
1943
|
},
|
|
1951
|
-
typeof
|
|
1944
|
+
typeof c == "function" ? c(Y) : c
|
|
1952
1945
|
);
|
|
1953
1946
|
}
|
|
1954
1947
|
);
|
|
1955
1948
|
Hr.displayName = "NavLink";
|
|
1956
|
-
var Vr =
|
|
1949
|
+
var Vr = f.forwardRef(
|
|
1957
1950
|
({
|
|
1958
1951
|
discover: e = "render",
|
|
1959
1952
|
fetcherKey: t,
|
|
@@ -1963,35 +1956,35 @@ var Vr = d.forwardRef(
|
|
|
1963
1956
|
state: a,
|
|
1964
1957
|
method: l = he,
|
|
1965
1958
|
action: o,
|
|
1966
|
-
onSubmit:
|
|
1967
|
-
relative:
|
|
1968
|
-
preventScrollReset:
|
|
1969
|
-
viewTransition:
|
|
1970
|
-
...
|
|
1959
|
+
onSubmit: c,
|
|
1960
|
+
relative: u,
|
|
1961
|
+
preventScrollReset: d,
|
|
1962
|
+
viewTransition: p,
|
|
1963
|
+
...h
|
|
1971
1964
|
}, v) => {
|
|
1972
|
-
let
|
|
1973
|
-
if (
|
|
1965
|
+
let y = Zr(), x = Qr(o, { relative: u }), R = l.toLowerCase() === "get" ? "get" : "post", b = typeof o == "string" && Rt.test(o), T = (S) => {
|
|
1966
|
+
if (c && c(S), S.defaultPrevented) return;
|
|
1974
1967
|
S.preventDefault();
|
|
1975
|
-
let N = S.nativeEvent.submitter, g =
|
|
1976
|
-
|
|
1968
|
+
let N = S.nativeEvent.submitter, g = N?.getAttribute("formmethod") || l;
|
|
1969
|
+
y(N || S.currentTarget, {
|
|
1977
1970
|
fetcherKey: t,
|
|
1978
1971
|
method: g,
|
|
1979
1972
|
navigate: r,
|
|
1980
1973
|
replace: n,
|
|
1981
1974
|
state: a,
|
|
1982
|
-
relative:
|
|
1983
|
-
preventScrollReset:
|
|
1984
|
-
viewTransition:
|
|
1975
|
+
relative: u,
|
|
1976
|
+
preventScrollReset: d,
|
|
1977
|
+
viewTransition: p
|
|
1985
1978
|
});
|
|
1986
1979
|
};
|
|
1987
|
-
return /* @__PURE__ */
|
|
1980
|
+
return /* @__PURE__ */ f.createElement(
|
|
1988
1981
|
"form",
|
|
1989
1982
|
{
|
|
1990
1983
|
ref: v,
|
|
1991
1984
|
method: R,
|
|
1992
1985
|
action: x,
|
|
1993
|
-
onSubmit: i ?
|
|
1994
|
-
...
|
|
1986
|
+
onSubmit: i ? c : T,
|
|
1987
|
+
...h,
|
|
1995
1988
|
"data-discover": !b && e === "render" ? "true" : void 0
|
|
1996
1989
|
}
|
|
1997
1990
|
);
|
|
@@ -2002,7 +1995,7 @@ function Jr(e) {
|
|
|
2002
1995
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
2003
1996
|
}
|
|
2004
1997
|
function Ct(e) {
|
|
2005
|
-
let t =
|
|
1998
|
+
let t = f.useContext(ie);
|
|
2006
1999
|
return W(t, Jr(e)), t;
|
|
2007
2000
|
}
|
|
2008
2001
|
function Kr(e, {
|
|
@@ -2013,14 +2006,14 @@ function Kr(e, {
|
|
|
2013
2006
|
relative: a,
|
|
2014
2007
|
viewTransition: l
|
|
2015
2008
|
} = {}) {
|
|
2016
|
-
let o = sr(),
|
|
2017
|
-
return
|
|
2018
|
-
(
|
|
2019
|
-
if (Pr(
|
|
2020
|
-
|
|
2021
|
-
let
|
|
2009
|
+
let o = sr(), c = ne(), u = se(e, { relative: a });
|
|
2010
|
+
return f.useCallback(
|
|
2011
|
+
(d) => {
|
|
2012
|
+
if (Pr(d, t)) {
|
|
2013
|
+
d.preventDefault();
|
|
2014
|
+
let p = r !== void 0 ? r : Ae(c) === Ae(u);
|
|
2022
2015
|
o(e, {
|
|
2023
|
-
replace:
|
|
2016
|
+
replace: p,
|
|
2024
2017
|
state: i,
|
|
2025
2018
|
preventScrollReset: n,
|
|
2026
2019
|
relative: a,
|
|
@@ -2029,9 +2022,9 @@ function Kr(e, {
|
|
|
2029
2022
|
}
|
|
2030
2023
|
},
|
|
2031
2024
|
[
|
|
2032
|
-
u,
|
|
2033
|
-
o,
|
|
2034
2025
|
c,
|
|
2026
|
+
o,
|
|
2027
|
+
u,
|
|
2035
2028
|
r,
|
|
2036
2029
|
i,
|
|
2037
2030
|
t,
|
|
@@ -2047,19 +2040,19 @@ function Zr() {
|
|
|
2047
2040
|
let { router: e } = Ct(
|
|
2048
2041
|
"useSubmit"
|
|
2049
2042
|
/* UseSubmit */
|
|
2050
|
-
), { basename: t } =
|
|
2051
|
-
return
|
|
2043
|
+
), { basename: t } = f.useContext(Z), r = br();
|
|
2044
|
+
return f.useCallback(
|
|
2052
2045
|
async (i, n = {}) => {
|
|
2053
|
-
let { action: a, method: l, encType: o, formData:
|
|
2046
|
+
let { action: a, method: l, encType: o, formData: c, body: u } = kr(
|
|
2054
2047
|
i,
|
|
2055
2048
|
t
|
|
2056
2049
|
);
|
|
2057
2050
|
if (n.navigate === !1) {
|
|
2058
|
-
let
|
|
2059
|
-
await e.fetch(
|
|
2051
|
+
let d = n.fetcherKey || Xr();
|
|
2052
|
+
await e.fetch(d, r, n.action || a, {
|
|
2060
2053
|
preventScrollReset: n.preventScrollReset,
|
|
2061
|
-
formData:
|
|
2062
|
-
body:
|
|
2054
|
+
formData: c,
|
|
2055
|
+
body: u,
|
|
2063
2056
|
formMethod: n.method || l,
|
|
2064
2057
|
formEncType: n.encType || o,
|
|
2065
2058
|
flushSync: n.flushSync
|
|
@@ -2067,8 +2060,8 @@ function Zr() {
|
|
|
2067
2060
|
} else
|
|
2068
2061
|
await e.navigate(n.action || a, {
|
|
2069
2062
|
preventScrollReset: n.preventScrollReset,
|
|
2070
|
-
formData:
|
|
2071
|
-
body:
|
|
2063
|
+
formData: c,
|
|
2064
|
+
body: u,
|
|
2072
2065
|
formMethod: n.method || l,
|
|
2073
2066
|
formEncType: n.encType || o,
|
|
2074
2067
|
replace: n.replace,
|
|
@@ -2082,22 +2075,22 @@ function Zr() {
|
|
|
2082
2075
|
);
|
|
2083
2076
|
}
|
|
2084
2077
|
function Qr(e, { relative: t } = {}) {
|
|
2085
|
-
let { basename: r } =
|
|
2078
|
+
let { basename: r } = f.useContext(Z), i = f.useContext(Q);
|
|
2086
2079
|
W(i, "useFormAction must be used inside a RouteContext");
|
|
2087
2080
|
let [n] = i.matches.slice(-1), a = { ...se(e || ".", { relative: t }) }, l = ne();
|
|
2088
2081
|
if (e == null) {
|
|
2089
2082
|
a.search = l.search;
|
|
2090
|
-
let o = new URLSearchParams(a.search),
|
|
2091
|
-
if (
|
|
2092
|
-
o.delete("index"),
|
|
2093
|
-
let
|
|
2094
|
-
a.search =
|
|
2083
|
+
let o = new URLSearchParams(a.search), c = o.getAll("index");
|
|
2084
|
+
if (c.some((d) => d === "")) {
|
|
2085
|
+
o.delete("index"), c.filter((p) => p).forEach((p) => o.append("index", p));
|
|
2086
|
+
let d = o.toString();
|
|
2087
|
+
a.search = d ? `?${d}` : "";
|
|
2095
2088
|
}
|
|
2096
2089
|
}
|
|
2097
2090
|
return (!e || e === ".") && n.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (a.pathname = a.pathname === "/" ? r : G([r, a.pathname])), Ae(a);
|
|
2098
2091
|
}
|
|
2099
2092
|
function en(e, t = {}) {
|
|
2100
|
-
let r =
|
|
2093
|
+
let r = f.useContext(vt);
|
|
2101
2094
|
W(
|
|
2102
2095
|
r != null,
|
|
2103
2096
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
@@ -2121,15 +2114,15 @@ const Le = ({
|
|
|
2121
2114
|
variant: a = "",
|
|
2122
2115
|
size: l = "default",
|
|
2123
2116
|
icon: o = "",
|
|
2124
|
-
iconOnly:
|
|
2125
|
-
iconPosition:
|
|
2126
|
-
fullWidth:
|
|
2127
|
-
disabled:
|
|
2128
|
-
onClick:
|
|
2117
|
+
iconOnly: c = !1,
|
|
2118
|
+
iconPosition: u = "left",
|
|
2119
|
+
fullWidth: d = !1,
|
|
2120
|
+
disabled: p = !1,
|
|
2121
|
+
onClick: h = () => {
|
|
2129
2122
|
},
|
|
2130
2123
|
"aria-label": v = ""
|
|
2131
2124
|
}) => {
|
|
2132
|
-
const
|
|
2125
|
+
const y = o && c, x = B(
|
|
2133
2126
|
// Static classes
|
|
2134
2127
|
"rpf-button",
|
|
2135
2128
|
// Conditional classes
|
|
@@ -2137,9 +2130,9 @@ const Le = ({
|
|
|
2137
2130
|
[`rpf-button--${n}`]: n,
|
|
2138
2131
|
"rpf-button--danger": a === "danger",
|
|
2139
2132
|
"rpf-button--sm": l === "small",
|
|
2140
|
-
"rpf-button--icon-only":
|
|
2141
|
-
"rpf-button--full-width":
|
|
2142
|
-
disabled:
|
|
2133
|
+
"rpf-button--icon-only": y,
|
|
2134
|
+
"rpf-button--full-width": d,
|
|
2135
|
+
disabled: p
|
|
2143
2136
|
},
|
|
2144
2137
|
i
|
|
2145
2138
|
);
|
|
@@ -2147,7 +2140,7 @@ const Le = ({
|
|
|
2147
2140
|
Tt.isValidElement(o) ? (R += " icon", console.warn(
|
|
2148
2141
|
"DEPRECATED: icons as React elements will not be supported in future releases"
|
|
2149
2142
|
)) : R += " material-symbols-sharp";
|
|
2150
|
-
const b = (N) => o &&
|
|
2143
|
+
const b = (N) => o && u === N && /* @__PURE__ */ C("span", { className: R, children: o }), T = () => e && !y && /* @__PURE__ */ C("span", { className: "text", children: e }), S = /* @__PURE__ */ q(Me, { children: [
|
|
2151
2144
|
b("left"),
|
|
2152
2145
|
T(),
|
|
2153
2146
|
b("right")
|
|
@@ -2157,7 +2150,7 @@ const Le = ({
|
|
|
2157
2150
|
{
|
|
2158
2151
|
className: x,
|
|
2159
2152
|
to: t,
|
|
2160
|
-
onClick:
|
|
2153
|
+
onClick: h,
|
|
2161
2154
|
"aria-label": v,
|
|
2162
2155
|
children: S
|
|
2163
2156
|
}
|
|
@@ -2166,8 +2159,8 @@ const Le = ({
|
|
|
2166
2159
|
{
|
|
2167
2160
|
className: x,
|
|
2168
2161
|
title: r,
|
|
2169
|
-
onClick:
|
|
2170
|
-
disabled:
|
|
2162
|
+
onClick: h,
|
|
2163
|
+
disabled: p,
|
|
2171
2164
|
"aria-label": v,
|
|
2172
2165
|
children: S
|
|
2173
2166
|
}
|
|
@@ -2245,14 +2238,14 @@ const rn = ({
|
|
|
2245
2238
|
onChange: l = () => {
|
|
2246
2239
|
},
|
|
2247
2240
|
value: o = "",
|
|
2248
|
-
className:
|
|
2241
|
+
className: c = ""
|
|
2249
2242
|
}) => /* @__PURE__ */ q(Me, { children: [
|
|
2250
2243
|
/* @__PURE__ */ q(
|
|
2251
2244
|
"label",
|
|
2252
2245
|
{
|
|
2253
2246
|
className: B("rpf-input-checkbox", {
|
|
2254
2247
|
"rpf-input-checkbox--error": a,
|
|
2255
|
-
className:
|
|
2248
|
+
className: c
|
|
2256
2249
|
}),
|
|
2257
2250
|
children: [
|
|
2258
2251
|
/* @__PURE__ */ C("span", { children: /* @__PURE__ */ C(
|
|
@@ -2447,7 +2440,7 @@ const sn = ({
|
|
|
2447
2440
|
onClick: o = () => {
|
|
2448
2441
|
},
|
|
2449
2442
|
// eslint-disable-next-line no-unused-vars
|
|
2450
|
-
onChange:
|
|
2443
|
+
onChange: c = (u) => {
|
|
2451
2444
|
}
|
|
2452
2445
|
}) => /* @__PURE__ */ q("div", { className: "rpf-input-field", children: [
|
|
2453
2446
|
/* @__PURE__ */ q(
|
|
@@ -2478,7 +2471,7 @@ const sn = ({
|
|
|
2478
2471
|
"aria-label": "Search",
|
|
2479
2472
|
defaultValue: l,
|
|
2480
2473
|
placeholder: a,
|
|
2481
|
-
onChange:
|
|
2474
|
+
onChange: c
|
|
2482
2475
|
}
|
|
2483
2476
|
),
|
|
2484
2477
|
/* @__PURE__ */ C(
|
|
@@ -2520,10 +2513,10 @@ const un = ({
|
|
|
2520
2513
|
error: a = "",
|
|
2521
2514
|
fullWidth: l = !1,
|
|
2522
2515
|
hint: o = "",
|
|
2523
|
-
onChange:
|
|
2516
|
+
onChange: c = () => {
|
|
2524
2517
|
},
|
|
2525
|
-
placeholder:
|
|
2526
|
-
value:
|
|
2518
|
+
placeholder: u = "",
|
|
2519
|
+
value: d = ""
|
|
2527
2520
|
}) => /* @__PURE__ */ C(
|
|
2528
2521
|
Ee,
|
|
2529
2522
|
{
|
|
@@ -2542,12 +2535,12 @@ const un = ({
|
|
|
2542
2535
|
disabled: n,
|
|
2543
2536
|
id: e,
|
|
2544
2537
|
name: r,
|
|
2545
|
-
onChange:
|
|
2538
|
+
onChange: c,
|
|
2546
2539
|
type: "text",
|
|
2547
|
-
value:
|
|
2540
|
+
value: d,
|
|
2548
2541
|
children: [
|
|
2549
|
-
!
|
|
2550
|
-
i.map((
|
|
2542
|
+
!d && !!u && /* @__PURE__ */ C("option", { value: "", disabled: !0, children: u }),
|
|
2543
|
+
i.map((p) => /* @__PURE__ */ C("option", { value: p.key, children: p.value }, p.key))
|
|
2551
2544
|
]
|
|
2552
2545
|
}
|
|
2553
2546
|
)
|
|
@@ -2637,8 +2630,8 @@ const hn = ({
|
|
|
2637
2630
|
readOnly: a = !1,
|
|
2638
2631
|
error: l = "",
|
|
2639
2632
|
fullWidth: o = !1,
|
|
2640
|
-
hint:
|
|
2641
|
-
onChange:
|
|
2633
|
+
hint: c = "",
|
|
2634
|
+
onChange: u = () => {
|
|
2642
2635
|
}
|
|
2643
2636
|
}) => /* @__PURE__ */ C(
|
|
2644
2637
|
Ee,
|
|
@@ -2646,7 +2639,7 @@ const hn = ({
|
|
|
2646
2639
|
id: e,
|
|
2647
2640
|
disabled: n,
|
|
2648
2641
|
error: l,
|
|
2649
|
-
hint:
|
|
2642
|
+
hint: c,
|
|
2650
2643
|
label: t,
|
|
2651
2644
|
children: /* @__PURE__ */ C(
|
|
2652
2645
|
"textarea",
|
|
@@ -2660,7 +2653,7 @@ const hn = ({
|
|
|
2660
2653
|
readOnly: a,
|
|
2661
2654
|
id: e,
|
|
2662
2655
|
name: r,
|
|
2663
|
-
onChange:
|
|
2656
|
+
onChange: u,
|
|
2664
2657
|
type: "text",
|
|
2665
2658
|
value: i
|
|
2666
2659
|
}
|
|
@@ -2688,7 +2681,7 @@ const mn = ({
|
|
|
2688
2681
|
error: a = "",
|
|
2689
2682
|
fullWidth: l = !1,
|
|
2690
2683
|
hint: o = "",
|
|
2691
|
-
onChange:
|
|
2684
|
+
onChange: c = () => {
|
|
2692
2685
|
}
|
|
2693
2686
|
}) => /* @__PURE__ */ C(
|
|
2694
2687
|
Ee,
|
|
@@ -2708,7 +2701,7 @@ const mn = ({
|
|
|
2708
2701
|
disabled: n,
|
|
2709
2702
|
id: e,
|
|
2710
2703
|
name: r,
|
|
2711
|
-
onChange:
|
|
2704
|
+
onChange: c,
|
|
2712
2705
|
type: "text",
|
|
2713
2706
|
value: i
|
|
2714
2707
|
}
|