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