react-router 7.9.3-pre.0 → 7.9.3
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 +10 -2
- package/dist/development/{chunk-HHJJZWWP.mjs → chunk-65XJMMLO.mjs} +2 -2
- package/dist/development/{chunk-MREZ7GBS.js → chunk-EUCGRVHH.js} +134 -134
- package/dist/development/{chunk-OUSD3CXG.js → chunk-LZYTN6SO.js} +1 -1
- package/dist/development/{chunk-TZREDCP7.mjs → chunk-NISHYRIK.mjs} +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.js +97 -97
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-AR4BV4G2.js → chunk-GWORLVRM.js} +1 -1
- package/dist/production/{chunk-YE2RU2Y2.js → chunk-LHDU32KO.js} +134 -134
- package/dist/production/{chunk-ZS4K3BVQ.mjs → chunk-LI6FX3G6.mjs} +2 -2
- package/dist/production/{chunk-RX77WZIY.mjs → chunk-VAVG4EWR.mjs} +2 -2
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.js +97 -97
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
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.9.3
|
|
2
|
+
* react-router v7.9.3
|
|
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 _chunkLHDU32KOjs = require('./chunk-LHDU32KO.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -146,7 +146,7 @@ var _chunkYE2RU2Y2js = require('./chunk-YE2RU2Y2.js');
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
var
|
|
149
|
+
var _chunkGWORLVRMjs = require('./chunk-GWORLVRM.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 = _chunkGWORLVRMjs.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 && _chunkGWORLVRMjs.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 = _chunkLHDU32KOjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
185
185
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
186
|
-
|
|
186
|
+
_chunkGWORLVRMjs.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(_chunkGWORLVRMjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
202
|
+
_chunkLHDU32KOjs.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
|
+
_chunkGWORLVRMjs.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
|
+
_chunkGWORLVRMjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
253
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkGWORLVRMjs.RouterContextProvider)() : {},
|
|
254
254
|
frameworkContextRef.current.manifest,
|
|
255
255
|
frameworkContextRef.current.routeModules
|
|
256
256
|
);
|
|
257
|
-
routerRef.current =
|
|
257
|
+
routerRef.current = _chunkLHDU32KOjs.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(_chunkGWORLVRMjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkLHDU32KOjs.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 ? _chunkLHDU32KOjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
278
|
+
HydrateFallback: route.HydrateFallback ? _chunkLHDU32KOjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
279
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkLHDU32KOjs.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 || _chunkLHDU32KOjs.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
|
+
_chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkGWORLVRMjs.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 _chunkGWORLVRMjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
728
728
|
let data2 = decoded.value;
|
|
729
|
-
if (data2 &&
|
|
730
|
-
let result = data2[
|
|
729
|
+
if (data2 && _chunkGWORLVRMjs.SingleFetchRedirectSymbol in data2) {
|
|
730
|
+
let result = data2[_chunkGWORLVRMjs.SingleFetchRedirectSymbol];
|
|
731
731
|
let init = { status: result.status };
|
|
732
732
|
if (result.reload) {
|
|
733
|
-
throw
|
|
733
|
+
throw _chunkGWORLVRMjs.redirectDocument.call(void 0, result.redirect, init);
|
|
734
734
|
} else if (result.replace) {
|
|
735
|
-
throw
|
|
735
|
+
throw _chunkGWORLVRMjs.replace.call(void 0, result.redirect, init);
|
|
736
736
|
} else {
|
|
737
|
-
throw
|
|
737
|
+
throw _chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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
|
+
..._chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 (!_chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 (!_chunkGWORLVRMjs.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" ? { [_chunkGWORLVRMjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1029
1029
|
headers,
|
|
1030
|
-
status:
|
|
1030
|
+
status: _chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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" && _chunkGWORLVRMjs.SingleFetchRedirectSymbol in value) {
|
|
1075
|
+
return ["SingleFetchRedirect", value[_chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.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
|
+
_chunkGWORLVRMjs.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 _chunkGWORLVRMjs.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, _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1178
1178
|
if (strippedPath == null) {
|
|
1179
1179
|
errorHandler(
|
|
1180
|
-
new (0,
|
|
1180
|
+
new (0, _chunkGWORLVRMjs.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, _chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.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 (!_chunkGWORLVRMjs.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 (!_chunkGWORLVRMjs.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 (!_chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.isResponse.call(void 0, error)) {
|
|
1469
1469
|
try {
|
|
1470
1470
|
let data2 = await unwrapResponse(error);
|
|
1471
|
-
errorForSecondRender = new (0,
|
|
1471
|
+
errorForSecondRender = new (0, _chunkGWORLVRMjs.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 = _chunkGWORLVRMjs.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 (_chunkGWORLVRMjs.isResponse.call(void 0, result)) {
|
|
1539
1539
|
return result;
|
|
1540
1540
|
}
|
|
1541
1541
|
if (typeof result === "string") {
|
|
@@ -1544,10 +1544,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1544
1544
|
return Response.json(result);
|
|
1545
1545
|
}
|
|
1546
1546
|
function handleQueryRouteError(error) {
|
|
1547
|
-
if (
|
|
1547
|
+
if (_chunkGWORLVRMjs.isResponse.call(void 0, error)) {
|
|
1548
1548
|
return error;
|
|
1549
1549
|
}
|
|
1550
|
-
if (
|
|
1550
|
+
if (_chunkGWORLVRMjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1551
1551
|
handleError(error);
|
|
1552
1552
|
return errorResponseToJson(error, serverMode);
|
|
1553
1553
|
}
|
|
@@ -1670,7 +1670,7 @@ function createSessionStorage({
|
|
|
1670
1670
|
};
|
|
1671
1671
|
}
|
|
1672
1672
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1673
|
-
|
|
1673
|
+
_chunkGWORLVRMjs.warnOnce.call(void 0,
|
|
1674
1674
|
cookie.isSigned,
|
|
1675
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.`
|
|
1676
1676
|
);
|
|
@@ -1777,12 +1777,12 @@ function getHydrationData({
|
|
|
1777
1777
|
...state,
|
|
1778
1778
|
loaderData: { ...state.loaderData }
|
|
1779
1779
|
};
|
|
1780
|
-
let initialMatches =
|
|
1780
|
+
let initialMatches = _chunkGWORLVRMjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1781
1781
|
if (initialMatches) {
|
|
1782
1782
|
for (let match of initialMatches) {
|
|
1783
1783
|
let routeId = match.route.id;
|
|
1784
1784
|
let routeInfo = getRouteInfo(routeId);
|
|
1785
|
-
if (
|
|
1785
|
+
if (_chunkGWORLVRMjs.shouldHydrateRouteLoader.call(void 0,
|
|
1786
1786
|
routeId,
|
|
1787
1787
|
routeInfo.clientLoader,
|
|
1788
1788
|
routeInfo.hasLoader,
|
|
@@ -1860,7 +1860,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
);
|
|
1863
|
-
if (
|
|
1863
|
+
if (_chunkGWORLVRMjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1864
1864
|
return /* @__PURE__ */ React.default.createElement(
|
|
1865
1865
|
ErrorWrapper,
|
|
1866
1866
|
{
|
|
@@ -1868,7 +1868,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1868
1868
|
title: "Unhandled Thrown Response!"
|
|
1869
1869
|
},
|
|
1870
1870
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1871
|
-
|
|
1871
|
+
_chunkGWORLVRMjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1872
1872
|
);
|
|
1873
1873
|
}
|
|
1874
1874
|
let errorInstance;
|
|
@@ -1894,7 +1894,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1894
1894
|
function RSCDefaultRootErrorBoundary({
|
|
1895
1895
|
hasRootLayout
|
|
1896
1896
|
}) {
|
|
1897
|
-
let error =
|
|
1897
|
+
let error = _chunkGWORLVRMjs.useRouteError.call(void 0, );
|
|
1898
1898
|
if (hasRootLayout === void 0) {
|
|
1899
1899
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1900
1900
|
}
|
|
@@ -2042,7 +2042,7 @@ function createRouterFromPayload({
|
|
|
2042
2042
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2043
2043
|
let patches = /* @__PURE__ */ new Map();
|
|
2044
2044
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2045
|
-
|
|
2045
|
+
_chunkGWORLVRMjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2046
2046
|
if (!patches.has(patch.parentId)) {
|
|
2047
2047
|
patches.set(patch.parentId, []);
|
|
2048
2048
|
}
|
|
@@ -2064,11 +2064,11 @@ function createRouterFromPayload({
|
|
|
2064
2064
|
}
|
|
2065
2065
|
return [route];
|
|
2066
2066
|
}, []);
|
|
2067
|
-
globalVar.__reactRouterDataRouter =
|
|
2067
|
+
globalVar.__reactRouterDataRouter = _chunkGWORLVRMjs.createRouter.call(void 0, {
|
|
2068
2068
|
routes,
|
|
2069
2069
|
getContext,
|
|
2070
2070
|
basename: payload.basename,
|
|
2071
|
-
history:
|
|
2071
|
+
history: _chunkGWORLVRMjs.createBrowserHistory.call(void 0, ),
|
|
2072
2072
|
hydrationData: getHydrationData({
|
|
2073
2073
|
state: {
|
|
2074
2074
|
loaderData: payload.loaderData,
|
|
@@ -2078,7 +2078,7 @@ function createRouterFromPayload({
|
|
|
2078
2078
|
routes,
|
|
2079
2079
|
getRouteInfo: (routeId) => {
|
|
2080
2080
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2081
|
-
|
|
2081
|
+
_chunkGWORLVRMjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2082
2082
|
return {
|
|
2083
2083
|
clientLoader: match.clientLoader,
|
|
2084
2084
|
hasLoader: match.hasLoader,
|
|
@@ -2176,9 +2176,9 @@ function createRouterFromPayload({
|
|
|
2176
2176
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2177
2177
|
};
|
|
2178
2178
|
}
|
|
2179
|
-
var renderedRoutesContext =
|
|
2179
|
+
var renderedRoutesContext = _chunkGWORLVRMjs.createContext.call(void 0, );
|
|
2180
2180
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2181
|
-
let dataStrategy =
|
|
2181
|
+
let dataStrategy = _chunkGWORLVRMjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2182
2182
|
getRouter,
|
|
2183
2183
|
(match) => {
|
|
2184
2184
|
let M = match;
|
|
@@ -2232,20 +2232,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2232
2232
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2233
2233
|
return async (args, basename, targetRoutes) => {
|
|
2234
2234
|
let { request, context } = args;
|
|
2235
|
-
let url =
|
|
2235
|
+
let url = _chunkGWORLVRMjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2236
2236
|
if (request.method === "GET") {
|
|
2237
|
-
url =
|
|
2237
|
+
url = _chunkGWORLVRMjs.stripIndexParam.call(void 0, url);
|
|
2238
2238
|
if (targetRoutes) {
|
|
2239
2239
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
2242
|
let res = await fetchImplementation(
|
|
2243
|
-
new Request(url, await
|
|
2243
|
+
new Request(url, await _chunkGWORLVRMjs.createRequestInit.call(void 0, request))
|
|
2244
2244
|
);
|
|
2245
2245
|
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2246
|
-
throw new (0,
|
|
2246
|
+
throw new (0, _chunkGWORLVRMjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2247
2247
|
}
|
|
2248
|
-
|
|
2248
|
+
_chunkGWORLVRMjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2249
2249
|
try {
|
|
2250
2250
|
const payload = await createFromReadableStream(res.body, {
|
|
2251
2251
|
temporaryReferences: void 0
|
|
@@ -2269,7 +2269,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2269
2269
|
}
|
|
2270
2270
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2271
2271
|
let results = { routes: {} };
|
|
2272
|
-
const dataKey =
|
|
2272
|
+
const dataKey = _chunkGWORLVRMjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2273
2273
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2274
2274
|
results.routes[routeId] = { data: data2 };
|
|
2275
2275
|
}
|
|
@@ -2302,7 +2302,7 @@ function RSCHydratedRouter({
|
|
|
2302
2302
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2303
2303
|
);
|
|
2304
2304
|
React4.useEffect(() => {
|
|
2305
|
-
|
|
2305
|
+
_chunkGWORLVRMjs.setIsHydrated.call(void 0, );
|
|
2306
2306
|
}, []);
|
|
2307
2307
|
React4.useLayoutEffect(() => {
|
|
2308
2308
|
const globalVar = window;
|
|
@@ -2389,7 +2389,7 @@ function RSCHydratedRouter({
|
|
|
2389
2389
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2390
2390
|
routeModules
|
|
2391
2391
|
};
|
|
2392
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2392
|
+
return /* @__PURE__ */ React4.createElement(_chunkGWORLVRMjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkGWORLVRMjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkLHDU32KOjs.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2393
2393
|
}
|
|
2394
2394
|
function createRouteFromServerManifest(match, payload) {
|
|
2395
2395
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2400,7 +2400,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2400
2400
|
// the server loader flow regardless of whether the client loader calls
|
|
2401
2401
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2402
2402
|
match.hasComponent && !match.element;
|
|
2403
|
-
|
|
2403
|
+
_chunkGWORLVRMjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2404
2404
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2405
2405
|
let dataRoute = {
|
|
2406
2406
|
id: match.id,
|
|
@@ -2451,7 +2451,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2451
2451
|
return await callSingleFetch(singleFetch);
|
|
2452
2452
|
}
|
|
2453
2453
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2454
|
-
throw
|
|
2454
|
+
throw _chunkGWORLVRMjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2455
2455
|
},
|
|
2456
2456
|
path: match.path,
|
|
2457
2457
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2464,7 +2464,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2464
2464
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2465
2465
|
};
|
|
2466
2466
|
if (typeof dataRoute.loader === "function") {
|
|
2467
|
-
dataRoute.loader.hydrate =
|
|
2467
|
+
dataRoute.loader.hydrate = _chunkGWORLVRMjs.shouldHydrateRouteLoader.call(void 0,
|
|
2468
2468
|
match.id,
|
|
2469
2469
|
match.clientLoader,
|
|
2470
2470
|
match.hasLoader,
|
|
@@ -2474,7 +2474,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2474
2474
|
return dataRoute;
|
|
2475
2475
|
}
|
|
2476
2476
|
function callSingleFetch(singleFetch) {
|
|
2477
|
-
|
|
2477
|
+
_chunkGWORLVRMjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2478
2478
|
return singleFetch();
|
|
2479
2479
|
}
|
|
2480
2480
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2482,7 +2482,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2482
2482
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2483
2483
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2484
2484
|
console.error(msg);
|
|
2485
|
-
throw new (0,
|
|
2485
|
+
throw new (0, _chunkGWORLVRMjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2486
2486
|
}
|
|
2487
2487
|
}
|
|
2488
2488
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2726,7 +2726,7 @@ async function routeRSCServerRequest({
|
|
|
2726
2726
|
const payload = await createFromReadableStream(
|
|
2727
2727
|
detectRedirectResponse.body
|
|
2728
2728
|
);
|
|
2729
|
-
if (serverResponse.status ===
|
|
2729
|
+
if (serverResponse.status === _chunkGWORLVRMjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2730
2730
|
const headers2 = new Headers(serverResponse.headers);
|
|
2731
2731
|
headers2.delete("Content-Encoding");
|
|
2732
2732
|
headers2.delete("Content-Length");
|
|
@@ -2761,7 +2761,7 @@ async function routeRSCServerRequest({
|
|
|
2761
2761
|
return reason;
|
|
2762
2762
|
}
|
|
2763
2763
|
try {
|
|
2764
|
-
const status =
|
|
2764
|
+
const status = _chunkGWORLVRMjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2765
2765
|
const html = await renderHTML(() => {
|
|
2766
2766
|
const decoded = Promise.resolve(
|
|
2767
2767
|
createFromReadableStream(createStream())
|
|
@@ -2827,7 +2827,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2827
2827
|
if (payload.type !== "render") return null;
|
|
2828
2828
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2829
2829
|
for (const match of payload.matches) {
|
|
2830
|
-
if (
|
|
2830
|
+
if (_chunkGWORLVRMjs.shouldHydrateRouteLoader.call(void 0,
|
|
2831
2831
|
match.id,
|
|
2832
2832
|
match.clientLoader,
|
|
2833
2833
|
match.hasLoader,
|
|
@@ -2867,7 +2867,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2867
2867
|
}
|
|
2868
2868
|
}))
|
|
2869
2869
|
};
|
|
2870
|
-
const router =
|
|
2870
|
+
const router = _chunkLHDU32KOjs.createStaticRouter.call(void 0,
|
|
2871
2871
|
payload.matches.reduceRight((previous, match) => {
|
|
2872
2872
|
const route = {
|
|
2873
2873
|
id: match.id,
|
|
@@ -2911,8 +2911,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2911
2911
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2912
2912
|
routeModules: createRSCRouteModules(payload)
|
|
2913
2913
|
};
|
|
2914
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2915
|
-
|
|
2914
|
+
return /* @__PURE__ */ React5.createElement(_chunkGWORLVRMjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkGWORLVRMjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2915
|
+
_chunkLHDU32KOjs.StaticRouterProvider,
|
|
2916
2916
|
{
|
|
2917
2917
|
context,
|
|
2918
2918
|
router,
|
|
@@ -2970,7 +2970,7 @@ function deserializeErrors(errors) {
|
|
|
2970
2970
|
let serialized = {};
|
|
2971
2971
|
for (let [key, val] of entries) {
|
|
2972
2972
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2973
|
-
serialized[key] = new (0,
|
|
2973
|
+
serialized[key] = new (0, _chunkGWORLVRMjs.ErrorResponseImpl)(
|
|
2974
2974
|
val.status,
|
|
2975
2975
|
val.statusText,
|
|
2976
2976
|
val.data,
|
|
@@ -3129,4 +3129,4 @@ function deserializeErrors(errors) {
|
|
|
3129
3129
|
|
|
3130
3130
|
|
|
3131
3131
|
|
|
3132
|
-
exports.Await =
|
|
3132
|
+
exports.Await = _chunkLHDU32KOjs.Await; exports.BrowserRouter = _chunkLHDU32KOjs.BrowserRouter; exports.Form = _chunkLHDU32KOjs.Form; exports.HashRouter = _chunkLHDU32KOjs.HashRouter; exports.IDLE_BLOCKER = _chunkGWORLVRMjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkGWORLVRMjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkGWORLVRMjs.IDLE_NAVIGATION; exports.Link = _chunkLHDU32KOjs.Link; exports.Links = _chunkGWORLVRMjs.Links; exports.MemoryRouter = _chunkLHDU32KOjs.MemoryRouter; exports.Meta = _chunkGWORLVRMjs.Meta; exports.NavLink = _chunkLHDU32KOjs.NavLink; exports.Navigate = _chunkLHDU32KOjs.Navigate; exports.NavigationType = _chunkGWORLVRMjs.Action; exports.Outlet = _chunkLHDU32KOjs.Outlet; exports.PrefetchPageLinks = _chunkGWORLVRMjs.PrefetchPageLinks; exports.Route = _chunkLHDU32KOjs.Route; exports.Router = _chunkLHDU32KOjs.Router; exports.RouterContextProvider = _chunkGWORLVRMjs.RouterContextProvider; exports.RouterProvider = _chunkLHDU32KOjs.RouterProvider; exports.Routes = _chunkLHDU32KOjs.Routes; exports.Scripts = _chunkGWORLVRMjs.Scripts; exports.ScrollRestoration = _chunkLHDU32KOjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkLHDU32KOjs.StaticRouter; exports.StaticRouterProvider = _chunkLHDU32KOjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkGWORLVRMjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkGWORLVRMjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkGWORLVRMjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkGWORLVRMjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkGWORLVRMjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkGWORLVRMjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkGWORLVRMjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkGWORLVRMjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkGWORLVRMjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkGWORLVRMjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkGWORLVRMjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkGWORLVRMjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkLHDU32KOjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkLHDU32KOjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkLHDU32KOjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkGWORLVRMjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkGWORLVRMjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkGWORLVRMjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkGWORLVRMjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkGWORLVRMjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkGWORLVRMjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkGWORLVRMjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkLHDU32KOjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkGWORLVRMjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkLHDU32KOjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkGWORLVRMjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkGWORLVRMjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkLHDU32KOjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkLHDU32KOjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkLHDU32KOjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkLHDU32KOjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkLHDU32KOjs.createBrowserRouter; exports.createContext = _chunkGWORLVRMjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkLHDU32KOjs.createHashRouter; exports.createMemoryRouter = _chunkLHDU32KOjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkGWORLVRMjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkLHDU32KOjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkLHDU32KOjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkLHDU32KOjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkLHDU32KOjs.createStaticHandler; exports.createStaticRouter = _chunkLHDU32KOjs.createStaticRouter; exports.data = _chunkGWORLVRMjs.data; exports.generatePath = _chunkGWORLVRMjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkGWORLVRMjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkGWORLVRMjs.matchPath; exports.matchRoutes = _chunkGWORLVRMjs.matchRoutes; exports.parsePath = _chunkGWORLVRMjs.parsePath; exports.redirect = _chunkGWORLVRMjs.redirect; exports.redirectDocument = _chunkGWORLVRMjs.redirectDocument; exports.renderMatches = _chunkLHDU32KOjs.renderMatches; exports.replace = _chunkGWORLVRMjs.replace; exports.resolvePath = _chunkGWORLVRMjs.resolvePath; exports.unstable_HistoryRouter = _chunkLHDU32KOjs.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 = _chunkLHDU32KOjs.usePrompt; exports.useActionData = _chunkGWORLVRMjs.useActionData; exports.useAsyncError = _chunkGWORLVRMjs.useAsyncError; exports.useAsyncValue = _chunkGWORLVRMjs.useAsyncValue; exports.useBeforeUnload = _chunkLHDU32KOjs.useBeforeUnload; exports.useBlocker = _chunkGWORLVRMjs.useBlocker; exports.useFetcher = _chunkLHDU32KOjs.useFetcher; exports.useFetchers = _chunkLHDU32KOjs.useFetchers; exports.useFormAction = _chunkLHDU32KOjs.useFormAction; exports.useHref = _chunkGWORLVRMjs.useHref; exports.useInRouterContext = _chunkGWORLVRMjs.useInRouterContext; exports.useLinkClickHandler = _chunkLHDU32KOjs.useLinkClickHandler; exports.useLoaderData = _chunkGWORLVRMjs.useLoaderData; exports.useLocation = _chunkGWORLVRMjs.useLocation; exports.useMatch = _chunkGWORLVRMjs.useMatch; exports.useMatches = _chunkGWORLVRMjs.useMatches; exports.useNavigate = _chunkGWORLVRMjs.useNavigate; exports.useNavigation = _chunkGWORLVRMjs.useNavigation; exports.useNavigationType = _chunkGWORLVRMjs.useNavigationType; exports.useOutlet = _chunkGWORLVRMjs.useOutlet; exports.useOutletContext = _chunkGWORLVRMjs.useOutletContext; exports.useParams = _chunkGWORLVRMjs.useParams; exports.useResolvedPath = _chunkGWORLVRMjs.useResolvedPath; exports.useRevalidator = _chunkGWORLVRMjs.useRevalidator; exports.useRouteError = _chunkGWORLVRMjs.useRouteError; exports.useRouteLoaderData = _chunkGWORLVRMjs.useRouteLoaderData; exports.useRoutes = _chunkGWORLVRMjs.useRoutes; exports.useSearchParams = _chunkLHDU32KOjs.useSearchParams; exports.useSubmit = _chunkLHDU32KOjs.useSubmit; exports.useViewTransitionState = _chunkLHDU32KOjs.useViewTransitionState;
|