react-router 0.0.0-experimental-3d7dcee → 0.0.0-experimental-7ed11be

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 (58) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/dist/development/{chunk-QMIAKNRH.mjs → chunk-2OYLVAZB.mjs} +2 -2
  3. package/dist/development/{chunk-S2WJDCRE.js → chunk-BELBAVMB.js} +193 -254
  4. package/dist/development/{chunk-WJ2QP6HN.mjs → chunk-MUVPFEOF.mjs} +154 -210
  5. package/dist/development/{chunk-LSB26UC6.js → chunk-X5OYM2ET.js} +137 -132
  6. package/dist/{production/context-DnZM5brG.d.mts → development/context-CRZ6DK7I.d.mts} +11 -1
  7. package/dist/development/dom-export.d.mts +1 -1
  8. package/dist/development/dom-export.js +3 -3
  9. package/dist/development/dom-export.mjs +3 -3
  10. package/dist/development/{index-react-server-client-zr5eNeut.d.ts → index-react-server-client-DM3R9ovf.d.ts} +39 -23
  11. package/dist/{production/index-react-server-client-9rHNv-U3.d.mts → development/index-react-server-client-DbUtZHNh.d.mts} +40 -24
  12. package/dist/development/index-react-server-client.d.mts +3 -3
  13. package/dist/development/index-react-server-client.d.ts +2 -2
  14. package/dist/development/index-react-server-client.js +4 -4
  15. package/dist/development/index-react-server-client.mjs +2 -2
  16. package/dist/development/index-react-server.d.mts +49 -2
  17. package/dist/development/index-react-server.d.ts +49 -2
  18. package/dist/development/index-react-server.js +72 -81
  19. package/dist/development/index-react-server.mjs +72 -82
  20. package/dist/development/index.d.mts +44 -6
  21. package/dist/development/index.d.ts +42 -4
  22. package/dist/development/index.js +102 -102
  23. package/dist/development/index.mjs +3 -3
  24. package/dist/development/lib/types/internal.d.mts +8 -5
  25. package/dist/development/lib/types/internal.d.ts +7 -4
  26. package/dist/development/lib/types/internal.js +1 -1
  27. package/dist/development/lib/types/internal.mjs +1 -1
  28. package/dist/development/{route-data-C24VEkoE.d.mts → route-data-gwXJPIqL.d.mts} +3 -3
  29. package/dist/development/{routeModules-FY5IBiA_.d.ts → routeModules-Dz64j-T-.d.ts} +12 -2
  30. package/dist/production/{chunk-OFC37UQM.mjs → chunk-7A6GBCQS.mjs} +2 -2
  31. package/dist/production/{chunk-7CWVKQLP.js → chunk-A4J35SEJ.js} +193 -254
  32. package/dist/production/{chunk-2BFZ6QQU.mjs → chunk-IC5TORKA.mjs} +154 -210
  33. package/dist/production/{chunk-NIW37A6Q.js → chunk-W6BB3ISI.js} +137 -132
  34. package/dist/{development/context-DnZM5brG.d.mts → production/context-CRZ6DK7I.d.mts} +11 -1
  35. package/dist/production/dom-export.d.mts +1 -1
  36. package/dist/production/dom-export.js +3 -3
  37. package/dist/production/dom-export.mjs +3 -3
  38. package/dist/production/{index-react-server-client-zr5eNeut.d.ts → index-react-server-client-DM3R9ovf.d.ts} +39 -23
  39. package/dist/{development/index-react-server-client-9rHNv-U3.d.mts → production/index-react-server-client-DbUtZHNh.d.mts} +40 -24
  40. package/dist/production/index-react-server-client.d.mts +3 -3
  41. package/dist/production/index-react-server-client.d.ts +2 -2
  42. package/dist/production/index-react-server-client.js +4 -4
  43. package/dist/production/index-react-server-client.mjs +2 -2
  44. package/dist/production/index-react-server.d.mts +49 -2
  45. package/dist/production/index-react-server.d.ts +49 -2
  46. package/dist/production/index-react-server.js +72 -81
  47. package/dist/production/index-react-server.mjs +72 -82
  48. package/dist/production/index.d.mts +44 -6
  49. package/dist/production/index.d.ts +42 -4
  50. package/dist/production/index.js +102 -102
  51. package/dist/production/index.mjs +3 -3
  52. package/dist/production/lib/types/internal.d.mts +8 -5
  53. package/dist/production/lib/types/internal.d.ts +7 -4
  54. package/dist/production/lib/types/internal.js +1 -1
  55. package/dist/production/lib/types/internal.mjs +1 -1
  56. package/dist/production/{route-data-C24VEkoE.d.mts → route-data-gwXJPIqL.d.mts} +3 -3
  57. package/dist/production/{routeModules-FY5IBiA_.d.ts → routeModules-Dz64j-T-.d.ts} +12 -2
  58. 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 v0.0.0-experimental-3d7dcee
2
+ * react-router v0.0.0-experimental-7ed11be
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -61,7 +61,7 @@
61
61
 
62
62
 
63
63
 
64
- var _chunkS2WJDCREjs = require('./chunk-S2WJDCRE.js');
64
+ var _chunkBELBAVMBjs = require('./chunk-BELBAVMB.js');
65
65
 
66
66
  // lib/components.tsx
67
67
  var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
@@ -72,9 +72,9 @@ function mapRouteProperties(route) {
72
72
  hasErrorBoundary: route.hasErrorBoundary || route.ErrorBoundary != null || route.errorElement != null
73
73
  };
74
74
  if (route.Component) {
75
- if (_chunkS2WJDCREjs.ENABLE_DEV_WARNINGS) {
75
+ if (_chunkBELBAVMBjs.ENABLE_DEV_WARNINGS) {
76
76
  if (route.element) {
77
- _chunkS2WJDCREjs.warning.call(void 0,
77
+ _chunkBELBAVMBjs.warning.call(void 0,
78
78
  false,
79
79
  "You should not include both `Component` and `element` on your route - `Component` will be used."
80
80
  );
@@ -86,9 +86,9 @@ function mapRouteProperties(route) {
86
86
  });
87
87
  }
88
88
  if (route.HydrateFallback) {
89
- if (_chunkS2WJDCREjs.ENABLE_DEV_WARNINGS) {
89
+ if (_chunkBELBAVMBjs.ENABLE_DEV_WARNINGS) {
90
90
  if (route.hydrateFallbackElement) {
91
- _chunkS2WJDCREjs.warning.call(void 0,
91
+ _chunkBELBAVMBjs.warning.call(void 0,
92
92
  false,
93
93
  "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."
94
94
  );
@@ -100,9 +100,9 @@ function mapRouteProperties(route) {
100
100
  });
101
101
  }
102
102
  if (route.ErrorBoundary) {
103
- if (_chunkS2WJDCREjs.ENABLE_DEV_WARNINGS) {
103
+ if (_chunkBELBAVMBjs.ENABLE_DEV_WARNINGS) {
104
104
  if (route.errorElement) {
105
- _chunkS2WJDCREjs.warning.call(void 0,
105
+ _chunkBELBAVMBjs.warning.call(void 0,
106
106
  false,
107
107
  "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."
108
108
  );
@@ -120,11 +120,11 @@ var hydrationRouteProperties = [
120
120
  "hydrateFallbackElement"
121
121
  ];
122
122
  function createMemoryRouter(routes, opts) {
123
- return _chunkS2WJDCREjs.createRouter.call(void 0, {
123
+ return _chunkBELBAVMBjs.createRouter.call(void 0, {
124
124
  basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
125
125
  unstable_getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.unstable_getContext]),
126
126
  future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
127
- history: _chunkS2WJDCREjs.createMemoryHistory.call(void 0, {
127
+ history: _chunkBELBAVMBjs.createMemoryHistory.call(void 0, {
128
128
  initialEntries: _optionalChain([opts, 'optionalAccess', _5 => _5.initialEntries]),
129
129
  initialIndex: _optionalChain([opts, 'optionalAccess', _6 => _6.initialIndex])
130
130
  }),
@@ -192,12 +192,12 @@ function RouterProvider({
192
192
  }
193
193
  });
194
194
  deletedFetchers.forEach((key) => fetcherData.current.delete(key));
195
- _chunkS2WJDCREjs.warnOnce.call(void 0,
195
+ _chunkBELBAVMBjs.warnOnce.call(void 0,
196
196
  flushSync === false || reactDomFlushSyncImpl != null,
197
197
  'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.'
198
198
  );
199
199
  let isViewTransitionAvailable = router.window != null && router.window.document != null && typeof router.window.document.startViewTransition === "function";
200
- _chunkS2WJDCREjs.warnOnce.call(void 0,
200
+ _chunkBELBAVMBjs.warnOnce.call(void 0,
201
201
  viewTransitionOpts == null || isViewTransitionAvailable,
202
202
  "You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."
203
203
  );
@@ -329,7 +329,7 @@ function RouterProvider({
329
329
  }),
330
330
  [router, navigator, basename, unstable_onError]
331
331
  );
332
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React.createElement(
332
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React.createElement(
333
333
  Router,
334
334
  {
335
335
  basename,
@@ -355,7 +355,7 @@ function DataRoutes({
355
355
  state,
356
356
  unstable_onError
357
357
  }) {
358
- return _chunkS2WJDCREjs.useRoutesImpl.call(void 0, routes, void 0, state, unstable_onError, future);
358
+ return _chunkBELBAVMBjs.useRoutesImpl.call(void 0, routes, void 0, state, unstable_onError, future);
359
359
  }
360
360
  function MemoryRouter({
361
361
  basename,
@@ -365,7 +365,7 @@ function MemoryRouter({
365
365
  }) {
366
366
  let historyRef = React.useRef();
367
367
  if (historyRef.current == null) {
368
- historyRef.current = _chunkS2WJDCREjs.createMemoryHistory.call(void 0, {
368
+ historyRef.current = _chunkBELBAVMBjs.createMemoryHistory.call(void 0, {
369
369
  initialEntries,
370
370
  initialIndex,
371
371
  v5Compat: true
@@ -400,23 +400,23 @@ function Navigate({
400
400
  state,
401
401
  relative
402
402
  }) {
403
- _chunkS2WJDCREjs.invariant.call(void 0,
404
- _chunkS2WJDCREjs.useInRouterContext.call(void 0, ),
403
+ _chunkBELBAVMBjs.invariant.call(void 0,
404
+ _chunkBELBAVMBjs.useInRouterContext.call(void 0, ),
405
405
  // TODO: This error is probably because they somehow have 2 versions of
406
406
  // the router loaded. We can help them understand how to avoid that.
407
407
  `<Navigate> may be used only in the context of a <Router> component.`
408
408
  );
409
- let { static: isStatic } = React.useContext(_chunkS2WJDCREjs.NavigationContext);
410
- _chunkS2WJDCREjs.warning.call(void 0,
409
+ let { static: isStatic } = React.useContext(_chunkBELBAVMBjs.NavigationContext);
410
+ _chunkBELBAVMBjs.warning.call(void 0,
411
411
  !isStatic,
412
412
  `<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`
413
413
  );
414
- let { matches } = React.useContext(_chunkS2WJDCREjs.RouteContext);
415
- let { pathname: locationPathname } = _chunkS2WJDCREjs.useLocation.call(void 0, );
416
- let navigate = _chunkS2WJDCREjs.useNavigate.call(void 0, );
417
- let path = _chunkS2WJDCREjs.resolveTo.call(void 0,
414
+ let { matches } = React.useContext(_chunkBELBAVMBjs.RouteContext);
415
+ let { pathname: locationPathname } = _chunkBELBAVMBjs.useLocation.call(void 0, );
416
+ let navigate = _chunkBELBAVMBjs.useNavigate.call(void 0, );
417
+ let path = _chunkBELBAVMBjs.resolveTo.call(void 0,
418
418
  to,
419
- _chunkS2WJDCREjs.getResolveToMatches.call(void 0, matches),
419
+ _chunkBELBAVMBjs.getResolveToMatches.call(void 0, matches),
420
420
  locationPathname,
421
421
  relative === "path"
422
422
  );
@@ -427,10 +427,10 @@ function Navigate({
427
427
  return null;
428
428
  }
429
429
  function Outlet(props) {
430
- return _chunkS2WJDCREjs.useOutlet.call(void 0, props.context);
430
+ return _chunkBELBAVMBjs.useOutlet.call(void 0, props.context);
431
431
  }
432
432
  function Route(props) {
433
- _chunkS2WJDCREjs.invariant.call(void 0,
433
+ _chunkBELBAVMBjs.invariant.call(void 0,
434
434
  false,
435
435
  `A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`
436
436
  );
@@ -443,8 +443,8 @@ function Router({
443
443
  navigator,
444
444
  static: staticProp = false
445
445
  }) {
446
- _chunkS2WJDCREjs.invariant.call(void 0,
447
- !_chunkS2WJDCREjs.useInRouterContext.call(void 0, ),
446
+ _chunkBELBAVMBjs.invariant.call(void 0,
447
+ !_chunkBELBAVMBjs.useInRouterContext.call(void 0, ),
448
448
  `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`
449
449
  );
450
450
  let basename = basenameProp.replace(/^\/*/, "/");
@@ -458,7 +458,7 @@ function Router({
458
458
  [basename, navigator, staticProp]
459
459
  );
460
460
  if (typeof locationProp === "string") {
461
- locationProp = _chunkS2WJDCREjs.parsePath.call(void 0, locationProp);
461
+ locationProp = _chunkBELBAVMBjs.parsePath.call(void 0, locationProp);
462
462
  }
463
463
  let {
464
464
  pathname = "/",
@@ -468,7 +468,7 @@ function Router({
468
468
  key = "default"
469
469
  } = locationProp;
470
470
  let locationContext = React.useMemo(() => {
471
- let trailingPathname = _chunkS2WJDCREjs.stripBasename.call(void 0, pathname, basename);
471
+ let trailingPathname = _chunkBELBAVMBjs.stripBasename.call(void 0, pathname, basename);
472
472
  if (trailingPathname == null) {
473
473
  return null;
474
474
  }
@@ -483,27 +483,27 @@ function Router({
483
483
  navigationType
484
484
  };
485
485
  }, [basename, pathname, search, hash, state, key, navigationType]);
486
- _chunkS2WJDCREjs.warning.call(void 0,
486
+ _chunkBELBAVMBjs.warning.call(void 0,
487
487
  locationContext != null,
488
488
  `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`
489
489
  );
490
490
  if (locationContext == null) {
491
491
  return null;
492
492
  }
493
- return /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.LocationContext.Provider, { children, value: locationContext }));
493
+ return /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.LocationContext.Provider, { children, value: locationContext }));
494
494
  }
495
495
  function Routes({
496
496
  children,
497
497
  location
498
498
  }) {
499
- return _chunkS2WJDCREjs.useRoutes.call(void 0, createRoutesFromChildren(children), location);
499
+ return _chunkBELBAVMBjs.useRoutes.call(void 0, createRoutesFromChildren(children), location);
500
500
  }
501
501
  function Await({
502
502
  children,
503
503
  errorElement,
504
504
  resolve
505
505
  }) {
506
- let dataRouterContext = React.useContext(_chunkS2WJDCREjs.DataRouterContext);
506
+ let dataRouterContext = React.useContext(_chunkBELBAVMBjs.DataRouterContext);
507
507
  return /* @__PURE__ */ React.createElement(
508
508
  AwaitErrorBoundary,
509
509
  {
@@ -567,10 +567,10 @@ var AwaitErrorBoundary = class extends React.Component {
567
567
  throw promise._error;
568
568
  }
569
569
  if (status === 2 /* error */) {
570
- return /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.AwaitContext.Provider, { value: promise, children: errorElement });
570
+ return /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.AwaitContext.Provider, { value: promise, children: errorElement });
571
571
  }
572
572
  if (status === 1 /* success */) {
573
- return /* @__PURE__ */ React.createElement(_chunkS2WJDCREjs.AwaitContext.Provider, { value: promise, children });
573
+ return /* @__PURE__ */ React.createElement(_chunkBELBAVMBjs.AwaitContext.Provider, { value: promise, children });
574
574
  }
575
575
  throw promise;
576
576
  }
@@ -578,7 +578,7 @@ var AwaitErrorBoundary = class extends React.Component {
578
578
  function ResolveAwait({
579
579
  children
580
580
  }) {
581
- let data = _chunkS2WJDCREjs.useAsyncValue.call(void 0, );
581
+ let data = _chunkBELBAVMBjs.useAsyncValue.call(void 0, );
582
582
  let toRender = typeof children === "function" ? children(data) : children;
583
583
  return /* @__PURE__ */ React.createElement(React.Fragment, null, toRender);
584
584
  }
@@ -596,11 +596,11 @@ function createRoutesFromChildren(children, parentPath = []) {
596
596
  );
597
597
  return;
598
598
  }
599
- _chunkS2WJDCREjs.invariant.call(void 0,
599
+ _chunkBELBAVMBjs.invariant.call(void 0,
600
600
  element.type === Route,
601
601
  `[${typeof element.type === "string" ? element.type : element.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`
602
602
  );
603
- _chunkS2WJDCREjs.invariant.call(void 0,
603
+ _chunkBELBAVMBjs.invariant.call(void 0,
604
604
  !element.props.index || !element.props.children,
605
605
  "An index route cannot have child routes."
606
606
  );
@@ -634,14 +634,14 @@ function createRoutesFromChildren(children, parentPath = []) {
634
634
  }
635
635
  var createRoutesFromElements = createRoutesFromChildren;
636
636
  function renderMatches(matches) {
637
- return _chunkS2WJDCREjs._renderMatches.call(void 0, matches);
637
+ return _chunkBELBAVMBjs._renderMatches.call(void 0, matches);
638
638
  }
639
639
  function useRouteComponentProps() {
640
640
  return {
641
- params: _chunkS2WJDCREjs.useParams.call(void 0, ),
642
- loaderData: _chunkS2WJDCREjs.useLoaderData.call(void 0, ),
643
- actionData: _chunkS2WJDCREjs.useActionData.call(void 0, ),
644
- matches: _chunkS2WJDCREjs.useMatches.call(void 0, )
641
+ params: _chunkBELBAVMBjs.useParams.call(void 0, ),
642
+ loaderData: _chunkBELBAVMBjs.useLoaderData.call(void 0, ),
643
+ actionData: _chunkBELBAVMBjs.useActionData.call(void 0, ),
644
+ matches: _chunkBELBAVMBjs.useMatches.call(void 0, )
645
645
  };
646
646
  }
647
647
  function WithComponentProps({
@@ -658,9 +658,9 @@ function withComponentProps(Component2) {
658
658
  }
659
659
  function useHydrateFallbackProps() {
660
660
  return {
661
- params: _chunkS2WJDCREjs.useParams.call(void 0, ),
662
- loaderData: _chunkS2WJDCREjs.useLoaderData.call(void 0, ),
663
- actionData: _chunkS2WJDCREjs.useActionData.call(void 0, )
661
+ params: _chunkBELBAVMBjs.useParams.call(void 0, ),
662
+ loaderData: _chunkBELBAVMBjs.useLoaderData.call(void 0, ),
663
+ actionData: _chunkBELBAVMBjs.useActionData.call(void 0, )
664
664
  };
665
665
  }
666
666
  function WithHydrateFallbackProps({
@@ -677,10 +677,10 @@ function withHydrateFallbackProps(HydrateFallback) {
677
677
  }
678
678
  function useErrorBoundaryProps() {
679
679
  return {
680
- params: _chunkS2WJDCREjs.useParams.call(void 0, ),
681
- loaderData: _chunkS2WJDCREjs.useLoaderData.call(void 0, ),
682
- actionData: _chunkS2WJDCREjs.useActionData.call(void 0, ),
683
- error: _chunkS2WJDCREjs.useRouteError.call(void 0, )
680
+ params: _chunkBELBAVMBjs.useParams.call(void 0, ),
681
+ loaderData: _chunkBELBAVMBjs.useLoaderData.call(void 0, ),
682
+ actionData: _chunkBELBAVMBjs.useActionData.call(void 0, ),
683
+ error: _chunkBELBAVMBjs.useRouteError.call(void 0, )
684
684
  };
685
685
  }
686
686
  function WithErrorBoundaryProps({
@@ -765,7 +765,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
765
765
  ]);
766
766
  function getFormEncType(encType) {
767
767
  if (encType != null && !supportedFormEncTypes.has(encType)) {
768
- _chunkS2WJDCREjs.warning.call(void 0,
768
+ _chunkBELBAVMBjs.warning.call(void 0,
769
769
  false,
770
770
  `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
771
771
  );
@@ -781,7 +781,7 @@ function getFormSubmissionInfo(target, basename) {
781
781
  let body;
782
782
  if (isFormElement(target)) {
783
783
  let attr = target.getAttribute("action");
784
- action = attr ? _chunkS2WJDCREjs.stripBasename.call(void 0, attr, basename) : null;
784
+ action = attr ? _chunkBELBAVMBjs.stripBasename.call(void 0, attr, basename) : null;
785
785
  method = target.getAttribute("method") || defaultMethod;
786
786
  encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
787
787
  formData = new FormData(target);
@@ -793,7 +793,7 @@ function getFormSubmissionInfo(target, basename) {
793
793
  );
794
794
  }
795
795
  let attr = target.getAttribute("formaction") || form.getAttribute("action");
796
- action = attr ? _chunkS2WJDCREjs.stripBasename.call(void 0, attr, basename) : null;
796
+ action = attr ? _chunkBELBAVMBjs.stripBasename.call(void 0, attr, basename) : null;
797
797
  method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
798
798
  encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
799
799
  formData = new FormData(form, target);
@@ -830,16 +830,16 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
830
830
  try {
831
831
  if (isBrowser) {
832
832
  window.__reactRouterVersion = // @ts-expect-error
833
- "0.0.0-experimental-3d7dcee";
833
+ "0.0.0-experimental-7ed11be";
834
834
  }
835
835
  } catch (e) {
836
836
  }
837
837
  function createBrowserRouter(routes, opts) {
838
- return _chunkS2WJDCREjs.createRouter.call(void 0, {
838
+ return _chunkBELBAVMBjs.createRouter.call(void 0, {
839
839
  basename: _optionalChain([opts, 'optionalAccess', _18 => _18.basename]),
840
840
  unstable_getContext: _optionalChain([opts, 'optionalAccess', _19 => _19.unstable_getContext]),
841
841
  future: _optionalChain([opts, 'optionalAccess', _20 => _20.future]),
842
- history: _chunkS2WJDCREjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _21 => _21.window]) }),
842
+ history: _chunkBELBAVMBjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _21 => _21.window]) }),
843
843
  hydrationData: _optionalChain([opts, 'optionalAccess', _22 => _22.hydrationData]) || parseHydrationData(),
844
844
  routes,
845
845
  mapRouteProperties,
@@ -850,11 +850,11 @@ function createBrowserRouter(routes, opts) {
850
850
  }).initialize();
851
851
  }
852
852
  function createHashRouter(routes, opts) {
853
- return _chunkS2WJDCREjs.createRouter.call(void 0, {
853
+ return _chunkBELBAVMBjs.createRouter.call(void 0, {
854
854
  basename: _optionalChain([opts, 'optionalAccess', _26 => _26.basename]),
855
855
  unstable_getContext: _optionalChain([opts, 'optionalAccess', _27 => _27.unstable_getContext]),
856
856
  future: _optionalChain([opts, 'optionalAccess', _28 => _28.future]),
857
- history: _chunkS2WJDCREjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _29 => _29.window]) }),
857
+ history: _chunkBELBAVMBjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _29 => _29.window]) }),
858
858
  hydrationData: _optionalChain([opts, 'optionalAccess', _30 => _30.hydrationData]) || parseHydrationData(),
859
859
  routes,
860
860
  mapRouteProperties,
@@ -880,7 +880,7 @@ function deserializeErrors(errors) {
880
880
  let serialized = {};
881
881
  for (let [key, val] of entries) {
882
882
  if (val && val.__type === "RouteErrorResponse") {
883
- serialized[key] = new (0, _chunkS2WJDCREjs.ErrorResponseImpl)(
883
+ serialized[key] = new (0, _chunkBELBAVMBjs.ErrorResponseImpl)(
884
884
  val.status,
885
885
  val.statusText,
886
886
  val.data,
@@ -916,7 +916,7 @@ function BrowserRouter({
916
916
  }) {
917
917
  let historyRef = React2.useRef();
918
918
  if (historyRef.current == null) {
919
- historyRef.current = _chunkS2WJDCREjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
919
+ historyRef.current = _chunkBELBAVMBjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
920
920
  }
921
921
  let history = historyRef.current;
922
922
  let [state, setStateImpl] = React2.useState({
@@ -944,7 +944,7 @@ function BrowserRouter({
944
944
  function HashRouter({ basename, children, window: window2 }) {
945
945
  let historyRef = React2.useRef();
946
946
  if (historyRef.current == null) {
947
- historyRef.current = _chunkS2WJDCREjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
947
+ historyRef.current = _chunkBELBAVMBjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
948
948
  }
949
949
  let history = historyRef.current;
950
950
  let [state, setStateImpl] = React2.useState({
@@ -1013,7 +1013,7 @@ var Link = React2.forwardRef(
1013
1013
  viewTransition,
1014
1014
  ...rest
1015
1015
  }, forwardedRef) {
1016
- let { basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1016
+ let { basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1017
1017
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
1018
1018
  let absoluteHref;
1019
1019
  let isExternal = false;
@@ -1023,22 +1023,22 @@ var Link = React2.forwardRef(
1023
1023
  try {
1024
1024
  let currentUrl = new URL(window.location.href);
1025
1025
  let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
1026
- let path = _chunkS2WJDCREjs.stripBasename.call(void 0, targetUrl.pathname, basename);
1026
+ let path = _chunkBELBAVMBjs.stripBasename.call(void 0, targetUrl.pathname, basename);
1027
1027
  if (targetUrl.origin === currentUrl.origin && path != null) {
1028
1028
  to = path + targetUrl.search + targetUrl.hash;
1029
1029
  } else {
1030
1030
  isExternal = true;
1031
1031
  }
1032
1032
  } catch (e) {
1033
- _chunkS2WJDCREjs.warning.call(void 0,
1033
+ _chunkBELBAVMBjs.warning.call(void 0,
1034
1034
  false,
1035
1035
  `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1036
1036
  );
1037
1037
  }
1038
1038
  }
1039
1039
  }
1040
- let href = _chunkS2WJDCREjs.useHref.call(void 0, to, { relative });
1041
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkS2WJDCREjs.usePrefetchBehavior.call(void 0,
1040
+ let href = _chunkBELBAVMBjs.useHref.call(void 0, to, { relative });
1041
+ let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkBELBAVMBjs.usePrefetchBehavior.call(void 0,
1042
1042
  prefetch,
1043
1043
  rest
1044
1044
  );
@@ -1065,13 +1065,13 @@ var Link = React2.forwardRef(
1065
1065
  ...prefetchHandlers,
1066
1066
  href: absoluteHref || href,
1067
1067
  onClick: isExternal || reloadDocument ? onClick : handleClick,
1068
- ref: _chunkS2WJDCREjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
1068
+ ref: _chunkBELBAVMBjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
1069
1069
  target,
1070
1070
  "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
1071
1071
  }
1072
1072
  )
1073
1073
  );
1074
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React2.createElement(React2.Fragment, null, link, /* @__PURE__ */ React2.createElement(_chunkS2WJDCREjs.PrefetchPageLinks, { page: href })) : link;
1074
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React2.createElement(React2.Fragment, null, link, /* @__PURE__ */ React2.createElement(_chunkBELBAVMBjs.PrefetchPageLinks, { page: href })) : link;
1075
1075
  }
1076
1076
  );
1077
1077
  Link.displayName = "Link";
@@ -1087,10 +1087,10 @@ var NavLink = React2.forwardRef(
1087
1087
  children,
1088
1088
  ...rest
1089
1089
  }, ref) {
1090
- let path = _chunkS2WJDCREjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
1091
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1092
- let routerState = React2.useContext(_chunkS2WJDCREjs.DataRouterStateContext);
1093
- let { navigator, basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1090
+ let path = _chunkBELBAVMBjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
1091
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1092
+ let routerState = React2.useContext(_chunkBELBAVMBjs.DataRouterStateContext);
1093
+ let { navigator, basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1094
1094
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
1095
1095
  // eslint-disable-next-line react-hooks/rules-of-hooks
1096
1096
  useViewTransitionState(path) && viewTransition === true;
@@ -1103,7 +1103,7 @@ var NavLink = React2.forwardRef(
1103
1103
  toPathname = toPathname.toLowerCase();
1104
1104
  }
1105
1105
  if (nextLocationPathname && basename) {
1106
- nextLocationPathname = _chunkS2WJDCREjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
1106
+ nextLocationPathname = _chunkBELBAVMBjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
1107
1107
  }
1108
1108
  const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
1109
1109
  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
@@ -1198,10 +1198,10 @@ function ScrollRestoration({
1198
1198
  storageKey,
1199
1199
  ...props
1200
1200
  }) {
1201
- let remixContext = React2.useContext(_chunkS2WJDCREjs.FrameworkContext);
1202
- let { basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1203
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1204
- let matches = _chunkS2WJDCREjs.useMatches.call(void 0, );
1201
+ let remixContext = React2.useContext(_chunkBELBAVMBjs.FrameworkContext);
1202
+ let { basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1203
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1204
+ let matches = _chunkBELBAVMBjs.useMatches.call(void 0, );
1205
1205
  useScrollRestoration({ getKey, storageKey });
1206
1206
  let ssrKey = React2.useMemo(
1207
1207
  () => {
@@ -1255,13 +1255,13 @@ function getDataRouterConsoleError(hookName) {
1255
1255
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1256
1256
  }
1257
1257
  function useDataRouterContext(hookName) {
1258
- let ctx = React2.useContext(_chunkS2WJDCREjs.DataRouterContext);
1259
- _chunkS2WJDCREjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
1258
+ let ctx = React2.useContext(_chunkBELBAVMBjs.DataRouterContext);
1259
+ _chunkBELBAVMBjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
1260
1260
  return ctx;
1261
1261
  }
1262
1262
  function useDataRouterState(hookName) {
1263
- let state = React2.useContext(_chunkS2WJDCREjs.DataRouterStateContext);
1264
- _chunkS2WJDCREjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
1263
+ let state = React2.useContext(_chunkBELBAVMBjs.DataRouterStateContext);
1264
+ _chunkBELBAVMBjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
1265
1265
  return state;
1266
1266
  }
1267
1267
  function useLinkClickHandler(to, {
@@ -1272,14 +1272,14 @@ function useLinkClickHandler(to, {
1272
1272
  relative,
1273
1273
  viewTransition
1274
1274
  } = {}) {
1275
- let navigate = _chunkS2WJDCREjs.useNavigate.call(void 0, );
1276
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1277
- let path = _chunkS2WJDCREjs.useResolvedPath.call(void 0, to, { relative });
1275
+ let navigate = _chunkBELBAVMBjs.useNavigate.call(void 0, );
1276
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1277
+ let path = _chunkBELBAVMBjs.useResolvedPath.call(void 0, to, { relative });
1278
1278
  return React2.useCallback(
1279
1279
  (event) => {
1280
1280
  if (shouldProcessLinkClick(event, target)) {
1281
1281
  event.preventDefault();
1282
- let replace = replaceProp !== void 0 ? replaceProp : _chunkS2WJDCREjs.createPath.call(void 0, location) === _chunkS2WJDCREjs.createPath.call(void 0, path);
1282
+ let replace = replaceProp !== void 0 ? replaceProp : _chunkBELBAVMBjs.createPath.call(void 0, location) === _chunkBELBAVMBjs.createPath.call(void 0, path);
1283
1283
  navigate(to, {
1284
1284
  replace,
1285
1285
  state,
@@ -1304,13 +1304,13 @@ function useLinkClickHandler(to, {
1304
1304
  );
1305
1305
  }
1306
1306
  function useSearchParams(defaultInit) {
1307
- _chunkS2WJDCREjs.warning.call(void 0,
1307
+ _chunkBELBAVMBjs.warning.call(void 0,
1308
1308
  typeof URLSearchParams !== "undefined",
1309
1309
  `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.`
1310
1310
  );
1311
1311
  let defaultSearchParamsRef = React2.useRef(createSearchParams(defaultInit));
1312
1312
  let hasSetSearchParamsRef = React2.useRef(false);
1313
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1313
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1314
1314
  let searchParams = React2.useMemo(
1315
1315
  () => (
1316
1316
  // Only merge in the defaults if we haven't yet called setSearchParams.
@@ -1323,7 +1323,7 @@ function useSearchParams(defaultInit) {
1323
1323
  ),
1324
1324
  [location.search]
1325
1325
  );
1326
- let navigate = _chunkS2WJDCREjs.useNavigate.call(void 0, );
1326
+ let navigate = _chunkBELBAVMBjs.useNavigate.call(void 0, );
1327
1327
  let setSearchParams = React2.useCallback(
1328
1328
  (nextInit, navigateOptions) => {
1329
1329
  const newSearchParams = createSearchParams(
@@ -1340,8 +1340,8 @@ var fetcherId = 0;
1340
1340
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
1341
1341
  function useSubmit() {
1342
1342
  let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
1343
- let { basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1344
- let currentRouteId = _chunkS2WJDCREjs.useRouteId.call(void 0, );
1343
+ let { basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1344
+ let currentRouteId = _chunkBELBAVMBjs.useRouteId.call(void 0, );
1345
1345
  return React2.useCallback(
1346
1346
  async (target, options = {}) => {
1347
1347
  let { action, method, encType, formData, body } = getFormSubmissionInfo(
@@ -1377,12 +1377,12 @@ function useSubmit() {
1377
1377
  );
1378
1378
  }
1379
1379
  function useFormAction(action, { relative } = {}) {
1380
- let { basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1381
- let routeContext = React2.useContext(_chunkS2WJDCREjs.RouteContext);
1382
- _chunkS2WJDCREjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
1380
+ let { basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1381
+ let routeContext = React2.useContext(_chunkBELBAVMBjs.RouteContext);
1382
+ _chunkBELBAVMBjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
1383
1383
  let [match] = routeContext.matches.slice(-1);
1384
- let path = { ..._chunkS2WJDCREjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
1385
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1384
+ let path = { ..._chunkBELBAVMBjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
1385
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1386
1386
  if (action == null) {
1387
1387
  path.search = location.search;
1388
1388
  let params = new URLSearchParams(path.search);
@@ -1399,21 +1399,21 @@ function useFormAction(action, { relative } = {}) {
1399
1399
  path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
1400
1400
  }
1401
1401
  if (basename !== "/") {
1402
- path.pathname = path.pathname === "/" ? basename : _chunkS2WJDCREjs.joinPaths.call(void 0, [basename, path.pathname]);
1402
+ path.pathname = path.pathname === "/" ? basename : _chunkBELBAVMBjs.joinPaths.call(void 0, [basename, path.pathname]);
1403
1403
  }
1404
- return _chunkS2WJDCREjs.createPath.call(void 0, path);
1404
+ return _chunkBELBAVMBjs.createPath.call(void 0, path);
1405
1405
  }
1406
1406
  function useFetcher({
1407
1407
  key
1408
1408
  } = {}) {
1409
1409
  let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
1410
1410
  let state = useDataRouterState("useFetcher" /* UseFetcher */);
1411
- let fetcherData = React2.useContext(_chunkS2WJDCREjs.FetchersContext);
1412
- let route = React2.useContext(_chunkS2WJDCREjs.RouteContext);
1411
+ let fetcherData = React2.useContext(_chunkBELBAVMBjs.FetchersContext);
1412
+ let route = React2.useContext(_chunkBELBAVMBjs.RouteContext);
1413
1413
  let routeId = _optionalChain([route, 'access', _37 => _37.matches, 'access', _38 => _38[route.matches.length - 1], 'optionalAccess', _39 => _39.route, 'access', _40 => _40.id]);
1414
- _chunkS2WJDCREjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
1415
- _chunkS2WJDCREjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
1416
- _chunkS2WJDCREjs.invariant.call(void 0,
1414
+ _chunkBELBAVMBjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
1415
+ _chunkBELBAVMBjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
1416
+ _chunkBELBAVMBjs.invariant.call(void 0,
1417
1417
  routeId != null,
1418
1418
  `useFetcher can only be used on routes that contain a unique "id"`
1419
1419
  );
@@ -1428,7 +1428,7 @@ function useFetcher({
1428
1428
  }, [router, fetcherKey]);
1429
1429
  let load = React2.useCallback(
1430
1430
  async (href, opts) => {
1431
- _chunkS2WJDCREjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
1431
+ _chunkBELBAVMBjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
1432
1432
  await router.fetch(fetcherKey, routeId, href, opts);
1433
1433
  },
1434
1434
  [fetcherKey, routeId, router]
@@ -1444,6 +1444,7 @@ function useFetcher({
1444
1444
  },
1445
1445
  [fetcherKey, submitImpl]
1446
1446
  );
1447
+ let unstable_reset = React2.useCallback((opts) => router.resetFetcher(fetcherKey, opts), [router, fetcherKey]);
1447
1448
  let FetcherForm = React2.useMemo(() => {
1448
1449
  let FetcherForm2 = React2.forwardRef(
1449
1450
  (props, ref) => {
@@ -1453,17 +1454,18 @@ function useFetcher({
1453
1454
  FetcherForm2.displayName = "fetcher.Form";
1454
1455
  return FetcherForm2;
1455
1456
  }, [fetcherKey]);
1456
- let fetcher = state.fetchers.get(fetcherKey) || _chunkS2WJDCREjs.IDLE_FETCHER;
1457
+ let fetcher = state.fetchers.get(fetcherKey) || _chunkBELBAVMBjs.IDLE_FETCHER;
1457
1458
  let data = fetcherData.get(fetcherKey);
1458
1459
  let fetcherWithComponents = React2.useMemo(
1459
1460
  () => ({
1460
1461
  Form: FetcherForm,
1461
1462
  submit,
1462
1463
  load,
1464
+ unstable_reset,
1463
1465
  ...fetcher,
1464
1466
  data
1465
1467
  }),
1466
- [FetcherForm, submit, load, fetcher, data]
1468
+ [FetcherForm, submit, load, unstable_reset, fetcher, data]
1467
1469
  );
1468
1470
  return fetcherWithComponents;
1469
1471
  }
@@ -1483,7 +1485,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
1483
1485
  key = getKey(
1484
1486
  {
1485
1487
  ...location,
1486
- pathname: _chunkS2WJDCREjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
1488
+ pathname: _chunkBELBAVMBjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
1487
1489
  },
1488
1490
  matches
1489
1491
  );
@@ -1504,10 +1506,10 @@ function useScrollRestoration({
1504
1506
  let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
1505
1507
  "useScrollRestoration" /* UseScrollRestoration */
1506
1508
  );
1507
- let { basename } = React2.useContext(_chunkS2WJDCREjs.NavigationContext);
1508
- let location = _chunkS2WJDCREjs.useLocation.call(void 0, );
1509
- let matches = _chunkS2WJDCREjs.useMatches.call(void 0, );
1510
- let navigation = _chunkS2WJDCREjs.useNavigation.call(void 0, );
1509
+ let { basename } = React2.useContext(_chunkBELBAVMBjs.NavigationContext);
1510
+ let location = _chunkBELBAVMBjs.useLocation.call(void 0, );
1511
+ let matches = _chunkBELBAVMBjs.useMatches.call(void 0, );
1512
+ let navigation = _chunkBELBAVMBjs.useNavigation.call(void 0, );
1511
1513
  React2.useEffect(() => {
1512
1514
  window.history.scrollRestoration = "manual";
1513
1515
  return () => {
@@ -1526,7 +1528,7 @@ function useScrollRestoration({
1526
1528
  JSON.stringify(savedScrollPositions)
1527
1529
  );
1528
1530
  } catch (error) {
1529
- _chunkS2WJDCREjs.warning.call(void 0,
1531
+ _chunkBELBAVMBjs.warning.call(void 0,
1530
1532
  false,
1531
1533
  `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
1532
1534
  );
@@ -1573,7 +1575,7 @@ function useScrollRestoration({
1573
1575
  }
1574
1576
  }
1575
1577
  } catch (e2) {
1576
- _chunkS2WJDCREjs.warning.call(void 0,
1578
+ _chunkBELBAVMBjs.warning.call(void 0,
1577
1579
  false,
1578
1580
  `"${location.hash.slice(
1579
1581
  1
@@ -1611,7 +1613,7 @@ function usePrompt({
1611
1613
  when,
1612
1614
  message
1613
1615
  }) {
1614
- let blocker = _chunkS2WJDCREjs.useBlocker.call(void 0, when);
1616
+ let blocker = _chunkBELBAVMBjs.useBlocker.call(void 0, when);
1615
1617
  React2.useEffect(() => {
1616
1618
  if (blocker.state === "blocked") {
1617
1619
  let proceed = window.confirm(message);
@@ -1629,21 +1631,21 @@ function usePrompt({
1629
1631
  }, [blocker, when]);
1630
1632
  }
1631
1633
  function useViewTransitionState(to, { relative } = {}) {
1632
- let vtContext = React2.useContext(_chunkS2WJDCREjs.ViewTransitionContext);
1633
- _chunkS2WJDCREjs.invariant.call(void 0,
1634
+ let vtContext = React2.useContext(_chunkBELBAVMBjs.ViewTransitionContext);
1635
+ _chunkBELBAVMBjs.invariant.call(void 0,
1634
1636
  vtContext != null,
1635
1637
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1636
1638
  );
1637
1639
  let { basename } = useDataRouterContext(
1638
1640
  "useViewTransitionState" /* useViewTransitionState */
1639
1641
  );
1640
- let path = _chunkS2WJDCREjs.useResolvedPath.call(void 0, to, { relative });
1642
+ let path = _chunkBELBAVMBjs.useResolvedPath.call(void 0, to, { relative });
1641
1643
  if (!vtContext.isTransitioning) {
1642
1644
  return false;
1643
1645
  }
1644
- let currentPath = _chunkS2WJDCREjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1645
- let nextPath = _chunkS2WJDCREjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1646
- return _chunkS2WJDCREjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkS2WJDCREjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1646
+ let currentPath = _chunkBELBAVMBjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1647
+ let nextPath = _chunkBELBAVMBjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1648
+ return _chunkBELBAVMBjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkBELBAVMBjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1647
1649
  }
1648
1650
 
1649
1651
  // lib/dom/server.tsx
@@ -1654,7 +1656,7 @@ function StaticRouter({
1654
1656
  location: locationProp = "/"
1655
1657
  }) {
1656
1658
  if (typeof locationProp === "string") {
1657
- locationProp = _chunkS2WJDCREjs.parsePath.call(void 0, locationProp);
1659
+ locationProp = _chunkBELBAVMBjs.parsePath.call(void 0, locationProp);
1658
1660
  }
1659
1661
  let action = "POP" /* Pop */;
1660
1662
  let location = {
@@ -1683,7 +1685,7 @@ function StaticRouterProvider({
1683
1685
  hydrate = true,
1684
1686
  nonce
1685
1687
  }) {
1686
- _chunkS2WJDCREjs.invariant.call(void 0,
1688
+ _chunkBELBAVMBjs.invariant.call(void 0,
1687
1689
  router && context,
1688
1690
  "You must provide `router` and `context` to <StaticRouterProvider>"
1689
1691
  );
@@ -1706,7 +1708,7 @@ function StaticRouterProvider({
1706
1708
  hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
1707
1709
  }
1708
1710
  let { state } = dataRouterContext.router;
1709
- return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(_chunkS2WJDCREjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React3.createElement(_chunkS2WJDCREjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React3.createElement(_chunkS2WJDCREjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React3.createElement(_chunkS2WJDCREjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React3.createElement(
1711
+ return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(_chunkBELBAVMBjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React3.createElement(_chunkBELBAVMBjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React3.createElement(_chunkBELBAVMBjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React3.createElement(_chunkBELBAVMBjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React3.createElement(
1710
1712
  Router,
1711
1713
  {
1712
1714
  basename: dataRouterContext.basename,
@@ -1737,14 +1739,14 @@ function DataRoutes2({
1737
1739
  future,
1738
1740
  state
1739
1741
  }) {
1740
- return _chunkS2WJDCREjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1742
+ return _chunkBELBAVMBjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1741
1743
  }
1742
1744
  function serializeErrors(errors) {
1743
1745
  if (!errors) return null;
1744
1746
  let entries = Object.entries(errors);
1745
1747
  let serialized = {};
1746
1748
  for (let [key, val] of entries) {
1747
- if (_chunkS2WJDCREjs.isRouteErrorResponse.call(void 0, val)) {
1749
+ if (_chunkBELBAVMBjs.isRouteErrorResponse.call(void 0, val)) {
1748
1750
  serialized[key] = { ...val, __type: "RouteErrorResponse" };
1749
1751
  } else if (val instanceof Error) {
1750
1752
  serialized[key] = {
@@ -1794,14 +1796,14 @@ function getStatelessNavigator() {
1794
1796
  };
1795
1797
  }
1796
1798
  function createStaticHandler2(routes, opts) {
1797
- return _chunkS2WJDCREjs.createStaticHandler.call(void 0, routes, {
1799
+ return _chunkBELBAVMBjs.createStaticHandler.call(void 0, routes, {
1798
1800
  ...opts,
1799
1801
  mapRouteProperties
1800
1802
  });
1801
1803
  }
1802
1804
  function createStaticRouter(routes, context, opts = {}) {
1803
1805
  let manifest = {};
1804
- let dataRoutes = _chunkS2WJDCREjs.convertRoutesToDataRoutes.call(void 0,
1806
+ let dataRoutes = _chunkBELBAVMBjs.convertRoutesToDataRoutes.call(void 0,
1805
1807
  routes,
1806
1808
  mapRouteProperties,
1807
1809
  void 0,
@@ -1834,7 +1836,7 @@ function createStaticRouter(routes, context, opts = {}) {
1834
1836
  actionData: context.actionData,
1835
1837
  errors: context.errors,
1836
1838
  initialized: true,
1837
- navigation: _chunkS2WJDCREjs.IDLE_NAVIGATION,
1839
+ navigation: _chunkBELBAVMBjs.IDLE_NAVIGATION,
1838
1840
  restoreScrollPosition: null,
1839
1841
  preventScrollReset: false,
1840
1842
  revalidation: "idle",
@@ -1869,16 +1871,19 @@ function createStaticRouter(routes, context, opts = {}) {
1869
1871
  createHref,
1870
1872
  encodeLocation,
1871
1873
  getFetcher() {
1872
- return _chunkS2WJDCREjs.IDLE_FETCHER;
1874
+ return _chunkBELBAVMBjs.IDLE_FETCHER;
1873
1875
  },
1874
1876
  deleteFetcher() {
1875
1877
  throw msg("deleteFetcher");
1876
1878
  },
1879
+ resetFetcher() {
1880
+ throw msg("resetFetcher");
1881
+ },
1877
1882
  dispose() {
1878
1883
  throw msg("dispose");
1879
1884
  },
1880
1885
  getBlocker() {
1881
- return _chunkS2WJDCREjs.IDLE_BLOCKER;
1886
+ return _chunkBELBAVMBjs.IDLE_BLOCKER;
1882
1887
  },
1883
1888
  deleteBlocker() {
1884
1889
  throw msg("deleteBlocker");
@@ -1896,10 +1901,10 @@ function createStaticRouter(routes, context, opts = {}) {
1896
1901
  };
1897
1902
  }
1898
1903
  function createHref(to) {
1899
- return typeof to === "string" ? to : _chunkS2WJDCREjs.createPath.call(void 0, to);
1904
+ return typeof to === "string" ? to : _chunkBELBAVMBjs.createPath.call(void 0, to);
1900
1905
  }
1901
1906
  function encodeLocation(to) {
1902
- let href = typeof to === "string" ? to : _chunkS2WJDCREjs.createPath.call(void 0, to);
1907
+ let href = typeof to === "string" ? to : _chunkBELBAVMBjs.createPath.call(void 0, to);
1903
1908
  href = href.replace(/ $/, "%20");
1904
1909
  let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
1905
1910
  return {