react-router 7.8.0-pre.3 → 7.8.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 +48 -51
- package/dist/development/{chunk-EMJKA2DP.js → chunk-EVX7OBGB.js} +1 -1
- package/dist/{production/chunk-FAP2Y6DN.mjs → development/chunk-HZX6U7MI.mjs} +2 -2
- package/dist/{production/chunk-P3LQNPHZ.js → development/chunk-VC6RBZTR.js} +130 -130
- package/dist/development/{chunk-3R2RUFHW.mjs → chunk-ZYFC6VSF.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 +98 -98
- 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-3DLLP6EB.js → chunk-BOD6JCOU.js} +1 -1
- package/dist/{development/chunk-XMXDJESK.js → production/chunk-O6DRQPUD.js} +130 -130
- package/dist/production/{chunk-3DKAIR2L.mjs → chunk-SIHON65V.mjs} +2 -2
- package/dist/{development/chunk-CQQ53FN5.mjs → production/chunk-XPGU3ZMH.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 +98 -98
- 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.8.0
|
|
2
|
+
* react-router v7.8.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var _chunkVC6RBZTRjs = require('./chunk-VC6RBZTR.js');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -142,7 +142,7 @@ var _chunkXMXDJESKjs = require('./chunk-XMXDJESK.js');
|
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
var
|
|
145
|
+
var _chunkEVX7OBGBjs = require('./chunk-EVX7OBGB.js');
|
|
146
146
|
|
|
147
147
|
// lib/dom/ssr/server.tsx
|
|
148
148
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -155,7 +155,7 @@ function ServerRouter({
|
|
|
155
155
|
url = new URL(url);
|
|
156
156
|
}
|
|
157
157
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
158
|
-
let routes =
|
|
158
|
+
let routes = _chunkEVX7OBGBjs.createServerRoutes.call(void 0,
|
|
159
159
|
manifest.routes,
|
|
160
160
|
routeModules,
|
|
161
161
|
context.future,
|
|
@@ -168,7 +168,7 @@ function ServerRouter({
|
|
|
168
168
|
let routeId = match.route.id;
|
|
169
169
|
let route = routeModules[routeId];
|
|
170
170
|
let manifestRoute = context.manifest.routes[routeId];
|
|
171
|
-
if (route && manifestRoute &&
|
|
171
|
+
if (route && manifestRoute && _chunkEVX7OBGBjs.shouldHydrateRouteLoader.call(void 0,
|
|
172
172
|
routeId,
|
|
173
173
|
route.clientLoader,
|
|
174
174
|
manifestRoute.hasLoader,
|
|
@@ -177,9 +177,9 @@ function ServerRouter({
|
|
|
177
177
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
let router =
|
|
180
|
+
let router = _chunkVC6RBZTRjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
181
181
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
182
|
-
|
|
182
|
+
_chunkEVX7OBGBjs.FrameworkContext.Provider,
|
|
183
183
|
{
|
|
184
184
|
value: {
|
|
185
185
|
manifest,
|
|
@@ -194,8 +194,8 @@ function ServerRouter({
|
|
|
194
194
|
renderMeta: context.renderMeta
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
-
/* @__PURE__ */ React.createElement(
|
|
198
|
-
|
|
197
|
+
/* @__PURE__ */ React.createElement(_chunkEVX7OBGBjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
198
|
+
_chunkVC6RBZTRjs.StaticRouterProvider,
|
|
199
199
|
{
|
|
200
200
|
router,
|
|
201
201
|
context: context.staticHandlerContext,
|
|
@@ -203,7 +203,7 @@ function ServerRouter({
|
|
|
203
203
|
}
|
|
204
204
|
))
|
|
205
205
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
206
|
-
|
|
206
|
+
_chunkEVX7OBGBjs.StreamTransfer,
|
|
207
207
|
{
|
|
208
208
|
context,
|
|
209
209
|
identifier: 0,
|
|
@@ -245,18 +245,18 @@ function createRoutesStub(routes, _context) {
|
|
|
245
245
|
let patched = processRoutes(
|
|
246
246
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
247
247
|
// types compared to `AgnosticRouteObject`
|
|
248
|
-
|
|
249
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.unstable_middleware]) ? new (0,
|
|
248
|
+
_chunkEVX7OBGBjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
249
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.unstable_middleware]) ? new (0, _chunkEVX7OBGBjs.unstable_RouterContextProvider)() : {},
|
|
250
250
|
frameworkContextRef.current.manifest,
|
|
251
251
|
frameworkContextRef.current.routeModules
|
|
252
252
|
);
|
|
253
|
-
routerRef.current =
|
|
253
|
+
routerRef.current = _chunkVC6RBZTRjs.createMemoryRouter.call(void 0, patched, {
|
|
254
254
|
initialEntries,
|
|
255
255
|
initialIndex,
|
|
256
256
|
hydrationData
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
return /* @__PURE__ */ React2.createElement(
|
|
259
|
+
return /* @__PURE__ */ React2.createElement(_chunkEVX7OBGBjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkVC6RBZTRjs.RouterProvider, { router: routerRef.current }));
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
262
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -270,9 +270,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
270
270
|
id: route.id,
|
|
271
271
|
path: route.path,
|
|
272
272
|
index: route.index,
|
|
273
|
-
Component: route.Component ?
|
|
274
|
-
HydrateFallback: route.HydrateFallback ?
|
|
275
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
273
|
+
Component: route.Component ? _chunkVC6RBZTRjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
274
|
+
HydrateFallback: route.HydrateFallback ? _chunkVC6RBZTRjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
275
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkVC6RBZTRjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
276
276
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
277
277
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
278
278
|
handle: route.handle,
|
|
@@ -301,7 +301,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
301
301
|
};
|
|
302
302
|
manifest.routes[newRoute.id] = entryRoute;
|
|
303
303
|
routeModules[route.id] = {
|
|
304
|
-
default: newRoute.Component ||
|
|
304
|
+
default: newRoute.Component || _chunkVC6RBZTRjs.Outlet,
|
|
305
305
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
306
306
|
handle: route.handle,
|
|
307
307
|
links: route.links,
|
|
@@ -496,7 +496,7 @@ function myUnescape(value) {
|
|
|
496
496
|
return result;
|
|
497
497
|
}
|
|
498
498
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
499
|
-
|
|
499
|
+
_chunkEVX7OBGBjs.warnOnce.call(void 0,
|
|
500
500
|
!expires,
|
|
501
501
|
`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.`
|
|
502
502
|
);
|
|
@@ -550,7 +550,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
550
550
|
let entries = Object.entries(errors);
|
|
551
551
|
let serialized = {};
|
|
552
552
|
for (let [key, val] of entries) {
|
|
553
|
-
if (
|
|
553
|
+
if (_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, val)) {
|
|
554
554
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
555
555
|
} else if (val instanceof Error) {
|
|
556
556
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -575,7 +575,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
575
575
|
|
|
576
576
|
// lib/server-runtime/routeMatching.ts
|
|
577
577
|
function matchServerRoutes(routes, pathname, basename) {
|
|
578
|
-
let matches =
|
|
578
|
+
let matches = _chunkEVX7OBGBjs.matchRoutes.call(void 0,
|
|
579
579
|
routes,
|
|
580
580
|
pathname,
|
|
581
581
|
basename
|
|
@@ -595,7 +595,7 @@ async function callRouteHandler(handler, args) {
|
|
|
595
595
|
params: args.params,
|
|
596
596
|
context: args.context
|
|
597
597
|
});
|
|
598
|
-
if (
|
|
598
|
+
if (_chunkEVX7OBGBjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkEVX7OBGBjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
599
599
|
throw new Response(null, result.init);
|
|
600
600
|
}
|
|
601
601
|
return result;
|
|
@@ -714,17 +714,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
714
714
|
controller.close();
|
|
715
715
|
}
|
|
716
716
|
});
|
|
717
|
-
let decoded = await
|
|
717
|
+
let decoded = await _chunkEVX7OBGBjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
718
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
719
|
+
if (data2 && _chunkEVX7OBGBjs.SingleFetchRedirectSymbol in data2) {
|
|
720
|
+
let result = data2[_chunkEVX7OBGBjs.SingleFetchRedirectSymbol];
|
|
721
721
|
let init = { status: result.status };
|
|
722
722
|
if (result.reload) {
|
|
723
|
-
throw
|
|
723
|
+
throw _chunkEVX7OBGBjs.redirectDocument.call(void 0, result.redirect, init);
|
|
724
724
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
725
|
+
throw _chunkEVX7OBGBjs.replace.call(void 0, result.redirect, init);
|
|
726
726
|
} else {
|
|
727
|
-
throw
|
|
727
|
+
throw _chunkEVX7OBGBjs.redirect.call(void 0, result.redirect, init);
|
|
728
728
|
}
|
|
729
729
|
} else {
|
|
730
730
|
invariant2(
|
|
@@ -853,7 +853,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
853
853
|
|
|
854
854
|
// lib/server-runtime/single-fetch.ts
|
|
855
855
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
856
|
-
...
|
|
856
|
+
..._chunkEVX7OBGBjs.NO_BODY_STATUS_CODES,
|
|
857
857
|
304
|
|
858
858
|
]);
|
|
859
859
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -883,10 +883,10 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
883
883
|
return handleQueryError(error);
|
|
884
884
|
}
|
|
885
885
|
function handleQueryResult(result) {
|
|
886
|
-
if (!
|
|
886
|
+
if (!_chunkEVX7OBGBjs.isResponse.call(void 0, result)) {
|
|
887
887
|
result = staticContextToResponse(result);
|
|
888
888
|
}
|
|
889
|
-
if (
|
|
889
|
+
if (_chunkEVX7OBGBjs.isRedirectResponse.call(void 0, result)) {
|
|
890
890
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
891
891
|
result: getSingleFetchRedirect(
|
|
892
892
|
result.status,
|
|
@@ -894,7 +894,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
894
894
|
build.basename
|
|
895
895
|
),
|
|
896
896
|
headers: result.headers,
|
|
897
|
-
status:
|
|
897
|
+
status: _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
900
|
return result;
|
|
@@ -909,7 +909,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
909
909
|
}
|
|
910
910
|
function staticContextToResponse(context) {
|
|
911
911
|
let headers = getDocumentHeaders(context, build);
|
|
912
|
-
if (
|
|
912
|
+
if (_chunkEVX7OBGBjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
913
913
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
914
914
|
result: getSingleFetchRedirect(
|
|
915
915
|
context.statusCode,
|
|
@@ -917,12 +917,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
917
917
|
build.basename
|
|
918
918
|
),
|
|
919
919
|
headers,
|
|
920
|
-
status:
|
|
920
|
+
status: _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
923
|
if (context.errors) {
|
|
924
924
|
Object.values(context.errors).forEach((err) => {
|
|
925
|
-
if (!
|
|
925
|
+
if (!_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
926
926
|
handleError(err);
|
|
927
927
|
}
|
|
928
928
|
});
|
|
@@ -969,18 +969,18 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
969
969
|
return handleQueryError(error);
|
|
970
970
|
}
|
|
971
971
|
function handleQueryResult(result) {
|
|
972
|
-
let response =
|
|
973
|
-
if (
|
|
972
|
+
let response = _chunkEVX7OBGBjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
973
|
+
if (_chunkEVX7OBGBjs.isRedirectResponse.call(void 0, response)) {
|
|
974
974
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
975
975
|
result: {
|
|
976
|
-
[
|
|
976
|
+
[_chunkEVX7OBGBjs.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
977
977
|
response.status,
|
|
978
978
|
response.headers,
|
|
979
979
|
build.basename
|
|
980
980
|
)
|
|
981
981
|
},
|
|
982
982
|
headers: response.headers,
|
|
983
|
-
status:
|
|
983
|
+
status: _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
984
984
|
});
|
|
985
985
|
}
|
|
986
986
|
return response;
|
|
@@ -995,22 +995,22 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
995
995
|
}
|
|
996
996
|
function staticContextToResponse(context) {
|
|
997
997
|
let headers = getDocumentHeaders(context, build);
|
|
998
|
-
if (
|
|
998
|
+
if (_chunkEVX7OBGBjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
999
999
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1000
1000
|
result: {
|
|
1001
|
-
[
|
|
1001
|
+
[_chunkEVX7OBGBjs.SingleFetchRedirectSymbol]: getSingleFetchRedirect(
|
|
1002
1002
|
context.statusCode,
|
|
1003
1003
|
headers,
|
|
1004
1004
|
build.basename
|
|
1005
1005
|
)
|
|
1006
1006
|
},
|
|
1007
1007
|
headers,
|
|
1008
|
-
status:
|
|
1008
|
+
status: _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
1011
|
if (context.errors) {
|
|
1012
1012
|
Object.values(context.errors).forEach((err) => {
|
|
1013
|
-
if (!
|
|
1013
|
+
if (!_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1014
1014
|
handleError(err);
|
|
1015
1015
|
}
|
|
1016
1016
|
});
|
|
@@ -1067,7 +1067,7 @@ function generateSingleFetchResponse(request, build, serverMode, {
|
|
|
1067
1067
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1068
1068
|
let redirect2 = headers.get("Location");
|
|
1069
1069
|
if (basename) {
|
|
1070
|
-
redirect2 =
|
|
1070
|
+
redirect2 = _chunkEVX7OBGBjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1071
1071
|
}
|
|
1072
1072
|
return {
|
|
1073
1073
|
redirect: redirect2,
|
|
@@ -1093,7 +1093,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1093
1093
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1094
1094
|
);
|
|
1095
1095
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1096
|
-
return
|
|
1096
|
+
return _chunkEVX7OBGBjs.encode.call(void 0, data2, {
|
|
1097
1097
|
signal: controller.signal,
|
|
1098
1098
|
plugins: [
|
|
1099
1099
|
(value) => {
|
|
@@ -1101,12 +1101,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1101
1101
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1102
1102
|
return ["SanitizedError", name, message, stack];
|
|
1103
1103
|
}
|
|
1104
|
-
if (value instanceof
|
|
1104
|
+
if (value instanceof _chunkEVX7OBGBjs.ErrorResponseImpl) {
|
|
1105
1105
|
let { data: data3, status, statusText } = value;
|
|
1106
1106
|
return ["ErrorResponse", data3, status, statusText];
|
|
1107
1107
|
}
|
|
1108
|
-
if (value && typeof value === "object" &&
|
|
1109
|
-
return ["SingleFetchRedirect", value[
|
|
1108
|
+
if (value && typeof value === "object" && _chunkEVX7OBGBjs.SingleFetchRedirectSymbol in value) {
|
|
1109
|
+
return ["SingleFetchRedirect", value[_chunkEVX7OBGBjs.SingleFetchRedirectSymbol]];
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
],
|
|
@@ -1129,14 +1129,14 @@ function derive(build, mode) {
|
|
|
1129
1129
|
let routes = createRoutes(build.routes);
|
|
1130
1130
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1131
1131
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1132
|
-
let staticHandler =
|
|
1132
|
+
let staticHandler = _chunkEVX7OBGBjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1133
1133
|
basename: build.basename
|
|
1134
1134
|
});
|
|
1135
1135
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1136
1136
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1137
1137
|
console.error(
|
|
1138
1138
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1139
|
-
|
|
1139
|
+
_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1140
1140
|
);
|
|
1141
1141
|
}
|
|
1142
1142
|
});
|
|
@@ -1182,26 +1182,26 @@ var createRequestHandler = (build, mode) => {
|
|
|
1182
1182
|
});
|
|
1183
1183
|
};
|
|
1184
1184
|
if (_build.future.unstable_middleware) {
|
|
1185
|
-
if (initialContext && !(initialContext instanceof
|
|
1185
|
+
if (initialContext && !(initialContext instanceof _chunkEVX7OBGBjs.unstable_RouterContextProvider)) {
|
|
1186
1186
|
let error = new Error(
|
|
1187
1187
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `unstable_RouterContextProvider` from your `getLoadContext` function."
|
|
1188
1188
|
);
|
|
1189
1189
|
handleError(error);
|
|
1190
1190
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1191
1191
|
}
|
|
1192
|
-
loadContext = initialContext || new (0,
|
|
1192
|
+
loadContext = initialContext || new (0, _chunkEVX7OBGBjs.unstable_RouterContextProvider)();
|
|
1193
1193
|
} else {
|
|
1194
1194
|
loadContext = initialContext || {};
|
|
1195
1195
|
}
|
|
1196
1196
|
let url = new URL(request.url);
|
|
1197
1197
|
let normalizedBasename = _build.basename || "/";
|
|
1198
1198
|
let normalizedPath = url.pathname;
|
|
1199
|
-
if (
|
|
1199
|
+
if (_chunkEVX7OBGBjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1200
1200
|
normalizedPath = normalizedBasename;
|
|
1201
1201
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1202
1202
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1203
1203
|
}
|
|
1204
|
-
if (
|
|
1204
|
+
if (_chunkEVX7OBGBjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1205
1205
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1206
1206
|
}
|
|
1207
1207
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
@@ -1212,7 +1212,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1212
1212
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1213
1213
|
if (url.pathname.endsWith(".data")) {
|
|
1214
1214
|
errorHandler(
|
|
1215
|
-
new (0,
|
|
1215
|
+
new (0, _chunkEVX7OBGBjs.ErrorResponseImpl)(
|
|
1216
1216
|
404,
|
|
1217
1217
|
"Not Found",
|
|
1218
1218
|
`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.`
|
|
@@ -1232,7 +1232,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
let manifestUrl =
|
|
1235
|
+
let manifestUrl = _chunkEVX7OBGBjs.getManifestPath.call(void 0,
|
|
1236
1236
|
_build.routeDiscovery.manifestPath,
|
|
1237
1237
|
normalizedBasename
|
|
1238
1238
|
);
|
|
@@ -1273,7 +1273,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1273
1273
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1274
1274
|
request
|
|
1275
1275
|
});
|
|
1276
|
-
if (
|
|
1276
|
+
if (_chunkEVX7OBGBjs.isRedirectResponse.call(void 0, response)) {
|
|
1277
1277
|
let result = getSingleFetchRedirect(
|
|
1278
1278
|
response.status,
|
|
1279
1279
|
response.headers,
|
|
@@ -1281,7 +1281,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1281
1281
|
);
|
|
1282
1282
|
if (request.method === "GET") {
|
|
1283
1283
|
result = {
|
|
1284
|
-
[
|
|
1284
|
+
[_chunkEVX7OBGBjs.SingleFetchRedirectSymbol]: result
|
|
1285
1285
|
};
|
|
1286
1286
|
}
|
|
1287
1287
|
let headers = new Headers(response.headers);
|
|
@@ -1294,7 +1294,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1294
1294
|
serverMode
|
|
1295
1295
|
),
|
|
1296
1296
|
{
|
|
1297
|
-
status:
|
|
1297
|
+
status: _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS,
|
|
1298
1298
|
headers
|
|
1299
1299
|
}
|
|
1300
1300
|
);
|
|
@@ -1408,7 +1408,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1408
1408
|
unstable_generateMiddlewareResponse: build.future.unstable_middleware ? async (query) => {
|
|
1409
1409
|
try {
|
|
1410
1410
|
let innerResult = await query(request);
|
|
1411
|
-
if (!
|
|
1411
|
+
if (!_chunkEVX7OBGBjs.isResponse.call(void 0, innerResult)) {
|
|
1412
1412
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1413
1413
|
}
|
|
1414
1414
|
return innerResult;
|
|
@@ -1418,7 +1418,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1418
1418
|
}
|
|
1419
1419
|
} : void 0
|
|
1420
1420
|
});
|
|
1421
|
-
if (!
|
|
1421
|
+
if (!_chunkEVX7OBGBjs.isResponse.call(void 0, result)) {
|
|
1422
1422
|
result = await renderHtml(result, isSpaMode);
|
|
1423
1423
|
}
|
|
1424
1424
|
return result;
|
|
@@ -1433,7 +1433,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1433
1433
|
}
|
|
1434
1434
|
if (context.errors) {
|
|
1435
1435
|
Object.values(context.errors).forEach((err) => {
|
|
1436
|
-
if (!
|
|
1436
|
+
if (!_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1437
1437
|
handleError(err);
|
|
1438
1438
|
}
|
|
1439
1439
|
});
|
|
@@ -1485,10 +1485,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1485
1485
|
} catch (error) {
|
|
1486
1486
|
handleError(error);
|
|
1487
1487
|
let errorForSecondRender = error;
|
|
1488
|
-
if (
|
|
1488
|
+
if (_chunkEVX7OBGBjs.isResponse.call(void 0, error)) {
|
|
1489
1489
|
try {
|
|
1490
1490
|
let data2 = await unwrapResponse(error);
|
|
1491
|
-
errorForSecondRender = new (0,
|
|
1491
|
+
errorForSecondRender = new (0, _chunkEVX7OBGBjs.ErrorResponseImpl)(
|
|
1492
1492
|
error.status,
|
|
1493
1493
|
error.statusText,
|
|
1494
1494
|
data2
|
|
@@ -1496,7 +1496,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1496
1496
|
} catch (e) {
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
context =
|
|
1499
|
+
context = _chunkEVX7OBGBjs.getStaticContextFromError.call(void 0,
|
|
1500
1500
|
staticHandler.dataRoutes,
|
|
1501
1501
|
context,
|
|
1502
1502
|
errorForSecondRender
|
|
@@ -1555,7 +1555,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1555
1555
|
return handleQueryRouteError(error);
|
|
1556
1556
|
}
|
|
1557
1557
|
function handleQueryRouteResult(result) {
|
|
1558
|
-
if (
|
|
1558
|
+
if (_chunkEVX7OBGBjs.isResponse.call(void 0, result)) {
|
|
1559
1559
|
return result;
|
|
1560
1560
|
}
|
|
1561
1561
|
if (typeof result === "string") {
|
|
@@ -1564,11 +1564,11 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1564
1564
|
return Response.json(result);
|
|
1565
1565
|
}
|
|
1566
1566
|
function handleQueryRouteError(error) {
|
|
1567
|
-
if (
|
|
1567
|
+
if (_chunkEVX7OBGBjs.isResponse.call(void 0, error)) {
|
|
1568
1568
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1569
1569
|
return error;
|
|
1570
1570
|
}
|
|
1571
|
-
if (
|
|
1571
|
+
if (_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1572
1572
|
handleError(error);
|
|
1573
1573
|
return errorResponseToJson(error, serverMode);
|
|
1574
1574
|
}
|
|
@@ -1694,7 +1694,7 @@ function createSessionStorage({
|
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
1696
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1697
|
-
|
|
1697
|
+
_chunkEVX7OBGBjs.warnOnce.call(void 0,
|
|
1698
1698
|
cookie.isSigned,
|
|
1699
1699
|
`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.`
|
|
1700
1700
|
);
|
|
@@ -1789,12 +1789,12 @@ function getHydrationData(state, routes, getRouteInfo, location2, basename, isSp
|
|
|
1789
1789
|
...state,
|
|
1790
1790
|
loaderData: { ...state.loaderData }
|
|
1791
1791
|
};
|
|
1792
|
-
let initialMatches =
|
|
1792
|
+
let initialMatches = _chunkEVX7OBGBjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1793
1793
|
if (initialMatches) {
|
|
1794
1794
|
for (let match of initialMatches) {
|
|
1795
1795
|
let routeId = match.route.id;
|
|
1796
1796
|
let routeInfo = getRouteInfo(routeId);
|
|
1797
|
-
if (
|
|
1797
|
+
if (_chunkEVX7OBGBjs.shouldHydrateRouteLoader.call(void 0,
|
|
1798
1798
|
routeId,
|
|
1799
1799
|
routeInfo.clientLoader,
|
|
1800
1800
|
routeInfo.hasLoader,
|
|
@@ -1872,7 +1872,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
1874
|
);
|
|
1875
|
-
if (
|
|
1875
|
+
if (_chunkEVX7OBGBjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1876
1876
|
return /* @__PURE__ */ React.default.createElement(
|
|
1877
1877
|
ErrorWrapper,
|
|
1878
1878
|
{
|
|
@@ -1880,7 +1880,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1880
1880
|
title: "Unhandled Thrown Response!"
|
|
1881
1881
|
},
|
|
1882
1882
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1883
|
-
|
|
1883
|
+
_chunkEVX7OBGBjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1884
1884
|
);
|
|
1885
1885
|
}
|
|
1886
1886
|
let errorInstance;
|
|
@@ -1906,7 +1906,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1906
1906
|
function RSCDefaultRootErrorBoundary({
|
|
1907
1907
|
hasRootLayout
|
|
1908
1908
|
}) {
|
|
1909
|
-
let error =
|
|
1909
|
+
let error = _chunkEVX7OBGBjs.useRouteError.call(void 0, );
|
|
1910
1910
|
if (hasRootLayout === void 0) {
|
|
1911
1911
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1912
1912
|
}
|
|
@@ -2020,7 +2020,7 @@ function createRouterFromPayload({
|
|
|
2020
2020
|
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2021
2021
|
let patches = /* @__PURE__ */ new Map();
|
|
2022
2022
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2023
|
-
|
|
2023
|
+
_chunkEVX7OBGBjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2024
2024
|
if (!patches.has(patch.parentId)) {
|
|
2025
2025
|
patches.set(patch.parentId, []);
|
|
2026
2026
|
}
|
|
@@ -2042,11 +2042,11 @@ function createRouterFromPayload({
|
|
|
2042
2042
|
}
|
|
2043
2043
|
return [route];
|
|
2044
2044
|
}, []);
|
|
2045
|
-
globalVar.__router =
|
|
2045
|
+
globalVar.__router = _chunkEVX7OBGBjs.createRouter.call(void 0, {
|
|
2046
2046
|
routes,
|
|
2047
2047
|
unstable_getContext,
|
|
2048
2048
|
basename: payload.basename,
|
|
2049
|
-
history:
|
|
2049
|
+
history: _chunkEVX7OBGBjs.createBrowserHistory.call(void 0, ),
|
|
2050
2050
|
hydrationData: getHydrationData(
|
|
2051
2051
|
{
|
|
2052
2052
|
loaderData: payload.loaderData,
|
|
@@ -2056,7 +2056,7 @@ function createRouterFromPayload({
|
|
|
2056
2056
|
routes,
|
|
2057
2057
|
(routeId) => {
|
|
2058
2058
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2059
|
-
|
|
2059
|
+
_chunkEVX7OBGBjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2060
2060
|
return {
|
|
2061
2061
|
clientLoader: match.clientLoader,
|
|
2062
2062
|
hasLoader: match.hasLoader,
|
|
@@ -2101,9 +2101,9 @@ function createRouterFromPayload({
|
|
|
2101
2101
|
});
|
|
2102
2102
|
return globalVar.__router;
|
|
2103
2103
|
}
|
|
2104
|
-
var renderedRoutesContext =
|
|
2104
|
+
var renderedRoutesContext = _chunkEVX7OBGBjs.unstable_createContext.call(void 0, );
|
|
2105
2105
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2106
|
-
let dataStrategy =
|
|
2106
|
+
let dataStrategy = _chunkEVX7OBGBjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2107
2107
|
getRouter,
|
|
2108
2108
|
(match) => {
|
|
2109
2109
|
let M = match;
|
|
@@ -2157,20 +2157,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2157
2157
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2158
2158
|
return async (args, basename, targetRoutes) => {
|
|
2159
2159
|
let { request, context } = args;
|
|
2160
|
-
let url =
|
|
2160
|
+
let url = _chunkEVX7OBGBjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2161
2161
|
if (request.method === "GET") {
|
|
2162
|
-
url =
|
|
2162
|
+
url = _chunkEVX7OBGBjs.stripIndexParam.call(void 0, url);
|
|
2163
2163
|
if (targetRoutes) {
|
|
2164
2164
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2165
2165
|
}
|
|
2166
2166
|
}
|
|
2167
2167
|
let res = await fetchImplementation(
|
|
2168
|
-
new Request(url, await
|
|
2168
|
+
new Request(url, await _chunkEVX7OBGBjs.createRequestInit.call(void 0, request))
|
|
2169
2169
|
);
|
|
2170
2170
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2171
|
-
throw new (0,
|
|
2171
|
+
throw new (0, _chunkEVX7OBGBjs.ErrorResponseImpl)(404, "Not Found", true);
|
|
2172
2172
|
}
|
|
2173
|
-
|
|
2173
|
+
_chunkEVX7OBGBjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2174
2174
|
try {
|
|
2175
2175
|
const payload = await createFromReadableStream(res.body, {
|
|
2176
2176
|
temporaryReferences: void 0
|
|
@@ -2194,7 +2194,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2194
2194
|
}
|
|
2195
2195
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2196
2196
|
let results = { routes: {} };
|
|
2197
|
-
const dataKey =
|
|
2197
|
+
const dataKey = _chunkEVX7OBGBjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2198
2198
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2199
2199
|
results.routes[routeId] = { data: data2 };
|
|
2200
2200
|
}
|
|
@@ -2316,7 +2316,7 @@ function RSCHydratedRouter({
|
|
|
2316
2316
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2317
2317
|
routeModules: {}
|
|
2318
2318
|
};
|
|
2319
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2319
|
+
return /* @__PURE__ */ React4.createElement(_chunkEVX7OBGBjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkEVX7OBGBjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkVC6RBZTRjs.RouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2320
2320
|
}
|
|
2321
2321
|
function createRouteFromServerManifest(match, payload) {
|
|
2322
2322
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2376,7 +2376,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2376
2376
|
return await callSingleFetch(singleFetch);
|
|
2377
2377
|
}
|
|
2378
2378
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2379
|
-
throw
|
|
2379
|
+
throw _chunkEVX7OBGBjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2380
2380
|
},
|
|
2381
2381
|
path: match.path,
|
|
2382
2382
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2389,7 +2389,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2389
2389
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2390
2390
|
};
|
|
2391
2391
|
if (typeof dataRoute.loader === "function") {
|
|
2392
|
-
dataRoute.loader.hydrate =
|
|
2392
|
+
dataRoute.loader.hydrate = _chunkEVX7OBGBjs.shouldHydrateRouteLoader.call(void 0,
|
|
2393
2393
|
match.id,
|
|
2394
2394
|
match.clientLoader,
|
|
2395
2395
|
match.hasLoader,
|
|
@@ -2399,7 +2399,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2399
2399
|
return dataRoute;
|
|
2400
2400
|
}
|
|
2401
2401
|
function callSingleFetch(singleFetch) {
|
|
2402
|
-
|
|
2402
|
+
_chunkEVX7OBGBjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2403
2403
|
return singleFetch();
|
|
2404
2404
|
}
|
|
2405
2405
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2407,7 +2407,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2407
2407
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2408
2408
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2409
2409
|
console.error(msg);
|
|
2410
|
-
throw new (0,
|
|
2410
|
+
throw new (0, _chunkEVX7OBGBjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2411
2411
|
}
|
|
2412
2412
|
}
|
|
2413
2413
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2599,7 +2599,7 @@ async function routeRSCServerRequest({
|
|
|
2599
2599
|
};
|
|
2600
2600
|
try {
|
|
2601
2601
|
const payload = await getPayload();
|
|
2602
|
-
if (serverResponse.status ===
|
|
2602
|
+
if (serverResponse.status === _chunkEVX7OBGBjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2603
2603
|
const headers2 = new Headers(serverResponse.headers);
|
|
2604
2604
|
headers2.delete("Content-Encoding");
|
|
2605
2605
|
headers2.delete("Content-Length");
|
|
@@ -2649,7 +2649,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2649
2649
|
if (payload.type !== "render") return null;
|
|
2650
2650
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2651
2651
|
for (const match of payload.matches) {
|
|
2652
|
-
if (
|
|
2652
|
+
if (_chunkEVX7OBGBjs.shouldHydrateRouteLoader.call(void 0,
|
|
2653
2653
|
match.id,
|
|
2654
2654
|
match.clientLoader,
|
|
2655
2655
|
match.hasLoader,
|
|
@@ -2683,7 +2683,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2683
2683
|
}
|
|
2684
2684
|
}))
|
|
2685
2685
|
};
|
|
2686
|
-
const router =
|
|
2686
|
+
const router = _chunkVC6RBZTRjs.createStaticRouter.call(void 0,
|
|
2687
2687
|
payload.matches.reduceRight((previous, match) => {
|
|
2688
2688
|
const route = {
|
|
2689
2689
|
id: match.id,
|
|
@@ -2727,8 +2727,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2727
2727
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2728
2728
|
routeModules: {}
|
|
2729
2729
|
};
|
|
2730
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2731
|
-
|
|
2730
|
+
return /* @__PURE__ */ React5.createElement(_chunkEVX7OBGBjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkEVX7OBGBjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2731
|
+
_chunkVC6RBZTRjs.StaticRouterProvider,
|
|
2732
2732
|
{
|
|
2733
2733
|
context,
|
|
2734
2734
|
router,
|
|
@@ -2786,7 +2786,7 @@ function deserializeErrors(errors) {
|
|
|
2786
2786
|
let serialized = {};
|
|
2787
2787
|
for (let [key, val] of entries) {
|
|
2788
2788
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2789
|
-
serialized[key] = new (0,
|
|
2789
|
+
serialized[key] = new (0, _chunkEVX7OBGBjs.ErrorResponseImpl)(
|
|
2790
2790
|
val.status,
|
|
2791
2791
|
val.statusText,
|
|
2792
2792
|
val.data,
|
|
@@ -2944,4 +2944,4 @@ function deserializeErrors(errors) {
|
|
|
2944
2944
|
|
|
2945
2945
|
|
|
2946
2946
|
|
|
2947
|
-
exports.Await =
|
|
2947
|
+
exports.Await = _chunkVC6RBZTRjs.Await; exports.BrowserRouter = _chunkVC6RBZTRjs.BrowserRouter; exports.Form = _chunkVC6RBZTRjs.Form; exports.HashRouter = _chunkVC6RBZTRjs.HashRouter; exports.IDLE_BLOCKER = _chunkEVX7OBGBjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkEVX7OBGBjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkEVX7OBGBjs.IDLE_NAVIGATION; exports.Link = _chunkVC6RBZTRjs.Link; exports.Links = _chunkEVX7OBGBjs.Links; exports.MemoryRouter = _chunkVC6RBZTRjs.MemoryRouter; exports.Meta = _chunkEVX7OBGBjs.Meta; exports.NavLink = _chunkVC6RBZTRjs.NavLink; exports.Navigate = _chunkVC6RBZTRjs.Navigate; exports.NavigationType = _chunkEVX7OBGBjs.Action; exports.Outlet = _chunkVC6RBZTRjs.Outlet; exports.PrefetchPageLinks = _chunkEVX7OBGBjs.PrefetchPageLinks; exports.Route = _chunkVC6RBZTRjs.Route; exports.Router = _chunkVC6RBZTRjs.Router; exports.RouterProvider = _chunkVC6RBZTRjs.RouterProvider; exports.Routes = _chunkVC6RBZTRjs.Routes; exports.Scripts = _chunkEVX7OBGBjs.Scripts; exports.ScrollRestoration = _chunkVC6RBZTRjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkVC6RBZTRjs.StaticRouter; exports.StaticRouterProvider = _chunkVC6RBZTRjs.StaticRouterProvider; exports.UNSAFE_DataRouterContext = _chunkEVX7OBGBjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkEVX7OBGBjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkEVX7OBGBjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkEVX7OBGBjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkEVX7OBGBjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkEVX7OBGBjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkEVX7OBGBjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkEVX7OBGBjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkEVX7OBGBjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkEVX7OBGBjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkEVX7OBGBjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkVC6RBZTRjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkVC6RBZTRjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkVC6RBZTRjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkEVX7OBGBjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkEVX7OBGBjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkEVX7OBGBjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkEVX7OBGBjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkEVX7OBGBjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkEVX7OBGBjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkEVX7OBGBjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkVC6RBZTRjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkEVX7OBGBjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkVC6RBZTRjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkEVX7OBGBjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkEVX7OBGBjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkVC6RBZTRjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkVC6RBZTRjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkVC6RBZTRjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkVC6RBZTRjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkVC6RBZTRjs.createBrowserRouter; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkVC6RBZTRjs.createHashRouter; exports.createMemoryRouter = _chunkVC6RBZTRjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkEVX7OBGBjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkVC6RBZTRjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkVC6RBZTRjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkVC6RBZTRjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkVC6RBZTRjs.createStaticHandler; exports.createStaticRouter = _chunkVC6RBZTRjs.createStaticRouter; exports.data = _chunkEVX7OBGBjs.data; exports.generatePath = _chunkEVX7OBGBjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkEVX7OBGBjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkEVX7OBGBjs.matchPath; exports.matchRoutes = _chunkEVX7OBGBjs.matchRoutes; exports.parsePath = _chunkEVX7OBGBjs.parsePath; exports.redirect = _chunkEVX7OBGBjs.redirect; exports.redirectDocument = _chunkEVX7OBGBjs.redirectDocument; exports.renderMatches = _chunkVC6RBZTRjs.renderMatches; exports.replace = _chunkEVX7OBGBjs.replace; exports.resolvePath = _chunkEVX7OBGBjs.resolvePath; exports.unstable_HistoryRouter = _chunkVC6RBZTRjs.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_RouterContextProvider = _chunkEVX7OBGBjs.unstable_RouterContextProvider; exports.unstable_createCallServer = createCallServer; exports.unstable_createContext = _chunkEVX7OBGBjs.unstable_createContext; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkVC6RBZTRjs.usePrompt; exports.useActionData = _chunkEVX7OBGBjs.useActionData; exports.useAsyncError = _chunkEVX7OBGBjs.useAsyncError; exports.useAsyncValue = _chunkEVX7OBGBjs.useAsyncValue; exports.useBeforeUnload = _chunkVC6RBZTRjs.useBeforeUnload; exports.useBlocker = _chunkEVX7OBGBjs.useBlocker; exports.useFetcher = _chunkVC6RBZTRjs.useFetcher; exports.useFetchers = _chunkVC6RBZTRjs.useFetchers; exports.useFormAction = _chunkVC6RBZTRjs.useFormAction; exports.useHref = _chunkEVX7OBGBjs.useHref; exports.useInRouterContext = _chunkEVX7OBGBjs.useInRouterContext; exports.useLinkClickHandler = _chunkVC6RBZTRjs.useLinkClickHandler; exports.useLoaderData = _chunkEVX7OBGBjs.useLoaderData; exports.useLocation = _chunkEVX7OBGBjs.useLocation; exports.useMatch = _chunkEVX7OBGBjs.useMatch; exports.useMatches = _chunkEVX7OBGBjs.useMatches; exports.useNavigate = _chunkEVX7OBGBjs.useNavigate; exports.useNavigation = _chunkEVX7OBGBjs.useNavigation; exports.useNavigationType = _chunkEVX7OBGBjs.useNavigationType; exports.useOutlet = _chunkEVX7OBGBjs.useOutlet; exports.useOutletContext = _chunkEVX7OBGBjs.useOutletContext; exports.useParams = _chunkEVX7OBGBjs.useParams; exports.useResolvedPath = _chunkEVX7OBGBjs.useResolvedPath; exports.useRevalidator = _chunkEVX7OBGBjs.useRevalidator; exports.useRouteError = _chunkEVX7OBGBjs.useRouteError; exports.useRouteLoaderData = _chunkEVX7OBGBjs.useRouteLoaderData; exports.useRoutes = _chunkEVX7OBGBjs.useRoutes; exports.useSearchParams = _chunkVC6RBZTRjs.useSearchParams; exports.useSubmit = _chunkVC6RBZTRjs.useSubmit; exports.useViewTransitionState = _chunkVC6RBZTRjs.useViewTransitionState;
|