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