react-router 7.9.2-pre.1 → 7.9.2-pre.2
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 +2 -0
- package/dist/development/{chunk-MVCD4EFU.js → chunk-BMRATXNU.js} +1 -1
- package/dist/development/{chunk-XCFBICS6.js → chunk-CVJRSTVH.js} +134 -134
- package/dist/development/{chunk-I4PRIPRX.mjs → chunk-IM5OGALA.mjs} +2 -2
- package/dist/development/{chunk-ITFVGECV.mjs → chunk-Z2FQBQSH.mjs} +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -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.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.js +97 -97
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-RXSRHQUT.mjs → chunk-54D6QT34.mjs} +2 -2
- package/dist/production/{chunk-4FAGWJMT.js → chunk-JZBSSDER.js} +1 -1
- package/dist/production/{chunk-MKNSEQLS.js → chunk-MZDKBHOP.js} +134 -134
- package/dist/production/{chunk-SKKC22F5.mjs → chunk-QE6DSGL5.mjs} +2 -2
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -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.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.js +97 -97
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
|
@@ -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 v7.9.2-pre.
|
|
2
|
+
* react-router v7.9.2-pre.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkCVJRSTVHjs = require('./chunk-CVJRSTVH.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -146,7 +146,7 @@ var _chunkXCFBICS6js = require('./chunk-XCFBICS6.js');
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
var
|
|
149
|
+
var _chunkBMRATXNUjs = require('./chunk-BMRATXNU.js');
|
|
150
150
|
|
|
151
151
|
// lib/dom/ssr/server.tsx
|
|
152
152
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -159,7 +159,7 @@ function ServerRouter({
|
|
|
159
159
|
url = new URL(url);
|
|
160
160
|
}
|
|
161
161
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
162
|
-
let routes =
|
|
162
|
+
let routes = _chunkBMRATXNUjs.createServerRoutes.call(void 0,
|
|
163
163
|
manifest.routes,
|
|
164
164
|
routeModules,
|
|
165
165
|
context.future,
|
|
@@ -172,7 +172,7 @@ function ServerRouter({
|
|
|
172
172
|
let routeId = match.route.id;
|
|
173
173
|
let route = routeModules[routeId];
|
|
174
174
|
let manifestRoute = context.manifest.routes[routeId];
|
|
175
|
-
if (route && manifestRoute &&
|
|
175
|
+
if (route && manifestRoute && _chunkBMRATXNUjs.shouldHydrateRouteLoader.call(void 0,
|
|
176
176
|
routeId,
|
|
177
177
|
route.clientLoader,
|
|
178
178
|
manifestRoute.hasLoader,
|
|
@@ -181,9 +181,9 @@ function ServerRouter({
|
|
|
181
181
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
let router =
|
|
184
|
+
let router = _chunkCVJRSTVHjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
185
185
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
186
|
-
|
|
186
|
+
_chunkBMRATXNUjs.FrameworkContext.Provider,
|
|
187
187
|
{
|
|
188
188
|
value: {
|
|
189
189
|
manifest,
|
|
@@ -198,8 +198,8 @@ function ServerRouter({
|
|
|
198
198
|
renderMeta: context.renderMeta
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
-
/* @__PURE__ */ React.createElement(
|
|
202
|
-
|
|
201
|
+
/* @__PURE__ */ React.createElement(_chunkBMRATXNUjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
202
|
+
_chunkCVJRSTVHjs.StaticRouterProvider,
|
|
203
203
|
{
|
|
204
204
|
router,
|
|
205
205
|
context: context.staticHandlerContext,
|
|
@@ -207,7 +207,7 @@ function ServerRouter({
|
|
|
207
207
|
}
|
|
208
208
|
))
|
|
209
209
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
210
|
-
|
|
210
|
+
_chunkBMRATXNUjs.StreamTransfer,
|
|
211
211
|
{
|
|
212
212
|
context,
|
|
213
213
|
identifier: 0,
|
|
@@ -249,18 +249,18 @@ function createRoutesStub(routes, _context) {
|
|
|
249
249
|
let patched = processRoutes(
|
|
250
250
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
251
251
|
// types compared to `AgnosticRouteObject`
|
|
252
|
-
|
|
253
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
252
|
+
_chunkBMRATXNUjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
253
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkBMRATXNUjs.RouterContextProvider)() : {},
|
|
254
254
|
frameworkContextRef.current.manifest,
|
|
255
255
|
frameworkContextRef.current.routeModules
|
|
256
256
|
);
|
|
257
|
-
routerRef.current =
|
|
257
|
+
routerRef.current = _chunkCVJRSTVHjs.createMemoryRouter.call(void 0, patched, {
|
|
258
258
|
initialEntries,
|
|
259
259
|
initialIndex,
|
|
260
260
|
hydrationData
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
return /* @__PURE__ */ React2.createElement(
|
|
263
|
+
return /* @__PURE__ */ React2.createElement(_chunkBMRATXNUjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkCVJRSTVHjs.RouterProvider, { router: routerRef.current }));
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -274,9 +274,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
274
274
|
id: route.id,
|
|
275
275
|
path: route.path,
|
|
276
276
|
index: route.index,
|
|
277
|
-
Component: route.Component ?
|
|
278
|
-
HydrateFallback: route.HydrateFallback ?
|
|
279
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
277
|
+
Component: route.Component ? _chunkCVJRSTVHjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
278
|
+
HydrateFallback: route.HydrateFallback ? _chunkCVJRSTVHjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
279
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkCVJRSTVHjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
280
280
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
281
281
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
282
282
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -311,7 +311,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
311
311
|
};
|
|
312
312
|
manifest.routes[newRoute.id] = entryRoute;
|
|
313
313
|
routeModules[route.id] = {
|
|
314
|
-
default: newRoute.Component ||
|
|
314
|
+
default: newRoute.Component || _chunkCVJRSTVHjs.Outlet,
|
|
315
315
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
316
316
|
handle: route.handle,
|
|
317
317
|
links: route.links,
|
|
@@ -506,7 +506,7 @@ function myUnescape(value) {
|
|
|
506
506
|
return result;
|
|
507
507
|
}
|
|
508
508
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
509
|
-
|
|
509
|
+
_chunkBMRATXNUjs.warnOnce.call(void 0,
|
|
510
510
|
!expires,
|
|
511
511
|
`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.`
|
|
512
512
|
);
|
|
@@ -560,7 +560,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
560
560
|
let entries = Object.entries(errors);
|
|
561
561
|
let serialized = {};
|
|
562
562
|
for (let [key, val] of entries) {
|
|
563
|
-
if (
|
|
563
|
+
if (_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, val)) {
|
|
564
564
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
565
565
|
} else if (val instanceof Error) {
|
|
566
566
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -585,7 +585,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
585
585
|
|
|
586
586
|
// lib/server-runtime/routeMatching.ts
|
|
587
587
|
function matchServerRoutes(routes, pathname, basename) {
|
|
588
|
-
let matches =
|
|
588
|
+
let matches = _chunkBMRATXNUjs.matchRoutes.call(void 0,
|
|
589
589
|
routes,
|
|
590
590
|
pathname,
|
|
591
591
|
basename
|
|
@@ -605,7 +605,7 @@ async function callRouteHandler(handler, args) {
|
|
|
605
605
|
params: args.params,
|
|
606
606
|
context: args.context
|
|
607
607
|
});
|
|
608
|
-
if (
|
|
608
|
+
if (_chunkBMRATXNUjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkBMRATXNUjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
609
609
|
throw new Response(null, result.init);
|
|
610
610
|
}
|
|
611
611
|
return result;
|
|
@@ -724,17 +724,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
724
724
|
controller.close();
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
|
-
let decoded = await
|
|
727
|
+
let decoded = await _chunkBMRATXNUjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
728
728
|
let data2 = decoded.value;
|
|
729
|
-
if (data2 &&
|
|
730
|
-
let result = data2[
|
|
729
|
+
if (data2 && _chunkBMRATXNUjs.SingleFetchRedirectSymbol in data2) {
|
|
730
|
+
let result = data2[_chunkBMRATXNUjs.SingleFetchRedirectSymbol];
|
|
731
731
|
let init = { status: result.status };
|
|
732
732
|
if (result.reload) {
|
|
733
|
-
throw
|
|
733
|
+
throw _chunkBMRATXNUjs.redirectDocument.call(void 0, result.redirect, init);
|
|
734
734
|
} else if (result.replace) {
|
|
735
|
-
throw
|
|
735
|
+
throw _chunkBMRATXNUjs.replace.call(void 0, result.redirect, init);
|
|
736
736
|
} else {
|
|
737
|
-
throw
|
|
737
|
+
throw _chunkBMRATXNUjs.redirect.call(void 0, result.redirect, init);
|
|
738
738
|
}
|
|
739
739
|
} else {
|
|
740
740
|
invariant2(
|
|
@@ -773,7 +773,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
773
773
|
|
|
774
774
|
// lib/server-runtime/serverHandoff.ts
|
|
775
775
|
function createServerHandoffString(serverHandoff) {
|
|
776
|
-
return
|
|
776
|
+
return _chunkBMRATXNUjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
777
777
|
}
|
|
778
778
|
|
|
779
779
|
// lib/server-runtime/headers.ts
|
|
@@ -850,7 +850,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
850
850
|
|
|
851
851
|
// lib/server-runtime/single-fetch.ts
|
|
852
852
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
853
|
-
...
|
|
853
|
+
..._chunkBMRATXNUjs.NO_BODY_STATUS_CODES,
|
|
854
854
|
304
|
|
855
855
|
]);
|
|
856
856
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -880,7 +880,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
880
880
|
return handleQueryError(error);
|
|
881
881
|
}
|
|
882
882
|
function handleQueryResult(result) {
|
|
883
|
-
return
|
|
883
|
+
return _chunkBMRATXNUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
884
884
|
}
|
|
885
885
|
function handleQueryError(error) {
|
|
886
886
|
handleError(error);
|
|
@@ -892,12 +892,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
892
892
|
}
|
|
893
893
|
function staticContextToResponse(context) {
|
|
894
894
|
let headers = getDocumentHeaders(context, build);
|
|
895
|
-
if (
|
|
895
|
+
if (_chunkBMRATXNUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
896
896
|
return new Response(null, { status: context.statusCode, headers });
|
|
897
897
|
}
|
|
898
898
|
if (context.errors) {
|
|
899
899
|
Object.values(context.errors).forEach((err) => {
|
|
900
|
-
if (!
|
|
900
|
+
if (!_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
901
901
|
handleError(err);
|
|
902
902
|
}
|
|
903
903
|
});
|
|
@@ -944,7 +944,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
944
944
|
return handleQueryError(error);
|
|
945
945
|
}
|
|
946
946
|
function handleQueryResult(result) {
|
|
947
|
-
return
|
|
947
|
+
return _chunkBMRATXNUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
948
948
|
}
|
|
949
949
|
function handleQueryError(error) {
|
|
950
950
|
handleError(error);
|
|
@@ -956,12 +956,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
956
956
|
}
|
|
957
957
|
function staticContextToResponse(context) {
|
|
958
958
|
let headers = getDocumentHeaders(context, build);
|
|
959
|
-
if (
|
|
959
|
+
if (_chunkBMRATXNUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
960
960
|
return new Response(null, { status: context.statusCode, headers });
|
|
961
961
|
}
|
|
962
962
|
if (context.errors) {
|
|
963
963
|
Object.values(context.errors).forEach((err) => {
|
|
964
|
-
if (!
|
|
964
|
+
if (!_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
965
965
|
handleError(err);
|
|
966
966
|
}
|
|
967
967
|
});
|
|
@@ -1025,15 +1025,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1025
1025
|
headers.delete("Location");
|
|
1026
1026
|
headers.set("Content-Type", "text/x-script");
|
|
1027
1027
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1028
|
-
result: request.method === "GET" ? { [
|
|
1028
|
+
result: request.method === "GET" ? { [_chunkBMRATXNUjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1029
1029
|
headers,
|
|
1030
|
-
status:
|
|
1030
|
+
status: _chunkBMRATXNUjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1034
1034
|
let redirect2 = headers.get("Location");
|
|
1035
1035
|
if (basename) {
|
|
1036
|
-
redirect2 =
|
|
1036
|
+
redirect2 = _chunkBMRATXNUjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1037
1037
|
}
|
|
1038
1038
|
return {
|
|
1039
1039
|
redirect: redirect2,
|
|
@@ -1059,7 +1059,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1059
1059
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1060
1060
|
);
|
|
1061
1061
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1062
|
-
return
|
|
1062
|
+
return _chunkBMRATXNUjs.encode.call(void 0, data2, {
|
|
1063
1063
|
signal: controller.signal,
|
|
1064
1064
|
plugins: [
|
|
1065
1065
|
(value) => {
|
|
@@ -1067,12 +1067,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1067
1067
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1068
1068
|
return ["SanitizedError", name, message, stack];
|
|
1069
1069
|
}
|
|
1070
|
-
if (value instanceof
|
|
1070
|
+
if (value instanceof _chunkBMRATXNUjs.ErrorResponseImpl) {
|
|
1071
1071
|
let { data: data3, status, statusText } = value;
|
|
1072
1072
|
return ["ErrorResponse", data3, status, statusText];
|
|
1073
1073
|
}
|
|
1074
|
-
if (value && typeof value === "object" &&
|
|
1075
|
-
return ["SingleFetchRedirect", value[
|
|
1074
|
+
if (value && typeof value === "object" && _chunkBMRATXNUjs.SingleFetchRedirectSymbol in value) {
|
|
1075
|
+
return ["SingleFetchRedirect", value[_chunkBMRATXNUjs.SingleFetchRedirectSymbol]];
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
],
|
|
@@ -1095,14 +1095,14 @@ function derive(build, mode) {
|
|
|
1095
1095
|
let routes = createRoutes(build.routes);
|
|
1096
1096
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1097
1097
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1098
|
-
let staticHandler =
|
|
1098
|
+
let staticHandler = _chunkBMRATXNUjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1099
1099
|
basename: build.basename
|
|
1100
1100
|
});
|
|
1101
1101
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1102
1102
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1103
1103
|
console.error(
|
|
1104
1104
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1105
|
-
|
|
1105
|
+
_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1106
1106
|
);
|
|
1107
1107
|
}
|
|
1108
1108
|
});
|
|
@@ -1148,36 +1148,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1148
1148
|
});
|
|
1149
1149
|
};
|
|
1150
1150
|
if (_build.future.v8_middleware) {
|
|
1151
|
-
if (initialContext && !(initialContext instanceof
|
|
1151
|
+
if (initialContext && !(initialContext instanceof _chunkBMRATXNUjs.RouterContextProvider)) {
|
|
1152
1152
|
let error = new Error(
|
|
1153
1153
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1154
1154
|
);
|
|
1155
1155
|
handleError(error);
|
|
1156
1156
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1157
1157
|
}
|
|
1158
|
-
loadContext = initialContext || new (0,
|
|
1158
|
+
loadContext = initialContext || new (0, _chunkBMRATXNUjs.RouterContextProvider)();
|
|
1159
1159
|
} else {
|
|
1160
1160
|
loadContext = initialContext || {};
|
|
1161
1161
|
}
|
|
1162
1162
|
let url = new URL(request.url);
|
|
1163
1163
|
let normalizedBasename = _build.basename || "/";
|
|
1164
1164
|
let normalizedPath = url.pathname;
|
|
1165
|
-
if (
|
|
1165
|
+
if (_chunkBMRATXNUjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1166
1166
|
normalizedPath = normalizedBasename;
|
|
1167
1167
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1168
1168
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1169
1169
|
}
|
|
1170
|
-
if (
|
|
1170
|
+
if (_chunkBMRATXNUjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1171
1171
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1172
1172
|
}
|
|
1173
1173
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1174
1174
|
if (!_build.ssr) {
|
|
1175
1175
|
let decodedPath = decodeURI(normalizedPath);
|
|
1176
1176
|
if (normalizedBasename !== "/") {
|
|
1177
|
-
let strippedPath =
|
|
1177
|
+
let strippedPath = _chunkBMRATXNUjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1178
1178
|
if (strippedPath == null) {
|
|
1179
1179
|
errorHandler(
|
|
1180
|
-
new (0,
|
|
1180
|
+
new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(
|
|
1181
1181
|
404,
|
|
1182
1182
|
"Not Found",
|
|
1183
1183
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1200,7 +1200,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1200
1200
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1201
1201
|
if (url.pathname.endsWith(".data")) {
|
|
1202
1202
|
errorHandler(
|
|
1203
|
-
new (0,
|
|
1203
|
+
new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(
|
|
1204
1204
|
404,
|
|
1205
1205
|
"Not Found",
|
|
1206
1206
|
`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.`
|
|
@@ -1220,7 +1220,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
let manifestUrl =
|
|
1223
|
+
let manifestUrl = _chunkBMRATXNUjs.getManifestPath.call(void 0,
|
|
1224
1224
|
_build.routeDiscovery.manifestPath,
|
|
1225
1225
|
normalizedBasename
|
|
1226
1226
|
);
|
|
@@ -1255,7 +1255,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1255
1255
|
loadContext,
|
|
1256
1256
|
handleError
|
|
1257
1257
|
);
|
|
1258
|
-
if (
|
|
1258
|
+
if (_chunkBMRATXNUjs.isRedirectResponse.call(void 0, response)) {
|
|
1259
1259
|
response = generateSingleFetchRedirectResponse(
|
|
1260
1260
|
response,
|
|
1261
1261
|
request,
|
|
@@ -1269,7 +1269,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1269
1269
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1270
1270
|
request
|
|
1271
1271
|
});
|
|
1272
|
-
if (
|
|
1272
|
+
if (_chunkBMRATXNUjs.isRedirectResponse.call(void 0, response)) {
|
|
1273
1273
|
response = generateSingleFetchRedirectResponse(
|
|
1274
1274
|
response,
|
|
1275
1275
|
request,
|
|
@@ -1388,7 +1388,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1388
1388
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1389
1389
|
try {
|
|
1390
1390
|
let innerResult = await query(request);
|
|
1391
|
-
if (!
|
|
1391
|
+
if (!_chunkBMRATXNUjs.isResponse.call(void 0, innerResult)) {
|
|
1392
1392
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1393
1393
|
}
|
|
1394
1394
|
return innerResult;
|
|
@@ -1398,7 +1398,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1398
1398
|
}
|
|
1399
1399
|
} : void 0
|
|
1400
1400
|
});
|
|
1401
|
-
if (!
|
|
1401
|
+
if (!_chunkBMRATXNUjs.isResponse.call(void 0, result)) {
|
|
1402
1402
|
result = await renderHtml(result, isSpaMode);
|
|
1403
1403
|
}
|
|
1404
1404
|
return result;
|
|
@@ -1413,7 +1413,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1413
1413
|
}
|
|
1414
1414
|
if (context.errors) {
|
|
1415
1415
|
Object.values(context.errors).forEach((err) => {
|
|
1416
|
-
if (!
|
|
1416
|
+
if (!_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1417
1417
|
handleError(err);
|
|
1418
1418
|
}
|
|
1419
1419
|
});
|
|
@@ -1465,10 +1465,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1465
1465
|
} catch (error) {
|
|
1466
1466
|
handleError(error);
|
|
1467
1467
|
let errorForSecondRender = error;
|
|
1468
|
-
if (
|
|
1468
|
+
if (_chunkBMRATXNUjs.isResponse.call(void 0, error)) {
|
|
1469
1469
|
try {
|
|
1470
1470
|
let data2 = await unwrapResponse(error);
|
|
1471
|
-
errorForSecondRender = new (0,
|
|
1471
|
+
errorForSecondRender = new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(
|
|
1472
1472
|
error.status,
|
|
1473
1473
|
error.statusText,
|
|
1474
1474
|
data2
|
|
@@ -1476,7 +1476,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1476
1476
|
} catch (e) {
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
context =
|
|
1479
|
+
context = _chunkBMRATXNUjs.getStaticContextFromError.call(void 0,
|
|
1480
1480
|
staticHandler.dataRoutes,
|
|
1481
1481
|
context,
|
|
1482
1482
|
errorForSecondRender
|
|
@@ -1535,7 +1535,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1535
1535
|
return handleQueryRouteError(error);
|
|
1536
1536
|
}
|
|
1537
1537
|
function handleQueryRouteResult(result) {
|
|
1538
|
-
if (
|
|
1538
|
+
if (_chunkBMRATXNUjs.isResponse.call(void 0, result)) {
|
|
1539
1539
|
return result;
|
|
1540
1540
|
}
|
|
1541
1541
|
if (typeof result === "string") {
|
|
@@ -1544,11 +1544,11 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1544
1544
|
return Response.json(result);
|
|
1545
1545
|
}
|
|
1546
1546
|
function handleQueryRouteError(error) {
|
|
1547
|
-
if (
|
|
1547
|
+
if (_chunkBMRATXNUjs.isResponse.call(void 0, error)) {
|
|
1548
1548
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1549
1549
|
return error;
|
|
1550
1550
|
}
|
|
1551
|
-
if (
|
|
1551
|
+
if (_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1552
1552
|
handleError(error);
|
|
1553
1553
|
return errorResponseToJson(error, serverMode);
|
|
1554
1554
|
}
|
|
@@ -1674,7 +1674,7 @@ function createSessionStorage({
|
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
1676
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1677
|
-
|
|
1677
|
+
_chunkBMRATXNUjs.warnOnce.call(void 0,
|
|
1678
1678
|
cookie.isSigned,
|
|
1679
1679
|
`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.`
|
|
1680
1680
|
);
|
|
@@ -1781,12 +1781,12 @@ function getHydrationData({
|
|
|
1781
1781
|
...state,
|
|
1782
1782
|
loaderData: { ...state.loaderData }
|
|
1783
1783
|
};
|
|
1784
|
-
let initialMatches =
|
|
1784
|
+
let initialMatches = _chunkBMRATXNUjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1785
1785
|
if (initialMatches) {
|
|
1786
1786
|
for (let match of initialMatches) {
|
|
1787
1787
|
let routeId = match.route.id;
|
|
1788
1788
|
let routeInfo = getRouteInfo(routeId);
|
|
1789
|
-
if (
|
|
1789
|
+
if (_chunkBMRATXNUjs.shouldHydrateRouteLoader.call(void 0,
|
|
1790
1790
|
routeId,
|
|
1791
1791
|
routeInfo.clientLoader,
|
|
1792
1792
|
routeInfo.hasLoader,
|
|
@@ -1864,7 +1864,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
1866
|
);
|
|
1867
|
-
if (
|
|
1867
|
+
if (_chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1868
1868
|
return /* @__PURE__ */ React.default.createElement(
|
|
1869
1869
|
ErrorWrapper,
|
|
1870
1870
|
{
|
|
@@ -1872,7 +1872,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1872
1872
|
title: "Unhandled Thrown Response!"
|
|
1873
1873
|
},
|
|
1874
1874
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1875
|
-
|
|
1875
|
+
_chunkBMRATXNUjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1876
1876
|
);
|
|
1877
1877
|
}
|
|
1878
1878
|
let errorInstance;
|
|
@@ -1898,7 +1898,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1898
1898
|
function RSCDefaultRootErrorBoundary({
|
|
1899
1899
|
hasRootLayout
|
|
1900
1900
|
}) {
|
|
1901
|
-
let error =
|
|
1901
|
+
let error = _chunkBMRATXNUjs.useRouteError.call(void 0, );
|
|
1902
1902
|
if (hasRootLayout === void 0) {
|
|
1903
1903
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1904
1904
|
}
|
|
@@ -2046,7 +2046,7 @@ function createRouterFromPayload({
|
|
|
2046
2046
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2047
2047
|
let patches = /* @__PURE__ */ new Map();
|
|
2048
2048
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2049
|
-
|
|
2049
|
+
_chunkBMRATXNUjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2050
2050
|
if (!patches.has(patch.parentId)) {
|
|
2051
2051
|
patches.set(patch.parentId, []);
|
|
2052
2052
|
}
|
|
@@ -2068,11 +2068,11 @@ function createRouterFromPayload({
|
|
|
2068
2068
|
}
|
|
2069
2069
|
return [route];
|
|
2070
2070
|
}, []);
|
|
2071
|
-
globalVar.__reactRouterDataRouter =
|
|
2071
|
+
globalVar.__reactRouterDataRouter = _chunkBMRATXNUjs.createRouter.call(void 0, {
|
|
2072
2072
|
routes,
|
|
2073
2073
|
getContext,
|
|
2074
2074
|
basename: payload.basename,
|
|
2075
|
-
history:
|
|
2075
|
+
history: _chunkBMRATXNUjs.createBrowserHistory.call(void 0, ),
|
|
2076
2076
|
hydrationData: getHydrationData({
|
|
2077
2077
|
state: {
|
|
2078
2078
|
loaderData: payload.loaderData,
|
|
@@ -2082,7 +2082,7 @@ function createRouterFromPayload({
|
|
|
2082
2082
|
routes,
|
|
2083
2083
|
getRouteInfo: (routeId) => {
|
|
2084
2084
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2085
|
-
|
|
2085
|
+
_chunkBMRATXNUjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2086
2086
|
return {
|
|
2087
2087
|
clientLoader: match.clientLoader,
|
|
2088
2088
|
hasLoader: match.hasLoader,
|
|
@@ -2180,9 +2180,9 @@ function createRouterFromPayload({
|
|
|
2180
2180
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2181
2181
|
};
|
|
2182
2182
|
}
|
|
2183
|
-
var renderedRoutesContext =
|
|
2183
|
+
var renderedRoutesContext = _chunkBMRATXNUjs.createContext.call(void 0, );
|
|
2184
2184
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2185
|
-
let dataStrategy =
|
|
2185
|
+
let dataStrategy = _chunkBMRATXNUjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2186
2186
|
getRouter,
|
|
2187
2187
|
(match) => {
|
|
2188
2188
|
let M = match;
|
|
@@ -2236,20 +2236,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2236
2236
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2237
2237
|
return async (args, basename, targetRoutes) => {
|
|
2238
2238
|
let { request, context } = args;
|
|
2239
|
-
let url =
|
|
2239
|
+
let url = _chunkBMRATXNUjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2240
2240
|
if (request.method === "GET") {
|
|
2241
|
-
url =
|
|
2241
|
+
url = _chunkBMRATXNUjs.stripIndexParam.call(void 0, url);
|
|
2242
2242
|
if (targetRoutes) {
|
|
2243
2243
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2244
2244
|
}
|
|
2245
2245
|
}
|
|
2246
2246
|
let res = await fetchImplementation(
|
|
2247
|
-
new Request(url, await
|
|
2247
|
+
new Request(url, await _chunkBMRATXNUjs.createRequestInit.call(void 0, request))
|
|
2248
2248
|
);
|
|
2249
2249
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2250
|
-
throw new (0,
|
|
2250
|
+
throw new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(404, "Not Found", true);
|
|
2251
2251
|
}
|
|
2252
|
-
|
|
2252
|
+
_chunkBMRATXNUjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2253
2253
|
try {
|
|
2254
2254
|
const payload = await createFromReadableStream(res.body, {
|
|
2255
2255
|
temporaryReferences: void 0
|
|
@@ -2273,7 +2273,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2273
2273
|
}
|
|
2274
2274
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2275
2275
|
let results = { routes: {} };
|
|
2276
|
-
const dataKey =
|
|
2276
|
+
const dataKey = _chunkBMRATXNUjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2277
2277
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2278
2278
|
results.routes[routeId] = { data: data2 };
|
|
2279
2279
|
}
|
|
@@ -2306,7 +2306,7 @@ function RSCHydratedRouter({
|
|
|
2306
2306
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2307
2307
|
);
|
|
2308
2308
|
React4.useEffect(() => {
|
|
2309
|
-
|
|
2309
|
+
_chunkBMRATXNUjs.setIsHydrated.call(void 0, );
|
|
2310
2310
|
}, []);
|
|
2311
2311
|
React4.useLayoutEffect(() => {
|
|
2312
2312
|
const globalVar = window;
|
|
@@ -2393,7 +2393,7 @@ function RSCHydratedRouter({
|
|
|
2393
2393
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2394
2394
|
routeModules
|
|
2395
2395
|
};
|
|
2396
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2396
|
+
return /* @__PURE__ */ React4.createElement(_chunkBMRATXNUjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkBMRATXNUjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkCVJRSTVHjs.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2397
2397
|
}
|
|
2398
2398
|
function createRouteFromServerManifest(match, payload) {
|
|
2399
2399
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2404,7 +2404,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2404
2404
|
// the server loader flow regardless of whether the client loader calls
|
|
2405
2405
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2406
2406
|
match.hasComponent && !match.element;
|
|
2407
|
-
|
|
2407
|
+
_chunkBMRATXNUjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2408
2408
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2409
2409
|
let dataRoute = {
|
|
2410
2410
|
id: match.id,
|
|
@@ -2455,7 +2455,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2455
2455
|
return await callSingleFetch(singleFetch);
|
|
2456
2456
|
}
|
|
2457
2457
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2458
|
-
throw
|
|
2458
|
+
throw _chunkBMRATXNUjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2459
2459
|
},
|
|
2460
2460
|
path: match.path,
|
|
2461
2461
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2468,7 +2468,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2468
2468
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2469
2469
|
};
|
|
2470
2470
|
if (typeof dataRoute.loader === "function") {
|
|
2471
|
-
dataRoute.loader.hydrate =
|
|
2471
|
+
dataRoute.loader.hydrate = _chunkBMRATXNUjs.shouldHydrateRouteLoader.call(void 0,
|
|
2472
2472
|
match.id,
|
|
2473
2473
|
match.clientLoader,
|
|
2474
2474
|
match.hasLoader,
|
|
@@ -2478,7 +2478,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2478
2478
|
return dataRoute;
|
|
2479
2479
|
}
|
|
2480
2480
|
function callSingleFetch(singleFetch) {
|
|
2481
|
-
|
|
2481
|
+
_chunkBMRATXNUjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2482
2482
|
return singleFetch();
|
|
2483
2483
|
}
|
|
2484
2484
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2486,7 +2486,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2486
2486
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2487
2487
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2488
2488
|
console.error(msg);
|
|
2489
|
-
throw new (0,
|
|
2489
|
+
throw new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2490
2490
|
}
|
|
2491
2491
|
}
|
|
2492
2492
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2730,7 +2730,7 @@ async function routeRSCServerRequest({
|
|
|
2730
2730
|
const payload = await createFromReadableStream(
|
|
2731
2731
|
detectRedirectResponse.body
|
|
2732
2732
|
);
|
|
2733
|
-
if (serverResponse.status ===
|
|
2733
|
+
if (serverResponse.status === _chunkBMRATXNUjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2734
2734
|
const headers2 = new Headers(serverResponse.headers);
|
|
2735
2735
|
headers2.delete("Content-Encoding");
|
|
2736
2736
|
headers2.delete("Content-Length");
|
|
@@ -2765,7 +2765,7 @@ async function routeRSCServerRequest({
|
|
|
2765
2765
|
return reason;
|
|
2766
2766
|
}
|
|
2767
2767
|
try {
|
|
2768
|
-
const status =
|
|
2768
|
+
const status = _chunkBMRATXNUjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2769
2769
|
const html = await renderHTML(() => {
|
|
2770
2770
|
const decoded = Promise.resolve(
|
|
2771
2771
|
createFromReadableStream(createStream())
|
|
@@ -2831,7 +2831,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2831
2831
|
if (payload.type !== "render") return null;
|
|
2832
2832
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2833
2833
|
for (const match of payload.matches) {
|
|
2834
|
-
if (
|
|
2834
|
+
if (_chunkBMRATXNUjs.shouldHydrateRouteLoader.call(void 0,
|
|
2835
2835
|
match.id,
|
|
2836
2836
|
match.clientLoader,
|
|
2837
2837
|
match.hasLoader,
|
|
@@ -2871,7 +2871,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2871
2871
|
}
|
|
2872
2872
|
}))
|
|
2873
2873
|
};
|
|
2874
|
-
const router =
|
|
2874
|
+
const router = _chunkCVJRSTVHjs.createStaticRouter.call(void 0,
|
|
2875
2875
|
payload.matches.reduceRight((previous, match) => {
|
|
2876
2876
|
const route = {
|
|
2877
2877
|
id: match.id,
|
|
@@ -2915,8 +2915,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2915
2915
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2916
2916
|
routeModules: createRSCRouteModules(payload)
|
|
2917
2917
|
};
|
|
2918
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2919
|
-
|
|
2918
|
+
return /* @__PURE__ */ React5.createElement(_chunkBMRATXNUjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkBMRATXNUjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2919
|
+
_chunkCVJRSTVHjs.StaticRouterProvider,
|
|
2920
2920
|
{
|
|
2921
2921
|
context,
|
|
2922
2922
|
router,
|
|
@@ -2974,7 +2974,7 @@ function deserializeErrors(errors) {
|
|
|
2974
2974
|
let serialized = {};
|
|
2975
2975
|
for (let [key, val] of entries) {
|
|
2976
2976
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2977
|
-
serialized[key] = new (0,
|
|
2977
|
+
serialized[key] = new (0, _chunkBMRATXNUjs.ErrorResponseImpl)(
|
|
2978
2978
|
val.status,
|
|
2979
2979
|
val.statusText,
|
|
2980
2980
|
val.data,
|
|
@@ -3133,4 +3133,4 @@ function deserializeErrors(errors) {
|
|
|
3133
3133
|
|
|
3134
3134
|
|
|
3135
3135
|
|
|
3136
|
-
exports.Await =
|
|
3136
|
+
exports.Await = _chunkCVJRSTVHjs.Await; exports.BrowserRouter = _chunkCVJRSTVHjs.BrowserRouter; exports.Form = _chunkCVJRSTVHjs.Form; exports.HashRouter = _chunkCVJRSTVHjs.HashRouter; exports.IDLE_BLOCKER = _chunkBMRATXNUjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkBMRATXNUjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkBMRATXNUjs.IDLE_NAVIGATION; exports.Link = _chunkCVJRSTVHjs.Link; exports.Links = _chunkBMRATXNUjs.Links; exports.MemoryRouter = _chunkCVJRSTVHjs.MemoryRouter; exports.Meta = _chunkBMRATXNUjs.Meta; exports.NavLink = _chunkCVJRSTVHjs.NavLink; exports.Navigate = _chunkCVJRSTVHjs.Navigate; exports.NavigationType = _chunkBMRATXNUjs.Action; exports.Outlet = _chunkCVJRSTVHjs.Outlet; exports.PrefetchPageLinks = _chunkBMRATXNUjs.PrefetchPageLinks; exports.Route = _chunkCVJRSTVHjs.Route; exports.Router = _chunkCVJRSTVHjs.Router; exports.RouterContextProvider = _chunkBMRATXNUjs.RouterContextProvider; exports.RouterProvider = _chunkCVJRSTVHjs.RouterProvider; exports.Routes = _chunkCVJRSTVHjs.Routes; exports.Scripts = _chunkBMRATXNUjs.Scripts; exports.ScrollRestoration = _chunkCVJRSTVHjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkCVJRSTVHjs.StaticRouter; exports.StaticRouterProvider = _chunkCVJRSTVHjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkBMRATXNUjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkBMRATXNUjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkBMRATXNUjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkBMRATXNUjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkBMRATXNUjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkBMRATXNUjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkBMRATXNUjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkBMRATXNUjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkBMRATXNUjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkBMRATXNUjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkBMRATXNUjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkBMRATXNUjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkCVJRSTVHjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkCVJRSTVHjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkCVJRSTVHjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkBMRATXNUjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkBMRATXNUjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkBMRATXNUjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkBMRATXNUjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkBMRATXNUjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkBMRATXNUjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkBMRATXNUjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkCVJRSTVHjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkBMRATXNUjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkCVJRSTVHjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkBMRATXNUjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkBMRATXNUjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkCVJRSTVHjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkCVJRSTVHjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkCVJRSTVHjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkCVJRSTVHjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkCVJRSTVHjs.createBrowserRouter; exports.createContext = _chunkBMRATXNUjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkCVJRSTVHjs.createHashRouter; exports.createMemoryRouter = _chunkCVJRSTVHjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkBMRATXNUjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkCVJRSTVHjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkCVJRSTVHjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkCVJRSTVHjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkCVJRSTVHjs.createStaticHandler; exports.createStaticRouter = _chunkCVJRSTVHjs.createStaticRouter; exports.data = _chunkBMRATXNUjs.data; exports.generatePath = _chunkBMRATXNUjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkBMRATXNUjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkBMRATXNUjs.matchPath; exports.matchRoutes = _chunkBMRATXNUjs.matchRoutes; exports.parsePath = _chunkBMRATXNUjs.parsePath; exports.redirect = _chunkBMRATXNUjs.redirect; exports.redirectDocument = _chunkBMRATXNUjs.redirectDocument; exports.renderMatches = _chunkCVJRSTVHjs.renderMatches; exports.replace = _chunkBMRATXNUjs.replace; exports.resolvePath = _chunkBMRATXNUjs.resolvePath; exports.unstable_HistoryRouter = _chunkCVJRSTVHjs.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 = _chunkCVJRSTVHjs.usePrompt; exports.useActionData = _chunkBMRATXNUjs.useActionData; exports.useAsyncError = _chunkBMRATXNUjs.useAsyncError; exports.useAsyncValue = _chunkBMRATXNUjs.useAsyncValue; exports.useBeforeUnload = _chunkCVJRSTVHjs.useBeforeUnload; exports.useBlocker = _chunkBMRATXNUjs.useBlocker; exports.useFetcher = _chunkCVJRSTVHjs.useFetcher; exports.useFetchers = _chunkCVJRSTVHjs.useFetchers; exports.useFormAction = _chunkCVJRSTVHjs.useFormAction; exports.useHref = _chunkBMRATXNUjs.useHref; exports.useInRouterContext = _chunkBMRATXNUjs.useInRouterContext; exports.useLinkClickHandler = _chunkCVJRSTVHjs.useLinkClickHandler; exports.useLoaderData = _chunkBMRATXNUjs.useLoaderData; exports.useLocation = _chunkBMRATXNUjs.useLocation; exports.useMatch = _chunkBMRATXNUjs.useMatch; exports.useMatches = _chunkBMRATXNUjs.useMatches; exports.useNavigate = _chunkBMRATXNUjs.useNavigate; exports.useNavigation = _chunkBMRATXNUjs.useNavigation; exports.useNavigationType = _chunkBMRATXNUjs.useNavigationType; exports.useOutlet = _chunkBMRATXNUjs.useOutlet; exports.useOutletContext = _chunkBMRATXNUjs.useOutletContext; exports.useParams = _chunkBMRATXNUjs.useParams; exports.useResolvedPath = _chunkBMRATXNUjs.useResolvedPath; exports.useRevalidator = _chunkBMRATXNUjs.useRevalidator; exports.useRouteError = _chunkBMRATXNUjs.useRouteError; exports.useRouteLoaderData = _chunkBMRATXNUjs.useRouteLoaderData; exports.useRoutes = _chunkBMRATXNUjs.useRoutes; exports.useSearchParams = _chunkCVJRSTVHjs.useSearchParams; exports.useSubmit = _chunkCVJRSTVHjs.useSubmit; exports.useViewTransitionState = _chunkCVJRSTVHjs.useViewTransitionState;
|