react-router 7.9.6 → 7.10.0-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +75 -10
  2. package/dist/development/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
  3. package/dist/development/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
  4. package/dist/development/{chunk-4WY6JWTD.mjs → chunk-GIMUO62I.mjs} +208 -221
  5. package/dist/development/{chunk-AMVS5XVJ.js → chunk-KQLPIZ7E.js} +201 -258
  6. package/dist/development/{chunk-PZWDWJAY.js → chunk-RHWHYDYZ.js} +7 -7
  7. package/dist/development/{chunk-G3INQAYP.mjs → chunk-V5RTLP6E.mjs} +15 -5
  8. package/dist/development/{chunk-O4JVZSOY.js → chunk-XHWAND4X.js} +167 -123
  9. package/dist/development/dom-export.d.mts +29 -10
  10. package/dist/development/dom-export.d.ts +29 -10
  11. package/dist/development/dom-export.js +158 -103
  12. package/dist/development/dom-export.mjs +133 -79
  13. package/dist/{production/index-react-server-client-Da3kmxNd.d.ts → development/index-react-server-client-CCjKYJTH.d.ts} +75 -180
  14. package/dist/development/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
  15. package/dist/development/index-react-server-client.d.mts +2 -2
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.d.mts +19 -4
  20. package/dist/development/index-react-server.d.ts +19 -4
  21. package/dist/development/index-react-server.js +30 -24
  22. package/dist/development/index-react-server.mjs +30 -24
  23. package/dist/development/index.d.mts +19 -15
  24. package/dist/development/index.d.ts +19 -15
  25. package/dist/development/index.js +92 -82
  26. package/dist/development/index.mjs +3 -3
  27. package/dist/{production/instrumentation-Unc20tLk.d.ts → development/instrumentation-BB0wRuqz.d.ts} +93 -11
  28. package/dist/development/lib/types/internal.d.mts +2 -2
  29. package/dist/development/lib/types/internal.d.ts +2 -2
  30. package/dist/development/lib/types/internal.js +1 -1
  31. package/dist/development/lib/types/internal.mjs +1 -1
  32. package/dist/development/{register-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
  33. package/dist/development/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
  34. package/dist/development/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
  35. package/dist/production/{browser-BbBXFHbO.d.ts → browser-BpxEZgZC.d.ts} +1 -1
  36. package/dist/production/{browser-C07r42Tt.d.mts → browser-C5z6FZmz.d.mts} +1 -1
  37. package/dist/production/{chunk-QN64DHI4.js → chunk-3MVZKESN.js} +167 -123
  38. package/dist/production/{chunk-FUSXQSWG.mjs → chunk-7F5XUDXM.mjs} +208 -221
  39. package/dist/production/{chunk-EAIF67OW.js → chunk-C7S4I3K5.js} +201 -258
  40. package/dist/production/{chunk-FDUMZGKM.mjs → chunk-ISOIFGFA.mjs} +15 -5
  41. package/dist/production/{chunk-G5A35OQU.js → chunk-YU3WNS3T.js} +7 -7
  42. package/dist/production/dom-export.d.mts +29 -10
  43. package/dist/production/dom-export.d.ts +29 -10
  44. package/dist/production/dom-export.js +158 -103
  45. package/dist/production/dom-export.mjs +133 -79
  46. package/dist/{development/index-react-server-client-Da3kmxNd.d.ts → production/index-react-server-client-CCjKYJTH.d.ts} +75 -180
  47. package/dist/production/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-CipGfVBI.d.mts} +75 -180
  48. package/dist/production/index-react-server-client.d.mts +2 -2
  49. package/dist/production/index-react-server-client.d.ts +2 -2
  50. package/dist/production/index-react-server-client.js +4 -4
  51. package/dist/production/index-react-server-client.mjs +2 -2
  52. package/dist/production/index-react-server.d.mts +19 -4
  53. package/dist/production/index-react-server.d.ts +19 -4
  54. package/dist/production/index-react-server.js +30 -24
  55. package/dist/production/index-react-server.mjs +30 -24
  56. package/dist/production/index.d.mts +19 -15
  57. package/dist/production/index.d.ts +19 -15
  58. package/dist/production/index.js +92 -82
  59. package/dist/production/index.mjs +3 -3
  60. package/dist/{development/instrumentation-Unc20tLk.d.ts → production/instrumentation-BB0wRuqz.d.ts} +93 -11
  61. package/dist/production/lib/types/internal.d.mts +2 -2
  62. package/dist/production/lib/types/internal.d.ts +2 -2
  63. package/dist/production/lib/types/internal.js +1 -1
  64. package/dist/production/lib/types/internal.mjs +1 -1
  65. package/dist/production/{register-QkB3HGjm.d.mts → register-C1RwVJAt.d.mts} +1 -1
  66. package/dist/production/{register-BpU9rFBJ.d.ts → register-ODDAAYlf.d.ts} +1 -1
  67. package/dist/production/{router-CAvh_Drx.d.mts → router-CwNp5l9u.d.mts} +93 -11
  68. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _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.6
2
+ * react-router v7.10.0-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -48,13 +48,13 @@
48
48
 
49
49
 
50
50
 
51
- var _chunkEAIF67OWjs = require('./chunk-EAIF67OW.js');
51
+ var _chunkC7S4I3K5js = require('./chunk-C7S4I3K5.js');
52
52
 
53
53
  // lib/dom/dom.ts
54
54
  var defaultMethod = "get";
55
55
  var defaultEncType = "application/x-www-form-urlencoded";
56
56
  function isHtmlElement(object) {
57
- return object != null && typeof object.tagName === "string";
57
+ return typeof HTMLElement !== "undefined" && object instanceof HTMLElement;
58
58
  }
59
59
  function isButtonElement(object) {
60
60
  return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
@@ -119,7 +119,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
119
119
  ]);
120
120
  function getFormEncType(encType) {
121
121
  if (encType != null && !supportedFormEncTypes.has(encType)) {
122
- _chunkEAIF67OWjs.warning.call(void 0,
122
+ _chunkC7S4I3K5js.warning.call(void 0,
123
123
  false,
124
124
  `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
125
125
  );
@@ -135,7 +135,7 @@ function getFormSubmissionInfo(target, basename) {
135
135
  let body;
136
136
  if (isFormElement(target)) {
137
137
  let attr = target.getAttribute("action");
138
- action = attr ? _chunkEAIF67OWjs.stripBasename.call(void 0, attr, basename) : null;
138
+ action = attr ? _chunkC7S4I3K5js.stripBasename.call(void 0, attr, basename) : null;
139
139
  method = target.getAttribute("method") || defaultMethod;
140
140
  encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
141
141
  formData = new FormData(target);
@@ -147,7 +147,7 @@ function getFormSubmissionInfo(target, basename) {
147
147
  );
148
148
  }
149
149
  let attr = target.getAttribute("formaction") || form.getAttribute("action");
150
- action = attr ? _chunkEAIF67OWjs.stripBasename.call(void 0, attr, basename) : null;
150
+ action = attr ? _chunkC7S4I3K5js.stripBasename.call(void 0, attr, basename) : null;
151
151
  method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
152
152
  encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
153
153
  formData = new FormData(form, target);
@@ -184,20 +184,20 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
184
184
  try {
185
185
  if (isBrowser) {
186
186
  window.__reactRouterVersion = // @ts-expect-error
187
- "7.9.6";
187
+ "7.10.0-pre.1";
188
188
  }
189
189
  } catch (e) {
190
190
  }
191
191
  function createBrowserRouter(routes, opts) {
192
- return _chunkEAIF67OWjs.createRouter.call(void 0, {
192
+ return _chunkC7S4I3K5js.createRouter.call(void 0, {
193
193
  basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
194
194
  getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.getContext]),
195
195
  future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
196
- history: _chunkEAIF67OWjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
196
+ history: _chunkC7S4I3K5js.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
197
197
  hydrationData: _optionalChain([opts, 'optionalAccess', _6 => _6.hydrationData]) || parseHydrationData(),
198
198
  routes,
199
- mapRouteProperties: _chunkEAIF67OWjs.mapRouteProperties,
200
- hydrationRouteProperties: _chunkEAIF67OWjs.hydrationRouteProperties,
199
+ mapRouteProperties: _chunkC7S4I3K5js.mapRouteProperties,
200
+ hydrationRouteProperties: _chunkC7S4I3K5js.hydrationRouteProperties,
201
201
  dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
202
202
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
203
203
  window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
@@ -205,15 +205,15 @@ function createBrowserRouter(routes, opts) {
205
205
  }).initialize();
206
206
  }
207
207
  function createHashRouter(routes, opts) {
208
- return _chunkEAIF67OWjs.createRouter.call(void 0, {
208
+ return _chunkC7S4I3K5js.createRouter.call(void 0, {
209
209
  basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
210
210
  getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
211
211
  future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
212
- history: _chunkEAIF67OWjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
212
+ history: _chunkC7S4I3K5js.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
213
213
  hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
214
214
  routes,
215
- mapRouteProperties: _chunkEAIF67OWjs.mapRouteProperties,
216
- hydrationRouteProperties: _chunkEAIF67OWjs.hydrationRouteProperties,
215
+ mapRouteProperties: _chunkC7S4I3K5js.mapRouteProperties,
216
+ hydrationRouteProperties: _chunkC7S4I3K5js.hydrationRouteProperties,
217
217
  dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
218
218
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
219
219
  window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
@@ -236,7 +236,7 @@ function deserializeErrors(errors) {
236
236
  let serialized = {};
237
237
  for (let [key, val] of entries) {
238
238
  if (val && val.__type === "RouteErrorResponse") {
239
- serialized[key] = new (0, _chunkEAIF67OWjs.ErrorResponseImpl)(
239
+ serialized[key] = new (0, _chunkC7S4I3K5js.ErrorResponseImpl)(
240
240
  val.status,
241
241
  val.statusText,
242
242
  val.data,
@@ -268,11 +268,12 @@ function deserializeErrors(errors) {
268
268
  function BrowserRouter({
269
269
  basename,
270
270
  children,
271
+ unstable_useTransitions,
271
272
  window: window2
272
273
  }) {
273
274
  let historyRef = React.useRef();
274
275
  if (historyRef.current == null) {
275
- historyRef.current = _chunkEAIF67OWjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
276
+ historyRef.current = _chunkC7S4I3K5js.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
276
277
  }
277
278
  let history = historyRef.current;
278
279
  let [state, setStateImpl] = React.useState({
@@ -281,26 +282,36 @@ function BrowserRouter({
281
282
  });
282
283
  let setState = React.useCallback(
283
284
  (newState) => {
284
- React.startTransition(() => setStateImpl(newState));
285
+ if (unstable_useTransitions === false) {
286
+ setStateImpl(newState);
287
+ } else {
288
+ React.startTransition(() => setStateImpl(newState));
289
+ }
285
290
  },
286
- [setStateImpl]
291
+ [unstable_useTransitions]
287
292
  );
288
293
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
289
294
  return /* @__PURE__ */ React.createElement(
290
- _chunkEAIF67OWjs.Router,
295
+ _chunkC7S4I3K5js.Router,
291
296
  {
292
297
  basename,
293
298
  children,
294
299
  location: state.location,
295
300
  navigationType: state.action,
296
- navigator: history
301
+ navigator: history,
302
+ unstable_useTransitions: unstable_useTransitions === true
297
303
  }
298
304
  );
299
305
  }
300
- function HashRouter({ basename, children, window: window2 }) {
306
+ function HashRouter({
307
+ basename,
308
+ children,
309
+ unstable_useTransitions,
310
+ window: window2
311
+ }) {
301
312
  let historyRef = React.useRef();
302
313
  if (historyRef.current == null) {
303
- historyRef.current = _chunkEAIF67OWjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
314
+ historyRef.current = _chunkC7S4I3K5js.createHashHistory.call(void 0, { window: window2, v5Compat: true });
304
315
  }
305
316
  let history = historyRef.current;
306
317
  let [state, setStateImpl] = React.useState({
@@ -309,26 +320,32 @@ function HashRouter({ basename, children, window: window2 }) {
309
320
  });
310
321
  let setState = React.useCallback(
311
322
  (newState) => {
312
- React.startTransition(() => setStateImpl(newState));
323
+ if (unstable_useTransitions === false) {
324
+ setStateImpl(newState);
325
+ } else {
326
+ React.startTransition(() => setStateImpl(newState));
327
+ }
313
328
  },
314
- [setStateImpl]
329
+ [unstable_useTransitions]
315
330
  );
316
331
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
317
332
  return /* @__PURE__ */ React.createElement(
318
- _chunkEAIF67OWjs.Router,
333
+ _chunkC7S4I3K5js.Router,
319
334
  {
320
335
  basename,
321
336
  children,
322
337
  location: state.location,
323
338
  navigationType: state.action,
324
- navigator: history
339
+ navigator: history,
340
+ unstable_useTransitions: unstable_useTransitions === true
325
341
  }
326
342
  );
327
343
  }
328
344
  function HistoryRouter({
329
345
  basename,
330
346
  children,
331
- history
347
+ history,
348
+ unstable_useTransitions
332
349
  }) {
333
350
  let [state, setStateImpl] = React.useState({
334
351
  action: history.action,
@@ -336,19 +353,24 @@ function HistoryRouter({
336
353
  });
337
354
  let setState = React.useCallback(
338
355
  (newState) => {
339
- React.startTransition(() => setStateImpl(newState));
356
+ if (unstable_useTransitions === false) {
357
+ setStateImpl(newState);
358
+ } else {
359
+ React.startTransition(() => setStateImpl(newState));
360
+ }
340
361
  },
341
- [setStateImpl]
362
+ [unstable_useTransitions]
342
363
  );
343
364
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
344
365
  return /* @__PURE__ */ React.createElement(
345
- _chunkEAIF67OWjs.Router,
366
+ _chunkC7S4I3K5js.Router,
346
367
  {
347
368
  basename,
348
369
  children,
349
370
  location: state.location,
350
371
  navigationType: state.action,
351
- navigator: history
372
+ navigator: history,
373
+ unstable_useTransitions: unstable_useTransitions === true
352
374
  }
353
375
  );
354
376
  }
@@ -369,7 +391,7 @@ var Link = React.forwardRef(
369
391
  viewTransition,
370
392
  ...rest
371
393
  }, forwardedRef) {
372
- let { basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
394
+ let { basename, unstable_useTransitions } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
373
395
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
374
396
  let absoluteHref;
375
397
  let isExternal = false;
@@ -379,22 +401,22 @@ var Link = React.forwardRef(
379
401
  try {
380
402
  let currentUrl = new URL(window.location.href);
381
403
  let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
382
- let path = _chunkEAIF67OWjs.stripBasename.call(void 0, targetUrl.pathname, basename);
404
+ let path = _chunkC7S4I3K5js.stripBasename.call(void 0, targetUrl.pathname, basename);
383
405
  if (targetUrl.origin === currentUrl.origin && path != null) {
384
406
  to = path + targetUrl.search + targetUrl.hash;
385
407
  } else {
386
408
  isExternal = true;
387
409
  }
388
410
  } catch (e) {
389
- _chunkEAIF67OWjs.warning.call(void 0,
411
+ _chunkC7S4I3K5js.warning.call(void 0,
390
412
  false,
391
413
  `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
392
414
  );
393
415
  }
394
416
  }
395
417
  }
396
- let href = _chunkEAIF67OWjs.useHref.call(void 0, to, { relative });
397
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkEAIF67OWjs.usePrefetchBehavior.call(void 0,
418
+ let href = _chunkC7S4I3K5js.useHref.call(void 0, to, { relative });
419
+ let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkC7S4I3K5js.usePrefetchBehavior.call(void 0,
398
420
  prefetch,
399
421
  rest
400
422
  );
@@ -404,7 +426,8 @@ var Link = React.forwardRef(
404
426
  target,
405
427
  preventScrollReset,
406
428
  relative,
407
- viewTransition
429
+ viewTransition,
430
+ unstable_useTransitions
408
431
  });
409
432
  function handleClick(event) {
410
433
  if (onClick) onClick(event);
@@ -421,13 +444,13 @@ var Link = React.forwardRef(
421
444
  ...prefetchHandlers,
422
445
  href: absoluteHref || href,
423
446
  onClick: isExternal || reloadDocument ? onClick : handleClick,
424
- ref: _chunkEAIF67OWjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
447
+ ref: _chunkC7S4I3K5js.mergeRefs.call(void 0, forwardedRef, prefetchRef),
425
448
  target,
426
449
  "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
427
450
  }
428
451
  )
429
452
  );
430
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkEAIF67OWjs.PrefetchPageLinks, { page: href })) : link;
453
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkC7S4I3K5js.PrefetchPageLinks, { page: href })) : link;
431
454
  }
432
455
  );
433
456
  Link.displayName = "Link";
@@ -443,10 +466,10 @@ var NavLink = React.forwardRef(
443
466
  children,
444
467
  ...rest
445
468
  }, ref) {
446
- let path = _chunkEAIF67OWjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
447
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
448
- let routerState = React.useContext(_chunkEAIF67OWjs.DataRouterStateContext);
449
- let { navigator, basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
469
+ let path = _chunkC7S4I3K5js.useResolvedPath.call(void 0, to, { relative: rest.relative });
470
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
471
+ let routerState = React.useContext(_chunkC7S4I3K5js.DataRouterStateContext);
472
+ let { navigator, basename } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
450
473
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
451
474
  // eslint-disable-next-line react-hooks/rules-of-hooks
452
475
  useViewTransitionState(path) && viewTransition === true;
@@ -459,7 +482,7 @@ var NavLink = React.forwardRef(
459
482
  toPathname = toPathname.toLowerCase();
460
483
  }
461
484
  if (nextLocationPathname && basename) {
462
- nextLocationPathname = _chunkEAIF67OWjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
485
+ nextLocationPathname = _chunkC7S4I3K5js.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
463
486
  }
464
487
  const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
465
488
  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
@@ -514,6 +537,7 @@ var Form = React.forwardRef(
514
537
  viewTransition,
515
538
  ...props
516
539
  }, forwardedRef) => {
540
+ let { unstable_useTransitions } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
517
541
  let submit = useSubmit();
518
542
  let formAction = useFormAction(action, { relative });
519
543
  let formMethod = method.toLowerCase() === "get" ? "get" : "post";
@@ -524,7 +548,7 @@ var Form = React.forwardRef(
524
548
  event.preventDefault();
525
549
  let submitter = event.nativeEvent.submitter;
526
550
  let submitMethod = _optionalChain([submitter, 'optionalAccess', _21 => _21.getAttribute, 'call', _22 => _22("formmethod")]) || method;
527
- submit(submitter || event.currentTarget, {
551
+ let doSubmit = () => submit(submitter || event.currentTarget, {
528
552
  fetcherKey,
529
553
  method: submitMethod,
530
554
  navigate,
@@ -534,6 +558,11 @@ var Form = React.forwardRef(
534
558
  preventScrollReset,
535
559
  viewTransition
536
560
  });
561
+ if (unstable_useTransitions && navigate !== false) {
562
+ React.startTransition(() => doSubmit());
563
+ } else {
564
+ doSubmit();
565
+ }
537
566
  };
538
567
  return /* @__PURE__ */ React.createElement(
539
568
  "form",
@@ -554,10 +583,10 @@ function ScrollRestoration({
554
583
  storageKey,
555
584
  ...props
556
585
  }) {
557
- let remixContext = React.useContext(_chunkEAIF67OWjs.FrameworkContext);
558
- let { basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
559
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
560
- let matches = _chunkEAIF67OWjs.useMatches.call(void 0, );
586
+ let remixContext = React.useContext(_chunkC7S4I3K5js.FrameworkContext);
587
+ let { basename } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
588
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
589
+ let matches = _chunkC7S4I3K5js.useMatches.call(void 0, );
561
590
  useScrollRestoration({ getKey, storageKey });
562
591
  let ssrKey = React.useMemo(
563
592
  () => {
@@ -611,13 +640,13 @@ function getDataRouterConsoleError(hookName) {
611
640
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
612
641
  }
613
642
  function useDataRouterContext(hookName) {
614
- let ctx = React.useContext(_chunkEAIF67OWjs.DataRouterContext);
615
- _chunkEAIF67OWjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
643
+ let ctx = React.useContext(_chunkC7S4I3K5js.DataRouterContext);
644
+ _chunkC7S4I3K5js.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
616
645
  return ctx;
617
646
  }
618
647
  function useDataRouterState(hookName) {
619
- let state = React.useContext(_chunkEAIF67OWjs.DataRouterStateContext);
620
- _chunkEAIF67OWjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
648
+ let state = React.useContext(_chunkC7S4I3K5js.DataRouterStateContext);
649
+ _chunkC7S4I3K5js.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
621
650
  return state;
622
651
  }
623
652
  function useLinkClickHandler(to, {
@@ -626,23 +655,29 @@ function useLinkClickHandler(to, {
626
655
  state,
627
656
  preventScrollReset,
628
657
  relative,
629
- viewTransition
658
+ viewTransition,
659
+ unstable_useTransitions
630
660
  } = {}) {
631
- let navigate = _chunkEAIF67OWjs.useNavigate.call(void 0, );
632
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
633
- let path = _chunkEAIF67OWjs.useResolvedPath.call(void 0, to, { relative });
661
+ let navigate = _chunkC7S4I3K5js.useNavigate.call(void 0, );
662
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
663
+ let path = _chunkC7S4I3K5js.useResolvedPath.call(void 0, to, { relative });
634
664
  return React.useCallback(
635
665
  (event) => {
636
666
  if (shouldProcessLinkClick(event, target)) {
637
667
  event.preventDefault();
638
- let replace = replaceProp !== void 0 ? replaceProp : _chunkEAIF67OWjs.createPath.call(void 0, location) === _chunkEAIF67OWjs.createPath.call(void 0, path);
639
- navigate(to, {
668
+ let replace = replaceProp !== void 0 ? replaceProp : _chunkC7S4I3K5js.createPath.call(void 0, location) === _chunkC7S4I3K5js.createPath.call(void 0, path);
669
+ let doNavigate = () => navigate(to, {
640
670
  replace,
641
671
  state,
642
672
  preventScrollReset,
643
673
  relative,
644
674
  viewTransition
645
675
  });
676
+ if (unstable_useTransitions) {
677
+ React.startTransition(() => doNavigate());
678
+ } else {
679
+ doNavigate();
680
+ }
646
681
  }
647
682
  },
648
683
  [
@@ -655,18 +690,19 @@ function useLinkClickHandler(to, {
655
690
  to,
656
691
  preventScrollReset,
657
692
  relative,
658
- viewTransition
693
+ viewTransition,
694
+ unstable_useTransitions
659
695
  ]
660
696
  );
661
697
  }
662
698
  function useSearchParams(defaultInit) {
663
- _chunkEAIF67OWjs.warning.call(void 0,
699
+ _chunkC7S4I3K5js.warning.call(void 0,
664
700
  typeof URLSearchParams !== "undefined",
665
701
  `You cannot use the \`useSearchParams\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`
666
702
  );
667
703
  let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
668
704
  let hasSetSearchParamsRef = React.useRef(false);
669
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
705
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
670
706
  let searchParams = React.useMemo(
671
707
  () => (
672
708
  // Only merge in the defaults if we haven't yet called setSearchParams.
@@ -679,7 +715,7 @@ function useSearchParams(defaultInit) {
679
715
  ),
680
716
  [location.search]
681
717
  );
682
- let navigate = _chunkEAIF67OWjs.useNavigate.call(void 0, );
718
+ let navigate = _chunkC7S4I3K5js.useNavigate.call(void 0, );
683
719
  let setSearchParams = React.useCallback(
684
720
  (nextInit, navigateOptions) => {
685
721
  const newSearchParams = createSearchParams(
@@ -696,8 +732,10 @@ var fetcherId = 0;
696
732
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
697
733
  function useSubmit() {
698
734
  let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
699
- let { basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
700
- let currentRouteId = _chunkEAIF67OWjs.useRouteId.call(void 0, );
735
+ let { basename } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
736
+ let currentRouteId = _chunkC7S4I3K5js.useRouteId.call(void 0, );
737
+ let routerFetch = router.fetch;
738
+ let routerNavigate = router.navigate;
701
739
  return React.useCallback(
702
740
  async (target, options = {}) => {
703
741
  let { action, method, encType, formData, body } = getFormSubmissionInfo(
@@ -706,7 +744,7 @@ function useSubmit() {
706
744
  );
707
745
  if (options.navigate === false) {
708
746
  let key = options.fetcherKey || getUniqueFetcherId();
709
- await router.fetch(key, currentRouteId, options.action || action, {
747
+ await routerFetch(key, currentRouteId, options.action || action, {
710
748
  preventScrollReset: options.preventScrollReset,
711
749
  formData,
712
750
  body,
@@ -715,7 +753,7 @@ function useSubmit() {
715
753
  flushSync: options.flushSync
716
754
  });
717
755
  } else {
718
- await router.navigate(options.action || action, {
756
+ await routerNavigate(options.action || action, {
719
757
  preventScrollReset: options.preventScrollReset,
720
758
  formData,
721
759
  body,
@@ -729,16 +767,16 @@ function useSubmit() {
729
767
  });
730
768
  }
731
769
  },
732
- [router, basename, currentRouteId]
770
+ [routerFetch, routerNavigate, basename, currentRouteId]
733
771
  );
734
772
  }
735
773
  function useFormAction(action, { relative } = {}) {
736
- let { basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
737
- let routeContext = React.useContext(_chunkEAIF67OWjs.RouteContext);
738
- _chunkEAIF67OWjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
774
+ let { basename } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
775
+ let routeContext = React.useContext(_chunkC7S4I3K5js.RouteContext);
776
+ _chunkC7S4I3K5js.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
739
777
  let [match] = routeContext.matches.slice(-1);
740
- let path = { ..._chunkEAIF67OWjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
741
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
778
+ let path = { ..._chunkC7S4I3K5js.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
779
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
742
780
  if (action == null) {
743
781
  path.search = location.search;
744
782
  let params = new URLSearchParams(path.search);
@@ -755,21 +793,21 @@ function useFormAction(action, { relative } = {}) {
755
793
  path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
756
794
  }
757
795
  if (basename !== "/") {
758
- path.pathname = path.pathname === "/" ? basename : _chunkEAIF67OWjs.joinPaths.call(void 0, [basename, path.pathname]);
796
+ path.pathname = path.pathname === "/" ? basename : _chunkC7S4I3K5js.joinPaths.call(void 0, [basename, path.pathname]);
759
797
  }
760
- return _chunkEAIF67OWjs.createPath.call(void 0, path);
798
+ return _chunkC7S4I3K5js.createPath.call(void 0, path);
761
799
  }
762
800
  function useFetcher({
763
801
  key
764
802
  } = {}) {
765
803
  let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
766
804
  let state = useDataRouterState("useFetcher" /* UseFetcher */);
767
- let fetcherData = React.useContext(_chunkEAIF67OWjs.FetchersContext);
768
- let route = React.useContext(_chunkEAIF67OWjs.RouteContext);
805
+ let fetcherData = React.useContext(_chunkC7S4I3K5js.FetchersContext);
806
+ let route = React.useContext(_chunkC7S4I3K5js.RouteContext);
769
807
  let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
770
- _chunkEAIF67OWjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
771
- _chunkEAIF67OWjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
772
- _chunkEAIF67OWjs.invariant.call(void 0,
808
+ _chunkC7S4I3K5js.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
809
+ _chunkC7S4I3K5js.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
810
+ _chunkC7S4I3K5js.invariant.call(void 0,
773
811
  routeId != null,
774
812
  `useFetcher can only be used on routes that contain a unique "id"`
775
813
  );
@@ -778,16 +816,17 @@ function useFetcher({
778
816
  if (key && key !== fetcherKey) {
779
817
  setFetcherKey(key);
780
818
  }
819
+ let { deleteFetcher, getFetcher, resetFetcher, fetch: routerFetch } = router;
781
820
  React.useEffect(() => {
782
- router.getFetcher(fetcherKey);
783
- return () => router.deleteFetcher(fetcherKey);
784
- }, [router, fetcherKey]);
821
+ getFetcher(fetcherKey);
822
+ return () => deleteFetcher(fetcherKey);
823
+ }, [deleteFetcher, getFetcher, fetcherKey]);
785
824
  let load = React.useCallback(
786
825
  async (href, opts) => {
787
- _chunkEAIF67OWjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
788
- await router.fetch(fetcherKey, routeId, href, opts);
826
+ _chunkC7S4I3K5js.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
827
+ await routerFetch(fetcherKey, routeId, href, opts);
789
828
  },
790
- [fetcherKey, routeId, router]
829
+ [fetcherKey, routeId, routerFetch]
791
830
  );
792
831
  let submitImpl = useSubmit();
793
832
  let submit = React.useCallback(
@@ -800,7 +839,10 @@ function useFetcher({
800
839
  },
801
840
  [fetcherKey, submitImpl]
802
841
  );
803
- let unstable_reset = React.useCallback((opts) => router.resetFetcher(fetcherKey, opts), [router, fetcherKey]);
842
+ let reset = React.useCallback(
843
+ (opts) => resetFetcher(fetcherKey, opts),
844
+ [resetFetcher, fetcherKey]
845
+ );
804
846
  let FetcherForm = React.useMemo(() => {
805
847
  let FetcherForm2 = React.forwardRef(
806
848
  (props, ref) => {
@@ -810,18 +852,18 @@ function useFetcher({
810
852
  FetcherForm2.displayName = "fetcher.Form";
811
853
  return FetcherForm2;
812
854
  }, [fetcherKey]);
813
- let fetcher = state.fetchers.get(fetcherKey) || _chunkEAIF67OWjs.IDLE_FETCHER;
855
+ let fetcher = state.fetchers.get(fetcherKey) || _chunkC7S4I3K5js.IDLE_FETCHER;
814
856
  let data = fetcherData.get(fetcherKey);
815
857
  let fetcherWithComponents = React.useMemo(
816
858
  () => ({
817
859
  Form: FetcherForm,
818
860
  submit,
819
861
  load,
820
- unstable_reset,
862
+ reset,
821
863
  ...fetcher,
822
864
  data
823
865
  }),
824
- [FetcherForm, submit, load, unstable_reset, fetcher, data]
866
+ [FetcherForm, submit, load, reset, fetcher, data]
825
867
  );
826
868
  return fetcherWithComponents;
827
869
  }
@@ -841,7 +883,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
841
883
  key = getKey(
842
884
  {
843
885
  ...location,
844
- pathname: _chunkEAIF67OWjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
886
+ pathname: _chunkC7S4I3K5js.stripBasename.call(void 0, location.pathname, basename) || location.pathname
845
887
  },
846
888
  matches
847
889
  );
@@ -862,10 +904,10 @@ function useScrollRestoration({
862
904
  let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
863
905
  "useScrollRestoration" /* UseScrollRestoration */
864
906
  );
865
- let { basename } = React.useContext(_chunkEAIF67OWjs.NavigationContext);
866
- let location = _chunkEAIF67OWjs.useLocation.call(void 0, );
867
- let matches = _chunkEAIF67OWjs.useMatches.call(void 0, );
868
- let navigation = _chunkEAIF67OWjs.useNavigation.call(void 0, );
907
+ let { basename } = React.useContext(_chunkC7S4I3K5js.NavigationContext);
908
+ let location = _chunkC7S4I3K5js.useLocation.call(void 0, );
909
+ let matches = _chunkC7S4I3K5js.useMatches.call(void 0, );
910
+ let navigation = _chunkC7S4I3K5js.useNavigation.call(void 0, );
869
911
  React.useEffect(() => {
870
912
  window.history.scrollRestoration = "manual";
871
913
  return () => {
@@ -884,7 +926,7 @@ function useScrollRestoration({
884
926
  JSON.stringify(savedScrollPositions)
885
927
  );
886
928
  } catch (error) {
887
- _chunkEAIF67OWjs.warning.call(void 0,
929
+ _chunkC7S4I3K5js.warning.call(void 0,
888
930
  false,
889
931
  `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
890
932
  );
@@ -931,7 +973,7 @@ function useScrollRestoration({
931
973
  }
932
974
  }
933
975
  } catch (e2) {
934
- _chunkEAIF67OWjs.warning.call(void 0,
976
+ _chunkC7S4I3K5js.warning.call(void 0,
935
977
  false,
936
978
  `"${location.hash.slice(
937
979
  1
@@ -969,7 +1011,7 @@ function usePrompt({
969
1011
  when,
970
1012
  message
971
1013
  }) {
972
- let blocker = _chunkEAIF67OWjs.useBlocker.call(void 0, when);
1014
+ let blocker = _chunkC7S4I3K5js.useBlocker.call(void 0, when);
973
1015
  React.useEffect(() => {
974
1016
  if (blocker.state === "blocked") {
975
1017
  let proceed = window.confirm(message);
@@ -987,21 +1029,21 @@ function usePrompt({
987
1029
  }, [blocker, when]);
988
1030
  }
989
1031
  function useViewTransitionState(to, { relative } = {}) {
990
- let vtContext = React.useContext(_chunkEAIF67OWjs.ViewTransitionContext);
991
- _chunkEAIF67OWjs.invariant.call(void 0,
1032
+ let vtContext = React.useContext(_chunkC7S4I3K5js.ViewTransitionContext);
1033
+ _chunkC7S4I3K5js.invariant.call(void 0,
992
1034
  vtContext != null,
993
1035
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
994
1036
  );
995
1037
  let { basename } = useDataRouterContext(
996
1038
  "useViewTransitionState" /* useViewTransitionState */
997
1039
  );
998
- let path = _chunkEAIF67OWjs.useResolvedPath.call(void 0, to, { relative });
1040
+ let path = _chunkC7S4I3K5js.useResolvedPath.call(void 0, to, { relative });
999
1041
  if (!vtContext.isTransitioning) {
1000
1042
  return false;
1001
1043
  }
1002
- let currentPath = _chunkEAIF67OWjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1003
- let nextPath = _chunkEAIF67OWjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1004
- return _chunkEAIF67OWjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkEAIF67OWjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1044
+ let currentPath = _chunkC7S4I3K5js.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1045
+ let nextPath = _chunkC7S4I3K5js.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1046
+ return _chunkC7S4I3K5js.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkC7S4I3K5js.matchPath.call(void 0, path.pathname, currentPath) != null;
1005
1047
  }
1006
1048
 
1007
1049
  // lib/dom/server.tsx
@@ -1012,7 +1054,7 @@ function StaticRouter({
1012
1054
  location: locationProp = "/"
1013
1055
  }) {
1014
1056
  if (typeof locationProp === "string") {
1015
- locationProp = _chunkEAIF67OWjs.parsePath.call(void 0, locationProp);
1057
+ locationProp = _chunkC7S4I3K5js.parsePath.call(void 0, locationProp);
1016
1058
  }
1017
1059
  let action = "POP" /* Pop */;
1018
1060
  let location = {
@@ -1024,14 +1066,15 @@ function StaticRouter({
1024
1066
  };
1025
1067
  let staticNavigator = getStatelessNavigator();
1026
1068
  return /* @__PURE__ */ React2.createElement(
1027
- _chunkEAIF67OWjs.Router,
1069
+ _chunkC7S4I3K5js.Router,
1028
1070
  {
1029
1071
  basename,
1030
1072
  children,
1031
1073
  location,
1032
1074
  navigationType: action,
1033
1075
  navigator: staticNavigator,
1034
- static: true
1076
+ static: true,
1077
+ unstable_useTransitions: false
1035
1078
  }
1036
1079
  );
1037
1080
  }
@@ -1041,7 +1084,7 @@ function StaticRouterProvider({
1041
1084
  hydrate = true,
1042
1085
  nonce
1043
1086
  }) {
1044
- _chunkEAIF67OWjs.invariant.call(void 0,
1087
+ _chunkC7S4I3K5js.invariant.call(void 0,
1045
1088
  router && context,
1046
1089
  "You must provide `router` and `context` to <StaticRouterProvider>"
1047
1090
  );
@@ -1064,14 +1107,15 @@ function StaticRouterProvider({
1064
1107
  hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
1065
1108
  }
1066
1109
  let { state } = dataRouterContext.router;
1067
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkEAIF67OWjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1068
- _chunkEAIF67OWjs.Router,
1110
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkC7S4I3K5js.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkC7S4I3K5js.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkC7S4I3K5js.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkC7S4I3K5js.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1111
+ _chunkC7S4I3K5js.Router,
1069
1112
  {
1070
1113
  basename: dataRouterContext.basename,
1071
1114
  location: state.location,
1072
1115
  navigationType: state.historyAction,
1073
1116
  navigator: dataRouterContext.navigator,
1074
- static: dataRouterContext.static
1117
+ static: dataRouterContext.static,
1118
+ unstable_useTransitions: false
1075
1119
  },
1076
1120
  /* @__PURE__ */ React2.createElement(
1077
1121
  DataRoutes,
@@ -1095,14 +1139,14 @@ function DataRoutes({
1095
1139
  future,
1096
1140
  state
1097
1141
  }) {
1098
- return _chunkEAIF67OWjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1142
+ return _chunkC7S4I3K5js.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1099
1143
  }
1100
1144
  function serializeErrors(errors) {
1101
1145
  if (!errors) return null;
1102
1146
  let entries = Object.entries(errors);
1103
1147
  let serialized = {};
1104
1148
  for (let [key, val] of entries) {
1105
- if (_chunkEAIF67OWjs.isRouteErrorResponse.call(void 0, val)) {
1149
+ if (_chunkC7S4I3K5js.isRouteErrorResponse.call(void 0, val)) {
1106
1150
  serialized[key] = { ...val, __type: "RouteErrorResponse" };
1107
1151
  } else if (val instanceof Error) {
1108
1152
  serialized[key] = {
@@ -1152,16 +1196,16 @@ function getStatelessNavigator() {
1152
1196
  };
1153
1197
  }
1154
1198
  function createStaticHandler2(routes, opts) {
1155
- return _chunkEAIF67OWjs.createStaticHandler.call(void 0, routes, {
1199
+ return _chunkC7S4I3K5js.createStaticHandler.call(void 0, routes, {
1156
1200
  ...opts,
1157
- mapRouteProperties: _chunkEAIF67OWjs.mapRouteProperties
1201
+ mapRouteProperties: _chunkC7S4I3K5js.mapRouteProperties
1158
1202
  });
1159
1203
  }
1160
1204
  function createStaticRouter(routes, context, opts = {}) {
1161
1205
  let manifest = {};
1162
- let dataRoutes = _chunkEAIF67OWjs.convertRoutesToDataRoutes.call(void 0,
1206
+ let dataRoutes = _chunkC7S4I3K5js.convertRoutesToDataRoutes.call(void 0,
1163
1207
  routes,
1164
- _chunkEAIF67OWjs.mapRouteProperties,
1208
+ _chunkC7S4I3K5js.mapRouteProperties,
1165
1209
  void 0,
1166
1210
  manifest
1167
1211
  );
@@ -1192,7 +1236,7 @@ function createStaticRouter(routes, context, opts = {}) {
1192
1236
  actionData: context.actionData,
1193
1237
  errors: context.errors,
1194
1238
  initialized: true,
1195
- navigation: _chunkEAIF67OWjs.IDLE_NAVIGATION,
1239
+ navigation: _chunkC7S4I3K5js.IDLE_NAVIGATION,
1196
1240
  restoreScrollPosition: null,
1197
1241
  preventScrollReset: false,
1198
1242
  revalidation: "idle",
@@ -1227,7 +1271,7 @@ function createStaticRouter(routes, context, opts = {}) {
1227
1271
  createHref,
1228
1272
  encodeLocation,
1229
1273
  getFetcher() {
1230
- return _chunkEAIF67OWjs.IDLE_FETCHER;
1274
+ return _chunkC7S4I3K5js.IDLE_FETCHER;
1231
1275
  },
1232
1276
  deleteFetcher() {
1233
1277
  throw msg("deleteFetcher");
@@ -1239,7 +1283,7 @@ function createStaticRouter(routes, context, opts = {}) {
1239
1283
  throw msg("dispose");
1240
1284
  },
1241
1285
  getBlocker() {
1242
- return _chunkEAIF67OWjs.IDLE_BLOCKER;
1286
+ return _chunkC7S4I3K5js.IDLE_BLOCKER;
1243
1287
  },
1244
1288
  deleteBlocker() {
1245
1289
  throw msg("deleteBlocker");
@@ -1257,10 +1301,10 @@ function createStaticRouter(routes, context, opts = {}) {
1257
1301
  };
1258
1302
  }
1259
1303
  function createHref(to) {
1260
- return typeof to === "string" ? to : _chunkEAIF67OWjs.createPath.call(void 0, to);
1304
+ return typeof to === "string" ? to : _chunkC7S4I3K5js.createPath.call(void 0, to);
1261
1305
  }
1262
1306
  function encodeLocation(to) {
1263
- let href = typeof to === "string" ? to : _chunkEAIF67OWjs.createPath.call(void 0, to);
1307
+ let href = typeof to === "string" ? to : _chunkC7S4I3K5js.createPath.call(void 0, to);
1264
1308
  href = href.replace(/ $/, "%20");
1265
1309
  let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
1266
1310
  return {