react-router 7.9.1 → 7.9.2-pre.1
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 +25 -9
- package/dist/development/{chunk-B7RQU5TL.mjs → chunk-I4PRIPRX.mjs} +178 -26
- package/dist/{production/chunk-RCAZODXZ.mjs → development/chunk-ITFVGECV.mjs} +155 -65
- package/dist/development/{chunk-PW3F6ATG.js → chunk-MVCD4EFU.js} +102 -70
- package/dist/{production/chunk-3SXVZXGI.js → development/chunk-XCFBICS6.js} +277 -157
- package/dist/development/{context-CIdFp11b.d.mts → context-BqL5Eckq.d.mts} +20 -0
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-BeVfPpWg.d.mts → index-react-server-client-2EDmGlsZ.d.mts} +40 -24
- package/dist/{production/index-react-server-client-BYr9g50r.d.ts → development/index-react-server-client-DKvU8YRr.d.ts} +39 -23
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +10 -0
- package/dist/development/index-react-server.d.ts +10 -0
- package/dist/development/index-react-server.js +3 -3
- package/dist/development/index-react-server.mjs +3 -3
- package/dist/development/index.d.mts +16 -12
- package/dist/development/index.d.ts +14 -10
- package/dist/development/index.js +250 -160
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +1 -1
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-Bpm4liR_.d.mts → route-data-CDwqkzPE.d.mts} +1 -1
- package/dist/{production/routeModules-DnUHijGz.d.ts → development/routeModules-BmVo7q9e.d.ts} +20 -0
- package/dist/production/{chunk-HMYSPRGR.js → chunk-4FAGWJMT.js} +102 -70
- package/dist/{development/chunk-LWNHKVDL.js → production/chunk-MKNSEQLS.js} +277 -157
- package/dist/{development/chunk-SKNKB5VI.mjs → production/chunk-RXSRHQUT.mjs} +155 -65
- package/dist/production/{chunk-P25HWPOZ.mjs → chunk-SKKC22F5.mjs} +178 -26
- package/dist/production/{context-CIdFp11b.d.mts → context-BqL5Eckq.d.mts} +20 -0
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-BeVfPpWg.d.mts → index-react-server-client-2EDmGlsZ.d.mts} +40 -24
- package/dist/{development/index-react-server-client-BYr9g50r.d.ts → production/index-react-server-client-DKvU8YRr.d.ts} +39 -23
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +10 -0
- package/dist/production/index-react-server.d.ts +10 -0
- package/dist/production/index-react-server.js +3 -3
- package/dist/production/index-react-server.mjs +3 -3
- package/dist/production/index.d.mts +16 -12
- package/dist/production/index.d.ts +14 -10
- package/dist/production/index.js +250 -160
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +1 -1
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-Bpm4liR_.d.mts → route-data-CDwqkzPE.d.mts} +1 -1
- package/dist/{development/routeModules-DnUHijGz.d.ts → production/routeModules-BmVo7q9e.d.ts} +20 -0
- 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.1
|
|
2
|
+
* react-router v7.9.2-pre.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
var _chunk3SXVZXGIjs = require('./chunk-3SXVZXGI.js');
|
|
58
57
|
|
|
58
|
+
var _chunkMKNSEQLSjs = require('./chunk-MKNSEQLS.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -145,7 +145,8 @@ var _chunk3SXVZXGIjs = require('./chunk-3SXVZXGI.js');
|
|
|
145
145
|
|
|
146
146
|
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
|
|
149
|
+
var _chunk4FAGWJMTjs = require('./chunk-4FAGWJMT.js');
|
|
149
150
|
|
|
150
151
|
// lib/dom/ssr/server.tsx
|
|
151
152
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -158,7 +159,7 @@ function ServerRouter({
|
|
|
158
159
|
url = new URL(url);
|
|
159
160
|
}
|
|
160
161
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
161
|
-
let routes =
|
|
162
|
+
let routes = _chunk4FAGWJMTjs.createServerRoutes.call(void 0,
|
|
162
163
|
manifest.routes,
|
|
163
164
|
routeModules,
|
|
164
165
|
context.future,
|
|
@@ -171,7 +172,7 @@ function ServerRouter({
|
|
|
171
172
|
let routeId = match.route.id;
|
|
172
173
|
let route = routeModules[routeId];
|
|
173
174
|
let manifestRoute = context.manifest.routes[routeId];
|
|
174
|
-
if (route && manifestRoute &&
|
|
175
|
+
if (route && manifestRoute && _chunk4FAGWJMTjs.shouldHydrateRouteLoader.call(void 0,
|
|
175
176
|
routeId,
|
|
176
177
|
route.clientLoader,
|
|
177
178
|
manifestRoute.hasLoader,
|
|
@@ -180,9 +181,9 @@ function ServerRouter({
|
|
|
180
181
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
let router =
|
|
184
|
+
let router = _chunkMKNSEQLSjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
184
185
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
185
|
-
|
|
186
|
+
_chunk4FAGWJMTjs.FrameworkContext.Provider,
|
|
186
187
|
{
|
|
187
188
|
value: {
|
|
188
189
|
manifest,
|
|
@@ -197,8 +198,8 @@ function ServerRouter({
|
|
|
197
198
|
renderMeta: context.renderMeta
|
|
198
199
|
}
|
|
199
200
|
},
|
|
200
|
-
/* @__PURE__ */ React.createElement(
|
|
201
|
-
|
|
201
|
+
/* @__PURE__ */ React.createElement(_chunk4FAGWJMTjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
202
|
+
_chunkMKNSEQLSjs.StaticRouterProvider,
|
|
202
203
|
{
|
|
203
204
|
router,
|
|
204
205
|
context: context.staticHandlerContext,
|
|
@@ -206,7 +207,7 @@ function ServerRouter({
|
|
|
206
207
|
}
|
|
207
208
|
))
|
|
208
209
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
209
|
-
|
|
210
|
+
_chunk4FAGWJMTjs.StreamTransfer,
|
|
210
211
|
{
|
|
211
212
|
context,
|
|
212
213
|
identifier: 0,
|
|
@@ -248,18 +249,18 @@ function createRoutesStub(routes, _context) {
|
|
|
248
249
|
let patched = processRoutes(
|
|
249
250
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
250
251
|
// types compared to `AgnosticRouteObject`
|
|
251
|
-
|
|
252
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
252
|
+
_chunk4FAGWJMTjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
253
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunk4FAGWJMTjs.RouterContextProvider)() : {},
|
|
253
254
|
frameworkContextRef.current.manifest,
|
|
254
255
|
frameworkContextRef.current.routeModules
|
|
255
256
|
);
|
|
256
|
-
routerRef.current =
|
|
257
|
+
routerRef.current = _chunkMKNSEQLSjs.createMemoryRouter.call(void 0, patched, {
|
|
257
258
|
initialEntries,
|
|
258
259
|
initialIndex,
|
|
259
260
|
hydrationData
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
|
-
return /* @__PURE__ */ React2.createElement(
|
|
263
|
+
return /* @__PURE__ */ React2.createElement(_chunk4FAGWJMTjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkMKNSEQLSjs.RouterProvider, { router: routerRef.current }));
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
266
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -273,11 +274,17 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
273
274
|
id: route.id,
|
|
274
275
|
path: route.path,
|
|
275
276
|
index: route.index,
|
|
276
|
-
Component: route.Component ?
|
|
277
|
-
HydrateFallback: route.HydrateFallback ?
|
|
278
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
277
|
+
Component: route.Component ? _chunkMKNSEQLSjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
278
|
+
HydrateFallback: route.HydrateFallback ? _chunkMKNSEQLSjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
279
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkMKNSEQLSjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
279
280
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
280
281
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
282
|
+
middleware: route.middleware ? route.middleware.map(
|
|
283
|
+
(mw) => (...args) => mw(
|
|
284
|
+
{ ...args[0], context },
|
|
285
|
+
args[1]
|
|
286
|
+
)
|
|
287
|
+
) : void 0,
|
|
281
288
|
handle: route.handle,
|
|
282
289
|
shouldRevalidate: route.shouldRevalidate
|
|
283
290
|
};
|
|
@@ -304,7 +311,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
304
311
|
};
|
|
305
312
|
manifest.routes[newRoute.id] = entryRoute;
|
|
306
313
|
routeModules[route.id] = {
|
|
307
|
-
default: newRoute.Component ||
|
|
314
|
+
default: newRoute.Component || _chunkMKNSEQLSjs.Outlet,
|
|
308
315
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
309
316
|
handle: route.handle,
|
|
310
317
|
links: route.links,
|
|
@@ -499,7 +506,7 @@ function myUnescape(value) {
|
|
|
499
506
|
return result;
|
|
500
507
|
}
|
|
501
508
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
502
|
-
|
|
509
|
+
_chunk4FAGWJMTjs.warnOnce.call(void 0,
|
|
503
510
|
!expires,
|
|
504
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.`
|
|
505
512
|
);
|
|
@@ -553,7 +560,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
553
560
|
let entries = Object.entries(errors);
|
|
554
561
|
let serialized = {};
|
|
555
562
|
for (let [key, val] of entries) {
|
|
556
|
-
if (
|
|
563
|
+
if (_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, val)) {
|
|
557
564
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
558
565
|
} else if (val instanceof Error) {
|
|
559
566
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -578,7 +585,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
578
585
|
|
|
579
586
|
// lib/server-runtime/routeMatching.ts
|
|
580
587
|
function matchServerRoutes(routes, pathname, basename) {
|
|
581
|
-
let matches =
|
|
588
|
+
let matches = _chunk4FAGWJMTjs.matchRoutes.call(void 0,
|
|
582
589
|
routes,
|
|
583
590
|
pathname,
|
|
584
591
|
basename
|
|
@@ -598,7 +605,7 @@ async function callRouteHandler(handler, args) {
|
|
|
598
605
|
params: args.params,
|
|
599
606
|
context: args.context
|
|
600
607
|
});
|
|
601
|
-
if (
|
|
608
|
+
if (_chunk4FAGWJMTjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunk4FAGWJMTjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
602
609
|
throw new Response(null, result.init);
|
|
603
610
|
}
|
|
604
611
|
return result;
|
|
@@ -717,17 +724,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
717
724
|
controller.close();
|
|
718
725
|
}
|
|
719
726
|
});
|
|
720
|
-
let decoded = await
|
|
727
|
+
let decoded = await _chunk4FAGWJMTjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
721
728
|
let data2 = decoded.value;
|
|
722
|
-
if (data2 &&
|
|
723
|
-
let result = data2[
|
|
729
|
+
if (data2 && _chunk4FAGWJMTjs.SingleFetchRedirectSymbol in data2) {
|
|
730
|
+
let result = data2[_chunk4FAGWJMTjs.SingleFetchRedirectSymbol];
|
|
724
731
|
let init = { status: result.status };
|
|
725
732
|
if (result.reload) {
|
|
726
|
-
throw
|
|
733
|
+
throw _chunk4FAGWJMTjs.redirectDocument.call(void 0, result.redirect, init);
|
|
727
734
|
} else if (result.replace) {
|
|
728
|
-
throw
|
|
735
|
+
throw _chunk4FAGWJMTjs.replace.call(void 0, result.redirect, init);
|
|
729
736
|
} else {
|
|
730
|
-
throw
|
|
737
|
+
throw _chunk4FAGWJMTjs.redirect.call(void 0, result.redirect, init);
|
|
731
738
|
}
|
|
732
739
|
} else {
|
|
733
740
|
invariant2(
|
|
@@ -766,7 +773,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
766
773
|
|
|
767
774
|
// lib/server-runtime/serverHandoff.ts
|
|
768
775
|
function createServerHandoffString(serverHandoff) {
|
|
769
|
-
return
|
|
776
|
+
return _chunk4FAGWJMTjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
770
777
|
}
|
|
771
778
|
|
|
772
779
|
// lib/server-runtime/headers.ts
|
|
@@ -843,7 +850,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
843
850
|
|
|
844
851
|
// lib/server-runtime/single-fetch.ts
|
|
845
852
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
846
|
-
...
|
|
853
|
+
..._chunk4FAGWJMTjs.NO_BODY_STATUS_CODES,
|
|
847
854
|
304
|
|
848
855
|
]);
|
|
849
856
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -873,7 +880,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
873
880
|
return handleQueryError(error);
|
|
874
881
|
}
|
|
875
882
|
function handleQueryResult(result) {
|
|
876
|
-
return
|
|
883
|
+
return _chunk4FAGWJMTjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
877
884
|
}
|
|
878
885
|
function handleQueryError(error) {
|
|
879
886
|
handleError(error);
|
|
@@ -885,12 +892,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
885
892
|
}
|
|
886
893
|
function staticContextToResponse(context) {
|
|
887
894
|
let headers = getDocumentHeaders(context, build);
|
|
888
|
-
if (
|
|
895
|
+
if (_chunk4FAGWJMTjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
889
896
|
return new Response(null, { status: context.statusCode, headers });
|
|
890
897
|
}
|
|
891
898
|
if (context.errors) {
|
|
892
899
|
Object.values(context.errors).forEach((err) => {
|
|
893
|
-
if (!
|
|
900
|
+
if (!_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
894
901
|
handleError(err);
|
|
895
902
|
}
|
|
896
903
|
});
|
|
@@ -937,7 +944,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
937
944
|
return handleQueryError(error);
|
|
938
945
|
}
|
|
939
946
|
function handleQueryResult(result) {
|
|
940
|
-
return
|
|
947
|
+
return _chunk4FAGWJMTjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
941
948
|
}
|
|
942
949
|
function handleQueryError(error) {
|
|
943
950
|
handleError(error);
|
|
@@ -949,12 +956,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
949
956
|
}
|
|
950
957
|
function staticContextToResponse(context) {
|
|
951
958
|
let headers = getDocumentHeaders(context, build);
|
|
952
|
-
if (
|
|
959
|
+
if (_chunk4FAGWJMTjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
953
960
|
return new Response(null, { status: context.statusCode, headers });
|
|
954
961
|
}
|
|
955
962
|
if (context.errors) {
|
|
956
963
|
Object.values(context.errors).forEach((err) => {
|
|
957
|
-
if (!
|
|
964
|
+
if (!_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
958
965
|
handleError(err);
|
|
959
966
|
}
|
|
960
967
|
});
|
|
@@ -1018,15 +1025,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1018
1025
|
headers.delete("Location");
|
|
1019
1026
|
headers.set("Content-Type", "text/x-script");
|
|
1020
1027
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1021
|
-
result: request.method === "GET" ? { [
|
|
1028
|
+
result: request.method === "GET" ? { [_chunk4FAGWJMTjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1022
1029
|
headers,
|
|
1023
|
-
status:
|
|
1030
|
+
status: _chunk4FAGWJMTjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1024
1031
|
});
|
|
1025
1032
|
}
|
|
1026
1033
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1027
1034
|
let redirect2 = headers.get("Location");
|
|
1028
1035
|
if (basename) {
|
|
1029
|
-
redirect2 =
|
|
1036
|
+
redirect2 = _chunk4FAGWJMTjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1030
1037
|
}
|
|
1031
1038
|
return {
|
|
1032
1039
|
redirect: redirect2,
|
|
@@ -1052,7 +1059,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1052
1059
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1053
1060
|
);
|
|
1054
1061
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1055
|
-
return
|
|
1062
|
+
return _chunk4FAGWJMTjs.encode.call(void 0, data2, {
|
|
1056
1063
|
signal: controller.signal,
|
|
1057
1064
|
plugins: [
|
|
1058
1065
|
(value) => {
|
|
@@ -1060,12 +1067,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1060
1067
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1061
1068
|
return ["SanitizedError", name, message, stack];
|
|
1062
1069
|
}
|
|
1063
|
-
if (value instanceof
|
|
1070
|
+
if (value instanceof _chunk4FAGWJMTjs.ErrorResponseImpl) {
|
|
1064
1071
|
let { data: data3, status, statusText } = value;
|
|
1065
1072
|
return ["ErrorResponse", data3, status, statusText];
|
|
1066
1073
|
}
|
|
1067
|
-
if (value && typeof value === "object" &&
|
|
1068
|
-
return ["SingleFetchRedirect", value[
|
|
1074
|
+
if (value && typeof value === "object" && _chunk4FAGWJMTjs.SingleFetchRedirectSymbol in value) {
|
|
1075
|
+
return ["SingleFetchRedirect", value[_chunk4FAGWJMTjs.SingleFetchRedirectSymbol]];
|
|
1069
1076
|
}
|
|
1070
1077
|
}
|
|
1071
1078
|
],
|
|
@@ -1088,14 +1095,14 @@ function derive(build, mode) {
|
|
|
1088
1095
|
let routes = createRoutes(build.routes);
|
|
1089
1096
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1090
1097
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1091
|
-
let staticHandler =
|
|
1098
|
+
let staticHandler = _chunk4FAGWJMTjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1092
1099
|
basename: build.basename
|
|
1093
1100
|
});
|
|
1094
1101
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1095
1102
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1096
1103
|
console.error(
|
|
1097
1104
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1098
|
-
|
|
1105
|
+
_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1099
1106
|
);
|
|
1100
1107
|
}
|
|
1101
1108
|
});
|
|
@@ -1141,36 +1148,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1141
1148
|
});
|
|
1142
1149
|
};
|
|
1143
1150
|
if (_build.future.v8_middleware) {
|
|
1144
|
-
if (initialContext && !(initialContext instanceof
|
|
1151
|
+
if (initialContext && !(initialContext instanceof _chunk4FAGWJMTjs.RouterContextProvider)) {
|
|
1145
1152
|
let error = new Error(
|
|
1146
1153
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1147
1154
|
);
|
|
1148
1155
|
handleError(error);
|
|
1149
1156
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1150
1157
|
}
|
|
1151
|
-
loadContext = initialContext || new (0,
|
|
1158
|
+
loadContext = initialContext || new (0, _chunk4FAGWJMTjs.RouterContextProvider)();
|
|
1152
1159
|
} else {
|
|
1153
1160
|
loadContext = initialContext || {};
|
|
1154
1161
|
}
|
|
1155
1162
|
let url = new URL(request.url);
|
|
1156
1163
|
let normalizedBasename = _build.basename || "/";
|
|
1157
1164
|
let normalizedPath = url.pathname;
|
|
1158
|
-
if (
|
|
1165
|
+
if (_chunk4FAGWJMTjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1159
1166
|
normalizedPath = normalizedBasename;
|
|
1160
1167
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1161
1168
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1162
1169
|
}
|
|
1163
|
-
if (
|
|
1170
|
+
if (_chunk4FAGWJMTjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1164
1171
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1165
1172
|
}
|
|
1166
1173
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1167
1174
|
if (!_build.ssr) {
|
|
1168
1175
|
let decodedPath = decodeURI(normalizedPath);
|
|
1169
1176
|
if (normalizedBasename !== "/") {
|
|
1170
|
-
let strippedPath =
|
|
1177
|
+
let strippedPath = _chunk4FAGWJMTjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1171
1178
|
if (strippedPath == null) {
|
|
1172
1179
|
errorHandler(
|
|
1173
|
-
new (0,
|
|
1180
|
+
new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(
|
|
1174
1181
|
404,
|
|
1175
1182
|
"Not Found",
|
|
1176
1183
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1193,7 +1200,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1193
1200
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1194
1201
|
if (url.pathname.endsWith(".data")) {
|
|
1195
1202
|
errorHandler(
|
|
1196
|
-
new (0,
|
|
1203
|
+
new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(
|
|
1197
1204
|
404,
|
|
1198
1205
|
"Not Found",
|
|
1199
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.`
|
|
@@ -1213,7 +1220,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1213
1220
|
}
|
|
1214
1221
|
}
|
|
1215
1222
|
}
|
|
1216
|
-
let manifestUrl =
|
|
1223
|
+
let manifestUrl = _chunk4FAGWJMTjs.getManifestPath.call(void 0,
|
|
1217
1224
|
_build.routeDiscovery.manifestPath,
|
|
1218
1225
|
normalizedBasename
|
|
1219
1226
|
);
|
|
@@ -1248,7 +1255,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1248
1255
|
loadContext,
|
|
1249
1256
|
handleError
|
|
1250
1257
|
);
|
|
1251
|
-
if (
|
|
1258
|
+
if (_chunk4FAGWJMTjs.isRedirectResponse.call(void 0, response)) {
|
|
1252
1259
|
response = generateSingleFetchRedirectResponse(
|
|
1253
1260
|
response,
|
|
1254
1261
|
request,
|
|
@@ -1262,7 +1269,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1262
1269
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1263
1270
|
request
|
|
1264
1271
|
});
|
|
1265
|
-
if (
|
|
1272
|
+
if (_chunk4FAGWJMTjs.isRedirectResponse.call(void 0, response)) {
|
|
1266
1273
|
response = generateSingleFetchRedirectResponse(
|
|
1267
1274
|
response,
|
|
1268
1275
|
request,
|
|
@@ -1320,9 +1327,11 @@ async function handleManifestRequest(build, routes, url) {
|
|
|
1320
1327
|
});
|
|
1321
1328
|
}
|
|
1322
1329
|
let patches = {};
|
|
1323
|
-
if (url.searchParams.has("
|
|
1330
|
+
if (url.searchParams.has("paths")) {
|
|
1324
1331
|
let paths = /* @__PURE__ */ new Set();
|
|
1325
|
-
url.searchParams.
|
|
1332
|
+
let pathParam = url.searchParams.get("paths") || "";
|
|
1333
|
+
let requestedPaths = pathParam.split(",").filter(Boolean);
|
|
1334
|
+
requestedPaths.forEach((path) => {
|
|
1326
1335
|
if (!path.startsWith("/")) {
|
|
1327
1336
|
path = `/${path}`;
|
|
1328
1337
|
}
|
|
@@ -1379,7 +1388,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1379
1388
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1380
1389
|
try {
|
|
1381
1390
|
let innerResult = await query(request);
|
|
1382
|
-
if (!
|
|
1391
|
+
if (!_chunk4FAGWJMTjs.isResponse.call(void 0, innerResult)) {
|
|
1383
1392
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1384
1393
|
}
|
|
1385
1394
|
return innerResult;
|
|
@@ -1389,7 +1398,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1389
1398
|
}
|
|
1390
1399
|
} : void 0
|
|
1391
1400
|
});
|
|
1392
|
-
if (!
|
|
1401
|
+
if (!_chunk4FAGWJMTjs.isResponse.call(void 0, result)) {
|
|
1393
1402
|
result = await renderHtml(result, isSpaMode);
|
|
1394
1403
|
}
|
|
1395
1404
|
return result;
|
|
@@ -1404,7 +1413,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1404
1413
|
}
|
|
1405
1414
|
if (context.errors) {
|
|
1406
1415
|
Object.values(context.errors).forEach((err) => {
|
|
1407
|
-
if (!
|
|
1416
|
+
if (!_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1408
1417
|
handleError(err);
|
|
1409
1418
|
}
|
|
1410
1419
|
});
|
|
@@ -1456,10 +1465,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1456
1465
|
} catch (error) {
|
|
1457
1466
|
handleError(error);
|
|
1458
1467
|
let errorForSecondRender = error;
|
|
1459
|
-
if (
|
|
1468
|
+
if (_chunk4FAGWJMTjs.isResponse.call(void 0, error)) {
|
|
1460
1469
|
try {
|
|
1461
1470
|
let data2 = await unwrapResponse(error);
|
|
1462
|
-
errorForSecondRender = new (0,
|
|
1471
|
+
errorForSecondRender = new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(
|
|
1463
1472
|
error.status,
|
|
1464
1473
|
error.statusText,
|
|
1465
1474
|
data2
|
|
@@ -1467,7 +1476,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1467
1476
|
} catch (e) {
|
|
1468
1477
|
}
|
|
1469
1478
|
}
|
|
1470
|
-
context =
|
|
1479
|
+
context = _chunk4FAGWJMTjs.getStaticContextFromError.call(void 0,
|
|
1471
1480
|
staticHandler.dataRoutes,
|
|
1472
1481
|
context,
|
|
1473
1482
|
errorForSecondRender
|
|
@@ -1526,7 +1535,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1526
1535
|
return handleQueryRouteError(error);
|
|
1527
1536
|
}
|
|
1528
1537
|
function handleQueryRouteResult(result) {
|
|
1529
|
-
if (
|
|
1538
|
+
if (_chunk4FAGWJMTjs.isResponse.call(void 0, result)) {
|
|
1530
1539
|
return result;
|
|
1531
1540
|
}
|
|
1532
1541
|
if (typeof result === "string") {
|
|
@@ -1535,11 +1544,11 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1535
1544
|
return Response.json(result);
|
|
1536
1545
|
}
|
|
1537
1546
|
function handleQueryRouteError(error) {
|
|
1538
|
-
if (
|
|
1547
|
+
if (_chunk4FAGWJMTjs.isResponse.call(void 0, error)) {
|
|
1539
1548
|
error.headers.set("X-Remix-Catch", "yes");
|
|
1540
1549
|
return error;
|
|
1541
1550
|
}
|
|
1542
|
-
if (
|
|
1551
|
+
if (_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1543
1552
|
handleError(error);
|
|
1544
1553
|
return errorResponseToJson(error, serverMode);
|
|
1545
1554
|
}
|
|
@@ -1665,7 +1674,7 @@ function createSessionStorage({
|
|
|
1665
1674
|
};
|
|
1666
1675
|
}
|
|
1667
1676
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1668
|
-
|
|
1677
|
+
_chunk4FAGWJMTjs.warnOnce.call(void 0,
|
|
1669
1678
|
cookie.isSigned,
|
|
1670
1679
|
`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.`
|
|
1671
1680
|
);
|
|
@@ -1772,12 +1781,12 @@ function getHydrationData({
|
|
|
1772
1781
|
...state,
|
|
1773
1782
|
loaderData: { ...state.loaderData }
|
|
1774
1783
|
};
|
|
1775
|
-
let initialMatches =
|
|
1784
|
+
let initialMatches = _chunk4FAGWJMTjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1776
1785
|
if (initialMatches) {
|
|
1777
1786
|
for (let match of initialMatches) {
|
|
1778
1787
|
let routeId = match.route.id;
|
|
1779
1788
|
let routeInfo = getRouteInfo(routeId);
|
|
1780
|
-
if (
|
|
1789
|
+
if (_chunk4FAGWJMTjs.shouldHydrateRouteLoader.call(void 0,
|
|
1781
1790
|
routeId,
|
|
1782
1791
|
routeInfo.clientLoader,
|
|
1783
1792
|
routeInfo.hasLoader,
|
|
@@ -1855,7 +1864,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1855
1864
|
}
|
|
1856
1865
|
}
|
|
1857
1866
|
);
|
|
1858
|
-
if (
|
|
1867
|
+
if (_chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1859
1868
|
return /* @__PURE__ */ React.default.createElement(
|
|
1860
1869
|
ErrorWrapper,
|
|
1861
1870
|
{
|
|
@@ -1863,7 +1872,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1863
1872
|
title: "Unhandled Thrown Response!"
|
|
1864
1873
|
},
|
|
1865
1874
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1866
|
-
|
|
1875
|
+
_chunk4FAGWJMTjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1867
1876
|
);
|
|
1868
1877
|
}
|
|
1869
1878
|
let errorInstance;
|
|
@@ -1889,7 +1898,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1889
1898
|
function RSCDefaultRootErrorBoundary({
|
|
1890
1899
|
hasRootLayout
|
|
1891
1900
|
}) {
|
|
1892
|
-
let error =
|
|
1901
|
+
let error = _chunk4FAGWJMTjs.useRouteError.call(void 0, );
|
|
1893
1902
|
if (hasRootLayout === void 0) {
|
|
1894
1903
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1895
1904
|
}
|
|
@@ -1934,7 +1943,7 @@ function createCallServer({
|
|
|
1934
1943
|
return async (id, args) => {
|
|
1935
1944
|
let actionId = globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
1936
1945
|
const temporaryReferences = createTemporaryReferenceSet();
|
|
1937
|
-
const
|
|
1946
|
+
const payloadPromise = fetchImplementation(
|
|
1938
1947
|
new Request(location.href, {
|
|
1939
1948
|
body: await encodeReply(args, { temporaryReferences }),
|
|
1940
1949
|
method: "POST",
|
|
@@ -1943,44 +1952,45 @@ function createCallServer({
|
|
|
1943
1952
|
"rsc-action-id": id
|
|
1944
1953
|
}
|
|
1945
1954
|
})
|
|
1946
|
-
)
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
}
|
|
1950
|
-
const payload = await createFromReadableStream(response.body, {
|
|
1951
|
-
temporaryReferences
|
|
1952
|
-
});
|
|
1953
|
-
if (payload.type === "redirect") {
|
|
1954
|
-
if (payload.reload) {
|
|
1955
|
-
window.location.href = payload.location;
|
|
1956
|
-
return;
|
|
1955
|
+
).then((response) => {
|
|
1956
|
+
if (!response.body) {
|
|
1957
|
+
throw new Error("No response body");
|
|
1957
1958
|
}
|
|
1958
|
-
|
|
1959
|
-
|
|
1959
|
+
return createFromReadableStream(response.body, {
|
|
1960
|
+
temporaryReferences
|
|
1960
1961
|
});
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1962
|
+
});
|
|
1963
|
+
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
|
1964
|
+
Promise.resolve(payloadPromise).then(async (payload) => {
|
|
1965
|
+
if (payload.type === "redirect") {
|
|
1966
|
+
if (payload.reload) {
|
|
1967
|
+
window.location.href = payload.location;
|
|
1968
|
+
return () => {
|
|
1969
|
+
};
|
|
1970
|
+
}
|
|
1971
|
+
return () => {
|
|
1972
|
+
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
|
1973
|
+
replace: payload.replace
|
|
1974
|
+
});
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
if (payload.type !== "action") {
|
|
1978
|
+
throw new Error("Unexpected payload type");
|
|
1979
|
+
}
|
|
1980
|
+
const rerender = await payload.rerender;
|
|
1981
|
+
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
|
1982
|
+
if (rerender.type === "redirect") {
|
|
1983
|
+
if (rerender.reload) {
|
|
1984
|
+
window.location.href = rerender.location;
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
return () => {
|
|
1979
1988
|
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
|
1980
1989
|
replace: rerender.replace
|
|
1981
1990
|
});
|
|
1982
|
-
|
|
1983
|
-
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1993
|
+
return () => {
|
|
1984
1994
|
let lastMatch;
|
|
1985
1995
|
for (const match of rerender.matches) {
|
|
1986
1996
|
globalVar.__reactRouterDataRouter.patchRoutes(
|
|
@@ -1991,29 +2001,32 @@ function createCallServer({
|
|
|
1991
2001
|
lastMatch = match;
|
|
1992
2002
|
}
|
|
1993
2003
|
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
1994
|
-
{
|
|
2004
|
+
{
|
|
2005
|
+
loaderData: Object.assign(
|
|
2006
|
+
{},
|
|
2007
|
+
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
2008
|
+
rerender.loaderData
|
|
2009
|
+
),
|
|
2010
|
+
errors: rerender.errors ? Object.assign(
|
|
2011
|
+
{},
|
|
2012
|
+
globalVar.__reactRouterDataRouter.state.errors,
|
|
2013
|
+
rerender.errors
|
|
2014
|
+
) : null
|
|
2015
|
+
}
|
|
1995
2016
|
);
|
|
1996
|
-
|
|
1997
|
-
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
1998
|
-
{
|
|
1999
|
-
loaderData: Object.assign(
|
|
2000
|
-
{},
|
|
2001
|
-
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
2002
|
-
rerender.loaderData
|
|
2003
|
-
),
|
|
2004
|
-
errors: rerender.errors ? Object.assign(
|
|
2005
|
-
{},
|
|
2006
|
-
globalVar.__reactRouterDataRouter.state.errors,
|
|
2007
|
-
rerender.errors
|
|
2008
|
-
) : null
|
|
2009
|
-
}
|
|
2010
|
-
);
|
|
2011
|
-
});
|
|
2012
|
-
}
|
|
2017
|
+
};
|
|
2013
2018
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2019
|
+
return () => {
|
|
2020
|
+
};
|
|
2021
|
+
}).catch(() => {
|
|
2022
|
+
})
|
|
2023
|
+
);
|
|
2024
|
+
return payloadPromise.then((payload) => {
|
|
2025
|
+
if (payload.type !== "action" && payload.type !== "redirect") {
|
|
2026
|
+
throw new Error("Unexpected payload type");
|
|
2027
|
+
}
|
|
2028
|
+
return payload.actionResult;
|
|
2029
|
+
});
|
|
2017
2030
|
};
|
|
2018
2031
|
}
|
|
2019
2032
|
function createRouterFromPayload({
|
|
@@ -2033,7 +2046,7 @@ function createRouterFromPayload({
|
|
|
2033
2046
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2034
2047
|
let patches = /* @__PURE__ */ new Map();
|
|
2035
2048
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2036
|
-
|
|
2049
|
+
_chunk4FAGWJMTjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2037
2050
|
if (!patches.has(patch.parentId)) {
|
|
2038
2051
|
patches.set(patch.parentId, []);
|
|
2039
2052
|
}
|
|
@@ -2055,11 +2068,11 @@ function createRouterFromPayload({
|
|
|
2055
2068
|
}
|
|
2056
2069
|
return [route];
|
|
2057
2070
|
}, []);
|
|
2058
|
-
globalVar.__reactRouterDataRouter =
|
|
2071
|
+
globalVar.__reactRouterDataRouter = _chunk4FAGWJMTjs.createRouter.call(void 0, {
|
|
2059
2072
|
routes,
|
|
2060
2073
|
getContext,
|
|
2061
2074
|
basename: payload.basename,
|
|
2062
|
-
history:
|
|
2075
|
+
history: _chunk4FAGWJMTjs.createBrowserHistory.call(void 0, ),
|
|
2063
2076
|
hydrationData: getHydrationData({
|
|
2064
2077
|
state: {
|
|
2065
2078
|
loaderData: payload.loaderData,
|
|
@@ -2069,7 +2082,7 @@ function createRouterFromPayload({
|
|
|
2069
2082
|
routes,
|
|
2070
2083
|
getRouteInfo: (routeId) => {
|
|
2071
2084
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2072
|
-
|
|
2085
|
+
_chunk4FAGWJMTjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2073
2086
|
return {
|
|
2074
2087
|
clientLoader: match.clientLoader,
|
|
2075
2088
|
hasLoader: match.hasLoader,
|
|
@@ -2167,9 +2180,9 @@ function createRouterFromPayload({
|
|
|
2167
2180
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2168
2181
|
};
|
|
2169
2182
|
}
|
|
2170
|
-
var renderedRoutesContext =
|
|
2183
|
+
var renderedRoutesContext = _chunk4FAGWJMTjs.createContext.call(void 0, );
|
|
2171
2184
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2172
|
-
let dataStrategy =
|
|
2185
|
+
let dataStrategy = _chunk4FAGWJMTjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2173
2186
|
getRouter,
|
|
2174
2187
|
(match) => {
|
|
2175
2188
|
let M = match;
|
|
@@ -2223,20 +2236,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2223
2236
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2224
2237
|
return async (args, basename, targetRoutes) => {
|
|
2225
2238
|
let { request, context } = args;
|
|
2226
|
-
let url =
|
|
2239
|
+
let url = _chunk4FAGWJMTjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2227
2240
|
if (request.method === "GET") {
|
|
2228
|
-
url =
|
|
2241
|
+
url = _chunk4FAGWJMTjs.stripIndexParam.call(void 0, url);
|
|
2229
2242
|
if (targetRoutes) {
|
|
2230
2243
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2231
2244
|
}
|
|
2232
2245
|
}
|
|
2233
2246
|
let res = await fetchImplementation(
|
|
2234
|
-
new Request(url, await
|
|
2247
|
+
new Request(url, await _chunk4FAGWJMTjs.createRequestInit.call(void 0, request))
|
|
2235
2248
|
);
|
|
2236
2249
|
if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
|
|
2237
|
-
throw new (0,
|
|
2250
|
+
throw new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(404, "Not Found", true);
|
|
2238
2251
|
}
|
|
2239
|
-
|
|
2252
|
+
_chunk4FAGWJMTjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2240
2253
|
try {
|
|
2241
2254
|
const payload = await createFromReadableStream(res.body, {
|
|
2242
2255
|
temporaryReferences: void 0
|
|
@@ -2260,7 +2273,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2260
2273
|
}
|
|
2261
2274
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2262
2275
|
let results = { routes: {} };
|
|
2263
|
-
const dataKey =
|
|
2276
|
+
const dataKey = _chunk4FAGWJMTjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2264
2277
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2265
2278
|
results.routes[routeId] = { data: data2 };
|
|
2266
2279
|
}
|
|
@@ -2293,7 +2306,7 @@ function RSCHydratedRouter({
|
|
|
2293
2306
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2294
2307
|
);
|
|
2295
2308
|
React4.useEffect(() => {
|
|
2296
|
-
|
|
2309
|
+
_chunk4FAGWJMTjs.setIsHydrated.call(void 0, );
|
|
2297
2310
|
}, []);
|
|
2298
2311
|
React4.useLayoutEffect(() => {
|
|
2299
2312
|
const globalVar = window;
|
|
@@ -2380,7 +2393,7 @@ function RSCHydratedRouter({
|
|
|
2380
2393
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2381
2394
|
routeModules
|
|
2382
2395
|
};
|
|
2383
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2396
|
+
return /* @__PURE__ */ React4.createElement(_chunk4FAGWJMTjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunk4FAGWJMTjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkMKNSEQLSjs.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2384
2397
|
}
|
|
2385
2398
|
function createRouteFromServerManifest(match, payload) {
|
|
2386
2399
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2391,7 +2404,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2391
2404
|
// the server loader flow regardless of whether the client loader calls
|
|
2392
2405
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2393
2406
|
match.hasComponent && !match.element;
|
|
2394
|
-
|
|
2407
|
+
_chunk4FAGWJMTjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2395
2408
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2396
2409
|
let dataRoute = {
|
|
2397
2410
|
id: match.id,
|
|
@@ -2442,7 +2455,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2442
2455
|
return await callSingleFetch(singleFetch);
|
|
2443
2456
|
}
|
|
2444
2457
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2445
|
-
throw
|
|
2458
|
+
throw _chunk4FAGWJMTjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2446
2459
|
},
|
|
2447
2460
|
path: match.path,
|
|
2448
2461
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2455,7 +2468,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2455
2468
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2456
2469
|
};
|
|
2457
2470
|
if (typeof dataRoute.loader === "function") {
|
|
2458
|
-
dataRoute.loader.hydrate =
|
|
2471
|
+
dataRoute.loader.hydrate = _chunk4FAGWJMTjs.shouldHydrateRouteLoader.call(void 0,
|
|
2459
2472
|
match.id,
|
|
2460
2473
|
match.clientLoader,
|
|
2461
2474
|
match.hasLoader,
|
|
@@ -2465,7 +2478,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2465
2478
|
return dataRoute;
|
|
2466
2479
|
}
|
|
2467
2480
|
function callSingleFetch(singleFetch) {
|
|
2468
|
-
|
|
2481
|
+
_chunk4FAGWJMTjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2469
2482
|
return singleFetch();
|
|
2470
2483
|
}
|
|
2471
2484
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2473,7 +2486,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2473
2486
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2474
2487
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2475
2488
|
console.error(msg);
|
|
2476
|
-
throw new (0,
|
|
2489
|
+
throw new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2477
2490
|
}
|
|
2478
2491
|
}
|
|
2479
2492
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2493,7 +2506,7 @@ function getManifestUrl(paths) {
|
|
|
2493
2506
|
""
|
|
2494
2507
|
);
|
|
2495
2508
|
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
2496
|
-
|
|
2509
|
+
url.searchParams.set("paths", paths.sort().join(","));
|
|
2497
2510
|
return url;
|
|
2498
2511
|
}
|
|
2499
2512
|
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
|
@@ -2687,8 +2700,28 @@ async function routeRSCServerRequest({
|
|
|
2687
2700
|
}
|
|
2688
2701
|
});
|
|
2689
2702
|
};
|
|
2690
|
-
|
|
2691
|
-
|
|
2703
|
+
let deepestRenderedBoundaryId = null;
|
|
2704
|
+
const getPayload = () => {
|
|
2705
|
+
const payloadPromise = Promise.resolve(
|
|
2706
|
+
createFromReadableStream(createStream())
|
|
2707
|
+
);
|
|
2708
|
+
return Object.defineProperties(payloadPromise, {
|
|
2709
|
+
_deepestRenderedBoundaryId: {
|
|
2710
|
+
get() {
|
|
2711
|
+
return deepestRenderedBoundaryId;
|
|
2712
|
+
},
|
|
2713
|
+
set(boundaryId) {
|
|
2714
|
+
deepestRenderedBoundaryId = boundaryId;
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
formState: {
|
|
2718
|
+
get() {
|
|
2719
|
+
return payloadPromise.then(
|
|
2720
|
+
(payload) => payload.type === "render" ? payload.formState : void 0
|
|
2721
|
+
);
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
});
|
|
2692
2725
|
};
|
|
2693
2726
|
try {
|
|
2694
2727
|
if (!detectRedirectResponse.body) {
|
|
@@ -2697,7 +2730,7 @@ async function routeRSCServerRequest({
|
|
|
2697
2730
|
const payload = await createFromReadableStream(
|
|
2698
2731
|
detectRedirectResponse.body
|
|
2699
2732
|
);
|
|
2700
|
-
if (serverResponse.status ===
|
|
2733
|
+
if (serverResponse.status === _chunk4FAGWJMTjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2701
2734
|
const headers2 = new Headers(serverResponse.headers);
|
|
2702
2735
|
headers2.delete("Content-Encoding");
|
|
2703
2736
|
headers2.delete("Content-Length");
|
|
@@ -2712,7 +2745,7 @@ async function routeRSCServerRequest({
|
|
|
2712
2745
|
}
|
|
2713
2746
|
const html = await renderHTML(getPayload);
|
|
2714
2747
|
const headers = new Headers(serverResponse.headers);
|
|
2715
|
-
headers.set("Content-Type", "text/html");
|
|
2748
|
+
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2716
2749
|
if (!hydrate) {
|
|
2717
2750
|
return new Response(html, {
|
|
2718
2751
|
status: serverResponse.status,
|
|
@@ -2731,11 +2764,62 @@ async function routeRSCServerRequest({
|
|
|
2731
2764
|
if (reason instanceof Response) {
|
|
2732
2765
|
return reason;
|
|
2733
2766
|
}
|
|
2767
|
+
try {
|
|
2768
|
+
const status = _chunk4FAGWJMTjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2769
|
+
const html = await renderHTML(() => {
|
|
2770
|
+
const decoded = Promise.resolve(
|
|
2771
|
+
createFromReadableStream(createStream())
|
|
2772
|
+
);
|
|
2773
|
+
const payloadPromise = decoded.then(
|
|
2774
|
+
(payload) => Object.assign(payload, {
|
|
2775
|
+
status,
|
|
2776
|
+
errors: deepestRenderedBoundaryId ? {
|
|
2777
|
+
[deepestRenderedBoundaryId]: reason
|
|
2778
|
+
} : {}
|
|
2779
|
+
})
|
|
2780
|
+
);
|
|
2781
|
+
return Object.defineProperties(payloadPromise, {
|
|
2782
|
+
_deepestRenderedBoundaryId: {
|
|
2783
|
+
get() {
|
|
2784
|
+
return deepestRenderedBoundaryId;
|
|
2785
|
+
},
|
|
2786
|
+
set(boundaryId) {
|
|
2787
|
+
deepestRenderedBoundaryId = boundaryId;
|
|
2788
|
+
}
|
|
2789
|
+
},
|
|
2790
|
+
formState: {
|
|
2791
|
+
get() {
|
|
2792
|
+
return payloadPromise.then(
|
|
2793
|
+
(payload) => payload.type === "render" ? payload.formState : void 0
|
|
2794
|
+
);
|
|
2795
|
+
}
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
});
|
|
2799
|
+
const headers = new Headers(serverResponse.headers);
|
|
2800
|
+
headers.set("Content-Type", "text/html");
|
|
2801
|
+
if (!hydrate) {
|
|
2802
|
+
return new Response(html, {
|
|
2803
|
+
status,
|
|
2804
|
+
headers
|
|
2805
|
+
});
|
|
2806
|
+
}
|
|
2807
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _39 => _39.body])) {
|
|
2808
|
+
throw new Error("Failed to clone server response");
|
|
2809
|
+
}
|
|
2810
|
+
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
2811
|
+
return new Response(body2, {
|
|
2812
|
+
status,
|
|
2813
|
+
headers
|
|
2814
|
+
});
|
|
2815
|
+
} catch (e2) {
|
|
2816
|
+
}
|
|
2734
2817
|
throw reason;
|
|
2735
2818
|
}
|
|
2736
2819
|
}
|
|
2737
2820
|
function RSCStaticRouter({ getPayload }) {
|
|
2738
|
-
const
|
|
2821
|
+
const decoded = getPayload();
|
|
2822
|
+
const payload = useSafe(decoded);
|
|
2739
2823
|
if (payload.type === "redirect") {
|
|
2740
2824
|
throw new Response(null, {
|
|
2741
2825
|
status: payload.status,
|
|
@@ -2747,7 +2831,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2747
2831
|
if (payload.type !== "render") return null;
|
|
2748
2832
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2749
2833
|
for (const match of payload.matches) {
|
|
2750
|
-
if (
|
|
2834
|
+
if (_chunk4FAGWJMTjs.shouldHydrateRouteLoader.call(void 0,
|
|
2751
2835
|
match.id,
|
|
2752
2836
|
match.clientLoader,
|
|
2753
2837
|
match.hasLoader,
|
|
@@ -2757,6 +2841,12 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2757
2841
|
}
|
|
2758
2842
|
}
|
|
2759
2843
|
const context = {
|
|
2844
|
+
get _deepestRenderedBoundaryId() {
|
|
2845
|
+
return _nullishCoalesce(decoded._deepestRenderedBoundaryId, () => ( null));
|
|
2846
|
+
},
|
|
2847
|
+
set _deepestRenderedBoundaryId(boundaryId) {
|
|
2848
|
+
decoded._deepestRenderedBoundaryId = boundaryId;
|
|
2849
|
+
},
|
|
2760
2850
|
actionData: payload.actionData,
|
|
2761
2851
|
actionHeaders: {},
|
|
2762
2852
|
basename: payload.basename,
|
|
@@ -2781,7 +2871,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2781
2871
|
}
|
|
2782
2872
|
}))
|
|
2783
2873
|
};
|
|
2784
|
-
const router =
|
|
2874
|
+
const router = _chunkMKNSEQLSjs.createStaticRouter.call(void 0,
|
|
2785
2875
|
payload.matches.reduceRight((previous, match) => {
|
|
2786
2876
|
const route = {
|
|
2787
2877
|
id: match.id,
|
|
@@ -2825,8 +2915,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2825
2915
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2826
2916
|
routeModules: createRSCRouteModules(payload)
|
|
2827
2917
|
};
|
|
2828
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2829
|
-
|
|
2918
|
+
return /* @__PURE__ */ React5.createElement(_chunk4FAGWJMTjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunk4FAGWJMTjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2919
|
+
_chunkMKNSEQLSjs.StaticRouterProvider,
|
|
2830
2920
|
{
|
|
2831
2921
|
context,
|
|
2832
2922
|
router,
|
|
@@ -2869,10 +2959,10 @@ function getRSCStream() {
|
|
|
2869
2959
|
});
|
|
2870
2960
|
if (typeof document !== "undefined" && document.readyState === "loading") {
|
|
2871
2961
|
document.addEventListener("DOMContentLoaded", () => {
|
|
2872
|
-
_optionalChain([streamController, 'optionalAccess',
|
|
2962
|
+
_optionalChain([streamController, 'optionalAccess', _40 => _40.close, 'call', _41 => _41()]);
|
|
2873
2963
|
});
|
|
2874
2964
|
} else {
|
|
2875
|
-
_optionalChain([streamController, 'optionalAccess',
|
|
2965
|
+
_optionalChain([streamController, 'optionalAccess', _42 => _42.close, 'call', _43 => _43()]);
|
|
2876
2966
|
}
|
|
2877
2967
|
return rscStream;
|
|
2878
2968
|
}
|
|
@@ -2884,7 +2974,7 @@ function deserializeErrors(errors) {
|
|
|
2884
2974
|
let serialized = {};
|
|
2885
2975
|
for (let [key, val] of entries) {
|
|
2886
2976
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2887
|
-
serialized[key] = new (0,
|
|
2977
|
+
serialized[key] = new (0, _chunk4FAGWJMTjs.ErrorResponseImpl)(
|
|
2888
2978
|
val.status,
|
|
2889
2979
|
val.statusText,
|
|
2890
2980
|
val.data,
|
|
@@ -3043,4 +3133,4 @@ function deserializeErrors(errors) {
|
|
|
3043
3133
|
|
|
3044
3134
|
|
|
3045
3135
|
|
|
3046
|
-
exports.Await =
|
|
3136
|
+
exports.Await = _chunkMKNSEQLSjs.Await; exports.BrowserRouter = _chunkMKNSEQLSjs.BrowserRouter; exports.Form = _chunkMKNSEQLSjs.Form; exports.HashRouter = _chunkMKNSEQLSjs.HashRouter; exports.IDLE_BLOCKER = _chunk4FAGWJMTjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk4FAGWJMTjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk4FAGWJMTjs.IDLE_NAVIGATION; exports.Link = _chunkMKNSEQLSjs.Link; exports.Links = _chunk4FAGWJMTjs.Links; exports.MemoryRouter = _chunkMKNSEQLSjs.MemoryRouter; exports.Meta = _chunk4FAGWJMTjs.Meta; exports.NavLink = _chunkMKNSEQLSjs.NavLink; exports.Navigate = _chunkMKNSEQLSjs.Navigate; exports.NavigationType = _chunk4FAGWJMTjs.Action; exports.Outlet = _chunkMKNSEQLSjs.Outlet; exports.PrefetchPageLinks = _chunk4FAGWJMTjs.PrefetchPageLinks; exports.Route = _chunkMKNSEQLSjs.Route; exports.Router = _chunkMKNSEQLSjs.Router; exports.RouterContextProvider = _chunk4FAGWJMTjs.RouterContextProvider; exports.RouterProvider = _chunkMKNSEQLSjs.RouterProvider; exports.Routes = _chunkMKNSEQLSjs.Routes; exports.Scripts = _chunk4FAGWJMTjs.Scripts; exports.ScrollRestoration = _chunkMKNSEQLSjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkMKNSEQLSjs.StaticRouter; exports.StaticRouterProvider = _chunkMKNSEQLSjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk4FAGWJMTjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk4FAGWJMTjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk4FAGWJMTjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk4FAGWJMTjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk4FAGWJMTjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk4FAGWJMTjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunk4FAGWJMTjs.LocationContext; exports.UNSAFE_NavigationContext = _chunk4FAGWJMTjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk4FAGWJMTjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk4FAGWJMTjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk4FAGWJMTjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk4FAGWJMTjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkMKNSEQLSjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkMKNSEQLSjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkMKNSEQLSjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk4FAGWJMTjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk4FAGWJMTjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk4FAGWJMTjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunk4FAGWJMTjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk4FAGWJMTjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk4FAGWJMTjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk4FAGWJMTjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkMKNSEQLSjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk4FAGWJMTjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkMKNSEQLSjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk4FAGWJMTjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk4FAGWJMTjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkMKNSEQLSjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkMKNSEQLSjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkMKNSEQLSjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkMKNSEQLSjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkMKNSEQLSjs.createBrowserRouter; exports.createContext = _chunk4FAGWJMTjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkMKNSEQLSjs.createHashRouter; exports.createMemoryRouter = _chunkMKNSEQLSjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk4FAGWJMTjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkMKNSEQLSjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkMKNSEQLSjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkMKNSEQLSjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkMKNSEQLSjs.createStaticHandler; exports.createStaticRouter = _chunkMKNSEQLSjs.createStaticRouter; exports.data = _chunk4FAGWJMTjs.data; exports.generatePath = _chunk4FAGWJMTjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk4FAGWJMTjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk4FAGWJMTjs.matchPath; exports.matchRoutes = _chunk4FAGWJMTjs.matchRoutes; exports.parsePath = _chunk4FAGWJMTjs.parsePath; exports.redirect = _chunk4FAGWJMTjs.redirect; exports.redirectDocument = _chunk4FAGWJMTjs.redirectDocument; exports.renderMatches = _chunkMKNSEQLSjs.renderMatches; exports.replace = _chunk4FAGWJMTjs.replace; exports.resolvePath = _chunk4FAGWJMTjs.resolvePath; exports.unstable_HistoryRouter = _chunkMKNSEQLSjs.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 = _chunkMKNSEQLSjs.usePrompt; exports.useActionData = _chunk4FAGWJMTjs.useActionData; exports.useAsyncError = _chunk4FAGWJMTjs.useAsyncError; exports.useAsyncValue = _chunk4FAGWJMTjs.useAsyncValue; exports.useBeforeUnload = _chunkMKNSEQLSjs.useBeforeUnload; exports.useBlocker = _chunk4FAGWJMTjs.useBlocker; exports.useFetcher = _chunkMKNSEQLSjs.useFetcher; exports.useFetchers = _chunkMKNSEQLSjs.useFetchers; exports.useFormAction = _chunkMKNSEQLSjs.useFormAction; exports.useHref = _chunk4FAGWJMTjs.useHref; exports.useInRouterContext = _chunk4FAGWJMTjs.useInRouterContext; exports.useLinkClickHandler = _chunkMKNSEQLSjs.useLinkClickHandler; exports.useLoaderData = _chunk4FAGWJMTjs.useLoaderData; exports.useLocation = _chunk4FAGWJMTjs.useLocation; exports.useMatch = _chunk4FAGWJMTjs.useMatch; exports.useMatches = _chunk4FAGWJMTjs.useMatches; exports.useNavigate = _chunk4FAGWJMTjs.useNavigate; exports.useNavigation = _chunk4FAGWJMTjs.useNavigation; exports.useNavigationType = _chunk4FAGWJMTjs.useNavigationType; exports.useOutlet = _chunk4FAGWJMTjs.useOutlet; exports.useOutletContext = _chunk4FAGWJMTjs.useOutletContext; exports.useParams = _chunk4FAGWJMTjs.useParams; exports.useResolvedPath = _chunk4FAGWJMTjs.useResolvedPath; exports.useRevalidator = _chunk4FAGWJMTjs.useRevalidator; exports.useRouteError = _chunk4FAGWJMTjs.useRouteError; exports.useRouteLoaderData = _chunk4FAGWJMTjs.useRouteLoaderData; exports.useRoutes = _chunk4FAGWJMTjs.useRoutes; exports.useSearchParams = _chunkMKNSEQLSjs.useSearchParams; exports.useSubmit = _chunkMKNSEQLSjs.useSubmit; exports.useViewTransitionState = _chunkMKNSEQLSjs.useViewTransitionState;
|