react-router 7.9.4 → 7.9.6
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 +70 -0
- package/dist/development/browser-BbBXFHbO.d.ts +310 -0
- package/dist/development/browser-C07r42Tt.d.mts +310 -0
- package/dist/development/{chunk-OIYGIGL5.mjs → chunk-4WY6JWTD.mjs} +458 -43
- package/dist/development/{chunk-DI2QHYMJ.js → chunk-AMVS5XVJ.js} +1314 -138
- package/dist/development/{chunk-WY5IRSCW.mjs → chunk-G3INQAYP.mjs} +197 -857
- package/dist/development/chunk-O4JVZSOY.js +1310 -0
- package/dist/development/chunk-PZWDWJAY.js +188 -0
- package/dist/development/dom-export.d.mts +103 -6
- package/dist/development/dom-export.d.ts +103 -4
- package/dist/development/dom-export.js +708 -20
- package/dist/development/dom-export.mjs +692 -11
- package/dist/{production/index-react-server-client-BbRcBjrA.d.ts → development/index-react-server-client-Da3kmxNd.d.ts} +195 -135
- package/dist/{production/index-react-server-client-BIz4AUNd.d.mts → development/index-react-server-client-rcoGPJhU.d.mts} +137 -78
- package/dist/development/index-react-server-client.d.mts +2 -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 +107 -3
- package/dist/development/index-react-server.d.ts +107 -3
- package/dist/development/index-react-server.js +259 -13
- package/dist/development/index-react-server.mjs +259 -13
- package/dist/development/index.d.mts +14 -320
- package/dist/development/index.d.ts +14 -362
- package/dist/development/index.js +146 -962
- package/dist/development/index.mjs +3 -9
- package/dist/development/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
- package/dist/development/lib/types/internal.d.mts +2 -3
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/register-C34pU-in.d.ts → development/register-BpU9rFBJ.d.ts} +1 -1
- package/dist/development/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
- package/dist/{production/context-DSyS5mLj.d.mts → development/router-CAvh_Drx.d.mts} +1877 -1254
- package/dist/production/browser-BbBXFHbO.d.ts +310 -0
- package/dist/production/browser-C07r42Tt.d.mts +310 -0
- package/dist/production/{chunk-4E5LHRQP.js → chunk-EAIF67OW.js} +1314 -138
- package/dist/production/{chunk-FR6HSPLK.mjs → chunk-FDUMZGKM.mjs} +197 -857
- package/dist/production/{chunk-3TADTUL4.mjs → chunk-FUSXQSWG.mjs} +458 -43
- package/dist/production/chunk-G5A35OQU.js +188 -0
- package/dist/production/chunk-QN64DHI4.js +1310 -0
- package/dist/production/dom-export.d.mts +103 -6
- package/dist/production/dom-export.d.ts +103 -4
- package/dist/production/dom-export.js +708 -20
- package/dist/production/dom-export.mjs +692 -11
- package/dist/{development/index-react-server-client-BIz4AUNd.d.mts → production/index-react-server-client-Da3kmxNd.d.ts} +137 -78
- package/dist/{development/index-react-server-client-BbRcBjrA.d.ts → production/index-react-server-client-rcoGPJhU.d.mts} +195 -135
- package/dist/production/index-react-server-client.d.mts +2 -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 +107 -3
- package/dist/production/index-react-server.d.ts +107 -3
- package/dist/production/index-react-server.js +259 -13
- package/dist/production/index-react-server.mjs +259 -13
- package/dist/production/index.d.mts +14 -320
- package/dist/production/index.d.ts +14 -362
- package/dist/production/index.js +146 -962
- package/dist/production/index.mjs +3 -9
- package/dist/production/{routeModules-D5iJ6JYT.d.ts → instrumentation-Unc20tLk.d.ts} +178 -25
- package/dist/production/lib/types/internal.d.mts +2 -3
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-C34pU-in.d.ts → production/register-BpU9rFBJ.d.ts} +1 -1
- package/dist/production/{register-CI4bTprK.d.mts → register-QkB3HGjm.d.mts} +1 -1
- package/dist/{development/context-DSyS5mLj.d.mts → production/router-CAvh_Drx.d.mts} +1877 -1254
- package/package.json +1 -1
- package/dist/development/browser-z32v5KVN.d.mts +0 -46
- package/dist/development/chunk-72XNTZCV.js +0 -2089
- package/dist/development/route-data-DZQOUSqV.d.mts +0 -473
- package/dist/production/browser-z32v5KVN.d.mts +0 -46
- package/dist/production/chunk-WNLQ53P5.js +0 -2089
- package/dist/production/route-data-DZQOUSqV.d.mts +0 -473
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.
|
|
2
|
+
* react-router v7.9.6
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkG5A35OQUjs = require('./chunk-G5A35OQU.js');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
43
|
+
var _chunkQN64DHI4js = require('./chunk-QN64DHI4.js');
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
|
|
@@ -55,7 +57,6 @@
|
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
|
|
58
|
-
var _chunkWNLQ53P5js = require('./chunk-WNLQ53P5.js');
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
|
|
@@ -144,13 +145,10 @@ var _chunkWNLQ53P5js = require('./chunk-WNLQ53P5.js');
|
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var _chunk4E5LHRQPjs = require('./chunk-4E5LHRQP.js');
|
|
148
|
+
var _chunkEAIF67OWjs = require('./chunk-EAIF67OW.js');
|
|
151
149
|
|
|
152
150
|
// lib/dom/ssr/server.tsx
|
|
153
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var
|
|
151
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
154
152
|
function ServerRouter({
|
|
155
153
|
context,
|
|
156
154
|
url,
|
|
@@ -160,7 +158,7 @@ function ServerRouter({
|
|
|
160
158
|
url = new URL(url);
|
|
161
159
|
}
|
|
162
160
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
163
|
-
let routes =
|
|
161
|
+
let routes = _chunkEAIF67OWjs.createServerRoutes.call(void 0,
|
|
164
162
|
manifest.routes,
|
|
165
163
|
routeModules,
|
|
166
164
|
context.future,
|
|
@@ -173,7 +171,7 @@ function ServerRouter({
|
|
|
173
171
|
let routeId = match.route.id;
|
|
174
172
|
let route = routeModules[routeId];
|
|
175
173
|
let manifestRoute = context.manifest.routes[routeId];
|
|
176
|
-
if (route && manifestRoute &&
|
|
174
|
+
if (route && manifestRoute && _chunkEAIF67OWjs.shouldHydrateRouteLoader.call(void 0,
|
|
177
175
|
routeId,
|
|
178
176
|
route.clientLoader,
|
|
179
177
|
manifestRoute.hasLoader,
|
|
@@ -182,9 +180,9 @@ function ServerRouter({
|
|
|
182
180
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
183
181
|
}
|
|
184
182
|
}
|
|
185
|
-
let router =
|
|
183
|
+
let router = _chunkQN64DHI4js.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
186
184
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
187
|
-
|
|
185
|
+
_chunkEAIF67OWjs.FrameworkContext.Provider,
|
|
188
186
|
{
|
|
189
187
|
value: {
|
|
190
188
|
manifest,
|
|
@@ -199,8 +197,8 @@ function ServerRouter({
|
|
|
199
197
|
renderMeta: context.renderMeta
|
|
200
198
|
}
|
|
201
199
|
},
|
|
202
|
-
/* @__PURE__ */ React.createElement(
|
|
203
|
-
|
|
200
|
+
/* @__PURE__ */ React.createElement(_chunkEAIF67OWjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
201
|
+
_chunkQN64DHI4js.StaticRouterProvider,
|
|
204
202
|
{
|
|
205
203
|
router,
|
|
206
204
|
context: context.staticHandlerContext,
|
|
@@ -208,7 +206,7 @@ function ServerRouter({
|
|
|
208
206
|
}
|
|
209
207
|
))
|
|
210
208
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
211
|
-
|
|
209
|
+
_chunkEAIF67OWjs.StreamTransfer,
|
|
212
210
|
{
|
|
213
211
|
context,
|
|
214
212
|
identifier: 0,
|
|
@@ -250,18 +248,18 @@ function createRoutesStub(routes, _context) {
|
|
|
250
248
|
let patched = processRoutes(
|
|
251
249
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
252
250
|
// types compared to `AgnosticRouteObject`
|
|
253
|
-
|
|
254
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
251
|
+
_chunkEAIF67OWjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
252
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkEAIF67OWjs.RouterContextProvider)() : {},
|
|
255
253
|
frameworkContextRef.current.manifest,
|
|
256
254
|
frameworkContextRef.current.routeModules
|
|
257
255
|
);
|
|
258
|
-
routerRef.current =
|
|
256
|
+
routerRef.current = _chunkEAIF67OWjs.createMemoryRouter.call(void 0, patched, {
|
|
259
257
|
initialEntries,
|
|
260
258
|
initialIndex,
|
|
261
259
|
hydrationData
|
|
262
260
|
});
|
|
263
261
|
}
|
|
264
|
-
return /* @__PURE__ */ React2.createElement(
|
|
262
|
+
return /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.RouterProvider, { router: routerRef.current }));
|
|
265
263
|
};
|
|
266
264
|
}
|
|
267
265
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -275,9 +273,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
275
273
|
id: route.id,
|
|
276
274
|
path: route.path,
|
|
277
275
|
index: route.index,
|
|
278
|
-
Component: route.Component ?
|
|
279
|
-
HydrateFallback: route.HydrateFallback ?
|
|
280
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
276
|
+
Component: route.Component ? _chunkEAIF67OWjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
277
|
+
HydrateFallback: route.HydrateFallback ? _chunkEAIF67OWjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
278
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkEAIF67OWjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
281
279
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
282
280
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
283
281
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -312,7 +310,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
312
310
|
};
|
|
313
311
|
manifest.routes[newRoute.id] = entryRoute;
|
|
314
312
|
routeModules[route.id] = {
|
|
315
|
-
default: newRoute.Component ||
|
|
313
|
+
default: newRoute.Component || _chunkEAIF67OWjs.Outlet,
|
|
316
314
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
317
315
|
handle: route.handle,
|
|
318
316
|
links: route.links,
|
|
@@ -507,7 +505,7 @@ function myUnescape(value) {
|
|
|
507
505
|
return result;
|
|
508
506
|
}
|
|
509
507
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
510
|
-
|
|
508
|
+
_chunkEAIF67OWjs.warnOnce.call(void 0,
|
|
511
509
|
!expires,
|
|
512
510
|
`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.`
|
|
513
511
|
);
|
|
@@ -561,7 +559,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
561
559
|
let entries = Object.entries(errors);
|
|
562
560
|
let serialized = {};
|
|
563
561
|
for (let [key, val] of entries) {
|
|
564
|
-
if (
|
|
562
|
+
if (_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, val)) {
|
|
565
563
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
566
564
|
} else if (val instanceof Error) {
|
|
567
565
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -586,7 +584,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
586
584
|
|
|
587
585
|
// lib/server-runtime/routeMatching.ts
|
|
588
586
|
function matchServerRoutes(routes, pathname, basename) {
|
|
589
|
-
let matches =
|
|
587
|
+
let matches = _chunkEAIF67OWjs.matchRoutes.call(void 0,
|
|
590
588
|
routes,
|
|
591
589
|
pathname,
|
|
592
590
|
basename
|
|
@@ -602,16 +600,17 @@ function matchServerRoutes(routes, pathname, basename) {
|
|
|
602
600
|
// lib/server-runtime/data.ts
|
|
603
601
|
async function callRouteHandler(handler, args) {
|
|
604
602
|
let result = await handler({
|
|
605
|
-
request: stripRoutesParam(
|
|
603
|
+
request: stripRoutesParam(stripIndexParam(args.request)),
|
|
606
604
|
params: args.params,
|
|
607
|
-
context: args.context
|
|
605
|
+
context: args.context,
|
|
606
|
+
unstable_pattern: args.unstable_pattern
|
|
608
607
|
});
|
|
609
|
-
if (
|
|
608
|
+
if (_chunkEAIF67OWjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkEAIF67OWjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
610
609
|
throw new Response(null, result.init);
|
|
611
610
|
}
|
|
612
611
|
return result;
|
|
613
612
|
}
|
|
614
|
-
function
|
|
613
|
+
function stripIndexParam(request) {
|
|
615
614
|
let url = new URL(request.url);
|
|
616
615
|
let indexValues = url.searchParams.getAll("index");
|
|
617
616
|
url.searchParams.delete("index");
|
|
@@ -725,17 +724,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
725
724
|
controller.close();
|
|
726
725
|
}
|
|
727
726
|
});
|
|
728
|
-
let decoded = await
|
|
727
|
+
let decoded = await _chunkEAIF67OWjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
729
728
|
let data2 = decoded.value;
|
|
730
|
-
if (data2 &&
|
|
731
|
-
let result = data2[
|
|
729
|
+
if (data2 && _chunkEAIF67OWjs.SingleFetchRedirectSymbol in data2) {
|
|
730
|
+
let result = data2[_chunkEAIF67OWjs.SingleFetchRedirectSymbol];
|
|
732
731
|
let init = { status: result.status };
|
|
733
732
|
if (result.reload) {
|
|
734
|
-
throw
|
|
733
|
+
throw _chunkEAIF67OWjs.redirectDocument.call(void 0, result.redirect, init);
|
|
735
734
|
} else if (result.replace) {
|
|
736
|
-
throw
|
|
735
|
+
throw _chunkEAIF67OWjs.replace.call(void 0, result.redirect, init);
|
|
737
736
|
} else {
|
|
738
|
-
throw
|
|
737
|
+
throw _chunkEAIF67OWjs.redirect.call(void 0, result.redirect, init);
|
|
739
738
|
}
|
|
740
739
|
} else {
|
|
741
740
|
invariant2(
|
|
@@ -774,7 +773,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
774
773
|
|
|
775
774
|
// lib/server-runtime/serverHandoff.ts
|
|
776
775
|
function createServerHandoffString(serverHandoff) {
|
|
777
|
-
return
|
|
776
|
+
return _chunkEAIF67OWjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
778
777
|
}
|
|
779
778
|
|
|
780
779
|
// lib/server-runtime/headers.ts
|
|
@@ -851,7 +850,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
851
850
|
|
|
852
851
|
// lib/server-runtime/single-fetch.ts
|
|
853
852
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
854
|
-
...
|
|
853
|
+
..._chunkEAIF67OWjs.NO_BODY_STATUS_CODES,
|
|
855
854
|
304
|
|
856
855
|
]);
|
|
857
856
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -881,7 +880,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
881
880
|
return handleQueryError(error);
|
|
882
881
|
}
|
|
883
882
|
function handleQueryResult(result) {
|
|
884
|
-
return
|
|
883
|
+
return _chunkEAIF67OWjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
885
884
|
}
|
|
886
885
|
function handleQueryError(error) {
|
|
887
886
|
handleError(error);
|
|
@@ -893,12 +892,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
893
892
|
}
|
|
894
893
|
function staticContextToResponse(context) {
|
|
895
894
|
let headers = getDocumentHeaders(context, build);
|
|
896
|
-
if (
|
|
895
|
+
if (_chunkEAIF67OWjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
897
896
|
return new Response(null, { status: context.statusCode, headers });
|
|
898
897
|
}
|
|
899
898
|
if (context.errors) {
|
|
900
899
|
Object.values(context.errors).forEach((err) => {
|
|
901
|
-
if (!
|
|
900
|
+
if (!_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
902
901
|
handleError(err);
|
|
903
902
|
}
|
|
904
903
|
});
|
|
@@ -945,7 +944,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
945
944
|
return handleQueryError(error);
|
|
946
945
|
}
|
|
947
946
|
function handleQueryResult(result) {
|
|
948
|
-
return
|
|
947
|
+
return _chunkEAIF67OWjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
949
948
|
}
|
|
950
949
|
function handleQueryError(error) {
|
|
951
950
|
handleError(error);
|
|
@@ -957,12 +956,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
957
956
|
}
|
|
958
957
|
function staticContextToResponse(context) {
|
|
959
958
|
let headers = getDocumentHeaders(context, build);
|
|
960
|
-
if (
|
|
959
|
+
if (_chunkEAIF67OWjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
961
960
|
return new Response(null, { status: context.statusCode, headers });
|
|
962
961
|
}
|
|
963
962
|
if (context.errors) {
|
|
964
963
|
Object.values(context.errors).forEach((err) => {
|
|
965
|
-
if (!
|
|
964
|
+
if (!_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
966
965
|
handleError(err);
|
|
967
966
|
}
|
|
968
967
|
});
|
|
@@ -1026,15 +1025,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1026
1025
|
headers.delete("Location");
|
|
1027
1026
|
headers.set("Content-Type", "text/x-script");
|
|
1028
1027
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1029
|
-
result: request.method === "GET" ? { [
|
|
1028
|
+
result: request.method === "GET" ? { [_chunkEAIF67OWjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1030
1029
|
headers,
|
|
1031
|
-
status:
|
|
1030
|
+
status: _chunkEAIF67OWjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1032
1031
|
});
|
|
1033
1032
|
}
|
|
1034
1033
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1035
1034
|
let redirect2 = headers.get("Location");
|
|
1036
1035
|
if (basename) {
|
|
1037
|
-
redirect2 =
|
|
1036
|
+
redirect2 = _chunkEAIF67OWjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1038
1037
|
}
|
|
1039
1038
|
return {
|
|
1040
1039
|
redirect: redirect2,
|
|
@@ -1060,7 +1059,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1060
1059
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1061
1060
|
);
|
|
1062
1061
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1063
|
-
return
|
|
1062
|
+
return _chunkEAIF67OWjs.encode.call(void 0, data2, {
|
|
1064
1063
|
signal: controller.signal,
|
|
1065
1064
|
plugins: [
|
|
1066
1065
|
(value) => {
|
|
@@ -1068,12 +1067,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1068
1067
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1069
1068
|
return ["SanitizedError", name, message, stack];
|
|
1070
1069
|
}
|
|
1071
|
-
if (value instanceof
|
|
1070
|
+
if (value instanceof _chunkEAIF67OWjs.ErrorResponseImpl) {
|
|
1072
1071
|
let { data: data3, status, statusText } = value;
|
|
1073
1072
|
return ["ErrorResponse", data3, status, statusText];
|
|
1074
1073
|
}
|
|
1075
|
-
if (value && typeof value === "object" &&
|
|
1076
|
-
return ["SingleFetchRedirect", value[
|
|
1074
|
+
if (value && typeof value === "object" && _chunkEAIF67OWjs.SingleFetchRedirectSymbol in value) {
|
|
1075
|
+
return ["SingleFetchRedirect", value[_chunkEAIF67OWjs.SingleFetchRedirectSymbol]];
|
|
1077
1076
|
}
|
|
1078
1077
|
}
|
|
1079
1078
|
],
|
|
@@ -1096,46 +1095,19 @@ function derive(build, mode) {
|
|
|
1096
1095
|
let routes = createRoutes(build.routes);
|
|
1097
1096
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1098
1097
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1099
|
-
let staticHandler =
|
|
1100
|
-
basename: build.basename
|
|
1098
|
+
let staticHandler = _chunkEAIF67OWjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1099
|
+
basename: build.basename,
|
|
1100
|
+
unstable_instrumentations: build.entry.module.unstable_instrumentations
|
|
1101
1101
|
});
|
|
1102
1102
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1103
1103
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1104
1104
|
console.error(
|
|
1105
1105
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1106
|
-
|
|
1106
|
+
_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1107
1107
|
);
|
|
1108
1108
|
}
|
|
1109
1109
|
});
|
|
1110
|
-
|
|
1111
|
-
routes,
|
|
1112
|
-
dataRoutes,
|
|
1113
|
-
serverMode,
|
|
1114
|
-
staticHandler,
|
|
1115
|
-
errorHandler
|
|
1116
|
-
};
|
|
1117
|
-
}
|
|
1118
|
-
var createRequestHandler = (build, mode) => {
|
|
1119
|
-
let _build;
|
|
1120
|
-
let routes;
|
|
1121
|
-
let serverMode;
|
|
1122
|
-
let staticHandler;
|
|
1123
|
-
let errorHandler;
|
|
1124
|
-
return async function requestHandler(request, initialContext) {
|
|
1125
|
-
_build = typeof build === "function" ? await build() : build;
|
|
1126
|
-
if (typeof build === "function") {
|
|
1127
|
-
let derived = derive(_build, mode);
|
|
1128
|
-
routes = derived.routes;
|
|
1129
|
-
serverMode = derived.serverMode;
|
|
1130
|
-
staticHandler = derived.staticHandler;
|
|
1131
|
-
errorHandler = derived.errorHandler;
|
|
1132
|
-
} else if (!routes || !serverMode || !staticHandler || !errorHandler) {
|
|
1133
|
-
let derived = derive(_build, mode);
|
|
1134
|
-
routes = derived.routes;
|
|
1135
|
-
serverMode = derived.serverMode;
|
|
1136
|
-
staticHandler = derived.staticHandler;
|
|
1137
|
-
errorHandler = derived.errorHandler;
|
|
1138
|
-
}
|
|
1110
|
+
let requestHandler = async (request, initialContext) => {
|
|
1139
1111
|
let params = {};
|
|
1140
1112
|
let loadContext;
|
|
1141
1113
|
let handleError = (error) => {
|
|
@@ -1148,37 +1120,37 @@ var createRequestHandler = (build, mode) => {
|
|
|
1148
1120
|
request
|
|
1149
1121
|
});
|
|
1150
1122
|
};
|
|
1151
|
-
if (
|
|
1152
|
-
if (initialContext && !(initialContext instanceof
|
|
1123
|
+
if (build.future.v8_middleware) {
|
|
1124
|
+
if (initialContext && !(initialContext instanceof _chunkEAIF67OWjs.RouterContextProvider)) {
|
|
1153
1125
|
let error = new Error(
|
|
1154
1126
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1155
1127
|
);
|
|
1156
1128
|
handleError(error);
|
|
1157
1129
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1158
1130
|
}
|
|
1159
|
-
loadContext = initialContext || new (0,
|
|
1131
|
+
loadContext = initialContext || new (0, _chunkEAIF67OWjs.RouterContextProvider)();
|
|
1160
1132
|
} else {
|
|
1161
1133
|
loadContext = initialContext || {};
|
|
1162
1134
|
}
|
|
1163
1135
|
let url = new URL(request.url);
|
|
1164
|
-
let normalizedBasename =
|
|
1136
|
+
let normalizedBasename = build.basename || "/";
|
|
1165
1137
|
let normalizedPath = url.pathname;
|
|
1166
|
-
if (
|
|
1138
|
+
if (_chunkEAIF67OWjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1167
1139
|
normalizedPath = normalizedBasename;
|
|
1168
1140
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1169
1141
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1170
1142
|
}
|
|
1171
|
-
if (
|
|
1143
|
+
if (_chunkEAIF67OWjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1172
1144
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1173
1145
|
}
|
|
1174
1146
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1175
|
-
if (!
|
|
1147
|
+
if (!build.ssr) {
|
|
1176
1148
|
let decodedPath = decodeURI(normalizedPath);
|
|
1177
1149
|
if (normalizedBasename !== "/") {
|
|
1178
|
-
let strippedPath =
|
|
1150
|
+
let strippedPath = _chunkEAIF67OWjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1179
1151
|
if (strippedPath == null) {
|
|
1180
1152
|
errorHandler(
|
|
1181
|
-
new (0,
|
|
1153
|
+
new (0, _chunkEAIF67OWjs.ErrorResponseImpl)(
|
|
1182
1154
|
404,
|
|
1183
1155
|
"Not Found",
|
|
1184
1156
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1196,12 +1168,12 @@ var createRequestHandler = (build, mode) => {
|
|
|
1196
1168
|
}
|
|
1197
1169
|
decodedPath = strippedPath;
|
|
1198
1170
|
}
|
|
1199
|
-
if (
|
|
1171
|
+
if (build.prerender.length === 0) {
|
|
1200
1172
|
isSpaMode = true;
|
|
1201
|
-
} else if (!
|
|
1173
|
+
} else if (!build.prerender.includes(decodedPath) && !build.prerender.includes(decodedPath + "/")) {
|
|
1202
1174
|
if (url.pathname.endsWith(".data")) {
|
|
1203
1175
|
errorHandler(
|
|
1204
|
-
new (0,
|
|
1176
|
+
new (0, _chunkEAIF67OWjs.ErrorResponseImpl)(
|
|
1205
1177
|
404,
|
|
1206
1178
|
"Not Found",
|
|
1207
1179
|
`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.`
|
|
@@ -1221,20 +1193,20 @@ var createRequestHandler = (build, mode) => {
|
|
|
1221
1193
|
}
|
|
1222
1194
|
}
|
|
1223
1195
|
}
|
|
1224
|
-
let manifestUrl =
|
|
1225
|
-
|
|
1196
|
+
let manifestUrl = _chunkEAIF67OWjs.getManifestPath.call(void 0,
|
|
1197
|
+
build.routeDiscovery.manifestPath,
|
|
1226
1198
|
normalizedBasename
|
|
1227
1199
|
);
|
|
1228
1200
|
if (url.pathname === manifestUrl) {
|
|
1229
1201
|
try {
|
|
1230
|
-
let res = await handleManifestRequest(
|
|
1202
|
+
let res = await handleManifestRequest(build, routes, url);
|
|
1231
1203
|
return res;
|
|
1232
1204
|
} catch (e) {
|
|
1233
1205
|
handleError(e);
|
|
1234
1206
|
return new Response("Unknown Server Error", { status: 500 });
|
|
1235
1207
|
}
|
|
1236
1208
|
}
|
|
1237
|
-
let matches = matchServerRoutes(routes, normalizedPath,
|
|
1209
|
+
let matches = matchServerRoutes(routes, normalizedPath, build.basename);
|
|
1238
1210
|
if (matches && matches.length > 0) {
|
|
1239
1211
|
Object.assign(params, matches[0].params);
|
|
1240
1212
|
}
|
|
@@ -1245,36 +1217,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1245
1217
|
let singleFetchMatches = matchServerRoutes(
|
|
1246
1218
|
routes,
|
|
1247
1219
|
handlerUrl.pathname,
|
|
1248
|
-
|
|
1220
|
+
build.basename
|
|
1249
1221
|
);
|
|
1250
1222
|
response = await handleSingleFetchRequest(
|
|
1251
1223
|
serverMode,
|
|
1252
|
-
|
|
1224
|
+
build,
|
|
1253
1225
|
staticHandler,
|
|
1254
1226
|
request,
|
|
1255
1227
|
handlerUrl,
|
|
1256
1228
|
loadContext,
|
|
1257
1229
|
handleError
|
|
1258
1230
|
);
|
|
1259
|
-
if (
|
|
1231
|
+
if (_chunkEAIF67OWjs.isRedirectResponse.call(void 0, response)) {
|
|
1260
1232
|
response = generateSingleFetchRedirectResponse(
|
|
1261
1233
|
response,
|
|
1262
1234
|
request,
|
|
1263
|
-
|
|
1235
|
+
build,
|
|
1264
1236
|
serverMode
|
|
1265
1237
|
);
|
|
1266
1238
|
}
|
|
1267
|
-
if (
|
|
1268
|
-
response = await
|
|
1239
|
+
if (build.entry.module.handleDataRequest) {
|
|
1240
|
+
response = await build.entry.module.handleDataRequest(response, {
|
|
1269
1241
|
context: loadContext,
|
|
1270
1242
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1271
1243
|
request
|
|
1272
1244
|
});
|
|
1273
|
-
if (
|
|
1245
|
+
if (_chunkEAIF67OWjs.isRedirectResponse.call(void 0, response)) {
|
|
1274
1246
|
response = generateSingleFetchRedirectResponse(
|
|
1275
1247
|
response,
|
|
1276
1248
|
request,
|
|
1277
|
-
|
|
1249
|
+
build,
|
|
1278
1250
|
serverMode
|
|
1279
1251
|
);
|
|
1280
1252
|
}
|
|
@@ -1282,7 +1254,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1282
1254
|
} else if (!isSpaMode && matches && matches[matches.length - 1].route.module.default == null && matches[matches.length - 1].route.module.ErrorBoundary == null) {
|
|
1283
1255
|
response = await handleResourceRequest(
|
|
1284
1256
|
serverMode,
|
|
1285
|
-
|
|
1257
|
+
build,
|
|
1286
1258
|
staticHandler,
|
|
1287
1259
|
matches.slice(-1)[0].route.id,
|
|
1288
1260
|
request,
|
|
@@ -1292,14 +1264,14 @@ var createRequestHandler = (build, mode) => {
|
|
|
1292
1264
|
} else {
|
|
1293
1265
|
let { pathname } = url;
|
|
1294
1266
|
let criticalCss = void 0;
|
|
1295
|
-
if (
|
|
1296
|
-
criticalCss = await
|
|
1267
|
+
if (build.unstable_getCriticalCss) {
|
|
1268
|
+
criticalCss = await build.unstable_getCriticalCss({ pathname });
|
|
1297
1269
|
} else if (mode === "development" /* Development */ && _optionalChain([getDevServerHooks, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getCriticalCss])) {
|
|
1298
1270
|
criticalCss = await _optionalChain([getDevServerHooks, 'call', _12 => _12(), 'optionalAccess', _13 => _13.getCriticalCss, 'optionalCall', _14 => _14(pathname)]);
|
|
1299
1271
|
}
|
|
1300
1272
|
response = await handleDocumentRequest(
|
|
1301
1273
|
serverMode,
|
|
1302
|
-
|
|
1274
|
+
build,
|
|
1303
1275
|
staticHandler,
|
|
1304
1276
|
request,
|
|
1305
1277
|
loadContext,
|
|
@@ -1317,6 +1289,47 @@ var createRequestHandler = (build, mode) => {
|
|
|
1317
1289
|
}
|
|
1318
1290
|
return response;
|
|
1319
1291
|
};
|
|
1292
|
+
if (build.entry.module.unstable_instrumentations) {
|
|
1293
|
+
requestHandler = _chunkEAIF67OWjs.instrumentHandler.call(void 0,
|
|
1294
|
+
requestHandler,
|
|
1295
|
+
build.entry.module.unstable_instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1296
|
+
);
|
|
1297
|
+
}
|
|
1298
|
+
return {
|
|
1299
|
+
routes,
|
|
1300
|
+
dataRoutes,
|
|
1301
|
+
serverMode,
|
|
1302
|
+
staticHandler,
|
|
1303
|
+
errorHandler,
|
|
1304
|
+
requestHandler
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
var createRequestHandler = (build, mode) => {
|
|
1308
|
+
let _build;
|
|
1309
|
+
let routes;
|
|
1310
|
+
let serverMode;
|
|
1311
|
+
let staticHandler;
|
|
1312
|
+
let errorHandler;
|
|
1313
|
+
let _requestHandler;
|
|
1314
|
+
return async function requestHandler(request, initialContext) {
|
|
1315
|
+
_build = typeof build === "function" ? await build() : build;
|
|
1316
|
+
if (typeof build === "function") {
|
|
1317
|
+
let derived = derive(_build, mode);
|
|
1318
|
+
routes = derived.routes;
|
|
1319
|
+
serverMode = derived.serverMode;
|
|
1320
|
+
staticHandler = derived.staticHandler;
|
|
1321
|
+
errorHandler = derived.errorHandler;
|
|
1322
|
+
_requestHandler = derived.requestHandler;
|
|
1323
|
+
} else if (!routes || !serverMode || !staticHandler || !errorHandler || !_requestHandler) {
|
|
1324
|
+
let derived = derive(_build, mode);
|
|
1325
|
+
routes = derived.routes;
|
|
1326
|
+
serverMode = derived.serverMode;
|
|
1327
|
+
staticHandler = derived.staticHandler;
|
|
1328
|
+
errorHandler = derived.errorHandler;
|
|
1329
|
+
_requestHandler = derived.requestHandler;
|
|
1330
|
+
}
|
|
1331
|
+
return _requestHandler(request, initialContext);
|
|
1332
|
+
};
|
|
1320
1333
|
};
|
|
1321
1334
|
async function handleManifestRequest(build, routes, url) {
|
|
1322
1335
|
if (build.assets.version !== url.searchParams.get("version")) {
|
|
@@ -1389,7 +1402,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1389
1402
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1390
1403
|
try {
|
|
1391
1404
|
let innerResult = await query(request);
|
|
1392
|
-
if (!
|
|
1405
|
+
if (!_chunkEAIF67OWjs.isResponse.call(void 0, innerResult)) {
|
|
1393
1406
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1394
1407
|
}
|
|
1395
1408
|
return innerResult;
|
|
@@ -1399,7 +1412,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1399
1412
|
}
|
|
1400
1413
|
} : void 0
|
|
1401
1414
|
});
|
|
1402
|
-
if (!
|
|
1415
|
+
if (!_chunkEAIF67OWjs.isResponse.call(void 0, result)) {
|
|
1403
1416
|
result = await renderHtml(result, isSpaMode);
|
|
1404
1417
|
}
|
|
1405
1418
|
return result;
|
|
@@ -1414,7 +1427,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1414
1427
|
}
|
|
1415
1428
|
if (context.errors) {
|
|
1416
1429
|
Object.values(context.errors).forEach((err) => {
|
|
1417
|
-
if (!
|
|
1430
|
+
if (!_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1418
1431
|
handleError(err);
|
|
1419
1432
|
}
|
|
1420
1433
|
});
|
|
@@ -1466,10 +1479,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1466
1479
|
} catch (error) {
|
|
1467
1480
|
handleError(error);
|
|
1468
1481
|
let errorForSecondRender = error;
|
|
1469
|
-
if (
|
|
1482
|
+
if (_chunkEAIF67OWjs.isResponse.call(void 0, error)) {
|
|
1470
1483
|
try {
|
|
1471
1484
|
let data2 = await unwrapResponse(error);
|
|
1472
|
-
errorForSecondRender = new (0,
|
|
1485
|
+
errorForSecondRender = new (0, _chunkEAIF67OWjs.ErrorResponseImpl)(
|
|
1473
1486
|
error.status,
|
|
1474
1487
|
error.statusText,
|
|
1475
1488
|
data2
|
|
@@ -1477,7 +1490,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1477
1490
|
} catch (e) {
|
|
1478
1491
|
}
|
|
1479
1492
|
}
|
|
1480
|
-
context =
|
|
1493
|
+
context = _chunkEAIF67OWjs.getStaticContextFromError.call(void 0,
|
|
1481
1494
|
staticHandler.dataRoutes,
|
|
1482
1495
|
context,
|
|
1483
1496
|
errorForSecondRender
|
|
@@ -1536,7 +1549,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1536
1549
|
return handleQueryRouteError(error);
|
|
1537
1550
|
}
|
|
1538
1551
|
function handleQueryRouteResult(result) {
|
|
1539
|
-
if (
|
|
1552
|
+
if (_chunkEAIF67OWjs.isResponse.call(void 0, result)) {
|
|
1540
1553
|
return result;
|
|
1541
1554
|
}
|
|
1542
1555
|
if (typeof result === "string") {
|
|
@@ -1545,10 +1558,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1545
1558
|
return Response.json(result);
|
|
1546
1559
|
}
|
|
1547
1560
|
function handleQueryRouteError(error) {
|
|
1548
|
-
if (
|
|
1561
|
+
if (_chunkEAIF67OWjs.isResponse.call(void 0, error)) {
|
|
1549
1562
|
return error;
|
|
1550
1563
|
}
|
|
1551
|
-
if (
|
|
1564
|
+
if (_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1552
1565
|
handleError(error);
|
|
1553
1566
|
return errorResponseToJson(error, serverMode);
|
|
1554
1567
|
}
|
|
@@ -1671,7 +1684,7 @@ function createSessionStorage({
|
|
|
1671
1684
|
};
|
|
1672
1685
|
}
|
|
1673
1686
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1674
|
-
|
|
1687
|
+
_chunkEAIF67OWjs.warnOnce.call(void 0,
|
|
1675
1688
|
cookie.isSigned,
|
|
1676
1689
|
`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.`
|
|
1677
1690
|
);
|
|
@@ -1761,797 +1774,6 @@ function href(path, ...args) {
|
|
|
1761
1774
|
return result || "/";
|
|
1762
1775
|
}
|
|
1763
1776
|
|
|
1764
|
-
// lib/rsc/browser.tsx
|
|
1765
|
-
|
|
1766
|
-
var _reactdom = require('react-dom'); var ReactDOM = _interopRequireWildcard(_reactdom);
|
|
1767
|
-
|
|
1768
|
-
// lib/dom/ssr/hydration.tsx
|
|
1769
|
-
function getHydrationData({
|
|
1770
|
-
state,
|
|
1771
|
-
routes,
|
|
1772
|
-
getRouteInfo,
|
|
1773
|
-
location: location2,
|
|
1774
|
-
basename,
|
|
1775
|
-
isSpaMode
|
|
1776
|
-
}) {
|
|
1777
|
-
let hydrationData = {
|
|
1778
|
-
...state,
|
|
1779
|
-
loaderData: { ...state.loaderData }
|
|
1780
|
-
};
|
|
1781
|
-
let initialMatches = _chunk4E5LHRQPjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1782
|
-
if (initialMatches) {
|
|
1783
|
-
for (let match of initialMatches) {
|
|
1784
|
-
let routeId = match.route.id;
|
|
1785
|
-
let routeInfo = getRouteInfo(routeId);
|
|
1786
|
-
if (_chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
1787
|
-
routeId,
|
|
1788
|
-
routeInfo.clientLoader,
|
|
1789
|
-
routeInfo.hasLoader,
|
|
1790
|
-
isSpaMode
|
|
1791
|
-
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
|
|
1792
|
-
delete hydrationData.loaderData[routeId];
|
|
1793
|
-
} else if (!routeInfo.hasLoader) {
|
|
1794
|
-
hydrationData.loaderData[routeId] = null;
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
return hydrationData;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// lib/rsc/errorBoundaries.tsx
|
|
1802
|
-
|
|
1803
|
-
var RSCRouterGlobalErrorBoundary = class extends React.default.Component {
|
|
1804
|
-
constructor(props) {
|
|
1805
|
-
super(props);
|
|
1806
|
-
this.state = { error: null, location: props.location };
|
|
1807
|
-
}
|
|
1808
|
-
static getDerivedStateFromError(error) {
|
|
1809
|
-
return { error };
|
|
1810
|
-
}
|
|
1811
|
-
static getDerivedStateFromProps(props, state) {
|
|
1812
|
-
if (state.location !== props.location) {
|
|
1813
|
-
return { error: null, location: props.location };
|
|
1814
|
-
}
|
|
1815
|
-
return { error: state.error, location: state.location };
|
|
1816
|
-
}
|
|
1817
|
-
render() {
|
|
1818
|
-
if (this.state.error) {
|
|
1819
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1820
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1821
|
-
{
|
|
1822
|
-
error: this.state.error,
|
|
1823
|
-
renderAppShell: true
|
|
1824
|
-
}
|
|
1825
|
-
);
|
|
1826
|
-
} else {
|
|
1827
|
-
return this.props.children;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
function ErrorWrapper({
|
|
1832
|
-
renderAppShell,
|
|
1833
|
-
title,
|
|
1834
|
-
children
|
|
1835
|
-
}) {
|
|
1836
|
-
if (!renderAppShell) {
|
|
1837
|
-
return children;
|
|
1838
|
-
}
|
|
1839
|
-
return /* @__PURE__ */ React.default.createElement("html", { lang: "en" }, /* @__PURE__ */ React.default.createElement("head", null, /* @__PURE__ */ React.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ React.default.createElement(
|
|
1840
|
-
"meta",
|
|
1841
|
-
{
|
|
1842
|
-
name: "viewport",
|
|
1843
|
-
content: "width=device-width,initial-scale=1,viewport-fit=cover"
|
|
1844
|
-
}
|
|
1845
|
-
), /* @__PURE__ */ React.default.createElement("title", null, title)), /* @__PURE__ */ React.default.createElement("body", null, /* @__PURE__ */ React.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
|
|
1846
|
-
}
|
|
1847
|
-
function RSCDefaultRootErrorBoundaryImpl({
|
|
1848
|
-
error,
|
|
1849
|
-
renderAppShell
|
|
1850
|
-
}) {
|
|
1851
|
-
console.error(error);
|
|
1852
|
-
let heyDeveloper = /* @__PURE__ */ React.default.createElement(
|
|
1853
|
-
"script",
|
|
1854
|
-
{
|
|
1855
|
-
dangerouslySetInnerHTML: {
|
|
1856
|
-
__html: `
|
|
1857
|
-
console.log(
|
|
1858
|
-
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
1859
|
-
);
|
|
1860
|
-
`
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
);
|
|
1864
|
-
if (_chunk4E5LHRQPjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1865
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1866
|
-
ErrorWrapper,
|
|
1867
|
-
{
|
|
1868
|
-
renderAppShell,
|
|
1869
|
-
title: "Unhandled Thrown Response!"
|
|
1870
|
-
},
|
|
1871
|
-
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1872
|
-
_chunk4E5LHRQPjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1873
|
-
);
|
|
1874
|
-
}
|
|
1875
|
-
let errorInstance;
|
|
1876
|
-
if (error instanceof Error) {
|
|
1877
|
-
errorInstance = error;
|
|
1878
|
-
} else {
|
|
1879
|
-
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
|
|
1880
|
-
errorInstance = new Error(errorString);
|
|
1881
|
-
}
|
|
1882
|
-
return /* @__PURE__ */ React.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ React.default.createElement(
|
|
1883
|
-
"pre",
|
|
1884
|
-
{
|
|
1885
|
-
style: {
|
|
1886
|
-
padding: "2rem",
|
|
1887
|
-
background: "hsla(10, 50%, 50%, 0.1)",
|
|
1888
|
-
color: "red",
|
|
1889
|
-
overflow: "auto"
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
errorInstance.stack
|
|
1893
|
-
), heyDeveloper);
|
|
1894
|
-
}
|
|
1895
|
-
function RSCDefaultRootErrorBoundary({
|
|
1896
|
-
hasRootLayout
|
|
1897
|
-
}) {
|
|
1898
|
-
let error = _chunk4E5LHRQPjs.useRouteError.call(void 0, );
|
|
1899
|
-
if (hasRootLayout === void 0) {
|
|
1900
|
-
throw new Error("Missing 'hasRootLayout' prop");
|
|
1901
|
-
}
|
|
1902
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1903
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1904
|
-
{
|
|
1905
|
-
renderAppShell: !hasRootLayout,
|
|
1906
|
-
error
|
|
1907
|
-
}
|
|
1908
|
-
);
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
// lib/rsc/route-modules.ts
|
|
1912
|
-
function createRSCRouteModules(payload) {
|
|
1913
|
-
const routeModules = {};
|
|
1914
|
-
for (const match of payload.matches) {
|
|
1915
|
-
populateRSCRouteModules(routeModules, match);
|
|
1916
|
-
}
|
|
1917
|
-
return routeModules;
|
|
1918
|
-
}
|
|
1919
|
-
function populateRSCRouteModules(routeModules, matches) {
|
|
1920
|
-
matches = Array.isArray(matches) ? matches : [matches];
|
|
1921
|
-
for (const match of matches) {
|
|
1922
|
-
routeModules[match.id] = {
|
|
1923
|
-
links: match.links,
|
|
1924
|
-
meta: match.meta,
|
|
1925
|
-
default: noopComponent
|
|
1926
|
-
};
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
var noopComponent = () => null;
|
|
1930
|
-
|
|
1931
|
-
// lib/rsc/browser.tsx
|
|
1932
|
-
function createCallServer({
|
|
1933
|
-
createFromReadableStream,
|
|
1934
|
-
createTemporaryReferenceSet,
|
|
1935
|
-
encodeReply,
|
|
1936
|
-
fetch: fetchImplementation = fetch
|
|
1937
|
-
}) {
|
|
1938
|
-
const globalVar = window;
|
|
1939
|
-
let landedActionId = 0;
|
|
1940
|
-
return async (id, args) => {
|
|
1941
|
-
let actionId = globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
1942
|
-
const temporaryReferences = createTemporaryReferenceSet();
|
|
1943
|
-
const payloadPromise = fetchImplementation(
|
|
1944
|
-
new Request(location.href, {
|
|
1945
|
-
body: await encodeReply(args, { temporaryReferences }),
|
|
1946
|
-
method: "POST",
|
|
1947
|
-
headers: {
|
|
1948
|
-
Accept: "text/x-component",
|
|
1949
|
-
"rsc-action-id": id
|
|
1950
|
-
}
|
|
1951
|
-
})
|
|
1952
|
-
).then((response) => {
|
|
1953
|
-
if (!response.body) {
|
|
1954
|
-
throw new Error("No response body");
|
|
1955
|
-
}
|
|
1956
|
-
return createFromReadableStream(response.body, {
|
|
1957
|
-
temporaryReferences
|
|
1958
|
-
});
|
|
1959
|
-
});
|
|
1960
|
-
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
|
1961
|
-
Promise.resolve(payloadPromise).then(async (payload) => {
|
|
1962
|
-
if (payload.type === "redirect") {
|
|
1963
|
-
if (payload.reload || isExternalLocation(payload.location)) {
|
|
1964
|
-
window.location.href = payload.location;
|
|
1965
|
-
return () => {
|
|
1966
|
-
};
|
|
1967
|
-
}
|
|
1968
|
-
return () => {
|
|
1969
|
-
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
|
1970
|
-
replace: payload.replace
|
|
1971
|
-
});
|
|
1972
|
-
};
|
|
1973
|
-
}
|
|
1974
|
-
if (payload.type !== "action") {
|
|
1975
|
-
throw new Error("Unexpected payload type");
|
|
1976
|
-
}
|
|
1977
|
-
const rerender = await payload.rerender;
|
|
1978
|
-
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
|
1979
|
-
if (rerender.type === "redirect") {
|
|
1980
|
-
if (rerender.reload || isExternalLocation(rerender.location)) {
|
|
1981
|
-
window.location.href = rerender.location;
|
|
1982
|
-
return;
|
|
1983
|
-
}
|
|
1984
|
-
return () => {
|
|
1985
|
-
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
|
1986
|
-
replace: rerender.replace
|
|
1987
|
-
});
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
return () => {
|
|
1991
|
-
let lastMatch;
|
|
1992
|
-
for (const match of rerender.matches) {
|
|
1993
|
-
globalVar.__reactRouterDataRouter.patchRoutes(
|
|
1994
|
-
_nullishCoalesce(_optionalChain([lastMatch, 'optionalAccess', _19 => _19.id]), () => ( null)),
|
|
1995
|
-
[createRouteFromServerManifest(match)],
|
|
1996
|
-
true
|
|
1997
|
-
);
|
|
1998
|
-
lastMatch = match;
|
|
1999
|
-
}
|
|
2000
|
-
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
2001
|
-
{
|
|
2002
|
-
loaderData: Object.assign(
|
|
2003
|
-
{},
|
|
2004
|
-
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
2005
|
-
rerender.loaderData
|
|
2006
|
-
),
|
|
2007
|
-
errors: rerender.errors ? Object.assign(
|
|
2008
|
-
{},
|
|
2009
|
-
globalVar.__reactRouterDataRouter.state.errors,
|
|
2010
|
-
rerender.errors
|
|
2011
|
-
) : null
|
|
2012
|
-
}
|
|
2013
|
-
);
|
|
2014
|
-
};
|
|
2015
|
-
}
|
|
2016
|
-
return () => {
|
|
2017
|
-
};
|
|
2018
|
-
}).catch(() => {
|
|
2019
|
-
})
|
|
2020
|
-
);
|
|
2021
|
-
return payloadPromise.then((payload) => {
|
|
2022
|
-
if (payload.type !== "action" && payload.type !== "redirect") {
|
|
2023
|
-
throw new Error("Unexpected payload type");
|
|
2024
|
-
}
|
|
2025
|
-
return payload.actionResult;
|
|
2026
|
-
});
|
|
2027
|
-
};
|
|
2028
|
-
}
|
|
2029
|
-
function createRouterFromPayload({
|
|
2030
|
-
fetchImplementation,
|
|
2031
|
-
createFromReadableStream,
|
|
2032
|
-
getContext,
|
|
2033
|
-
payload
|
|
2034
|
-
}) {
|
|
2035
|
-
const globalVar = window;
|
|
2036
|
-
if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)
|
|
2037
|
-
return {
|
|
2038
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2039
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2040
|
-
};
|
|
2041
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2042
|
-
globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
|
|
2043
|
-
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2044
|
-
let patches = /* @__PURE__ */ new Map();
|
|
2045
|
-
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2046
|
-
_chunk4E5LHRQPjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2047
|
-
if (!patches.has(patch.parentId)) {
|
|
2048
|
-
patches.set(patch.parentId, []);
|
|
2049
|
-
}
|
|
2050
|
-
_optionalChain([patches, 'access', _23 => _23.get, 'call', _24 => _24(patch.parentId), 'optionalAccess', _25 => _25.push, 'call', _26 => _26(patch)]);
|
|
2051
|
-
})]);
|
|
2052
|
-
let routes = payload.matches.reduceRight((previous, match) => {
|
|
2053
|
-
const route = createRouteFromServerManifest(
|
|
2054
|
-
match,
|
|
2055
|
-
payload
|
|
2056
|
-
);
|
|
2057
|
-
if (previous.length > 0) {
|
|
2058
|
-
route.children = previous;
|
|
2059
|
-
let childrenToPatch = patches.get(match.id);
|
|
2060
|
-
if (childrenToPatch) {
|
|
2061
|
-
route.children.push(
|
|
2062
|
-
...childrenToPatch.map((r) => createRouteFromServerManifest(r))
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
return [route];
|
|
2067
|
-
}, []);
|
|
2068
|
-
globalVar.__reactRouterDataRouter = _chunk4E5LHRQPjs.createRouter.call(void 0, {
|
|
2069
|
-
routes,
|
|
2070
|
-
getContext,
|
|
2071
|
-
basename: payload.basename,
|
|
2072
|
-
history: _chunk4E5LHRQPjs.createBrowserHistory.call(void 0, ),
|
|
2073
|
-
hydrationData: getHydrationData({
|
|
2074
|
-
state: {
|
|
2075
|
-
loaderData: payload.loaderData,
|
|
2076
|
-
actionData: payload.actionData,
|
|
2077
|
-
errors: payload.errors
|
|
2078
|
-
},
|
|
2079
|
-
routes,
|
|
2080
|
-
getRouteInfo: (routeId) => {
|
|
2081
|
-
let match = payload.matches.find((m) => m.id === routeId);
|
|
2082
|
-
_chunk4E5LHRQPjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2083
|
-
return {
|
|
2084
|
-
clientLoader: match.clientLoader,
|
|
2085
|
-
hasLoader: match.hasLoader,
|
|
2086
|
-
hasHydrateFallback: match.hydrateFallbackElement != null
|
|
2087
|
-
};
|
|
2088
|
-
},
|
|
2089
|
-
location: payload.location,
|
|
2090
|
-
basename: payload.basename,
|
|
2091
|
-
isSpaMode: false
|
|
2092
|
-
}),
|
|
2093
|
-
async patchRoutesOnNavigation({ path, signal }) {
|
|
2094
|
-
if (discoveredPaths.has(path)) {
|
|
2095
|
-
return;
|
|
2096
|
-
}
|
|
2097
|
-
await fetchAndApplyManifestPatches(
|
|
2098
|
-
[path],
|
|
2099
|
-
createFromReadableStream,
|
|
2100
|
-
fetchImplementation,
|
|
2101
|
-
signal
|
|
2102
|
-
);
|
|
2103
|
-
},
|
|
2104
|
-
// FIXME: Pass `build.ssr` into this function
|
|
2105
|
-
dataStrategy: getRSCSingleFetchDataStrategy(
|
|
2106
|
-
() => globalVar.__reactRouterDataRouter,
|
|
2107
|
-
true,
|
|
2108
|
-
payload.basename,
|
|
2109
|
-
createFromReadableStream,
|
|
2110
|
-
fetchImplementation
|
|
2111
|
-
)
|
|
2112
|
-
});
|
|
2113
|
-
if (globalVar.__reactRouterDataRouter.state.initialized) {
|
|
2114
|
-
globalVar.__routerInitialized = true;
|
|
2115
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2116
|
-
} else {
|
|
2117
|
-
globalVar.__routerInitialized = false;
|
|
2118
|
-
}
|
|
2119
|
-
let lastLoaderData = void 0;
|
|
2120
|
-
globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {
|
|
2121
|
-
if (lastLoaderData !== loaderData) {
|
|
2122
|
-
globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
2123
|
-
}
|
|
2124
|
-
});
|
|
2125
|
-
globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {
|
|
2126
|
-
const oldRoutes = window.__reactRouterDataRouter.routes;
|
|
2127
|
-
const newRoutes = [];
|
|
2128
|
-
function walkRoutes(routes2, parentId) {
|
|
2129
|
-
return routes2.map((route) => {
|
|
2130
|
-
const routeUpdate = routeUpdateByRouteId.get(route.id);
|
|
2131
|
-
if (routeUpdate) {
|
|
2132
|
-
const {
|
|
2133
|
-
routeModule,
|
|
2134
|
-
hasAction,
|
|
2135
|
-
hasComponent,
|
|
2136
|
-
hasErrorBoundary,
|
|
2137
|
-
hasLoader
|
|
2138
|
-
} = routeUpdate;
|
|
2139
|
-
const newRoute = createRouteFromServerManifest({
|
|
2140
|
-
clientAction: routeModule.clientAction,
|
|
2141
|
-
clientLoader: routeModule.clientLoader,
|
|
2142
|
-
element: route.element,
|
|
2143
|
-
errorElement: route.errorElement,
|
|
2144
|
-
handle: route.handle,
|
|
2145
|
-
hasAction,
|
|
2146
|
-
hasComponent,
|
|
2147
|
-
hasErrorBoundary,
|
|
2148
|
-
hasLoader,
|
|
2149
|
-
hydrateFallbackElement: route.hydrateFallbackElement,
|
|
2150
|
-
id: route.id,
|
|
2151
|
-
index: route.index,
|
|
2152
|
-
links: routeModule.links,
|
|
2153
|
-
meta: routeModule.meta,
|
|
2154
|
-
parentId,
|
|
2155
|
-
path: route.path,
|
|
2156
|
-
shouldRevalidate: routeModule.shouldRevalidate
|
|
2157
|
-
});
|
|
2158
|
-
if (route.children) {
|
|
2159
|
-
newRoute.children = walkRoutes(route.children, route.id);
|
|
2160
|
-
}
|
|
2161
|
-
return newRoute;
|
|
2162
|
-
}
|
|
2163
|
-
const updatedRoute = { ...route };
|
|
2164
|
-
if (route.children) {
|
|
2165
|
-
updatedRoute.children = walkRoutes(route.children, route.id);
|
|
2166
|
-
}
|
|
2167
|
-
return updatedRoute;
|
|
2168
|
-
});
|
|
2169
|
-
}
|
|
2170
|
-
newRoutes.push(
|
|
2171
|
-
...walkRoutes(oldRoutes, void 0)
|
|
2172
|
-
);
|
|
2173
|
-
window.__reactRouterDataRouter._internalSetRoutes(newRoutes);
|
|
2174
|
-
};
|
|
2175
|
-
return {
|
|
2176
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2177
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2178
|
-
};
|
|
2179
|
-
}
|
|
2180
|
-
var renderedRoutesContext = _chunk4E5LHRQPjs.createContext.call(void 0, );
|
|
2181
|
-
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2182
|
-
let dataStrategy = _chunk4E5LHRQPjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2183
|
-
getRouter,
|
|
2184
|
-
(match) => {
|
|
2185
|
-
let M = match;
|
|
2186
|
-
return {
|
|
2187
|
-
hasLoader: M.route.hasLoader,
|
|
2188
|
-
hasClientLoader: M.route.hasClientLoader,
|
|
2189
|
-
hasComponent: M.route.hasComponent,
|
|
2190
|
-
hasAction: M.route.hasAction,
|
|
2191
|
-
hasClientAction: M.route.hasClientAction,
|
|
2192
|
-
hasShouldRevalidate: M.route.hasShouldRevalidate
|
|
2193
|
-
};
|
|
2194
|
-
},
|
|
2195
|
-
// pass map into fetchAndDecode so it can add payloads
|
|
2196
|
-
getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),
|
|
2197
|
-
ssr,
|
|
2198
|
-
basename,
|
|
2199
|
-
// If the route has a component but we don't have an element, we need to hit
|
|
2200
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2201
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2202
|
-
(match) => {
|
|
2203
|
-
let M = match;
|
|
2204
|
-
return M.route.hasComponent && !M.route.element;
|
|
2205
|
-
}
|
|
2206
|
-
);
|
|
2207
|
-
return async (args) => args.runClientMiddleware(async () => {
|
|
2208
|
-
let context = args.context;
|
|
2209
|
-
context.set(renderedRoutesContext, []);
|
|
2210
|
-
let results = await dataStrategy(args);
|
|
2211
|
-
const renderedRoutesById = /* @__PURE__ */ new Map();
|
|
2212
|
-
for (const route of context.get(renderedRoutesContext)) {
|
|
2213
|
-
if (!renderedRoutesById.has(route.id)) {
|
|
2214
|
-
renderedRoutesById.set(route.id, []);
|
|
2215
|
-
}
|
|
2216
|
-
renderedRoutesById.get(route.id).push(route);
|
|
2217
|
-
}
|
|
2218
|
-
for (const match of args.matches) {
|
|
2219
|
-
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
|
2220
|
-
if (renderedRoutes) {
|
|
2221
|
-
for (const rendered of renderedRoutes) {
|
|
2222
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2223
|
-
_nullishCoalesce(rendered.parentId, () => ( null)),
|
|
2224
|
-
[createRouteFromServerManifest(rendered)],
|
|
2225
|
-
true
|
|
2226
|
-
);
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
return results;
|
|
2231
|
-
});
|
|
2232
|
-
}
|
|
2233
|
-
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2234
|
-
return async (args, basename, targetRoutes) => {
|
|
2235
|
-
let { request, context } = args;
|
|
2236
|
-
let url = _chunk4E5LHRQPjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2237
|
-
if (request.method === "GET") {
|
|
2238
|
-
url = _chunk4E5LHRQPjs.stripIndexParam.call(void 0, url);
|
|
2239
|
-
if (targetRoutes) {
|
|
2240
|
-
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
let res = await fetchImplementation(
|
|
2244
|
-
new Request(url, await _chunk4E5LHRQPjs.createRequestInit.call(void 0, request))
|
|
2245
|
-
);
|
|
2246
|
-
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2247
|
-
throw new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2248
|
-
}
|
|
2249
|
-
_chunk4E5LHRQPjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2250
|
-
try {
|
|
2251
|
-
const payload = await createFromReadableStream(res.body, {
|
|
2252
|
-
temporaryReferences: void 0
|
|
2253
|
-
});
|
|
2254
|
-
if (payload.type === "redirect") {
|
|
2255
|
-
return {
|
|
2256
|
-
status: res.status,
|
|
2257
|
-
data: {
|
|
2258
|
-
redirect: {
|
|
2259
|
-
redirect: payload.location,
|
|
2260
|
-
reload: payload.reload,
|
|
2261
|
-
replace: payload.replace,
|
|
2262
|
-
revalidate: false,
|
|
2263
|
-
status: payload.status
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
};
|
|
2267
|
-
}
|
|
2268
|
-
if (payload.type !== "render") {
|
|
2269
|
-
throw new Error("Unexpected payload type");
|
|
2270
|
-
}
|
|
2271
|
-
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2272
|
-
let results = { routes: {} };
|
|
2273
|
-
const dataKey = _chunk4E5LHRQPjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2274
|
-
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2275
|
-
results.routes[routeId] = { data: data2 };
|
|
2276
|
-
}
|
|
2277
|
-
if (payload.errors) {
|
|
2278
|
-
for (let [routeId, error] of Object.entries(payload.errors)) {
|
|
2279
|
-
results.routes[routeId] = { error };
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
return { status: res.status, data: results };
|
|
2283
|
-
} catch (e) {
|
|
2284
|
-
throw new Error("Unable to decode RSC response");
|
|
2285
|
-
}
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
function RSCHydratedRouter({
|
|
2289
|
-
createFromReadableStream,
|
|
2290
|
-
fetch: fetchImplementation = fetch,
|
|
2291
|
-
payload,
|
|
2292
|
-
routeDiscovery = "eager",
|
|
2293
|
-
getContext
|
|
2294
|
-
}) {
|
|
2295
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2296
|
-
let { router, routeModules } = React4.useMemo(
|
|
2297
|
-
() => createRouterFromPayload({
|
|
2298
|
-
payload,
|
|
2299
|
-
fetchImplementation,
|
|
2300
|
-
getContext,
|
|
2301
|
-
createFromReadableStream
|
|
2302
|
-
}),
|
|
2303
|
-
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2304
|
-
);
|
|
2305
|
-
React4.useEffect(() => {
|
|
2306
|
-
_chunk4E5LHRQPjs.setIsHydrated.call(void 0, );
|
|
2307
|
-
}, []);
|
|
2308
|
-
React4.useLayoutEffect(() => {
|
|
2309
|
-
const globalVar = window;
|
|
2310
|
-
if (!globalVar.__routerInitialized) {
|
|
2311
|
-
globalVar.__routerInitialized = true;
|
|
2312
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2313
|
-
}
|
|
2314
|
-
}, []);
|
|
2315
|
-
let [location2, setLocation] = React4.useState(router.state.location);
|
|
2316
|
-
React4.useLayoutEffect(
|
|
2317
|
-
() => router.subscribe((newState) => {
|
|
2318
|
-
if (newState.location !== location2) {
|
|
2319
|
-
setLocation(newState.location);
|
|
2320
|
-
}
|
|
2321
|
-
}),
|
|
2322
|
-
[router, location2]
|
|
2323
|
-
);
|
|
2324
|
-
React4.useEffect(() => {
|
|
2325
|
-
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
|
2326
|
-
_optionalChain([window, 'access', _27 => _27.navigator, 'optionalAccess', _28 => _28.connection, 'optionalAccess', _29 => _29.saveData]) === true) {
|
|
2327
|
-
return;
|
|
2328
|
-
}
|
|
2329
|
-
function registerElement(el) {
|
|
2330
|
-
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
|
2331
|
-
if (!path) {
|
|
2332
|
-
return;
|
|
2333
|
-
}
|
|
2334
|
-
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
|
2335
|
-
if (!discoveredPaths.has(pathname)) {
|
|
2336
|
-
nextPaths.add(pathname);
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
async function fetchPatches() {
|
|
2340
|
-
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
|
2341
|
-
let paths = Array.from(nextPaths.keys()).filter((path) => {
|
|
2342
|
-
if (discoveredPaths.has(path)) {
|
|
2343
|
-
nextPaths.delete(path);
|
|
2344
|
-
return false;
|
|
2345
|
-
}
|
|
2346
|
-
return true;
|
|
2347
|
-
});
|
|
2348
|
-
if (paths.length === 0) {
|
|
2349
|
-
return;
|
|
2350
|
-
}
|
|
2351
|
-
try {
|
|
2352
|
-
await fetchAndApplyManifestPatches(
|
|
2353
|
-
paths,
|
|
2354
|
-
createFromReadableStream,
|
|
2355
|
-
fetchImplementation
|
|
2356
|
-
);
|
|
2357
|
-
} catch (e) {
|
|
2358
|
-
console.error("Failed to fetch manifest patches", e);
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
let debouncedFetchPatches = debounce(fetchPatches, 100);
|
|
2362
|
-
fetchPatches();
|
|
2363
|
-
let observer = new MutationObserver(() => debouncedFetchPatches());
|
|
2364
|
-
observer.observe(document.documentElement, {
|
|
2365
|
-
subtree: true,
|
|
2366
|
-
childList: true,
|
|
2367
|
-
attributes: true,
|
|
2368
|
-
attributeFilter: ["data-discover", "href", "action"]
|
|
2369
|
-
});
|
|
2370
|
-
}, [routeDiscovery, createFromReadableStream, fetchImplementation]);
|
|
2371
|
-
const frameworkContext = {
|
|
2372
|
-
future: {
|
|
2373
|
-
// These flags have no runtime impact so can always be false. If we add
|
|
2374
|
-
// flags that drive runtime behavior they'll need to be proxied through.
|
|
2375
|
-
v8_middleware: false,
|
|
2376
|
-
unstable_subResourceIntegrity: false
|
|
2377
|
-
},
|
|
2378
|
-
isSpaMode: false,
|
|
2379
|
-
ssr: true,
|
|
2380
|
-
criticalCss: "",
|
|
2381
|
-
manifest: {
|
|
2382
|
-
routes: {},
|
|
2383
|
-
version: "1",
|
|
2384
|
-
url: "",
|
|
2385
|
-
entry: {
|
|
2386
|
-
module: "",
|
|
2387
|
-
imports: []
|
|
2388
|
-
}
|
|
2389
|
-
},
|
|
2390
|
-
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2391
|
-
routeModules
|
|
2392
|
-
};
|
|
2393
|
-
return /* @__PURE__ */ React4.createElement(_chunk4E5LHRQPjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunk4E5LHRQPjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkWNLQ53P5js.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2394
|
-
}
|
|
2395
|
-
function createRouteFromServerManifest(match, payload) {
|
|
2396
|
-
let hasInitialData = payload && match.id in payload.loaderData;
|
|
2397
|
-
let initialData = _optionalChain([payload, 'optionalAccess', _30 => _30.loaderData, 'access', _31 => _31[match.id]]);
|
|
2398
|
-
let hasInitialError = _optionalChain([payload, 'optionalAccess', _32 => _32.errors]) && match.id in payload.errors;
|
|
2399
|
-
let initialError = _optionalChain([payload, 'optionalAccess', _33 => _33.errors, 'optionalAccess', _34 => _34[match.id]]);
|
|
2400
|
-
let isHydrationRequest = _optionalChain([match, 'access', _35 => _35.clientLoader, 'optionalAccess', _36 => _36.hydrate]) === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit
|
|
2401
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2402
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2403
|
-
match.hasComponent && !match.element;
|
|
2404
|
-
_chunk4E5LHRQPjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2405
|
-
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2406
|
-
let dataRoute = {
|
|
2407
|
-
id: match.id,
|
|
2408
|
-
element: match.element,
|
|
2409
|
-
errorElement: match.errorElement,
|
|
2410
|
-
handle: match.handle,
|
|
2411
|
-
hasErrorBoundary: match.hasErrorBoundary,
|
|
2412
|
-
hydrateFallbackElement: match.hydrateFallbackElement,
|
|
2413
|
-
index: match.index,
|
|
2414
|
-
loader: match.clientLoader ? async (args, singleFetch) => {
|
|
2415
|
-
try {
|
|
2416
|
-
let result = await match.clientLoader({
|
|
2417
|
-
...args,
|
|
2418
|
-
serverLoader: () => {
|
|
2419
|
-
preventInvalidServerHandlerCall(
|
|
2420
|
-
"loader",
|
|
2421
|
-
match.id,
|
|
2422
|
-
match.hasLoader
|
|
2423
|
-
);
|
|
2424
|
-
if (isHydrationRequest) {
|
|
2425
|
-
if (hasInitialData) {
|
|
2426
|
-
return initialData;
|
|
2427
|
-
}
|
|
2428
|
-
if (hasInitialError) {
|
|
2429
|
-
throw initialError;
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
return callSingleFetch(singleFetch);
|
|
2433
|
-
}
|
|
2434
|
-
});
|
|
2435
|
-
return result;
|
|
2436
|
-
} finally {
|
|
2437
|
-
isHydrationRequest = false;
|
|
2438
|
-
}
|
|
2439
|
-
} : (
|
|
2440
|
-
// We always make the call in this RSC world since even if we don't
|
|
2441
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2442
|
-
(_, singleFetch) => callSingleFetch(singleFetch)
|
|
2443
|
-
),
|
|
2444
|
-
action: match.clientAction ? (args, singleFetch) => match.clientAction({
|
|
2445
|
-
...args,
|
|
2446
|
-
serverAction: async () => {
|
|
2447
|
-
preventInvalidServerHandlerCall(
|
|
2448
|
-
"action",
|
|
2449
|
-
match.id,
|
|
2450
|
-
match.hasLoader
|
|
2451
|
-
);
|
|
2452
|
-
return await callSingleFetch(singleFetch);
|
|
2453
|
-
}
|
|
2454
|
-
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2455
|
-
throw _chunk4E5LHRQPjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2456
|
-
},
|
|
2457
|
-
path: match.path,
|
|
2458
|
-
shouldRevalidate: match.shouldRevalidate,
|
|
2459
|
-
// We always have a "loader" in this RSC world since even if we don't
|
|
2460
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2461
|
-
hasLoader: true,
|
|
2462
|
-
hasClientLoader: match.clientLoader != null,
|
|
2463
|
-
hasAction: match.hasAction,
|
|
2464
|
-
hasClientAction: match.clientAction != null,
|
|
2465
|
-
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2466
|
-
};
|
|
2467
|
-
if (typeof dataRoute.loader === "function") {
|
|
2468
|
-
dataRoute.loader.hydrate = _chunk4E5LHRQPjs.shouldHydrateRouteLoader.call(void 0,
|
|
2469
|
-
match.id,
|
|
2470
|
-
match.clientLoader,
|
|
2471
|
-
match.hasLoader,
|
|
2472
|
-
false
|
|
2473
|
-
);
|
|
2474
|
-
}
|
|
2475
|
-
return dataRoute;
|
|
2476
|
-
}
|
|
2477
|
-
function callSingleFetch(singleFetch) {
|
|
2478
|
-
_chunk4E5LHRQPjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2479
|
-
return singleFetch();
|
|
2480
|
-
}
|
|
2481
|
-
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
2482
|
-
if (!hasHandler) {
|
|
2483
|
-
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2484
|
-
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2485
|
-
console.error(msg);
|
|
2486
|
-
throw new (0, _chunk4E5LHRQPjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
var nextPaths = /* @__PURE__ */ new Set();
|
|
2490
|
-
var discoveredPathsMaxSize = 1e3;
|
|
2491
|
-
var discoveredPaths = /* @__PURE__ */ new Set();
|
|
2492
|
-
var URL_LIMIT = 7680;
|
|
2493
|
-
function getManifestUrl(paths) {
|
|
2494
|
-
if (paths.length === 0) {
|
|
2495
|
-
return null;
|
|
2496
|
-
}
|
|
2497
|
-
if (paths.length === 1) {
|
|
2498
|
-
return new URL(`${paths[0]}.manifest`, window.location.origin);
|
|
2499
|
-
}
|
|
2500
|
-
const globalVar = window;
|
|
2501
|
-
let basename = (_nullishCoalesce(globalVar.__reactRouterDataRouter.basename, () => ( ""))).replace(
|
|
2502
|
-
/^\/|\/$/g,
|
|
2503
|
-
""
|
|
2504
|
-
);
|
|
2505
|
-
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
2506
|
-
url.searchParams.set("paths", paths.sort().join(","));
|
|
2507
|
-
return url;
|
|
2508
|
-
}
|
|
2509
|
-
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
|
2510
|
-
let url = getManifestUrl(paths);
|
|
2511
|
-
if (url == null) {
|
|
2512
|
-
return;
|
|
2513
|
-
}
|
|
2514
|
-
if (url.toString().length > URL_LIMIT) {
|
|
2515
|
-
nextPaths.clear();
|
|
2516
|
-
return;
|
|
2517
|
-
}
|
|
2518
|
-
let response = await fetchImplementation(new Request(url, { signal }));
|
|
2519
|
-
if (!response.body || response.status < 200 || response.status >= 300) {
|
|
2520
|
-
throw new Error("Unable to fetch new route matches from the server");
|
|
2521
|
-
}
|
|
2522
|
-
let payload = await createFromReadableStream(response.body, {
|
|
2523
|
-
temporaryReferences: void 0
|
|
2524
|
-
});
|
|
2525
|
-
if (payload.type !== "manifest") {
|
|
2526
|
-
throw new Error("Failed to patch routes");
|
|
2527
|
-
}
|
|
2528
|
-
paths.forEach((p) => addToFifoQueue(p, discoveredPaths));
|
|
2529
|
-
payload.patches.forEach((p) => {
|
|
2530
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2531
|
-
_nullishCoalesce(p.parentId, () => ( null)),
|
|
2532
|
-
[createRouteFromServerManifest(p)]
|
|
2533
|
-
);
|
|
2534
|
-
});
|
|
2535
|
-
}
|
|
2536
|
-
function addToFifoQueue(path, queue) {
|
|
2537
|
-
if (queue.size >= discoveredPathsMaxSize) {
|
|
2538
|
-
let first = queue.values().next().value;
|
|
2539
|
-
queue.delete(first);
|
|
2540
|
-
}
|
|
2541
|
-
queue.add(path);
|
|
2542
|
-
}
|
|
2543
|
-
function debounce(callback, wait) {
|
|
2544
|
-
let timeoutId;
|
|
2545
|
-
return (...args) => {
|
|
2546
|
-
window.clearTimeout(timeoutId);
|
|
2547
|
-
timeoutId = window.setTimeout(() => callback(...args), wait);
|
|
2548
|
-
};
|
|
2549
|
-
}
|
|
2550
|
-
function isExternalLocation(location2) {
|
|
2551
|
-
const newLocation = new URL(location2, window.location.href);
|
|
2552
|
-
return newLocation.origin !== window.location.origin;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
1777
|
// lib/rsc/server.ssr.tsx
|
|
2556
1778
|
|
|
2557
1779
|
|
|
@@ -2645,7 +1867,7 @@ function escapeScript(script) {
|
|
|
2645
1867
|
|
|
2646
1868
|
// lib/rsc/server.ssr.tsx
|
|
2647
1869
|
var REACT_USE = "use";
|
|
2648
|
-
var useImpl =
|
|
1870
|
+
var useImpl = React3[REACT_USE];
|
|
2649
1871
|
function useSafe(promise) {
|
|
2650
1872
|
if (useImpl) {
|
|
2651
1873
|
return useImpl(promise);
|
|
@@ -2731,14 +1953,14 @@ async function routeRSCServerRequest({
|
|
|
2731
1953
|
const payload = await createFromReadableStream(
|
|
2732
1954
|
detectRedirectResponse.body
|
|
2733
1955
|
);
|
|
2734
|
-
if (serverResponse.status ===
|
|
1956
|
+
if (serverResponse.status === _chunkEAIF67OWjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2735
1957
|
const headers2 = new Headers(serverResponse.headers);
|
|
2736
1958
|
headers2.delete("Content-Encoding");
|
|
2737
1959
|
headers2.delete("Content-Length");
|
|
2738
1960
|
headers2.delete("Content-Type");
|
|
2739
1961
|
headers2.delete("X-Remix-Response");
|
|
2740
1962
|
headers2.set("Location", payload.location);
|
|
2741
|
-
return new Response(_optionalChain([serverResponseB, 'optionalAccess',
|
|
1963
|
+
return new Response(_optionalChain([serverResponseB, 'optionalAccess', _19 => _19.body]) || "", {
|
|
2742
1964
|
headers: headers2,
|
|
2743
1965
|
status: payload.status,
|
|
2744
1966
|
statusText: serverResponse.statusText
|
|
@@ -2753,7 +1975,7 @@ async function routeRSCServerRequest({
|
|
|
2753
1975
|
headers
|
|
2754
1976
|
});
|
|
2755
1977
|
}
|
|
2756
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
1978
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _20 => _20.body])) {
|
|
2757
1979
|
throw new Error("Failed to clone server response");
|
|
2758
1980
|
}
|
|
2759
1981
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2766,7 +1988,7 @@ async function routeRSCServerRequest({
|
|
|
2766
1988
|
return reason;
|
|
2767
1989
|
}
|
|
2768
1990
|
try {
|
|
2769
|
-
const status =
|
|
1991
|
+
const status = _chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2770
1992
|
const html = await renderHTML(() => {
|
|
2771
1993
|
const decoded = Promise.resolve(
|
|
2772
1994
|
createFromReadableStream(createStream())
|
|
@@ -2805,7 +2027,7 @@ async function routeRSCServerRequest({
|
|
|
2805
2027
|
headers
|
|
2806
2028
|
});
|
|
2807
2029
|
}
|
|
2808
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
2030
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _21 => _21.body])) {
|
|
2809
2031
|
throw new Error("Failed to clone server response");
|
|
2810
2032
|
}
|
|
2811
2033
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2832,7 +2054,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2832
2054
|
if (payload.type !== "render") return null;
|
|
2833
2055
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2834
2056
|
for (const match of payload.matches) {
|
|
2835
|
-
if (
|
|
2057
|
+
if (_chunkEAIF67OWjs.shouldHydrateRouteLoader.call(void 0,
|
|
2836
2058
|
match.id,
|
|
2837
2059
|
match.clientLoader,
|
|
2838
2060
|
match.hasLoader,
|
|
@@ -2872,7 +2094,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2872
2094
|
}
|
|
2873
2095
|
}))
|
|
2874
2096
|
};
|
|
2875
|
-
const router =
|
|
2097
|
+
const router = _chunkQN64DHI4js.createStaticRouter.call(void 0,
|
|
2876
2098
|
payload.matches.reduceRight((previous, match) => {
|
|
2877
2099
|
const route = {
|
|
2878
2100
|
id: match.id,
|
|
@@ -2914,10 +2136,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2914
2136
|
}
|
|
2915
2137
|
},
|
|
2916
2138
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2917
|
-
routeModules: createRSCRouteModules(payload)
|
|
2139
|
+
routeModules: _chunkG5A35OQUjs.createRSCRouteModules.call(void 0, payload)
|
|
2918
2140
|
};
|
|
2919
|
-
return /* @__PURE__ */
|
|
2920
|
-
|
|
2141
|
+
return /* @__PURE__ */ React3.createElement(_chunkEAIF67OWjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkG5A35OQUjs.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunkEAIF67OWjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2142
|
+
_chunkQN64DHI4js.StaticRouterProvider,
|
|
2921
2143
|
{
|
|
2922
2144
|
context,
|
|
2923
2145
|
router,
|
|
@@ -2933,41 +2155,6 @@ function isManifestRequest(url) {
|
|
|
2933
2155
|
return url.pathname.endsWith(".manifest");
|
|
2934
2156
|
}
|
|
2935
2157
|
|
|
2936
|
-
// lib/rsc/html-stream/browser.ts
|
|
2937
|
-
function getRSCStream() {
|
|
2938
|
-
let encoder3 = new TextEncoder();
|
|
2939
|
-
let streamController = null;
|
|
2940
|
-
let rscStream = new ReadableStream({
|
|
2941
|
-
start(controller) {
|
|
2942
|
-
if (typeof window === "undefined") {
|
|
2943
|
-
return;
|
|
2944
|
-
}
|
|
2945
|
-
let handleChunk = (chunk) => {
|
|
2946
|
-
if (typeof chunk === "string") {
|
|
2947
|
-
controller.enqueue(encoder3.encode(chunk));
|
|
2948
|
-
} else {
|
|
2949
|
-
controller.enqueue(chunk);
|
|
2950
|
-
}
|
|
2951
|
-
};
|
|
2952
|
-
window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);
|
|
2953
|
-
window.__FLIGHT_DATA.forEach(handleChunk);
|
|
2954
|
-
window.__FLIGHT_DATA.push = (chunk) => {
|
|
2955
|
-
handleChunk(chunk);
|
|
2956
|
-
return 0;
|
|
2957
|
-
};
|
|
2958
|
-
streamController = controller;
|
|
2959
|
-
}
|
|
2960
|
-
});
|
|
2961
|
-
if (typeof document !== "undefined" && document.readyState === "loading") {
|
|
2962
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
2963
|
-
_optionalChain([streamController, 'optionalAccess', _40 => _40.close, 'call', _41 => _41()]);
|
|
2964
|
-
});
|
|
2965
|
-
} else {
|
|
2966
|
-
_optionalChain([streamController, 'optionalAccess', _42 => _42.close, 'call', _43 => _43()]);
|
|
2967
|
-
}
|
|
2968
|
-
return rscStream;
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
2158
|
// lib/dom/ssr/errors.ts
|
|
2972
2159
|
function deserializeErrors(errors) {
|
|
2973
2160
|
if (!errors) return null;
|
|
@@ -2975,7 +2162,7 @@ function deserializeErrors(errors) {
|
|
|
2975
2162
|
let serialized = {};
|
|
2976
2163
|
for (let [key, val] of entries) {
|
|
2977
2164
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2978
|
-
serialized[key] = new (0,
|
|
2165
|
+
serialized[key] = new (0, _chunkEAIF67OWjs.ErrorResponseImpl)(
|
|
2979
2166
|
val.status,
|
|
2980
2167
|
val.statusText,
|
|
2981
2168
|
val.data,
|
|
@@ -3132,7 +2319,4 @@ function deserializeErrors(errors) {
|
|
|
3132
2319
|
|
|
3133
2320
|
|
|
3134
2321
|
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
exports.Await = _chunkWNLQ53P5js.Await; exports.BrowserRouter = _chunkWNLQ53P5js.BrowserRouter; exports.Form = _chunkWNLQ53P5js.Form; exports.HashRouter = _chunkWNLQ53P5js.HashRouter; exports.IDLE_BLOCKER = _chunk4E5LHRQPjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk4E5LHRQPjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk4E5LHRQPjs.IDLE_NAVIGATION; exports.Link = _chunkWNLQ53P5js.Link; exports.Links = _chunk4E5LHRQPjs.Links; exports.MemoryRouter = _chunkWNLQ53P5js.MemoryRouter; exports.Meta = _chunk4E5LHRQPjs.Meta; exports.NavLink = _chunkWNLQ53P5js.NavLink; exports.Navigate = _chunkWNLQ53P5js.Navigate; exports.NavigationType = _chunk4E5LHRQPjs.Action; exports.Outlet = _chunkWNLQ53P5js.Outlet; exports.PrefetchPageLinks = _chunk4E5LHRQPjs.PrefetchPageLinks; exports.Route = _chunkWNLQ53P5js.Route; exports.Router = _chunkWNLQ53P5js.Router; exports.RouterContextProvider = _chunk4E5LHRQPjs.RouterContextProvider; exports.RouterProvider = _chunkWNLQ53P5js.RouterProvider; exports.Routes = _chunkWNLQ53P5js.Routes; exports.Scripts = _chunk4E5LHRQPjs.Scripts; exports.ScrollRestoration = _chunkWNLQ53P5js.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkWNLQ53P5js.StaticRouter; exports.StaticRouterProvider = _chunkWNLQ53P5js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk4E5LHRQPjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk4E5LHRQPjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk4E5LHRQPjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk4E5LHRQPjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk4E5LHRQPjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk4E5LHRQPjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunk4E5LHRQPjs.LocationContext; exports.UNSAFE_NavigationContext = _chunk4E5LHRQPjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk4E5LHRQPjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk4E5LHRQPjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk4E5LHRQPjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk4E5LHRQPjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkWNLQ53P5js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkWNLQ53P5js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkWNLQ53P5js.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk4E5LHRQPjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk4E5LHRQPjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk4E5LHRQPjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunk4E5LHRQPjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk4E5LHRQPjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk4E5LHRQPjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk4E5LHRQPjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkWNLQ53P5js.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk4E5LHRQPjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkWNLQ53P5js.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk4E5LHRQPjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk4E5LHRQPjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkWNLQ53P5js.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkWNLQ53P5js.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkWNLQ53P5js.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkWNLQ53P5js.withHydrateFallbackProps; exports.createBrowserRouter = _chunkWNLQ53P5js.createBrowserRouter; exports.createContext = _chunk4E5LHRQPjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkWNLQ53P5js.createHashRouter; exports.createMemoryRouter = _chunkWNLQ53P5js.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk4E5LHRQPjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkWNLQ53P5js.createRoutesFromChildren; exports.createRoutesFromElements = _chunkWNLQ53P5js.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkWNLQ53P5js.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkWNLQ53P5js.createStaticHandler; exports.createStaticRouter = _chunkWNLQ53P5js.createStaticRouter; exports.data = _chunk4E5LHRQPjs.data; exports.generatePath = _chunk4E5LHRQPjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk4E5LHRQPjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk4E5LHRQPjs.matchPath; exports.matchRoutes = _chunk4E5LHRQPjs.matchRoutes; exports.parsePath = _chunk4E5LHRQPjs.parsePath; exports.redirect = _chunk4E5LHRQPjs.redirect; exports.redirectDocument = _chunk4E5LHRQPjs.redirectDocument; exports.renderMatches = _chunkWNLQ53P5js.renderMatches; exports.replace = _chunk4E5LHRQPjs.replace; exports.resolvePath = _chunk4E5LHRQPjs.resolvePath; exports.unstable_HistoryRouter = _chunkWNLQ53P5js.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 = _chunkWNLQ53P5js.usePrompt; exports.unstable_useRoute = _chunk4E5LHRQPjs.useRoute; exports.useActionData = _chunk4E5LHRQPjs.useActionData; exports.useAsyncError = _chunk4E5LHRQPjs.useAsyncError; exports.useAsyncValue = _chunk4E5LHRQPjs.useAsyncValue; exports.useBeforeUnload = _chunkWNLQ53P5js.useBeforeUnload; exports.useBlocker = _chunk4E5LHRQPjs.useBlocker; exports.useFetcher = _chunkWNLQ53P5js.useFetcher; exports.useFetchers = _chunkWNLQ53P5js.useFetchers; exports.useFormAction = _chunkWNLQ53P5js.useFormAction; exports.useHref = _chunk4E5LHRQPjs.useHref; exports.useInRouterContext = _chunk4E5LHRQPjs.useInRouterContext; exports.useLinkClickHandler = _chunkWNLQ53P5js.useLinkClickHandler; exports.useLoaderData = _chunk4E5LHRQPjs.useLoaderData; exports.useLocation = _chunk4E5LHRQPjs.useLocation; exports.useMatch = _chunk4E5LHRQPjs.useMatch; exports.useMatches = _chunk4E5LHRQPjs.useMatches; exports.useNavigate = _chunk4E5LHRQPjs.useNavigate; exports.useNavigation = _chunk4E5LHRQPjs.useNavigation; exports.useNavigationType = _chunk4E5LHRQPjs.useNavigationType; exports.useOutlet = _chunk4E5LHRQPjs.useOutlet; exports.useOutletContext = _chunk4E5LHRQPjs.useOutletContext; exports.useParams = _chunk4E5LHRQPjs.useParams; exports.useResolvedPath = _chunk4E5LHRQPjs.useResolvedPath; exports.useRevalidator = _chunk4E5LHRQPjs.useRevalidator; exports.useRouteError = _chunk4E5LHRQPjs.useRouteError; exports.useRouteLoaderData = _chunk4E5LHRQPjs.useRouteLoaderData; exports.useRoutes = _chunk4E5LHRQPjs.useRoutes; exports.useSearchParams = _chunkWNLQ53P5js.useSearchParams; exports.useSubmit = _chunkWNLQ53P5js.useSubmit; exports.useViewTransitionState = _chunkWNLQ53P5js.useViewTransitionState;
|
|
2322
|
+
exports.Await = _chunkEAIF67OWjs.Await; exports.BrowserRouter = _chunkQN64DHI4js.BrowserRouter; exports.Form = _chunkQN64DHI4js.Form; exports.HashRouter = _chunkQN64DHI4js.HashRouter; exports.IDLE_BLOCKER = _chunkEAIF67OWjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkEAIF67OWjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkEAIF67OWjs.IDLE_NAVIGATION; exports.Link = _chunkQN64DHI4js.Link; exports.Links = _chunkEAIF67OWjs.Links; exports.MemoryRouter = _chunkEAIF67OWjs.MemoryRouter; exports.Meta = _chunkEAIF67OWjs.Meta; exports.NavLink = _chunkQN64DHI4js.NavLink; exports.Navigate = _chunkEAIF67OWjs.Navigate; exports.NavigationType = _chunkEAIF67OWjs.Action; exports.Outlet = _chunkEAIF67OWjs.Outlet; exports.PrefetchPageLinks = _chunkEAIF67OWjs.PrefetchPageLinks; exports.Route = _chunkEAIF67OWjs.Route; exports.Router = _chunkEAIF67OWjs.Router; exports.RouterContextProvider = _chunkEAIF67OWjs.RouterContextProvider; exports.RouterProvider = _chunkEAIF67OWjs.RouterProvider; exports.Routes = _chunkEAIF67OWjs.Routes; exports.Scripts = _chunkEAIF67OWjs.Scripts; exports.ScrollRestoration = _chunkQN64DHI4js.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkQN64DHI4js.StaticRouter; exports.StaticRouterProvider = _chunkQN64DHI4js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkEAIF67OWjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkEAIF67OWjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkEAIF67OWjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkEAIF67OWjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkEAIF67OWjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkEAIF67OWjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkEAIF67OWjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkEAIF67OWjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkG5A35OQUjs.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkEAIF67OWjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkEAIF67OWjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkEAIF67OWjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkEAIF67OWjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkEAIF67OWjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkEAIF67OWjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkEAIF67OWjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkEAIF67OWjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkEAIF67OWjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkEAIF67OWjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkEAIF67OWjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkEAIF67OWjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = _chunkG5A35OQUjs.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkEAIF67OWjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkEAIF67OWjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkEAIF67OWjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkEAIF67OWjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkEAIF67OWjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkEAIF67OWjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkEAIF67OWjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkQN64DHI4js.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkEAIF67OWjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkEAIF67OWjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkEAIF67OWjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkQN64DHI4js.createBrowserRouter; exports.createContext = _chunkEAIF67OWjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkQN64DHI4js.createHashRouter; exports.createMemoryRouter = _chunkEAIF67OWjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkEAIF67OWjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkEAIF67OWjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkEAIF67OWjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkQN64DHI4js.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkQN64DHI4js.createStaticHandler; exports.createStaticRouter = _chunkQN64DHI4js.createStaticRouter; exports.data = _chunkEAIF67OWjs.data; exports.generatePath = _chunkEAIF67OWjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkEAIF67OWjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkEAIF67OWjs.matchPath; exports.matchRoutes = _chunkEAIF67OWjs.matchRoutes; exports.parsePath = _chunkEAIF67OWjs.parsePath; exports.redirect = _chunkEAIF67OWjs.redirect; exports.redirectDocument = _chunkEAIF67OWjs.redirectDocument; exports.renderMatches = _chunkEAIF67OWjs.renderMatches; exports.replace = _chunkEAIF67OWjs.replace; exports.resolvePath = _chunkEAIF67OWjs.resolvePath; exports.unstable_HistoryRouter = _chunkQN64DHI4js.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkQN64DHI4js.usePrompt; exports.unstable_useRoute = _chunkEAIF67OWjs.useRoute; exports.useActionData = _chunkEAIF67OWjs.useActionData; exports.useAsyncError = _chunkEAIF67OWjs.useAsyncError; exports.useAsyncValue = _chunkEAIF67OWjs.useAsyncValue; exports.useBeforeUnload = _chunkQN64DHI4js.useBeforeUnload; exports.useBlocker = _chunkEAIF67OWjs.useBlocker; exports.useFetcher = _chunkQN64DHI4js.useFetcher; exports.useFetchers = _chunkQN64DHI4js.useFetchers; exports.useFormAction = _chunkQN64DHI4js.useFormAction; exports.useHref = _chunkEAIF67OWjs.useHref; exports.useInRouterContext = _chunkEAIF67OWjs.useInRouterContext; exports.useLinkClickHandler = _chunkQN64DHI4js.useLinkClickHandler; exports.useLoaderData = _chunkEAIF67OWjs.useLoaderData; exports.useLocation = _chunkEAIF67OWjs.useLocation; exports.useMatch = _chunkEAIF67OWjs.useMatch; exports.useMatches = _chunkEAIF67OWjs.useMatches; exports.useNavigate = _chunkEAIF67OWjs.useNavigate; exports.useNavigation = _chunkEAIF67OWjs.useNavigation; exports.useNavigationType = _chunkEAIF67OWjs.useNavigationType; exports.useOutlet = _chunkEAIF67OWjs.useOutlet; exports.useOutletContext = _chunkEAIF67OWjs.useOutletContext; exports.useParams = _chunkEAIF67OWjs.useParams; exports.useResolvedPath = _chunkEAIF67OWjs.useResolvedPath; exports.useRevalidator = _chunkEAIF67OWjs.useRevalidator; exports.useRouteError = _chunkEAIF67OWjs.useRouteError; exports.useRouteLoaderData = _chunkEAIF67OWjs.useRouteLoaderData; exports.useRoutes = _chunkEAIF67OWjs.useRoutes; exports.useSearchParams = _chunkQN64DHI4js.useSearchParams; exports.useSubmit = _chunkQN64DHI4js.useSubmit; exports.useViewTransitionState = _chunkQN64DHI4js.useViewTransitionState;
|