@hortiview/modulebase 0.0.20436 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +3 -2
  2. package/dist/IsRestoringProvider-CBSZo7ur.js +312 -0
  3. package/dist/ModuleCore-DuJVrj6v.js +11828 -0
  4. package/dist/QueryClientProvider-DyiNrPkn.js +514 -0
  5. package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
  6. package/dist/api-COabZnyn.js +147 -0
  7. package/dist/assets/ModuleCore.css +1 -1
  8. package/dist/chunk-LFPYN7LY-D1ls8FXf.js +8643 -0
  9. package/dist/components/ModuleBase.js +9 -9
  10. package/dist/components/ModuleCore.js +1 -1
  11. package/dist/constants.js +2 -3
  12. package/dist/hooks/useCustom.js +1 -1
  13. package/dist/hooks/useCustomMutation.js +5 -5
  14. package/dist/hooks/useEntity.js +30 -30
  15. package/dist/hooks/useOffline.js +1 -1
  16. package/dist/hooks/useOption.js +5 -5
  17. package/dist/hooks/useServiceBus.js +1 -1
  18. package/dist/hooks/useStores.js +1 -1
  19. package/dist/{_baseGet-C6jMXSsQ.js → isTypedArray-SkhznY1k.js} +494 -494
  20. package/dist/lib/constants.d.ts +0 -1
  21. package/dist/lib/hooks/useCustom.d.ts +4 -2
  22. package/dist/lib/hooks/useCustomMutation.d.ts +8 -3
  23. package/dist/lib/hooks/useEntity.d.ts +6 -0
  24. package/dist/lib/types/Requests.d.ts +0 -17
  25. package/dist/lib/utils/api.d.ts +6 -13
  26. package/dist/lib/utils/baseFetches.d.ts +3 -2
  27. package/dist/main.js +188 -173
  28. package/dist/module-router.js +2322 -121
  29. package/dist/{mutation-DSKlaYzY.js → mutation-CmhiEgfA.js} +101 -56
  30. package/dist/{omit-C9Qe80rl.js → omit-Do6MFRwA.js} +240 -223
  31. package/dist/provider/SignalR/SignalRProvider.js +2389 -2824
  32. package/dist/react-c9FSfB30.js +27 -0
  33. package/dist/stores/BasePropsStore.js +1 -1
  34. package/dist/stores/EnvironmentStore.js +1 -1
  35. package/dist/useMutation-Aoachkw_.js +139 -0
  36. package/dist/useQuery-DEU_AUtf.js +392 -0
  37. package/dist/utils/api.js +3 -4
  38. package/dist/utils/baseFetches.js +18 -14
  39. package/dist/utils/fetches.js +3 -4
  40. package/dist/utils/helper.js +13 -13
  41. package/package.json +17 -13
  42. package/dist/ModuleCore-DpwHP0IU.js +0 -14973
  43. package/dist/QueryClientProvider-Beog9TR7.js +0 -437
  44. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  45. package/dist/api-CogBuK0n.js +0 -473
  46. package/dist/chunk-IR6S3I6Y-BmDdD3SP.js +0 -8162
  47. package/dist/isRestoring-CLuxJVSA.js +0 -281
  48. package/dist/react-QiIgv49H.js +0 -27
  49. package/dist/useMutation-zu8uxBak.js +0 -97
  50. package/dist/useQuery-Bj9k9zik.js +0 -395
  51. package/dist/utils-DxRR_XLb.js +0 -9
@@ -1,129 +1,2330 @@
1
- import { useCallback as r } from "react";
2
- import { useBasePropsStore as t } from "./stores/BasePropsStore.js";
3
- import { A as R, B as F, F as E, H as N, I as l, a as A, b as _, L as v, c as d, M as m, d as U, N as g, e as h, f as C, O as p, P, R as H, g as y, h as L, i as k, S as x, j as D, k as w, l as I, m as M, D as O, n as b, E as B, o as T, p as f, q as V, r as q, s as z, t as G, u as K, v as W, V as j, w as J, x as Q, y as X, z as Y, C as Z, G as $, J as aa, K as ea, Q as sa, T as ta, U as ra, W as oa, X as ia, Y as ua, Z as na, _ as ca, $ as Sa, a0 as Ra, a1 as Fa, a2 as Ea, a3 as Na, a4 as la, a5 as Aa, a6 as _a, a7 as va, a8 as da, a9 as ma, aa as Ua, ab as ga, ac as ha, ad as Ca, ae as pa, af as Pa, ag as Ha, ah as ya, ai as La, aj as ka, ak as xa, al as Da, am as wa, an as Ia, ao as Ma, ap as Oa, aq as ba, ar as Ba, as as Ta, at as fa, au as Va, av as qa, aw as za, ax as Ga, ay as Ka, az as Wa, aA as ja, aB as Ja, aC as Qa, aD as Xa, aE as Ya, aF as Za, aG as $a, aH as ae, aI as ee, aJ as se, aK as te, aL as re, aM as oe, aN as ie, aO as ue, aP as ne, aQ as ce, aR as Se, aS as Re, aT as Fe } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
4
- const n = () => {
5
- const s = t((a) => a.navigateTo), e = t((a) => a.navigateInHortiview);
6
- return r(
1
+ import * as k from "react";
2
+ import A, { useCallback as ze } from "react";
3
+ import { useBasePropsStore as se } from "./stores/BasePropsStore.js";
4
+ import { aV as qe, a0 as ee, ae as Ce, r as te, v as Ve, n as be, aW as We, aP as Xe, E as O, aj as xe, j as K, aX as Je, a8 as Ke, R as Qe, aY as Ge, aZ as _e, a_ as oe, a$ as ie, b0 as Q, ah as P, b1 as ke, b2 as Ye, b3 as Ze, a4 as et, a5 as tt, a3 as rt, O as at, U as nt, x as I, am as st, ao as ot, al as it, b4 as $, b5 as lt, b6 as le, b7 as ut, b8 as re, b9 as U, ba as dt, bb as ct, bc as ft } from "./chunk-LFPYN7LY-D1ls8FXf.js";
5
+ import { A as Sr, B as vr, F as Er, H as Cr, I as br, a as xr, b as _r, L as kr, d as Ar, M as Dr, e as Hr, N as Tr, f as Fr, g as Pr, P as Nr, h as Ur, i as Lr, k as Or, S as Ir, l as Br, m as Mr, o as $r, D as jr, p as zr, q as qr, s as Vr, t as Wr, w as Xr, V as Jr, W as Kr, y as Qr, z as Gr, C as Yr, G as Zr, J as ea, K as ta, Q as ra, T as aa, X as na, Y as sa, Z as oa, _ as ia, $ as la, a1 as ua, a2 as da, c as ca, a6 as fa, a7 as ha, a9 as pa, aa as ma, ab as ya, ac as wa, ad as ga, af as Ra, ag as Sa, ai as va, ak as Ea, an as Ca, ap as ba, aq as xa, ar as _a, as as ka, at as Aa, au as Da, av as Ha, aw as Ta, ax as Fa, ay as Pa, az as Na, aA as Ua, aB as La, aC as Oa, aD as Ia, aE as Ba, aF as Ma, aG as $a, aH as ja, aI as za, aJ as qa, aK as Va, aL as Wa, aM as Xa, aN as Ja, aO as Ka, aQ as Qa, aR as Ga, aS as Ya, aT as Za, aU as en } from "./chunk-LFPYN7LY-D1ls8FXf.js";
6
+ var T = {}, ue;
7
+ function ht() {
8
+ if (ue) return T;
9
+ ue = 1, Object.defineProperty(T, "__esModule", { value: !0 }), T.parseCookie = l, T.parse = l, T.stringifyCookie = s, T.stringifySetCookie = i, T.serialize = i, T.parseSetCookie = u, T.stringifySetCookie = i, T.serialize = i;
10
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, r = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, a = /^[\u0020-\u003A\u003D-\u007E]*$/, n = /^-?\d+$/, o = Object.prototype.toString, f = /* @__PURE__ */ (() => {
11
+ const c = function() {
12
+ };
13
+ return c.prototype = /* @__PURE__ */ Object.create(null), c;
14
+ })();
15
+ function l(c, v) {
16
+ const m = new f(), d = c.length;
17
+ if (d < 2)
18
+ return m;
19
+ const R = v?.decode || y;
20
+ let S = 0;
21
+ do {
22
+ const b = p(c, S, d);
23
+ if (b === -1)
24
+ break;
25
+ const E = h(c, S, d);
26
+ if (b > E) {
27
+ S = c.lastIndexOf(";", b - 1) + 1;
28
+ continue;
29
+ }
30
+ const _ = w(c, S, b);
31
+ m[_] === void 0 && (m[_] = R(w(c, b + 1, E))), S = E + 1;
32
+ } while (S < d);
33
+ return m;
34
+ }
35
+ function s(c, v) {
36
+ const m = v?.encode || encodeURIComponent, d = [];
37
+ for (const R of Object.keys(c)) {
38
+ const S = c[R];
39
+ if (S === void 0)
40
+ continue;
41
+ if (!e.test(R))
42
+ throw new TypeError(`cookie name is invalid: ${R}`);
43
+ const b = m(S);
44
+ if (!t.test(b))
45
+ throw new TypeError(`cookie val is invalid: ${S}`);
46
+ d.push(`${R}=${b}`);
47
+ }
48
+ return d.join("; ");
49
+ }
50
+ function i(c, v, m) {
51
+ const d = typeof c == "object" ? c : { ...m, name: c, value: String(v) }, S = (typeof v == "object" ? v : m)?.encode || encodeURIComponent;
52
+ if (!e.test(d.name))
53
+ throw new TypeError(`argument name is invalid: ${d.name}`);
54
+ const b = d.value ? S(d.value) : "";
55
+ if (!t.test(b))
56
+ throw new TypeError(`argument val is invalid: ${d.value}`);
57
+ let E = d.name + "=" + b;
58
+ if (d.maxAge !== void 0) {
59
+ if (!Number.isInteger(d.maxAge))
60
+ throw new TypeError(`option maxAge is invalid: ${d.maxAge}`);
61
+ E += "; Max-Age=" + d.maxAge;
62
+ }
63
+ if (d.domain) {
64
+ if (!r.test(d.domain))
65
+ throw new TypeError(`option domain is invalid: ${d.domain}`);
66
+ E += "; Domain=" + d.domain;
67
+ }
68
+ if (d.path) {
69
+ if (!a.test(d.path))
70
+ throw new TypeError(`option path is invalid: ${d.path}`);
71
+ E += "; Path=" + d.path;
72
+ }
73
+ if (d.expires) {
74
+ if (!g(d.expires) || !Number.isFinite(d.expires.valueOf()))
75
+ throw new TypeError(`option expires is invalid: ${d.expires}`);
76
+ E += "; Expires=" + d.expires.toUTCString();
77
+ }
78
+ if (d.httpOnly && (E += "; HttpOnly"), d.secure && (E += "; Secure"), d.partitioned && (E += "; Partitioned"), d.priority)
79
+ switch (typeof d.priority == "string" ? d.priority.toLowerCase() : void 0) {
80
+ case "low":
81
+ E += "; Priority=Low";
82
+ break;
83
+ case "medium":
84
+ E += "; Priority=Medium";
85
+ break;
86
+ case "high":
87
+ E += "; Priority=High";
88
+ break;
89
+ default:
90
+ throw new TypeError(`option priority is invalid: ${d.priority}`);
91
+ }
92
+ if (d.sameSite)
93
+ switch (typeof d.sameSite == "string" ? d.sameSite.toLowerCase() : d.sameSite) {
94
+ case !0:
95
+ case "strict":
96
+ E += "; SameSite=Strict";
97
+ break;
98
+ case "lax":
99
+ E += "; SameSite=Lax";
100
+ break;
101
+ case "none":
102
+ E += "; SameSite=None";
103
+ break;
104
+ default:
105
+ throw new TypeError(`option sameSite is invalid: ${d.sameSite}`);
106
+ }
107
+ return E;
108
+ }
109
+ function u(c, v) {
110
+ const m = v?.decode || y, d = c.length, R = h(c, 0, d), S = p(c, 0, R), b = S === -1 ? { name: "", value: m(w(c, 0, R)) } : {
111
+ name: w(c, 0, S),
112
+ value: m(w(c, S + 1, R))
113
+ };
114
+ let E = R + 1;
115
+ for (; E < d; ) {
116
+ const _ = h(c, E, d), F = p(c, E, _), x = F === -1 ? w(c, E, _) : w(c, E, F), C = F === -1 ? void 0 : w(c, F + 1, _);
117
+ switch (x.toLowerCase()) {
118
+ case "httponly":
119
+ b.httpOnly = !0;
120
+ break;
121
+ case "secure":
122
+ b.secure = !0;
123
+ break;
124
+ case "partitioned":
125
+ b.partitioned = !0;
126
+ break;
127
+ case "domain":
128
+ b.domain = C;
129
+ break;
130
+ case "path":
131
+ b.path = C;
132
+ break;
133
+ case "max-age":
134
+ C && n.test(C) && (b.maxAge = Number(C));
135
+ break;
136
+ case "expires":
137
+ if (!C)
138
+ break;
139
+ const D = new Date(C);
140
+ Number.isFinite(D.valueOf()) && (b.expires = D);
141
+ break;
142
+ case "priority":
143
+ if (!C)
144
+ break;
145
+ const H = C.toLowerCase();
146
+ (H === "low" || H === "medium" || H === "high") && (b.priority = H);
147
+ break;
148
+ case "samesite":
149
+ if (!C)
150
+ break;
151
+ const M = C.toLowerCase();
152
+ (M === "lax" || M === "strict" || M === "none") && (b.sameSite = M);
153
+ break;
154
+ }
155
+ E = _ + 1;
156
+ }
157
+ return b;
158
+ }
159
+ function h(c, v, m) {
160
+ const d = c.indexOf(";", v);
161
+ return d === -1 ? m : d;
162
+ }
163
+ function p(c, v, m) {
164
+ const d = c.indexOf("=", v);
165
+ return d < m ? d : -1;
166
+ }
167
+ function w(c, v, m) {
168
+ let d = v, R = m;
169
+ do {
170
+ const S = c.charCodeAt(d);
171
+ if (S !== 32 && S !== 9)
172
+ break;
173
+ } while (++d < R);
174
+ for (; R > d; ) {
175
+ const S = c.charCodeAt(R - 1);
176
+ if (S !== 32 && S !== 9)
177
+ break;
178
+ R--;
179
+ }
180
+ return c.slice(d, R);
181
+ }
182
+ function y(c) {
183
+ if (c.indexOf("%") === -1)
184
+ return c;
185
+ try {
186
+ return decodeURIComponent(c);
187
+ } catch {
188
+ return c;
189
+ }
190
+ }
191
+ function g(c) {
192
+ return o.call(c) === "[object Date]";
193
+ }
194
+ return T;
195
+ }
196
+ var de = /* @__PURE__ */ ht(), L = { exports: {} }, ce;
197
+ function pt() {
198
+ if (ce) return L.exports;
199
+ ce = 1;
200
+ var e = {
201
+ decodeValues: !0,
202
+ map: !1,
203
+ silent: !1
204
+ };
205
+ function t(s) {
206
+ return typeof s != "string" || s in {};
207
+ }
208
+ function r() {
209
+ return /* @__PURE__ */ Object.create(null);
210
+ }
211
+ function a(s) {
212
+ return typeof s == "string" && !!s.trim();
213
+ }
214
+ function n(s, i) {
215
+ var u = s.split(";").filter(a), h = u.shift(), p = o(h), w = p.name, y = p.value;
216
+ if (i = i ? Object.assign({}, e, i) : e, t(w))
217
+ return null;
218
+ try {
219
+ y = i.decodeValues ? decodeURIComponent(y) : y;
220
+ } catch (c) {
221
+ console.error(
222
+ "set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
223
+ c
224
+ );
225
+ }
226
+ var g = r();
227
+ return g.name = w, g.value = y, u.forEach(function(c) {
228
+ var v = c.split("="), m = v.shift().trimLeft().toLowerCase();
229
+ if (!t(m)) {
230
+ var d = v.join("=");
231
+ if (m === "expires")
232
+ g.expires = new Date(d);
233
+ else if (m === "max-age") {
234
+ var R = parseInt(d, 10);
235
+ Number.isNaN(R) || (g.maxAge = R);
236
+ } else m === "secure" ? g.secure = !0 : m === "httponly" ? g.httpOnly = !0 : m === "samesite" ? g.sameSite = d : m === "partitioned" ? g.partitioned = !0 : m && (g[m] = d);
237
+ }
238
+ }), g;
239
+ }
240
+ function o(s) {
241
+ var i = "", u = "", h = s.split("=");
242
+ return h.length > 1 ? (i = h.shift(), u = h.join("=")) : u = s, { name: i, value: u };
243
+ }
244
+ function f(s, i) {
245
+ if (i = i ? Object.assign({}, e, i) : e, !s)
246
+ return i.map ? r() : [];
247
+ if (s.headers)
248
+ if (typeof s.headers.getSetCookie == "function")
249
+ s = s.headers.getSetCookie();
250
+ else if (s.headers["set-cookie"])
251
+ s = s.headers["set-cookie"];
252
+ else {
253
+ var u = s.headers[Object.keys(s.headers).find(function(p) {
254
+ return p.toLowerCase() === "set-cookie";
255
+ })];
256
+ !u && s.headers.cookie && !i.silent && console.warn(
257
+ "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
258
+ ), s = u;
259
+ }
260
+ if (Array.isArray(s) || (s = [s]), i.map) {
261
+ var h = r();
262
+ return s.filter(a).reduce(function(p, w) {
263
+ var y = n(w, i);
264
+ return y && !t(y.name) && (p[y.name] = y), p;
265
+ }, h);
266
+ } else
267
+ return s.filter(a).map(function(p) {
268
+ return n(p, i);
269
+ }).filter(Boolean);
270
+ }
271
+ function l(s) {
272
+ if (Array.isArray(s))
273
+ return s;
274
+ if (typeof s != "string")
275
+ return [];
276
+ var i = [], u = 0, h, p, w, y, g;
277
+ function c() {
278
+ for (; u < s.length && /\s/.test(s.charAt(u)); )
279
+ u += 1;
280
+ return u < s.length;
281
+ }
282
+ function v() {
283
+ return p = s.charAt(u), p !== "=" && p !== ";" && p !== ",";
284
+ }
285
+ for (; u < s.length; ) {
286
+ for (h = u, g = !1; c(); )
287
+ if (p = s.charAt(u), p === ",") {
288
+ for (w = u, u += 1, c(), y = u; u < s.length && v(); )
289
+ u += 1;
290
+ u < s.length && s.charAt(u) === "=" ? (g = !0, u = y, i.push(s.substring(h, w)), h = u) : u = w + 1;
291
+ } else
292
+ u += 1;
293
+ (!g || u >= s.length) && i.push(s.substring(h, s.length));
294
+ }
295
+ return i;
296
+ }
297
+ return L.exports = f, L.exports.parse = f, L.exports.parseString = n, L.exports.splitCookiesString = l, L.exports;
298
+ }
299
+ var mt = /* @__PURE__ */ pt();
300
+ function nr({
301
+ context: e,
302
+ url: t,
303
+ nonce: r
304
+ }) {
305
+ typeof t == "string" && (t = new URL(t));
306
+ let { manifest: a, routeModules: n, criticalCss: o, serverHandoffString: f } = e, l = qe(
307
+ a.routes,
308
+ n,
309
+ e.future,
310
+ e.isSpaMode
311
+ );
312
+ e.staticHandlerContext.loaderData = {
313
+ ...e.staticHandlerContext.loaderData
314
+ };
315
+ for (let i of e.staticHandlerContext.matches) {
316
+ let u = i.route.id, h = n[u], p = e.manifest.routes[u];
317
+ h && p && ee(
318
+ u,
319
+ h.clientLoader,
320
+ p.hasLoader,
321
+ e.isSpaMode
322
+ ) && (h.HydrateFallback || !p.hasLoader) && delete e.staticHandlerContext.loaderData[u];
323
+ }
324
+ let s = Ce(l, e.staticHandlerContext);
325
+ return /* @__PURE__ */ k.createElement(k.Fragment, null, /* @__PURE__ */ k.createElement(
326
+ te.Provider,
327
+ {
328
+ value: {
329
+ manifest: a,
330
+ routeModules: n,
331
+ criticalCss: o,
332
+ serverHandoffString: f,
333
+ future: e.future,
334
+ ssr: e.ssr,
335
+ isSpaMode: e.isSpaMode,
336
+ routeDiscovery: e.routeDiscovery,
337
+ serializeError: e.serializeError,
338
+ renderMeta: e.renderMeta
339
+ }
340
+ },
341
+ /* @__PURE__ */ k.createElement(Ve, { location: s.state.location }, /* @__PURE__ */ k.createElement(
342
+ be,
343
+ {
344
+ router: s,
345
+ context: e.staticHandlerContext,
346
+ hydrate: !1
347
+ }
348
+ ))
349
+ ), e.serverHandoffStream ? /* @__PURE__ */ k.createElement(k.Suspense, null, /* @__PURE__ */ k.createElement(
350
+ We,
351
+ {
352
+ context: e,
353
+ identifier: 0,
354
+ reader: e.serverHandoffStream.getReader(),
355
+ textDecoder: new TextDecoder(),
356
+ nonce: r
357
+ }
358
+ )) : null);
359
+ }
360
+ function sr(e, t) {
361
+ return function({
362
+ initialEntries: a,
363
+ initialIndex: n,
364
+ hydrationData: o,
365
+ future: f
366
+ }) {
367
+ let l = k.useRef(), s = k.useRef();
368
+ if (l.current == null) {
369
+ s.current = {
370
+ future: {
371
+ unstable_subResourceIntegrity: f?.unstable_subResourceIntegrity === !0,
372
+ v8_middleware: f?.v8_middleware === !0,
373
+ unstable_trailingSlashAwareDataRequests: f?.unstable_trailingSlashAwareDataRequests === !0
374
+ },
375
+ manifest: {
376
+ routes: {},
377
+ entry: { imports: [], module: "" },
378
+ url: "",
379
+ version: ""
380
+ },
381
+ routeModules: {},
382
+ ssr: !1,
383
+ isSpaMode: !1,
384
+ routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }
385
+ };
386
+ let i = Ae(
387
+ // @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
388
+ // types compared to `AgnosticRouteObject`
389
+ Je(e, (u) => u),
390
+ t !== void 0 ? t : f?.v8_middleware ? new K() : {},
391
+ s.current.manifest,
392
+ s.current.routeModules
393
+ );
394
+ l.current = Ke(i, {
395
+ initialEntries: a,
396
+ initialIndex: n,
397
+ hydrationData: o
398
+ });
399
+ }
400
+ return /* @__PURE__ */ k.createElement(te.Provider, { value: s.current }, /* @__PURE__ */ k.createElement(Qe, { router: l.current }));
401
+ };
402
+ }
403
+ function Ae(e, t, r, a, n) {
404
+ return e.map((o) => {
405
+ if (!o.id)
406
+ throw new Error(
407
+ "Expected a route.id in react-router processRoutes() function"
408
+ );
409
+ let f = {
410
+ id: o.id,
411
+ path: o.path,
412
+ index: o.index,
413
+ Component: o.Component ? rt(o.Component) : void 0,
414
+ HydrateFallback: o.HydrateFallback ? tt(o.HydrateFallback) : void 0,
415
+ ErrorBoundary: o.ErrorBoundary ? et(o.ErrorBoundary) : void 0,
416
+ action: o.action ? (s) => o.action({ ...s, context: t }) : void 0,
417
+ loader: o.loader ? (s) => o.loader({ ...s, context: t }) : void 0,
418
+ middleware: o.middleware ? o.middleware.map(
419
+ (s) => (...i) => s(
420
+ { ...i[0], context: t },
421
+ i[1]
422
+ )
423
+ ) : void 0,
424
+ handle: o.handle,
425
+ shouldRevalidate: o.shouldRevalidate
426
+ }, l = {
427
+ id: o.id,
428
+ path: o.path,
429
+ index: o.index,
430
+ parentId: n,
431
+ hasAction: o.action != null,
432
+ hasLoader: o.loader != null,
433
+ // When testing routes, you should be stubbing loader/action/middleware,
434
+ // not trying to re-implement the full loader/clientLoader/SSR/hydration
435
+ // flow. That is better tested via E2E tests.
436
+ hasClientAction: !1,
437
+ hasClientLoader: !1,
438
+ hasClientMiddleware: !1,
439
+ hasErrorBoundary: o.ErrorBoundary != null,
440
+ // any need for these?
441
+ module: "build/stub-path-to-module.js",
442
+ clientActionModule: void 0,
443
+ clientLoaderModule: void 0,
444
+ clientMiddlewareModule: void 0,
445
+ hydrateFallbackModule: void 0
446
+ };
447
+ return r.routes[f.id] = l, a[o.id] = {
448
+ default: f.Component || at,
449
+ ErrorBoundary: f.ErrorBoundary || void 0,
450
+ handle: o.handle,
451
+ links: o.links,
452
+ meta: o.meta,
453
+ shouldRevalidate: o.shouldRevalidate
454
+ }, o.children && (f.children = Ae(
455
+ o.children,
456
+ t,
457
+ r,
458
+ a,
459
+ f.id
460
+ )), f;
461
+ });
462
+ }
463
+ var ae = /* @__PURE__ */ new TextEncoder(), yt = async (e, t) => {
464
+ let r = ae.encode(e), a = await De(t, ["sign"]), n = await crypto.subtle.sign("HMAC", a, r), o = btoa(String.fromCharCode(...new Uint8Array(n))).replace(
465
+ /=+$/,
466
+ ""
467
+ );
468
+ return e + "." + o;
469
+ }, wt = async (e, t) => {
470
+ let r = e.lastIndexOf("."), a = e.slice(0, r), n = e.slice(r + 1), o = ae.encode(a), f = await De(t, ["verify"]);
471
+ try {
472
+ let l = gt(atob(n));
473
+ return await crypto.subtle.verify("HMAC", f, l, o) ? a : !1;
474
+ } catch {
475
+ return !1;
476
+ }
477
+ }, De = async (e, t) => crypto.subtle.importKey(
478
+ "raw",
479
+ ae.encode(e),
480
+ { name: "HMAC", hash: "SHA-256" },
481
+ !1,
482
+ t
483
+ );
484
+ function gt(e) {
485
+ let t = new Uint8Array(e.length);
486
+ for (let r = 0; r < e.length; r++)
487
+ t[r] = e.charCodeAt(r);
488
+ return t;
489
+ }
490
+ var He = (e, t = {}) => {
491
+ let { secrets: r = [], ...a } = {
492
+ path: "/",
493
+ sameSite: "lax",
494
+ ...t
495
+ };
496
+ return bt(e, a.expires), {
497
+ get name() {
498
+ return e;
499
+ },
500
+ get isSigned() {
501
+ return r.length > 0;
502
+ },
503
+ get expires() {
504
+ return typeof a.maxAge < "u" ? new Date(Date.now() + a.maxAge * 1e3) : a.expires;
505
+ },
506
+ async parse(n, o) {
507
+ if (!n) return null;
508
+ let f = de.parse(n, { ...a, ...o });
509
+ if (e in f) {
510
+ let l = f[e];
511
+ return typeof l == "string" && l !== "" ? await St(l, r) : "";
512
+ } else
513
+ return null;
514
+ },
515
+ async serialize(n, o) {
516
+ return de.serialize(
517
+ e,
518
+ n === "" ? "" : await Rt(n, r),
519
+ {
520
+ ...a,
521
+ ...o
522
+ }
523
+ );
524
+ }
525
+ };
526
+ }, Te = (e) => e != null && typeof e.name == "string" && typeof e.isSigned == "boolean" && typeof e.parse == "function" && typeof e.serialize == "function";
527
+ async function Rt(e, t) {
528
+ let r = vt(e);
529
+ return t.length > 0 && (r = await yt(r, t[0])), r;
530
+ }
531
+ async function St(e, t) {
532
+ if (t.length > 0) {
533
+ for (let r of t) {
534
+ let a = await wt(e, r);
535
+ if (a !== !1)
536
+ return fe(a);
537
+ }
538
+ return null;
539
+ }
540
+ return fe(e);
541
+ }
542
+ function vt(e) {
543
+ return btoa(Ct(encodeURIComponent(JSON.stringify(e))));
544
+ }
545
+ function fe(e) {
546
+ try {
547
+ return JSON.parse(decodeURIComponent(Et(atob(e))));
548
+ } catch {
549
+ return {};
550
+ }
551
+ }
552
+ function Et(e) {
553
+ let t = e.toString(), r = "", a = 0, n, o;
554
+ for (; a < t.length; )
555
+ n = t.charAt(a++), /[\w*+\-./@]/.exec(n) ? r += n : (o = n.charCodeAt(0), o < 256 ? r += "%" + he(o, 2) : r += "%u" + he(o, 4).toUpperCase());
556
+ return r;
557
+ }
558
+ function he(e, t) {
559
+ let r = e.toString(16);
560
+ for (; r.length < t; ) r = "0" + r;
561
+ return r;
562
+ }
563
+ function Ct(e) {
564
+ let t = e.toString(), r = "", a = 0, n, o;
565
+ for (; a < t.length; ) {
566
+ if (n = t.charAt(a++), n === "%") {
567
+ if (t.charAt(a) === "u") {
568
+ if (o = t.slice(a + 1, a + 5), /^[\da-f]{4}$/i.exec(o)) {
569
+ r += String.fromCharCode(parseInt(o, 16)), a += 5;
570
+ continue;
571
+ }
572
+ } else if (o = t.slice(a, a + 2), /^[\da-f]{2}$/i.exec(o)) {
573
+ r += String.fromCharCode(parseInt(o, 16)), a += 2;
574
+ continue;
575
+ }
576
+ }
577
+ r += n;
578
+ }
579
+ return r;
580
+ }
581
+ function bt(e, t) {
582
+ ke(
583
+ !t,
584
+ `The "${e}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`
585
+ );
586
+ }
587
+ function xt(e) {
588
+ return Object.keys(e).reduce((t, r) => {
589
+ let a = e[r];
590
+ return a && (t[r] = a.module), t;
591
+ }, {});
592
+ }
593
+ var _t = /* @__PURE__ */ ((e) => (e.Development = "development", e.Production = "production", e.Test = "test", e))(_t || {});
594
+ function kt(e) {
595
+ return e === "development" || e === "production" || e === "test";
596
+ }
597
+ function V(e, t) {
598
+ if (e instanceof Error && t !== "development") {
599
+ let r = new Error("Unexpected Server Error");
600
+ return r.stack = void 0, r;
601
+ }
602
+ return e;
603
+ }
604
+ function z(e, t) {
605
+ return Object.entries(e).reduce((r, [a, n]) => Object.assign(r, { [a]: V(n, t) }), {});
606
+ }
607
+ function Fe(e, t) {
608
+ let r = V(e, t);
609
+ return {
610
+ message: r.message,
611
+ stack: r.stack
612
+ };
613
+ }
614
+ function pe(e, t) {
615
+ if (!e) return null;
616
+ let r = Object.entries(e), a = {};
617
+ for (let [n, o] of r)
618
+ if (P(o))
619
+ a[n] = { ...o, __type: "RouteErrorResponse" };
620
+ else if (o instanceof Error) {
621
+ let f = V(o, t);
622
+ a[n] = {
623
+ message: f.message,
624
+ stack: f.stack,
625
+ __type: "Error",
626
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
627
+ // can re-create the same type during hydration. This will only apply
628
+ // in dev mode since all production errors are sanitized to normal
629
+ // Error instances
630
+ ...f.name !== "Error" ? {
631
+ __subType: f.name
632
+ } : {}
633
+ };
634
+ } else
635
+ a[n] = o;
636
+ return a;
637
+ }
638
+ function G(e, t, r) {
639
+ let a = xe(
640
+ e,
641
+ t,
642
+ r
643
+ );
644
+ return a ? a.map((n) => ({
645
+ params: n.params,
646
+ pathname: n.pathname,
647
+ route: n.route
648
+ })) : null;
649
+ }
650
+ async function me(e, t) {
651
+ let r = await e({
652
+ request: Dt(At(t.request)),
653
+ params: t.params,
654
+ context: t.context,
655
+ unstable_pattern: t.unstable_pattern
656
+ });
657
+ if (ut(r) && r.init && r.init.status && re(r.init.status))
658
+ throw new Response(null, r.init);
659
+ return r;
660
+ }
661
+ function At(e) {
662
+ let t = new URL(e.url), r = t.searchParams.getAll("index");
663
+ t.searchParams.delete("index");
664
+ let a = [];
665
+ for (let o of r)
666
+ o && a.push(o);
667
+ for (let o of a)
668
+ t.searchParams.append("index", o);
669
+ let n = {
670
+ method: e.method,
671
+ body: e.body,
672
+ headers: e.headers,
673
+ signal: e.signal
674
+ };
675
+ return n.body && (n.duplex = "half"), new Request(t.href, n);
676
+ }
677
+ function Dt(e) {
678
+ let t = new URL(e.url);
679
+ t.searchParams.delete("_routes");
680
+ let r = {
681
+ method: e.method,
682
+ body: e.body,
683
+ headers: e.headers,
684
+ signal: e.signal
685
+ };
686
+ return r.body && (r.duplex = "half"), new Request(t.href, r);
687
+ }
688
+ function j(e, t) {
689
+ if (e === !1 || e === null || typeof e > "u")
690
+ throw console.error(
691
+ "The following error is a bug in React Router; please open an issue! https://github.com/remix-run/react-router/issues/new/choose"
692
+ ), new Error(t);
693
+ }
694
+ var Pe = "__reactRouterDevServerHooks";
695
+ function or(e) {
696
+ globalThis[Pe] = e;
697
+ }
698
+ function W() {
699
+ return globalThis[Pe];
700
+ }
701
+ function Ne(e, t) {
702
+ if (typeof process < "u")
703
+ try {
704
+ if (process.env?.IS_RR_BUILD_REQUEST === "yes")
705
+ return e.headers.get(t);
706
+ } catch {
707
+ }
708
+ return null;
709
+ }
710
+ function Ue(e) {
711
+ let t = {};
712
+ return Object.values(e).forEach((r) => {
713
+ if (r) {
714
+ let a = r.parentId || "";
715
+ t[a] || (t[a] = []), t[a].push(r);
716
+ }
717
+ }), t;
718
+ }
719
+ function Le(e, t = "", r = Ue(e)) {
720
+ return (r[t] || []).map((a) => ({
721
+ ...a,
722
+ children: Le(e, a.id, r)
723
+ }));
724
+ }
725
+ function Oe(e, t, r = "", a = Ue(e)) {
726
+ return (a[r] || []).map((n) => {
727
+ let o = {
728
+ // Always include root due to default boundaries
729
+ hasErrorBoundary: n.id === "root" || n.module.ErrorBoundary != null,
730
+ id: n.id,
731
+ path: n.path,
732
+ middleware: n.module.middleware,
733
+ // Need to use RR's version in the param typed here to permit the optional
734
+ // context even though we know it'll always be provided in remix
735
+ loader: n.module.loader ? async (f) => {
736
+ let l = Ne(
737
+ f.request,
738
+ "X-React-Router-Prerender-Data"
739
+ );
740
+ if (l != null) {
741
+ let i = l && decodeURI(l);
742
+ j(i, "Missing prerendered data for route");
743
+ let u = new TextEncoder().encode(i), h = new ReadableStream({
744
+ start(y) {
745
+ y.enqueue(u), y.close();
746
+ }
747
+ }), w = (await nt(h, global)).value;
748
+ if (w && I in w) {
749
+ let y = w[I], g = { status: y.status };
750
+ throw y.reload ? st(y.redirect, g) : y.replace ? ot(y.redirect, g) : it(y.redirect, g);
751
+ } else {
752
+ j(
753
+ w && n.id in w,
754
+ "Unable to decode prerendered data"
755
+ );
756
+ let y = w[n.id];
757
+ return j(
758
+ "data" in y,
759
+ "Unable to process prerendered data"
760
+ ), y.data;
761
+ }
762
+ }
763
+ return await me(n.module.loader, f);
764
+ } : void 0,
765
+ action: n.module.action ? (f) => me(n.module.action, f) : void 0,
766
+ handle: n.module.handle
767
+ };
768
+ return n.index ? {
769
+ index: !0,
770
+ ...o
771
+ } : {
772
+ caseSensitive: n.caseSensitive,
773
+ children: Oe(
774
+ e,
775
+ t,
776
+ n.id,
777
+ a
778
+ ),
779
+ ...o
780
+ };
781
+ });
782
+ }
783
+ function ye(e) {
784
+ return Q(JSON.stringify(e));
785
+ }
786
+ function ne(e, t) {
787
+ return Ht(e, (r) => {
788
+ let a = t.routes[r.route.id];
789
+ return j(a, `Route with id "${r.route.id}" not found in build`), a.module.headers;
790
+ });
791
+ }
792
+ function Ht(e, t, r) {
793
+ let a = e.errors ? e.matches.findIndex((l) => e.errors[l.route.id]) : -1, n = a >= 0 ? e.matches.slice(0, a + 1) : e.matches, o;
794
+ if (a >= 0) {
795
+ let { actionHeaders: l, actionData: s, loaderHeaders: i, loaderData: u } = e;
796
+ e.matches.slice(a).some((h) => {
797
+ let p = h.route.id;
798
+ return l[p] && (!s || !s.hasOwnProperty(p)) ? o = l[p] : i[p] && !u.hasOwnProperty(p) && (o = i[p]), o != null;
799
+ });
800
+ }
801
+ const f = new Headers(r);
802
+ return n.reduce((l, s, i) => {
803
+ let { id: u } = s.route, h = e.loaderHeaders[u] || new Headers(), p = e.actionHeaders[u] || new Headers(), w = o != null && i === n.length - 1, y = w && o !== h && o !== p, g = t(s);
804
+ if (g == null) {
805
+ let v = new Headers(l);
806
+ return y && N(o, v), N(p, v), N(h, v), v;
807
+ }
808
+ let c = new Headers(
809
+ typeof g == "function" ? g({
810
+ loaderHeaders: h,
811
+ parentHeaders: l,
812
+ actionHeaders: p,
813
+ errorHeaders: w ? o : void 0
814
+ }) : g
815
+ );
816
+ return y && N(o, c), N(p, c), N(h, c), N(l, c), c;
817
+ }, new Headers(f));
818
+ }
819
+ function N(e, t) {
820
+ let r = e.get("Set-Cookie");
821
+ if (r) {
822
+ let a = mt.splitCookiesString(r), n = new Set(t.getSetCookie());
823
+ a.forEach((o) => {
824
+ n.has(o) || t.append("Set-Cookie", o);
825
+ });
826
+ }
827
+ }
828
+ function Ie(e, t) {
829
+ let r = e.get("origin"), a = null;
830
+ try {
831
+ a = typeof r == "string" && r !== "null" ? new URL(r).host : r;
832
+ } catch {
833
+ throw new Error(
834
+ "`origin` header is not a valid URL. Aborting the action."
835
+ );
836
+ }
837
+ let n = Pt(e);
838
+ if (a && (!n || a !== n.value) && !Ft(a, t))
839
+ throw n ? new Error(
840
+ `${n.type} header does not match \`origin\` header from a forwarded action request. Aborting the action.`
841
+ ) : new Error(
842
+ "`x-forwarded-host` or `host` headers are not provided. One of these is needed to compare the `origin` header from a forwarded action request. Aborting the action."
843
+ );
844
+ }
845
+ function Tt(e, t) {
846
+ const r = e.split("."), a = t.split(".");
847
+ if (a.length < 1 || r.length < a.length)
848
+ return !1;
849
+ for (; a.length; ) {
850
+ const n = a.pop(), o = r.pop();
851
+ switch (n) {
852
+ case "":
853
+ return !1;
854
+ case "*": {
855
+ if (o)
856
+ continue;
857
+ return !1;
858
+ }
859
+ case "**":
860
+ return a.length > 0 ? !1 : o !== void 0;
861
+ default:
862
+ if (o !== n)
863
+ return !1;
864
+ }
865
+ }
866
+ return r.length === 0;
867
+ }
868
+ function Ft(e, t = []) {
869
+ return t.some(
870
+ (r) => r && (r === e || Tt(e, r))
871
+ );
872
+ }
873
+ function Pt(e) {
874
+ let r = e.get("x-forwarded-host")?.split(",")[0]?.trim(), a = e.get("host");
875
+ return r ? {
876
+ type: "x-forwarded-host",
877
+ value: r
878
+ } : a ? {
879
+ type: "host",
880
+ value: a
881
+ } : void 0;
882
+ }
883
+ var Be = /* @__PURE__ */ new Set([
884
+ ...ct,
885
+ 304
886
+ ]);
887
+ async function Nt(e, t, r, a, n, o, f) {
888
+ try {
889
+ try {
890
+ Ie(
891
+ a.headers,
892
+ Array.isArray(e.allowedActionOrigins) ? e.allowedActionOrigins : []
893
+ );
894
+ } catch {
895
+ return s(new Error("Bad Request"), 400);
896
+ }
897
+ let u = new Request(n, {
898
+ method: a.method,
899
+ body: a.body,
900
+ headers: a.headers,
901
+ signal: a.signal,
902
+ ...a.body ? { duplex: "half" } : void 0
903
+ }), h = await r.query(u, {
904
+ requestContext: o,
905
+ skipLoaderErrorBubbling: !0,
906
+ skipRevalidation: !0,
907
+ generateMiddlewareResponse: e.future.v8_middleware ? async (p) => {
908
+ try {
909
+ let w = await p(u);
910
+ return l(w);
911
+ } catch (w) {
912
+ return s(w);
913
+ }
914
+ } : void 0
915
+ });
916
+ return l(h);
917
+ } catch (u) {
918
+ return s(u);
919
+ }
920
+ function l(u) {
921
+ return U(u) ? u : i(u);
922
+ }
923
+ function s(u, h = 500) {
924
+ return f(u), B(a, e, t, {
925
+ result: { error: u },
926
+ headers: new Headers(),
927
+ status: h
928
+ });
929
+ }
930
+ function i(u) {
931
+ let h = ne(u, e);
932
+ if (re(u.statusCode) && h.has("Location"))
933
+ return new Response(null, { status: u.statusCode, headers: h });
934
+ u.errors && (Object.values(u.errors).forEach((w) => {
935
+ (!P(w) || w.error) && f(w);
936
+ }), u.errors = z(u.errors, t));
937
+ let p;
938
+ return u.errors ? p = { error: Object.values(u.errors)[0] } : p = {
939
+ data: Object.values(u.actionData || {})[0]
940
+ }, B(a, e, t, {
941
+ result: p,
942
+ headers: h,
943
+ status: u.statusCode
944
+ });
945
+ }
946
+ }
947
+ async function Ut(e, t, r, a, n, o, f) {
948
+ let l = new URL(a.url).searchParams.get("_routes"), s = l ? new Set(l.split(",")) : null;
949
+ try {
950
+ let p = new Request(n, {
951
+ headers: a.headers,
952
+ signal: a.signal
953
+ }), w = await r.query(p, {
954
+ requestContext: o,
955
+ filterMatchesToLoad: (y) => !s || s.has(y.route.id),
956
+ skipLoaderErrorBubbling: !0,
957
+ generateMiddlewareResponse: e.future.v8_middleware ? async (y) => {
958
+ try {
959
+ let g = await y(p);
960
+ return i(g);
961
+ } catch (g) {
962
+ return u(g);
963
+ }
964
+ } : void 0
965
+ });
966
+ return i(w);
967
+ } catch (p) {
968
+ return u(p);
969
+ }
970
+ function i(p) {
971
+ return U(p) ? p : h(p);
972
+ }
973
+ function u(p) {
974
+ return f(p), B(a, e, t, {
975
+ result: { error: p },
976
+ headers: new Headers(),
977
+ status: 500
978
+ });
979
+ }
980
+ function h(p) {
981
+ let w = ne(p, e);
982
+ if (re(p.statusCode) && w.has("Location"))
983
+ return new Response(null, { status: p.statusCode, headers: w });
984
+ p.errors && (Object.values(p.errors).forEach((c) => {
985
+ (!P(c) || c.error) && f(c);
986
+ }), p.errors = z(p.errors, t));
987
+ let y = {}, g = new Set(
988
+ p.matches.filter(
989
+ (c) => s ? s.has(c.route.id) : c.route.loader != null
990
+ ).map((c) => c.route.id)
991
+ );
992
+ if (p.errors)
993
+ for (let [c, v] of Object.entries(p.errors))
994
+ y[c] = { error: v };
995
+ for (let [c, v] of Object.entries(p.loaderData))
996
+ !(c in y) && g.has(c) && (y[c] = { data: v });
997
+ return B(a, e, t, {
998
+ result: y,
999
+ headers: w,
1000
+ status: p.statusCode
1001
+ });
1002
+ }
1003
+ }
1004
+ function B(e, t, r, {
1005
+ result: a,
1006
+ headers: n,
1007
+ status: o
1008
+ }) {
1009
+ let f = new Headers(n);
1010
+ return f.set("X-Remix-Response", "yes"), Be.has(o) ? new Response(null, { status: o, headers: f }) : (f.set("Content-Type", "text/x-script"), f.delete("Content-Length"), new Response(
1011
+ Y(
1012
+ a,
1013
+ e.signal,
1014
+ t.entry.module.streamTimeout,
1015
+ r
1016
+ ),
1017
+ {
1018
+ status: o || 200,
1019
+ headers: f
1020
+ }
1021
+ ));
1022
+ }
1023
+ function we(e, t, r, a) {
1024
+ let n = Lt(
1025
+ e.status,
1026
+ e.headers,
1027
+ r.basename
1028
+ ), o = new Headers(e.headers);
1029
+ return o.delete("Location"), o.set("Content-Type", "text/x-script"), B(t, r, a, {
1030
+ result: t.method === "GET" ? { [I]: n } : n,
1031
+ headers: o,
1032
+ status: _e
1033
+ });
1034
+ }
1035
+ function Lt(e, t, r) {
1036
+ let a = t.get("Location");
1037
+ return r && (a = $(a, r) || a), {
1038
+ redirect: a,
1039
+ status: e,
1040
+ revalidate: (
1041
+ // Technically X-Remix-Revalidate isn't needed here - that was an implementation
1042
+ // detail of ?_data requests as our way to tell the front end to revalidate when
1043
+ // we didn't have a response body to include that information in.
1044
+ // With single fetch, we tell the front end via this revalidate boolean field.
1045
+ // However, we're respecting it for now because it may be something folks have
1046
+ // used in their own responses
1047
+ // TODO(v3): Consider removing or making this official public API
1048
+ t.has("X-Remix-Revalidate") || t.has("Set-Cookie")
1049
+ ),
1050
+ reload: t.has("X-Remix-Reload-Document"),
1051
+ replace: t.has("X-Remix-Replace")
1052
+ };
1053
+ }
1054
+ function Y(e, t, r, a) {
1055
+ let n = new AbortController(), o = setTimeout(
1056
+ () => n.abort(new Error("Server Timeout")),
1057
+ typeof r == "number" ? r : 4950
1058
+ ), f = () => clearTimeout(o);
1059
+ return t.addEventListener("abort", f), ft(e, {
1060
+ signal: n.signal,
1061
+ onComplete: f,
1062
+ plugins: [
1063
+ (l) => {
1064
+ if (l instanceof Error) {
1065
+ let { name: s, message: i, stack: u } = a === "production" ? V(l, a) : l;
1066
+ return ["SanitizedError", s, i, u];
1067
+ }
1068
+ if (l instanceof O) {
1069
+ let { data: s, status: i, statusText: u } = l;
1070
+ return ["ErrorResponse", s, i, u];
1071
+ }
1072
+ if (l && typeof l == "object" && I in l)
1073
+ return ["SingleFetchRedirect", l[I]];
1074
+ }
1075
+ ],
1076
+ postPlugins: [
1077
+ (l) => {
1078
+ if (l && typeof l == "object")
1079
+ return [
1080
+ "SingleFetchClassInstance",
1081
+ Object.fromEntries(Object.entries(l))
1082
+ ];
1083
+ },
1084
+ () => ["SingleFetchFallback"]
1085
+ ]
1086
+ });
1087
+ }
1088
+ function ge(e, t) {
1089
+ let r = Le(e.routes), a = Oe(e.routes, e.future), n = kt(t) ? t : "production", o = Ye(a, {
1090
+ basename: e.basename,
1091
+ unstable_instrumentations: e.entry.module.unstable_instrumentations
1092
+ }), f = e.entry.module.handleError || ((s, { request: i }) => {
1093
+ n !== "test" && !i.signal.aborted && console.error(
1094
+ // @ts-expect-error This is "private" from users but intended for internal use
1095
+ P(s) && s.error ? s.error : s
1096
+ );
1097
+ }), l = async (s, i) => {
1098
+ let u = {}, h, p = (R) => {
1099
+ t === "development" && W()?.processRequestError?.(R), f(R, {
1100
+ context: h,
1101
+ params: u,
1102
+ request: s
1103
+ });
1104
+ };
1105
+ if (e.future.v8_middleware) {
1106
+ if (i && !(i instanceof K)) {
1107
+ let R = new Error(
1108
+ "Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
1109
+ );
1110
+ return p(R), q(R, n);
1111
+ }
1112
+ h = i || new K();
1113
+ } else
1114
+ h = i || {};
1115
+ let w = new URL(s.url), y = e.basename || "/", g = w.pathname;
1116
+ e.future.unstable_trailingSlashAwareDataRequests ? g.endsWith("/_.data") ? g = g.replace(/_.data$/, "") : g = g.replace(/\.data$/, "") : ($(g, y) === "/_root.data" ? g = y : g.endsWith(".data") && (g = g.replace(/\.data$/, "")), $(g, y) !== "/" && g.endsWith("/") && (g = g.slice(0, -1)));
1117
+ let c = Ne(s, "X-React-Router-SPA-Mode") === "yes";
1118
+ if (!e.ssr) {
1119
+ let R = decodeURI(g);
1120
+ if (y !== "/") {
1121
+ let S = $(R, y);
1122
+ if (S == null)
1123
+ return f(
1124
+ new O(
1125
+ 404,
1126
+ "Not Found",
1127
+ `Refusing to prerender the \`${R}\` path because it does not start with the basename \`${y}\``
1128
+ ),
1129
+ {
1130
+ context: h,
1131
+ params: u,
1132
+ request: s
1133
+ }
1134
+ ), new Response("Not Found", {
1135
+ status: 404,
1136
+ statusText: "Not Found"
1137
+ });
1138
+ R = S;
1139
+ }
1140
+ if (e.prerender.length === 0)
1141
+ c = !0;
1142
+ else if (!e.prerender.includes(R) && !e.prerender.includes(R + "/")) {
1143
+ if (w.pathname.endsWith(".data"))
1144
+ return f(
1145
+ new O(
1146
+ 404,
1147
+ "Not Found",
1148
+ `Refusing to SSR the path \`${R}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
1149
+ ),
1150
+ {
1151
+ context: h,
1152
+ params: u,
1153
+ request: s
1154
+ }
1155
+ ), new Response("Not Found", {
1156
+ status: 404,
1157
+ statusText: "Not Found"
1158
+ });
1159
+ c = !0;
1160
+ }
1161
+ }
1162
+ let v = lt(
1163
+ e.routeDiscovery.manifestPath,
1164
+ y
1165
+ );
1166
+ if (w.pathname === v)
1167
+ try {
1168
+ return await Ot(e, r, w);
1169
+ } catch (R) {
1170
+ return p(R), new Response("Unknown Server Error", { status: 500 });
1171
+ }
1172
+ let m = G(r, g, e.basename);
1173
+ m && m.length > 0 && Object.assign(u, m[0].params);
1174
+ let d;
1175
+ if (w.pathname.endsWith(".data")) {
1176
+ let R = new URL(s.url);
1177
+ R.pathname = g;
1178
+ let S = G(
1179
+ r,
1180
+ R.pathname,
1181
+ e.basename
1182
+ );
1183
+ d = await It(
1184
+ n,
1185
+ e,
1186
+ o,
1187
+ s,
1188
+ R,
1189
+ h,
1190
+ p
1191
+ ), le(d) && (d = we(
1192
+ d,
1193
+ s,
1194
+ e,
1195
+ n
1196
+ )), e.entry.module.handleDataRequest && (d = await e.entry.module.handleDataRequest(d, {
1197
+ context: h,
1198
+ params: S ? S[0].params : {},
1199
+ request: s
1200
+ }), le(d) && (d = we(
1201
+ d,
1202
+ s,
1203
+ e,
1204
+ n
1205
+ )));
1206
+ } else if (!c && m && m[m.length - 1].route.module.default == null && m[m.length - 1].route.module.ErrorBoundary == null)
1207
+ d = await Mt(
1208
+ n,
1209
+ e,
1210
+ o,
1211
+ m.slice(-1)[0].route.id,
1212
+ s,
1213
+ h,
1214
+ p
1215
+ );
1216
+ else {
1217
+ let { pathname: R } = w, S;
1218
+ e.unstable_getCriticalCss ? S = await e.unstable_getCriticalCss({ pathname: R }) : t === "development" && W()?.getCriticalCss && (S = await W()?.getCriticalCss?.(R)), d = await Bt(
1219
+ n,
1220
+ e,
1221
+ o,
1222
+ s,
1223
+ h,
1224
+ p,
1225
+ c,
1226
+ S
1227
+ );
1228
+ }
1229
+ return s.method === "HEAD" ? new Response(null, {
1230
+ headers: d.headers,
1231
+ status: d.status,
1232
+ statusText: d.statusText
1233
+ }) : d;
1234
+ };
1235
+ return e.entry.module.unstable_instrumentations && (l = Ze(
1236
+ l,
1237
+ e.entry.module.unstable_instrumentations.map((s) => s.handler).filter(Boolean)
1238
+ )), {
1239
+ routes: r,
1240
+ dataRoutes: a,
1241
+ serverMode: n,
1242
+ staticHandler: o,
1243
+ errorHandler: f,
1244
+ requestHandler: l
1245
+ };
1246
+ }
1247
+ var ir = (e, t) => {
1248
+ let r, a, n, o, f, l;
1249
+ return async function(i, u) {
1250
+ if (r = typeof e == "function" ? await e() : e, typeof e == "function") {
1251
+ let h = ge(r, t);
1252
+ a = h.routes, n = h.serverMode, o = h.staticHandler, f = h.errorHandler, l = h.requestHandler;
1253
+ } else if (!a || !n || !o || !f || !l) {
1254
+ let h = ge(r, t);
1255
+ a = h.routes, n = h.serverMode, o = h.staticHandler, f = h.errorHandler, l = h.requestHandler;
1256
+ }
1257
+ return l(i, u);
1258
+ };
1259
+ };
1260
+ async function Ot(e, t, r) {
1261
+ if (e.assets.version !== r.searchParams.get("version"))
1262
+ return new Response(null, {
1263
+ status: 204,
1264
+ headers: {
1265
+ "X-Remix-Reload-Document": "true"
1266
+ }
1267
+ });
1268
+ let a = {};
1269
+ if (r.searchParams.has("paths")) {
1270
+ let n = /* @__PURE__ */ new Set();
1271
+ (r.searchParams.get("paths") || "").split(",").filter(Boolean).forEach((l) => {
1272
+ l.startsWith("/") || (l = `/${l}`);
1273
+ let s = l.split("/").slice(1);
1274
+ s.forEach((i, u) => {
1275
+ let h = s.slice(0, u + 1).join("/");
1276
+ n.add(`/${h}`);
1277
+ });
1278
+ });
1279
+ for (let l of n) {
1280
+ let s = G(t, l, e.basename);
1281
+ if (s)
1282
+ for (let i of s) {
1283
+ let u = i.route.id, h = e.assets.routes[u];
1284
+ h && (a[u] = h);
1285
+ }
1286
+ }
1287
+ return Response.json(a, {
1288
+ headers: {
1289
+ "Cache-Control": "public, max-age=31536000, immutable"
1290
+ }
1291
+ });
1292
+ }
1293
+ return new Response("Invalid Request", { status: 400 });
1294
+ }
1295
+ async function It(e, t, r, a, n, o, f) {
1296
+ return a.method !== "GET" ? await Nt(
1297
+ t,
1298
+ e,
1299
+ r,
1300
+ a,
1301
+ n,
1302
+ o,
1303
+ f
1304
+ ) : await Ut(
1305
+ t,
1306
+ e,
1307
+ r,
1308
+ a,
1309
+ n,
1310
+ o,
1311
+ f
1312
+ );
1313
+ }
1314
+ async function Bt(e, t, r, a, n, o, f, l) {
1315
+ try {
1316
+ if (a.method === "POST")
1317
+ try {
1318
+ Ie(
1319
+ a.headers,
1320
+ Array.isArray(t.allowedActionOrigins) ? t.allowedActionOrigins : []
1321
+ );
1322
+ } catch (u) {
1323
+ return o(u), new Response("Bad Request", { status: 400 });
1324
+ }
1325
+ let i = await r.query(a, {
1326
+ requestContext: n,
1327
+ generateMiddlewareResponse: t.future.v8_middleware ? async (u) => {
1328
+ try {
1329
+ let h = await u(a);
1330
+ return U(h) || (h = await s(h, f)), h;
1331
+ } catch (h) {
1332
+ return o(h), new Response(null, { status: 500 });
1333
+ }
1334
+ } : void 0
1335
+ });
1336
+ return U(i) || (i = await s(i, f)), i;
1337
+ } catch (i) {
1338
+ return o(i), new Response(null, { status: 500 });
1339
+ }
1340
+ async function s(i, u) {
1341
+ let h = ne(i, t);
1342
+ if (Be.has(i.statusCode))
1343
+ return new Response(null, { status: i.statusCode, headers: h });
1344
+ i.errors && (Object.values(i.errors).forEach((c) => {
1345
+ (!P(c) || c.error) && o(c);
1346
+ }), i.errors = z(i.errors, e));
1347
+ let p = {
1348
+ loaderData: i.loaderData,
1349
+ actionData: i.actionData,
1350
+ errors: pe(i.errors, e)
1351
+ }, w = {
1352
+ basename: t.basename,
1353
+ future: t.future,
1354
+ routeDiscovery: t.routeDiscovery,
1355
+ ssr: t.ssr,
1356
+ isSpaMode: u
1357
+ }, y = {
1358
+ manifest: t.assets,
1359
+ routeModules: xt(t.routes),
1360
+ staticHandlerContext: i,
1361
+ criticalCss: l,
1362
+ serverHandoffString: ye({
1363
+ ...w,
1364
+ criticalCss: l
1365
+ }),
1366
+ serverHandoffStream: Y(
1367
+ p,
1368
+ a.signal,
1369
+ t.entry.module.streamTimeout,
1370
+ e
1371
+ ),
1372
+ renderMeta: {},
1373
+ future: t.future,
1374
+ ssr: t.ssr,
1375
+ routeDiscovery: t.routeDiscovery,
1376
+ isSpaMode: u,
1377
+ serializeError: (c) => Fe(c, e)
1378
+ }, g = t.entry.module.default;
1379
+ try {
1380
+ return await g(
1381
+ a,
1382
+ i.statusCode,
1383
+ h,
1384
+ y,
1385
+ n
1386
+ );
1387
+ } catch (c) {
1388
+ o(c);
1389
+ let v = c;
1390
+ if (U(c))
1391
+ try {
1392
+ let d = await jt(c);
1393
+ v = new O(
1394
+ c.status,
1395
+ c.statusText,
1396
+ d
1397
+ );
1398
+ } catch {
1399
+ }
1400
+ i = dt(
1401
+ r.dataRoutes,
1402
+ i,
1403
+ v
1404
+ ), i.errors && (i.errors = z(i.errors, e));
1405
+ let m = {
1406
+ loaderData: i.loaderData,
1407
+ actionData: i.actionData,
1408
+ errors: pe(i.errors, e)
1409
+ };
1410
+ y = {
1411
+ ...y,
1412
+ staticHandlerContext: i,
1413
+ serverHandoffString: ye(w),
1414
+ serverHandoffStream: Y(
1415
+ m,
1416
+ a.signal,
1417
+ t.entry.module.streamTimeout,
1418
+ e
1419
+ ),
1420
+ renderMeta: {}
1421
+ };
1422
+ try {
1423
+ return await g(
1424
+ a,
1425
+ i.statusCode,
1426
+ h,
1427
+ y,
1428
+ n
1429
+ );
1430
+ } catch (d) {
1431
+ return o(d), q(d, e);
1432
+ }
1433
+ }
1434
+ }
1435
+ }
1436
+ async function Mt(e, t, r, a, n, o, f) {
1437
+ try {
1438
+ let i = await r.queryRoute(n, {
1439
+ routeId: a,
1440
+ requestContext: o,
1441
+ generateMiddlewareResponse: t.future.v8_middleware ? async (u) => {
1442
+ try {
1443
+ let h = await u(n);
1444
+ return l(h);
1445
+ } catch (h) {
1446
+ return s(h);
1447
+ }
1448
+ } : void 0
1449
+ });
1450
+ return l(i);
1451
+ } catch (i) {
1452
+ return s(i);
1453
+ }
1454
+ function l(i) {
1455
+ return U(i) ? i : typeof i == "string" ? new Response(i) : Response.json(i);
1456
+ }
1457
+ function s(i) {
1458
+ if (U(i))
1459
+ return i;
1460
+ if (P(i))
1461
+ return f(i), $t(i, e);
1462
+ if (i instanceof Error && i.message === "Expected a response from queryRoute") {
1463
+ let u = new Error(
1464
+ "Expected a Response to be returned from resource route handler"
1465
+ );
1466
+ return f(u), q(u, e);
1467
+ }
1468
+ return f(i), q(i, e);
1469
+ }
1470
+ }
1471
+ function $t(e, t) {
1472
+ return Response.json(
1473
+ Fe(
1474
+ // @ts-expect-error This is "private" from users but intended for internal use
1475
+ e.error || new Error("Unexpected Server Error"),
1476
+ t
1477
+ ),
1478
+ {
1479
+ status: e.status,
1480
+ statusText: e.statusText
1481
+ }
1482
+ );
1483
+ }
1484
+ function q(e, t) {
1485
+ let r = "Unexpected Server Error";
1486
+ return t !== "production" && (r += `
1487
+
1488
+ ${String(e)}`), new Response(r, {
1489
+ status: 500,
1490
+ headers: {
1491
+ "Content-Type": "text/plain"
1492
+ }
1493
+ });
1494
+ }
1495
+ function jt(e) {
1496
+ let t = e.headers.get("Content-Type");
1497
+ return t && /\bapplication\/json\b/.test(t) ? e.body == null ? null : e.json() : e.text();
1498
+ }
1499
+ function X(e) {
1500
+ return `__flash_${e}__`;
1501
+ }
1502
+ var Me = (e = {}, t = "") => {
1503
+ let r = new Map(Object.entries(e));
1504
+ return {
1505
+ get id() {
1506
+ return t;
1507
+ },
1508
+ get data() {
1509
+ return Object.fromEntries(r);
1510
+ },
1511
+ has(a) {
1512
+ return r.has(a) || r.has(X(a));
1513
+ },
1514
+ get(a) {
1515
+ if (r.has(a)) return r.get(a);
1516
+ let n = X(a);
1517
+ if (r.has(n)) {
1518
+ let o = r.get(n);
1519
+ return r.delete(n), o;
1520
+ }
1521
+ },
1522
+ set(a, n) {
1523
+ r.set(a, n);
1524
+ },
1525
+ flash(a, n) {
1526
+ r.set(X(a), n);
1527
+ },
1528
+ unset(a) {
1529
+ r.delete(a);
1530
+ }
1531
+ };
1532
+ }, lr = (e) => e != null && typeof e.id == "string" && typeof e.data < "u" && typeof e.has == "function" && typeof e.get == "function" && typeof e.set == "function" && typeof e.flash == "function" && typeof e.unset == "function";
1533
+ function zt({
1534
+ cookie: e,
1535
+ createData: t,
1536
+ readData: r,
1537
+ updateData: a,
1538
+ deleteData: n
1539
+ }) {
1540
+ let o = Te(e) ? e : He(e?.name || "__session", e);
1541
+ return $e(o), {
1542
+ async getSession(f, l) {
1543
+ let s = f && await o.parse(f, l), i = s && await r(s);
1544
+ return Me(i || {}, s || "");
1545
+ },
1546
+ async commitSession(f, l) {
1547
+ let { id: s, data: i } = f, u = l?.maxAge != null ? new Date(Date.now() + l.maxAge * 1e3) : l?.expires != null ? l.expires : o.expires;
1548
+ return s ? await a(s, i, u) : s = await t(i, u), o.serialize(s, l);
1549
+ },
1550
+ async destroySession(f, l) {
1551
+ return await n(f.id), o.serialize("", {
1552
+ ...l,
1553
+ maxAge: void 0,
1554
+ expires: /* @__PURE__ */ new Date(0)
1555
+ });
1556
+ }
1557
+ };
1558
+ }
1559
+ function $e(e) {
1560
+ ke(
1561
+ e.isSigned,
1562
+ `The "${e.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`
1563
+ );
1564
+ }
1565
+ function ur({ cookie: e } = {}) {
1566
+ let t = Te(e) ? e : He(e?.name || "__session", e);
1567
+ return $e(t), {
1568
+ async getSession(r, a) {
1569
+ return Me(
1570
+ r && await t.parse(r, a) || {}
1571
+ );
1572
+ },
1573
+ async commitSession(r, a) {
1574
+ let n = await t.serialize(r.data, a);
1575
+ if (n.length > 4096)
1576
+ throw new Error(
1577
+ "Cookie length will exceed browser maximum. Length: " + n.length
1578
+ );
1579
+ return n;
1580
+ },
1581
+ async destroySession(r, a) {
1582
+ return t.serialize("", {
1583
+ ...a,
1584
+ maxAge: void 0,
1585
+ expires: /* @__PURE__ */ new Date(0)
1586
+ });
1587
+ }
1588
+ };
1589
+ }
1590
+ function dr({ cookie: e } = {}) {
1591
+ let t = /* @__PURE__ */ new Map();
1592
+ return zt({
1593
+ cookie: e,
1594
+ async createData(r, a) {
1595
+ let n = Math.random().toString(36).substring(2, 10);
1596
+ return t.set(n, { data: r, expires: a }), n;
1597
+ },
1598
+ async readData(r) {
1599
+ if (t.has(r)) {
1600
+ let { data: a, expires: n } = t.get(r);
1601
+ if (!n || n > /* @__PURE__ */ new Date())
1602
+ return a;
1603
+ n && t.delete(r);
1604
+ }
1605
+ return null;
1606
+ },
1607
+ async updateData(r, a, n) {
1608
+ t.set(r, { data: a, expires: n });
1609
+ },
1610
+ async deleteData(r) {
1611
+ t.delete(r);
1612
+ }
1613
+ });
1614
+ }
1615
+ function cr(e, ...t) {
1616
+ let r = t[0], a = qt(e).replace(
1617
+ /\/:([\w-]+)(\?)?/g,
1618
+ // same regex as in .\router\utils.ts: compilePath().
1619
+ (n, o, f) => {
1620
+ const l = f === void 0, s = r?.[o];
1621
+ if (l && s === void 0)
1622
+ throw new Error(
1623
+ `Path '${e}' requires param '${o}' but it was not provided`
1624
+ );
1625
+ return s === void 0 ? "" : "/" + s;
1626
+ }
1627
+ );
1628
+ if (e.endsWith("*")) {
1629
+ const n = r?.["*"];
1630
+ n !== void 0 && (a += "/" + n);
1631
+ }
1632
+ return a || "/";
1633
+ }
1634
+ function qt(e) {
1635
+ let t = e.length - 1, r = e[t];
1636
+ if (r !== "*" && r !== "/") return e;
1637
+ for (t--; t >= 0 && e[t] === "/"; t--)
1638
+ ;
1639
+ return e.slice(0, t + 1);
1640
+ }
1641
+ var Z = new TextEncoder(), Re = "</body></html>";
1642
+ function Se(e) {
1643
+ let t = new TextDecoder(), r, a = new Promise(
1644
+ (s) => r = s
1645
+ ), n = !1, o = [], f = null;
1646
+ function l(s) {
1647
+ for (let i of o) {
1648
+ let u = t.decode(i, { stream: !0 });
1649
+ u.endsWith(Re) && (u = u.slice(0, -Re.length)), s.enqueue(Z.encode(u));
1650
+ }
1651
+ o.length = 0, f = null;
1652
+ }
1653
+ return new TransformStream({
1654
+ transform(s, i) {
1655
+ o.push(s), !f && (f = setTimeout(async () => {
1656
+ l(i), n || (n = !0, Vt(e, i).catch((u) => i.error(u)).then(r));
1657
+ }, 0));
1658
+ },
1659
+ async flush(s) {
1660
+ await a, f && (clearTimeout(f), l(s)), s.enqueue(Z.encode("</body></html>"));
1661
+ }
1662
+ });
1663
+ }
1664
+ async function Vt(e, t) {
1665
+ let r = new TextDecoder("utf-8", { fatal: !0 });
1666
+ const a = e.getReader();
1667
+ try {
1668
+ let o;
1669
+ for (; (o = await a.read()) && !o.done; ) {
1670
+ const f = o.value;
1671
+ try {
1672
+ J(
1673
+ JSON.stringify(r.decode(f, { stream: !0 })),
1674
+ t
1675
+ );
1676
+ } catch {
1677
+ let s = JSON.stringify(btoa(String.fromCodePoint(...f)));
1678
+ J(
1679
+ `Uint8Array.from(atob(${s}), m => m.codePointAt(0))`,
1680
+ t
1681
+ );
1682
+ }
1683
+ }
1684
+ } finally {
1685
+ a.releaseLock();
1686
+ }
1687
+ let n = r.decode();
1688
+ n.length && J(JSON.stringify(n), t);
1689
+ }
1690
+ function J(e, t) {
1691
+ t.enqueue(
1692
+ Z.encode(
1693
+ `<script>${Wt(
1694
+ `(self.__FLIGHT_DATA||=[]).push(${e})`
1695
+ )}<\/script>`
1696
+ )
1697
+ );
1698
+ }
1699
+ function Wt(e) {
1700
+ return e.replace(/<!--/g, "<\\!--").replace(/<\/(script)/gi, "</\\$1");
1701
+ }
1702
+ var Xt = class extends A.Component {
1703
+ constructor(e) {
1704
+ super(e), this.state = { error: null, location: e.location };
1705
+ }
1706
+ static getDerivedStateFromError(e) {
1707
+ return { error: e };
1708
+ }
1709
+ static getDerivedStateFromProps(e, t) {
1710
+ return t.location !== e.location ? { error: null, location: e.location } : { error: t.error, location: t.location };
1711
+ }
1712
+ render() {
1713
+ return this.state.error ? /* @__PURE__ */ A.createElement(
1714
+ je,
1715
+ {
1716
+ error: this.state.error,
1717
+ renderAppShell: !0
1718
+ }
1719
+ ) : this.props.children;
1720
+ }
1721
+ };
1722
+ function ve({
1723
+ renderAppShell: e,
1724
+ title: t,
1725
+ children: r
1726
+ }) {
1727
+ return e ? /* @__PURE__ */ A.createElement("html", { lang: "en" }, /* @__PURE__ */ A.createElement("head", null, /* @__PURE__ */ A.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ A.createElement(
1728
+ "meta",
1729
+ {
1730
+ name: "viewport",
1731
+ content: "width=device-width,initial-scale=1,viewport-fit=cover"
1732
+ }
1733
+ ), /* @__PURE__ */ A.createElement("title", null, t)), /* @__PURE__ */ A.createElement("body", null, /* @__PURE__ */ A.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, r))) : r;
1734
+ }
1735
+ function je({
1736
+ error: e,
1737
+ renderAppShell: t
1738
+ }) {
1739
+ console.error(e);
1740
+ let r = /* @__PURE__ */ A.createElement(
1741
+ "script",
1742
+ {
1743
+ dangerouslySetInnerHTML: {
1744
+ __html: `
1745
+ console.log(
1746
+ "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
1747
+ );
1748
+ `
1749
+ }
1750
+ }
1751
+ );
1752
+ if (P(e))
1753
+ return /* @__PURE__ */ A.createElement(
1754
+ ve,
1755
+ {
1756
+ renderAppShell: t,
1757
+ title: "Unhandled Thrown Response!"
1758
+ },
1759
+ /* @__PURE__ */ A.createElement("h1", { style: { fontSize: "24px" } }, e.status, " ", e.statusText),
1760
+ r
1761
+ );
1762
+ let a;
1763
+ if (e instanceof Error)
1764
+ a = e;
1765
+ else {
1766
+ let n = e == null ? "Unknown Error" : typeof e == "object" && "toString" in e ? e.toString() : JSON.stringify(e);
1767
+ a = new Error(n);
1768
+ }
1769
+ return /* @__PURE__ */ A.createElement(ve, { renderAppShell: t, title: "Application Error!" }, /* @__PURE__ */ A.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ A.createElement(
1770
+ "pre",
1771
+ {
1772
+ style: {
1773
+ padding: "2rem",
1774
+ background: "hsla(10, 50%, 50%, 0.1)",
1775
+ color: "red",
1776
+ overflow: "auto"
1777
+ }
1778
+ },
1779
+ a.stack
1780
+ ), r);
1781
+ }
1782
+ function fr({
1783
+ hasRootLayout: e
1784
+ }) {
1785
+ let t = Xe();
1786
+ if (e === void 0)
1787
+ throw new Error("Missing 'hasRootLayout' prop");
1788
+ return /* @__PURE__ */ A.createElement(
1789
+ je,
1790
+ {
1791
+ renderAppShell: !e,
1792
+ error: t
1793
+ }
1794
+ );
1795
+ }
1796
+ function Jt(e) {
1797
+ const t = {};
1798
+ for (const r of e.matches)
1799
+ Kt(t, r);
1800
+ return t;
1801
+ }
1802
+ function Kt(e, t) {
1803
+ t = Array.isArray(t) ? t : [t];
1804
+ for (const r of t)
1805
+ e[r.id] = {
1806
+ links: r.links,
1807
+ meta: r.meta,
1808
+ default: Qt
1809
+ };
1810
+ }
1811
+ var Qt = () => null, Gt = "use", Ee = k[Gt];
1812
+ function Yt(e) {
1813
+ if (Ee)
1814
+ return Ee(e);
1815
+ throw new Error("React Router v7 requires React 19+ for RSC features.");
1816
+ }
1817
+ async function hr({
1818
+ request: e,
1819
+ serverResponse: t,
1820
+ createFromReadableStream: r,
1821
+ renderHTML: a,
1822
+ hydrate: n = !0
1823
+ }) {
1824
+ const o = new URL(e.url);
1825
+ if (Zt(o) || er(o) || e.headers.has("rsc-action-id") || t.headers.get("React-Router-Resource") === "true")
1826
+ return t;
1827
+ if (!t.body)
1828
+ throw new Error("Missing body in server response");
1829
+ const s = t.clone();
1830
+ let i = null;
1831
+ n && (i = t.clone());
1832
+ const u = t.body;
1833
+ let h, p = [];
1834
+ const w = () => h ? new ReadableStream({
1835
+ start(m) {
1836
+ h.forEach((d) => m.enqueue(d)), p.push(m);
1837
+ }
1838
+ }) : (h = [], u.pipeThrough(
1839
+ new TransformStream({
1840
+ transform(m, d) {
1841
+ h.push(m), d.enqueue(m), p.forEach((R) => R.enqueue(m));
1842
+ },
1843
+ flush() {
1844
+ p.forEach((m) => m.close()), p = [];
1845
+ }
1846
+ })
1847
+ ));
1848
+ let y = null;
1849
+ const g = () => {
1850
+ const m = Promise.resolve(
1851
+ r(w())
1852
+ );
1853
+ return Object.defineProperties(m, {
1854
+ _deepestRenderedBoundaryId: {
1855
+ get() {
1856
+ return y;
1857
+ },
1858
+ set(d) {
1859
+ y = d;
1860
+ }
1861
+ },
1862
+ formState: {
1863
+ get() {
1864
+ return m.then(
1865
+ (d) => d.type === "render" ? d.formState : void 0
1866
+ );
1867
+ }
1868
+ }
1869
+ });
1870
+ };
1871
+ let c, v;
1872
+ try {
1873
+ if (!s.body)
1874
+ throw new Error("Failed to clone server response");
1875
+ const m = await r(
1876
+ s.body
1877
+ );
1878
+ if (t.status === _e && m.type === "redirect") {
1879
+ const x = new Headers(t.headers);
1880
+ return x.delete("Content-Encoding"), x.delete("Content-Length"), x.delete("Content-Type"), x.delete("X-Remix-Response"), x.set("Location", m.location), new Response(i?.body || "", {
1881
+ headers: x,
1882
+ status: m.status,
1883
+ statusText: t.statusText
1884
+ });
1885
+ }
1886
+ let d = new Headers(), R = t.status, S = t.statusText, b = await a(g, {
1887
+ onError(x) {
1888
+ if (typeof x == "object" && x && "digest" in x && typeof x.digest == "string") {
1889
+ if (c = oe(x.digest), c)
1890
+ return x.digest;
1891
+ let C = ie(x.digest);
1892
+ if (C)
1893
+ return v = C, R = C.status, S = C.statusText, x.digest;
1894
+ }
1895
+ },
1896
+ onHeaders(x) {
1897
+ for (const [C, D] of x)
1898
+ d.append(C, D);
1899
+ }
1900
+ });
1901
+ const E = new Headers(d);
1902
+ for (const [x, C] of t.headers)
1903
+ E.append(x, C);
1904
+ if (E.set("Content-Type", "text/html; charset=utf-8"), c)
1905
+ return E.set("Location", c.location), new Response(b, {
1906
+ status: c.status,
1907
+ headers: E
1908
+ });
1909
+ const _ = new TransformStream({
1910
+ flush(x) {
1911
+ c && x.enqueue(
1912
+ new TextEncoder().encode(
1913
+ `<meta http-equiv="refresh" content="0;url=${Q(c.location)}"/>`
1914
+ )
1915
+ );
1916
+ }
1917
+ });
1918
+ if (!n)
1919
+ return new Response(b.pipeThrough(_), {
1920
+ status: R,
1921
+ statusText: S,
1922
+ headers: E
1923
+ });
1924
+ if (!i?.body)
1925
+ throw new Error("Failed to clone server response");
1926
+ const F = b.pipeThrough(Se(i.body)).pipeThrough(_);
1927
+ return new Response(F, {
1928
+ status: R,
1929
+ statusText: S,
1930
+ headers: E
1931
+ });
1932
+ } catch (m) {
1933
+ if (m instanceof Response)
1934
+ return m;
1935
+ if (c)
1936
+ return new Response(`Redirect: ${c.location}`, {
1937
+ status: c.status,
1938
+ headers: {
1939
+ Location: c.location
1940
+ }
1941
+ });
1942
+ try {
1943
+ m = v ?? m;
1944
+ let [d, R] = P(m) ? [m.status, m.statusText] : [500, ""], S, b = new Headers();
1945
+ const E = await a(
1946
+ () => {
1947
+ const D = Promise.resolve(
1948
+ r(w())
1949
+ ).then(
1950
+ (H) => Object.assign(H, {
1951
+ status: d,
1952
+ errors: y ? {
1953
+ [y]: m
1954
+ } : {}
1955
+ })
1956
+ );
1957
+ return Object.defineProperties(D, {
1958
+ _deepestRenderedBoundaryId: {
1959
+ get() {
1960
+ return y;
1961
+ },
1962
+ set(H) {
1963
+ y = H;
1964
+ }
1965
+ },
1966
+ formState: {
1967
+ get() {
1968
+ return D.then(
1969
+ (H) => H.type === "render" ? H.formState : void 0
1970
+ );
1971
+ }
1972
+ }
1973
+ });
1974
+ },
1975
+ {
1976
+ onError(C) {
1977
+ if (typeof C == "object" && C && "digest" in C && typeof C.digest == "string") {
1978
+ if (S = oe(C.digest), S)
1979
+ return C.digest;
1980
+ let D = ie(
1981
+ C.digest
1982
+ );
1983
+ if (D)
1984
+ return d = D.status, R = D.statusText, C.digest;
1985
+ }
1986
+ },
1987
+ onHeaders(C) {
1988
+ for (const [D, H] of C)
1989
+ b.append(D, H);
1990
+ }
1991
+ }
1992
+ ), _ = new Headers(b);
1993
+ for (const [C, D] of t.headers)
1994
+ _.append(C, D);
1995
+ if (_.set("Content-Type", "text/html; charset=utf-8"), S)
1996
+ return _.set("Location", S.location), new Response(E, {
1997
+ status: S.status,
1998
+ headers: _
1999
+ });
2000
+ const F = new TransformStream({
2001
+ flush(C) {
2002
+ S && C.enqueue(
2003
+ new TextEncoder().encode(
2004
+ `<meta http-equiv="refresh" content="0;url=${Q(S.location)}"/>`
2005
+ )
2006
+ );
2007
+ }
2008
+ });
2009
+ if (!n)
2010
+ return new Response(E.pipeThrough(F), {
2011
+ status: d,
2012
+ statusText: R,
2013
+ headers: _
2014
+ });
2015
+ if (!i?.body)
2016
+ throw new Error("Failed to clone server response");
2017
+ const x = E.pipeThrough(Se(i.body)).pipeThrough(F);
2018
+ return new Response(x, {
2019
+ status: d,
2020
+ statusText: R,
2021
+ headers: _
2022
+ });
2023
+ } catch {
2024
+ }
2025
+ throw m;
2026
+ }
2027
+ }
2028
+ function pr({ getPayload: e }) {
2029
+ const t = e(), r = Yt(t);
2030
+ if (r.type === "redirect")
2031
+ throw new Response(null, {
2032
+ status: r.status,
2033
+ headers: {
2034
+ Location: r.location
2035
+ }
2036
+ });
2037
+ if (r.type !== "render") return null;
2038
+ let a = { ...r.loaderData };
2039
+ for (const l of r.matches)
2040
+ ee(
2041
+ l.id,
2042
+ l.clientLoader,
2043
+ l.hasLoader,
2044
+ !1
2045
+ ) && (l.hydrateFallbackElement || !l.hasLoader) && delete a[l.id];
2046
+ const n = {
2047
+ get _deepestRenderedBoundaryId() {
2048
+ return t._deepestRenderedBoundaryId ?? null;
2049
+ },
2050
+ set _deepestRenderedBoundaryId(l) {
2051
+ t._deepestRenderedBoundaryId = l;
2052
+ },
2053
+ actionData: r.actionData,
2054
+ actionHeaders: {},
2055
+ basename: r.basename,
2056
+ errors: r.errors,
2057
+ loaderData: a,
2058
+ loaderHeaders: {},
2059
+ location: r.location,
2060
+ statusCode: 200,
2061
+ matches: r.matches.map((l) => ({
2062
+ params: l.params,
2063
+ pathname: l.pathname,
2064
+ pathnameBase: l.pathnameBase,
2065
+ route: {
2066
+ id: l.id,
2067
+ action: l.hasAction || !!l.clientAction,
2068
+ handle: l.handle,
2069
+ hasErrorBoundary: l.hasErrorBoundary,
2070
+ loader: l.hasLoader || !!l.clientLoader,
2071
+ index: l.index,
2072
+ path: l.path,
2073
+ shouldRevalidate: l.shouldRevalidate
2074
+ }
2075
+ }))
2076
+ }, o = Ce(
2077
+ r.matches.reduceRight((l, s) => {
2078
+ const i = {
2079
+ id: s.id,
2080
+ action: s.hasAction || !!s.clientAction,
2081
+ element: s.element,
2082
+ errorElement: s.errorElement,
2083
+ handle: s.handle,
2084
+ hasErrorBoundary: !!s.errorElement,
2085
+ hydrateFallbackElement: s.hydrateFallbackElement,
2086
+ index: s.index,
2087
+ loader: s.hasLoader || !!s.clientLoader,
2088
+ path: s.path,
2089
+ shouldRevalidate: s.shouldRevalidate
2090
+ };
2091
+ return l.length > 0 && (i.children = l), [i];
2092
+ }, []),
2093
+ n
2094
+ ), f = {
2095
+ future: {
2096
+ // These flags have no runtime impact so can always be false. If we add
2097
+ // flags that drive runtime behavior they'll need to be proxied through.
2098
+ v8_middleware: !1,
2099
+ unstable_subResourceIntegrity: !1,
2100
+ unstable_trailingSlashAwareDataRequests: !0
2101
+ // always on for RSC
2102
+ },
2103
+ isSpaMode: !1,
2104
+ ssr: !0,
2105
+ criticalCss: "",
2106
+ manifest: {
2107
+ routes: {},
2108
+ version: "1",
2109
+ url: "",
2110
+ entry: {
2111
+ module: "",
2112
+ imports: []
2113
+ }
2114
+ },
2115
+ routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
2116
+ routeModules: Jt(r)
2117
+ };
2118
+ return /* @__PURE__ */ k.createElement(Ge.Provider, { value: !0 }, /* @__PURE__ */ k.createElement(Xt, { location: r.location }, /* @__PURE__ */ k.createElement(te.Provider, { value: f }, /* @__PURE__ */ k.createElement(
2119
+ be,
2120
+ {
2121
+ context: n,
2122
+ router: o,
2123
+ hydrate: !1,
2124
+ nonce: r.nonce
2125
+ }
2126
+ ))));
2127
+ }
2128
+ function Zt(e) {
2129
+ return e.pathname.endsWith(".rsc");
2130
+ }
2131
+ function er(e) {
2132
+ return e.pathname.endsWith(".manifest");
2133
+ }
2134
+ function mr(e) {
2135
+ if (!e) return null;
2136
+ let t = Object.entries(e), r = {};
2137
+ for (let [a, n] of t)
2138
+ if (n && n.__type === "RouteErrorResponse")
2139
+ r[a] = new O(
2140
+ n.status,
2141
+ n.statusText,
2142
+ n.data,
2143
+ n.internal === !0
2144
+ );
2145
+ else if (n && n.__type === "Error") {
2146
+ if (n.__subType) {
2147
+ let o = window[n.__subType];
2148
+ if (typeof o == "function")
2149
+ try {
2150
+ let f = new o(n.message);
2151
+ f.stack = n.stack, r[a] = f;
2152
+ } catch {
2153
+ }
2154
+ }
2155
+ if (r[a] == null) {
2156
+ let o = new Error(n.message);
2157
+ o.stack = n.stack, r[a] = o;
2158
+ }
2159
+ } else
2160
+ r[a] = n;
2161
+ return r;
2162
+ }
2163
+ function yr({
2164
+ state: e,
2165
+ routes: t,
2166
+ getRouteInfo: r,
2167
+ location: a,
2168
+ basename: n,
2169
+ isSpaMode: o
2170
+ }) {
2171
+ let f = {
2172
+ ...e,
2173
+ loaderData: { ...e.loaderData }
2174
+ }, l = xe(t, a, n);
2175
+ if (l)
2176
+ for (let s of l) {
2177
+ let i = s.route.id, u = r(i);
2178
+ ee(
2179
+ i,
2180
+ u.clientLoader,
2181
+ u.hasLoader,
2182
+ o
2183
+ ) && (u.hasHydrateFallback || !u.hasLoader) ? delete f.loaderData[i] : u.hasLoader || (f.loaderData[i] = null);
2184
+ }
2185
+ return f;
2186
+ }
2187
+ const wr = () => {
2188
+ const e = se((a) => a.navigateTo), t = se((a) => a.navigateInHortiview);
2189
+ return ze(
7
2190
  (a) => {
8
- if (e) {
9
- e(a);
2191
+ if (t) {
2192
+ t(a);
10
2193
  return;
11
2194
  }
12
- s?.(a);
2195
+ e?.(a);
13
2196
  },
14
- [e, s]
2197
+ [t, e]
15
2198
  );
16
2199
  };
17
2200
  export {
18
- R as Await,
19
- F as BrowserRouter,
20
- E as Form,
21
- N as HashRouter,
22
- l as IDLE_BLOCKER,
23
- A as IDLE_FETCHER,
24
- _ as IDLE_NAVIGATION,
25
- v as Link,
26
- d as Links,
27
- m as MemoryRouter,
28
- U as Meta,
29
- g as NavLink,
30
- h as Navigate,
31
- C as NavigationType,
32
- p as Outlet,
33
- P as PrefetchPageLinks,
34
- H as Route,
35
- y as Router,
36
- L as RouterProvider,
37
- k as Routes,
38
- x as Scripts,
39
- D as ScrollRestoration,
40
- w as ServerRouter,
41
- I as StaticRouter,
42
- M as StaticRouterProvider,
43
- O as UNSAFE_DataRouterContext,
44
- b as UNSAFE_DataRouterStateContext,
45
- B as UNSAFE_ErrorResponseImpl,
46
- T as UNSAFE_FetchersContext,
47
- f as UNSAFE_FrameworkContext,
48
- V as UNSAFE_LocationContext,
49
- q as UNSAFE_NavigationContext,
50
- z as UNSAFE_RemixErrorBoundary,
51
- G as UNSAFE_RouteContext,
52
- K as UNSAFE_ServerMode,
53
- W as UNSAFE_SingleFetchRedirectSymbol,
54
- j as UNSAFE_ViewTransitionContext,
55
- J as UNSAFE_createBrowserHistory,
56
- Q as UNSAFE_createClientRoutes,
57
- X as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
58
- Y as UNSAFE_createRouter,
59
- Z as UNSAFE_decodeViaTurboStream,
60
- $ as UNSAFE_deserializeErrors,
61
- aa as UNSAFE_getPatchRoutesOnNavigationFunction,
62
- ea as UNSAFE_getSingleFetchDataStrategy,
63
- sa as UNSAFE_invariant,
64
- ta as UNSAFE_mapRouteProperties,
65
- ra as UNSAFE_shouldHydrateRouteLoader,
66
- oa as UNSAFE_useFogOFWarDiscovery,
67
- ia as UNSAFE_useScrollRestoration,
68
- ua as createBrowserRouter,
69
- na as createCookie,
70
- ca as createCookieSessionStorage,
71
- Sa as createHashRouter,
72
- Ra as createMemoryRouter,
73
- Fa as createMemorySessionStorage,
74
- Ea as createPath,
75
- Na as createRequestHandler,
76
- la as createRoutesFromChildren,
77
- Aa as createRoutesFromElements,
78
- _a as createRoutesStub,
79
- va as createSearchParams,
80
- da as createSession,
81
- ma as createSessionStorage,
82
- Ua as createStaticHandler,
83
- ga as createStaticRouter,
84
- ha as data,
85
- Ca as generatePath,
86
- pa as isCookie,
87
- Pa as isRouteErrorResponse,
88
- Ha as isSession,
89
- ya as matchPath,
90
- La as matchRoutes,
91
- ka as parsePath,
92
- xa as redirect,
93
- Da as redirectDocument,
94
- wa as renderMatches,
95
- Ia as replace,
96
- Ma as resolvePath,
97
- Oa as unstable_HistoryRouter,
98
- ba as unstable_setDevServerHooks,
99
- Ba as unstable_usePrompt,
100
- Ta as useActionData,
101
- fa as useAsyncError,
102
- Va as useAsyncValue,
103
- qa as useBeforeUnload,
104
- za as useBlocker,
105
- Ga as useFetcher,
106
- Ka as useFetchers,
107
- Wa as useFormAction,
108
- ja as useHref,
109
- Ja as useInRouterContext,
110
- Qa as useLinkClickHandler,
111
- Xa as useLoaderData,
112
- Ya as useLocation,
113
- Za as useMatch,
114
- $a as useMatches,
115
- n as useNavigate,
116
- ae as useNavigation,
117
- ee as useNavigationType,
118
- se as useOutlet,
119
- te as useOutletContext,
120
- re as useParams,
121
- oe as useResolvedPath,
122
- ie as useRevalidator,
123
- ue as useRouteError,
124
- ne as useRouteLoaderData,
125
- ce as useRoutes,
126
- Se as useSearchParams,
127
- Re as useSubmit,
128
- Fe as useViewTransitionState
2201
+ Sr as Await,
2202
+ vr as BrowserRouter,
2203
+ Er as Form,
2204
+ Cr as HashRouter,
2205
+ br as IDLE_BLOCKER,
2206
+ xr as IDLE_FETCHER,
2207
+ _r as IDLE_NAVIGATION,
2208
+ kr as Link,
2209
+ Ar as Links,
2210
+ Dr as MemoryRouter,
2211
+ Hr as Meta,
2212
+ Tr as NavLink,
2213
+ Fr as Navigate,
2214
+ Pr as NavigationType,
2215
+ at as Outlet,
2216
+ Nr as PrefetchPageLinks,
2217
+ Ur as Route,
2218
+ Lr as Router,
2219
+ K as RouterContextProvider,
2220
+ Qe as RouterProvider,
2221
+ Or as Routes,
2222
+ Ir as Scripts,
2223
+ Br as ScrollRestoration,
2224
+ nr as ServerRouter,
2225
+ Mr as StaticRouter,
2226
+ be as StaticRouterProvider,
2227
+ $r as UNSAFE_AwaitContextProvider,
2228
+ jr as UNSAFE_DataRouterContext,
2229
+ zr as UNSAFE_DataRouterStateContext,
2230
+ O as UNSAFE_ErrorResponseImpl,
2231
+ qr as UNSAFE_FetchersContext,
2232
+ te as UNSAFE_FrameworkContext,
2233
+ Vr as UNSAFE_LocationContext,
2234
+ Wr as UNSAFE_NavigationContext,
2235
+ fr as UNSAFE_RSCDefaultRootErrorBoundary,
2236
+ Ve as UNSAFE_RemixErrorBoundary,
2237
+ Xr as UNSAFE_RouteContext,
2238
+ _t as UNSAFE_ServerMode,
2239
+ I as UNSAFE_SingleFetchRedirectSymbol,
2240
+ Jr as UNSAFE_ViewTransitionContext,
2241
+ Kr as UNSAFE_WithComponentProps,
2242
+ Qr as UNSAFE_WithErrorBoundaryProps,
2243
+ Gr as UNSAFE_WithHydrateFallbackProps,
2244
+ Yr as UNSAFE_createBrowserHistory,
2245
+ Zr as UNSAFE_createClientRoutes,
2246
+ ea as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
2247
+ ta as UNSAFE_createHashHistory,
2248
+ ra as UNSAFE_createMemoryHistory,
2249
+ aa as UNSAFE_createRouter,
2250
+ nt as UNSAFE_decodeViaTurboStream,
2251
+ mr as UNSAFE_deserializeErrors,
2252
+ yr as UNSAFE_getHydrationData,
2253
+ na as UNSAFE_getPatchRoutesOnNavigationFunction,
2254
+ sa as UNSAFE_getTurboStreamSingleFetchDataStrategy,
2255
+ oa as UNSAFE_hydrationRouteProperties,
2256
+ ia as UNSAFE_invariant,
2257
+ la as UNSAFE_mapRouteProperties,
2258
+ ee as UNSAFE_shouldHydrateRouteLoader,
2259
+ ua as UNSAFE_useFogOFWarDiscovery,
2260
+ da as UNSAFE_useScrollRestoration,
2261
+ rt as UNSAFE_withComponentProps,
2262
+ et as UNSAFE_withErrorBoundaryProps,
2263
+ tt as UNSAFE_withHydrateFallbackProps,
2264
+ ca as createBrowserRouter,
2265
+ fa as createContext,
2266
+ He as createCookie,
2267
+ ur as createCookieSessionStorage,
2268
+ ha as createHashRouter,
2269
+ Ke as createMemoryRouter,
2270
+ dr as createMemorySessionStorage,
2271
+ pa as createPath,
2272
+ ir as createRequestHandler,
2273
+ ma as createRoutesFromChildren,
2274
+ ya as createRoutesFromElements,
2275
+ sr as createRoutesStub,
2276
+ wa as createSearchParams,
2277
+ Me as createSession,
2278
+ zt as createSessionStorage,
2279
+ ga as createStaticHandler,
2280
+ Ce as createStaticRouter,
2281
+ Ra as data,
2282
+ Sa as generatePath,
2283
+ cr as href,
2284
+ Te as isCookie,
2285
+ P as isRouteErrorResponse,
2286
+ lr as isSession,
2287
+ va as matchPath,
2288
+ xe as matchRoutes,
2289
+ Ea as parsePath,
2290
+ it as redirect,
2291
+ st as redirectDocument,
2292
+ Ca as renderMatches,
2293
+ ot as replace,
2294
+ ba as resolvePath,
2295
+ xa as unstable_HistoryRouter,
2296
+ pr as unstable_RSCStaticRouter,
2297
+ hr as unstable_routeRSCServerRequest,
2298
+ or as unstable_setDevServerHooks,
2299
+ _a as unstable_usePrompt,
2300
+ ka as unstable_useRoute,
2301
+ Aa as useActionData,
2302
+ Da as useAsyncError,
2303
+ Ha as useAsyncValue,
2304
+ Ta as useBeforeUnload,
2305
+ Fa as useBlocker,
2306
+ Pa as useFetcher,
2307
+ Na as useFetchers,
2308
+ Ua as useFormAction,
2309
+ La as useHref,
2310
+ Oa as useInRouterContext,
2311
+ Ia as useLinkClickHandler,
2312
+ Ba as useLoaderData,
2313
+ Ma as useLocation,
2314
+ $a as useMatch,
2315
+ ja as useMatches,
2316
+ wr as useNavigate,
2317
+ za as useNavigation,
2318
+ qa as useNavigationType,
2319
+ Va as useOutlet,
2320
+ Wa as useOutletContext,
2321
+ Xa as useParams,
2322
+ Ja as useResolvedPath,
2323
+ Ka as useRevalidator,
2324
+ Xe as useRouteError,
2325
+ Qa as useRouteLoaderData,
2326
+ Ga as useRoutes,
2327
+ Ya as useSearchParams,
2328
+ Za as useSubmit,
2329
+ en as useViewTransitionState
129
2330
  };