react-router 7.18.2 → 7.18.4
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 +15 -0
- package/dist/development/{browser-DBmQ1yAR.d.mts → browser-BR5QG7ZC.d.mts} +1 -1
- package/dist/development/{browser-B2PdsXXH.d.ts → browser-eq4RgLsD.d.ts} +1 -1
- package/dist/development/{chunk-HHGH3NKS.js → chunk-GR4NQCSD.js} +122 -19
- package/dist/development/{chunk-ZA36QIGN.mjs → chunk-H4DAEOV7.mjs} +16 -8
- package/dist/development/{chunk-7XGYIT3M.js → chunk-HQO5H5CC.js} +103 -103
- package/dist/{production/chunk-VJZ67BZE.js → development/chunk-LVPI3KDG.js} +7 -7
- package/dist/development/{chunk-62JRHF6Z.mjs → chunk-OB3PAWPO.mjs} +117 -14
- package/dist/{production/context-CeD5LmaF.d.mts → development/context-nqAapj74.d.mts} +9 -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 +45 -32
- package/dist/development/dom-export.mjs +17 -4
- package/dist/{production/index-react-server-client-3ykjivgQ.d.ts → development/index-react-server-client-BjY-eKuf.d.ts} +2 -1
- package/dist/{production/index-react-server-client-CACgcj2J.d.mts → development/index-react-server-client-K63fpMH4.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 +8 -0
- package/dist/development/index-react-server.d.ts +8 -0
- package/dist/development/index-react-server.js +25 -9
- package/dist/development/index-react-server.mjs +25 -9
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +102 -94
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Dkmpzd13.d.ts → development/instrumentation-B7w3_Eo9.d.ts} +8 -0
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{browser-DBmQ1yAR.d.mts → browser-BR5QG7ZC.d.mts} +1 -1
- package/dist/production/{browser-B2PdsXXH.d.ts → browser-eq4RgLsD.d.ts} +1 -1
- package/dist/production/{chunk-FDTIF24W.js → chunk-AOOKMWND.js} +103 -103
- package/dist/production/{chunk-SJTG3J2Q.mjs → chunk-G2MPF4YY.mjs} +16 -8
- package/dist/production/{chunk-YBLPXYCV.mjs → chunk-Q34X6AWR.mjs} +117 -14
- package/dist/{development/chunk-3UVS743K.js → production/chunk-QURBR4FZ.js} +7 -7
- package/dist/production/{chunk-TP6EHSSF.js → chunk-YNGRUB6F.js} +122 -19
- package/dist/{development/context-CeD5LmaF.d.mts → production/context-nqAapj74.d.mts} +9 -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 +45 -32
- package/dist/production/dom-export.mjs +17 -4
- package/dist/{development/index-react-server-client-3ykjivgQ.d.ts → production/index-react-server-client-BjY-eKuf.d.ts} +2 -1
- package/dist/{development/index-react-server-client-CACgcj2J.d.mts → production/index-react-server-client-K63fpMH4.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 +8 -0
- package/dist/production/index-react-server.d.ts +8 -0
- package/dist/production/index-react-server.js +25 -9
- package/dist/production/index-react-server.mjs +25 -9
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +102 -94
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Dkmpzd13.d.ts → production/instrumentation-B7w3_Eo9.d.ts} +8 -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.4
|
|
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 _chunkQURBR4FZjs = require('./chunk-QURBR4FZ.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ var _chunkVJZ67BZEjs = require('./chunk-VJZ67BZE.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkAOOKMWNDjs = require('./chunk-AOOKMWND.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -154,7 +154,8 @@ var _chunkFDTIF24Wjs = require('./chunk-FDTIF24W.js');
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
|
|
158
|
+
var _chunkYNGRUB6Fjs = require('./chunk-YNGRUB6F.js');
|
|
158
159
|
|
|
159
160
|
// lib/dom/ssr/server.tsx
|
|
160
161
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -167,7 +168,7 @@ function ServerRouter({
|
|
|
167
168
|
url = new URL(url);
|
|
168
169
|
}
|
|
169
170
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
170
|
-
let routes =
|
|
171
|
+
let routes = _chunkYNGRUB6Fjs.createServerRoutes.call(void 0,
|
|
171
172
|
manifest.routes,
|
|
172
173
|
routeModules,
|
|
173
174
|
context.future,
|
|
@@ -180,7 +181,7 @@ function ServerRouter({
|
|
|
180
181
|
let routeId = match.route.id;
|
|
181
182
|
let route = routeModules[routeId];
|
|
182
183
|
let manifestRoute = context.manifest.routes[routeId];
|
|
183
|
-
if (route && manifestRoute &&
|
|
184
|
+
if (route && manifestRoute && _chunkYNGRUB6Fjs.shouldHydrateRouteLoader.call(void 0,
|
|
184
185
|
routeId,
|
|
185
186
|
route.clientLoader,
|
|
186
187
|
manifestRoute.hasLoader,
|
|
@@ -189,11 +190,11 @@ function ServerRouter({
|
|
|
189
190
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
|
-
let router =
|
|
193
|
+
let router = _chunkAOOKMWNDjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext, {
|
|
193
194
|
branches: context.branches
|
|
194
195
|
});
|
|
195
196
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
196
|
-
|
|
197
|
+
_chunkYNGRUB6Fjs.FrameworkContext.Provider,
|
|
197
198
|
{
|
|
198
199
|
value: {
|
|
199
200
|
manifest,
|
|
@@ -209,8 +210,8 @@ function ServerRouter({
|
|
|
209
210
|
renderMeta: context.renderMeta
|
|
210
211
|
}
|
|
211
212
|
},
|
|
212
|
-
/* @__PURE__ */ React.createElement(
|
|
213
|
-
|
|
213
|
+
/* @__PURE__ */ React.createElement(_chunkYNGRUB6Fjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
214
|
+
_chunkAOOKMWNDjs.StaticRouterProvider,
|
|
214
215
|
{
|
|
215
216
|
router,
|
|
216
217
|
context: context.staticHandlerContext,
|
|
@@ -218,7 +219,7 @@ function ServerRouter({
|
|
|
218
219
|
}
|
|
219
220
|
))
|
|
220
221
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
221
|
-
|
|
222
|
+
_chunkYNGRUB6Fjs.StreamTransfer,
|
|
222
223
|
{
|
|
223
224
|
context,
|
|
224
225
|
identifier: 0,
|
|
@@ -261,18 +262,18 @@ function createRoutesStub(routes, _context) {
|
|
|
261
262
|
let patched = processRoutes(
|
|
262
263
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
263
264
|
// types compared to `RouteObject`
|
|
264
|
-
|
|
265
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0,
|
|
265
|
+
_chunkYNGRUB6Fjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
266
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0, _chunkYNGRUB6Fjs.RouterContextProvider)() : {},
|
|
266
267
|
frameworkContextRef.current.manifest,
|
|
267
268
|
frameworkContextRef.current.routeModules
|
|
268
269
|
);
|
|
269
|
-
routerRef.current =
|
|
270
|
+
routerRef.current = _chunkYNGRUB6Fjs.createMemoryRouter.call(void 0, patched, {
|
|
270
271
|
initialEntries,
|
|
271
272
|
initialIndex,
|
|
272
273
|
hydrationData
|
|
273
274
|
});
|
|
274
275
|
}
|
|
275
|
-
return /* @__PURE__ */ React2.createElement(
|
|
276
|
+
return /* @__PURE__ */ React2.createElement(_chunkYNGRUB6Fjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkYNGRUB6Fjs.RouterProvider, { router: routerRef.current }));
|
|
276
277
|
};
|
|
277
278
|
}
|
|
278
279
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -286,9 +287,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
286
287
|
id: route.id,
|
|
287
288
|
path: route.path,
|
|
288
289
|
index: route.index,
|
|
289
|
-
Component: route.Component ?
|
|
290
|
-
HydrateFallback: route.HydrateFallback ?
|
|
291
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
290
|
+
Component: route.Component ? _chunkYNGRUB6Fjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
291
|
+
HydrateFallback: route.HydrateFallback ? _chunkYNGRUB6Fjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
292
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkYNGRUB6Fjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
292
293
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
293
294
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
294
295
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -323,7 +324,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
323
324
|
};
|
|
324
325
|
manifest.routes[newRoute.id] = entryRoute;
|
|
325
326
|
routeModules[route.id] = {
|
|
326
|
-
default: newRoute.Component ||
|
|
327
|
+
default: newRoute.Component || _chunkYNGRUB6Fjs.Outlet,
|
|
327
328
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
328
329
|
handle: route.handle,
|
|
329
330
|
links: route.links,
|
|
@@ -518,7 +519,7 @@ function myUnescape(value) {
|
|
|
518
519
|
return result;
|
|
519
520
|
}
|
|
520
521
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
521
|
-
|
|
522
|
+
_chunkYNGRUB6Fjs.warnOnce.call(void 0,
|
|
522
523
|
!expires,
|
|
523
524
|
`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
525
|
);
|
|
@@ -580,7 +581,7 @@ function invariant2(value, message) {
|
|
|
580
581
|
|
|
581
582
|
// lib/server-runtime/routeMatching.ts
|
|
582
583
|
function matchServerRoutes(manifest, dataRoutes, branches, pathname, basename) {
|
|
583
|
-
let matches =
|
|
584
|
+
let matches = _chunkYNGRUB6Fjs.matchRoutesImpl.call(void 0,
|
|
584
585
|
dataRoutes,
|
|
585
586
|
pathname,
|
|
586
587
|
_nullishCoalesce(basename, () => ( "/")),
|
|
@@ -611,7 +612,7 @@ async function callRouteHandler(handler, args, future) {
|
|
|
611
612
|
context: args.context,
|
|
612
613
|
pattern: args.pattern
|
|
613
614
|
});
|
|
614
|
-
if (
|
|
615
|
+
if (_chunkYNGRUB6Fjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkYNGRUB6Fjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
615
616
|
throw new Response(null, result.init);
|
|
616
617
|
}
|
|
617
618
|
return result;
|
|
@@ -714,17 +715,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
714
715
|
controller.close();
|
|
715
716
|
}
|
|
716
717
|
});
|
|
717
|
-
let decoded = await
|
|
718
|
+
let decoded = await _chunkYNGRUB6Fjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
719
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
720
|
+
if (data2 && _chunkYNGRUB6Fjs.SingleFetchRedirectSymbol in data2) {
|
|
721
|
+
let result = data2[_chunkYNGRUB6Fjs.SingleFetchRedirectSymbol];
|
|
721
722
|
let init = { status: result.status };
|
|
722
723
|
if (result.reload) {
|
|
723
|
-
throw
|
|
724
|
+
throw _chunkYNGRUB6Fjs.redirectDocument.call(void 0, result.redirect, init);
|
|
724
725
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
726
|
+
throw _chunkYNGRUB6Fjs.replace.call(void 0, result.redirect, init);
|
|
726
727
|
} else {
|
|
727
|
-
throw
|
|
728
|
+
throw _chunkYNGRUB6Fjs.redirect.call(void 0, result.redirect, init);
|
|
728
729
|
}
|
|
729
730
|
} else {
|
|
730
731
|
invariant2(
|
|
@@ -767,7 +768,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
767
768
|
|
|
768
769
|
// lib/server-runtime/serverHandoff.ts
|
|
769
770
|
function createServerHandoffString(serverHandoff) {
|
|
770
|
-
return
|
|
771
|
+
return _chunkYNGRUB6Fjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
771
772
|
}
|
|
772
773
|
|
|
773
774
|
// lib/server-runtime/headers.ts
|
|
@@ -846,18 +847,25 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
846
847
|
function throwIfPotentialCSRFAttack(request, allowedActionOrigins) {
|
|
847
848
|
let originHeader = request.headers.get("origin");
|
|
848
849
|
let originDomain = null;
|
|
850
|
+
let originUrl = null;
|
|
849
851
|
try {
|
|
850
|
-
|
|
852
|
+
if (typeof originHeader === "string" && originHeader !== "null") {
|
|
853
|
+
originUrl = new URL(originHeader);
|
|
854
|
+
originDomain = originUrl.host;
|
|
855
|
+
} else {
|
|
856
|
+
originDomain = originHeader;
|
|
857
|
+
}
|
|
851
858
|
} catch (e2) {
|
|
852
859
|
throw new Error(
|
|
853
860
|
`\`origin\` header is not a valid URL. Aborting the action.`
|
|
854
861
|
);
|
|
855
862
|
}
|
|
856
|
-
let
|
|
857
|
-
|
|
863
|
+
let requestUrl = new URL(request.url);
|
|
864
|
+
let originMatchesRequest = originUrl ? originUrl.origin === requestUrl.origin : originDomain === requestUrl.host;
|
|
865
|
+
if (originDomain && !originMatchesRequest) {
|
|
858
866
|
if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
|
|
859
867
|
throw new Error(
|
|
860
|
-
"The `request.url`
|
|
868
|
+
"The `request.url` origin does not match `origin` header from a forwarded action request. Aborting the action."
|
|
861
869
|
);
|
|
862
870
|
}
|
|
863
871
|
}
|
|
@@ -919,12 +927,12 @@ function getNormalizedPath(request, basename, future) {
|
|
|
919
927
|
pathname = pathname.replace(/\.data$/, "");
|
|
920
928
|
}
|
|
921
929
|
} else {
|
|
922
|
-
if (
|
|
930
|
+
if (_chunkYNGRUB6Fjs.stripBasename.call(void 0, pathname, basename) === "/_root.data") {
|
|
923
931
|
pathname = basename;
|
|
924
932
|
} else if (pathname.endsWith(".data")) {
|
|
925
933
|
pathname = pathname.replace(/\.data$/, "");
|
|
926
934
|
}
|
|
927
|
-
if (
|
|
935
|
+
if (_chunkYNGRUB6Fjs.stripBasename.call(void 0, pathname, basename) !== "/" && pathname.endsWith("/")) {
|
|
928
936
|
pathname = pathname.slice(0, -1);
|
|
929
937
|
}
|
|
930
938
|
}
|
|
@@ -944,7 +952,7 @@ function getNormalizedPath(request, basename, future) {
|
|
|
944
952
|
|
|
945
953
|
// lib/server-runtime/single-fetch.ts
|
|
946
954
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
947
|
-
...
|
|
955
|
+
..._chunkYNGRUB6Fjs.NO_BODY_STATUS_CODES,
|
|
948
956
|
304
|
|
949
957
|
]);
|
|
950
958
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -983,7 +991,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
983
991
|
return handleQueryError(error);
|
|
984
992
|
}
|
|
985
993
|
function handleQueryResult(result) {
|
|
986
|
-
return
|
|
994
|
+
return _chunkYNGRUB6Fjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
987
995
|
}
|
|
988
996
|
function handleQueryError(error, status = 500) {
|
|
989
997
|
handleError(error);
|
|
@@ -995,12 +1003,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
995
1003
|
}
|
|
996
1004
|
function staticContextToResponse(context) {
|
|
997
1005
|
let headers = getDocumentHeaders(context, build);
|
|
998
|
-
if (
|
|
1006
|
+
if (_chunkYNGRUB6Fjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
999
1007
|
return new Response(null, { status: context.statusCode, headers });
|
|
1000
1008
|
}
|
|
1001
1009
|
if (context.errors) {
|
|
1002
1010
|
Object.values(context.errors).forEach((err) => {
|
|
1003
|
-
if (!
|
|
1011
|
+
if (!_chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1004
1012
|
handleError(err);
|
|
1005
1013
|
}
|
|
1006
1014
|
});
|
|
@@ -1048,7 +1056,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1048
1056
|
return handleQueryError(error);
|
|
1049
1057
|
}
|
|
1050
1058
|
function handleQueryResult(result) {
|
|
1051
|
-
return
|
|
1059
|
+
return _chunkYNGRUB6Fjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
1052
1060
|
}
|
|
1053
1061
|
function handleQueryError(error) {
|
|
1054
1062
|
handleError(error);
|
|
@@ -1060,12 +1068,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1060
1068
|
}
|
|
1061
1069
|
function staticContextToResponse(context) {
|
|
1062
1070
|
let headers = getDocumentHeaders(context, build);
|
|
1063
|
-
if (
|
|
1071
|
+
if (_chunkYNGRUB6Fjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1064
1072
|
return new Response(null, { status: context.statusCode, headers });
|
|
1065
1073
|
}
|
|
1066
1074
|
if (context.errors) {
|
|
1067
1075
|
Object.values(context.errors).forEach((err) => {
|
|
1068
|
-
if (!
|
|
1076
|
+
if (!_chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1069
1077
|
handleError(err);
|
|
1070
1078
|
}
|
|
1071
1079
|
});
|
|
@@ -1129,15 +1137,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1129
1137
|
headers.delete("Location");
|
|
1130
1138
|
headers.set("Content-Type", "text/x-script");
|
|
1131
1139
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1132
|
-
result: request.method === "GET" ? { [
|
|
1140
|
+
result: request.method === "GET" ? { [_chunkYNGRUB6Fjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1133
1141
|
headers,
|
|
1134
|
-
status:
|
|
1142
|
+
status: _chunkYNGRUB6Fjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1135
1143
|
});
|
|
1136
1144
|
}
|
|
1137
1145
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1138
1146
|
let redirect2 = headers.get("Location");
|
|
1139
1147
|
if (basename) {
|
|
1140
|
-
redirect2 =
|
|
1148
|
+
redirect2 = _chunkYNGRUB6Fjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1141
1149
|
}
|
|
1142
1150
|
return {
|
|
1143
1151
|
redirect: redirect2,
|
|
@@ -1174,7 +1182,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1174
1182
|
clearTimeout(timeoutId);
|
|
1175
1183
|
requestSignal.removeEventListener("abort", abortControllerOnRequestAbort);
|
|
1176
1184
|
};
|
|
1177
|
-
return
|
|
1185
|
+
return _chunkYNGRUB6Fjs.encode.call(void 0, data2, {
|
|
1178
1186
|
signal: controller.signal,
|
|
1179
1187
|
onComplete: cleanupCallbacks,
|
|
1180
1188
|
plugins: [
|
|
@@ -1183,12 +1191,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1183
1191
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1184
1192
|
return ["SanitizedError", name, message, stack];
|
|
1185
1193
|
}
|
|
1186
|
-
if (value instanceof
|
|
1194
|
+
if (value instanceof _chunkYNGRUB6Fjs.ErrorResponseImpl) {
|
|
1187
1195
|
let { data: data3, status, statusText } = value;
|
|
1188
1196
|
return ["ErrorResponse", data3, status, statusText];
|
|
1189
1197
|
}
|
|
1190
|
-
if (value && typeof value === "object" &&
|
|
1191
|
-
return ["SingleFetchRedirect", value[
|
|
1198
|
+
if (value && typeof value === "object" && _chunkYNGRUB6Fjs.SingleFetchRedirectSymbol in value) {
|
|
1199
|
+
return ["SingleFetchRedirect", value[_chunkYNGRUB6Fjs.SingleFetchRedirectSymbol]];
|
|
1192
1200
|
}
|
|
1193
1201
|
}
|
|
1194
1202
|
],
|
|
@@ -1210,7 +1218,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1210
1218
|
function derive(build, mode) {
|
|
1211
1219
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1212
1220
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1213
|
-
let staticHandler =
|
|
1221
|
+
let staticHandler = _chunkYNGRUB6Fjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1214
1222
|
basename: build.basename,
|
|
1215
1223
|
instrumentations: build.entry.module.instrumentations,
|
|
1216
1224
|
future: build.future
|
|
@@ -1219,7 +1227,7 @@ function derive(build, mode) {
|
|
|
1219
1227
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1220
1228
|
console.error(
|
|
1221
1229
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1222
|
-
|
|
1230
|
+
_chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1223
1231
|
);
|
|
1224
1232
|
}
|
|
1225
1233
|
});
|
|
@@ -1237,14 +1245,14 @@ function derive(build, mode) {
|
|
|
1237
1245
|
});
|
|
1238
1246
|
};
|
|
1239
1247
|
if (build.future.v8_middleware) {
|
|
1240
|
-
if (initialContext && !(initialContext instanceof
|
|
1248
|
+
if (initialContext && !(initialContext instanceof _chunkYNGRUB6Fjs.RouterContextProvider)) {
|
|
1241
1249
|
let error = new Error(
|
|
1242
1250
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1243
1251
|
);
|
|
1244
1252
|
handleError(error);
|
|
1245
1253
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1246
1254
|
}
|
|
1247
|
-
loadContext = initialContext || new (0,
|
|
1255
|
+
loadContext = initialContext || new (0, _chunkYNGRUB6Fjs.RouterContextProvider)();
|
|
1248
1256
|
} else {
|
|
1249
1257
|
loadContext = initialContext || {};
|
|
1250
1258
|
}
|
|
@@ -1258,10 +1266,10 @@ function derive(build, mode) {
|
|
|
1258
1266
|
if (!build.ssr) {
|
|
1259
1267
|
let decodedPath = decodeURI(normalizedPathname);
|
|
1260
1268
|
if (build.basename && build.basename !== "/") {
|
|
1261
|
-
let strippedPath =
|
|
1269
|
+
let strippedPath = _chunkYNGRUB6Fjs.stripBasename.call(void 0, decodedPath, build.basename);
|
|
1262
1270
|
if (strippedPath == null) {
|
|
1263
1271
|
errorHandler(
|
|
1264
|
-
new (0,
|
|
1272
|
+
new (0, _chunkYNGRUB6Fjs.ErrorResponseImpl)(
|
|
1265
1273
|
404,
|
|
1266
1274
|
"Not Found",
|
|
1267
1275
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${build.basename}\``
|
|
@@ -1284,7 +1292,7 @@ function derive(build, mode) {
|
|
|
1284
1292
|
} else if (!build.prerender.includes(decodedPath.replace(/\/$/, "")) && !build.prerender.includes(decodedPath.replace(/[^/]$/, "/"))) {
|
|
1285
1293
|
if (requestUrl.pathname.endsWith(".data")) {
|
|
1286
1294
|
errorHandler(
|
|
1287
|
-
new (0,
|
|
1295
|
+
new (0, _chunkYNGRUB6Fjs.ErrorResponseImpl)(
|
|
1288
1296
|
404,
|
|
1289
1297
|
"Not Found",
|
|
1290
1298
|
`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.`
|
|
@@ -1304,7 +1312,7 @@ function derive(build, mode) {
|
|
|
1304
1312
|
}
|
|
1305
1313
|
}
|
|
1306
1314
|
}
|
|
1307
|
-
let manifestUrl =
|
|
1315
|
+
let manifestUrl = _chunkYNGRUB6Fjs.getManifestPath.call(void 0,
|
|
1308
1316
|
build.routeDiscovery.manifestPath,
|
|
1309
1317
|
build.basename
|
|
1310
1318
|
);
|
|
@@ -1343,7 +1351,7 @@ function derive(build, mode) {
|
|
|
1343
1351
|
loadContext,
|
|
1344
1352
|
handleError
|
|
1345
1353
|
);
|
|
1346
|
-
if (
|
|
1354
|
+
if (_chunkYNGRUB6Fjs.isRedirectResponse.call(void 0, response)) {
|
|
1347
1355
|
response = generateSingleFetchRedirectResponse(
|
|
1348
1356
|
response,
|
|
1349
1357
|
request,
|
|
@@ -1357,7 +1365,7 @@ function derive(build, mode) {
|
|
|
1357
1365
|
params: matches ? matches[0].params : {},
|
|
1358
1366
|
request
|
|
1359
1367
|
});
|
|
1360
|
-
if (
|
|
1368
|
+
if (_chunkYNGRUB6Fjs.isRedirectResponse.call(void 0, response)) {
|
|
1361
1369
|
response = generateSingleFetchRedirectResponse(
|
|
1362
1370
|
response,
|
|
1363
1371
|
request,
|
|
@@ -1405,7 +1413,7 @@ function derive(build, mode) {
|
|
|
1405
1413
|
return response;
|
|
1406
1414
|
};
|
|
1407
1415
|
if (build.entry.module.instrumentations) {
|
|
1408
|
-
requestHandler =
|
|
1416
|
+
requestHandler = _chunkYNGRUB6Fjs.instrumentHandler.call(void 0,
|
|
1409
1417
|
requestHandler,
|
|
1410
1418
|
build.entry.module.instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1411
1419
|
);
|
|
@@ -1442,7 +1450,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1442
1450
|
};
|
|
1443
1451
|
};
|
|
1444
1452
|
async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
1445
|
-
if (url.toString().length >
|
|
1453
|
+
if (url.toString().length > _chunkYNGRUB6Fjs.URL_LIMIT) {
|
|
1446
1454
|
return new Response(null, {
|
|
1447
1455
|
statusText: "Bad Request",
|
|
1448
1456
|
status: 400
|
|
@@ -1492,7 +1500,7 @@ async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
|
1492
1500
|
async function handleSingleFetchRequest(serverMode, build, staticHandler, request, normalizedPath, loadContext, handleError) {
|
|
1493
1501
|
let handlerUrl = new URL(request.url);
|
|
1494
1502
|
handlerUrl.pathname = normalizedPath;
|
|
1495
|
-
let response =
|
|
1503
|
+
let response = _chunkYNGRUB6Fjs.isMutationMethod.call(void 0, request.method) ? await singleFetchAction(
|
|
1496
1504
|
build,
|
|
1497
1505
|
serverMode,
|
|
1498
1506
|
staticHandler,
|
|
@@ -1513,7 +1521,7 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
|
|
|
1513
1521
|
}
|
|
1514
1522
|
async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, isSpaMode, criticalCss) {
|
|
1515
1523
|
try {
|
|
1516
|
-
if (
|
|
1524
|
+
if (_chunkYNGRUB6Fjs.isMutationMethod.call(void 0, request.method)) {
|
|
1517
1525
|
try {
|
|
1518
1526
|
throwIfPotentialCSRFAttack(
|
|
1519
1527
|
request,
|
|
@@ -1529,7 +1537,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1529
1537
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1530
1538
|
try {
|
|
1531
1539
|
let innerResult = await query(request);
|
|
1532
|
-
if (!
|
|
1540
|
+
if (!_chunkYNGRUB6Fjs.isResponse.call(void 0, innerResult)) {
|
|
1533
1541
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1534
1542
|
}
|
|
1535
1543
|
return innerResult;
|
|
@@ -1540,7 +1548,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1540
1548
|
} : void 0,
|
|
1541
1549
|
normalizePath: (r) => getNormalizedPath(r, build.basename, build.future)
|
|
1542
1550
|
});
|
|
1543
|
-
if (!
|
|
1551
|
+
if (!_chunkYNGRUB6Fjs.isResponse.call(void 0, result)) {
|
|
1544
1552
|
result = await renderHtml(result, isSpaMode);
|
|
1545
1553
|
}
|
|
1546
1554
|
return result;
|
|
@@ -1555,7 +1563,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1555
1563
|
}
|
|
1556
1564
|
if (context.errors) {
|
|
1557
1565
|
Object.values(context.errors).forEach((err) => {
|
|
1558
|
-
if (!
|
|
1566
|
+
if (!_chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1559
1567
|
handleError(err);
|
|
1560
1568
|
}
|
|
1561
1569
|
});
|
|
@@ -1608,10 +1616,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1608
1616
|
} catch (error) {
|
|
1609
1617
|
handleError(error);
|
|
1610
1618
|
let errorForSecondRender = error;
|
|
1611
|
-
if (
|
|
1619
|
+
if (_chunkYNGRUB6Fjs.isResponse.call(void 0, error)) {
|
|
1612
1620
|
try {
|
|
1613
1621
|
let data2 = await unwrapResponse(error);
|
|
1614
|
-
errorForSecondRender = new (0,
|
|
1622
|
+
errorForSecondRender = new (0, _chunkYNGRUB6Fjs.ErrorResponseImpl)(
|
|
1615
1623
|
error.status,
|
|
1616
1624
|
error.statusText,
|
|
1617
1625
|
data2
|
|
@@ -1619,7 +1627,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1619
1627
|
} catch (e) {
|
|
1620
1628
|
}
|
|
1621
1629
|
}
|
|
1622
|
-
context =
|
|
1630
|
+
context = _chunkYNGRUB6Fjs.getStaticContextFromError.call(void 0,
|
|
1623
1631
|
staticHandler.dataRoutes,
|
|
1624
1632
|
context,
|
|
1625
1633
|
errorForSecondRender
|
|
@@ -1679,7 +1687,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1679
1687
|
return handleQueryRouteError(error);
|
|
1680
1688
|
}
|
|
1681
1689
|
function handleQueryRouteResult(result) {
|
|
1682
|
-
if (
|
|
1690
|
+
if (_chunkYNGRUB6Fjs.isResponse.call(void 0, result)) {
|
|
1683
1691
|
return result;
|
|
1684
1692
|
}
|
|
1685
1693
|
if (typeof result === "string") {
|
|
@@ -1688,10 +1696,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1688
1696
|
return Response.json(result);
|
|
1689
1697
|
}
|
|
1690
1698
|
function handleQueryRouteError(error) {
|
|
1691
|
-
if (
|
|
1699
|
+
if (_chunkYNGRUB6Fjs.isResponse.call(void 0, error)) {
|
|
1692
1700
|
return error;
|
|
1693
1701
|
}
|
|
1694
|
-
if (
|
|
1702
|
+
if (_chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1695
1703
|
handleError(error);
|
|
1696
1704
|
return errorResponseToJson(error, serverMode);
|
|
1697
1705
|
}
|
|
@@ -1814,7 +1822,7 @@ function createSessionStorage({
|
|
|
1814
1822
|
};
|
|
1815
1823
|
}
|
|
1816
1824
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1817
|
-
|
|
1825
|
+
_chunkYNGRUB6Fjs.warnOnce.call(void 0,
|
|
1818
1826
|
cookie.isSigned,
|
|
1819
1827
|
`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.`
|
|
1820
1828
|
);
|
|
@@ -2095,8 +2103,8 @@ async function routeRSCServerRequest({
|
|
|
2095
2103
|
const payload = await createFromReadableStream(
|
|
2096
2104
|
detectRedirectResponse.body
|
|
2097
2105
|
);
|
|
2098
|
-
if (serverResponse.status ===
|
|
2099
|
-
if (
|
|
2106
|
+
if (serverResponse.status === _chunkYNGRUB6Fjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2107
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2100
2108
|
throw new Error("Invalid redirect location");
|
|
2101
2109
|
}
|
|
2102
2110
|
const headers2 = new Headers(serverResponse.headers);
|
|
@@ -2117,11 +2125,11 @@ async function routeRSCServerRequest({
|
|
|
2117
2125
|
let html = await renderHTML(getPayload, {
|
|
2118
2126
|
onError(error) {
|
|
2119
2127
|
if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
|
|
2120
|
-
renderRedirect =
|
|
2128
|
+
renderRedirect = _chunkYNGRUB6Fjs.decodeRedirectErrorDigest.call(void 0, error.digest);
|
|
2121
2129
|
if (renderRedirect) {
|
|
2122
2130
|
return error.digest;
|
|
2123
2131
|
}
|
|
2124
|
-
let routeErrorResponse =
|
|
2132
|
+
let routeErrorResponse = _chunkYNGRUB6Fjs.decodeRouteErrorResponseDigest.call(void 0, error.digest);
|
|
2125
2133
|
if (routeErrorResponse) {
|
|
2126
2134
|
renderError = routeErrorResponse;
|
|
2127
2135
|
status = routeErrorResponse.status;
|
|
@@ -2142,7 +2150,7 @@ async function routeRSCServerRequest({
|
|
|
2142
2150
|
}
|
|
2143
2151
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2144
2152
|
if (renderRedirect) {
|
|
2145
|
-
if (
|
|
2153
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2146
2154
|
throw new Error("Invalid redirect location");
|
|
2147
2155
|
}
|
|
2148
2156
|
headers.set("Location", renderRedirect.location);
|
|
@@ -2154,12 +2162,12 @@ async function routeRSCServerRequest({
|
|
|
2154
2162
|
const redirectTransform = new TransformStream({
|
|
2155
2163
|
flush(controller) {
|
|
2156
2164
|
if (renderRedirect) {
|
|
2157
|
-
if (
|
|
2165
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2158
2166
|
return;
|
|
2159
2167
|
}
|
|
2160
2168
|
controller.enqueue(
|
|
2161
2169
|
new TextEncoder().encode(
|
|
2162
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2170
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkYNGRUB6Fjs.escapeAttribute.call(void 0, renderRedirect.location)}"/>`
|
|
2163
2171
|
)
|
|
2164
2172
|
);
|
|
2165
2173
|
}
|
|
@@ -2186,7 +2194,7 @@ async function routeRSCServerRequest({
|
|
|
2186
2194
|
return error;
|
|
2187
2195
|
}
|
|
2188
2196
|
if (renderRedirect) {
|
|
2189
|
-
if (
|
|
2197
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2190
2198
|
throw new Error("Invalid redirect location");
|
|
2191
2199
|
}
|
|
2192
2200
|
return new Response(`Redirect: ${renderRedirect.location}`, {
|
|
@@ -2198,7 +2206,7 @@ async function routeRSCServerRequest({
|
|
|
2198
2206
|
}
|
|
2199
2207
|
try {
|
|
2200
2208
|
let normalizedError = _nullishCoalesce(renderError, () => ( error));
|
|
2201
|
-
let [status, statusText] =
|
|
2209
|
+
let [status, statusText] = _chunkYNGRUB6Fjs.isRouteErrorResponse.call(void 0, normalizedError) ? [normalizedError.status, normalizedError.statusText] : [500, ""];
|
|
2202
2210
|
let retryRedirect;
|
|
2203
2211
|
let reactHeaders = new Headers();
|
|
2204
2212
|
const html = await renderHTML(
|
|
@@ -2235,11 +2243,11 @@ async function routeRSCServerRequest({
|
|
|
2235
2243
|
{
|
|
2236
2244
|
onError(error2) {
|
|
2237
2245
|
if (typeof error2 === "object" && error2 && "digest" in error2 && typeof error2.digest === "string") {
|
|
2238
|
-
retryRedirect =
|
|
2246
|
+
retryRedirect = _chunkYNGRUB6Fjs.decodeRedirectErrorDigest.call(void 0, error2.digest);
|
|
2239
2247
|
if (retryRedirect) {
|
|
2240
2248
|
return error2.digest;
|
|
2241
2249
|
}
|
|
2242
|
-
let routeErrorResponse =
|
|
2250
|
+
let routeErrorResponse = _chunkYNGRUB6Fjs.decodeRouteErrorResponseDigest.call(void 0,
|
|
2243
2251
|
error2.digest
|
|
2244
2252
|
);
|
|
2245
2253
|
if (routeErrorResponse) {
|
|
@@ -2262,7 +2270,7 @@ async function routeRSCServerRequest({
|
|
|
2262
2270
|
}
|
|
2263
2271
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2264
2272
|
if (retryRedirect) {
|
|
2265
|
-
if (
|
|
2273
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2266
2274
|
throw new Error("Invalid redirect location");
|
|
2267
2275
|
}
|
|
2268
2276
|
headers.set("Location", retryRedirect.location);
|
|
@@ -2274,12 +2282,12 @@ async function routeRSCServerRequest({
|
|
|
2274
2282
|
const retryRedirectTransform = new TransformStream({
|
|
2275
2283
|
flush(controller) {
|
|
2276
2284
|
if (retryRedirect) {
|
|
2277
|
-
if (
|
|
2285
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2278
2286
|
return;
|
|
2279
2287
|
}
|
|
2280
2288
|
controller.enqueue(
|
|
2281
2289
|
new TextEncoder().encode(
|
|
2282
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2290
|
+
`<meta http-equiv="refresh" content="0;url=${_chunkYNGRUB6Fjs.escapeAttribute.call(void 0, retryRedirect.location)}"/>`
|
|
2283
2291
|
)
|
|
2284
2292
|
);
|
|
2285
2293
|
}
|
|
@@ -2310,7 +2318,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2310
2318
|
const decoded = getPayload();
|
|
2311
2319
|
const payload = useSafe(decoded);
|
|
2312
2320
|
if (payload.type === "redirect") {
|
|
2313
|
-
if (
|
|
2321
|
+
if (_chunkYNGRUB6Fjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2314
2322
|
throw new Error("Invalid redirect location");
|
|
2315
2323
|
}
|
|
2316
2324
|
throw new Response(null, {
|
|
@@ -2323,7 +2331,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2323
2331
|
if (payload.type !== "render") return null;
|
|
2324
2332
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2325
2333
|
for (const match of payload.matches) {
|
|
2326
|
-
if (
|
|
2334
|
+
if (_chunkYNGRUB6Fjs.shouldHydrateRouteLoader.call(void 0,
|
|
2327
2335
|
match.id,
|
|
2328
2336
|
match.clientLoader,
|
|
2329
2337
|
match.hasLoader,
|
|
@@ -2363,7 +2371,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2363
2371
|
}
|
|
2364
2372
|
}))
|
|
2365
2373
|
};
|
|
2366
|
-
const router =
|
|
2374
|
+
const router = _chunkAOOKMWNDjs.createStaticRouter.call(void 0,
|
|
2367
2375
|
payload.matches.reduceRight((previous, match) => {
|
|
2368
2376
|
const route = {
|
|
2369
2377
|
id: match.id,
|
|
@@ -2411,10 +2419,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2411
2419
|
mode: "lazy",
|
|
2412
2420
|
manifestPath: payload.routeDiscovery.manifestPath || defaultManifestPath
|
|
2413
2421
|
},
|
|
2414
|
-
routeModules:
|
|
2422
|
+
routeModules: _chunkQURBR4FZjs.createRSCRouteModules.call(void 0, payload)
|
|
2415
2423
|
};
|
|
2416
|
-
return /* @__PURE__ */ React3.createElement(
|
|
2417
|
-
|
|
2424
|
+
return /* @__PURE__ */ React3.createElement(_chunkYNGRUB6Fjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkQURBR4FZjs.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunkYNGRUB6Fjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2425
|
+
_chunkAOOKMWNDjs.StaticRouterProvider,
|
|
2418
2426
|
{
|
|
2419
2427
|
context,
|
|
2420
2428
|
router,
|
|
@@ -2559,4 +2567,4 @@ function isManifestRequest(url) {
|
|
|
2559
2567
|
|
|
2560
2568
|
|
|
2561
2569
|
|
|
2562
|
-
exports.Await =
|
|
2570
|
+
exports.Await = _chunkYNGRUB6Fjs.Await; exports.BrowserRouter = _chunkAOOKMWNDjs.BrowserRouter; exports.Form = _chunkAOOKMWNDjs.Form; exports.HashRouter = _chunkAOOKMWNDjs.HashRouter; exports.IDLE_BLOCKER = _chunkYNGRUB6Fjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkYNGRUB6Fjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkYNGRUB6Fjs.IDLE_NAVIGATION; exports.Link = _chunkAOOKMWNDjs.Link; exports.Links = _chunkYNGRUB6Fjs.Links; exports.MemoryRouter = _chunkYNGRUB6Fjs.MemoryRouter; exports.Meta = _chunkYNGRUB6Fjs.Meta; exports.NavLink = _chunkAOOKMWNDjs.NavLink; exports.Navigate = _chunkYNGRUB6Fjs.Navigate; exports.NavigationType = _chunkYNGRUB6Fjs.Action; exports.Outlet = _chunkYNGRUB6Fjs.Outlet; exports.PrefetchPageLinks = _chunkYNGRUB6Fjs.PrefetchPageLinks; exports.Route = _chunkYNGRUB6Fjs.Route; exports.Router = _chunkYNGRUB6Fjs.Router; exports.RouterContextProvider = _chunkYNGRUB6Fjs.RouterContextProvider; exports.RouterProvider = _chunkYNGRUB6Fjs.RouterProvider; exports.Routes = _chunkYNGRUB6Fjs.Routes; exports.Scripts = _chunkYNGRUB6Fjs.Scripts; exports.ScrollRestoration = _chunkAOOKMWNDjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkAOOKMWNDjs.StaticRouter; exports.StaticRouterProvider = _chunkAOOKMWNDjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkYNGRUB6Fjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkYNGRUB6Fjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkYNGRUB6Fjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkYNGRUB6Fjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkYNGRUB6Fjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkYNGRUB6Fjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkYNGRUB6Fjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkYNGRUB6Fjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkQURBR4FZjs.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkYNGRUB6Fjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkYNGRUB6Fjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkYNGRUB6Fjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkYNGRUB6Fjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkYNGRUB6Fjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkYNGRUB6Fjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkYNGRUB6Fjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkYNGRUB6Fjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkYNGRUB6Fjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkYNGRUB6Fjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createHashHistory = _chunkYNGRUB6Fjs.createHashHistory; exports.UNSAFE_createMemoryHistory = _chunkYNGRUB6Fjs.createMemoryHistory; exports.UNSAFE_createRouter = _chunkYNGRUB6Fjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkYNGRUB6Fjs.decodeViaTurboStream; exports.UNSAFE_getHydrationData = _chunkQURBR4FZjs.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkYNGRUB6Fjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkYNGRUB6Fjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkYNGRUB6Fjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkYNGRUB6Fjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkYNGRUB6Fjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkYNGRUB6Fjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkYNGRUB6Fjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkAOOKMWNDjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkYNGRUB6Fjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkYNGRUB6Fjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkYNGRUB6Fjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkAOOKMWNDjs.createBrowserRouter; exports.createContext = _chunkYNGRUB6Fjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkAOOKMWNDjs.createHashRouter; exports.createMemoryRouter = _chunkYNGRUB6Fjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkYNGRUB6Fjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkYNGRUB6Fjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkYNGRUB6Fjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkAOOKMWNDjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkAOOKMWNDjs.createStaticHandler; exports.createStaticRouter = _chunkAOOKMWNDjs.createStaticRouter; exports.data = _chunkYNGRUB6Fjs.data; exports.generatePath = _chunkYNGRUB6Fjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkYNGRUB6Fjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkYNGRUB6Fjs.matchPath; exports.matchRoutes = _chunkYNGRUB6Fjs.matchRoutes; exports.parsePath = _chunkYNGRUB6Fjs.parsePath; exports.redirect = _chunkYNGRUB6Fjs.redirect; exports.redirectDocument = _chunkYNGRUB6Fjs.redirectDocument; exports.renderMatches = _chunkYNGRUB6Fjs.renderMatches; exports.replace = _chunkYNGRUB6Fjs.replace; exports.resolvePath = _chunkYNGRUB6Fjs.resolvePath; exports.unstable_HistoryRouter = _chunkAOOKMWNDjs.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkAOOKMWNDjs.usePrompt; exports.unstable_useRoute = _chunkYNGRUB6Fjs.useRoute; exports.unstable_useRouterState = _chunkYNGRUB6Fjs.useRouterState; exports.useActionData = _chunkYNGRUB6Fjs.useActionData; exports.useAsyncError = _chunkYNGRUB6Fjs.useAsyncError; exports.useAsyncValue = _chunkYNGRUB6Fjs.useAsyncValue; exports.useBeforeUnload = _chunkAOOKMWNDjs.useBeforeUnload; exports.useBlocker = _chunkYNGRUB6Fjs.useBlocker; exports.useFetcher = _chunkAOOKMWNDjs.useFetcher; exports.useFetchers = _chunkAOOKMWNDjs.useFetchers; exports.useFormAction = _chunkAOOKMWNDjs.useFormAction; exports.useHref = _chunkYNGRUB6Fjs.useHref; exports.useInRouterContext = _chunkYNGRUB6Fjs.useInRouterContext; exports.useLinkClickHandler = _chunkAOOKMWNDjs.useLinkClickHandler; exports.useLoaderData = _chunkYNGRUB6Fjs.useLoaderData; exports.useLocation = _chunkYNGRUB6Fjs.useLocation; exports.useMatch = _chunkYNGRUB6Fjs.useMatch; exports.useMatches = _chunkYNGRUB6Fjs.useMatches; exports.useNavigate = _chunkYNGRUB6Fjs.useNavigate; exports.useNavigation = _chunkYNGRUB6Fjs.useNavigation; exports.useNavigationType = _chunkYNGRUB6Fjs.useNavigationType; exports.useOutlet = _chunkYNGRUB6Fjs.useOutlet; exports.useOutletContext = _chunkYNGRUB6Fjs.useOutletContext; exports.useParams = _chunkYNGRUB6Fjs.useParams; exports.useResolvedPath = _chunkYNGRUB6Fjs.useResolvedPath; exports.useRevalidator = _chunkYNGRUB6Fjs.useRevalidator; exports.useRouteError = _chunkYNGRUB6Fjs.useRouteError; exports.useRouteLoaderData = _chunkYNGRUB6Fjs.useRouteLoaderData; exports.useRoutes = _chunkYNGRUB6Fjs.useRoutes; exports.useSearchParams = _chunkAOOKMWNDjs.useSearchParams; exports.useSubmit = _chunkAOOKMWNDjs.useSubmit; exports.useViewTransitionState = _chunkAOOKMWNDjs.useViewTransitionState;
|