react-router 7.18.4 → 7.18.5
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 +7 -0
- package/dist/development/{browser-eq4RgLsD.d.ts → browser-7x6a6gQP.d.ts} +1 -1
- package/dist/development/{browser-BR5QG7ZC.d.mts → browser-CiGxXXOl.d.mts} +1 -1
- package/dist/development/{chunk-GR4NQCSD.js → chunk-2ZBLYC7V.js} +30 -3
- package/dist/development/{chunk-OB3PAWPO.mjs → chunk-6KYCQHYJ.mjs} +30 -3
- package/dist/development/{chunk-LVPI3KDG.js → chunk-IFHLIXZW.js} +7 -7
- package/dist/{production/chunk-G2MPF4YY.mjs → development/chunk-JAHXRPFV.mjs} +13 -4
- package/dist/development/{chunk-HQO5H5CC.js → chunk-NDF5KBLP.js} +103 -103
- package/dist/{production/context-nqAapj74.d.mts → development/context-BlYKn1tE.d.mts} +2 -0
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +34 -34
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-BjY-eKuf.d.ts → index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/development/{index-react-server-client-K63fpMH4.d.mts → index-react-server-client-KK-TR-t7.d.mts} +1 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- 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 +2 -0
- package/dist/development/index-react-server.d.ts +2 -0
- package/dist/development/index-react-server.js +38 -15
- package/dist/development/index-react-server.mjs +38 -15
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +101 -92
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-B7w3_Eo9.d.ts → development/instrumentation-CPkMwccd.d.ts} +2 -0
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{browser-eq4RgLsD.d.ts → browser-7x6a6gQP.d.ts} +1 -1
- package/dist/production/{browser-BR5QG7ZC.d.mts → browser-CiGxXXOl.d.mts} +1 -1
- package/dist/production/{chunk-AOOKMWND.js → chunk-75HN637G.js} +103 -103
- package/dist/production/{chunk-Q34X6AWR.mjs → chunk-7RTFRKQW.mjs} +30 -3
- package/dist/production/{chunk-YNGRUB6F.js → chunk-HNBICOIU.js} +30 -3
- package/dist/{development/chunk-H4DAEOV7.mjs → production/chunk-IAM5GYT3.mjs} +13 -4
- package/dist/production/{chunk-QURBR4FZ.js → chunk-K3NA4NUH.js} +7 -7
- package/dist/{development/context-nqAapj74.d.mts → production/context-BlYKn1tE.d.mts} +2 -0
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +34 -34
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-BjY-eKuf.d.ts → index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/production/{index-react-server-client-K63fpMH4.d.mts → index-react-server-client-KK-TR-t7.d.mts} +1 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- 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 +2 -0
- package/dist/production/index-react-server.d.ts +2 -0
- package/dist/production/index-react-server.js +38 -15
- package/dist/production/index-react-server.mjs +38 -15
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +101 -92
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-B7w3_Eo9.d.ts → production/instrumentation-CPkMwccd.d.ts} +2 -0
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
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 v7.18.
|
|
2
|
+
* react-router v7.18.5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkK3NA4NUHjs = require('./chunk-K3NA4NUH.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ var _chunkQURBR4FZjs = require('./chunk-QURBR4FZ.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunk75HN637Gjs = require('./chunk-75HN637G.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -155,7 +155,9 @@ var _chunkAOOKMWNDjs = require('./chunk-AOOKMWND.js');
|
|
|
155
155
|
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var _chunkHNBICOIUjs = require('./chunk-HNBICOIU.js');
|
|
159
161
|
|
|
160
162
|
// lib/dom/ssr/server.tsx
|
|
161
163
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -168,7 +170,7 @@ function ServerRouter({
|
|
|
168
170
|
url = new URL(url);
|
|
169
171
|
}
|
|
170
172
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
171
|
-
let routes =
|
|
173
|
+
let routes = _chunkHNBICOIUjs.createServerRoutes.call(void 0,
|
|
172
174
|
manifest.routes,
|
|
173
175
|
routeModules,
|
|
174
176
|
context.future,
|
|
@@ -181,7 +183,7 @@ function ServerRouter({
|
|
|
181
183
|
let routeId = match.route.id;
|
|
182
184
|
let route = routeModules[routeId];
|
|
183
185
|
let manifestRoute = context.manifest.routes[routeId];
|
|
184
|
-
if (route && manifestRoute &&
|
|
186
|
+
if (route && manifestRoute && _chunkHNBICOIUjs.shouldHydrateRouteLoader.call(void 0,
|
|
185
187
|
routeId,
|
|
186
188
|
route.clientLoader,
|
|
187
189
|
manifestRoute.hasLoader,
|
|
@@ -190,11 +192,11 @@ function ServerRouter({
|
|
|
190
192
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
|
-
let router =
|
|
195
|
+
let router = _chunk75HN637Gjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext, {
|
|
194
196
|
branches: context.branches
|
|
195
197
|
});
|
|
196
198
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
197
|
-
|
|
199
|
+
_chunkHNBICOIUjs.FrameworkContext.Provider,
|
|
198
200
|
{
|
|
199
201
|
value: {
|
|
200
202
|
manifest,
|
|
@@ -210,8 +212,8 @@ function ServerRouter({
|
|
|
210
212
|
renderMeta: context.renderMeta
|
|
211
213
|
}
|
|
212
214
|
},
|
|
213
|
-
/* @__PURE__ */ React.createElement(
|
|
214
|
-
|
|
215
|
+
/* @__PURE__ */ React.createElement(_chunkHNBICOIUjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
216
|
+
_chunk75HN637Gjs.StaticRouterProvider,
|
|
215
217
|
{
|
|
216
218
|
router,
|
|
217
219
|
context: context.staticHandlerContext,
|
|
@@ -219,7 +221,7 @@ function ServerRouter({
|
|
|
219
221
|
}
|
|
220
222
|
))
|
|
221
223
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
222
|
-
|
|
224
|
+
_chunkHNBICOIUjs.StreamTransfer,
|
|
223
225
|
{
|
|
224
226
|
context,
|
|
225
227
|
identifier: 0,
|
|
@@ -262,18 +264,18 @@ function createRoutesStub(routes, _context) {
|
|
|
262
264
|
let patched = processRoutes(
|
|
263
265
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
264
266
|
// types compared to `RouteObject`
|
|
265
|
-
|
|
266
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0,
|
|
267
|
+
_chunkHNBICOIUjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
268
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0, _chunkHNBICOIUjs.RouterContextProvider)() : {},
|
|
267
269
|
frameworkContextRef.current.manifest,
|
|
268
270
|
frameworkContextRef.current.routeModules
|
|
269
271
|
);
|
|
270
|
-
routerRef.current =
|
|
272
|
+
routerRef.current = _chunkHNBICOIUjs.createMemoryRouter.call(void 0, patched, {
|
|
271
273
|
initialEntries,
|
|
272
274
|
initialIndex,
|
|
273
275
|
hydrationData
|
|
274
276
|
});
|
|
275
277
|
}
|
|
276
|
-
return /* @__PURE__ */ React2.createElement(
|
|
278
|
+
return /* @__PURE__ */ React2.createElement(_chunkHNBICOIUjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkHNBICOIUjs.RouterProvider, { router: routerRef.current }));
|
|
277
279
|
};
|
|
278
280
|
}
|
|
279
281
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -287,9 +289,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
287
289
|
id: route.id,
|
|
288
290
|
path: route.path,
|
|
289
291
|
index: route.index,
|
|
290
|
-
Component: route.Component ?
|
|
291
|
-
HydrateFallback: route.HydrateFallback ?
|
|
292
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
292
|
+
Component: route.Component ? _chunkHNBICOIUjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
293
|
+
HydrateFallback: route.HydrateFallback ? _chunkHNBICOIUjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
294
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkHNBICOIUjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
293
295
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
294
296
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
295
297
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -324,7 +326,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
324
326
|
};
|
|
325
327
|
manifest.routes[newRoute.id] = entryRoute;
|
|
326
328
|
routeModules[route.id] = {
|
|
327
|
-
default: newRoute.Component ||
|
|
329
|
+
default: newRoute.Component || _chunkHNBICOIUjs.Outlet,
|
|
328
330
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
329
331
|
handle: route.handle,
|
|
330
332
|
links: route.links,
|
|
@@ -519,7 +521,7 @@ function myUnescape(value) {
|
|
|
519
521
|
return result;
|
|
520
522
|
}
|
|
521
523
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
522
|
-
|
|
524
|
+
_chunkHNBICOIUjs.warnOnce.call(void 0,
|
|
523
525
|
!expires,
|
|
524
526
|
`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.`
|
|
525
527
|
);
|
|
@@ -581,7 +583,7 @@ function invariant2(value, message) {
|
|
|
581
583
|
|
|
582
584
|
// lib/server-runtime/routeMatching.ts
|
|
583
585
|
function matchServerRoutes(manifest, dataRoutes, branches, pathname, basename) {
|
|
584
|
-
let matches =
|
|
586
|
+
let matches = _chunkHNBICOIUjs.matchRoutesImpl.call(void 0,
|
|
585
587
|
dataRoutes,
|
|
586
588
|
pathname,
|
|
587
589
|
_nullishCoalesce(basename, () => ( "/")),
|
|
@@ -612,7 +614,7 @@ async function callRouteHandler(handler, args, future) {
|
|
|
612
614
|
context: args.context,
|
|
613
615
|
pattern: args.pattern
|
|
614
616
|
});
|
|
615
|
-
if (
|
|
617
|
+
if (_chunkHNBICOIUjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
616
618
|
throw new Response(null, result.init);
|
|
617
619
|
}
|
|
618
620
|
return result;
|
|
@@ -715,17 +717,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
715
717
|
controller.close();
|
|
716
718
|
}
|
|
717
719
|
});
|
|
718
|
-
let decoded = await
|
|
720
|
+
let decoded = await _chunkHNBICOIUjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
719
721
|
let data2 = decoded.value;
|
|
720
|
-
if (data2 &&
|
|
721
|
-
let result = data2[
|
|
722
|
+
if (data2 && _chunkHNBICOIUjs.SingleFetchRedirectSymbol in data2) {
|
|
723
|
+
let result = data2[_chunkHNBICOIUjs.SingleFetchRedirectSymbol];
|
|
722
724
|
let init = { status: result.status };
|
|
723
725
|
if (result.reload) {
|
|
724
|
-
throw
|
|
726
|
+
throw _chunkHNBICOIUjs.redirectDocument.call(void 0, result.redirect, init);
|
|
725
727
|
} else if (result.replace) {
|
|
726
|
-
throw
|
|
728
|
+
throw _chunkHNBICOIUjs.replace.call(void 0, result.redirect, init);
|
|
727
729
|
} else {
|
|
728
|
-
throw
|
|
730
|
+
throw _chunkHNBICOIUjs.redirect.call(void 0, result.redirect, init);
|
|
729
731
|
}
|
|
730
732
|
} else {
|
|
731
733
|
invariant2(
|
|
@@ -768,7 +770,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
768
770
|
|
|
769
771
|
// lib/server-runtime/serverHandoff.ts
|
|
770
772
|
function createServerHandoffString(serverHandoff) {
|
|
771
|
-
return
|
|
773
|
+
return _chunkHNBICOIUjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
772
774
|
}
|
|
773
775
|
|
|
774
776
|
// lib/server-runtime/headers.ts
|
|
@@ -927,12 +929,12 @@ function getNormalizedPath(request, basename, future) {
|
|
|
927
929
|
pathname = pathname.replace(/\.data$/, "");
|
|
928
930
|
}
|
|
929
931
|
} else {
|
|
930
|
-
if (
|
|
932
|
+
if (_chunkHNBICOIUjs.stripBasename.call(void 0, pathname, basename) === "/_root.data") {
|
|
931
933
|
pathname = basename;
|
|
932
934
|
} else if (pathname.endsWith(".data")) {
|
|
933
935
|
pathname = pathname.replace(/\.data$/, "");
|
|
934
936
|
}
|
|
935
|
-
if (
|
|
937
|
+
if (_chunkHNBICOIUjs.stripBasename.call(void 0, pathname, basename) !== "/" && pathname.endsWith("/")) {
|
|
936
938
|
pathname = pathname.slice(0, -1);
|
|
937
939
|
}
|
|
938
940
|
}
|
|
@@ -952,7 +954,7 @@ function getNormalizedPath(request, basename, future) {
|
|
|
952
954
|
|
|
953
955
|
// lib/server-runtime/single-fetch.ts
|
|
954
956
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
955
|
-
...
|
|
957
|
+
..._chunkHNBICOIUjs.NO_BODY_STATUS_CODES,
|
|
956
958
|
304
|
|
957
959
|
]);
|
|
958
960
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -991,7 +993,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
991
993
|
return handleQueryError(error);
|
|
992
994
|
}
|
|
993
995
|
function handleQueryResult(result) {
|
|
994
|
-
return
|
|
996
|
+
return _chunkHNBICOIUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
995
997
|
}
|
|
996
998
|
function handleQueryError(error, status = 500) {
|
|
997
999
|
handleError(error);
|
|
@@ -1003,12 +1005,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
1003
1005
|
}
|
|
1004
1006
|
function staticContextToResponse(context) {
|
|
1005
1007
|
let headers = getDocumentHeaders(context, build);
|
|
1006
|
-
if (
|
|
1008
|
+
if (_chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1007
1009
|
return new Response(null, { status: context.statusCode, headers });
|
|
1008
1010
|
}
|
|
1009
1011
|
if (context.errors) {
|
|
1010
1012
|
Object.values(context.errors).forEach((err) => {
|
|
1011
|
-
if (!
|
|
1013
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1012
1014
|
handleError(err);
|
|
1013
1015
|
}
|
|
1014
1016
|
});
|
|
@@ -1056,7 +1058,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1056
1058
|
return handleQueryError(error);
|
|
1057
1059
|
}
|
|
1058
1060
|
function handleQueryResult(result) {
|
|
1059
|
-
return
|
|
1061
|
+
return _chunkHNBICOIUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
1060
1062
|
}
|
|
1061
1063
|
function handleQueryError(error) {
|
|
1062
1064
|
handleError(error);
|
|
@@ -1068,12 +1070,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1068
1070
|
}
|
|
1069
1071
|
function staticContextToResponse(context) {
|
|
1070
1072
|
let headers = getDocumentHeaders(context, build);
|
|
1071
|
-
if (
|
|
1073
|
+
if (_chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1072
1074
|
return new Response(null, { status: context.statusCode, headers });
|
|
1073
1075
|
}
|
|
1074
1076
|
if (context.errors) {
|
|
1075
1077
|
Object.values(context.errors).forEach((err) => {
|
|
1076
|
-
if (!
|
|
1078
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1077
1079
|
handleError(err);
|
|
1078
1080
|
}
|
|
1079
1081
|
});
|
|
@@ -1137,15 +1139,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1137
1139
|
headers.delete("Location");
|
|
1138
1140
|
headers.set("Content-Type", "text/x-script");
|
|
1139
1141
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1140
|
-
result: request.method === "GET" ? { [
|
|
1142
|
+
result: request.method === "GET" ? { [_chunkHNBICOIUjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1141
1143
|
headers,
|
|
1142
|
-
status:
|
|
1144
|
+
status: _chunkHNBICOIUjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1143
1145
|
});
|
|
1144
1146
|
}
|
|
1145
1147
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1146
1148
|
let redirect2 = headers.get("Location");
|
|
1147
1149
|
if (basename) {
|
|
1148
|
-
redirect2 =
|
|
1150
|
+
redirect2 = _chunkHNBICOIUjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1149
1151
|
}
|
|
1150
1152
|
return {
|
|
1151
1153
|
redirect: redirect2,
|
|
@@ -1182,7 +1184,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1182
1184
|
clearTimeout(timeoutId);
|
|
1183
1185
|
requestSignal.removeEventListener("abort", abortControllerOnRequestAbort);
|
|
1184
1186
|
};
|
|
1185
|
-
return
|
|
1187
|
+
return _chunkHNBICOIUjs.encode.call(void 0, data2, {
|
|
1186
1188
|
signal: controller.signal,
|
|
1187
1189
|
onComplete: cleanupCallbacks,
|
|
1188
1190
|
plugins: [
|
|
@@ -1191,12 +1193,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1191
1193
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1192
1194
|
return ["SanitizedError", name, message, stack];
|
|
1193
1195
|
}
|
|
1194
|
-
if (value instanceof
|
|
1196
|
+
if (value instanceof _chunkHNBICOIUjs.ErrorResponseImpl) {
|
|
1195
1197
|
let { data: data3, status, statusText } = value;
|
|
1196
1198
|
return ["ErrorResponse", data3, status, statusText];
|
|
1197
1199
|
}
|
|
1198
|
-
if (value && typeof value === "object" &&
|
|
1199
|
-
return ["SingleFetchRedirect", value[
|
|
1200
|
+
if (value && typeof value === "object" && _chunkHNBICOIUjs.SingleFetchRedirectSymbol in value) {
|
|
1201
|
+
return ["SingleFetchRedirect", value[_chunkHNBICOIUjs.SingleFetchRedirectSymbol]];
|
|
1200
1202
|
}
|
|
1201
1203
|
}
|
|
1202
1204
|
],
|
|
@@ -1218,7 +1220,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1218
1220
|
function derive(build, mode) {
|
|
1219
1221
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1220
1222
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1221
|
-
let staticHandler =
|
|
1223
|
+
let staticHandler = _chunkHNBICOIUjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1222
1224
|
basename: build.basename,
|
|
1223
1225
|
instrumentations: build.entry.module.instrumentations,
|
|
1224
1226
|
future: build.future
|
|
@@ -1227,7 +1229,7 @@ function derive(build, mode) {
|
|
|
1227
1229
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1228
1230
|
console.error(
|
|
1229
1231
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1230
|
-
|
|
1232
|
+
_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1231
1233
|
);
|
|
1232
1234
|
}
|
|
1233
1235
|
});
|
|
@@ -1245,14 +1247,14 @@ function derive(build, mode) {
|
|
|
1245
1247
|
});
|
|
1246
1248
|
};
|
|
1247
1249
|
if (build.future.v8_middleware) {
|
|
1248
|
-
if (initialContext && !(initialContext instanceof
|
|
1250
|
+
if (initialContext && !(initialContext instanceof _chunkHNBICOIUjs.RouterContextProvider)) {
|
|
1249
1251
|
let error = new Error(
|
|
1250
1252
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1251
1253
|
);
|
|
1252
1254
|
handleError(error);
|
|
1253
1255
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1254
1256
|
}
|
|
1255
|
-
loadContext = initialContext || new (0,
|
|
1257
|
+
loadContext = initialContext || new (0, _chunkHNBICOIUjs.RouterContextProvider)();
|
|
1256
1258
|
} else {
|
|
1257
1259
|
loadContext = initialContext || {};
|
|
1258
1260
|
}
|
|
@@ -1266,10 +1268,10 @@ function derive(build, mode) {
|
|
|
1266
1268
|
if (!build.ssr) {
|
|
1267
1269
|
let decodedPath = decodeURI(normalizedPathname);
|
|
1268
1270
|
if (build.basename && build.basename !== "/") {
|
|
1269
|
-
let strippedPath =
|
|
1271
|
+
let strippedPath = _chunkHNBICOIUjs.stripBasename.call(void 0, decodedPath, build.basename);
|
|
1270
1272
|
if (strippedPath == null) {
|
|
1271
1273
|
errorHandler(
|
|
1272
|
-
new (0,
|
|
1274
|
+
new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1273
1275
|
404,
|
|
1274
1276
|
"Not Found",
|
|
1275
1277
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${build.basename}\``
|
|
@@ -1292,7 +1294,7 @@ function derive(build, mode) {
|
|
|
1292
1294
|
} else if (!build.prerender.includes(decodedPath.replace(/\/$/, "")) && !build.prerender.includes(decodedPath.replace(/[^/]$/, "/"))) {
|
|
1293
1295
|
if (requestUrl.pathname.endsWith(".data")) {
|
|
1294
1296
|
errorHandler(
|
|
1295
|
-
new (0,
|
|
1297
|
+
new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1296
1298
|
404,
|
|
1297
1299
|
"Not Found",
|
|
1298
1300
|
`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.`
|
|
@@ -1312,7 +1314,7 @@ function derive(build, mode) {
|
|
|
1312
1314
|
}
|
|
1313
1315
|
}
|
|
1314
1316
|
}
|
|
1315
|
-
let manifestUrl =
|
|
1317
|
+
let manifestUrl = _chunkHNBICOIUjs.getManifestPath.call(void 0,
|
|
1316
1318
|
build.routeDiscovery.manifestPath,
|
|
1317
1319
|
build.basename
|
|
1318
1320
|
);
|
|
@@ -1351,7 +1353,7 @@ function derive(build, mode) {
|
|
|
1351
1353
|
loadContext,
|
|
1352
1354
|
handleError
|
|
1353
1355
|
);
|
|
1354
|
-
if (
|
|
1356
|
+
if (_chunkHNBICOIUjs.isRedirectResponse.call(void 0, response)) {
|
|
1355
1357
|
response = generateSingleFetchRedirectResponse(
|
|
1356
1358
|
response,
|
|
1357
1359
|
request,
|
|
@@ -1365,7 +1367,7 @@ function derive(build, mode) {
|
|
|
1365
1367
|
params: matches ? matches[0].params : {},
|
|
1366
1368
|
request
|
|
1367
1369
|
});
|
|
1368
|
-
if (
|
|
1370
|
+
if (_chunkHNBICOIUjs.isRedirectResponse.call(void 0, response)) {
|
|
1369
1371
|
response = generateSingleFetchRedirectResponse(
|
|
1370
1372
|
response,
|
|
1371
1373
|
request,
|
|
@@ -1413,7 +1415,7 @@ function derive(build, mode) {
|
|
|
1413
1415
|
return response;
|
|
1414
1416
|
};
|
|
1415
1417
|
if (build.entry.module.instrumentations) {
|
|
1416
|
-
requestHandler =
|
|
1418
|
+
requestHandler = _chunkHNBICOIUjs.instrumentHandler.call(void 0,
|
|
1417
1419
|
requestHandler,
|
|
1418
1420
|
build.entry.module.instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1419
1421
|
);
|
|
@@ -1450,7 +1452,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1450
1452
|
};
|
|
1451
1453
|
};
|
|
1452
1454
|
async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
1453
|
-
if (url.toString().length >
|
|
1455
|
+
if (url.toString().length > _chunkHNBICOIUjs.URL_LIMIT) {
|
|
1454
1456
|
return new Response(null, {
|
|
1455
1457
|
statusText: "Bad Request",
|
|
1456
1458
|
status: 400
|
|
@@ -1500,7 +1502,7 @@ async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
|
1500
1502
|
async function handleSingleFetchRequest(serverMode, build, staticHandler, request, normalizedPath, loadContext, handleError) {
|
|
1501
1503
|
let handlerUrl = new URL(request.url);
|
|
1502
1504
|
handlerUrl.pathname = normalizedPath;
|
|
1503
|
-
let response =
|
|
1505
|
+
let response = _chunkHNBICOIUjs.isMutationMethod.call(void 0, request.method) ? await singleFetchAction(
|
|
1504
1506
|
build,
|
|
1505
1507
|
serverMode,
|
|
1506
1508
|
staticHandler,
|
|
@@ -1521,7 +1523,7 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
|
|
|
1521
1523
|
}
|
|
1522
1524
|
async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, isSpaMode, criticalCss) {
|
|
1523
1525
|
try {
|
|
1524
|
-
if (
|
|
1526
|
+
if (_chunkHNBICOIUjs.isMutationMethod.call(void 0, request.method)) {
|
|
1525
1527
|
try {
|
|
1526
1528
|
throwIfPotentialCSRFAttack(
|
|
1527
1529
|
request,
|
|
@@ -1537,7 +1539,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1537
1539
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1538
1540
|
try {
|
|
1539
1541
|
let innerResult = await query(request);
|
|
1540
|
-
if (!
|
|
1542
|
+
if (!_chunkHNBICOIUjs.isResponse.call(void 0, innerResult)) {
|
|
1541
1543
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1542
1544
|
}
|
|
1543
1545
|
return innerResult;
|
|
@@ -1548,7 +1550,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1548
1550
|
} : void 0,
|
|
1549
1551
|
normalizePath: (r) => getNormalizedPath(r, build.basename, build.future)
|
|
1550
1552
|
});
|
|
1551
|
-
if (!
|
|
1553
|
+
if (!_chunkHNBICOIUjs.isResponse.call(void 0, result)) {
|
|
1552
1554
|
result = await renderHtml(result, isSpaMode);
|
|
1553
1555
|
}
|
|
1554
1556
|
return result;
|
|
@@ -1563,7 +1565,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1563
1565
|
}
|
|
1564
1566
|
if (context.errors) {
|
|
1565
1567
|
Object.values(context.errors).forEach((err) => {
|
|
1566
|
-
if (!
|
|
1568
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1567
1569
|
handleError(err);
|
|
1568
1570
|
}
|
|
1569
1571
|
});
|
|
@@ -1574,10 +1576,17 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1574
1576
|
actionData: context.actionData,
|
|
1575
1577
|
errors: context.errors
|
|
1576
1578
|
};
|
|
1579
|
+
let routeDiscovery = build.routeDiscovery;
|
|
1580
|
+
if (_chunkHNBICOIUjs.isFogOfWarEnabled.call(void 0, routeDiscovery, build.ssr) && _chunkHNBICOIUjs.shouldUseInitialRouteDiscovery.call(void 0,
|
|
1581
|
+
context.location.pathname,
|
|
1582
|
+
staticHandler._matchCost
|
|
1583
|
+
)) {
|
|
1584
|
+
routeDiscovery = { ...routeDiscovery, mode: "initial" };
|
|
1585
|
+
}
|
|
1577
1586
|
let baseServerHandoff = {
|
|
1578
1587
|
basename: build.basename,
|
|
1579
1588
|
future: build.future,
|
|
1580
|
-
routeDiscovery
|
|
1589
|
+
routeDiscovery,
|
|
1581
1590
|
ssr: build.ssr,
|
|
1582
1591
|
isSpaMode: isSpaMode2
|
|
1583
1592
|
};
|
|
@@ -1600,7 +1609,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1600
1609
|
renderMeta: {},
|
|
1601
1610
|
future: build.future,
|
|
1602
1611
|
ssr: build.ssr,
|
|
1603
|
-
routeDiscovery
|
|
1612
|
+
routeDiscovery,
|
|
1604
1613
|
isSpaMode: isSpaMode2,
|
|
1605
1614
|
serializeError: (err) => serializeError(err, serverMode)
|
|
1606
1615
|
};
|
|
@@ -1616,10 +1625,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1616
1625
|
} catch (error) {
|
|
1617
1626
|
handleError(error);
|
|
1618
1627
|
let errorForSecondRender = error;
|
|
1619
|
-
if (
|
|
1628
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, error)) {
|
|
1620
1629
|
try {
|
|
1621
1630
|
let data2 = await unwrapResponse(error);
|
|
1622
|
-
errorForSecondRender = new (0,
|
|
1631
|
+
errorForSecondRender = new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1623
1632
|
error.status,
|
|
1624
1633
|
error.statusText,
|
|
1625
1634
|
data2
|
|
@@ -1627,7 +1636,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1627
1636
|
} catch (e) {
|
|
1628
1637
|
}
|
|
1629
1638
|
}
|
|
1630
|
-
context =
|
|
1639
|
+
context = _chunkHNBICOIUjs.getStaticContextFromError.call(void 0,
|
|
1631
1640
|
staticHandler.dataRoutes,
|
|
1632
1641
|
context,
|
|
1633
1642
|
errorForSecondRender
|
|
@@ -1687,7 +1696,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1687
1696
|
return handleQueryRouteError(error);
|
|
1688
1697
|
}
|
|
1689
1698
|
function handleQueryRouteResult(result) {
|
|
1690
|
-
if (
|
|
1699
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, result)) {
|
|
1691
1700
|
return result;
|
|
1692
1701
|
}
|
|
1693
1702
|
if (typeof result === "string") {
|
|
@@ -1696,10 +1705,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1696
1705
|
return Response.json(result);
|
|
1697
1706
|
}
|
|
1698
1707
|
function handleQueryRouteError(error) {
|
|
1699
|
-
if (
|
|
1708
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, error)) {
|
|
1700
1709
|
return error;
|
|
1701
1710
|
}
|
|
1702
|
-
if (
|
|
1711
|
+
if (_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1703
1712
|
handleError(error);
|
|
1704
1713
|
return errorResponseToJson(error, serverMode);
|
|
1705
1714
|
}
|
|
@@ -1822,7 +1831,7 @@ function createSessionStorage({
|
|
|
1822
1831
|
};
|
|
1823
1832
|
}
|
|
1824
1833
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1825
|
-
|
|
1834
|
+
_chunkHNBICOIUjs.warnOnce.call(void 0,
|
|
1826
1835
|
cookie.isSigned,
|
|
1827
1836
|
`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.`
|
|
1828
1837
|
);
|
|
@@ -2103,8 +2112,8 @@ async function routeRSCServerRequest({
|
|
|
2103
2112
|
const payload = await createFromReadableStream(
|
|
2104
2113
|
detectRedirectResponse.body
|
|
2105
2114
|
);
|
|
2106
|
-
if (serverResponse.status ===
|
|
2107
|
-
if (
|
|
2115
|
+
if (serverResponse.status === _chunkHNBICOIUjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2116
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2108
2117
|
throw new Error("Invalid redirect location");
|
|
2109
2118
|
}
|
|
2110
2119
|
const headers2 = new Headers(serverResponse.headers);
|
|
@@ -2125,11 +2134,11 @@ async function routeRSCServerRequest({
|
|
|
2125
2134
|
let html = await renderHTML(getPayload, {
|
|
2126
2135
|
onError(error) {
|
|
2127
2136
|
if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
|
|
2128
|
-
renderRedirect =
|
|
2137
|
+
renderRedirect = _chunkHNBICOIUjs.decodeRedirectErrorDigest.call(void 0, error.digest);
|
|
2129
2138
|
if (renderRedirect) {
|
|
2130
2139
|
return error.digest;
|
|
2131
2140
|
}
|
|
2132
|
-
let routeErrorResponse =
|
|
2141
|
+
let routeErrorResponse = _chunkHNBICOIUjs.decodeRouteErrorResponseDigest.call(void 0, error.digest);
|
|
2133
2142
|
if (routeErrorResponse) {
|
|
2134
2143
|
renderError = routeErrorResponse;
|
|
2135
2144
|
status = routeErrorResponse.status;
|
|
@@ -2150,7 +2159,7 @@ async function routeRSCServerRequest({
|
|
|
2150
2159
|
}
|
|
2151
2160
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2152
2161
|
if (renderRedirect) {
|
|
2153
|
-
if (
|
|
2162
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2154
2163
|
throw new Error("Invalid redirect location");
|
|
2155
2164
|
}
|
|
2156
2165
|
headers.set("Location", renderRedirect.location);
|
|
@@ -2162,12 +2171,12 @@ async function routeRSCServerRequest({
|
|
|
2162
2171
|
const redirectTransform = new TransformStream({
|
|
2163
2172
|
flush(controller) {
|
|
2164
2173
|
if (renderRedirect) {
|
|
2165
|
-
if (
|
|
2174
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2166
2175
|
return;
|
|
2167
2176
|
}
|
|
2168
2177
|
controller.enqueue(
|
|
2169
2178
|
new TextEncoder().encode(
|
|
2170
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2179
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkHNBICOIUjs.escapeAttribute.call(void 0, renderRedirect.location)}"/>`
|
|
2171
2180
|
)
|
|
2172
2181
|
);
|
|
2173
2182
|
}
|
|
@@ -2194,7 +2203,7 @@ async function routeRSCServerRequest({
|
|
|
2194
2203
|
return error;
|
|
2195
2204
|
}
|
|
2196
2205
|
if (renderRedirect) {
|
|
2197
|
-
if (
|
|
2206
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2198
2207
|
throw new Error("Invalid redirect location");
|
|
2199
2208
|
}
|
|
2200
2209
|
return new Response(`Redirect: ${renderRedirect.location}`, {
|
|
@@ -2206,7 +2215,7 @@ async function routeRSCServerRequest({
|
|
|
2206
2215
|
}
|
|
2207
2216
|
try {
|
|
2208
2217
|
let normalizedError = _nullishCoalesce(renderError, () => ( error));
|
|
2209
|
-
let [status, statusText] =
|
|
2218
|
+
let [status, statusText] = _chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, normalizedError) ? [normalizedError.status, normalizedError.statusText] : [500, ""];
|
|
2210
2219
|
let retryRedirect;
|
|
2211
2220
|
let reactHeaders = new Headers();
|
|
2212
2221
|
const html = await renderHTML(
|
|
@@ -2243,11 +2252,11 @@ async function routeRSCServerRequest({
|
|
|
2243
2252
|
{
|
|
2244
2253
|
onError(error2) {
|
|
2245
2254
|
if (typeof error2 === "object" && error2 && "digest" in error2 && typeof error2.digest === "string") {
|
|
2246
|
-
retryRedirect =
|
|
2255
|
+
retryRedirect = _chunkHNBICOIUjs.decodeRedirectErrorDigest.call(void 0, error2.digest);
|
|
2247
2256
|
if (retryRedirect) {
|
|
2248
2257
|
return error2.digest;
|
|
2249
2258
|
}
|
|
2250
|
-
let routeErrorResponse =
|
|
2259
|
+
let routeErrorResponse = _chunkHNBICOIUjs.decodeRouteErrorResponseDigest.call(void 0,
|
|
2251
2260
|
error2.digest
|
|
2252
2261
|
);
|
|
2253
2262
|
if (routeErrorResponse) {
|
|
@@ -2270,7 +2279,7 @@ async function routeRSCServerRequest({
|
|
|
2270
2279
|
}
|
|
2271
2280
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2272
2281
|
if (retryRedirect) {
|
|
2273
|
-
if (
|
|
2282
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2274
2283
|
throw new Error("Invalid redirect location");
|
|
2275
2284
|
}
|
|
2276
2285
|
headers.set("Location", retryRedirect.location);
|
|
@@ -2282,12 +2291,12 @@ async function routeRSCServerRequest({
|
|
|
2282
2291
|
const retryRedirectTransform = new TransformStream({
|
|
2283
2292
|
flush(controller) {
|
|
2284
2293
|
if (retryRedirect) {
|
|
2285
|
-
if (
|
|
2294
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2286
2295
|
return;
|
|
2287
2296
|
}
|
|
2288
2297
|
controller.enqueue(
|
|
2289
2298
|
new TextEncoder().encode(
|
|
2290
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2299
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkHNBICOIUjs.escapeAttribute.call(void 0, retryRedirect.location)}"/>`
|
|
2291
2300
|
)
|
|
2292
2301
|
);
|
|
2293
2302
|
}
|
|
@@ -2318,7 +2327,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2318
2327
|
const decoded = getPayload();
|
|
2319
2328
|
const payload = useSafe(decoded);
|
|
2320
2329
|
if (payload.type === "redirect") {
|
|
2321
|
-
if (
|
|
2330
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2322
2331
|
throw new Error("Invalid redirect location");
|
|
2323
2332
|
}
|
|
2324
2333
|
throw new Response(null, {
|
|
@@ -2331,7 +2340,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2331
2340
|
if (payload.type !== "render") return null;
|
|
2332
2341
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2333
2342
|
for (const match of payload.matches) {
|
|
2334
|
-
if (
|
|
2343
|
+
if (_chunkHNBICOIUjs.shouldHydrateRouteLoader.call(void 0,
|
|
2335
2344
|
match.id,
|
|
2336
2345
|
match.clientLoader,
|
|
2337
2346
|
match.hasLoader,
|
|
@@ -2371,7 +2380,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2371
2380
|
}
|
|
2372
2381
|
}))
|
|
2373
2382
|
};
|
|
2374
|
-
const router =
|
|
2383
|
+
const router = _chunk75HN637Gjs.createStaticRouter.call(void 0,
|
|
2375
2384
|
payload.matches.reduceRight((previous, match) => {
|
|
2376
2385
|
const route = {
|
|
2377
2386
|
id: match.id,
|
|
@@ -2419,10 +2428,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2419
2428
|
mode: "lazy",
|
|
2420
2429
|
manifestPath: payload.routeDiscovery.manifestPath || defaultManifestPath
|
|
2421
2430
|
},
|
|
2422
|
-
routeModules:
|
|
2431
|
+
routeModules: _chunkK3NA4NUHjs.createRSCRouteModules.call(void 0, payload)
|
|
2423
2432
|
};
|
|
2424
|
-
return /* @__PURE__ */ React3.createElement(
|
|
2425
|
-
|
|
2433
|
+
return /* @__PURE__ */ React3.createElement(_chunkHNBICOIUjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkK3NA4NUHjs.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunkHNBICOIUjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2434
|
+
_chunk75HN637Gjs.StaticRouterProvider,
|
|
2426
2435
|
{
|
|
2427
2436
|
context,
|
|
2428
2437
|
router,
|
|
@@ -2567,4 +2576,4 @@ function isManifestRequest(url) {
|
|
|
2567
2576
|
|
|
2568
2577
|
|
|
2569
2578
|
|
|
2570
|
-
exports.Await =
|
|
2579
|
+
exports.Await = _chunkHNBICOIUjs.Await; exports.BrowserRouter = _chunk75HN637Gjs.BrowserRouter; exports.Form = _chunk75HN637Gjs.Form; exports.HashRouter = _chunk75HN637Gjs.HashRouter; exports.IDLE_BLOCKER = _chunkHNBICOIUjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkHNBICOIUjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkHNBICOIUjs.IDLE_NAVIGATION; exports.Link = _chunk75HN637Gjs.Link; exports.Links = _chunkHNBICOIUjs.Links; exports.MemoryRouter = _chunkHNBICOIUjs.MemoryRouter; exports.Meta = _chunkHNBICOIUjs.Meta; exports.NavLink = _chunk75HN637Gjs.NavLink; exports.Navigate = _chunkHNBICOIUjs.Navigate; exports.NavigationType = _chunkHNBICOIUjs.Action; exports.Outlet = _chunkHNBICOIUjs.Outlet; exports.PrefetchPageLinks = _chunkHNBICOIUjs.PrefetchPageLinks; exports.Route = _chunkHNBICOIUjs.Route; exports.Router = _chunkHNBICOIUjs.Router; exports.RouterContextProvider = _chunkHNBICOIUjs.RouterContextProvider; exports.RouterProvider = _chunkHNBICOIUjs.RouterProvider; exports.Routes = _chunkHNBICOIUjs.Routes; exports.Scripts = _chunkHNBICOIUjs.Scripts; exports.ScrollRestoration = _chunk75HN637Gjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunk75HN637Gjs.StaticRouter; exports.StaticRouterProvider = _chunk75HN637Gjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkHNBICOIUjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkHNBICOIUjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkHNBICOIUjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkHNBICOIUjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkHNBICOIUjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkHNBICOIUjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkHNBICOIUjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkHNBICOIUjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkK3NA4NUHjs.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkHNBICOIUjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkHNBICOIUjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkHNBICOIUjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkHNBICOIUjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkHNBICOIUjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkHNBICOIUjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkHNBICOIUjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkHNBICOIUjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkHNBICOIUjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkHNBICOIUjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createHashHistory = _chunkHNBICOIUjs.createHashHistory; exports.UNSAFE_createMemoryHistory = _chunkHNBICOIUjs.createMemoryHistory; exports.UNSAFE_createRouter = _chunkHNBICOIUjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkHNBICOIUjs.decodeViaTurboStream; exports.UNSAFE_getHydrationData = _chunkK3NA4NUHjs.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkHNBICOIUjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkHNBICOIUjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkHNBICOIUjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkHNBICOIUjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkHNBICOIUjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkHNBICOIUjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkHNBICOIUjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunk75HN637Gjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkHNBICOIUjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkHNBICOIUjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkHNBICOIUjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunk75HN637Gjs.createBrowserRouter; exports.createContext = _chunkHNBICOIUjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunk75HN637Gjs.createHashRouter; exports.createMemoryRouter = _chunkHNBICOIUjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkHNBICOIUjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkHNBICOIUjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkHNBICOIUjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunk75HN637Gjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunk75HN637Gjs.createStaticHandler; exports.createStaticRouter = _chunk75HN637Gjs.createStaticRouter; exports.data = _chunkHNBICOIUjs.data; exports.generatePath = _chunkHNBICOIUjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkHNBICOIUjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkHNBICOIUjs.matchPath; exports.matchRoutes = _chunkHNBICOIUjs.matchRoutes; exports.parsePath = _chunkHNBICOIUjs.parsePath; exports.redirect = _chunkHNBICOIUjs.redirect; exports.redirectDocument = _chunkHNBICOIUjs.redirectDocument; exports.renderMatches = _chunkHNBICOIUjs.renderMatches; exports.replace = _chunkHNBICOIUjs.replace; exports.resolvePath = _chunkHNBICOIUjs.resolvePath; exports.unstable_HistoryRouter = _chunk75HN637Gjs.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunk75HN637Gjs.usePrompt; exports.unstable_useRoute = _chunkHNBICOIUjs.useRoute; exports.unstable_useRouterState = _chunkHNBICOIUjs.useRouterState; exports.useActionData = _chunkHNBICOIUjs.useActionData; exports.useAsyncError = _chunkHNBICOIUjs.useAsyncError; exports.useAsyncValue = _chunkHNBICOIUjs.useAsyncValue; exports.useBeforeUnload = _chunk75HN637Gjs.useBeforeUnload; exports.useBlocker = _chunkHNBICOIUjs.useBlocker; exports.useFetcher = _chunk75HN637Gjs.useFetcher; exports.useFetchers = _chunk75HN637Gjs.useFetchers; exports.useFormAction = _chunk75HN637Gjs.useFormAction; exports.useHref = _chunkHNBICOIUjs.useHref; exports.useInRouterContext = _chunkHNBICOIUjs.useInRouterContext; exports.useLinkClickHandler = _chunk75HN637Gjs.useLinkClickHandler; exports.useLoaderData = _chunkHNBICOIUjs.useLoaderData; exports.useLocation = _chunkHNBICOIUjs.useLocation; exports.useMatch = _chunkHNBICOIUjs.useMatch; exports.useMatches = _chunkHNBICOIUjs.useMatches; exports.useNavigate = _chunkHNBICOIUjs.useNavigate; exports.useNavigation = _chunkHNBICOIUjs.useNavigation; exports.useNavigationType = _chunkHNBICOIUjs.useNavigationType; exports.useOutlet = _chunkHNBICOIUjs.useOutlet; exports.useOutletContext = _chunkHNBICOIUjs.useOutletContext; exports.useParams = _chunkHNBICOIUjs.useParams; exports.useResolvedPath = _chunkHNBICOIUjs.useResolvedPath; exports.useRevalidator = _chunkHNBICOIUjs.useRevalidator; exports.useRouteError = _chunkHNBICOIUjs.useRouteError; exports.useRouteLoaderData = _chunkHNBICOIUjs.useRouteLoaderData; exports.useRoutes = _chunkHNBICOIUjs.useRoutes; exports.useSearchParams = _chunk75HN637Gjs.useSearchParams; exports.useSubmit = _chunk75HN637Gjs.useSubmit; exports.useViewTransitionState = _chunk75HN637Gjs.useViewTransitionState;
|