react-router 7.18.3 → 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 +14 -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-7SIULPXI.js → chunk-2ZBLYC7V.js} +35 -4
- package/dist/development/{chunk-BV7QT456.mjs → chunk-6KYCQHYJ.mjs} +35 -4
- package/dist/development/{chunk-QPXIKN46.js → chunk-IFHLIXZW.js} +7 -7
- package/dist/development/{chunk-HT4INDD5.mjs → chunk-JAHXRPFV.mjs} +16 -6
- package/dist/development/{chunk-YRTY65LJ.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/{production/index-react-server-client-BjY-eKuf.d.ts → development/index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/{production/index-react-server-client-K63fpMH4.d.mts → development/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 +102 -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-LNBCQR6O.js → chunk-75HN637G.js} +103 -103
- package/dist/production/{chunk-EFMJ2SG4.mjs → chunk-7RTFRKQW.mjs} +35 -4
- package/dist/production/{chunk-6XRGXNVQ.js → chunk-HNBICOIU.js} +35 -4
- package/dist/production/{chunk-UODOIDHR.mjs → chunk-IAM5GYT3.mjs} +16 -6
- package/dist/production/{chunk-SJHDA7OG.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/{development/index-react-server-client-BjY-eKuf.d.ts → production/index-react-server-client-BaaZU3sM.d.ts} +1 -1
- package/dist/{development/index-react-server-client-K63fpMH4.d.mts → production/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 +102 -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 _chunkSJHDA7OGjs = require('./chunk-SJHDA7OG.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunk75HN637Gjs = require('./chunk-75HN637G.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -154,7 +154,10 @@ var _chunkLNBCQR6Ojs = require('./chunk-LNBCQR6O.js');
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var _chunkHNBICOIUjs = require('./chunk-HNBICOIU.js');
|
|
158
161
|
|
|
159
162
|
// lib/dom/ssr/server.tsx
|
|
160
163
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -167,7 +170,7 @@ function ServerRouter({
|
|
|
167
170
|
url = new URL(url);
|
|
168
171
|
}
|
|
169
172
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
170
|
-
let routes =
|
|
173
|
+
let routes = _chunkHNBICOIUjs.createServerRoutes.call(void 0,
|
|
171
174
|
manifest.routes,
|
|
172
175
|
routeModules,
|
|
173
176
|
context.future,
|
|
@@ -180,7 +183,7 @@ function ServerRouter({
|
|
|
180
183
|
let routeId = match.route.id;
|
|
181
184
|
let route = routeModules[routeId];
|
|
182
185
|
let manifestRoute = context.manifest.routes[routeId];
|
|
183
|
-
if (route && manifestRoute &&
|
|
186
|
+
if (route && manifestRoute && _chunkHNBICOIUjs.shouldHydrateRouteLoader.call(void 0,
|
|
184
187
|
routeId,
|
|
185
188
|
route.clientLoader,
|
|
186
189
|
manifestRoute.hasLoader,
|
|
@@ -189,11 +192,11 @@ function ServerRouter({
|
|
|
189
192
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
|
-
let router =
|
|
195
|
+
let router = _chunk75HN637Gjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext, {
|
|
193
196
|
branches: context.branches
|
|
194
197
|
});
|
|
195
198
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
196
|
-
|
|
199
|
+
_chunkHNBICOIUjs.FrameworkContext.Provider,
|
|
197
200
|
{
|
|
198
201
|
value: {
|
|
199
202
|
manifest,
|
|
@@ -209,8 +212,8 @@ function ServerRouter({
|
|
|
209
212
|
renderMeta: context.renderMeta
|
|
210
213
|
}
|
|
211
214
|
},
|
|
212
|
-
/* @__PURE__ */ React.createElement(
|
|
213
|
-
|
|
215
|
+
/* @__PURE__ */ React.createElement(_chunkHNBICOIUjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
216
|
+
_chunk75HN637Gjs.StaticRouterProvider,
|
|
214
217
|
{
|
|
215
218
|
router,
|
|
216
219
|
context: context.staticHandlerContext,
|
|
@@ -218,7 +221,7 @@ function ServerRouter({
|
|
|
218
221
|
}
|
|
219
222
|
))
|
|
220
223
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
221
|
-
|
|
224
|
+
_chunkHNBICOIUjs.StreamTransfer,
|
|
222
225
|
{
|
|
223
226
|
context,
|
|
224
227
|
identifier: 0,
|
|
@@ -261,18 +264,18 @@ function createRoutesStub(routes, _context) {
|
|
|
261
264
|
let patched = processRoutes(
|
|
262
265
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
263
266
|
// types compared to `RouteObject`
|
|
264
|
-
|
|
265
|
-
_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)() : {},
|
|
266
269
|
frameworkContextRef.current.manifest,
|
|
267
270
|
frameworkContextRef.current.routeModules
|
|
268
271
|
);
|
|
269
|
-
routerRef.current =
|
|
272
|
+
routerRef.current = _chunkHNBICOIUjs.createMemoryRouter.call(void 0, patched, {
|
|
270
273
|
initialEntries,
|
|
271
274
|
initialIndex,
|
|
272
275
|
hydrationData
|
|
273
276
|
});
|
|
274
277
|
}
|
|
275
|
-
return /* @__PURE__ */ React2.createElement(
|
|
278
|
+
return /* @__PURE__ */ React2.createElement(_chunkHNBICOIUjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkHNBICOIUjs.RouterProvider, { router: routerRef.current }));
|
|
276
279
|
};
|
|
277
280
|
}
|
|
278
281
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -286,9 +289,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
286
289
|
id: route.id,
|
|
287
290
|
path: route.path,
|
|
288
291
|
index: route.index,
|
|
289
|
-
Component: route.Component ?
|
|
290
|
-
HydrateFallback: route.HydrateFallback ?
|
|
291
|
-
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,
|
|
292
295
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
293
296
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
294
297
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -323,7 +326,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
323
326
|
};
|
|
324
327
|
manifest.routes[newRoute.id] = entryRoute;
|
|
325
328
|
routeModules[route.id] = {
|
|
326
|
-
default: newRoute.Component ||
|
|
329
|
+
default: newRoute.Component || _chunkHNBICOIUjs.Outlet,
|
|
327
330
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
328
331
|
handle: route.handle,
|
|
329
332
|
links: route.links,
|
|
@@ -518,7 +521,7 @@ function myUnescape(value) {
|
|
|
518
521
|
return result;
|
|
519
522
|
}
|
|
520
523
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
521
|
-
|
|
524
|
+
_chunkHNBICOIUjs.warnOnce.call(void 0,
|
|
522
525
|
!expires,
|
|
523
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.`
|
|
524
527
|
);
|
|
@@ -580,7 +583,7 @@ function invariant2(value, message) {
|
|
|
580
583
|
|
|
581
584
|
// lib/server-runtime/routeMatching.ts
|
|
582
585
|
function matchServerRoutes(manifest, dataRoutes, branches, pathname, basename) {
|
|
583
|
-
let matches =
|
|
586
|
+
let matches = _chunkHNBICOIUjs.matchRoutesImpl.call(void 0,
|
|
584
587
|
dataRoutes,
|
|
585
588
|
pathname,
|
|
586
589
|
_nullishCoalesce(basename, () => ( "/")),
|
|
@@ -611,7 +614,7 @@ async function callRouteHandler(handler, args, future) {
|
|
|
611
614
|
context: args.context,
|
|
612
615
|
pattern: args.pattern
|
|
613
616
|
});
|
|
614
|
-
if (
|
|
617
|
+
if (_chunkHNBICOIUjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
615
618
|
throw new Response(null, result.init);
|
|
616
619
|
}
|
|
617
620
|
return result;
|
|
@@ -714,17 +717,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
714
717
|
controller.close();
|
|
715
718
|
}
|
|
716
719
|
});
|
|
717
|
-
let decoded = await
|
|
720
|
+
let decoded = await _chunkHNBICOIUjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
721
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
722
|
+
if (data2 && _chunkHNBICOIUjs.SingleFetchRedirectSymbol in data2) {
|
|
723
|
+
let result = data2[_chunkHNBICOIUjs.SingleFetchRedirectSymbol];
|
|
721
724
|
let init = { status: result.status };
|
|
722
725
|
if (result.reload) {
|
|
723
|
-
throw
|
|
726
|
+
throw _chunkHNBICOIUjs.redirectDocument.call(void 0, result.redirect, init);
|
|
724
727
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
728
|
+
throw _chunkHNBICOIUjs.replace.call(void 0, result.redirect, init);
|
|
726
729
|
} else {
|
|
727
|
-
throw
|
|
730
|
+
throw _chunkHNBICOIUjs.redirect.call(void 0, result.redirect, init);
|
|
728
731
|
}
|
|
729
732
|
} else {
|
|
730
733
|
invariant2(
|
|
@@ -767,7 +770,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
767
770
|
|
|
768
771
|
// lib/server-runtime/serverHandoff.ts
|
|
769
772
|
function createServerHandoffString(serverHandoff) {
|
|
770
|
-
return
|
|
773
|
+
return _chunkHNBICOIUjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
771
774
|
}
|
|
772
775
|
|
|
773
776
|
// lib/server-runtime/headers.ts
|
|
@@ -926,12 +929,12 @@ function getNormalizedPath(request, basename, future) {
|
|
|
926
929
|
pathname = pathname.replace(/\.data$/, "");
|
|
927
930
|
}
|
|
928
931
|
} else {
|
|
929
|
-
if (
|
|
932
|
+
if (_chunkHNBICOIUjs.stripBasename.call(void 0, pathname, basename) === "/_root.data") {
|
|
930
933
|
pathname = basename;
|
|
931
934
|
} else if (pathname.endsWith(".data")) {
|
|
932
935
|
pathname = pathname.replace(/\.data$/, "");
|
|
933
936
|
}
|
|
934
|
-
if (
|
|
937
|
+
if (_chunkHNBICOIUjs.stripBasename.call(void 0, pathname, basename) !== "/" && pathname.endsWith("/")) {
|
|
935
938
|
pathname = pathname.slice(0, -1);
|
|
936
939
|
}
|
|
937
940
|
}
|
|
@@ -951,7 +954,7 @@ function getNormalizedPath(request, basename, future) {
|
|
|
951
954
|
|
|
952
955
|
// lib/server-runtime/single-fetch.ts
|
|
953
956
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
954
|
-
...
|
|
957
|
+
..._chunkHNBICOIUjs.NO_BODY_STATUS_CODES,
|
|
955
958
|
304
|
|
956
959
|
]);
|
|
957
960
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -990,7 +993,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
990
993
|
return handleQueryError(error);
|
|
991
994
|
}
|
|
992
995
|
function handleQueryResult(result) {
|
|
993
|
-
return
|
|
996
|
+
return _chunkHNBICOIUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
994
997
|
}
|
|
995
998
|
function handleQueryError(error, status = 500) {
|
|
996
999
|
handleError(error);
|
|
@@ -1002,12 +1005,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
1002
1005
|
}
|
|
1003
1006
|
function staticContextToResponse(context) {
|
|
1004
1007
|
let headers = getDocumentHeaders(context, build);
|
|
1005
|
-
if (
|
|
1008
|
+
if (_chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1006
1009
|
return new Response(null, { status: context.statusCode, headers });
|
|
1007
1010
|
}
|
|
1008
1011
|
if (context.errors) {
|
|
1009
1012
|
Object.values(context.errors).forEach((err) => {
|
|
1010
|
-
if (!
|
|
1013
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1011
1014
|
handleError(err);
|
|
1012
1015
|
}
|
|
1013
1016
|
});
|
|
@@ -1055,7 +1058,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1055
1058
|
return handleQueryError(error);
|
|
1056
1059
|
}
|
|
1057
1060
|
function handleQueryResult(result) {
|
|
1058
|
-
return
|
|
1061
|
+
return _chunkHNBICOIUjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
1059
1062
|
}
|
|
1060
1063
|
function handleQueryError(error) {
|
|
1061
1064
|
handleError(error);
|
|
@@ -1067,12 +1070,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1067
1070
|
}
|
|
1068
1071
|
function staticContextToResponse(context) {
|
|
1069
1072
|
let headers = getDocumentHeaders(context, build);
|
|
1070
|
-
if (
|
|
1073
|
+
if (_chunkHNBICOIUjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1071
1074
|
return new Response(null, { status: context.statusCode, headers });
|
|
1072
1075
|
}
|
|
1073
1076
|
if (context.errors) {
|
|
1074
1077
|
Object.values(context.errors).forEach((err) => {
|
|
1075
|
-
if (!
|
|
1078
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1076
1079
|
handleError(err);
|
|
1077
1080
|
}
|
|
1078
1081
|
});
|
|
@@ -1136,15 +1139,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1136
1139
|
headers.delete("Location");
|
|
1137
1140
|
headers.set("Content-Type", "text/x-script");
|
|
1138
1141
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1139
|
-
result: request.method === "GET" ? { [
|
|
1142
|
+
result: request.method === "GET" ? { [_chunkHNBICOIUjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1140
1143
|
headers,
|
|
1141
|
-
status:
|
|
1144
|
+
status: _chunkHNBICOIUjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1142
1145
|
});
|
|
1143
1146
|
}
|
|
1144
1147
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1145
1148
|
let redirect2 = headers.get("Location");
|
|
1146
1149
|
if (basename) {
|
|
1147
|
-
redirect2 =
|
|
1150
|
+
redirect2 = _chunkHNBICOIUjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1148
1151
|
}
|
|
1149
1152
|
return {
|
|
1150
1153
|
redirect: redirect2,
|
|
@@ -1181,7 +1184,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1181
1184
|
clearTimeout(timeoutId);
|
|
1182
1185
|
requestSignal.removeEventListener("abort", abortControllerOnRequestAbort);
|
|
1183
1186
|
};
|
|
1184
|
-
return
|
|
1187
|
+
return _chunkHNBICOIUjs.encode.call(void 0, data2, {
|
|
1185
1188
|
signal: controller.signal,
|
|
1186
1189
|
onComplete: cleanupCallbacks,
|
|
1187
1190
|
plugins: [
|
|
@@ -1190,12 +1193,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1190
1193
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1191
1194
|
return ["SanitizedError", name, message, stack];
|
|
1192
1195
|
}
|
|
1193
|
-
if (value instanceof
|
|
1196
|
+
if (value instanceof _chunkHNBICOIUjs.ErrorResponseImpl) {
|
|
1194
1197
|
let { data: data3, status, statusText } = value;
|
|
1195
1198
|
return ["ErrorResponse", data3, status, statusText];
|
|
1196
1199
|
}
|
|
1197
|
-
if (value && typeof value === "object" &&
|
|
1198
|
-
return ["SingleFetchRedirect", value[
|
|
1200
|
+
if (value && typeof value === "object" && _chunkHNBICOIUjs.SingleFetchRedirectSymbol in value) {
|
|
1201
|
+
return ["SingleFetchRedirect", value[_chunkHNBICOIUjs.SingleFetchRedirectSymbol]];
|
|
1199
1202
|
}
|
|
1200
1203
|
}
|
|
1201
1204
|
],
|
|
@@ -1217,7 +1220,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1217
1220
|
function derive(build, mode) {
|
|
1218
1221
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1219
1222
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1220
|
-
let staticHandler =
|
|
1223
|
+
let staticHandler = _chunkHNBICOIUjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1221
1224
|
basename: build.basename,
|
|
1222
1225
|
instrumentations: build.entry.module.instrumentations,
|
|
1223
1226
|
future: build.future
|
|
@@ -1226,7 +1229,7 @@ function derive(build, mode) {
|
|
|
1226
1229
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1227
1230
|
console.error(
|
|
1228
1231
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1229
|
-
|
|
1232
|
+
_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1230
1233
|
);
|
|
1231
1234
|
}
|
|
1232
1235
|
});
|
|
@@ -1244,14 +1247,14 @@ function derive(build, mode) {
|
|
|
1244
1247
|
});
|
|
1245
1248
|
};
|
|
1246
1249
|
if (build.future.v8_middleware) {
|
|
1247
|
-
if (initialContext && !(initialContext instanceof
|
|
1250
|
+
if (initialContext && !(initialContext instanceof _chunkHNBICOIUjs.RouterContextProvider)) {
|
|
1248
1251
|
let error = new Error(
|
|
1249
1252
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1250
1253
|
);
|
|
1251
1254
|
handleError(error);
|
|
1252
1255
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1253
1256
|
}
|
|
1254
|
-
loadContext = initialContext || new (0,
|
|
1257
|
+
loadContext = initialContext || new (0, _chunkHNBICOIUjs.RouterContextProvider)();
|
|
1255
1258
|
} else {
|
|
1256
1259
|
loadContext = initialContext || {};
|
|
1257
1260
|
}
|
|
@@ -1265,10 +1268,10 @@ function derive(build, mode) {
|
|
|
1265
1268
|
if (!build.ssr) {
|
|
1266
1269
|
let decodedPath = decodeURI(normalizedPathname);
|
|
1267
1270
|
if (build.basename && build.basename !== "/") {
|
|
1268
|
-
let strippedPath =
|
|
1271
|
+
let strippedPath = _chunkHNBICOIUjs.stripBasename.call(void 0, decodedPath, build.basename);
|
|
1269
1272
|
if (strippedPath == null) {
|
|
1270
1273
|
errorHandler(
|
|
1271
|
-
new (0,
|
|
1274
|
+
new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1272
1275
|
404,
|
|
1273
1276
|
"Not Found",
|
|
1274
1277
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${build.basename}\``
|
|
@@ -1291,7 +1294,7 @@ function derive(build, mode) {
|
|
|
1291
1294
|
} else if (!build.prerender.includes(decodedPath.replace(/\/$/, "")) && !build.prerender.includes(decodedPath.replace(/[^/]$/, "/"))) {
|
|
1292
1295
|
if (requestUrl.pathname.endsWith(".data")) {
|
|
1293
1296
|
errorHandler(
|
|
1294
|
-
new (0,
|
|
1297
|
+
new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1295
1298
|
404,
|
|
1296
1299
|
"Not Found",
|
|
1297
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.`
|
|
@@ -1311,7 +1314,7 @@ function derive(build, mode) {
|
|
|
1311
1314
|
}
|
|
1312
1315
|
}
|
|
1313
1316
|
}
|
|
1314
|
-
let manifestUrl =
|
|
1317
|
+
let manifestUrl = _chunkHNBICOIUjs.getManifestPath.call(void 0,
|
|
1315
1318
|
build.routeDiscovery.manifestPath,
|
|
1316
1319
|
build.basename
|
|
1317
1320
|
);
|
|
@@ -1350,7 +1353,7 @@ function derive(build, mode) {
|
|
|
1350
1353
|
loadContext,
|
|
1351
1354
|
handleError
|
|
1352
1355
|
);
|
|
1353
|
-
if (
|
|
1356
|
+
if (_chunkHNBICOIUjs.isRedirectResponse.call(void 0, response)) {
|
|
1354
1357
|
response = generateSingleFetchRedirectResponse(
|
|
1355
1358
|
response,
|
|
1356
1359
|
request,
|
|
@@ -1364,7 +1367,7 @@ function derive(build, mode) {
|
|
|
1364
1367
|
params: matches ? matches[0].params : {},
|
|
1365
1368
|
request
|
|
1366
1369
|
});
|
|
1367
|
-
if (
|
|
1370
|
+
if (_chunkHNBICOIUjs.isRedirectResponse.call(void 0, response)) {
|
|
1368
1371
|
response = generateSingleFetchRedirectResponse(
|
|
1369
1372
|
response,
|
|
1370
1373
|
request,
|
|
@@ -1412,7 +1415,7 @@ function derive(build, mode) {
|
|
|
1412
1415
|
return response;
|
|
1413
1416
|
};
|
|
1414
1417
|
if (build.entry.module.instrumentations) {
|
|
1415
|
-
requestHandler =
|
|
1418
|
+
requestHandler = _chunkHNBICOIUjs.instrumentHandler.call(void 0,
|
|
1416
1419
|
requestHandler,
|
|
1417
1420
|
build.entry.module.instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1418
1421
|
);
|
|
@@ -1449,7 +1452,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1449
1452
|
};
|
|
1450
1453
|
};
|
|
1451
1454
|
async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
1452
|
-
if (url.toString().length >
|
|
1455
|
+
if (url.toString().length > _chunkHNBICOIUjs.URL_LIMIT) {
|
|
1453
1456
|
return new Response(null, {
|
|
1454
1457
|
statusText: "Bad Request",
|
|
1455
1458
|
status: 400
|
|
@@ -1499,7 +1502,7 @@ async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
|
1499
1502
|
async function handleSingleFetchRequest(serverMode, build, staticHandler, request, normalizedPath, loadContext, handleError) {
|
|
1500
1503
|
let handlerUrl = new URL(request.url);
|
|
1501
1504
|
handlerUrl.pathname = normalizedPath;
|
|
1502
|
-
let response =
|
|
1505
|
+
let response = _chunkHNBICOIUjs.isMutationMethod.call(void 0, request.method) ? await singleFetchAction(
|
|
1503
1506
|
build,
|
|
1504
1507
|
serverMode,
|
|
1505
1508
|
staticHandler,
|
|
@@ -1520,7 +1523,7 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
|
|
|
1520
1523
|
}
|
|
1521
1524
|
async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, isSpaMode, criticalCss) {
|
|
1522
1525
|
try {
|
|
1523
|
-
if (
|
|
1526
|
+
if (_chunkHNBICOIUjs.isMutationMethod.call(void 0, request.method)) {
|
|
1524
1527
|
try {
|
|
1525
1528
|
throwIfPotentialCSRFAttack(
|
|
1526
1529
|
request,
|
|
@@ -1536,7 +1539,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1536
1539
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1537
1540
|
try {
|
|
1538
1541
|
let innerResult = await query(request);
|
|
1539
|
-
if (!
|
|
1542
|
+
if (!_chunkHNBICOIUjs.isResponse.call(void 0, innerResult)) {
|
|
1540
1543
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1541
1544
|
}
|
|
1542
1545
|
return innerResult;
|
|
@@ -1547,7 +1550,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1547
1550
|
} : void 0,
|
|
1548
1551
|
normalizePath: (r) => getNormalizedPath(r, build.basename, build.future)
|
|
1549
1552
|
});
|
|
1550
|
-
if (!
|
|
1553
|
+
if (!_chunkHNBICOIUjs.isResponse.call(void 0, result)) {
|
|
1551
1554
|
result = await renderHtml(result, isSpaMode);
|
|
1552
1555
|
}
|
|
1553
1556
|
return result;
|
|
@@ -1562,7 +1565,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1562
1565
|
}
|
|
1563
1566
|
if (context.errors) {
|
|
1564
1567
|
Object.values(context.errors).forEach((err) => {
|
|
1565
|
-
if (!
|
|
1568
|
+
if (!_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1566
1569
|
handleError(err);
|
|
1567
1570
|
}
|
|
1568
1571
|
});
|
|
@@ -1573,10 +1576,17 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1573
1576
|
actionData: context.actionData,
|
|
1574
1577
|
errors: context.errors
|
|
1575
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
|
+
}
|
|
1576
1586
|
let baseServerHandoff = {
|
|
1577
1587
|
basename: build.basename,
|
|
1578
1588
|
future: build.future,
|
|
1579
|
-
routeDiscovery
|
|
1589
|
+
routeDiscovery,
|
|
1580
1590
|
ssr: build.ssr,
|
|
1581
1591
|
isSpaMode: isSpaMode2
|
|
1582
1592
|
};
|
|
@@ -1599,7 +1609,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1599
1609
|
renderMeta: {},
|
|
1600
1610
|
future: build.future,
|
|
1601
1611
|
ssr: build.ssr,
|
|
1602
|
-
routeDiscovery
|
|
1612
|
+
routeDiscovery,
|
|
1603
1613
|
isSpaMode: isSpaMode2,
|
|
1604
1614
|
serializeError: (err) => serializeError(err, serverMode)
|
|
1605
1615
|
};
|
|
@@ -1615,10 +1625,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1615
1625
|
} catch (error) {
|
|
1616
1626
|
handleError(error);
|
|
1617
1627
|
let errorForSecondRender = error;
|
|
1618
|
-
if (
|
|
1628
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, error)) {
|
|
1619
1629
|
try {
|
|
1620
1630
|
let data2 = await unwrapResponse(error);
|
|
1621
|
-
errorForSecondRender = new (0,
|
|
1631
|
+
errorForSecondRender = new (0, _chunkHNBICOIUjs.ErrorResponseImpl)(
|
|
1622
1632
|
error.status,
|
|
1623
1633
|
error.statusText,
|
|
1624
1634
|
data2
|
|
@@ -1626,7 +1636,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1626
1636
|
} catch (e) {
|
|
1627
1637
|
}
|
|
1628
1638
|
}
|
|
1629
|
-
context =
|
|
1639
|
+
context = _chunkHNBICOIUjs.getStaticContextFromError.call(void 0,
|
|
1630
1640
|
staticHandler.dataRoutes,
|
|
1631
1641
|
context,
|
|
1632
1642
|
errorForSecondRender
|
|
@@ -1686,7 +1696,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1686
1696
|
return handleQueryRouteError(error);
|
|
1687
1697
|
}
|
|
1688
1698
|
function handleQueryRouteResult(result) {
|
|
1689
|
-
if (
|
|
1699
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, result)) {
|
|
1690
1700
|
return result;
|
|
1691
1701
|
}
|
|
1692
1702
|
if (typeof result === "string") {
|
|
@@ -1695,10 +1705,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1695
1705
|
return Response.json(result);
|
|
1696
1706
|
}
|
|
1697
1707
|
function handleQueryRouteError(error) {
|
|
1698
|
-
if (
|
|
1708
|
+
if (_chunkHNBICOIUjs.isResponse.call(void 0, error)) {
|
|
1699
1709
|
return error;
|
|
1700
1710
|
}
|
|
1701
|
-
if (
|
|
1711
|
+
if (_chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1702
1712
|
handleError(error);
|
|
1703
1713
|
return errorResponseToJson(error, serverMode);
|
|
1704
1714
|
}
|
|
@@ -1821,7 +1831,7 @@ function createSessionStorage({
|
|
|
1821
1831
|
};
|
|
1822
1832
|
}
|
|
1823
1833
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1824
|
-
|
|
1834
|
+
_chunkHNBICOIUjs.warnOnce.call(void 0,
|
|
1825
1835
|
cookie.isSigned,
|
|
1826
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.`
|
|
1827
1837
|
);
|
|
@@ -2102,8 +2112,8 @@ async function routeRSCServerRequest({
|
|
|
2102
2112
|
const payload = await createFromReadableStream(
|
|
2103
2113
|
detectRedirectResponse.body
|
|
2104
2114
|
);
|
|
2105
|
-
if (serverResponse.status ===
|
|
2106
|
-
if (
|
|
2115
|
+
if (serverResponse.status === _chunkHNBICOIUjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2116
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2107
2117
|
throw new Error("Invalid redirect location");
|
|
2108
2118
|
}
|
|
2109
2119
|
const headers2 = new Headers(serverResponse.headers);
|
|
@@ -2124,11 +2134,11 @@ async function routeRSCServerRequest({
|
|
|
2124
2134
|
let html = await renderHTML(getPayload, {
|
|
2125
2135
|
onError(error) {
|
|
2126
2136
|
if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
|
|
2127
|
-
renderRedirect =
|
|
2137
|
+
renderRedirect = _chunkHNBICOIUjs.decodeRedirectErrorDigest.call(void 0, error.digest);
|
|
2128
2138
|
if (renderRedirect) {
|
|
2129
2139
|
return error.digest;
|
|
2130
2140
|
}
|
|
2131
|
-
let routeErrorResponse =
|
|
2141
|
+
let routeErrorResponse = _chunkHNBICOIUjs.decodeRouteErrorResponseDigest.call(void 0, error.digest);
|
|
2132
2142
|
if (routeErrorResponse) {
|
|
2133
2143
|
renderError = routeErrorResponse;
|
|
2134
2144
|
status = routeErrorResponse.status;
|
|
@@ -2149,7 +2159,7 @@ async function routeRSCServerRequest({
|
|
|
2149
2159
|
}
|
|
2150
2160
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2151
2161
|
if (renderRedirect) {
|
|
2152
|
-
if (
|
|
2162
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2153
2163
|
throw new Error("Invalid redirect location");
|
|
2154
2164
|
}
|
|
2155
2165
|
headers.set("Location", renderRedirect.location);
|
|
@@ -2161,12 +2171,12 @@ async function routeRSCServerRequest({
|
|
|
2161
2171
|
const redirectTransform = new TransformStream({
|
|
2162
2172
|
flush(controller) {
|
|
2163
2173
|
if (renderRedirect) {
|
|
2164
|
-
if (
|
|
2174
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2165
2175
|
return;
|
|
2166
2176
|
}
|
|
2167
2177
|
controller.enqueue(
|
|
2168
2178
|
new TextEncoder().encode(
|
|
2169
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2179
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkHNBICOIUjs.escapeAttribute.call(void 0, renderRedirect.location)}"/>`
|
|
2170
2180
|
)
|
|
2171
2181
|
);
|
|
2172
2182
|
}
|
|
@@ -2193,7 +2203,7 @@ async function routeRSCServerRequest({
|
|
|
2193
2203
|
return error;
|
|
2194
2204
|
}
|
|
2195
2205
|
if (renderRedirect) {
|
|
2196
|
-
if (
|
|
2206
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2197
2207
|
throw new Error("Invalid redirect location");
|
|
2198
2208
|
}
|
|
2199
2209
|
return new Response(`Redirect: ${renderRedirect.location}`, {
|
|
@@ -2205,7 +2215,7 @@ async function routeRSCServerRequest({
|
|
|
2205
2215
|
}
|
|
2206
2216
|
try {
|
|
2207
2217
|
let normalizedError = _nullishCoalesce(renderError, () => ( error));
|
|
2208
|
-
let [status, statusText] =
|
|
2218
|
+
let [status, statusText] = _chunkHNBICOIUjs.isRouteErrorResponse.call(void 0, normalizedError) ? [normalizedError.status, normalizedError.statusText] : [500, ""];
|
|
2209
2219
|
let retryRedirect;
|
|
2210
2220
|
let reactHeaders = new Headers();
|
|
2211
2221
|
const html = await renderHTML(
|
|
@@ -2242,11 +2252,11 @@ async function routeRSCServerRequest({
|
|
|
2242
2252
|
{
|
|
2243
2253
|
onError(error2) {
|
|
2244
2254
|
if (typeof error2 === "object" && error2 && "digest" in error2 && typeof error2.digest === "string") {
|
|
2245
|
-
retryRedirect =
|
|
2255
|
+
retryRedirect = _chunkHNBICOIUjs.decodeRedirectErrorDigest.call(void 0, error2.digest);
|
|
2246
2256
|
if (retryRedirect) {
|
|
2247
2257
|
return error2.digest;
|
|
2248
2258
|
}
|
|
2249
|
-
let routeErrorResponse =
|
|
2259
|
+
let routeErrorResponse = _chunkHNBICOIUjs.decodeRouteErrorResponseDigest.call(void 0,
|
|
2250
2260
|
error2.digest
|
|
2251
2261
|
);
|
|
2252
2262
|
if (routeErrorResponse) {
|
|
@@ -2269,7 +2279,7 @@ async function routeRSCServerRequest({
|
|
|
2269
2279
|
}
|
|
2270
2280
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2271
2281
|
if (retryRedirect) {
|
|
2272
|
-
if (
|
|
2282
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2273
2283
|
throw new Error("Invalid redirect location");
|
|
2274
2284
|
}
|
|
2275
2285
|
headers.set("Location", retryRedirect.location);
|
|
@@ -2281,12 +2291,12 @@ async function routeRSCServerRequest({
|
|
|
2281
2291
|
const retryRedirectTransform = new TransformStream({
|
|
2282
2292
|
flush(controller) {
|
|
2283
2293
|
if (retryRedirect) {
|
|
2284
|
-
if (
|
|
2294
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2285
2295
|
return;
|
|
2286
2296
|
}
|
|
2287
2297
|
controller.enqueue(
|
|
2288
2298
|
new TextEncoder().encode(
|
|
2289
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2299
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkHNBICOIUjs.escapeAttribute.call(void 0, retryRedirect.location)}"/>`
|
|
2290
2300
|
)
|
|
2291
2301
|
);
|
|
2292
2302
|
}
|
|
@@ -2317,7 +2327,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2317
2327
|
const decoded = getPayload();
|
|
2318
2328
|
const payload = useSafe(decoded);
|
|
2319
2329
|
if (payload.type === "redirect") {
|
|
2320
|
-
if (
|
|
2330
|
+
if (_chunkHNBICOIUjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2321
2331
|
throw new Error("Invalid redirect location");
|
|
2322
2332
|
}
|
|
2323
2333
|
throw new Response(null, {
|
|
@@ -2330,7 +2340,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2330
2340
|
if (payload.type !== "render") return null;
|
|
2331
2341
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2332
2342
|
for (const match of payload.matches) {
|
|
2333
|
-
if (
|
|
2343
|
+
if (_chunkHNBICOIUjs.shouldHydrateRouteLoader.call(void 0,
|
|
2334
2344
|
match.id,
|
|
2335
2345
|
match.clientLoader,
|
|
2336
2346
|
match.hasLoader,
|
|
@@ -2370,7 +2380,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2370
2380
|
}
|
|
2371
2381
|
}))
|
|
2372
2382
|
};
|
|
2373
|
-
const router =
|
|
2383
|
+
const router = _chunk75HN637Gjs.createStaticRouter.call(void 0,
|
|
2374
2384
|
payload.matches.reduceRight((previous, match) => {
|
|
2375
2385
|
const route = {
|
|
2376
2386
|
id: match.id,
|
|
@@ -2418,10 +2428,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2418
2428
|
mode: "lazy",
|
|
2419
2429
|
manifestPath: payload.routeDiscovery.manifestPath || defaultManifestPath
|
|
2420
2430
|
},
|
|
2421
|
-
routeModules:
|
|
2431
|
+
routeModules: _chunkK3NA4NUHjs.createRSCRouteModules.call(void 0, payload)
|
|
2422
2432
|
};
|
|
2423
|
-
return /* @__PURE__ */ React3.createElement(
|
|
2424
|
-
|
|
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,
|
|
2425
2435
|
{
|
|
2426
2436
|
context,
|
|
2427
2437
|
router,
|
|
@@ -2566,4 +2576,4 @@ function isManifestRequest(url) {
|
|
|
2566
2576
|
|
|
2567
2577
|
|
|
2568
2578
|
|
|
2569
|
-
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;
|