react-router 0.0.0-experimental-e0b6ce9 → 0.0.0-experimental-de3b900
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/CHANGELOG.md +105 -0
- package/dist/development/browser-B4aBBnx8.d.ts +310 -0
- package/dist/development/browser-CN2w9Cbu.d.mts +310 -0
- package/dist/development/{chunk-4FI4BC6Y.mjs → chunk-5VDQAMOM.mjs} +181 -873
- package/dist/development/chunk-JEIV2ESS.js +1308 -0
- package/dist/development/{chunk-INO4IHBF.js → chunk-K3XLKYJI.js} +892 -409
- package/dist/development/{chunk-F6CT5MEB.mjs → chunk-OVO62ONG.mjs} +31 -314
- package/dist/development/chunk-UPBUMW2M.js +188 -0
- package/dist/development/dom-export.d.mts +51 -61
- package/dist/development/dom-export.d.ts +51 -60
- package/dist/development/dom-export.js +705 -23
- package/dist/development/dom-export.mjs +689 -14
- package/dist/{production/index-react-server-client-CYIi6gi0.d.mts → development/index-react-server-client-BOJoTiaG.d.ts} +76 -140
- package/dist/development/{index-react-server-client-CYIi6gi0.d.mts → index-react-server-client-CuQLmpku.d.mts} +76 -140
- package/dist/development/index-react-server-client.d.mts +2 -3
- package/dist/development/index-react-server-client.d.ts +2 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +1 -90
- package/dist/development/index-react-server.d.ts +1 -90
- package/dist/development/index-react-server.js +9 -188
- package/dist/development/index-react-server.mjs +9 -188
- package/dist/development/index.d.mts +21 -320
- package/dist/development/index.d.ts +21 -364
- package/dist/development/index.js +131 -977
- package/dist/development/index.mjs +5 -9
- package/dist/development/lib/types/internal.d.mts +2 -3
- package/dist/development/lib/types/internal.d.ts +2 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/register-DiOIlEq5.d.mts → development/register-BblEgJPm.d.mts} +7 -1
- package/dist/development/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
- package/dist/development/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
- package/dist/development/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
- package/dist/production/browser-B4aBBnx8.d.ts +310 -0
- package/dist/production/browser-CN2w9Cbu.d.mts +310 -0
- package/dist/production/{chunk-K7VXYOZD.js → chunk-63YB5VLY.js} +892 -409
- package/dist/production/chunk-IE722GR6.js +188 -0
- package/dist/production/{chunk-LKSLGWXX.mjs → chunk-U25H5FTL.mjs} +31 -314
- package/dist/production/chunk-VX4OHTGR.js +1308 -0
- package/dist/production/{chunk-52MYED7O.mjs → chunk-XOCFS75J.mjs} +181 -873
- package/dist/production/dom-export.d.mts +51 -61
- package/dist/production/dom-export.d.ts +51 -60
- package/dist/production/dom-export.js +705 -23
- package/dist/production/dom-export.mjs +689 -14
- package/dist/production/{index-react-server-client-ChBGplLn.d.ts → index-react-server-client-BOJoTiaG.d.ts} +76 -140
- package/dist/{development/index-react-server-client-ChBGplLn.d.ts → production/index-react-server-client-CuQLmpku.d.mts} +76 -140
- package/dist/production/index-react-server-client.d.mts +2 -3
- package/dist/production/index-react-server-client.d.ts +2 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +1 -90
- package/dist/production/index-react-server.d.ts +1 -90
- package/dist/production/index-react-server.js +9 -188
- package/dist/production/index-react-server.mjs +9 -188
- package/dist/production/index.d.mts +21 -320
- package/dist/production/index.d.ts +21 -364
- package/dist/production/index.js +131 -977
- package/dist/production/index.mjs +5 -9
- package/dist/production/lib/types/internal.d.mts +2 -3
- package/dist/production/lib/types/internal.d.ts +2 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-DiOIlEq5.d.mts → production/register-BblEgJPm.d.mts} +7 -1
- package/dist/production/{register-DiOIlEq5.d.ts → register-D18raRVf.d.ts} +7 -1
- package/dist/production/{router-DWv6Clt-.d.mts → route-data-nQS6GSUI.d.mts} +1265 -932
- package/dist/production/{routeModules-DqotkItD.d.ts → routeModules-9wlxglVk.d.ts} +1047 -74
- package/package.json +1 -1
- package/dist/development/browser-z32v5KVN.d.mts +0 -46
- package/dist/development/chunk-ITZFCV4J.js +0 -2092
- package/dist/development/instrumentation-BGrNA7uj.d.ts +0 -1122
- package/dist/development/routeModules-Cy4Xsfoi.d.mts +0 -483
- package/dist/production/browser-z32v5KVN.d.mts +0 -46
- package/dist/production/chunk-DASXXYNZ.js +0 -2092
- package/dist/production/instrumentation-BGrNA7uj.d.ts +0 -1122
- package/dist/production/routeModules-Cy4Xsfoi.d.mts +0 -483
package/dist/production/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-de3b900
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkIE722GR6js = require('./chunk-IE722GR6.js');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
43
|
+
var _chunkVX4OHTGRjs = require('./chunk-VX4OHTGR.js');
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
|
|
@@ -55,7 +57,6 @@
|
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
|
|
58
|
-
var _chunkDASXXYNZjs = require('./chunk-DASXXYNZ.js');
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
|
|
@@ -143,14 +144,10 @@ var _chunkDASXXYNZjs = require('./chunk-DASXXYNZ.js');
|
|
|
143
144
|
|
|
144
145
|
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var _chunkK7VXYOZDjs = require('./chunk-K7VXYOZD.js');
|
|
147
|
+
var _chunk63YB5VLYjs = require('./chunk-63YB5VLY.js');
|
|
151
148
|
|
|
152
149
|
// lib/dom/ssr/server.tsx
|
|
153
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var
|
|
150
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
154
151
|
function ServerRouter({
|
|
155
152
|
context,
|
|
156
153
|
url,
|
|
@@ -160,7 +157,7 @@ function ServerRouter({
|
|
|
160
157
|
url = new URL(url);
|
|
161
158
|
}
|
|
162
159
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
163
|
-
let routes =
|
|
160
|
+
let routes = _chunk63YB5VLYjs.createServerRoutes.call(void 0,
|
|
164
161
|
manifest.routes,
|
|
165
162
|
routeModules,
|
|
166
163
|
context.future,
|
|
@@ -173,7 +170,7 @@ function ServerRouter({
|
|
|
173
170
|
let routeId = match.route.id;
|
|
174
171
|
let route = routeModules[routeId];
|
|
175
172
|
let manifestRoute = context.manifest.routes[routeId];
|
|
176
|
-
if (route && manifestRoute &&
|
|
173
|
+
if (route && manifestRoute && _chunk63YB5VLYjs.shouldHydrateRouteLoader.call(void 0,
|
|
177
174
|
routeId,
|
|
178
175
|
route.clientLoader,
|
|
179
176
|
manifestRoute.hasLoader,
|
|
@@ -182,9 +179,9 @@ function ServerRouter({
|
|
|
182
179
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
183
180
|
}
|
|
184
181
|
}
|
|
185
|
-
let router =
|
|
182
|
+
let router = _chunkVX4OHTGRjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
186
183
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
187
|
-
|
|
184
|
+
_chunk63YB5VLYjs.FrameworkContext.Provider,
|
|
188
185
|
{
|
|
189
186
|
value: {
|
|
190
187
|
manifest,
|
|
@@ -199,8 +196,8 @@ function ServerRouter({
|
|
|
199
196
|
renderMeta: context.renderMeta
|
|
200
197
|
}
|
|
201
198
|
},
|
|
202
|
-
/* @__PURE__ */ React.createElement(
|
|
203
|
-
|
|
199
|
+
/* @__PURE__ */ React.createElement(_chunk63YB5VLYjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
200
|
+
_chunkVX4OHTGRjs.StaticRouterProvider,
|
|
204
201
|
{
|
|
205
202
|
router,
|
|
206
203
|
context: context.staticHandlerContext,
|
|
@@ -208,7 +205,7 @@ function ServerRouter({
|
|
|
208
205
|
}
|
|
209
206
|
))
|
|
210
207
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
211
|
-
|
|
208
|
+
_chunk63YB5VLYjs.StreamTransfer,
|
|
212
209
|
{
|
|
213
210
|
context,
|
|
214
211
|
identifier: 0,
|
|
@@ -250,18 +247,18 @@ function createRoutesStub(routes, _context) {
|
|
|
250
247
|
let patched = processRoutes(
|
|
251
248
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
252
249
|
// types compared to `AgnosticRouteObject`
|
|
253
|
-
|
|
254
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
250
|
+
_chunk63YB5VLYjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
251
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunk63YB5VLYjs.RouterContextProvider)() : {},
|
|
255
252
|
frameworkContextRef.current.manifest,
|
|
256
253
|
frameworkContextRef.current.routeModules
|
|
257
254
|
);
|
|
258
|
-
routerRef.current =
|
|
255
|
+
routerRef.current = _chunk63YB5VLYjs.createMemoryRouter.call(void 0, patched, {
|
|
259
256
|
initialEntries,
|
|
260
257
|
initialIndex,
|
|
261
258
|
hydrationData
|
|
262
259
|
});
|
|
263
260
|
}
|
|
264
|
-
return /* @__PURE__ */ React2.createElement(
|
|
261
|
+
return /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.RouterProvider, { router: routerRef.current }));
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
264
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -275,9 +272,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
275
272
|
id: route.id,
|
|
276
273
|
path: route.path,
|
|
277
274
|
index: route.index,
|
|
278
|
-
Component: route.Component ?
|
|
279
|
-
HydrateFallback: route.HydrateFallback ?
|
|
280
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
275
|
+
Component: route.Component ? _chunk63YB5VLYjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
276
|
+
HydrateFallback: route.HydrateFallback ? _chunk63YB5VLYjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
277
|
+
ErrorBoundary: route.ErrorBoundary ? _chunk63YB5VLYjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
281
278
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
282
279
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
283
280
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -312,7 +309,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
312
309
|
};
|
|
313
310
|
manifest.routes[newRoute.id] = entryRoute;
|
|
314
311
|
routeModules[route.id] = {
|
|
315
|
-
default: newRoute.Component ||
|
|
312
|
+
default: newRoute.Component || _chunk63YB5VLYjs.Outlet,
|
|
316
313
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
317
314
|
handle: route.handle,
|
|
318
315
|
links: route.links,
|
|
@@ -507,7 +504,7 @@ function myUnescape(value) {
|
|
|
507
504
|
return result;
|
|
508
505
|
}
|
|
509
506
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
510
|
-
|
|
507
|
+
_chunk63YB5VLYjs.warnOnce.call(void 0,
|
|
511
508
|
!expires,
|
|
512
509
|
`The "${name}" 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.`
|
|
513
510
|
);
|
|
@@ -561,7 +558,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
561
558
|
let entries = Object.entries(errors);
|
|
562
559
|
let serialized = {};
|
|
563
560
|
for (let [key, val] of entries) {
|
|
564
|
-
if (
|
|
561
|
+
if (_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, val)) {
|
|
565
562
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
566
563
|
} else if (val instanceof Error) {
|
|
567
564
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -586,7 +583,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
586
583
|
|
|
587
584
|
// lib/server-runtime/routeMatching.ts
|
|
588
585
|
function matchServerRoutes(routes, pathname, basename) {
|
|
589
|
-
let matches =
|
|
586
|
+
let matches = _chunk63YB5VLYjs.matchRoutes.call(void 0,
|
|
590
587
|
routes,
|
|
591
588
|
pathname,
|
|
592
589
|
basename
|
|
@@ -602,17 +599,16 @@ function matchServerRoutes(routes, pathname, basename) {
|
|
|
602
599
|
// lib/server-runtime/data.ts
|
|
603
600
|
async function callRouteHandler(handler, args) {
|
|
604
601
|
let result = await handler({
|
|
605
|
-
request: stripRoutesParam(
|
|
602
|
+
request: stripRoutesParam(stripIndexParam(args.request)),
|
|
606
603
|
params: args.params,
|
|
607
|
-
context: args.context
|
|
608
|
-
unstable_pattern: args.unstable_pattern
|
|
604
|
+
context: args.context
|
|
609
605
|
});
|
|
610
|
-
if (
|
|
606
|
+
if (_chunk63YB5VLYjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunk63YB5VLYjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
611
607
|
throw new Response(null, result.init);
|
|
612
608
|
}
|
|
613
609
|
return result;
|
|
614
610
|
}
|
|
615
|
-
function
|
|
611
|
+
function stripIndexParam(request) {
|
|
616
612
|
let url = new URL(request.url);
|
|
617
613
|
let indexValues = url.searchParams.getAll("index");
|
|
618
614
|
url.searchParams.delete("index");
|
|
@@ -726,17 +722,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
726
722
|
controller.close();
|
|
727
723
|
}
|
|
728
724
|
});
|
|
729
|
-
let decoded = await
|
|
725
|
+
let decoded = await _chunk63YB5VLYjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
730
726
|
let data2 = decoded.value;
|
|
731
|
-
if (data2 &&
|
|
732
|
-
let result = data2[
|
|
727
|
+
if (data2 && _chunk63YB5VLYjs.SingleFetchRedirectSymbol in data2) {
|
|
728
|
+
let result = data2[_chunk63YB5VLYjs.SingleFetchRedirectSymbol];
|
|
733
729
|
let init = { status: result.status };
|
|
734
730
|
if (result.reload) {
|
|
735
|
-
throw
|
|
731
|
+
throw _chunk63YB5VLYjs.redirectDocument.call(void 0, result.redirect, init);
|
|
736
732
|
} else if (result.replace) {
|
|
737
|
-
throw
|
|
733
|
+
throw _chunk63YB5VLYjs.replace.call(void 0, result.redirect, init);
|
|
738
734
|
} else {
|
|
739
|
-
throw
|
|
735
|
+
throw _chunk63YB5VLYjs.redirect.call(void 0, result.redirect, init);
|
|
740
736
|
}
|
|
741
737
|
} else {
|
|
742
738
|
invariant2(
|
|
@@ -775,7 +771,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
775
771
|
|
|
776
772
|
// lib/server-runtime/serverHandoff.ts
|
|
777
773
|
function createServerHandoffString(serverHandoff) {
|
|
778
|
-
return
|
|
774
|
+
return _chunk63YB5VLYjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
779
775
|
}
|
|
780
776
|
|
|
781
777
|
// lib/server-runtime/headers.ts
|
|
@@ -852,7 +848,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
852
848
|
|
|
853
849
|
// lib/server-runtime/single-fetch.ts
|
|
854
850
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
855
|
-
...
|
|
851
|
+
..._chunk63YB5VLYjs.NO_BODY_STATUS_CODES,
|
|
856
852
|
304
|
|
857
853
|
]);
|
|
858
854
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -882,7 +878,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
882
878
|
return handleQueryError(error);
|
|
883
879
|
}
|
|
884
880
|
function handleQueryResult(result) {
|
|
885
|
-
return
|
|
881
|
+
return _chunk63YB5VLYjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
886
882
|
}
|
|
887
883
|
function handleQueryError(error) {
|
|
888
884
|
handleError(error);
|
|
@@ -894,12 +890,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
894
890
|
}
|
|
895
891
|
function staticContextToResponse(context) {
|
|
896
892
|
let headers = getDocumentHeaders(context, build);
|
|
897
|
-
if (
|
|
893
|
+
if (_chunk63YB5VLYjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
898
894
|
return new Response(null, { status: context.statusCode, headers });
|
|
899
895
|
}
|
|
900
896
|
if (context.errors) {
|
|
901
897
|
Object.values(context.errors).forEach((err) => {
|
|
902
|
-
if (!
|
|
898
|
+
if (!_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
903
899
|
handleError(err);
|
|
904
900
|
}
|
|
905
901
|
});
|
|
@@ -946,7 +942,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
946
942
|
return handleQueryError(error);
|
|
947
943
|
}
|
|
948
944
|
function handleQueryResult(result) {
|
|
949
|
-
return
|
|
945
|
+
return _chunk63YB5VLYjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
950
946
|
}
|
|
951
947
|
function handleQueryError(error) {
|
|
952
948
|
handleError(error);
|
|
@@ -958,12 +954,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
958
954
|
}
|
|
959
955
|
function staticContextToResponse(context) {
|
|
960
956
|
let headers = getDocumentHeaders(context, build);
|
|
961
|
-
if (
|
|
957
|
+
if (_chunk63YB5VLYjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
962
958
|
return new Response(null, { status: context.statusCode, headers });
|
|
963
959
|
}
|
|
964
960
|
if (context.errors) {
|
|
965
961
|
Object.values(context.errors).forEach((err) => {
|
|
966
|
-
if (!
|
|
962
|
+
if (!_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
967
963
|
handleError(err);
|
|
968
964
|
}
|
|
969
965
|
});
|
|
@@ -1027,15 +1023,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1027
1023
|
headers.delete("Location");
|
|
1028
1024
|
headers.set("Content-Type", "text/x-script");
|
|
1029
1025
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1030
|
-
result: request.method === "GET" ? { [
|
|
1026
|
+
result: request.method === "GET" ? { [_chunk63YB5VLYjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1031
1027
|
headers,
|
|
1032
|
-
status:
|
|
1028
|
+
status: _chunk63YB5VLYjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1033
1029
|
});
|
|
1034
1030
|
}
|
|
1035
1031
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1036
1032
|
let redirect2 = headers.get("Location");
|
|
1037
1033
|
if (basename) {
|
|
1038
|
-
redirect2 =
|
|
1034
|
+
redirect2 = _chunk63YB5VLYjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1039
1035
|
}
|
|
1040
1036
|
return {
|
|
1041
1037
|
redirect: redirect2,
|
|
@@ -1061,7 +1057,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1061
1057
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1062
1058
|
);
|
|
1063
1059
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1064
|
-
return
|
|
1060
|
+
return _chunk63YB5VLYjs.encode.call(void 0, data2, {
|
|
1065
1061
|
signal: controller.signal,
|
|
1066
1062
|
plugins: [
|
|
1067
1063
|
(value) => {
|
|
@@ -1069,12 +1065,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1069
1065
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1070
1066
|
return ["SanitizedError", name, message, stack];
|
|
1071
1067
|
}
|
|
1072
|
-
if (value instanceof
|
|
1068
|
+
if (value instanceof _chunk63YB5VLYjs.ErrorResponseImpl) {
|
|
1073
1069
|
let { data: data3, status, statusText } = value;
|
|
1074
1070
|
return ["ErrorResponse", data3, status, statusText];
|
|
1075
1071
|
}
|
|
1076
|
-
if (value && typeof value === "object" &&
|
|
1077
|
-
return ["SingleFetchRedirect", value[
|
|
1072
|
+
if (value && typeof value === "object" && _chunk63YB5VLYjs.SingleFetchRedirectSymbol in value) {
|
|
1073
|
+
return ["SingleFetchRedirect", value[_chunk63YB5VLYjs.SingleFetchRedirectSymbol]];
|
|
1078
1074
|
}
|
|
1079
1075
|
}
|
|
1080
1076
|
],
|
|
@@ -1097,19 +1093,46 @@ function derive(build, mode) {
|
|
|
1097
1093
|
let routes = createRoutes(build.routes);
|
|
1098
1094
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1099
1095
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1100
|
-
let staticHandler =
|
|
1101
|
-
basename: build.basename
|
|
1102
|
-
unstable_instrumentations: build.entry.module.unstable_instrumentations
|
|
1096
|
+
let staticHandler = _chunk63YB5VLYjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1097
|
+
basename: build.basename
|
|
1103
1098
|
});
|
|
1104
1099
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1105
1100
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1106
1101
|
console.error(
|
|
1107
1102
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1108
|
-
|
|
1103
|
+
_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1109
1104
|
);
|
|
1110
1105
|
}
|
|
1111
1106
|
});
|
|
1112
|
-
|
|
1107
|
+
return {
|
|
1108
|
+
routes,
|
|
1109
|
+
dataRoutes,
|
|
1110
|
+
serverMode,
|
|
1111
|
+
staticHandler,
|
|
1112
|
+
errorHandler
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
var createRequestHandler = (build, mode) => {
|
|
1116
|
+
let _build;
|
|
1117
|
+
let routes;
|
|
1118
|
+
let serverMode;
|
|
1119
|
+
let staticHandler;
|
|
1120
|
+
let errorHandler;
|
|
1121
|
+
return async function requestHandler(request, initialContext) {
|
|
1122
|
+
_build = typeof build === "function" ? await build() : build;
|
|
1123
|
+
if (typeof build === "function") {
|
|
1124
|
+
let derived = derive(_build, mode);
|
|
1125
|
+
routes = derived.routes;
|
|
1126
|
+
serverMode = derived.serverMode;
|
|
1127
|
+
staticHandler = derived.staticHandler;
|
|
1128
|
+
errorHandler = derived.errorHandler;
|
|
1129
|
+
} else if (!routes || !serverMode || !staticHandler || !errorHandler) {
|
|
1130
|
+
let derived = derive(_build, mode);
|
|
1131
|
+
routes = derived.routes;
|
|
1132
|
+
serverMode = derived.serverMode;
|
|
1133
|
+
staticHandler = derived.staticHandler;
|
|
1134
|
+
errorHandler = derived.errorHandler;
|
|
1135
|
+
}
|
|
1113
1136
|
let params = {};
|
|
1114
1137
|
let loadContext;
|
|
1115
1138
|
let handleError = (error) => {
|
|
@@ -1122,37 +1145,37 @@ function derive(build, mode) {
|
|
|
1122
1145
|
request
|
|
1123
1146
|
});
|
|
1124
1147
|
};
|
|
1125
|
-
if (
|
|
1126
|
-
if (initialContext && !(initialContext instanceof
|
|
1148
|
+
if (_build.future.v8_middleware) {
|
|
1149
|
+
if (initialContext && !(initialContext instanceof _chunk63YB5VLYjs.RouterContextProvider)) {
|
|
1127
1150
|
let error = new Error(
|
|
1128
1151
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1129
1152
|
);
|
|
1130
1153
|
handleError(error);
|
|
1131
1154
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1132
1155
|
}
|
|
1133
|
-
loadContext = initialContext || new (0,
|
|
1156
|
+
loadContext = initialContext || new (0, _chunk63YB5VLYjs.RouterContextProvider)();
|
|
1134
1157
|
} else {
|
|
1135
1158
|
loadContext = initialContext || {};
|
|
1136
1159
|
}
|
|
1137
1160
|
let url = new URL(request.url);
|
|
1138
|
-
let normalizedBasename =
|
|
1161
|
+
let normalizedBasename = _build.basename || "/";
|
|
1139
1162
|
let normalizedPath = url.pathname;
|
|
1140
|
-
if (
|
|
1163
|
+
if (_chunk63YB5VLYjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1141
1164
|
normalizedPath = normalizedBasename;
|
|
1142
1165
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1143
1166
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1144
1167
|
}
|
|
1145
|
-
if (
|
|
1168
|
+
if (_chunk63YB5VLYjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1146
1169
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1147
1170
|
}
|
|
1148
1171
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1149
|
-
if (!
|
|
1172
|
+
if (!_build.ssr) {
|
|
1150
1173
|
let decodedPath = decodeURI(normalizedPath);
|
|
1151
1174
|
if (normalizedBasename !== "/") {
|
|
1152
|
-
let strippedPath =
|
|
1175
|
+
let strippedPath = _chunk63YB5VLYjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1153
1176
|
if (strippedPath == null) {
|
|
1154
1177
|
errorHandler(
|
|
1155
|
-
new (0,
|
|
1178
|
+
new (0, _chunk63YB5VLYjs.ErrorResponseImpl)(
|
|
1156
1179
|
404,
|
|
1157
1180
|
"Not Found",
|
|
1158
1181
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1170,12 +1193,12 @@ function derive(build, mode) {
|
|
|
1170
1193
|
}
|
|
1171
1194
|
decodedPath = strippedPath;
|
|
1172
1195
|
}
|
|
1173
|
-
if (
|
|
1196
|
+
if (_build.prerender.length === 0) {
|
|
1174
1197
|
isSpaMode = true;
|
|
1175
|
-
} else if (!
|
|
1198
|
+
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1176
1199
|
if (url.pathname.endsWith(".data")) {
|
|
1177
1200
|
errorHandler(
|
|
1178
|
-
new (0,
|
|
1201
|
+
new (0, _chunk63YB5VLYjs.ErrorResponseImpl)(
|
|
1179
1202
|
404,
|
|
1180
1203
|
"Not Found",
|
|
1181
1204
|
`Refusing to SSR the path \`${decodedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
|
|
@@ -1195,20 +1218,20 @@ function derive(build, mode) {
|
|
|
1195
1218
|
}
|
|
1196
1219
|
}
|
|
1197
1220
|
}
|
|
1198
|
-
let manifestUrl =
|
|
1199
|
-
|
|
1221
|
+
let manifestUrl = _chunk63YB5VLYjs.getManifestPath.call(void 0,
|
|
1222
|
+
_build.routeDiscovery.manifestPath,
|
|
1200
1223
|
normalizedBasename
|
|
1201
1224
|
);
|
|
1202
1225
|
if (url.pathname === manifestUrl) {
|
|
1203
1226
|
try {
|
|
1204
|
-
let res = await handleManifestRequest(
|
|
1227
|
+
let res = await handleManifestRequest(_build, routes, url);
|
|
1205
1228
|
return res;
|
|
1206
1229
|
} catch (e) {
|
|
1207
1230
|
handleError(e);
|
|
1208
1231
|
return new Response("Unknown Server Error", { status: 500 });
|
|
1209
1232
|
}
|
|
1210
1233
|
}
|
|
1211
|
-
let matches = matchServerRoutes(routes, normalizedPath,
|
|
1234
|
+
let matches = matchServerRoutes(routes, normalizedPath, _build.basename);
|
|
1212
1235
|
if (matches && matches.length > 0) {
|
|
1213
1236
|
Object.assign(params, matches[0].params);
|
|
1214
1237
|
}
|
|
@@ -1219,36 +1242,36 @@ function derive(build, mode) {
|
|
|
1219
1242
|
let singleFetchMatches = matchServerRoutes(
|
|
1220
1243
|
routes,
|
|
1221
1244
|
handlerUrl.pathname,
|
|
1222
|
-
|
|
1245
|
+
_build.basename
|
|
1223
1246
|
);
|
|
1224
1247
|
response = await handleSingleFetchRequest(
|
|
1225
1248
|
serverMode,
|
|
1226
|
-
|
|
1249
|
+
_build,
|
|
1227
1250
|
staticHandler,
|
|
1228
1251
|
request,
|
|
1229
1252
|
handlerUrl,
|
|
1230
1253
|
loadContext,
|
|
1231
1254
|
handleError
|
|
1232
1255
|
);
|
|
1233
|
-
if (
|
|
1256
|
+
if (_chunk63YB5VLYjs.isRedirectResponse.call(void 0, response)) {
|
|
1234
1257
|
response = generateSingleFetchRedirectResponse(
|
|
1235
1258
|
response,
|
|
1236
1259
|
request,
|
|
1237
|
-
|
|
1260
|
+
_build,
|
|
1238
1261
|
serverMode
|
|
1239
1262
|
);
|
|
1240
1263
|
}
|
|
1241
|
-
if (
|
|
1242
|
-
response = await
|
|
1264
|
+
if (_build.entry.module.handleDataRequest) {
|
|
1265
|
+
response = await _build.entry.module.handleDataRequest(response, {
|
|
1243
1266
|
context: loadContext,
|
|
1244
1267
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1245
1268
|
request
|
|
1246
1269
|
});
|
|
1247
|
-
if (
|
|
1270
|
+
if (_chunk63YB5VLYjs.isRedirectResponse.call(void 0, response)) {
|
|
1248
1271
|
response = generateSingleFetchRedirectResponse(
|
|
1249
1272
|
response,
|
|
1250
1273
|
request,
|
|
1251
|
-
|
|
1274
|
+
_build,
|
|
1252
1275
|
serverMode
|
|
1253
1276
|
);
|
|
1254
1277
|
}
|
|
@@ -1256,7 +1279,7 @@ function derive(build, mode) {
|
|
|
1256
1279
|
} else if (!isSpaMode && matches && matches[matches.length - 1].route.module.default == null && matches[matches.length - 1].route.module.ErrorBoundary == null) {
|
|
1257
1280
|
response = await handleResourceRequest(
|
|
1258
1281
|
serverMode,
|
|
1259
|
-
|
|
1282
|
+
_build,
|
|
1260
1283
|
staticHandler,
|
|
1261
1284
|
matches.slice(-1)[0].route.id,
|
|
1262
1285
|
request,
|
|
@@ -1266,14 +1289,14 @@ function derive(build, mode) {
|
|
|
1266
1289
|
} else {
|
|
1267
1290
|
let { pathname } = url;
|
|
1268
1291
|
let criticalCss = void 0;
|
|
1269
|
-
if (
|
|
1270
|
-
criticalCss = await
|
|
1292
|
+
if (_build.unstable_getCriticalCss) {
|
|
1293
|
+
criticalCss = await _build.unstable_getCriticalCss({ pathname });
|
|
1271
1294
|
} else if (mode === "development" /* Development */ && _optionalChain([getDevServerHooks, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getCriticalCss])) {
|
|
1272
1295
|
criticalCss = await _optionalChain([getDevServerHooks, 'call', _12 => _12(), 'optionalAccess', _13 => _13.getCriticalCss, 'optionalCall', _14 => _14(pathname)]);
|
|
1273
1296
|
}
|
|
1274
1297
|
response = await handleDocumentRequest(
|
|
1275
1298
|
serverMode,
|
|
1276
|
-
|
|
1299
|
+
_build,
|
|
1277
1300
|
staticHandler,
|
|
1278
1301
|
request,
|
|
1279
1302
|
loadContext,
|
|
@@ -1291,47 +1314,6 @@ function derive(build, mode) {
|
|
|
1291
1314
|
}
|
|
1292
1315
|
return response;
|
|
1293
1316
|
};
|
|
1294
|
-
if (build.entry.module.unstable_instrumentations) {
|
|
1295
|
-
requestHandler = _chunkK7VXYOZDjs.instrumentHandler.call(void 0,
|
|
1296
|
-
requestHandler,
|
|
1297
|
-
build.entry.module.unstable_instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1298
|
-
);
|
|
1299
|
-
}
|
|
1300
|
-
return {
|
|
1301
|
-
routes,
|
|
1302
|
-
dataRoutes,
|
|
1303
|
-
serverMode,
|
|
1304
|
-
staticHandler,
|
|
1305
|
-
errorHandler,
|
|
1306
|
-
requestHandler
|
|
1307
|
-
};
|
|
1308
|
-
}
|
|
1309
|
-
var createRequestHandler = (build, mode) => {
|
|
1310
|
-
let _build;
|
|
1311
|
-
let routes;
|
|
1312
|
-
let serverMode;
|
|
1313
|
-
let staticHandler;
|
|
1314
|
-
let errorHandler;
|
|
1315
|
-
let _requestHandler;
|
|
1316
|
-
return async function requestHandler(request, initialContext) {
|
|
1317
|
-
_build = typeof build === "function" ? await build() : build;
|
|
1318
|
-
if (typeof build === "function") {
|
|
1319
|
-
let derived = derive(_build, mode);
|
|
1320
|
-
routes = derived.routes;
|
|
1321
|
-
serverMode = derived.serverMode;
|
|
1322
|
-
staticHandler = derived.staticHandler;
|
|
1323
|
-
errorHandler = derived.errorHandler;
|
|
1324
|
-
_requestHandler = derived.requestHandler;
|
|
1325
|
-
} else if (!routes || !serverMode || !staticHandler || !errorHandler || !_requestHandler) {
|
|
1326
|
-
let derived = derive(_build, mode);
|
|
1327
|
-
routes = derived.routes;
|
|
1328
|
-
serverMode = derived.serverMode;
|
|
1329
|
-
staticHandler = derived.staticHandler;
|
|
1330
|
-
errorHandler = derived.errorHandler;
|
|
1331
|
-
_requestHandler = derived.requestHandler;
|
|
1332
|
-
}
|
|
1333
|
-
return _requestHandler(request, initialContext);
|
|
1334
|
-
};
|
|
1335
1317
|
};
|
|
1336
1318
|
async function handleManifestRequest(build, routes, url) {
|
|
1337
1319
|
if (build.assets.version !== url.searchParams.get("version")) {
|
|
@@ -1404,7 +1386,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1404
1386
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1405
1387
|
try {
|
|
1406
1388
|
let innerResult = await query(request);
|
|
1407
|
-
if (!
|
|
1389
|
+
if (!_chunk63YB5VLYjs.isResponse.call(void 0, innerResult)) {
|
|
1408
1390
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1409
1391
|
}
|
|
1410
1392
|
return innerResult;
|
|
@@ -1414,7 +1396,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1414
1396
|
}
|
|
1415
1397
|
} : void 0
|
|
1416
1398
|
});
|
|
1417
|
-
if (!
|
|
1399
|
+
if (!_chunk63YB5VLYjs.isResponse.call(void 0, result)) {
|
|
1418
1400
|
result = await renderHtml(result, isSpaMode);
|
|
1419
1401
|
}
|
|
1420
1402
|
return result;
|
|
@@ -1429,7 +1411,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1429
1411
|
}
|
|
1430
1412
|
if (context.errors) {
|
|
1431
1413
|
Object.values(context.errors).forEach((err) => {
|
|
1432
|
-
if (!
|
|
1414
|
+
if (!_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1433
1415
|
handleError(err);
|
|
1434
1416
|
}
|
|
1435
1417
|
});
|
|
@@ -1481,10 +1463,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1481
1463
|
} catch (error) {
|
|
1482
1464
|
handleError(error);
|
|
1483
1465
|
let errorForSecondRender = error;
|
|
1484
|
-
if (
|
|
1466
|
+
if (_chunk63YB5VLYjs.isResponse.call(void 0, error)) {
|
|
1485
1467
|
try {
|
|
1486
1468
|
let data2 = await unwrapResponse(error);
|
|
1487
|
-
errorForSecondRender = new (0,
|
|
1469
|
+
errorForSecondRender = new (0, _chunk63YB5VLYjs.ErrorResponseImpl)(
|
|
1488
1470
|
error.status,
|
|
1489
1471
|
error.statusText,
|
|
1490
1472
|
data2
|
|
@@ -1492,7 +1474,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1492
1474
|
} catch (e) {
|
|
1493
1475
|
}
|
|
1494
1476
|
}
|
|
1495
|
-
context =
|
|
1477
|
+
context = _chunk63YB5VLYjs.getStaticContextFromError.call(void 0,
|
|
1496
1478
|
staticHandler.dataRoutes,
|
|
1497
1479
|
context,
|
|
1498
1480
|
errorForSecondRender
|
|
@@ -1551,7 +1533,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1551
1533
|
return handleQueryRouteError(error);
|
|
1552
1534
|
}
|
|
1553
1535
|
function handleQueryRouteResult(result) {
|
|
1554
|
-
if (
|
|
1536
|
+
if (_chunk63YB5VLYjs.isResponse.call(void 0, result)) {
|
|
1555
1537
|
return result;
|
|
1556
1538
|
}
|
|
1557
1539
|
if (typeof result === "string") {
|
|
@@ -1560,10 +1542,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1560
1542
|
return Response.json(result);
|
|
1561
1543
|
}
|
|
1562
1544
|
function handleQueryRouteError(error) {
|
|
1563
|
-
if (
|
|
1545
|
+
if (_chunk63YB5VLYjs.isResponse.call(void 0, error)) {
|
|
1564
1546
|
return error;
|
|
1565
1547
|
}
|
|
1566
|
-
if (
|
|
1548
|
+
if (_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1567
1549
|
handleError(error);
|
|
1568
1550
|
return errorResponseToJson(error, serverMode);
|
|
1569
1551
|
}
|
|
@@ -1686,7 +1668,7 @@ function createSessionStorage({
|
|
|
1686
1668
|
};
|
|
1687
1669
|
}
|
|
1688
1670
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1689
|
-
|
|
1671
|
+
_chunk63YB5VLYjs.warnOnce.call(void 0,
|
|
1690
1672
|
cookie.isSigned,
|
|
1691
1673
|
`The "${cookie.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.`
|
|
1692
1674
|
);
|
|
@@ -1776,797 +1758,6 @@ function href(path, ...args) {
|
|
|
1776
1758
|
return result || "/";
|
|
1777
1759
|
}
|
|
1778
1760
|
|
|
1779
|
-
// lib/rsc/browser.tsx
|
|
1780
|
-
|
|
1781
|
-
var _reactdom = require('react-dom'); var ReactDOM = _interopRequireWildcard(_reactdom);
|
|
1782
|
-
|
|
1783
|
-
// lib/dom/ssr/hydration.tsx
|
|
1784
|
-
function getHydrationData({
|
|
1785
|
-
state,
|
|
1786
|
-
routes,
|
|
1787
|
-
getRouteInfo,
|
|
1788
|
-
location: location2,
|
|
1789
|
-
basename,
|
|
1790
|
-
isSpaMode
|
|
1791
|
-
}) {
|
|
1792
|
-
let hydrationData = {
|
|
1793
|
-
...state,
|
|
1794
|
-
loaderData: { ...state.loaderData }
|
|
1795
|
-
};
|
|
1796
|
-
let initialMatches = _chunkK7VXYOZDjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1797
|
-
if (initialMatches) {
|
|
1798
|
-
for (let match of initialMatches) {
|
|
1799
|
-
let routeId = match.route.id;
|
|
1800
|
-
let routeInfo = getRouteInfo(routeId);
|
|
1801
|
-
if (_chunkK7VXYOZDjs.shouldHydrateRouteLoader.call(void 0,
|
|
1802
|
-
routeId,
|
|
1803
|
-
routeInfo.clientLoader,
|
|
1804
|
-
routeInfo.hasLoader,
|
|
1805
|
-
isSpaMode
|
|
1806
|
-
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
|
|
1807
|
-
delete hydrationData.loaderData[routeId];
|
|
1808
|
-
} else if (!routeInfo.hasLoader) {
|
|
1809
|
-
hydrationData.loaderData[routeId] = null;
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
return hydrationData;
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
// lib/rsc/errorBoundaries.tsx
|
|
1817
|
-
|
|
1818
|
-
var RSCRouterGlobalErrorBoundary = class extends React.default.Component {
|
|
1819
|
-
constructor(props) {
|
|
1820
|
-
super(props);
|
|
1821
|
-
this.state = { error: null, location: props.location };
|
|
1822
|
-
}
|
|
1823
|
-
static getDerivedStateFromError(error) {
|
|
1824
|
-
return { error };
|
|
1825
|
-
}
|
|
1826
|
-
static getDerivedStateFromProps(props, state) {
|
|
1827
|
-
if (state.location !== props.location) {
|
|
1828
|
-
return { error: null, location: props.location };
|
|
1829
|
-
}
|
|
1830
|
-
return { error: state.error, location: state.location };
|
|
1831
|
-
}
|
|
1832
|
-
render() {
|
|
1833
|
-
if (this.state.error) {
|
|
1834
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1835
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1836
|
-
{
|
|
1837
|
-
error: this.state.error,
|
|
1838
|
-
renderAppShell: true
|
|
1839
|
-
}
|
|
1840
|
-
);
|
|
1841
|
-
} else {
|
|
1842
|
-
return this.props.children;
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
};
|
|
1846
|
-
function ErrorWrapper({
|
|
1847
|
-
renderAppShell,
|
|
1848
|
-
title,
|
|
1849
|
-
children
|
|
1850
|
-
}) {
|
|
1851
|
-
if (!renderAppShell) {
|
|
1852
|
-
return children;
|
|
1853
|
-
}
|
|
1854
|
-
return /* @__PURE__ */ React.default.createElement("html", { lang: "en" }, /* @__PURE__ */ React.default.createElement("head", null, /* @__PURE__ */ React.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ React.default.createElement(
|
|
1855
|
-
"meta",
|
|
1856
|
-
{
|
|
1857
|
-
name: "viewport",
|
|
1858
|
-
content: "width=device-width,initial-scale=1,viewport-fit=cover"
|
|
1859
|
-
}
|
|
1860
|
-
), /* @__PURE__ */ React.default.createElement("title", null, title)), /* @__PURE__ */ React.default.createElement("body", null, /* @__PURE__ */ React.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
|
|
1861
|
-
}
|
|
1862
|
-
function RSCDefaultRootErrorBoundaryImpl({
|
|
1863
|
-
error,
|
|
1864
|
-
renderAppShell
|
|
1865
|
-
}) {
|
|
1866
|
-
console.error(error);
|
|
1867
|
-
let heyDeveloper = /* @__PURE__ */ React.default.createElement(
|
|
1868
|
-
"script",
|
|
1869
|
-
{
|
|
1870
|
-
dangerouslySetInnerHTML: {
|
|
1871
|
-
__html: `
|
|
1872
|
-
console.log(
|
|
1873
|
-
"\u{1F4BF} Hey developer \u{1F44B}. 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."
|
|
1874
|
-
);
|
|
1875
|
-
`
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
);
|
|
1879
|
-
if (_chunkK7VXYOZDjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1880
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1881
|
-
ErrorWrapper,
|
|
1882
|
-
{
|
|
1883
|
-
renderAppShell,
|
|
1884
|
-
title: "Unhandled Thrown Response!"
|
|
1885
|
-
},
|
|
1886
|
-
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1887
|
-
_chunkK7VXYOZDjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1888
|
-
);
|
|
1889
|
-
}
|
|
1890
|
-
let errorInstance;
|
|
1891
|
-
if (error instanceof Error) {
|
|
1892
|
-
errorInstance = error;
|
|
1893
|
-
} else {
|
|
1894
|
-
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
|
|
1895
|
-
errorInstance = new Error(errorString);
|
|
1896
|
-
}
|
|
1897
|
-
return /* @__PURE__ */ React.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ React.default.createElement(
|
|
1898
|
-
"pre",
|
|
1899
|
-
{
|
|
1900
|
-
style: {
|
|
1901
|
-
padding: "2rem",
|
|
1902
|
-
background: "hsla(10, 50%, 50%, 0.1)",
|
|
1903
|
-
color: "red",
|
|
1904
|
-
overflow: "auto"
|
|
1905
|
-
}
|
|
1906
|
-
},
|
|
1907
|
-
errorInstance.stack
|
|
1908
|
-
), heyDeveloper);
|
|
1909
|
-
}
|
|
1910
|
-
function RSCDefaultRootErrorBoundary({
|
|
1911
|
-
hasRootLayout
|
|
1912
|
-
}) {
|
|
1913
|
-
let error = _chunkK7VXYOZDjs.useRouteError.call(void 0, );
|
|
1914
|
-
if (hasRootLayout === void 0) {
|
|
1915
|
-
throw new Error("Missing 'hasRootLayout' prop");
|
|
1916
|
-
}
|
|
1917
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1918
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1919
|
-
{
|
|
1920
|
-
renderAppShell: !hasRootLayout,
|
|
1921
|
-
error
|
|
1922
|
-
}
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
// lib/rsc/route-modules.ts
|
|
1927
|
-
function createRSCRouteModules(payload) {
|
|
1928
|
-
const routeModules = {};
|
|
1929
|
-
for (const match of payload.matches) {
|
|
1930
|
-
populateRSCRouteModules(routeModules, match);
|
|
1931
|
-
}
|
|
1932
|
-
return routeModules;
|
|
1933
|
-
}
|
|
1934
|
-
function populateRSCRouteModules(routeModules, matches) {
|
|
1935
|
-
matches = Array.isArray(matches) ? matches : [matches];
|
|
1936
|
-
for (const match of matches) {
|
|
1937
|
-
routeModules[match.id] = {
|
|
1938
|
-
links: match.links,
|
|
1939
|
-
meta: match.meta,
|
|
1940
|
-
default: noopComponent
|
|
1941
|
-
};
|
|
1942
|
-
}
|
|
1943
|
-
}
|
|
1944
|
-
var noopComponent = () => null;
|
|
1945
|
-
|
|
1946
|
-
// lib/rsc/browser.tsx
|
|
1947
|
-
function createCallServer({
|
|
1948
|
-
createFromReadableStream,
|
|
1949
|
-
createTemporaryReferenceSet,
|
|
1950
|
-
encodeReply,
|
|
1951
|
-
fetch: fetchImplementation = fetch
|
|
1952
|
-
}) {
|
|
1953
|
-
const globalVar = window;
|
|
1954
|
-
let landedActionId = 0;
|
|
1955
|
-
return async (id, args) => {
|
|
1956
|
-
let actionId = globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
1957
|
-
const temporaryReferences = createTemporaryReferenceSet();
|
|
1958
|
-
const payloadPromise = fetchImplementation(
|
|
1959
|
-
new Request(location.href, {
|
|
1960
|
-
body: await encodeReply(args, { temporaryReferences }),
|
|
1961
|
-
method: "POST",
|
|
1962
|
-
headers: {
|
|
1963
|
-
Accept: "text/x-component",
|
|
1964
|
-
"rsc-action-id": id
|
|
1965
|
-
}
|
|
1966
|
-
})
|
|
1967
|
-
).then((response) => {
|
|
1968
|
-
if (!response.body) {
|
|
1969
|
-
throw new Error("No response body");
|
|
1970
|
-
}
|
|
1971
|
-
return createFromReadableStream(response.body, {
|
|
1972
|
-
temporaryReferences
|
|
1973
|
-
});
|
|
1974
|
-
});
|
|
1975
|
-
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
|
1976
|
-
Promise.resolve(payloadPromise).then(async (payload) => {
|
|
1977
|
-
if (payload.type === "redirect") {
|
|
1978
|
-
if (payload.reload || isExternalLocation(payload.location)) {
|
|
1979
|
-
window.location.href = payload.location;
|
|
1980
|
-
return () => {
|
|
1981
|
-
};
|
|
1982
|
-
}
|
|
1983
|
-
return () => {
|
|
1984
|
-
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
|
1985
|
-
replace: payload.replace
|
|
1986
|
-
});
|
|
1987
|
-
};
|
|
1988
|
-
}
|
|
1989
|
-
if (payload.type !== "action") {
|
|
1990
|
-
throw new Error("Unexpected payload type");
|
|
1991
|
-
}
|
|
1992
|
-
const rerender = await payload.rerender;
|
|
1993
|
-
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
|
1994
|
-
if (rerender.type === "redirect") {
|
|
1995
|
-
if (rerender.reload || isExternalLocation(rerender.location)) {
|
|
1996
|
-
window.location.href = rerender.location;
|
|
1997
|
-
return;
|
|
1998
|
-
}
|
|
1999
|
-
return () => {
|
|
2000
|
-
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
|
2001
|
-
replace: rerender.replace
|
|
2002
|
-
});
|
|
2003
|
-
};
|
|
2004
|
-
}
|
|
2005
|
-
return () => {
|
|
2006
|
-
let lastMatch;
|
|
2007
|
-
for (const match of rerender.matches) {
|
|
2008
|
-
globalVar.__reactRouterDataRouter.patchRoutes(
|
|
2009
|
-
_nullishCoalesce(_optionalChain([lastMatch, 'optionalAccess', _19 => _19.id]), () => ( null)),
|
|
2010
|
-
[createRouteFromServerManifest(match)],
|
|
2011
|
-
true
|
|
2012
|
-
);
|
|
2013
|
-
lastMatch = match;
|
|
2014
|
-
}
|
|
2015
|
-
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
2016
|
-
{
|
|
2017
|
-
loaderData: Object.assign(
|
|
2018
|
-
{},
|
|
2019
|
-
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
2020
|
-
rerender.loaderData
|
|
2021
|
-
),
|
|
2022
|
-
errors: rerender.errors ? Object.assign(
|
|
2023
|
-
{},
|
|
2024
|
-
globalVar.__reactRouterDataRouter.state.errors,
|
|
2025
|
-
rerender.errors
|
|
2026
|
-
) : null
|
|
2027
|
-
}
|
|
2028
|
-
);
|
|
2029
|
-
};
|
|
2030
|
-
}
|
|
2031
|
-
return () => {
|
|
2032
|
-
};
|
|
2033
|
-
}).catch(() => {
|
|
2034
|
-
})
|
|
2035
|
-
);
|
|
2036
|
-
return payloadPromise.then((payload) => {
|
|
2037
|
-
if (payload.type !== "action" && payload.type !== "redirect") {
|
|
2038
|
-
throw new Error("Unexpected payload type");
|
|
2039
|
-
}
|
|
2040
|
-
return payload.actionResult;
|
|
2041
|
-
});
|
|
2042
|
-
};
|
|
2043
|
-
}
|
|
2044
|
-
function createRouterFromPayload({
|
|
2045
|
-
fetchImplementation,
|
|
2046
|
-
createFromReadableStream,
|
|
2047
|
-
getContext,
|
|
2048
|
-
payload
|
|
2049
|
-
}) {
|
|
2050
|
-
const globalVar = window;
|
|
2051
|
-
if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)
|
|
2052
|
-
return {
|
|
2053
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2054
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2055
|
-
};
|
|
2056
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2057
|
-
globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
|
|
2058
|
-
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2059
|
-
let patches = /* @__PURE__ */ new Map();
|
|
2060
|
-
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2061
|
-
_chunkK7VXYOZDjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2062
|
-
if (!patches.has(patch.parentId)) {
|
|
2063
|
-
patches.set(patch.parentId, []);
|
|
2064
|
-
}
|
|
2065
|
-
_optionalChain([patches, 'access', _23 => _23.get, 'call', _24 => _24(patch.parentId), 'optionalAccess', _25 => _25.push, 'call', _26 => _26(patch)]);
|
|
2066
|
-
})]);
|
|
2067
|
-
let routes = payload.matches.reduceRight((previous, match) => {
|
|
2068
|
-
const route = createRouteFromServerManifest(
|
|
2069
|
-
match,
|
|
2070
|
-
payload
|
|
2071
|
-
);
|
|
2072
|
-
if (previous.length > 0) {
|
|
2073
|
-
route.children = previous;
|
|
2074
|
-
let childrenToPatch = patches.get(match.id);
|
|
2075
|
-
if (childrenToPatch) {
|
|
2076
|
-
route.children.push(
|
|
2077
|
-
...childrenToPatch.map((r) => createRouteFromServerManifest(r))
|
|
2078
|
-
);
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
return [route];
|
|
2082
|
-
}, []);
|
|
2083
|
-
globalVar.__reactRouterDataRouter = _chunkK7VXYOZDjs.createRouter.call(void 0, {
|
|
2084
|
-
routes,
|
|
2085
|
-
getContext,
|
|
2086
|
-
basename: payload.basename,
|
|
2087
|
-
history: _chunkK7VXYOZDjs.createBrowserHistory.call(void 0, ),
|
|
2088
|
-
hydrationData: getHydrationData({
|
|
2089
|
-
state: {
|
|
2090
|
-
loaderData: payload.loaderData,
|
|
2091
|
-
actionData: payload.actionData,
|
|
2092
|
-
errors: payload.errors
|
|
2093
|
-
},
|
|
2094
|
-
routes,
|
|
2095
|
-
getRouteInfo: (routeId) => {
|
|
2096
|
-
let match = payload.matches.find((m) => m.id === routeId);
|
|
2097
|
-
_chunkK7VXYOZDjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2098
|
-
return {
|
|
2099
|
-
clientLoader: match.clientLoader,
|
|
2100
|
-
hasLoader: match.hasLoader,
|
|
2101
|
-
hasHydrateFallback: match.hydrateFallbackElement != null
|
|
2102
|
-
};
|
|
2103
|
-
},
|
|
2104
|
-
location: payload.location,
|
|
2105
|
-
basename: payload.basename,
|
|
2106
|
-
isSpaMode: false
|
|
2107
|
-
}),
|
|
2108
|
-
async patchRoutesOnNavigation({ path, signal }) {
|
|
2109
|
-
if (discoveredPaths.has(path)) {
|
|
2110
|
-
return;
|
|
2111
|
-
}
|
|
2112
|
-
await fetchAndApplyManifestPatches(
|
|
2113
|
-
[path],
|
|
2114
|
-
createFromReadableStream,
|
|
2115
|
-
fetchImplementation,
|
|
2116
|
-
signal
|
|
2117
|
-
);
|
|
2118
|
-
},
|
|
2119
|
-
// FIXME: Pass `build.ssr` into this function
|
|
2120
|
-
dataStrategy: getRSCSingleFetchDataStrategy(
|
|
2121
|
-
() => globalVar.__reactRouterDataRouter,
|
|
2122
|
-
true,
|
|
2123
|
-
payload.basename,
|
|
2124
|
-
createFromReadableStream,
|
|
2125
|
-
fetchImplementation
|
|
2126
|
-
)
|
|
2127
|
-
});
|
|
2128
|
-
if (globalVar.__reactRouterDataRouter.state.initialized) {
|
|
2129
|
-
globalVar.__routerInitialized = true;
|
|
2130
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2131
|
-
} else {
|
|
2132
|
-
globalVar.__routerInitialized = false;
|
|
2133
|
-
}
|
|
2134
|
-
let lastLoaderData = void 0;
|
|
2135
|
-
globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {
|
|
2136
|
-
if (lastLoaderData !== loaderData) {
|
|
2137
|
-
globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
2138
|
-
}
|
|
2139
|
-
});
|
|
2140
|
-
globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {
|
|
2141
|
-
const oldRoutes = window.__reactRouterDataRouter.routes;
|
|
2142
|
-
const newRoutes = [];
|
|
2143
|
-
function walkRoutes(routes2, parentId) {
|
|
2144
|
-
return routes2.map((route) => {
|
|
2145
|
-
const routeUpdate = routeUpdateByRouteId.get(route.id);
|
|
2146
|
-
if (routeUpdate) {
|
|
2147
|
-
const {
|
|
2148
|
-
routeModule,
|
|
2149
|
-
hasAction,
|
|
2150
|
-
hasComponent,
|
|
2151
|
-
hasErrorBoundary,
|
|
2152
|
-
hasLoader
|
|
2153
|
-
} = routeUpdate;
|
|
2154
|
-
const newRoute = createRouteFromServerManifest({
|
|
2155
|
-
clientAction: routeModule.clientAction,
|
|
2156
|
-
clientLoader: routeModule.clientLoader,
|
|
2157
|
-
element: route.element,
|
|
2158
|
-
errorElement: route.errorElement,
|
|
2159
|
-
handle: route.handle,
|
|
2160
|
-
hasAction,
|
|
2161
|
-
hasComponent,
|
|
2162
|
-
hasErrorBoundary,
|
|
2163
|
-
hasLoader,
|
|
2164
|
-
hydrateFallbackElement: route.hydrateFallbackElement,
|
|
2165
|
-
id: route.id,
|
|
2166
|
-
index: route.index,
|
|
2167
|
-
links: routeModule.links,
|
|
2168
|
-
meta: routeModule.meta,
|
|
2169
|
-
parentId,
|
|
2170
|
-
path: route.path,
|
|
2171
|
-
shouldRevalidate: routeModule.shouldRevalidate
|
|
2172
|
-
});
|
|
2173
|
-
if (route.children) {
|
|
2174
|
-
newRoute.children = walkRoutes(route.children, route.id);
|
|
2175
|
-
}
|
|
2176
|
-
return newRoute;
|
|
2177
|
-
}
|
|
2178
|
-
const updatedRoute = { ...route };
|
|
2179
|
-
if (route.children) {
|
|
2180
|
-
updatedRoute.children = walkRoutes(route.children, route.id);
|
|
2181
|
-
}
|
|
2182
|
-
return updatedRoute;
|
|
2183
|
-
});
|
|
2184
|
-
}
|
|
2185
|
-
newRoutes.push(
|
|
2186
|
-
...walkRoutes(oldRoutes, void 0)
|
|
2187
|
-
);
|
|
2188
|
-
window.__reactRouterDataRouter._internalSetRoutes(newRoutes);
|
|
2189
|
-
};
|
|
2190
|
-
return {
|
|
2191
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2192
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2193
|
-
};
|
|
2194
|
-
}
|
|
2195
|
-
var renderedRoutesContext = _chunkK7VXYOZDjs.createContext.call(void 0, );
|
|
2196
|
-
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2197
|
-
let dataStrategy = _chunkK7VXYOZDjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2198
|
-
getRouter,
|
|
2199
|
-
(match) => {
|
|
2200
|
-
let M = match;
|
|
2201
|
-
return {
|
|
2202
|
-
hasLoader: M.route.hasLoader,
|
|
2203
|
-
hasClientLoader: M.route.hasClientLoader,
|
|
2204
|
-
hasComponent: M.route.hasComponent,
|
|
2205
|
-
hasAction: M.route.hasAction,
|
|
2206
|
-
hasClientAction: M.route.hasClientAction,
|
|
2207
|
-
hasShouldRevalidate: M.route.hasShouldRevalidate
|
|
2208
|
-
};
|
|
2209
|
-
},
|
|
2210
|
-
// pass map into fetchAndDecode so it can add payloads
|
|
2211
|
-
getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),
|
|
2212
|
-
ssr,
|
|
2213
|
-
basename,
|
|
2214
|
-
// If the route has a component but we don't have an element, we need to hit
|
|
2215
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2216
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2217
|
-
(match) => {
|
|
2218
|
-
let M = match;
|
|
2219
|
-
return M.route.hasComponent && !M.route.element;
|
|
2220
|
-
}
|
|
2221
|
-
);
|
|
2222
|
-
return async (args) => args.runClientMiddleware(async () => {
|
|
2223
|
-
let context = args.context;
|
|
2224
|
-
context.set(renderedRoutesContext, []);
|
|
2225
|
-
let results = await dataStrategy(args);
|
|
2226
|
-
const renderedRoutesById = /* @__PURE__ */ new Map();
|
|
2227
|
-
for (const route of context.get(renderedRoutesContext)) {
|
|
2228
|
-
if (!renderedRoutesById.has(route.id)) {
|
|
2229
|
-
renderedRoutesById.set(route.id, []);
|
|
2230
|
-
}
|
|
2231
|
-
renderedRoutesById.get(route.id).push(route);
|
|
2232
|
-
}
|
|
2233
|
-
for (const match of args.matches) {
|
|
2234
|
-
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
|
2235
|
-
if (renderedRoutes) {
|
|
2236
|
-
for (const rendered of renderedRoutes) {
|
|
2237
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2238
|
-
_nullishCoalesce(rendered.parentId, () => ( null)),
|
|
2239
|
-
[createRouteFromServerManifest(rendered)],
|
|
2240
|
-
true
|
|
2241
|
-
);
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
return results;
|
|
2246
|
-
});
|
|
2247
|
-
}
|
|
2248
|
-
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2249
|
-
return async (args, basename, targetRoutes) => {
|
|
2250
|
-
let { request, context } = args;
|
|
2251
|
-
let url = _chunkK7VXYOZDjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2252
|
-
if (request.method === "GET") {
|
|
2253
|
-
url = _chunkK7VXYOZDjs.stripIndexParam.call(void 0, url);
|
|
2254
|
-
if (targetRoutes) {
|
|
2255
|
-
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
let res = await fetchImplementation(
|
|
2259
|
-
new Request(url, await _chunkK7VXYOZDjs.createRequestInit.call(void 0, request))
|
|
2260
|
-
);
|
|
2261
|
-
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2262
|
-
throw new (0, _chunkK7VXYOZDjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2263
|
-
}
|
|
2264
|
-
_chunkK7VXYOZDjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2265
|
-
try {
|
|
2266
|
-
const payload = await createFromReadableStream(res.body, {
|
|
2267
|
-
temporaryReferences: void 0
|
|
2268
|
-
});
|
|
2269
|
-
if (payload.type === "redirect") {
|
|
2270
|
-
return {
|
|
2271
|
-
status: res.status,
|
|
2272
|
-
data: {
|
|
2273
|
-
redirect: {
|
|
2274
|
-
redirect: payload.location,
|
|
2275
|
-
reload: payload.reload,
|
|
2276
|
-
replace: payload.replace,
|
|
2277
|
-
revalidate: false,
|
|
2278
|
-
status: payload.status
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
if (payload.type !== "render") {
|
|
2284
|
-
throw new Error("Unexpected payload type");
|
|
2285
|
-
}
|
|
2286
|
-
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2287
|
-
let results = { routes: {} };
|
|
2288
|
-
const dataKey = _chunkK7VXYOZDjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2289
|
-
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2290
|
-
results.routes[routeId] = { data: data2 };
|
|
2291
|
-
}
|
|
2292
|
-
if (payload.errors) {
|
|
2293
|
-
for (let [routeId, error] of Object.entries(payload.errors)) {
|
|
2294
|
-
results.routes[routeId] = { error };
|
|
2295
|
-
}
|
|
2296
|
-
}
|
|
2297
|
-
return { status: res.status, data: results };
|
|
2298
|
-
} catch (e) {
|
|
2299
|
-
throw new Error("Unable to decode RSC response");
|
|
2300
|
-
}
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
function RSCHydratedRouter({
|
|
2304
|
-
createFromReadableStream,
|
|
2305
|
-
fetch: fetchImplementation = fetch,
|
|
2306
|
-
payload,
|
|
2307
|
-
routeDiscovery = "eager",
|
|
2308
|
-
getContext
|
|
2309
|
-
}) {
|
|
2310
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2311
|
-
let { router, routeModules } = React4.useMemo(
|
|
2312
|
-
() => createRouterFromPayload({
|
|
2313
|
-
payload,
|
|
2314
|
-
fetchImplementation,
|
|
2315
|
-
getContext,
|
|
2316
|
-
createFromReadableStream
|
|
2317
|
-
}),
|
|
2318
|
-
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2319
|
-
);
|
|
2320
|
-
React4.useEffect(() => {
|
|
2321
|
-
_chunkK7VXYOZDjs.setIsHydrated.call(void 0, );
|
|
2322
|
-
}, []);
|
|
2323
|
-
React4.useLayoutEffect(() => {
|
|
2324
|
-
const globalVar = window;
|
|
2325
|
-
if (!globalVar.__routerInitialized) {
|
|
2326
|
-
globalVar.__routerInitialized = true;
|
|
2327
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2328
|
-
}
|
|
2329
|
-
}, []);
|
|
2330
|
-
let [location2, setLocation] = React4.useState(router.state.location);
|
|
2331
|
-
React4.useLayoutEffect(
|
|
2332
|
-
() => router.subscribe((newState) => {
|
|
2333
|
-
if (newState.location !== location2) {
|
|
2334
|
-
setLocation(newState.location);
|
|
2335
|
-
}
|
|
2336
|
-
}),
|
|
2337
|
-
[router, location2]
|
|
2338
|
-
);
|
|
2339
|
-
React4.useEffect(() => {
|
|
2340
|
-
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
|
2341
|
-
_optionalChain([window, 'access', _27 => _27.navigator, 'optionalAccess', _28 => _28.connection, 'optionalAccess', _29 => _29.saveData]) === true) {
|
|
2342
|
-
return;
|
|
2343
|
-
}
|
|
2344
|
-
function registerElement(el) {
|
|
2345
|
-
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
|
2346
|
-
if (!path) {
|
|
2347
|
-
return;
|
|
2348
|
-
}
|
|
2349
|
-
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
|
2350
|
-
if (!discoveredPaths.has(pathname)) {
|
|
2351
|
-
nextPaths.add(pathname);
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
async function fetchPatches() {
|
|
2355
|
-
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
|
2356
|
-
let paths = Array.from(nextPaths.keys()).filter((path) => {
|
|
2357
|
-
if (discoveredPaths.has(path)) {
|
|
2358
|
-
nextPaths.delete(path);
|
|
2359
|
-
return false;
|
|
2360
|
-
}
|
|
2361
|
-
return true;
|
|
2362
|
-
});
|
|
2363
|
-
if (paths.length === 0) {
|
|
2364
|
-
return;
|
|
2365
|
-
}
|
|
2366
|
-
try {
|
|
2367
|
-
await fetchAndApplyManifestPatches(
|
|
2368
|
-
paths,
|
|
2369
|
-
createFromReadableStream,
|
|
2370
|
-
fetchImplementation
|
|
2371
|
-
);
|
|
2372
|
-
} catch (e) {
|
|
2373
|
-
console.error("Failed to fetch manifest patches", e);
|
|
2374
|
-
}
|
|
2375
|
-
}
|
|
2376
|
-
let debouncedFetchPatches = debounce(fetchPatches, 100);
|
|
2377
|
-
fetchPatches();
|
|
2378
|
-
let observer = new MutationObserver(() => debouncedFetchPatches());
|
|
2379
|
-
observer.observe(document.documentElement, {
|
|
2380
|
-
subtree: true,
|
|
2381
|
-
childList: true,
|
|
2382
|
-
attributes: true,
|
|
2383
|
-
attributeFilter: ["data-discover", "href", "action"]
|
|
2384
|
-
});
|
|
2385
|
-
}, [routeDiscovery, createFromReadableStream, fetchImplementation]);
|
|
2386
|
-
const frameworkContext = {
|
|
2387
|
-
future: {
|
|
2388
|
-
// These flags have no runtime impact so can always be false. If we add
|
|
2389
|
-
// flags that drive runtime behavior they'll need to be proxied through.
|
|
2390
|
-
v8_middleware: false,
|
|
2391
|
-
unstable_subResourceIntegrity: false
|
|
2392
|
-
},
|
|
2393
|
-
isSpaMode: false,
|
|
2394
|
-
ssr: true,
|
|
2395
|
-
criticalCss: "",
|
|
2396
|
-
manifest: {
|
|
2397
|
-
routes: {},
|
|
2398
|
-
version: "1",
|
|
2399
|
-
url: "",
|
|
2400
|
-
entry: {
|
|
2401
|
-
module: "",
|
|
2402
|
-
imports: []
|
|
2403
|
-
}
|
|
2404
|
-
},
|
|
2405
|
-
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2406
|
-
routeModules
|
|
2407
|
-
};
|
|
2408
|
-
return /* @__PURE__ */ React4.createElement(_chunkK7VXYOZDjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkK7VXYOZDjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkDASXXYNZjs.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2409
|
-
}
|
|
2410
|
-
function createRouteFromServerManifest(match, payload) {
|
|
2411
|
-
let hasInitialData = payload && match.id in payload.loaderData;
|
|
2412
|
-
let initialData = _optionalChain([payload, 'optionalAccess', _30 => _30.loaderData, 'access', _31 => _31[match.id]]);
|
|
2413
|
-
let hasInitialError = _optionalChain([payload, 'optionalAccess', _32 => _32.errors]) && match.id in payload.errors;
|
|
2414
|
-
let initialError = _optionalChain([payload, 'optionalAccess', _33 => _33.errors, 'optionalAccess', _34 => _34[match.id]]);
|
|
2415
|
-
let isHydrationRequest = _optionalChain([match, 'access', _35 => _35.clientLoader, 'optionalAccess', _36 => _36.hydrate]) === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit
|
|
2416
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2417
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2418
|
-
match.hasComponent && !match.element;
|
|
2419
|
-
_chunkK7VXYOZDjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2420
|
-
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2421
|
-
let dataRoute = {
|
|
2422
|
-
id: match.id,
|
|
2423
|
-
element: match.element,
|
|
2424
|
-
errorElement: match.errorElement,
|
|
2425
|
-
handle: match.handle,
|
|
2426
|
-
hasErrorBoundary: match.hasErrorBoundary,
|
|
2427
|
-
hydrateFallbackElement: match.hydrateFallbackElement,
|
|
2428
|
-
index: match.index,
|
|
2429
|
-
loader: match.clientLoader ? async (args, singleFetch) => {
|
|
2430
|
-
try {
|
|
2431
|
-
let result = await match.clientLoader({
|
|
2432
|
-
...args,
|
|
2433
|
-
serverLoader: () => {
|
|
2434
|
-
preventInvalidServerHandlerCall(
|
|
2435
|
-
"loader",
|
|
2436
|
-
match.id,
|
|
2437
|
-
match.hasLoader
|
|
2438
|
-
);
|
|
2439
|
-
if (isHydrationRequest) {
|
|
2440
|
-
if (hasInitialData) {
|
|
2441
|
-
return initialData;
|
|
2442
|
-
}
|
|
2443
|
-
if (hasInitialError) {
|
|
2444
|
-
throw initialError;
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
return callSingleFetch(singleFetch);
|
|
2448
|
-
}
|
|
2449
|
-
});
|
|
2450
|
-
return result;
|
|
2451
|
-
} finally {
|
|
2452
|
-
isHydrationRequest = false;
|
|
2453
|
-
}
|
|
2454
|
-
} : (
|
|
2455
|
-
// We always make the call in this RSC world since even if we don't
|
|
2456
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2457
|
-
(_, singleFetch) => callSingleFetch(singleFetch)
|
|
2458
|
-
),
|
|
2459
|
-
action: match.clientAction ? (args, singleFetch) => match.clientAction({
|
|
2460
|
-
...args,
|
|
2461
|
-
serverAction: async () => {
|
|
2462
|
-
preventInvalidServerHandlerCall(
|
|
2463
|
-
"action",
|
|
2464
|
-
match.id,
|
|
2465
|
-
match.hasLoader
|
|
2466
|
-
);
|
|
2467
|
-
return await callSingleFetch(singleFetch);
|
|
2468
|
-
}
|
|
2469
|
-
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2470
|
-
throw _chunkK7VXYOZDjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2471
|
-
},
|
|
2472
|
-
path: match.path,
|
|
2473
|
-
shouldRevalidate: match.shouldRevalidate,
|
|
2474
|
-
// We always have a "loader" in this RSC world since even if we don't
|
|
2475
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2476
|
-
hasLoader: true,
|
|
2477
|
-
hasClientLoader: match.clientLoader != null,
|
|
2478
|
-
hasAction: match.hasAction,
|
|
2479
|
-
hasClientAction: match.clientAction != null,
|
|
2480
|
-
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2481
|
-
};
|
|
2482
|
-
if (typeof dataRoute.loader === "function") {
|
|
2483
|
-
dataRoute.loader.hydrate = _chunkK7VXYOZDjs.shouldHydrateRouteLoader.call(void 0,
|
|
2484
|
-
match.id,
|
|
2485
|
-
match.clientLoader,
|
|
2486
|
-
match.hasLoader,
|
|
2487
|
-
false
|
|
2488
|
-
);
|
|
2489
|
-
}
|
|
2490
|
-
return dataRoute;
|
|
2491
|
-
}
|
|
2492
|
-
function callSingleFetch(singleFetch) {
|
|
2493
|
-
_chunkK7VXYOZDjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2494
|
-
return singleFetch();
|
|
2495
|
-
}
|
|
2496
|
-
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
2497
|
-
if (!hasHandler) {
|
|
2498
|
-
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2499
|
-
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2500
|
-
console.error(msg);
|
|
2501
|
-
throw new (0, _chunkK7VXYOZDjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
var nextPaths = /* @__PURE__ */ new Set();
|
|
2505
|
-
var discoveredPathsMaxSize = 1e3;
|
|
2506
|
-
var discoveredPaths = /* @__PURE__ */ new Set();
|
|
2507
|
-
var URL_LIMIT = 7680;
|
|
2508
|
-
function getManifestUrl(paths) {
|
|
2509
|
-
if (paths.length === 0) {
|
|
2510
|
-
return null;
|
|
2511
|
-
}
|
|
2512
|
-
if (paths.length === 1) {
|
|
2513
|
-
return new URL(`${paths[0]}.manifest`, window.location.origin);
|
|
2514
|
-
}
|
|
2515
|
-
const globalVar = window;
|
|
2516
|
-
let basename = (_nullishCoalesce(globalVar.__reactRouterDataRouter.basename, () => ( ""))).replace(
|
|
2517
|
-
/^\/|\/$/g,
|
|
2518
|
-
""
|
|
2519
|
-
);
|
|
2520
|
-
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
2521
|
-
url.searchParams.set("paths", paths.sort().join(","));
|
|
2522
|
-
return url;
|
|
2523
|
-
}
|
|
2524
|
-
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
|
2525
|
-
let url = getManifestUrl(paths);
|
|
2526
|
-
if (url == null) {
|
|
2527
|
-
return;
|
|
2528
|
-
}
|
|
2529
|
-
if (url.toString().length > URL_LIMIT) {
|
|
2530
|
-
nextPaths.clear();
|
|
2531
|
-
return;
|
|
2532
|
-
}
|
|
2533
|
-
let response = await fetchImplementation(new Request(url, { signal }));
|
|
2534
|
-
if (!response.body || response.status < 200 || response.status >= 300) {
|
|
2535
|
-
throw new Error("Unable to fetch new route matches from the server");
|
|
2536
|
-
}
|
|
2537
|
-
let payload = await createFromReadableStream(response.body, {
|
|
2538
|
-
temporaryReferences: void 0
|
|
2539
|
-
});
|
|
2540
|
-
if (payload.type !== "manifest") {
|
|
2541
|
-
throw new Error("Failed to patch routes");
|
|
2542
|
-
}
|
|
2543
|
-
paths.forEach((p) => addToFifoQueue(p, discoveredPaths));
|
|
2544
|
-
payload.patches.forEach((p) => {
|
|
2545
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2546
|
-
_nullishCoalesce(p.parentId, () => ( null)),
|
|
2547
|
-
[createRouteFromServerManifest(p)]
|
|
2548
|
-
);
|
|
2549
|
-
});
|
|
2550
|
-
}
|
|
2551
|
-
function addToFifoQueue(path, queue) {
|
|
2552
|
-
if (queue.size >= discoveredPathsMaxSize) {
|
|
2553
|
-
let first = queue.values().next().value;
|
|
2554
|
-
queue.delete(first);
|
|
2555
|
-
}
|
|
2556
|
-
queue.add(path);
|
|
2557
|
-
}
|
|
2558
|
-
function debounce(callback, wait) {
|
|
2559
|
-
let timeoutId;
|
|
2560
|
-
return (...args) => {
|
|
2561
|
-
window.clearTimeout(timeoutId);
|
|
2562
|
-
timeoutId = window.setTimeout(() => callback(...args), wait);
|
|
2563
|
-
};
|
|
2564
|
-
}
|
|
2565
|
-
function isExternalLocation(location2) {
|
|
2566
|
-
const newLocation = new URL(location2, window.location.href);
|
|
2567
|
-
return newLocation.origin !== window.location.origin;
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
1761
|
// lib/rsc/server.ssr.tsx
|
|
2571
1762
|
|
|
2572
1763
|
|
|
@@ -2660,7 +1851,7 @@ function escapeScript(script) {
|
|
|
2660
1851
|
|
|
2661
1852
|
// lib/rsc/server.ssr.tsx
|
|
2662
1853
|
var REACT_USE = "use";
|
|
2663
|
-
var useImpl =
|
|
1854
|
+
var useImpl = React3[REACT_USE];
|
|
2664
1855
|
function useSafe(promise) {
|
|
2665
1856
|
if (useImpl) {
|
|
2666
1857
|
return useImpl(promise);
|
|
@@ -2746,14 +1937,14 @@ async function routeRSCServerRequest({
|
|
|
2746
1937
|
const payload = await createFromReadableStream(
|
|
2747
1938
|
detectRedirectResponse.body
|
|
2748
1939
|
);
|
|
2749
|
-
if (serverResponse.status ===
|
|
1940
|
+
if (serverResponse.status === _chunk63YB5VLYjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2750
1941
|
const headers2 = new Headers(serverResponse.headers);
|
|
2751
1942
|
headers2.delete("Content-Encoding");
|
|
2752
1943
|
headers2.delete("Content-Length");
|
|
2753
1944
|
headers2.delete("Content-Type");
|
|
2754
1945
|
headers2.delete("X-Remix-Response");
|
|
2755
1946
|
headers2.set("Location", payload.location);
|
|
2756
|
-
return new Response(_optionalChain([serverResponseB, 'optionalAccess',
|
|
1947
|
+
return new Response(_optionalChain([serverResponseB, 'optionalAccess', _19 => _19.body]) || "", {
|
|
2757
1948
|
headers: headers2,
|
|
2758
1949
|
status: payload.status,
|
|
2759
1950
|
statusText: serverResponse.statusText
|
|
@@ -2768,7 +1959,7 @@ async function routeRSCServerRequest({
|
|
|
2768
1959
|
headers
|
|
2769
1960
|
});
|
|
2770
1961
|
}
|
|
2771
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
1962
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _20 => _20.body])) {
|
|
2772
1963
|
throw new Error("Failed to clone server response");
|
|
2773
1964
|
}
|
|
2774
1965
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2781,7 +1972,7 @@ async function routeRSCServerRequest({
|
|
|
2781
1972
|
return reason;
|
|
2782
1973
|
}
|
|
2783
1974
|
try {
|
|
2784
|
-
const status =
|
|
1975
|
+
const status = _chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2785
1976
|
const html = await renderHTML(() => {
|
|
2786
1977
|
const decoded = Promise.resolve(
|
|
2787
1978
|
createFromReadableStream(createStream())
|
|
@@ -2820,7 +2011,7 @@ async function routeRSCServerRequest({
|
|
|
2820
2011
|
headers
|
|
2821
2012
|
});
|
|
2822
2013
|
}
|
|
2823
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
2014
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _21 => _21.body])) {
|
|
2824
2015
|
throw new Error("Failed to clone server response");
|
|
2825
2016
|
}
|
|
2826
2017
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2847,7 +2038,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2847
2038
|
if (payload.type !== "render") return null;
|
|
2848
2039
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2849
2040
|
for (const match of payload.matches) {
|
|
2850
|
-
if (
|
|
2041
|
+
if (_chunk63YB5VLYjs.shouldHydrateRouteLoader.call(void 0,
|
|
2851
2042
|
match.id,
|
|
2852
2043
|
match.clientLoader,
|
|
2853
2044
|
match.hasLoader,
|
|
@@ -2887,7 +2078,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2887
2078
|
}
|
|
2888
2079
|
}))
|
|
2889
2080
|
};
|
|
2890
|
-
const router =
|
|
2081
|
+
const router = _chunkVX4OHTGRjs.createStaticRouter.call(void 0,
|
|
2891
2082
|
payload.matches.reduceRight((previous, match) => {
|
|
2892
2083
|
const route = {
|
|
2893
2084
|
id: match.id,
|
|
@@ -2929,10 +2120,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2929
2120
|
}
|
|
2930
2121
|
},
|
|
2931
2122
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2932
|
-
routeModules: createRSCRouteModules(payload)
|
|
2123
|
+
routeModules: _chunkIE722GR6js.createRSCRouteModules.call(void 0, payload)
|
|
2933
2124
|
};
|
|
2934
|
-
return /* @__PURE__ */
|
|
2935
|
-
|
|
2125
|
+
return /* @__PURE__ */ React3.createElement(_chunk63YB5VLYjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkIE722GR6js.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunk63YB5VLYjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2126
|
+
_chunkVX4OHTGRjs.StaticRouterProvider,
|
|
2936
2127
|
{
|
|
2937
2128
|
context,
|
|
2938
2129
|
router,
|
|
@@ -2948,41 +2139,6 @@ function isManifestRequest(url) {
|
|
|
2948
2139
|
return url.pathname.endsWith(".manifest");
|
|
2949
2140
|
}
|
|
2950
2141
|
|
|
2951
|
-
// lib/rsc/html-stream/browser.ts
|
|
2952
|
-
function getRSCStream() {
|
|
2953
|
-
let encoder3 = new TextEncoder();
|
|
2954
|
-
let streamController = null;
|
|
2955
|
-
let rscStream = new ReadableStream({
|
|
2956
|
-
start(controller) {
|
|
2957
|
-
if (typeof window === "undefined") {
|
|
2958
|
-
return;
|
|
2959
|
-
}
|
|
2960
|
-
let handleChunk = (chunk) => {
|
|
2961
|
-
if (typeof chunk === "string") {
|
|
2962
|
-
controller.enqueue(encoder3.encode(chunk));
|
|
2963
|
-
} else {
|
|
2964
|
-
controller.enqueue(chunk);
|
|
2965
|
-
}
|
|
2966
|
-
};
|
|
2967
|
-
window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);
|
|
2968
|
-
window.__FLIGHT_DATA.forEach(handleChunk);
|
|
2969
|
-
window.__FLIGHT_DATA.push = (chunk) => {
|
|
2970
|
-
handleChunk(chunk);
|
|
2971
|
-
return 0;
|
|
2972
|
-
};
|
|
2973
|
-
streamController = controller;
|
|
2974
|
-
}
|
|
2975
|
-
});
|
|
2976
|
-
if (typeof document !== "undefined" && document.readyState === "loading") {
|
|
2977
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
2978
|
-
_optionalChain([streamController, 'optionalAccess', _40 => _40.close, 'call', _41 => _41()]);
|
|
2979
|
-
});
|
|
2980
|
-
} else {
|
|
2981
|
-
_optionalChain([streamController, 'optionalAccess', _42 => _42.close, 'call', _43 => _43()]);
|
|
2982
|
-
}
|
|
2983
|
-
return rscStream;
|
|
2984
|
-
}
|
|
2985
|
-
|
|
2986
2142
|
// lib/dom/ssr/errors.ts
|
|
2987
2143
|
function deserializeErrors(errors) {
|
|
2988
2144
|
if (!errors) return null;
|
|
@@ -2990,7 +2146,7 @@ function deserializeErrors(errors) {
|
|
|
2990
2146
|
let serialized = {};
|
|
2991
2147
|
for (let [key, val] of entries) {
|
|
2992
2148
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2993
|
-
serialized[key] = new (0,
|
|
2149
|
+
serialized[key] = new (0, _chunk63YB5VLYjs.ErrorResponseImpl)(
|
|
2994
2150
|
val.status,
|
|
2995
2151
|
val.statusText,
|
|
2996
2152
|
val.data,
|
|
@@ -3147,6 +2303,4 @@ function deserializeErrors(errors) {
|
|
|
3147
2303
|
|
|
3148
2304
|
|
|
3149
2305
|
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
exports.Await = _chunkDASXXYNZjs.Await; exports.BrowserRouter = _chunkDASXXYNZjs.BrowserRouter; exports.Form = _chunkDASXXYNZjs.Form; exports.HashRouter = _chunkDASXXYNZjs.HashRouter; exports.IDLE_BLOCKER = _chunkK7VXYOZDjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkK7VXYOZDjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkK7VXYOZDjs.IDLE_NAVIGATION; exports.Link = _chunkDASXXYNZjs.Link; exports.Links = _chunkK7VXYOZDjs.Links; exports.MemoryRouter = _chunkDASXXYNZjs.MemoryRouter; exports.Meta = _chunkK7VXYOZDjs.Meta; exports.NavLink = _chunkDASXXYNZjs.NavLink; exports.Navigate = _chunkDASXXYNZjs.Navigate; exports.NavigationType = _chunkK7VXYOZDjs.Action; exports.Outlet = _chunkDASXXYNZjs.Outlet; exports.PrefetchPageLinks = _chunkK7VXYOZDjs.PrefetchPageLinks; exports.Route = _chunkDASXXYNZjs.Route; exports.Router = _chunkDASXXYNZjs.Router; exports.RouterContextProvider = _chunkK7VXYOZDjs.RouterContextProvider; exports.RouterProvider = _chunkDASXXYNZjs.RouterProvider; exports.Routes = _chunkDASXXYNZjs.Routes; exports.Scripts = _chunkK7VXYOZDjs.Scripts; exports.ScrollRestoration = _chunkDASXXYNZjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkDASXXYNZjs.StaticRouter; exports.StaticRouterProvider = _chunkDASXXYNZjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkK7VXYOZDjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkK7VXYOZDjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkK7VXYOZDjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkK7VXYOZDjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkK7VXYOZDjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkK7VXYOZDjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkK7VXYOZDjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkK7VXYOZDjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkK7VXYOZDjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkK7VXYOZDjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkK7VXYOZDjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkK7VXYOZDjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkDASXXYNZjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkDASXXYNZjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkDASXXYNZjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkK7VXYOZDjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkK7VXYOZDjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkK7VXYOZDjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkK7VXYOZDjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkK7VXYOZDjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkK7VXYOZDjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkK7VXYOZDjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkDASXXYNZjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkK7VXYOZDjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkDASXXYNZjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkK7VXYOZDjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkK7VXYOZDjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkDASXXYNZjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkDASXXYNZjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkDASXXYNZjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkDASXXYNZjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkDASXXYNZjs.createBrowserRouter; exports.createContext = _chunkK7VXYOZDjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkDASXXYNZjs.createHashRouter; exports.createMemoryRouter = _chunkDASXXYNZjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkK7VXYOZDjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkDASXXYNZjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkDASXXYNZjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkDASXXYNZjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkDASXXYNZjs.createStaticHandler; exports.createStaticRouter = _chunkDASXXYNZjs.createStaticRouter; exports.data = _chunkK7VXYOZDjs.data; exports.generatePath = _chunkK7VXYOZDjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkK7VXYOZDjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkK7VXYOZDjs.matchPath; exports.matchRoutes = _chunkK7VXYOZDjs.matchRoutes; exports.parsePath = _chunkK7VXYOZDjs.parsePath; exports.redirect = _chunkK7VXYOZDjs.redirect; exports.redirectDocument = _chunkK7VXYOZDjs.redirectDocument; exports.renderMatches = _chunkDASXXYNZjs.renderMatches; exports.replace = _chunkK7VXYOZDjs.replace; exports.resolvePath = _chunkK7VXYOZDjs.resolvePath; exports.unstable_HistoryRouter = _chunkDASXXYNZjs.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_createCallServer = createCallServer; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkDASXXYNZjs.usePrompt; exports.useActionData = _chunkK7VXYOZDjs.useActionData; exports.useAsyncError = _chunkK7VXYOZDjs.useAsyncError; exports.useAsyncValue = _chunkK7VXYOZDjs.useAsyncValue; exports.useBeforeUnload = _chunkDASXXYNZjs.useBeforeUnload; exports.useBlocker = _chunkK7VXYOZDjs.useBlocker; exports.useFetcher = _chunkDASXXYNZjs.useFetcher; exports.useFetchers = _chunkDASXXYNZjs.useFetchers; exports.useFormAction = _chunkDASXXYNZjs.useFormAction; exports.useHref = _chunkK7VXYOZDjs.useHref; exports.useInRouterContext = _chunkK7VXYOZDjs.useInRouterContext; exports.useLinkClickHandler = _chunkDASXXYNZjs.useLinkClickHandler; exports.useLoaderData = _chunkK7VXYOZDjs.useLoaderData; exports.useLocation = _chunkK7VXYOZDjs.useLocation; exports.useMatch = _chunkK7VXYOZDjs.useMatch; exports.useMatches = _chunkK7VXYOZDjs.useMatches; exports.useNavigate = _chunkK7VXYOZDjs.useNavigate; exports.useNavigation = _chunkK7VXYOZDjs.useNavigation; exports.useNavigationType = _chunkK7VXYOZDjs.useNavigationType; exports.useOutlet = _chunkK7VXYOZDjs.useOutlet; exports.useOutletContext = _chunkK7VXYOZDjs.useOutletContext; exports.useParams = _chunkK7VXYOZDjs.useParams; exports.useResolvedPath = _chunkK7VXYOZDjs.useResolvedPath; exports.useRevalidator = _chunkK7VXYOZDjs.useRevalidator; exports.useRouteError = _chunkK7VXYOZDjs.useRouteError; exports.useRouteLoaderData = _chunkK7VXYOZDjs.useRouteLoaderData; exports.useRoutes = _chunkK7VXYOZDjs.useRoutes; exports.useSearchParams = _chunkDASXXYNZjs.useSearchParams; exports.useSubmit = _chunkDASXXYNZjs.useSubmit; exports.useViewTransitionState = _chunkDASXXYNZjs.useViewTransitionState;
|
|
2306
|
+
exports.Await = _chunk63YB5VLYjs.Await; exports.BrowserRouter = _chunkVX4OHTGRjs.BrowserRouter; exports.Form = _chunkVX4OHTGRjs.Form; exports.HashRouter = _chunkVX4OHTGRjs.HashRouter; exports.IDLE_BLOCKER = _chunk63YB5VLYjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk63YB5VLYjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk63YB5VLYjs.IDLE_NAVIGATION; exports.Link = _chunkVX4OHTGRjs.Link; exports.Links = _chunk63YB5VLYjs.Links; exports.MemoryRouter = _chunk63YB5VLYjs.MemoryRouter; exports.Meta = _chunk63YB5VLYjs.Meta; exports.NavLink = _chunkVX4OHTGRjs.NavLink; exports.Navigate = _chunk63YB5VLYjs.Navigate; exports.NavigationType = _chunk63YB5VLYjs.Action; exports.Outlet = _chunk63YB5VLYjs.Outlet; exports.PrefetchPageLinks = _chunk63YB5VLYjs.PrefetchPageLinks; exports.Route = _chunk63YB5VLYjs.Route; exports.Router = _chunk63YB5VLYjs.Router; exports.RouterContextProvider = _chunk63YB5VLYjs.RouterContextProvider; exports.RouterProvider = _chunk63YB5VLYjs.RouterProvider; exports.Routes = _chunk63YB5VLYjs.Routes; exports.Scripts = _chunk63YB5VLYjs.Scripts; exports.ScrollRestoration = _chunkVX4OHTGRjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkVX4OHTGRjs.StaticRouter; exports.StaticRouterProvider = _chunkVX4OHTGRjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk63YB5VLYjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk63YB5VLYjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk63YB5VLYjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk63YB5VLYjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk63YB5VLYjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk63YB5VLYjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunk63YB5VLYjs.LocationContext; exports.UNSAFE_NavigationContext = _chunk63YB5VLYjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkIE722GR6js.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk63YB5VLYjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk63YB5VLYjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk63YB5VLYjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk63YB5VLYjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunk63YB5VLYjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk63YB5VLYjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk63YB5VLYjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk63YB5VLYjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk63YB5VLYjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk63YB5VLYjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunk63YB5VLYjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk63YB5VLYjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = _chunkIE722GR6js.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk63YB5VLYjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk63YB5VLYjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunk63YB5VLYjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk63YB5VLYjs.invariant; exports.UNSAFE_mapRouteProperties = _chunk63YB5VLYjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk63YB5VLYjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk63YB5VLYjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkVX4OHTGRjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunk63YB5VLYjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunk63YB5VLYjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunk63YB5VLYjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkVX4OHTGRjs.createBrowserRouter; exports.createContext = _chunk63YB5VLYjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkVX4OHTGRjs.createHashRouter; exports.createMemoryRouter = _chunk63YB5VLYjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk63YB5VLYjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunk63YB5VLYjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunk63YB5VLYjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkVX4OHTGRjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkVX4OHTGRjs.createStaticHandler; exports.createStaticRouter = _chunkVX4OHTGRjs.createStaticRouter; exports.data = _chunk63YB5VLYjs.data; exports.generatePath = _chunk63YB5VLYjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk63YB5VLYjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk63YB5VLYjs.matchPath; exports.matchRoutes = _chunk63YB5VLYjs.matchRoutes; exports.parsePath = _chunk63YB5VLYjs.parsePath; exports.redirect = _chunk63YB5VLYjs.redirect; exports.redirectDocument = _chunk63YB5VLYjs.redirectDocument; exports.renderMatches = _chunk63YB5VLYjs.renderMatches; exports.replace = _chunk63YB5VLYjs.replace; exports.resolvePath = _chunk63YB5VLYjs.resolvePath; exports.unstable_HistoryRouter = _chunkVX4OHTGRjs.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkVX4OHTGRjs.usePrompt; exports.unstable_useRoute = _chunk63YB5VLYjs.useRoute; exports.useActionData = _chunk63YB5VLYjs.useActionData; exports.useAsyncError = _chunk63YB5VLYjs.useAsyncError; exports.useAsyncValue = _chunk63YB5VLYjs.useAsyncValue; exports.useBeforeUnload = _chunkVX4OHTGRjs.useBeforeUnload; exports.useBlocker = _chunk63YB5VLYjs.useBlocker; exports.useFetcher = _chunkVX4OHTGRjs.useFetcher; exports.useFetchers = _chunkVX4OHTGRjs.useFetchers; exports.useFormAction = _chunkVX4OHTGRjs.useFormAction; exports.useHref = _chunk63YB5VLYjs.useHref; exports.useInRouterContext = _chunk63YB5VLYjs.useInRouterContext; exports.useLinkClickHandler = _chunkVX4OHTGRjs.useLinkClickHandler; exports.useLoaderData = _chunk63YB5VLYjs.useLoaderData; exports.useLocation = _chunk63YB5VLYjs.useLocation; exports.useMatch = _chunk63YB5VLYjs.useMatch; exports.useMatches = _chunk63YB5VLYjs.useMatches; exports.useNavigate = _chunk63YB5VLYjs.useNavigate; exports.useNavigation = _chunk63YB5VLYjs.useNavigation; exports.useNavigationType = _chunk63YB5VLYjs.useNavigationType; exports.useOutlet = _chunk63YB5VLYjs.useOutlet; exports.useOutletContext = _chunk63YB5VLYjs.useOutletContext; exports.useParams = _chunk63YB5VLYjs.useParams; exports.useResolvedPath = _chunk63YB5VLYjs.useResolvedPath; exports.useRevalidator = _chunk63YB5VLYjs.useRevalidator; exports.useRouteError = _chunk63YB5VLYjs.useRouteError; exports.useRouteLoaderData = _chunk63YB5VLYjs.useRouteLoaderData; exports.useRoutes = _chunk63YB5VLYjs.useRoutes; exports.useSearchParams = _chunkVX4OHTGRjs.useSearchParams; exports.useSubmit = _chunkVX4OHTGRjs.useSubmit; exports.useViewTransitionState = _chunkVX4OHTGRjs.useViewTransitionState;
|