react-ecosistema-unp 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/hooks/useFinalizarSesion.js +1 -1
- package/dist/lib/shared/components/VentanaLienzo.d.ts +1 -1
- package/dist/lib/shared/components/VentanaTabs.d.ts +1 -1
- package/dist/shared/components/MenuLateral.js +1 -1
- package/dist/shared/components/VentanaLienzo.js +11 -10
- package/dist/{useFinalizarSesion-CqFXvTMK.js → useFinalizarSesion-COlHmXt5.js} +912 -719
- package/package.json +1 -1
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { isValidElement as
|
|
3
|
-
import { useAuthId as
|
|
4
|
-
import { FinSesionService as
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
if (
|
|
8
|
-
|
|
9
|
-
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, a = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,
|
|
10
|
-
const
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import { isValidElement as Ue } from "react";
|
|
3
|
+
import { useAuthId as Me } from "./auth/hooks/AuthHook.js";
|
|
4
|
+
import { FinSesionService as Be } from "./auth/services/FinSesionService.js";
|
|
5
|
+
var z = {}, de;
|
|
6
|
+
function We() {
|
|
7
|
+
if (de) return z;
|
|
8
|
+
de = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.parse = l, z.serialize = i;
|
|
9
|
+
const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, a = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, n = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, o = /* @__PURE__ */ (() => {
|
|
10
|
+
const d = function() {
|
|
11
11
|
};
|
|
12
|
-
return
|
|
12
|
+
return d.prototype = /* @__PURE__ */ Object.create(null), d;
|
|
13
13
|
})();
|
|
14
|
-
function
|
|
15
|
-
const
|
|
14
|
+
function l(d, h) {
|
|
15
|
+
const c = new o(), v = d.length;
|
|
16
16
|
if (v < 2)
|
|
17
|
-
return
|
|
18
|
-
const
|
|
19
|
-
let
|
|
17
|
+
return c;
|
|
18
|
+
const g = (h == null ? void 0 : h.decode) || m;
|
|
19
|
+
let p = 0;
|
|
20
20
|
do {
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const _ = d.indexOf("=", p);
|
|
22
|
+
if (_ === -1)
|
|
23
23
|
break;
|
|
24
|
-
const b =
|
|
25
|
-
if (
|
|
26
|
-
|
|
24
|
+
const b = d.indexOf(";", p), T = b === -1 ? v : b;
|
|
25
|
+
if (_ > T) {
|
|
26
|
+
p = d.lastIndexOf(";", _ - 1) + 1;
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
const $ =
|
|
33
|
-
|
|
29
|
+
const k = u(d, p, _), F = s(d, _, k), L = d.slice(k, F);
|
|
30
|
+
if (c[L] === void 0) {
|
|
31
|
+
let D = u(d, _ + 1, T), E = s(d, T, D);
|
|
32
|
+
const $ = g(d.slice(D, E));
|
|
33
|
+
c[L] = $;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
} while (
|
|
37
|
-
return
|
|
35
|
+
p = T + 1;
|
|
36
|
+
} while (p < v);
|
|
37
|
+
return c;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function u(d, h, c) {
|
|
40
40
|
do {
|
|
41
|
-
const v =
|
|
41
|
+
const v = d.charCodeAt(h);
|
|
42
42
|
if (v !== 32 && v !== 9)
|
|
43
43
|
return h;
|
|
44
|
-
} while (++h <
|
|
45
|
-
return
|
|
44
|
+
} while (++h < c);
|
|
45
|
+
return c;
|
|
46
46
|
}
|
|
47
|
-
function s(
|
|
48
|
-
for (; h >
|
|
49
|
-
const v =
|
|
47
|
+
function s(d, h, c) {
|
|
48
|
+
for (; h > c; ) {
|
|
49
|
+
const v = d.charCodeAt(--h);
|
|
50
50
|
if (v !== 32 && v !== 9)
|
|
51
51
|
return h + 1;
|
|
52
52
|
}
|
|
53
|
-
return
|
|
53
|
+
return c;
|
|
54
54
|
}
|
|
55
|
-
function i(
|
|
56
|
-
const v = (
|
|
57
|
-
if (!e.test(
|
|
58
|
-
throw new TypeError(`argument name is invalid: ${
|
|
59
|
-
const
|
|
60
|
-
if (!t.test(
|
|
55
|
+
function i(d, h, c) {
|
|
56
|
+
const v = (c == null ? void 0 : c.encode) || encodeURIComponent;
|
|
57
|
+
if (!e.test(d))
|
|
58
|
+
throw new TypeError(`argument name is invalid: ${d}`);
|
|
59
|
+
const g = v(h);
|
|
60
|
+
if (!t.test(g))
|
|
61
61
|
throw new TypeError(`argument val is invalid: ${h}`);
|
|
62
|
-
let
|
|
63
|
-
if (!
|
|
64
|
-
return
|
|
65
|
-
if (
|
|
66
|
-
if (!Number.isInteger(
|
|
67
|
-
throw new TypeError(`option maxAge is invalid: ${
|
|
68
|
-
|
|
62
|
+
let p = d + "=" + g;
|
|
63
|
+
if (!c)
|
|
64
|
+
return p;
|
|
65
|
+
if (c.maxAge !== void 0) {
|
|
66
|
+
if (!Number.isInteger(c.maxAge))
|
|
67
|
+
throw new TypeError(`option maxAge is invalid: ${c.maxAge}`);
|
|
68
|
+
p += "; Max-Age=" + c.maxAge;
|
|
69
69
|
}
|
|
70
|
-
if (
|
|
71
|
-
if (!a.test(
|
|
72
|
-
throw new TypeError(`option domain is invalid: ${
|
|
73
|
-
|
|
70
|
+
if (c.domain) {
|
|
71
|
+
if (!a.test(c.domain))
|
|
72
|
+
throw new TypeError(`option domain is invalid: ${c.domain}`);
|
|
73
|
+
p += "; Domain=" + c.domain;
|
|
74
74
|
}
|
|
75
|
-
if (
|
|
76
|
-
if (!
|
|
77
|
-
throw new TypeError(`option path is invalid: ${
|
|
78
|
-
|
|
75
|
+
if (c.path) {
|
|
76
|
+
if (!n.test(c.path))
|
|
77
|
+
throw new TypeError(`option path is invalid: ${c.path}`);
|
|
78
|
+
p += "; Path=" + c.path;
|
|
79
79
|
}
|
|
80
|
-
if (
|
|
81
|
-
if (!
|
|
82
|
-
throw new TypeError(`option expires is invalid: ${
|
|
83
|
-
|
|
80
|
+
if (c.expires) {
|
|
81
|
+
if (!y(c.expires) || !Number.isFinite(c.expires.valueOf()))
|
|
82
|
+
throw new TypeError(`option expires is invalid: ${c.expires}`);
|
|
83
|
+
p += "; Expires=" + c.expires.toUTCString();
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
switch (typeof
|
|
85
|
+
if (c.httpOnly && (p += "; HttpOnly"), c.secure && (p += "; Secure"), c.partitioned && (p += "; Partitioned"), c.priority)
|
|
86
|
+
switch (typeof c.priority == "string" ? c.priority.toLowerCase() : void 0) {
|
|
87
87
|
case "low":
|
|
88
|
-
|
|
88
|
+
p += "; Priority=Low";
|
|
89
89
|
break;
|
|
90
90
|
case "medium":
|
|
91
|
-
|
|
91
|
+
p += "; Priority=Medium";
|
|
92
92
|
break;
|
|
93
93
|
case "high":
|
|
94
|
-
|
|
94
|
+
p += "; Priority=High";
|
|
95
95
|
break;
|
|
96
96
|
default:
|
|
97
|
-
throw new TypeError(`option priority is invalid: ${
|
|
97
|
+
throw new TypeError(`option priority is invalid: ${c.priority}`);
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
100
|
-
switch (typeof
|
|
99
|
+
if (c.sameSite)
|
|
100
|
+
switch (typeof c.sameSite == "string" ? c.sameSite.toLowerCase() : c.sameSite) {
|
|
101
101
|
case !0:
|
|
102
102
|
case "strict":
|
|
103
|
-
|
|
103
|
+
p += "; SameSite=Strict";
|
|
104
104
|
break;
|
|
105
105
|
case "lax":
|
|
106
|
-
|
|
106
|
+
p += "; SameSite=Lax";
|
|
107
107
|
break;
|
|
108
108
|
case "none":
|
|
109
|
-
|
|
109
|
+
p += "; SameSite=None";
|
|
110
110
|
break;
|
|
111
111
|
default:
|
|
112
|
-
throw new TypeError(`option sameSite is invalid: ${
|
|
112
|
+
throw new TypeError(`option sameSite is invalid: ${c.sameSite}`);
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return p;
|
|
115
115
|
}
|
|
116
|
-
function m(
|
|
117
|
-
if (
|
|
118
|
-
return
|
|
116
|
+
function m(d) {
|
|
117
|
+
if (d.indexOf("%") === -1)
|
|
118
|
+
return d;
|
|
119
119
|
try {
|
|
120
|
-
return decodeURIComponent(
|
|
120
|
+
return decodeURIComponent(d);
|
|
121
121
|
} catch {
|
|
122
|
-
return
|
|
122
|
+
return d;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return r.call(
|
|
125
|
+
function y(d) {
|
|
126
|
+
return r.call(d) === "[object Date]";
|
|
127
127
|
}
|
|
128
|
-
return
|
|
128
|
+
return z;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
We();
|
|
131
131
|
/**
|
|
132
132
|
* react-router v7.1.5
|
|
133
133
|
*
|
|
@@ -138,11 +138,33 @@ Me();
|
|
|
138
138
|
*
|
|
139
139
|
* @license MIT
|
|
140
140
|
*/
|
|
141
|
+
var me = "popstate";
|
|
142
|
+
function He(e = {}) {
|
|
143
|
+
function t(n, r) {
|
|
144
|
+
let { pathname: o, search: l, hash: u } = n.location;
|
|
145
|
+
return re(
|
|
146
|
+
"",
|
|
147
|
+
{ pathname: o, search: l, hash: u },
|
|
148
|
+
// state defaults to `null` because `window.history.state` does
|
|
149
|
+
r.state && r.state.usr || null,
|
|
150
|
+
r.state && r.state.key || "default"
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
function a(n, r) {
|
|
154
|
+
return typeof r == "string" ? r : M(r);
|
|
155
|
+
}
|
|
156
|
+
return je(
|
|
157
|
+
t,
|
|
158
|
+
a,
|
|
159
|
+
null,
|
|
160
|
+
e
|
|
161
|
+
);
|
|
162
|
+
}
|
|
141
163
|
function w(e, t) {
|
|
142
164
|
if (e === !1 || e === null || typeof e > "u")
|
|
143
165
|
throw new Error(t);
|
|
144
166
|
}
|
|
145
|
-
function
|
|
167
|
+
function R(e, t) {
|
|
146
168
|
if (!e) {
|
|
147
169
|
typeof console < "u" && console.warn(t);
|
|
148
170
|
try {
|
|
@@ -151,109 +173,206 @@ function S(e, t) {
|
|
|
151
173
|
}
|
|
152
174
|
}
|
|
153
175
|
}
|
|
154
|
-
function
|
|
176
|
+
function Ve() {
|
|
177
|
+
return Math.random().toString(36).substring(2, 10);
|
|
178
|
+
}
|
|
179
|
+
function he(e, t) {
|
|
180
|
+
return {
|
|
181
|
+
usr: e.state,
|
|
182
|
+
key: e.key,
|
|
183
|
+
idx: t
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function re(e, t, a = null, n) {
|
|
187
|
+
return {
|
|
188
|
+
pathname: typeof e == "string" ? e : e.pathname,
|
|
189
|
+
search: "",
|
|
190
|
+
hash: "",
|
|
191
|
+
...typeof t == "string" ? W(t) : t,
|
|
192
|
+
state: a,
|
|
193
|
+
// TODO: This could be cleaned up. push/replace should probably just take
|
|
194
|
+
// full Locations now and avoid the need to run through this flow at all
|
|
195
|
+
// But that's a pretty big refactor to the current test suite so going to
|
|
196
|
+
// keep as is for the time being and just let any incoming keys take precedence
|
|
197
|
+
key: t && t.key || n || Ve()
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function M({
|
|
155
201
|
pathname: e = "/",
|
|
156
202
|
search: t = "",
|
|
157
203
|
hash: a = ""
|
|
158
204
|
}) {
|
|
159
205
|
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), a && a !== "#" && (e += a.charAt(0) === "#" ? a : "#" + a), e;
|
|
160
206
|
}
|
|
161
|
-
function
|
|
207
|
+
function W(e) {
|
|
162
208
|
let t = {};
|
|
163
209
|
if (e) {
|
|
164
210
|
let a = e.indexOf("#");
|
|
165
211
|
a >= 0 && (t.hash = e.substring(a), e = e.substring(0, a));
|
|
166
|
-
let
|
|
167
|
-
|
|
212
|
+
let n = e.indexOf("?");
|
|
213
|
+
n >= 0 && (t.search = e.substring(n), e = e.substring(0, n)), e && (t.pathname = e);
|
|
168
214
|
}
|
|
169
215
|
return t;
|
|
170
216
|
}
|
|
171
|
-
function
|
|
172
|
-
|
|
217
|
+
function je(e, t, a, n = {}) {
|
|
218
|
+
let { window: r = document.defaultView, v5Compat: o = !1 } = n, l = r.history, u = "POP", s = null, i = m();
|
|
219
|
+
i == null && (i = 0, l.replaceState({ ...l.state, idx: i }, ""));
|
|
220
|
+
function m() {
|
|
221
|
+
return (l.state || { idx: null }).idx;
|
|
222
|
+
}
|
|
223
|
+
function y() {
|
|
224
|
+
u = "POP";
|
|
225
|
+
let g = m(), p = g == null ? null : g - i;
|
|
226
|
+
i = g, s && s({ action: u, location: v.location, delta: p });
|
|
227
|
+
}
|
|
228
|
+
function d(g, p) {
|
|
229
|
+
u = "PUSH";
|
|
230
|
+
let _ = re(v.location, g, p);
|
|
231
|
+
i = m() + 1;
|
|
232
|
+
let b = he(_, i), T = v.createHref(_);
|
|
233
|
+
try {
|
|
234
|
+
l.pushState(b, "", T);
|
|
235
|
+
} catch (k) {
|
|
236
|
+
if (k instanceof DOMException && k.name === "DataCloneError")
|
|
237
|
+
throw k;
|
|
238
|
+
r.location.assign(T);
|
|
239
|
+
}
|
|
240
|
+
o && s && s({ action: u, location: v.location, delta: 1 });
|
|
241
|
+
}
|
|
242
|
+
function h(g, p) {
|
|
243
|
+
u = "REPLACE";
|
|
244
|
+
let _ = re(v.location, g, p);
|
|
245
|
+
i = m();
|
|
246
|
+
let b = he(_, i), T = v.createHref(_);
|
|
247
|
+
l.replaceState(b, "", T), o && s && s({ action: u, location: v.location, delta: 0 });
|
|
248
|
+
}
|
|
249
|
+
function c(g) {
|
|
250
|
+
let p = r.location.origin !== "null" ? r.location.origin : r.location.href, _ = typeof g == "string" ? g : M(g);
|
|
251
|
+
return _ = _.replace(/ $/, "%20"), w(
|
|
252
|
+
p,
|
|
253
|
+
`No window.location.(origin|href) available to create URL for href: ${_}`
|
|
254
|
+
), new URL(_, p);
|
|
255
|
+
}
|
|
256
|
+
let v = {
|
|
257
|
+
get action() {
|
|
258
|
+
return u;
|
|
259
|
+
},
|
|
260
|
+
get location() {
|
|
261
|
+
return e(r, l);
|
|
262
|
+
},
|
|
263
|
+
listen(g) {
|
|
264
|
+
if (s)
|
|
265
|
+
throw new Error("A history only accepts one active listener");
|
|
266
|
+
return r.addEventListener(me, y), s = g, () => {
|
|
267
|
+
r.removeEventListener(me, y), s = null;
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
createHref(g) {
|
|
271
|
+
return t(r, g);
|
|
272
|
+
},
|
|
273
|
+
createURL: c,
|
|
274
|
+
encodeLocation(g) {
|
|
275
|
+
let p = c(g);
|
|
276
|
+
return {
|
|
277
|
+
pathname: p.pathname,
|
|
278
|
+
search: p.search,
|
|
279
|
+
hash: p.hash
|
|
280
|
+
};
|
|
281
|
+
},
|
|
282
|
+
push: d,
|
|
283
|
+
replace: h,
|
|
284
|
+
go(g) {
|
|
285
|
+
return l.go(g);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
return v;
|
|
289
|
+
}
|
|
290
|
+
function ve(e, t, a = "/") {
|
|
291
|
+
return Xe(e, t, a, !1);
|
|
173
292
|
}
|
|
174
|
-
function
|
|
175
|
-
let r = typeof t == "string" ?
|
|
176
|
-
if (
|
|
293
|
+
function Xe(e, t, a, n) {
|
|
294
|
+
let r = typeof t == "string" ? W(t) : t, o = O(r.pathname || "/", a);
|
|
295
|
+
if (o == null)
|
|
177
296
|
return null;
|
|
178
|
-
let
|
|
179
|
-
|
|
180
|
-
let
|
|
181
|
-
for (let s = 0;
|
|
182
|
-
let i =
|
|
183
|
-
|
|
184
|
-
|
|
297
|
+
let l = be(e);
|
|
298
|
+
Ke(l);
|
|
299
|
+
let u = null;
|
|
300
|
+
for (let s = 0; u == null && s < l.length; ++s) {
|
|
301
|
+
let i = nt(o);
|
|
302
|
+
u = at(
|
|
303
|
+
l[s],
|
|
185
304
|
i,
|
|
186
|
-
|
|
305
|
+
n
|
|
187
306
|
);
|
|
188
307
|
}
|
|
189
|
-
return
|
|
308
|
+
return u;
|
|
190
309
|
}
|
|
191
|
-
function
|
|
192
|
-
let r = (
|
|
310
|
+
function be(e, t = [], a = [], n = "") {
|
|
311
|
+
let r = (o, l, u) => {
|
|
193
312
|
let s = {
|
|
194
|
-
relativePath:
|
|
195
|
-
caseSensitive:
|
|
196
|
-
childrenIndex:
|
|
197
|
-
route:
|
|
313
|
+
relativePath: u === void 0 ? o.path || "" : u,
|
|
314
|
+
caseSensitive: o.caseSensitive === !0,
|
|
315
|
+
childrenIndex: l,
|
|
316
|
+
route: o
|
|
198
317
|
};
|
|
199
318
|
s.relativePath.startsWith("/") && (w(
|
|
200
|
-
s.relativePath.startsWith(
|
|
201
|
-
`Absolute route path "${s.relativePath}" nested under path "${
|
|
202
|
-
), s.relativePath = s.relativePath.slice(
|
|
203
|
-
let i =
|
|
204
|
-
|
|
319
|
+
s.relativePath.startsWith(n),
|
|
320
|
+
`Absolute route path "${s.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
321
|
+
), s.relativePath = s.relativePath.slice(n.length));
|
|
322
|
+
let i = P([n, s.relativePath]), m = a.concat(s);
|
|
323
|
+
o.children && o.children.length > 0 && (w(
|
|
205
324
|
// Our types know better, but runtime JS may not!
|
|
206
325
|
// @ts-expect-error
|
|
207
|
-
|
|
326
|
+
o.index !== !0,
|
|
208
327
|
`Index routes must not have child routes. Please remove all child routes from route path "${i}".`
|
|
209
|
-
),
|
|
328
|
+
), be(o.children, t, m, i)), !(o.path == null && !o.index) && t.push({
|
|
210
329
|
path: i,
|
|
211
|
-
score:
|
|
330
|
+
score: et(i, o.index),
|
|
212
331
|
routesMeta: m
|
|
213
332
|
});
|
|
214
333
|
};
|
|
215
|
-
return e.forEach((
|
|
216
|
-
var
|
|
217
|
-
if (
|
|
218
|
-
r(
|
|
334
|
+
return e.forEach((o, l) => {
|
|
335
|
+
var u;
|
|
336
|
+
if (o.path === "" || !((u = o.path) != null && u.includes("?")))
|
|
337
|
+
r(o, l);
|
|
219
338
|
else
|
|
220
|
-
for (let s of
|
|
221
|
-
r(
|
|
339
|
+
for (let s of xe(o.path))
|
|
340
|
+
r(o, l, s);
|
|
222
341
|
}), t;
|
|
223
342
|
}
|
|
224
|
-
function
|
|
343
|
+
function xe(e) {
|
|
225
344
|
let t = e.split("/");
|
|
226
345
|
if (t.length === 0) return [];
|
|
227
|
-
let [a, ...
|
|
228
|
-
if (
|
|
229
|
-
return r ? [
|
|
230
|
-
let
|
|
231
|
-
return
|
|
232
|
-
...
|
|
233
|
-
(s) => s === "" ?
|
|
346
|
+
let [a, ...n] = t, r = a.endsWith("?"), o = a.replace(/\?$/, "");
|
|
347
|
+
if (n.length === 0)
|
|
348
|
+
return r ? [o, ""] : [o];
|
|
349
|
+
let l = xe(n.join("/")), u = [];
|
|
350
|
+
return u.push(
|
|
351
|
+
...l.map(
|
|
352
|
+
(s) => s === "" ? o : [o, s].join("/")
|
|
234
353
|
)
|
|
235
|
-
), r &&
|
|
354
|
+
), r && u.push(...l), u.map(
|
|
236
355
|
(s) => e.startsWith("/") && s === "" ? "/" : s
|
|
237
356
|
);
|
|
238
357
|
}
|
|
239
|
-
function
|
|
358
|
+
function Ke(e) {
|
|
240
359
|
e.sort(
|
|
241
|
-
(t, a) => t.score !== a.score ? a.score - t.score :
|
|
242
|
-
t.routesMeta.map((
|
|
243
|
-
a.routesMeta.map((
|
|
360
|
+
(t, a) => t.score !== a.score ? a.score - t.score : tt(
|
|
361
|
+
t.routesMeta.map((n) => n.childrenIndex),
|
|
362
|
+
a.routesMeta.map((n) => n.childrenIndex)
|
|
244
363
|
)
|
|
245
364
|
);
|
|
246
365
|
}
|
|
247
|
-
var
|
|
248
|
-
function
|
|
249
|
-
let a = e.split("/"),
|
|
250
|
-
return a.some(
|
|
251
|
-
(r,
|
|
252
|
-
|
|
366
|
+
var Je = /^:[\w-]+$/, Ye = 3, qe = 2, Ge = 1, Qe = 10, Ze = -2, pe = (e) => e === "*";
|
|
367
|
+
function et(e, t) {
|
|
368
|
+
let a = e.split("/"), n = a.length;
|
|
369
|
+
return a.some(pe) && (n += Ze), t && (n += qe), a.filter((r) => !pe(r)).reduce(
|
|
370
|
+
(r, o) => r + (Je.test(o) ? Ye : o === "" ? Ge : Qe),
|
|
371
|
+
n
|
|
253
372
|
);
|
|
254
373
|
}
|
|
255
|
-
function
|
|
256
|
-
return e.length === t.length && e.slice(0, -1).every((
|
|
374
|
+
function tt(e, t) {
|
|
375
|
+
return e.length === t.length && e.slice(0, -1).every((n, r) => n === t[r]) ? (
|
|
257
376
|
// If two routes are siblings, we should try to match the earlier sibling
|
|
258
377
|
// first. This allows people to have fine-grained control over the matching
|
|
259
378
|
// behavior by simply putting routes with identical paths in the order they
|
|
@@ -265,251 +384,251 @@ function qe(e, t) {
|
|
|
265
384
|
0
|
|
266
385
|
);
|
|
267
386
|
}
|
|
268
|
-
function
|
|
269
|
-
let { routesMeta:
|
|
270
|
-
for (let
|
|
271
|
-
let s =
|
|
387
|
+
function at(e, t, a = !1) {
|
|
388
|
+
let { routesMeta: n } = e, r = {}, o = "/", l = [];
|
|
389
|
+
for (let u = 0; u < n.length; ++u) {
|
|
390
|
+
let s = n[u], i = u === n.length - 1, m = o === "/" ? t : t.slice(o.length) || "/", y = Y(
|
|
272
391
|
{ path: s.relativePath, caseSensitive: s.caseSensitive, end: i },
|
|
273
392
|
m
|
|
274
|
-
),
|
|
275
|
-
if (!
|
|
393
|
+
), d = s.route;
|
|
394
|
+
if (!y && i && a && !n[n.length - 1].route.index && (y = Y(
|
|
276
395
|
{
|
|
277
396
|
path: s.relativePath,
|
|
278
397
|
caseSensitive: s.caseSensitive,
|
|
279
398
|
end: !1
|
|
280
399
|
},
|
|
281
400
|
m
|
|
282
|
-
)), !
|
|
401
|
+
)), !y)
|
|
283
402
|
return null;
|
|
284
|
-
Object.assign(r,
|
|
403
|
+
Object.assign(r, y.params), l.push({
|
|
285
404
|
// TODO: Can this as be avoided?
|
|
286
405
|
params: r,
|
|
287
|
-
pathname:
|
|
288
|
-
pathnameBase:
|
|
289
|
-
|
|
406
|
+
pathname: P([o, y.pathname]),
|
|
407
|
+
pathnameBase: lt(
|
|
408
|
+
P([o, y.pathnameBase])
|
|
290
409
|
),
|
|
291
|
-
route:
|
|
292
|
-
}),
|
|
410
|
+
route: d
|
|
411
|
+
}), y.pathnameBase !== "/" && (o = P([o, y.pathnameBase]));
|
|
293
412
|
}
|
|
294
|
-
return
|
|
413
|
+
return l;
|
|
295
414
|
}
|
|
296
|
-
function
|
|
415
|
+
function Y(e, t) {
|
|
297
416
|
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
298
|
-
let [a,
|
|
417
|
+
let [a, n] = rt(
|
|
299
418
|
e.path,
|
|
300
419
|
e.caseSensitive,
|
|
301
420
|
e.end
|
|
302
421
|
), r = t.match(a);
|
|
303
422
|
if (!r) return null;
|
|
304
|
-
let
|
|
423
|
+
let o = r[0], l = o.replace(/(.)\/+$/, "$1"), u = r.slice(1);
|
|
305
424
|
return {
|
|
306
|
-
params:
|
|
307
|
-
(i, { paramName: m, isOptional:
|
|
425
|
+
params: n.reduce(
|
|
426
|
+
(i, { paramName: m, isOptional: y }, d) => {
|
|
308
427
|
if (m === "*") {
|
|
309
|
-
let
|
|
310
|
-
|
|
428
|
+
let c = u[d] || "";
|
|
429
|
+
l = o.slice(0, o.length - c.length).replace(/(.)\/+$/, "$1");
|
|
311
430
|
}
|
|
312
|
-
const h =
|
|
313
|
-
return
|
|
431
|
+
const h = u[d];
|
|
432
|
+
return y && !h ? i[m] = void 0 : i[m] = (h || "").replace(/%2F/g, "/"), i;
|
|
314
433
|
},
|
|
315
434
|
{}
|
|
316
435
|
),
|
|
317
|
-
pathname:
|
|
318
|
-
pathnameBase:
|
|
436
|
+
pathname: o,
|
|
437
|
+
pathnameBase: l,
|
|
319
438
|
pattern: e
|
|
320
439
|
};
|
|
321
440
|
}
|
|
322
|
-
function
|
|
323
|
-
|
|
441
|
+
function rt(e, t = !1, a = !0) {
|
|
442
|
+
R(
|
|
324
443
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
325
444
|
`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(/\*$/, "/*")}".`
|
|
326
445
|
);
|
|
327
|
-
let
|
|
446
|
+
let n = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
328
447
|
/\/:([\w-]+)(\?)?/g,
|
|
329
|
-
(
|
|
448
|
+
(l, u, s) => (n.push({ paramName: u, isOptional: s != null }), s ? "/?([^\\/]+)?" : "/([^\\/]+)")
|
|
330
449
|
);
|
|
331
|
-
return e.endsWith("*") ? (
|
|
450
|
+
return e.endsWith("*") ? (n.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : a ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), n];
|
|
332
451
|
}
|
|
333
|
-
function
|
|
452
|
+
function nt(e) {
|
|
334
453
|
try {
|
|
335
454
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
336
455
|
} catch (t) {
|
|
337
|
-
return
|
|
456
|
+
return R(
|
|
338
457
|
!1,
|
|
339
458
|
`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}).`
|
|
340
459
|
), e;
|
|
341
460
|
}
|
|
342
461
|
}
|
|
343
|
-
function
|
|
462
|
+
function O(e, t) {
|
|
344
463
|
if (t === "/") return e;
|
|
345
464
|
if (!e.toLowerCase().startsWith(t.toLowerCase()))
|
|
346
465
|
return null;
|
|
347
|
-
let a = t.endsWith("/") ? t.length - 1 : t.length,
|
|
348
|
-
return
|
|
466
|
+
let a = t.endsWith("/") ? t.length - 1 : t.length, n = e.charAt(a);
|
|
467
|
+
return n && n !== "/" ? null : e.slice(a) || "/";
|
|
349
468
|
}
|
|
350
|
-
function
|
|
469
|
+
function ot(e, t = "/") {
|
|
351
470
|
let {
|
|
352
471
|
pathname: a,
|
|
353
|
-
search:
|
|
472
|
+
search: n = "",
|
|
354
473
|
hash: r = ""
|
|
355
|
-
} = typeof e == "string" ?
|
|
474
|
+
} = typeof e == "string" ? W(e) : e;
|
|
356
475
|
return {
|
|
357
|
-
pathname: a ? a.startsWith("/") ? a :
|
|
358
|
-
search:
|
|
359
|
-
hash:
|
|
476
|
+
pathname: a ? a.startsWith("/") ? a : it(a, t) : t,
|
|
477
|
+
search: ut(n),
|
|
478
|
+
hash: ft(r)
|
|
360
479
|
};
|
|
361
480
|
}
|
|
362
|
-
function
|
|
481
|
+
function it(e, t) {
|
|
363
482
|
let a = t.replace(/\/+$/, "").split("/");
|
|
364
483
|
return e.split("/").forEach((r) => {
|
|
365
484
|
r === ".." ? a.length > 1 && a.pop() : r !== "." && a.push(r);
|
|
366
485
|
}), a.length > 1 ? a.join("/") : "/";
|
|
367
486
|
}
|
|
368
|
-
function
|
|
487
|
+
function te(e, t, a, n) {
|
|
369
488
|
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
|
|
370
|
-
|
|
489
|
+
n
|
|
371
490
|
)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
372
491
|
}
|
|
373
|
-
function
|
|
492
|
+
function st(e) {
|
|
374
493
|
return e.filter(
|
|
375
494
|
(t, a) => a === 0 || t.route.path && t.route.path.length > 0
|
|
376
495
|
);
|
|
377
496
|
}
|
|
378
|
-
function
|
|
379
|
-
let t =
|
|
497
|
+
function we(e) {
|
|
498
|
+
let t = st(e);
|
|
380
499
|
return t.map(
|
|
381
|
-
(a,
|
|
500
|
+
(a, n) => n === t.length - 1 ? a.pathname : a.pathnameBase
|
|
382
501
|
);
|
|
383
502
|
}
|
|
384
|
-
function
|
|
503
|
+
function Te(e, t, a, n = !1) {
|
|
385
504
|
let r;
|
|
386
|
-
typeof e == "string" ? r =
|
|
505
|
+
typeof e == "string" ? r = W(e) : (r = { ...e }, w(
|
|
387
506
|
!r.pathname || !r.pathname.includes("?"),
|
|
388
|
-
|
|
507
|
+
te("?", "pathname", "search", r)
|
|
389
508
|
), w(
|
|
390
509
|
!r.pathname || !r.pathname.includes("#"),
|
|
391
|
-
|
|
510
|
+
te("#", "pathname", "hash", r)
|
|
392
511
|
), w(
|
|
393
512
|
!r.search || !r.search.includes("#"),
|
|
394
|
-
|
|
513
|
+
te("#", "search", "hash", r)
|
|
395
514
|
));
|
|
396
|
-
let
|
|
397
|
-
if (
|
|
398
|
-
|
|
515
|
+
let o = e === "" || r.pathname === "", l = o ? "/" : r.pathname, u;
|
|
516
|
+
if (l == null)
|
|
517
|
+
u = a;
|
|
399
518
|
else {
|
|
400
|
-
let
|
|
401
|
-
if (!
|
|
402
|
-
let
|
|
403
|
-
for (;
|
|
404
|
-
|
|
405
|
-
r.pathname =
|
|
519
|
+
let y = t.length - 1;
|
|
520
|
+
if (!n && l.startsWith("..")) {
|
|
521
|
+
let d = l.split("/");
|
|
522
|
+
for (; d[0] === ".."; )
|
|
523
|
+
d.shift(), y -= 1;
|
|
524
|
+
r.pathname = d.join("/");
|
|
406
525
|
}
|
|
407
|
-
|
|
526
|
+
u = y >= 0 ? t[y] : "/";
|
|
408
527
|
}
|
|
409
|
-
let s =
|
|
528
|
+
let s = ot(r, u), i = l && l !== "/" && l.endsWith("/"), m = (o || l === ".") && a.endsWith("/");
|
|
410
529
|
return !s.pathname.endsWith("/") && (i || m) && (s.pathname += "/"), s;
|
|
411
530
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
531
|
+
var P = (e) => e.join("/").replace(/\/\/+/g, "/"), lt = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), ut = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, ft = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
|
|
532
|
+
function ct(e) {
|
|
414
533
|
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
415
534
|
}
|
|
416
|
-
var
|
|
535
|
+
var ke = [
|
|
417
536
|
"POST",
|
|
418
537
|
"PUT",
|
|
419
538
|
"PATCH",
|
|
420
539
|
"DELETE"
|
|
421
540
|
];
|
|
422
541
|
new Set(
|
|
423
|
-
|
|
542
|
+
ke
|
|
424
543
|
);
|
|
425
|
-
var
|
|
544
|
+
var dt = [
|
|
426
545
|
"GET",
|
|
427
|
-
...
|
|
546
|
+
...ke
|
|
428
547
|
];
|
|
429
|
-
new Set(
|
|
430
|
-
var
|
|
431
|
-
|
|
432
|
-
var
|
|
433
|
-
|
|
434
|
-
var
|
|
548
|
+
new Set(dt);
|
|
549
|
+
var A = f.createContext(null);
|
|
550
|
+
A.displayName = "DataRouter";
|
|
551
|
+
var q = f.createContext(null);
|
|
552
|
+
q.displayName = "DataRouterState";
|
|
553
|
+
var Ee = f.createContext({
|
|
435
554
|
isTransitioning: !1
|
|
436
555
|
});
|
|
437
|
-
|
|
438
|
-
var
|
|
556
|
+
Ee.displayName = "ViewTransition";
|
|
557
|
+
var mt = f.createContext(
|
|
439
558
|
/* @__PURE__ */ new Map()
|
|
440
559
|
);
|
|
441
|
-
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
var
|
|
560
|
+
mt.displayName = "Fetchers";
|
|
561
|
+
var ht = f.createContext(null);
|
|
562
|
+
ht.displayName = "Await";
|
|
563
|
+
var S = f.createContext(
|
|
445
564
|
null
|
|
446
565
|
);
|
|
447
|
-
|
|
448
|
-
var
|
|
566
|
+
S.displayName = "Navigation";
|
|
567
|
+
var G = f.createContext(
|
|
449
568
|
null
|
|
450
569
|
);
|
|
451
|
-
|
|
452
|
-
var
|
|
570
|
+
G.displayName = "Location";
|
|
571
|
+
var I = f.createContext({
|
|
453
572
|
outlet: null,
|
|
454
573
|
matches: [],
|
|
455
574
|
isDataRoute: !1
|
|
456
575
|
});
|
|
457
|
-
|
|
458
|
-
var
|
|
459
|
-
|
|
460
|
-
function
|
|
576
|
+
I.displayName = "Route";
|
|
577
|
+
var oe = f.createContext(null);
|
|
578
|
+
oe.displayName = "RouteError";
|
|
579
|
+
function pt(e, { relative: t } = {}) {
|
|
461
580
|
w(
|
|
462
|
-
|
|
581
|
+
H(),
|
|
463
582
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
464
583
|
// router loaded. We can help them understand how to avoid that.
|
|
465
584
|
"useHref() may be used only in the context of a <Router> component."
|
|
466
585
|
);
|
|
467
|
-
let { basename: a, navigator:
|
|
468
|
-
return a !== "/" && (
|
|
586
|
+
let { basename: a, navigator: n } = f.useContext(S), { hash: r, pathname: o, search: l } = V(e, { relative: t }), u = o;
|
|
587
|
+
return a !== "/" && (u = o === "/" ? a : P([a, o])), n.createHref({ pathname: u, search: l, hash: r });
|
|
469
588
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
589
|
+
function H() {
|
|
590
|
+
return f.useContext(G) != null;
|
|
472
591
|
}
|
|
473
592
|
function N() {
|
|
474
593
|
return w(
|
|
475
|
-
|
|
594
|
+
H(),
|
|
476
595
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
477
596
|
// router loaded. We can help them understand how to avoid that.
|
|
478
597
|
"useLocation() may be used only in the context of a <Router> component."
|
|
479
|
-
),
|
|
598
|
+
), f.useContext(G).location;
|
|
480
599
|
}
|
|
481
|
-
var
|
|
482
|
-
function
|
|
483
|
-
|
|
600
|
+
var Ce = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
601
|
+
function Re(e) {
|
|
602
|
+
f.useContext(S).static || f.useLayoutEffect(e);
|
|
484
603
|
}
|
|
485
|
-
function
|
|
486
|
-
let { isDataRoute: e } =
|
|
487
|
-
return e ?
|
|
604
|
+
function Se() {
|
|
605
|
+
let { isDataRoute: e } = f.useContext(I);
|
|
606
|
+
return e ? St() : yt();
|
|
488
607
|
}
|
|
489
|
-
function
|
|
608
|
+
function yt() {
|
|
490
609
|
w(
|
|
491
|
-
|
|
610
|
+
H(),
|
|
492
611
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
493
612
|
// router loaded. We can help them understand how to avoid that.
|
|
494
613
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
495
614
|
);
|
|
496
|
-
let e =
|
|
497
|
-
return
|
|
498
|
-
|
|
499
|
-
}),
|
|
615
|
+
let e = f.useContext(A), { basename: t, navigator: a } = f.useContext(S), { matches: n } = f.useContext(I), { pathname: r } = N(), o = JSON.stringify(we(n)), l = f.useRef(!1);
|
|
616
|
+
return Re(() => {
|
|
617
|
+
l.current = !0;
|
|
618
|
+
}), f.useCallback(
|
|
500
619
|
(s, i = {}) => {
|
|
501
|
-
if (
|
|
620
|
+
if (R(l.current, Ce), !l.current) return;
|
|
502
621
|
if (typeof s == "number") {
|
|
503
622
|
a.go(s);
|
|
504
623
|
return;
|
|
505
624
|
}
|
|
506
|
-
let m =
|
|
625
|
+
let m = Te(
|
|
507
626
|
s,
|
|
508
|
-
JSON.parse(
|
|
627
|
+
JSON.parse(o),
|
|
509
628
|
r,
|
|
510
629
|
i.relative === "path"
|
|
511
630
|
);
|
|
512
|
-
e == null && t !== "/" && (m.pathname = m.pathname === "/" ? t :
|
|
631
|
+
e == null && t !== "/" && (m.pathname = m.pathname === "/" ? t : P([t, m.pathname])), (i.replace ? a.replace : a.push)(
|
|
513
632
|
m,
|
|
514
633
|
i.state,
|
|
515
634
|
i
|
|
@@ -518,86 +637,86 @@ function ft() {
|
|
|
518
637
|
[
|
|
519
638
|
t,
|
|
520
639
|
a,
|
|
521
|
-
|
|
640
|
+
o,
|
|
522
641
|
r,
|
|
523
642
|
e
|
|
524
643
|
]
|
|
525
644
|
);
|
|
526
645
|
}
|
|
527
|
-
|
|
528
|
-
function
|
|
529
|
-
let { matches: a } =
|
|
530
|
-
return
|
|
531
|
-
() =>
|
|
646
|
+
f.createContext(null);
|
|
647
|
+
function V(e, { relative: t } = {}) {
|
|
648
|
+
let { matches: a } = f.useContext(I), { pathname: n } = N(), r = JSON.stringify(we(a));
|
|
649
|
+
return f.useMemo(
|
|
650
|
+
() => Te(
|
|
532
651
|
e,
|
|
533
652
|
JSON.parse(r),
|
|
534
|
-
|
|
653
|
+
n,
|
|
535
654
|
t === "path"
|
|
536
655
|
),
|
|
537
|
-
[e, r,
|
|
656
|
+
[e, r, n, t]
|
|
538
657
|
);
|
|
539
658
|
}
|
|
540
|
-
function
|
|
659
|
+
function gt(e, t, a, n) {
|
|
541
660
|
w(
|
|
542
|
-
|
|
661
|
+
H(),
|
|
543
662
|
// TODO: This error is probably because they somehow have 2 versions of the
|
|
544
663
|
// router loaded. We can help them understand how to avoid that.
|
|
545
664
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
546
665
|
);
|
|
547
|
-
let { navigator: r, static:
|
|
666
|
+
let { navigator: r, static: o } = f.useContext(S), { matches: l } = f.useContext(I), u = l[l.length - 1], s = u ? u.params : {}, i = u ? u.pathname : "/", m = u ? u.pathnameBase : "/", y = u && u.route;
|
|
548
667
|
{
|
|
549
|
-
let
|
|
550
|
-
|
|
668
|
+
let _ = y && y.path || "";
|
|
669
|
+
Pe(
|
|
551
670
|
i,
|
|
552
|
-
!
|
|
553
|
-
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${i}" (under <Route path="${
|
|
671
|
+
!y || _.endsWith("*") || _.endsWith("*?"),
|
|
672
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${i}" (under <Route path="${_}">) 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.
|
|
554
673
|
|
|
555
|
-
Please change the parent <Route path="${
|
|
674
|
+
Please change the parent <Route path="${_}"> to <Route path="${_ === "/" ? "*" : `${_}/*`}">.`
|
|
556
675
|
);
|
|
557
676
|
}
|
|
558
|
-
let
|
|
559
|
-
h =
|
|
560
|
-
let
|
|
677
|
+
let d = N(), h;
|
|
678
|
+
h = d;
|
|
679
|
+
let c = h.pathname || "/", v = c;
|
|
561
680
|
if (m !== "/") {
|
|
562
|
-
let
|
|
563
|
-
v = "/" +
|
|
681
|
+
let _ = m.replace(/^\//, "").split("/");
|
|
682
|
+
v = "/" + c.replace(/^\//, "").split("/").slice(_.length).join("/");
|
|
564
683
|
}
|
|
565
|
-
let
|
|
566
|
-
return
|
|
567
|
-
|
|
684
|
+
let g = !o && a && a.matches && a.matches.length > 0 ? a.matches : ve(e, { pathname: v });
|
|
685
|
+
return R(
|
|
686
|
+
y || g != null,
|
|
568
687
|
`No routes matched location "${h.pathname}${h.search}${h.hash}" `
|
|
569
|
-
),
|
|
570
|
-
|
|
688
|
+
), R(
|
|
689
|
+
g == null || g[g.length - 1].route.element !== void 0 || g[g.length - 1].route.Component !== void 0 || g[g.length - 1].route.lazy !== void 0,
|
|
571
690
|
`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
572
|
-
),
|
|
573
|
-
|
|
574
|
-
(
|
|
575
|
-
params: Object.assign({}, s,
|
|
576
|
-
pathname:
|
|
691
|
+
), wt(
|
|
692
|
+
g && g.map(
|
|
693
|
+
(_) => Object.assign({}, _, {
|
|
694
|
+
params: Object.assign({}, s, _.params),
|
|
695
|
+
pathname: P([
|
|
577
696
|
m,
|
|
578
697
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
579
|
-
r.encodeLocation ? r.encodeLocation(
|
|
698
|
+
r.encodeLocation ? r.encodeLocation(_.pathname).pathname : _.pathname
|
|
580
699
|
]),
|
|
581
|
-
pathnameBase:
|
|
700
|
+
pathnameBase: _.pathnameBase === "/" ? m : P([
|
|
582
701
|
m,
|
|
583
702
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
584
|
-
r.encodeLocation ? r.encodeLocation(
|
|
703
|
+
r.encodeLocation ? r.encodeLocation(_.pathnameBase).pathname : _.pathnameBase
|
|
585
704
|
])
|
|
586
705
|
})
|
|
587
706
|
),
|
|
588
|
-
|
|
707
|
+
l,
|
|
589
708
|
a,
|
|
590
|
-
|
|
709
|
+
n
|
|
591
710
|
);
|
|
592
711
|
}
|
|
593
|
-
function
|
|
594
|
-
let e =
|
|
712
|
+
function _t() {
|
|
713
|
+
let e = Rt(), t = ct(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), a = e instanceof Error ? e.stack : null, n = "rgba(200,200,200, 0.5)", r = { padding: "0.5rem", backgroundColor: n }, o = { padding: "2px 4px", backgroundColor: n }, l = null;
|
|
595
714
|
return console.error(
|
|
596
715
|
"Error handled by React Router default ErrorBoundary:",
|
|
597
716
|
e
|
|
598
|
-
),
|
|
717
|
+
), l = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, t), a ? /* @__PURE__ */ f.createElement("pre", { style: r }, a) : null, l);
|
|
599
718
|
}
|
|
600
|
-
var
|
|
719
|
+
var vt = /* @__PURE__ */ f.createElement(_t, null), bt = class extends f.Component {
|
|
601
720
|
constructor(e) {
|
|
602
721
|
super(e), this.state = {
|
|
603
722
|
location: e.location,
|
|
@@ -627,8 +746,8 @@ var mt = /* @__PURE__ */ l.createElement(dt, null), ht = class extends l.Compone
|
|
|
627
746
|
);
|
|
628
747
|
}
|
|
629
748
|
render() {
|
|
630
|
-
return this.state.error !== void 0 ? /* @__PURE__ */
|
|
631
|
-
|
|
749
|
+
return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(I.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
|
|
750
|
+
oe.Provider,
|
|
632
751
|
{
|
|
633
752
|
value: this.state.error,
|
|
634
753
|
children: this.props.component
|
|
@@ -636,11 +755,11 @@ var mt = /* @__PURE__ */ l.createElement(dt, null), ht = class extends l.Compone
|
|
|
636
755
|
)) : this.props.children;
|
|
637
756
|
}
|
|
638
757
|
};
|
|
639
|
-
function
|
|
640
|
-
let
|
|
641
|
-
return
|
|
758
|
+
function xt({ routeContext: e, match: t, children: a }) {
|
|
759
|
+
let n = f.useContext(A);
|
|
760
|
+
return n && n.static && n.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (n.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ f.createElement(I.Provider, { value: e }, a);
|
|
642
761
|
}
|
|
643
|
-
function
|
|
762
|
+
function wt(e, t = [], a = null, n = null) {
|
|
644
763
|
if (e == null) {
|
|
645
764
|
if (!a)
|
|
646
765
|
return null;
|
|
@@ -651,44 +770,44 @@ function yt(e, t = [], a = null, o = null) {
|
|
|
651
770
|
else
|
|
652
771
|
return null;
|
|
653
772
|
}
|
|
654
|
-
let r = e,
|
|
655
|
-
if (
|
|
773
|
+
let r = e, o = a == null ? void 0 : a.errors;
|
|
774
|
+
if (o != null) {
|
|
656
775
|
let s = r.findIndex(
|
|
657
|
-
(i) => i.route.id && (
|
|
776
|
+
(i) => i.route.id && (o == null ? void 0 : o[i.route.id]) !== void 0
|
|
658
777
|
);
|
|
659
778
|
w(
|
|
660
779
|
s >= 0,
|
|
661
780
|
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
662
|
-
|
|
781
|
+
o
|
|
663
782
|
).join(",")}`
|
|
664
783
|
), r = r.slice(
|
|
665
784
|
0,
|
|
666
785
|
Math.min(r.length, s + 1)
|
|
667
786
|
);
|
|
668
787
|
}
|
|
669
|
-
let
|
|
788
|
+
let l = !1, u = -1;
|
|
670
789
|
if (a)
|
|
671
790
|
for (let s = 0; s < r.length; s++) {
|
|
672
791
|
let i = r[s];
|
|
673
|
-
if ((i.route.HydrateFallback || i.route.hydrateFallbackElement) && (
|
|
674
|
-
let { loaderData: m, errors:
|
|
675
|
-
if (i.route.lazy ||
|
|
676
|
-
|
|
792
|
+
if ((i.route.HydrateFallback || i.route.hydrateFallbackElement) && (u = s), i.route.id) {
|
|
793
|
+
let { loaderData: m, errors: y } = a, d = i.route.loader && !m.hasOwnProperty(i.route.id) && (!y || y[i.route.id] === void 0);
|
|
794
|
+
if (i.route.lazy || d) {
|
|
795
|
+
l = !0, u >= 0 ? r = r.slice(0, u + 1) : r = [r[0]];
|
|
677
796
|
break;
|
|
678
797
|
}
|
|
679
798
|
}
|
|
680
799
|
}
|
|
681
800
|
return r.reduceRight((s, i, m) => {
|
|
682
|
-
let
|
|
683
|
-
a && (
|
|
801
|
+
let y, d = !1, h = null, c = null;
|
|
802
|
+
a && (y = o && i.route.id ? o[i.route.id] : void 0, h = i.route.errorElement || vt, l && (u < 0 && m === 0 ? (Pe(
|
|
684
803
|
"route-fallback",
|
|
685
804
|
!1,
|
|
686
805
|
"No `HydrateFallback` element provided to render during initial hydration"
|
|
687
|
-
),
|
|
688
|
-
let v = t.concat(r.slice(0, m + 1)),
|
|
689
|
-
let
|
|
690
|
-
return
|
|
691
|
-
|
|
806
|
+
), d = !0, c = null) : u === m && (d = !0, c = i.route.hydrateFallbackElement || null)));
|
|
807
|
+
let v = t.concat(r.slice(0, m + 1)), g = () => {
|
|
808
|
+
let p;
|
|
809
|
+
return y ? p = h : d ? p = c : i.route.Component ? p = /* @__PURE__ */ f.createElement(i.route.Component, null) : i.route.element ? p = i.route.element : p = s, /* @__PURE__ */ f.createElement(
|
|
810
|
+
xt,
|
|
692
811
|
{
|
|
693
812
|
match: i,
|
|
694
813
|
routeContext: {
|
|
@@ -696,170 +815,216 @@ function yt(e, t = [], a = null, o = null) {
|
|
|
696
815
|
matches: v,
|
|
697
816
|
isDataRoute: a != null
|
|
698
817
|
},
|
|
699
|
-
children:
|
|
818
|
+
children: p
|
|
700
819
|
}
|
|
701
820
|
);
|
|
702
821
|
};
|
|
703
|
-
return a && (i.route.ErrorBoundary || i.route.errorElement || m === 0) ? /* @__PURE__ */
|
|
704
|
-
|
|
822
|
+
return a && (i.route.ErrorBoundary || i.route.errorElement || m === 0) ? /* @__PURE__ */ f.createElement(
|
|
823
|
+
bt,
|
|
705
824
|
{
|
|
706
825
|
location: a.location,
|
|
707
826
|
revalidation: a.revalidation,
|
|
708
827
|
component: h,
|
|
709
|
-
error:
|
|
710
|
-
children:
|
|
828
|
+
error: y,
|
|
829
|
+
children: g(),
|
|
711
830
|
routeContext: { outlet: null, matches: v, isDataRoute: !0 }
|
|
712
831
|
}
|
|
713
|
-
) :
|
|
832
|
+
) : g();
|
|
714
833
|
}, null);
|
|
715
834
|
}
|
|
716
|
-
function
|
|
835
|
+
function ie(e) {
|
|
717
836
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
718
837
|
}
|
|
719
|
-
function
|
|
720
|
-
let t =
|
|
721
|
-
return w(t,
|
|
838
|
+
function Tt(e) {
|
|
839
|
+
let t = f.useContext(A);
|
|
840
|
+
return w(t, ie(e)), t;
|
|
722
841
|
}
|
|
723
|
-
function
|
|
724
|
-
let t =
|
|
725
|
-
return w(t,
|
|
842
|
+
function kt(e) {
|
|
843
|
+
let t = f.useContext(q);
|
|
844
|
+
return w(t, ie(e)), t;
|
|
726
845
|
}
|
|
727
|
-
function
|
|
728
|
-
let t =
|
|
729
|
-
return w(t,
|
|
846
|
+
function Et(e) {
|
|
847
|
+
let t = f.useContext(I);
|
|
848
|
+
return w(t, ie(e)), t;
|
|
730
849
|
}
|
|
731
|
-
function
|
|
732
|
-
let t =
|
|
850
|
+
function se(e) {
|
|
851
|
+
let t = Et(e), a = t.matches[t.matches.length - 1];
|
|
733
852
|
return w(
|
|
734
853
|
a.route.id,
|
|
735
854
|
`${e} can only be used on routes that contain a unique "id"`
|
|
736
855
|
), a.route.id;
|
|
737
856
|
}
|
|
738
|
-
function
|
|
739
|
-
return
|
|
857
|
+
function Ct() {
|
|
858
|
+
return se(
|
|
740
859
|
"useRouteId"
|
|
741
860
|
/* UseRouteId */
|
|
742
861
|
);
|
|
743
862
|
}
|
|
744
|
-
function
|
|
745
|
-
var
|
|
746
|
-
let e =
|
|
863
|
+
function Rt() {
|
|
864
|
+
var n;
|
|
865
|
+
let e = f.useContext(oe), t = kt(
|
|
747
866
|
"useRouteError"
|
|
748
867
|
/* UseRouteError */
|
|
749
|
-
), a =
|
|
868
|
+
), a = se(
|
|
750
869
|
"useRouteError"
|
|
751
870
|
/* UseRouteError */
|
|
752
871
|
);
|
|
753
|
-
return e !== void 0 ? e : (
|
|
872
|
+
return e !== void 0 ? e : (n = t.errors) == null ? void 0 : n[a];
|
|
754
873
|
}
|
|
755
|
-
function
|
|
756
|
-
let { router: e } =
|
|
874
|
+
function St() {
|
|
875
|
+
let { router: e } = Tt(
|
|
757
876
|
"useNavigate"
|
|
758
877
|
/* UseNavigateStable */
|
|
759
|
-
), t =
|
|
878
|
+
), t = se(
|
|
760
879
|
"useNavigate"
|
|
761
880
|
/* UseNavigateStable */
|
|
762
|
-
), a =
|
|
763
|
-
return
|
|
881
|
+
), a = f.useRef(!1);
|
|
882
|
+
return Re(() => {
|
|
764
883
|
a.current = !0;
|
|
765
|
-
}),
|
|
766
|
-
async (r,
|
|
767
|
-
|
|
884
|
+
}), f.useCallback(
|
|
885
|
+
async (r, o = {}) => {
|
|
886
|
+
R(a.current, Ce), a.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...o }));
|
|
768
887
|
},
|
|
769
888
|
[e, t]
|
|
770
889
|
);
|
|
771
890
|
}
|
|
772
|
-
var
|
|
773
|
-
function
|
|
774
|
-
!t && !
|
|
891
|
+
var ye = {};
|
|
892
|
+
function Pe(e, t, a) {
|
|
893
|
+
!t && !ye[e] && (ye[e] = !0, R(!1, a));
|
|
775
894
|
}
|
|
776
|
-
|
|
777
|
-
function
|
|
895
|
+
f.memo(Pt);
|
|
896
|
+
function Pt({
|
|
778
897
|
routes: e,
|
|
779
898
|
future: t,
|
|
780
899
|
state: a
|
|
781
900
|
}) {
|
|
782
|
-
return
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
|
|
901
|
+
return gt(e, void 0, a, t);
|
|
902
|
+
}
|
|
903
|
+
function It({
|
|
904
|
+
basename: e = "/",
|
|
905
|
+
children: t = null,
|
|
906
|
+
location: a,
|
|
907
|
+
navigationType: n = "POP",
|
|
908
|
+
navigator: r,
|
|
909
|
+
static: o = !1
|
|
910
|
+
}) {
|
|
911
|
+
w(
|
|
912
|
+
!H(),
|
|
913
|
+
"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
|
|
914
|
+
);
|
|
915
|
+
let l = e.replace(/^\/*/, "/"), u = f.useMemo(
|
|
916
|
+
() => ({
|
|
917
|
+
basename: l,
|
|
918
|
+
navigator: r,
|
|
919
|
+
static: o,
|
|
920
|
+
future: {}
|
|
921
|
+
}),
|
|
922
|
+
[l, r, o]
|
|
923
|
+
);
|
|
924
|
+
typeof a == "string" && (a = W(a));
|
|
925
|
+
let {
|
|
926
|
+
pathname: s = "/",
|
|
927
|
+
search: i = "",
|
|
928
|
+
hash: m = "",
|
|
929
|
+
state: y = null,
|
|
930
|
+
key: d = "default"
|
|
931
|
+
} = a, h = f.useMemo(() => {
|
|
932
|
+
let c = O(s, l);
|
|
933
|
+
return c == null ? null : {
|
|
934
|
+
location: {
|
|
935
|
+
pathname: c,
|
|
936
|
+
search: i,
|
|
937
|
+
hash: m,
|
|
938
|
+
state: y,
|
|
939
|
+
key: d
|
|
940
|
+
},
|
|
941
|
+
navigationType: n
|
|
942
|
+
};
|
|
943
|
+
}, [l, s, i, m, y, d, n]);
|
|
944
|
+
return R(
|
|
945
|
+
h != null,
|
|
946
|
+
`<Router basename="${l}"> is not able to match the URL "${s}${i}${m}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
947
|
+
), h == null ? null : /* @__PURE__ */ f.createElement(S.Provider, { value: u }, /* @__PURE__ */ f.createElement(G.Provider, { children: t, value: h }));
|
|
948
|
+
}
|
|
949
|
+
var K = "get", J = "application/x-www-form-urlencoded";
|
|
950
|
+
function Q(e) {
|
|
786
951
|
return e != null && typeof e.tagName == "string";
|
|
787
952
|
}
|
|
788
|
-
function
|
|
789
|
-
return
|
|
953
|
+
function Lt(e) {
|
|
954
|
+
return Q(e) && e.tagName.toLowerCase() === "button";
|
|
790
955
|
}
|
|
791
|
-
function
|
|
792
|
-
return
|
|
956
|
+
function $t(e) {
|
|
957
|
+
return Q(e) && e.tagName.toLowerCase() === "form";
|
|
793
958
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
959
|
+
function Ot(e) {
|
|
960
|
+
return Q(e) && e.tagName.toLowerCase() === "input";
|
|
796
961
|
}
|
|
797
|
-
function
|
|
962
|
+
function Dt(e) {
|
|
798
963
|
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
799
964
|
}
|
|
800
|
-
function
|
|
965
|
+
function Nt(e, t) {
|
|
801
966
|
return e.button === 0 && // Ignore everything but left clicks
|
|
802
967
|
(!t || t === "_self") && // Let browser handle "target=_blank" etc.
|
|
803
|
-
!
|
|
968
|
+
!Dt(e);
|
|
804
969
|
}
|
|
805
|
-
var
|
|
806
|
-
function
|
|
807
|
-
if (
|
|
970
|
+
var X = null;
|
|
971
|
+
function Ft() {
|
|
972
|
+
if (X === null)
|
|
808
973
|
try {
|
|
809
974
|
new FormData(
|
|
810
975
|
document.createElement("form"),
|
|
811
976
|
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
812
977
|
0
|
|
813
|
-
),
|
|
978
|
+
), X = !1;
|
|
814
979
|
} catch {
|
|
815
|
-
|
|
980
|
+
X = !0;
|
|
816
981
|
}
|
|
817
|
-
return
|
|
982
|
+
return X;
|
|
818
983
|
}
|
|
819
|
-
var
|
|
984
|
+
var At = /* @__PURE__ */ new Set([
|
|
820
985
|
"application/x-www-form-urlencoded",
|
|
821
986
|
"multipart/form-data",
|
|
822
987
|
"text/plain"
|
|
823
988
|
]);
|
|
824
|
-
function
|
|
825
|
-
return e != null && !
|
|
989
|
+
function ae(e) {
|
|
990
|
+
return e != null && !At.has(e) ? (R(
|
|
826
991
|
!1,
|
|
827
|
-
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${
|
|
992
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${J}"`
|
|
828
993
|
), null) : e;
|
|
829
994
|
}
|
|
830
|
-
function
|
|
831
|
-
let a,
|
|
832
|
-
if (
|
|
833
|
-
let
|
|
834
|
-
|
|
835
|
-
} else if (
|
|
836
|
-
let
|
|
837
|
-
if (
|
|
995
|
+
function zt(e, t) {
|
|
996
|
+
let a, n, r, o, l;
|
|
997
|
+
if ($t(e)) {
|
|
998
|
+
let u = e.getAttribute("action");
|
|
999
|
+
n = u ? O(u, t) : null, a = e.getAttribute("method") || K, r = ae(e.getAttribute("enctype")) || J, o = new FormData(e);
|
|
1000
|
+
} else if (Lt(e) || Ot(e) && (e.type === "submit" || e.type === "image")) {
|
|
1001
|
+
let u = e.form;
|
|
1002
|
+
if (u == null)
|
|
838
1003
|
throw new Error(
|
|
839
1004
|
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
840
1005
|
);
|
|
841
|
-
let s = e.getAttribute("formaction") ||
|
|
842
|
-
if (
|
|
843
|
-
let { name: i, type: m, value:
|
|
1006
|
+
let s = e.getAttribute("formaction") || u.getAttribute("action");
|
|
1007
|
+
if (n = s ? O(s, t) : null, a = e.getAttribute("formmethod") || u.getAttribute("method") || K, r = ae(e.getAttribute("formenctype")) || ae(u.getAttribute("enctype")) || J, o = new FormData(u, e), !Ft()) {
|
|
1008
|
+
let { name: i, type: m, value: y } = e;
|
|
844
1009
|
if (m === "image") {
|
|
845
|
-
let
|
|
846
|
-
|
|
847
|
-
} else i &&
|
|
1010
|
+
let d = i ? `${i}.` : "";
|
|
1011
|
+
o.append(`${d}x`, "0"), o.append(`${d}y`, "0");
|
|
1012
|
+
} else i && o.append(i, y);
|
|
848
1013
|
}
|
|
849
1014
|
} else {
|
|
850
|
-
if (
|
|
1015
|
+
if (Q(e))
|
|
851
1016
|
throw new Error(
|
|
852
1017
|
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
853
1018
|
);
|
|
854
|
-
a =
|
|
1019
|
+
a = K, n = null, r = J, l = e;
|
|
855
1020
|
}
|
|
856
|
-
return
|
|
1021
|
+
return o && r === "text/plain" && (l = o, o = void 0), { action: n, method: a.toLowerCase(), encType: r, formData: o, body: l };
|
|
857
1022
|
}
|
|
858
|
-
function
|
|
1023
|
+
function le(e, t) {
|
|
859
1024
|
if (e === !1 || e === null || typeof e > "u")
|
|
860
1025
|
throw new Error(t);
|
|
861
1026
|
}
|
|
862
|
-
async function
|
|
1027
|
+
async function Ut(e, t) {
|
|
863
1028
|
if (e.id in t)
|
|
864
1029
|
return t[e.id];
|
|
865
1030
|
try {
|
|
@@ -876,28 +1041,28 @@ async function $t(e, t) {
|
|
|
876
1041
|
});
|
|
877
1042
|
}
|
|
878
1043
|
}
|
|
879
|
-
function
|
|
1044
|
+
function Mt(e) {
|
|
880
1045
|
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";
|
|
881
1046
|
}
|
|
882
|
-
async function
|
|
883
|
-
let
|
|
1047
|
+
async function Bt(e, t, a) {
|
|
1048
|
+
let n = await Promise.all(
|
|
884
1049
|
e.map(async (r) => {
|
|
885
|
-
let
|
|
886
|
-
if (
|
|
887
|
-
let
|
|
888
|
-
return
|
|
1050
|
+
let o = t.routes[r.route.id];
|
|
1051
|
+
if (o) {
|
|
1052
|
+
let l = await Ut(o, a);
|
|
1053
|
+
return l.links ? l.links() : [];
|
|
889
1054
|
}
|
|
890
1055
|
return [];
|
|
891
1056
|
})
|
|
892
1057
|
);
|
|
893
|
-
return
|
|
894
|
-
|
|
1058
|
+
return jt(
|
|
1059
|
+
n.flat(1).filter(Mt).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
|
|
895
1060
|
(r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
|
|
896
1061
|
)
|
|
897
1062
|
);
|
|
898
1063
|
}
|
|
899
|
-
function
|
|
900
|
-
let
|
|
1064
|
+
function ge(e, t, a, n, r, o) {
|
|
1065
|
+
let l = (s, i) => a[i] ? s.route.id !== a[i].route.id : !0, u = (s, i) => {
|
|
901
1066
|
var m;
|
|
902
1067
|
return (
|
|
903
1068
|
// param change, /users/123 -> /users/456
|
|
@@ -906,59 +1071,59 @@ function he(e, t, a, o, r, n) {
|
|
|
906
1071
|
((m = a[i].route.path) == null ? void 0 : m.endsWith("*")) && a[i].params["*"] !== s.params["*"]
|
|
907
1072
|
);
|
|
908
1073
|
};
|
|
909
|
-
return
|
|
910
|
-
(s, i) =>
|
|
911
|
-
) :
|
|
912
|
-
var
|
|
913
|
-
let m =
|
|
1074
|
+
return o === "assets" ? t.filter(
|
|
1075
|
+
(s, i) => l(s, i) || u(s, i)
|
|
1076
|
+
) : o === "data" ? t.filter((s, i) => {
|
|
1077
|
+
var y;
|
|
1078
|
+
let m = n.routes[s.route.id];
|
|
914
1079
|
if (!m || !m.hasLoader)
|
|
915
1080
|
return !1;
|
|
916
|
-
if (
|
|
1081
|
+
if (l(s, i) || u(s, i))
|
|
917
1082
|
return !0;
|
|
918
1083
|
if (s.route.shouldRevalidate) {
|
|
919
|
-
let
|
|
1084
|
+
let d = s.route.shouldRevalidate({
|
|
920
1085
|
currentUrl: new URL(
|
|
921
1086
|
r.pathname + r.search + r.hash,
|
|
922
1087
|
window.origin
|
|
923
1088
|
),
|
|
924
|
-
currentParams: ((
|
|
1089
|
+
currentParams: ((y = a[0]) == null ? void 0 : y.params) || {},
|
|
925
1090
|
nextUrl: new URL(e, window.origin),
|
|
926
1091
|
nextParams: s.params,
|
|
927
1092
|
defaultShouldRevalidate: !0
|
|
928
1093
|
});
|
|
929
|
-
if (typeof
|
|
930
|
-
return
|
|
1094
|
+
if (typeof d == "boolean")
|
|
1095
|
+
return d;
|
|
931
1096
|
}
|
|
932
1097
|
return !0;
|
|
933
1098
|
}) : [];
|
|
934
1099
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
1100
|
+
function Wt(e, t) {
|
|
1101
|
+
return Ht(
|
|
937
1102
|
e.map((a) => {
|
|
938
|
-
let
|
|
939
|
-
if (!
|
|
940
|
-
let r = [
|
|
941
|
-
return
|
|
1103
|
+
let n = t.routes[a.route.id];
|
|
1104
|
+
if (!n) return [];
|
|
1105
|
+
let r = [n.module];
|
|
1106
|
+
return n.imports && (r = r.concat(n.imports)), r;
|
|
942
1107
|
}).flat(1)
|
|
943
1108
|
);
|
|
944
1109
|
}
|
|
945
|
-
function
|
|
1110
|
+
function Ht(e) {
|
|
946
1111
|
return [...new Set(e)];
|
|
947
1112
|
}
|
|
948
|
-
function
|
|
1113
|
+
function Vt(e) {
|
|
949
1114
|
let t = {}, a = Object.keys(e).sort();
|
|
950
|
-
for (let
|
|
951
|
-
t[
|
|
1115
|
+
for (let n of a)
|
|
1116
|
+
t[n] = e[n];
|
|
952
1117
|
return t;
|
|
953
1118
|
}
|
|
954
|
-
function
|
|
1119
|
+
function jt(e, t) {
|
|
955
1120
|
let a = /* @__PURE__ */ new Set();
|
|
956
|
-
return new Set(t), e.reduce((
|
|
957
|
-
let
|
|
958
|
-
return a.has(
|
|
1121
|
+
return new Set(t), e.reduce((n, r) => {
|
|
1122
|
+
let o = JSON.stringify(Vt(r));
|
|
1123
|
+
return a.has(o) || (a.add(o), n.push({ key: o, link: r })), n;
|
|
959
1124
|
}, []);
|
|
960
1125
|
}
|
|
961
|
-
function
|
|
1126
|
+
function Xt(e) {
|
|
962
1127
|
let t = typeof e == "string" ? new URL(
|
|
963
1128
|
e,
|
|
964
1129
|
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
@@ -967,389 +1132,416 @@ function Mt(e) {
|
|
|
967
1132
|
) : e;
|
|
968
1133
|
return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
|
|
969
1134
|
}
|
|
970
|
-
function
|
|
971
|
-
let e =
|
|
972
|
-
return
|
|
1135
|
+
function Kt() {
|
|
1136
|
+
let e = f.useContext(A);
|
|
1137
|
+
return le(
|
|
973
1138
|
e,
|
|
974
1139
|
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
975
1140
|
), e;
|
|
976
1141
|
}
|
|
977
|
-
function
|
|
978
|
-
let e =
|
|
979
|
-
return
|
|
1142
|
+
function Jt() {
|
|
1143
|
+
let e = f.useContext(q);
|
|
1144
|
+
return le(
|
|
980
1145
|
e,
|
|
981
1146
|
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
982
1147
|
), e;
|
|
983
1148
|
}
|
|
984
|
-
var
|
|
985
|
-
|
|
986
|
-
function
|
|
987
|
-
let e =
|
|
988
|
-
return
|
|
1149
|
+
var ue = f.createContext(void 0);
|
|
1150
|
+
ue.displayName = "FrameworkContext";
|
|
1151
|
+
function Ie() {
|
|
1152
|
+
let e = f.useContext(ue);
|
|
1153
|
+
return le(
|
|
989
1154
|
e,
|
|
990
1155
|
"You must render this element inside a <HydratedRouter> element"
|
|
991
1156
|
), e;
|
|
992
1157
|
}
|
|
993
|
-
function
|
|
994
|
-
let a =
|
|
995
|
-
|
|
996
|
-
if (e === "render" &&
|
|
997
|
-
let v = (
|
|
998
|
-
|
|
999
|
-
|
|
1158
|
+
function Yt(e, t) {
|
|
1159
|
+
let a = f.useContext(ue), [n, r] = f.useState(!1), [o, l] = f.useState(!1), { onFocus: u, onBlur: s, onMouseEnter: i, onMouseLeave: m, onTouchStart: y } = t, d = f.useRef(null);
|
|
1160
|
+
f.useEffect(() => {
|
|
1161
|
+
if (e === "render" && l(!0), e === "viewport") {
|
|
1162
|
+
let v = (p) => {
|
|
1163
|
+
p.forEach((_) => {
|
|
1164
|
+
l(_.isIntersecting);
|
|
1000
1165
|
});
|
|
1001
|
-
},
|
|
1002
|
-
return
|
|
1003
|
-
|
|
1166
|
+
}, g = new IntersectionObserver(v, { threshold: 0.5 });
|
|
1167
|
+
return d.current && g.observe(d.current), () => {
|
|
1168
|
+
g.disconnect();
|
|
1004
1169
|
};
|
|
1005
1170
|
}
|
|
1006
|
-
}, [e]),
|
|
1007
|
-
if (
|
|
1171
|
+
}, [e]), f.useEffect(() => {
|
|
1172
|
+
if (n) {
|
|
1008
1173
|
let v = setTimeout(() => {
|
|
1009
|
-
|
|
1174
|
+
l(!0);
|
|
1010
1175
|
}, 100);
|
|
1011
1176
|
return () => {
|
|
1012
1177
|
clearTimeout(v);
|
|
1013
1178
|
};
|
|
1014
1179
|
}
|
|
1015
|
-
}, [
|
|
1180
|
+
}, [n]);
|
|
1016
1181
|
let h = () => {
|
|
1017
1182
|
r(!0);
|
|
1018
|
-
},
|
|
1019
|
-
r(!1),
|
|
1183
|
+
}, c = () => {
|
|
1184
|
+
r(!1), l(!1);
|
|
1020
1185
|
};
|
|
1021
|
-
return a ? e !== "intent" ? [
|
|
1022
|
-
|
|
1023
|
-
|
|
1186
|
+
return a ? e !== "intent" ? [o, d, {}] : [
|
|
1187
|
+
o,
|
|
1188
|
+
d,
|
|
1024
1189
|
{
|
|
1025
|
-
onFocus:
|
|
1026
|
-
onBlur:
|
|
1027
|
-
onMouseEnter:
|
|
1028
|
-
onMouseLeave:
|
|
1029
|
-
onTouchStart:
|
|
1190
|
+
onFocus: U(u, h),
|
|
1191
|
+
onBlur: U(s, c),
|
|
1192
|
+
onMouseEnter: U(i, h),
|
|
1193
|
+
onMouseLeave: U(m, c),
|
|
1194
|
+
onTouchStart: U(y, h)
|
|
1030
1195
|
}
|
|
1031
|
-
] : [!1,
|
|
1196
|
+
] : [!1, d, {}];
|
|
1032
1197
|
}
|
|
1033
|
-
function
|
|
1198
|
+
function U(e, t) {
|
|
1034
1199
|
return (a) => {
|
|
1035
1200
|
e && e(a), a.defaultPrevented || t(a);
|
|
1036
1201
|
};
|
|
1037
1202
|
}
|
|
1038
|
-
function
|
|
1203
|
+
function qt({
|
|
1039
1204
|
page: e,
|
|
1040
1205
|
...t
|
|
1041
1206
|
}) {
|
|
1042
|
-
let { router: a } =
|
|
1043
|
-
() =>
|
|
1207
|
+
let { router: a } = Kt(), n = f.useMemo(
|
|
1208
|
+
() => ve(a.routes, e, a.basename),
|
|
1044
1209
|
[a.routes, e, a.basename]
|
|
1045
1210
|
);
|
|
1046
|
-
return
|
|
1047
|
-
}
|
|
1048
|
-
function
|
|
1049
|
-
let { manifest: t, routeModules: a } =
|
|
1050
|
-
return
|
|
1051
|
-
let
|
|
1052
|
-
return
|
|
1053
|
-
(
|
|
1054
|
-
|
|
1211
|
+
return n ? /* @__PURE__ */ f.createElement(Qt, { page: e, matches: n, ...t }) : null;
|
|
1212
|
+
}
|
|
1213
|
+
function Gt(e) {
|
|
1214
|
+
let { manifest: t, routeModules: a } = Ie(), [n, r] = f.useState([]);
|
|
1215
|
+
return f.useEffect(() => {
|
|
1216
|
+
let o = !1;
|
|
1217
|
+
return Bt(e, t, a).then(
|
|
1218
|
+
(l) => {
|
|
1219
|
+
o || r(l);
|
|
1055
1220
|
}
|
|
1056
1221
|
), () => {
|
|
1057
|
-
|
|
1222
|
+
o = !0;
|
|
1058
1223
|
};
|
|
1059
|
-
}, [e, t, a]),
|
|
1224
|
+
}, [e, t, a]), n;
|
|
1060
1225
|
}
|
|
1061
|
-
function
|
|
1226
|
+
function Qt({
|
|
1062
1227
|
page: e,
|
|
1063
1228
|
matches: t,
|
|
1064
1229
|
...a
|
|
1065
1230
|
}) {
|
|
1066
|
-
let
|
|
1067
|
-
() =>
|
|
1231
|
+
let n = N(), { manifest: r, routeModules: o } = Ie(), { loaderData: l, matches: u } = Jt(), s = f.useMemo(
|
|
1232
|
+
() => ge(
|
|
1068
1233
|
e,
|
|
1069
1234
|
t,
|
|
1070
|
-
|
|
1235
|
+
u,
|
|
1071
1236
|
r,
|
|
1072
|
-
|
|
1237
|
+
n,
|
|
1073
1238
|
"data"
|
|
1074
1239
|
),
|
|
1075
|
-
[e, t,
|
|
1076
|
-
), i =
|
|
1077
|
-
() =>
|
|
1240
|
+
[e, t, u, r, n]
|
|
1241
|
+
), i = f.useMemo(
|
|
1242
|
+
() => ge(
|
|
1078
1243
|
e,
|
|
1079
1244
|
t,
|
|
1080
|
-
|
|
1245
|
+
u,
|
|
1081
1246
|
r,
|
|
1082
|
-
|
|
1247
|
+
n,
|
|
1083
1248
|
"assets"
|
|
1084
1249
|
),
|
|
1085
|
-
[e, t,
|
|
1086
|
-
), m =
|
|
1087
|
-
if (e ===
|
|
1250
|
+
[e, t, u, r, n]
|
|
1251
|
+
), m = f.useMemo(() => {
|
|
1252
|
+
if (e === n.pathname + n.search + n.hash)
|
|
1088
1253
|
return [];
|
|
1089
|
-
let h = /* @__PURE__ */ new Set(),
|
|
1090
|
-
if (t.forEach((
|
|
1091
|
-
var
|
|
1092
|
-
let
|
|
1093
|
-
!
|
|
1254
|
+
let h = /* @__PURE__ */ new Set(), c = !1;
|
|
1255
|
+
if (t.forEach((g) => {
|
|
1256
|
+
var _;
|
|
1257
|
+
let p = r.routes[g.route.id];
|
|
1258
|
+
!p || !p.hasLoader || (!s.some((b) => b.route.id === g.route.id) && g.route.id in l && ((_ = o[g.route.id]) != null && _.shouldRevalidate) || p.hasClientLoader ? c = !0 : h.add(g.route.id));
|
|
1094
1259
|
}), h.size === 0)
|
|
1095
1260
|
return [];
|
|
1096
|
-
let v =
|
|
1097
|
-
return
|
|
1261
|
+
let v = Xt(e);
|
|
1262
|
+
return c && h.size > 0 && v.searchParams.set(
|
|
1098
1263
|
"_routes",
|
|
1099
|
-
t.filter((
|
|
1264
|
+
t.filter((g) => h.has(g.route.id)).map((g) => g.route.id).join(",")
|
|
1100
1265
|
), [v.pathname + v.search];
|
|
1101
1266
|
}, [
|
|
1102
|
-
|
|
1103
|
-
|
|
1267
|
+
l,
|
|
1268
|
+
n,
|
|
1104
1269
|
r,
|
|
1105
1270
|
s,
|
|
1106
1271
|
t,
|
|
1107
1272
|
e,
|
|
1108
|
-
|
|
1109
|
-
]),
|
|
1110
|
-
() =>
|
|
1273
|
+
o
|
|
1274
|
+
]), y = f.useMemo(
|
|
1275
|
+
() => Wt(i, r),
|
|
1111
1276
|
[i, r]
|
|
1112
|
-
),
|
|
1113
|
-
return /* @__PURE__ */
|
|
1277
|
+
), d = Gt(i);
|
|
1278
|
+
return /* @__PURE__ */ f.createElement(f.Fragment, null, m.map((h) => /* @__PURE__ */ f.createElement("link", { key: h, rel: "prefetch", as: "fetch", href: h, ...a })), y.map((h) => /* @__PURE__ */ f.createElement("link", { key: h, rel: "modulepreload", href: h, ...a })), d.map(({ key: h, link: c }) => (
|
|
1114
1279
|
// these don't spread `linkProps` because they are full link descriptors
|
|
1115
1280
|
// already with their own props
|
|
1116
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ f.createElement("link", { key: h, ...c })
|
|
1117
1282
|
)));
|
|
1118
1283
|
}
|
|
1119
|
-
function
|
|
1284
|
+
function Zt(...e) {
|
|
1120
1285
|
return (t) => {
|
|
1121
1286
|
e.forEach((a) => {
|
|
1122
1287
|
typeof a == "function" ? a(t) : a != null && (a.current = t);
|
|
1123
1288
|
});
|
|
1124
1289
|
};
|
|
1125
1290
|
}
|
|
1126
|
-
var
|
|
1291
|
+
var Le = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1127
1292
|
try {
|
|
1128
|
-
|
|
1293
|
+
Le && (window.__reactRouterVersion = "7.1.5");
|
|
1129
1294
|
} catch {
|
|
1130
1295
|
}
|
|
1131
|
-
|
|
1296
|
+
function Ea({
|
|
1297
|
+
basename: e,
|
|
1298
|
+
children: t,
|
|
1299
|
+
window: a
|
|
1300
|
+
}) {
|
|
1301
|
+
let n = f.useRef();
|
|
1302
|
+
n.current == null && (n.current = He({ window: a, v5Compat: !0 }));
|
|
1303
|
+
let r = n.current, [o, l] = f.useState({
|
|
1304
|
+
action: r.action,
|
|
1305
|
+
location: r.location
|
|
1306
|
+
}), u = f.useCallback(
|
|
1307
|
+
(s) => {
|
|
1308
|
+
f.startTransition(() => l(s));
|
|
1309
|
+
},
|
|
1310
|
+
[l]
|
|
1311
|
+
);
|
|
1312
|
+
return f.useLayoutEffect(() => r.listen(u), [r, u]), /* @__PURE__ */ f.createElement(
|
|
1313
|
+
It,
|
|
1314
|
+
{
|
|
1315
|
+
basename: e,
|
|
1316
|
+
children: t,
|
|
1317
|
+
location: o.location,
|
|
1318
|
+
navigationType: o.action,
|
|
1319
|
+
navigator: r
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
}
|
|
1323
|
+
var $e = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Oe = f.forwardRef(
|
|
1132
1324
|
function({
|
|
1133
1325
|
onClick: t,
|
|
1134
1326
|
discover: a = "render",
|
|
1135
|
-
prefetch:
|
|
1327
|
+
prefetch: n = "none",
|
|
1136
1328
|
relative: r,
|
|
1137
|
-
reloadDocument:
|
|
1138
|
-
replace:
|
|
1139
|
-
state:
|
|
1329
|
+
reloadDocument: o,
|
|
1330
|
+
replace: l,
|
|
1331
|
+
state: u,
|
|
1140
1332
|
target: s,
|
|
1141
1333
|
to: i,
|
|
1142
1334
|
preventScrollReset: m,
|
|
1143
|
-
viewTransition:
|
|
1144
|
-
...
|
|
1335
|
+
viewTransition: y,
|
|
1336
|
+
...d
|
|
1145
1337
|
}, h) {
|
|
1146
|
-
let { basename:
|
|
1147
|
-
if (typeof i == "string" && v && (
|
|
1338
|
+
let { basename: c } = f.useContext(S), v = typeof i == "string" && $e.test(i), g, p = !1;
|
|
1339
|
+
if (typeof i == "string" && v && (g = i, Le))
|
|
1148
1340
|
try {
|
|
1149
|
-
let
|
|
1150
|
-
$.origin ===
|
|
1341
|
+
let E = new URL(window.location.href), $ = i.startsWith("//") ? new URL(E.protocol + i) : new URL(i), ce = O($.pathname, c);
|
|
1342
|
+
$.origin === E.origin && ce != null ? i = ce + $.search + $.hash : p = !0;
|
|
1151
1343
|
} catch {
|
|
1152
|
-
|
|
1344
|
+
R(
|
|
1153
1345
|
!1,
|
|
1154
1346
|
`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
1155
1347
|
);
|
|
1156
1348
|
}
|
|
1157
|
-
let
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
), F =
|
|
1161
|
-
replace:
|
|
1162
|
-
state:
|
|
1349
|
+
let _ = pt(i, { relative: r }), [b, T, k] = Yt(
|
|
1350
|
+
n,
|
|
1351
|
+
d
|
|
1352
|
+
), F = ra(i, {
|
|
1353
|
+
replace: l,
|
|
1354
|
+
state: u,
|
|
1163
1355
|
target: s,
|
|
1164
1356
|
preventScrollReset: m,
|
|
1165
1357
|
relative: r,
|
|
1166
|
-
viewTransition:
|
|
1358
|
+
viewTransition: y
|
|
1167
1359
|
});
|
|
1168
|
-
function L(
|
|
1169
|
-
t && t(
|
|
1360
|
+
function L(E) {
|
|
1361
|
+
t && t(E), E.defaultPrevented || F(E);
|
|
1170
1362
|
}
|
|
1171
|
-
let
|
|
1363
|
+
let D = (
|
|
1172
1364
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1173
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ f.createElement(
|
|
1174
1366
|
"a",
|
|
1175
1367
|
{
|
|
1176
|
-
...
|
|
1177
|
-
...
|
|
1178
|
-
href:
|
|
1179
|
-
onClick:
|
|
1180
|
-
ref:
|
|
1368
|
+
...d,
|
|
1369
|
+
...k,
|
|
1370
|
+
href: g || _,
|
|
1371
|
+
onClick: p || o ? t : L,
|
|
1372
|
+
ref: Zt(h, T),
|
|
1181
1373
|
target: s,
|
|
1182
1374
|
"data-discover": !v && a === "render" ? "true" : void 0
|
|
1183
1375
|
}
|
|
1184
1376
|
)
|
|
1185
1377
|
);
|
|
1186
|
-
return b && !v ? /* @__PURE__ */
|
|
1378
|
+
return b && !v ? /* @__PURE__ */ f.createElement(f.Fragment, null, D, /* @__PURE__ */ f.createElement(qt, { page: _ })) : D;
|
|
1187
1379
|
}
|
|
1188
1380
|
);
|
|
1189
|
-
|
|
1190
|
-
var
|
|
1381
|
+
Oe.displayName = "Link";
|
|
1382
|
+
var ea = f.forwardRef(
|
|
1191
1383
|
function({
|
|
1192
1384
|
"aria-current": t = "page",
|
|
1193
1385
|
caseSensitive: a = !1,
|
|
1194
|
-
className:
|
|
1386
|
+
className: n = "",
|
|
1195
1387
|
end: r = !1,
|
|
1196
|
-
style:
|
|
1197
|
-
to:
|
|
1198
|
-
viewTransition:
|
|
1388
|
+
style: o,
|
|
1389
|
+
to: l,
|
|
1390
|
+
viewTransition: u,
|
|
1199
1391
|
children: s,
|
|
1200
1392
|
...i
|
|
1201
1393
|
}, m) {
|
|
1202
|
-
let
|
|
1394
|
+
let y = V(l, { relative: i.relative }), d = N(), h = f.useContext(q), { navigator: c, basename: v } = f.useContext(S), g = h != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1203
1395
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1204
|
-
|
|
1205
|
-
a || (
|
|
1206
|
-
const T =
|
|
1207
|
-
let
|
|
1208
|
-
isActive:
|
|
1396
|
+
la(y) && u === !0, p = c.encodeLocation ? c.encodeLocation(y).pathname : y.pathname, _ = d.pathname, b = h && h.navigation && h.navigation.location ? h.navigation.location.pathname : null;
|
|
1397
|
+
a || (_ = _.toLowerCase(), b = b ? b.toLowerCase() : null, p = p.toLowerCase()), b && v && (b = O(b, v) || b);
|
|
1398
|
+
const T = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
|
|
1399
|
+
let k = _ === p || !r && _.startsWith(p) && _.charAt(T) === "/", F = b != null && (b === p || !r && b.startsWith(p) && b.charAt(p.length) === "/"), L = {
|
|
1400
|
+
isActive: k,
|
|
1209
1401
|
isPending: F,
|
|
1210
|
-
isTransitioning:
|
|
1211
|
-
},
|
|
1212
|
-
typeof
|
|
1213
|
-
|
|
1214
|
-
|
|
1402
|
+
isTransitioning: g
|
|
1403
|
+
}, D = k ? t : void 0, E;
|
|
1404
|
+
typeof n == "function" ? E = n(L) : E = [
|
|
1405
|
+
n,
|
|
1406
|
+
k ? "active" : null,
|
|
1215
1407
|
F ? "pending" : null,
|
|
1216
|
-
|
|
1408
|
+
g ? "transitioning" : null
|
|
1217
1409
|
].filter(Boolean).join(" ");
|
|
1218
|
-
let $ = typeof
|
|
1219
|
-
return /* @__PURE__ */
|
|
1220
|
-
|
|
1410
|
+
let $ = typeof o == "function" ? o(L) : o;
|
|
1411
|
+
return /* @__PURE__ */ f.createElement(
|
|
1412
|
+
Oe,
|
|
1221
1413
|
{
|
|
1222
1414
|
...i,
|
|
1223
|
-
"aria-current":
|
|
1224
|
-
className:
|
|
1415
|
+
"aria-current": D,
|
|
1416
|
+
className: E,
|
|
1225
1417
|
ref: m,
|
|
1226
1418
|
style: $,
|
|
1227
|
-
to:
|
|
1228
|
-
viewTransition:
|
|
1419
|
+
to: l,
|
|
1420
|
+
viewTransition: u
|
|
1229
1421
|
},
|
|
1230
1422
|
typeof s == "function" ? s(L) : s
|
|
1231
1423
|
);
|
|
1232
1424
|
}
|
|
1233
1425
|
);
|
|
1234
|
-
|
|
1235
|
-
var
|
|
1426
|
+
ea.displayName = "NavLink";
|
|
1427
|
+
var ta = f.forwardRef(
|
|
1236
1428
|
({
|
|
1237
1429
|
discover: e = "render",
|
|
1238
1430
|
fetcherKey: t,
|
|
1239
1431
|
navigate: a,
|
|
1240
|
-
reloadDocument:
|
|
1432
|
+
reloadDocument: n,
|
|
1241
1433
|
replace: r,
|
|
1242
|
-
state:
|
|
1243
|
-
method:
|
|
1244
|
-
action:
|
|
1434
|
+
state: o,
|
|
1435
|
+
method: l = K,
|
|
1436
|
+
action: u,
|
|
1245
1437
|
onSubmit: s,
|
|
1246
1438
|
relative: i,
|
|
1247
1439
|
preventScrollReset: m,
|
|
1248
|
-
viewTransition:
|
|
1249
|
-
...
|
|
1440
|
+
viewTransition: y,
|
|
1441
|
+
...d
|
|
1250
1442
|
}, h) => {
|
|
1251
|
-
let
|
|
1443
|
+
let c = ia(), v = sa(u, { relative: i }), g = l.toLowerCase() === "get" ? "get" : "post", p = typeof u == "string" && $e.test(u), _ = (b) => {
|
|
1252
1444
|
if (s && s(b), b.defaultPrevented) return;
|
|
1253
1445
|
b.preventDefault();
|
|
1254
|
-
let T = b.nativeEvent.submitter,
|
|
1255
|
-
|
|
1446
|
+
let T = b.nativeEvent.submitter, k = (T == null ? void 0 : T.getAttribute("formmethod")) || l;
|
|
1447
|
+
c(T || b.currentTarget, {
|
|
1256
1448
|
fetcherKey: t,
|
|
1257
|
-
method:
|
|
1449
|
+
method: k,
|
|
1258
1450
|
navigate: a,
|
|
1259
1451
|
replace: r,
|
|
1260
|
-
state:
|
|
1452
|
+
state: o,
|
|
1261
1453
|
relative: i,
|
|
1262
1454
|
preventScrollReset: m,
|
|
1263
|
-
viewTransition:
|
|
1455
|
+
viewTransition: y
|
|
1264
1456
|
});
|
|
1265
1457
|
};
|
|
1266
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ f.createElement(
|
|
1267
1459
|
"form",
|
|
1268
1460
|
{
|
|
1269
1461
|
ref: h,
|
|
1270
|
-
method:
|
|
1462
|
+
method: g,
|
|
1271
1463
|
action: v,
|
|
1272
|
-
onSubmit:
|
|
1273
|
-
...
|
|
1274
|
-
"data-discover": !
|
|
1464
|
+
onSubmit: n ? s : _,
|
|
1465
|
+
...d,
|
|
1466
|
+
"data-discover": !p && e === "render" ? "true" : void 0
|
|
1275
1467
|
}
|
|
1276
1468
|
);
|
|
1277
1469
|
}
|
|
1278
1470
|
);
|
|
1279
|
-
|
|
1280
|
-
function
|
|
1471
|
+
ta.displayName = "Form";
|
|
1472
|
+
function aa(e) {
|
|
1281
1473
|
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1282
1474
|
}
|
|
1283
|
-
function
|
|
1284
|
-
let t =
|
|
1285
|
-
return w(t,
|
|
1475
|
+
function De(e) {
|
|
1476
|
+
let t = f.useContext(A);
|
|
1477
|
+
return w(t, aa(e)), t;
|
|
1286
1478
|
}
|
|
1287
|
-
function
|
|
1479
|
+
function ra(e, {
|
|
1288
1480
|
target: t,
|
|
1289
1481
|
replace: a,
|
|
1290
|
-
state:
|
|
1482
|
+
state: n,
|
|
1291
1483
|
preventScrollReset: r,
|
|
1292
|
-
relative:
|
|
1293
|
-
viewTransition:
|
|
1484
|
+
relative: o,
|
|
1485
|
+
viewTransition: l
|
|
1294
1486
|
} = {}) {
|
|
1295
|
-
let
|
|
1296
|
-
return
|
|
1487
|
+
let u = Se(), s = N(), i = V(e, { relative: o });
|
|
1488
|
+
return f.useCallback(
|
|
1297
1489
|
(m) => {
|
|
1298
|
-
if (
|
|
1490
|
+
if (Nt(m, t)) {
|
|
1299
1491
|
m.preventDefault();
|
|
1300
|
-
let
|
|
1301
|
-
|
|
1302
|
-
replace:
|
|
1303
|
-
state:
|
|
1492
|
+
let y = a !== void 0 ? a : M(s) === M(i);
|
|
1493
|
+
u(e, {
|
|
1494
|
+
replace: y,
|
|
1495
|
+
state: n,
|
|
1304
1496
|
preventScrollReset: r,
|
|
1305
|
-
relative:
|
|
1306
|
-
viewTransition:
|
|
1497
|
+
relative: o,
|
|
1498
|
+
viewTransition: l
|
|
1307
1499
|
});
|
|
1308
1500
|
}
|
|
1309
1501
|
},
|
|
1310
1502
|
[
|
|
1311
1503
|
s,
|
|
1312
|
-
|
|
1504
|
+
u,
|
|
1313
1505
|
i,
|
|
1314
1506
|
a,
|
|
1315
|
-
|
|
1507
|
+
n,
|
|
1316
1508
|
t,
|
|
1317
1509
|
e,
|
|
1318
1510
|
r,
|
|
1319
|
-
|
|
1320
|
-
|
|
1511
|
+
o,
|
|
1512
|
+
l
|
|
1321
1513
|
]
|
|
1322
1514
|
);
|
|
1323
1515
|
}
|
|
1324
|
-
var
|
|
1325
|
-
function
|
|
1326
|
-
let { router: e } =
|
|
1516
|
+
var na = 0, oa = () => `__${String(++na)}__`;
|
|
1517
|
+
function ia() {
|
|
1518
|
+
let { router: e } = De(
|
|
1327
1519
|
"useSubmit"
|
|
1328
1520
|
/* UseSubmit */
|
|
1329
|
-
), { basename: t } =
|
|
1330
|
-
return
|
|
1331
|
-
async (
|
|
1332
|
-
let { action:
|
|
1333
|
-
|
|
1521
|
+
), { basename: t } = f.useContext(S), a = Ct();
|
|
1522
|
+
return f.useCallback(
|
|
1523
|
+
async (n, r = {}) => {
|
|
1524
|
+
let { action: o, method: l, encType: u, formData: s, body: i } = zt(
|
|
1525
|
+
n,
|
|
1334
1526
|
t
|
|
1335
1527
|
);
|
|
1336
1528
|
if (r.navigate === !1) {
|
|
1337
|
-
let m = r.fetcherKey ||
|
|
1338
|
-
await e.fetch(m, a, r.action ||
|
|
1529
|
+
let m = r.fetcherKey || oa();
|
|
1530
|
+
await e.fetch(m, a, r.action || o, {
|
|
1339
1531
|
preventScrollReset: r.preventScrollReset,
|
|
1340
1532
|
formData: s,
|
|
1341
1533
|
body: i,
|
|
1342
|
-
formMethod: r.method ||
|
|
1343
|
-
formEncType: r.encType ||
|
|
1534
|
+
formMethod: r.method || l,
|
|
1535
|
+
formEncType: r.encType || u,
|
|
1344
1536
|
flushSync: r.flushSync
|
|
1345
1537
|
});
|
|
1346
1538
|
} else
|
|
1347
|
-
await e.navigate(r.action ||
|
|
1539
|
+
await e.navigate(r.action || o, {
|
|
1348
1540
|
preventScrollReset: r.preventScrollReset,
|
|
1349
1541
|
formData: s,
|
|
1350
1542
|
body: i,
|
|
1351
|
-
formMethod: r.method ||
|
|
1352
|
-
formEncType: r.encType ||
|
|
1543
|
+
formMethod: r.method || l,
|
|
1544
|
+
formEncType: r.encType || u,
|
|
1353
1545
|
replace: r.replace,
|
|
1354
1546
|
state: r.state,
|
|
1355
1547
|
fromRouteId: a,
|
|
@@ -1360,162 +1552,162 @@ function Zt() {
|
|
|
1360
1552
|
[e, t, a]
|
|
1361
1553
|
);
|
|
1362
1554
|
}
|
|
1363
|
-
function
|
|
1364
|
-
let { basename: a } =
|
|
1365
|
-
w(
|
|
1366
|
-
let [r] =
|
|
1555
|
+
function sa(e, { relative: t } = {}) {
|
|
1556
|
+
let { basename: a } = f.useContext(S), n = f.useContext(I);
|
|
1557
|
+
w(n, "useFormAction must be used inside a RouteContext");
|
|
1558
|
+
let [r] = n.matches.slice(-1), o = { ...V(e || ".", { relative: t }) }, l = N();
|
|
1367
1559
|
if (e == null) {
|
|
1368
|
-
|
|
1369
|
-
let
|
|
1560
|
+
o.search = l.search;
|
|
1561
|
+
let u = new URLSearchParams(o.search), s = u.getAll("index");
|
|
1370
1562
|
if (s.some((m) => m === "")) {
|
|
1371
|
-
|
|
1372
|
-
let m =
|
|
1373
|
-
|
|
1563
|
+
u.delete("index"), s.filter((y) => y).forEach((y) => u.append("index", y));
|
|
1564
|
+
let m = u.toString();
|
|
1565
|
+
o.search = m ? `?${m}` : "";
|
|
1374
1566
|
}
|
|
1375
1567
|
}
|
|
1376
|
-
return (!e || e === ".") && r.route.index && (
|
|
1568
|
+
return (!e || e === ".") && r.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (o.pathname = o.pathname === "/" ? a : P([a, o.pathname])), M(o);
|
|
1377
1569
|
}
|
|
1378
|
-
function
|
|
1379
|
-
let a =
|
|
1570
|
+
function la(e, t = {}) {
|
|
1571
|
+
let a = f.useContext(Ee);
|
|
1380
1572
|
w(
|
|
1381
1573
|
a != null,
|
|
1382
1574
|
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1383
1575
|
);
|
|
1384
|
-
let { basename:
|
|
1576
|
+
let { basename: n } = De(
|
|
1385
1577
|
"useViewTransitionState"
|
|
1386
1578
|
/* useViewTransitionState */
|
|
1387
|
-
), r =
|
|
1579
|
+
), r = V(e, { relative: t.relative });
|
|
1388
1580
|
if (!a.isTransitioning)
|
|
1389
1581
|
return !1;
|
|
1390
|
-
let
|
|
1391
|
-
return
|
|
1582
|
+
let o = O(a.currentLocation.pathname, n) || a.currentLocation.pathname, l = O(a.nextLocation.pathname, n) || a.nextLocation.pathname;
|
|
1583
|
+
return Y(r.pathname, l) != null || Y(r.pathname, o) != null;
|
|
1392
1584
|
}
|
|
1393
1585
|
new TextEncoder();
|
|
1394
|
-
function
|
|
1586
|
+
function ua(e) {
|
|
1395
1587
|
if (typeof document > "u") return;
|
|
1396
1588
|
let t = document.head || document.getElementsByTagName("head")[0], a = document.createElement("style");
|
|
1397
1589
|
a.type = "text/css", t.firstChild ? t.insertBefore(a, t.firstChild) : t.appendChild(a), a.styleSheet ? a.styleSheet.cssText = e : a.appendChild(document.createTextNode(e));
|
|
1398
1590
|
}
|
|
1399
|
-
aa(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
1591
|
+
ua(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
1400
1592
|
`);
|
|
1401
|
-
var
|
|
1593
|
+
var fe = (e) => typeof e == "number" && !isNaN(e), B = (e) => typeof e == "string", Ne = (e) => typeof e == "function", fa = (e) => B(e) || fe(e), ca = (e) => Ue(e) || B(e) || Ne(e) || fe(e), da = 1, Fe = () => `${da++}`, C = /* @__PURE__ */ new Map(), ne = [], _e = /* @__PURE__ */ new Set(), Ae = () => C.size > 0, ma = (e, { containerId: t }) => {
|
|
1402
1594
|
var a;
|
|
1403
|
-
return (a =
|
|
1595
|
+
return (a = C.get(t || 1)) == null ? void 0 : a.toasts.get(e);
|
|
1404
1596
|
};
|
|
1405
|
-
function
|
|
1597
|
+
function ha(e, t) {
|
|
1406
1598
|
var a;
|
|
1407
|
-
if (t) return !!((a =
|
|
1408
|
-
let
|
|
1409
|
-
return
|
|
1410
|
-
r.isToastActive(e) && (
|
|
1411
|
-
}),
|
|
1412
|
-
}
|
|
1413
|
-
function
|
|
1414
|
-
if (!
|
|
1415
|
-
|
|
1599
|
+
if (t) return !!((a = C.get(t)) != null && a.isToastActive(e));
|
|
1600
|
+
let n = !1;
|
|
1601
|
+
return C.forEach((r) => {
|
|
1602
|
+
r.isToastActive(e) && (n = !0);
|
|
1603
|
+
}), n;
|
|
1604
|
+
}
|
|
1605
|
+
function pa(e) {
|
|
1606
|
+
if (!Ae()) {
|
|
1607
|
+
ne = ne.filter((t) => e != null && t.options.toastId !== e);
|
|
1416
1608
|
return;
|
|
1417
1609
|
}
|
|
1418
|
-
if (e == null ||
|
|
1610
|
+
if (e == null || fa(e)) C.forEach((t) => {
|
|
1419
1611
|
t.removeToast(e);
|
|
1420
1612
|
});
|
|
1421
1613
|
else if (e && ("containerId" in e || "id" in e)) {
|
|
1422
|
-
let t =
|
|
1423
|
-
t ? t.removeToast(e.id) :
|
|
1614
|
+
let t = C.get(e.containerId);
|
|
1615
|
+
t ? t.removeToast(e.id) : C.forEach((a) => {
|
|
1424
1616
|
a.removeToast(e.id);
|
|
1425
1617
|
});
|
|
1426
1618
|
}
|
|
1427
1619
|
}
|
|
1428
|
-
var
|
|
1429
|
-
|
|
1620
|
+
var ya = (e = {}) => {
|
|
1621
|
+
C.forEach((t) => {
|
|
1430
1622
|
t.props.limit && (!e.containerId || t.id === e.containerId) && t.clearQueue();
|
|
1431
1623
|
});
|
|
1432
1624
|
};
|
|
1433
|
-
function
|
|
1434
|
-
|
|
1625
|
+
function ga(e, t) {
|
|
1626
|
+
ca(e) && (Ae() || ne.push({ content: e, options: t }), C.forEach((a) => {
|
|
1435
1627
|
a.buildToast(e, t);
|
|
1436
1628
|
}));
|
|
1437
1629
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1630
|
+
function ze(e, t) {
|
|
1631
|
+
C.forEach((a) => {
|
|
1440
1632
|
(t == null || !(t != null && t.containerId) || (t == null ? void 0 : t.containerId) === a.id) && a.toggle(e, t == null ? void 0 : t.id);
|
|
1441
1633
|
});
|
|
1442
1634
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return
|
|
1445
|
-
|
|
1635
|
+
function _a(e) {
|
|
1636
|
+
return _e.add(e), () => {
|
|
1637
|
+
_e.delete(e);
|
|
1446
1638
|
};
|
|
1447
1639
|
}
|
|
1448
|
-
function
|
|
1449
|
-
return e && (
|
|
1640
|
+
function va(e) {
|
|
1641
|
+
return e && (B(e.toastId) || fe(e.toastId)) ? e.toastId : Fe();
|
|
1450
1642
|
}
|
|
1451
|
-
function
|
|
1452
|
-
return
|
|
1643
|
+
function j(e, t) {
|
|
1644
|
+
return ga(e, t), t.toastId;
|
|
1453
1645
|
}
|
|
1454
|
-
function
|
|
1455
|
-
return { ...t, type: t && t.type || e, toastId:
|
|
1646
|
+
function Z(e, t) {
|
|
1647
|
+
return { ...t, type: t && t.type || e, toastId: va(t) };
|
|
1456
1648
|
}
|
|
1457
|
-
function
|
|
1458
|
-
return (t, a) =>
|
|
1649
|
+
function ee(e) {
|
|
1650
|
+
return (t, a) => j(t, Z(e, a));
|
|
1459
1651
|
}
|
|
1460
1652
|
function x(e, t) {
|
|
1461
|
-
return
|
|
1653
|
+
return j(e, Z("default", t));
|
|
1462
1654
|
}
|
|
1463
|
-
x.loading = (e, t) =>
|
|
1464
|
-
function
|
|
1465
|
-
let
|
|
1466
|
-
t && (
|
|
1467
|
-
let
|
|
1655
|
+
x.loading = (e, t) => j(e, Z("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t }));
|
|
1656
|
+
function ba(e, { pending: t, error: a, success: n }, r) {
|
|
1657
|
+
let o;
|
|
1658
|
+
t && (o = B(t) ? x.loading(t, r) : x.loading(t.render, { ...r, ...t }));
|
|
1659
|
+
let l = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, u = (i, m, y) => {
|
|
1468
1660
|
if (m == null) {
|
|
1469
|
-
x.dismiss(
|
|
1661
|
+
x.dismiss(o);
|
|
1470
1662
|
return;
|
|
1471
1663
|
}
|
|
1472
|
-
let
|
|
1473
|
-
return
|
|
1474
|
-
}, s =
|
|
1475
|
-
return s.then((i) =>
|
|
1476
|
-
}
|
|
1477
|
-
x.promise =
|
|
1478
|
-
x.success =
|
|
1479
|
-
x.info =
|
|
1480
|
-
x.error =
|
|
1481
|
-
x.warning =
|
|
1664
|
+
let d = { type: i, ...l, ...r, data: y }, h = B(m) ? { render: m } : m;
|
|
1665
|
+
return o ? x.update(o, { ...d, ...h }) : x(h.render, { ...d, ...h }), y;
|
|
1666
|
+
}, s = Ne(e) ? e() : e;
|
|
1667
|
+
return s.then((i) => u("success", n, i)).catch((i) => u("error", a, i)), s;
|
|
1668
|
+
}
|
|
1669
|
+
x.promise = ba;
|
|
1670
|
+
x.success = ee("success");
|
|
1671
|
+
x.info = ee("info");
|
|
1672
|
+
x.error = ee("error");
|
|
1673
|
+
x.warning = ee("warning");
|
|
1482
1674
|
x.warn = x.warning;
|
|
1483
|
-
x.dark = (e, t) =>
|
|
1484
|
-
function
|
|
1485
|
-
|
|
1675
|
+
x.dark = (e, t) => j(e, Z("default", { theme: "dark", ...t }));
|
|
1676
|
+
function xa(e) {
|
|
1677
|
+
pa(e);
|
|
1486
1678
|
}
|
|
1487
|
-
x.dismiss =
|
|
1488
|
-
x.clearWaitingQueue =
|
|
1489
|
-
x.isActive =
|
|
1679
|
+
x.dismiss = xa;
|
|
1680
|
+
x.clearWaitingQueue = ya;
|
|
1681
|
+
x.isActive = ha;
|
|
1490
1682
|
x.update = (e, t = {}) => {
|
|
1491
|
-
let a =
|
|
1683
|
+
let a = ma(e, t);
|
|
1492
1684
|
if (a) {
|
|
1493
|
-
let { props:
|
|
1494
|
-
|
|
1495
|
-
let
|
|
1496
|
-
delete
|
|
1685
|
+
let { props: n, content: r } = a, o = { delay: 100, ...n, ...t, toastId: t.toastId || e, updateId: Fe() };
|
|
1686
|
+
o.toastId !== e && (o.staleId = e);
|
|
1687
|
+
let l = o.render || r;
|
|
1688
|
+
delete o.render, j(l, o);
|
|
1497
1689
|
}
|
|
1498
1690
|
};
|
|
1499
1691
|
x.done = (e) => {
|
|
1500
1692
|
x.update(e, { progress: 1 });
|
|
1501
1693
|
};
|
|
1502
|
-
x.onChange =
|
|
1503
|
-
x.play = (e) =>
|
|
1504
|
-
x.pause = (e) =>
|
|
1505
|
-
const
|
|
1506
|
-
const e =
|
|
1694
|
+
x.onChange = _a;
|
|
1695
|
+
x.play = (e) => ze(!0, e);
|
|
1696
|
+
x.pause = (e) => ze(!1, e);
|
|
1697
|
+
const Ca = () => {
|
|
1698
|
+
const e = Se(), { setAuthToken: t, setUserToken: a } = Me();
|
|
1507
1699
|
return { FinSesion: () => {
|
|
1508
1700
|
x.promise(
|
|
1509
|
-
new Promise(async (r,
|
|
1701
|
+
new Promise(async (r, o) => {
|
|
1510
1702
|
try {
|
|
1511
|
-
const
|
|
1512
|
-
if (!
|
|
1703
|
+
const l = localStorage.getItem("access_token");
|
|
1704
|
+
if (!l)
|
|
1513
1705
|
throw new Error("No se encontró el token de acceso.");
|
|
1514
|
-
await
|
|
1706
|
+
await Be(l), localStorage.removeItem("access_token"), localStorage.removeItem("user_token"), t(null), a(null), setTimeout(() => {
|
|
1515
1707
|
r(!0), e("/");
|
|
1516
1708
|
}, 1e3);
|
|
1517
|
-
} catch (
|
|
1518
|
-
|
|
1709
|
+
} catch (l) {
|
|
1710
|
+
o(l);
|
|
1519
1711
|
}
|
|
1520
1712
|
}),
|
|
1521
1713
|
{
|
|
@@ -1527,6 +1719,7 @@ const _a = () => {
|
|
|
1527
1719
|
} };
|
|
1528
1720
|
};
|
|
1529
1721
|
export {
|
|
1530
|
-
|
|
1531
|
-
|
|
1722
|
+
Ea as B,
|
|
1723
|
+
Ca as a,
|
|
1724
|
+
Se as u
|
|
1532
1725
|
};
|