react-router 0.0.0-experimental-de3b900 → 0.0.0-experimental-adadca553

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 (67) hide show
  1. package/dist/development/{browser-B4aBBnx8.d.ts → browser-CWeFYLCt.d.ts} +1 -1
  2. package/dist/development/{browser-CN2w9Cbu.d.mts → browser-wBhSIKjY.d.mts} +1 -1
  3. package/dist/{production/chunk-VX4OHTGR.js → development/chunk-2CN766OV.js} +108 -106
  4. package/dist/{production/chunk-XOCFS75J.mjs → development/chunk-CEBZ5WT7.mjs} +67 -51
  5. package/dist/development/{chunk-UPBUMW2M.js → chunk-TWREBY44.js} +7 -7
  6. package/dist/development/{chunk-OVO62ONG.mjs → chunk-V6OINOS3.mjs} +362 -20
  7. package/dist/development/{chunk-K3XLKYJI.js → chunk-WUKWGNN4.js} +418 -78
  8. package/dist/development/dom-export.d.mts +57 -5
  9. package/dist/development/dom-export.d.ts +57 -5
  10. package/dist/development/dom-export.js +31 -28
  11. package/dist/development/dom-export.mjs +8 -5
  12. package/dist/{production/index-react-server-client-BOJoTiaG.d.ts → development/index-react-server-client-hYy5IQSr.d.ts} +136 -76
  13. package/dist/development/{index-react-server-client-BOJoTiaG.d.ts → index-react-server-client-xJT30_vC.d.mts} +136 -76
  14. package/dist/development/index-react-server-client.d.mts +2 -2
  15. package/dist/development/index-react-server-client.d.ts +2 -2
  16. package/dist/development/index-react-server-client.js +4 -4
  17. package/dist/development/index-react-server-client.mjs +2 -2
  18. package/dist/development/index-react-server.d.mts +105 -1
  19. package/dist/development/index-react-server.d.ts +105 -1
  20. package/dist/development/index-react-server.js +234 -9
  21. package/dist/development/index-react-server.mjs +234 -9
  22. package/dist/development/index.d.mts +12 -12
  23. package/dist/development/index.d.ts +12 -12
  24. package/dist/development/index.js +140 -124
  25. package/dist/development/index.mjs +3 -3
  26. package/dist/{production/routeModules-9wlxglVk.d.ts → development/instrumentation-ETNw0ynY.d.ts} +171 -22
  27. package/dist/development/lib/types/internal.d.mts +2 -2
  28. package/dist/development/lib/types/internal.d.ts +2 -2
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/development/{register-BblEgJPm.d.mts → register-DQp680kY.d.mts} +1 -1
  32. package/dist/development/{register-D18raRVf.d.ts → register-DutVu2fW.d.ts} +1 -1
  33. package/dist/{production/route-data-nQS6GSUI.d.mts → development/router-BDnKbSrG.d.mts} +1790 -1641
  34. package/dist/production/{browser-B4aBBnx8.d.ts → browser-CWeFYLCt.d.ts} +1 -1
  35. package/dist/production/{browser-CN2w9Cbu.d.mts → browser-wBhSIKjY.d.mts} +1 -1
  36. package/dist/{development/chunk-5VDQAMOM.mjs → production/chunk-BLNEPWVP.mjs} +67 -51
  37. package/dist/production/{chunk-63YB5VLY.js → chunk-CGXINWWB.js} +418 -78
  38. package/dist/production/{chunk-U25H5FTL.mjs → chunk-EFJ4E27N.mjs} +362 -20
  39. package/dist/production/{chunk-IE722GR6.js → chunk-F5P46TDG.js} +7 -7
  40. package/dist/{development/chunk-JEIV2ESS.js → production/chunk-K6NVPFRL.js} +108 -106
  41. package/dist/production/dom-export.d.mts +57 -5
  42. package/dist/production/dom-export.d.ts +57 -5
  43. package/dist/production/dom-export.js +31 -28
  44. package/dist/production/dom-export.mjs +8 -5
  45. package/dist/production/{index-react-server-client-CuQLmpku.d.mts → index-react-server-client-hYy5IQSr.d.ts} +136 -76
  46. package/dist/{development/index-react-server-client-CuQLmpku.d.mts → production/index-react-server-client-xJT30_vC.d.mts} +136 -76
  47. package/dist/production/index-react-server-client.d.mts +2 -2
  48. package/dist/production/index-react-server-client.d.ts +2 -2
  49. package/dist/production/index-react-server-client.js +4 -4
  50. package/dist/production/index-react-server-client.mjs +2 -2
  51. package/dist/production/index-react-server.d.mts +105 -1
  52. package/dist/production/index-react-server.d.ts +105 -1
  53. package/dist/production/index-react-server.js +234 -9
  54. package/dist/production/index-react-server.mjs +234 -9
  55. package/dist/production/index.d.mts +12 -12
  56. package/dist/production/index.d.ts +12 -12
  57. package/dist/production/index.js +140 -124
  58. package/dist/production/index.mjs +3 -3
  59. package/dist/{development/routeModules-9wlxglVk.d.ts → production/instrumentation-ETNw0ynY.d.ts} +171 -22
  60. package/dist/production/lib/types/internal.d.mts +2 -2
  61. package/dist/production/lib/types/internal.d.ts +2 -2
  62. package/dist/production/lib/types/internal.js +1 -1
  63. package/dist/production/lib/types/internal.mjs +1 -1
  64. package/dist/production/{register-BblEgJPm.d.mts → register-DQp680kY.d.mts} +1 -1
  65. package/dist/production/{register-D18raRVf.d.ts → register-DutVu2fW.d.ts} +1 -1
  66. package/dist/{development/route-data-nQS6GSUI.d.mts → production/router-BDnKbSrG.d.mts} +1790 -1641
  67. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './routeModules-9wlxglVk.js';
2
+ import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './instrumentation-ETNw0ynY.js';
3
3
 
4
4
  type RSCRouteConfigEntryBase = {
5
5
  action?: ActionFunction;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './route-data-nQS6GSUI.mjs';
2
+ import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction, e as RouterInit } from './router-BDnKbSrG.mjs';
3
3
 
4
4
  type RSCRouteConfigEntryBase = {
5
5
  action?: ActionFunction;
@@ -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-de3b900
2
+ * react-router v0.0.0-experimental-adadca553
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -48,7 +48,7 @@
48
48
 
49
49
 
50
50
 
51
- var _chunk63YB5VLYjs = require('./chunk-63YB5VLY.js');
51
+ var _chunkWUKWGNN4js = require('./chunk-WUKWGNN4.js');
52
52
 
53
53
  // lib/dom/dom.ts
54
54
  var defaultMethod = "get";
@@ -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
- _chunk63YB5VLYjs.warning.call(void 0,
122
+ _chunkWUKWGNN4js.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 ? _chunk63YB5VLYjs.stripBasename.call(void 0, attr, basename) : null;
138
+ action = attr ? _chunkWUKWGNN4js.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 ? _chunk63YB5VLYjs.stripBasename.call(void 0, attr, basename) : null;
150
+ action = attr ? _chunkWUKWGNN4js.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,42 +184,44 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
184
184
  try {
185
185
  if (isBrowser) {
186
186
  window.__reactRouterVersion = // @ts-expect-error
187
- "0.0.0-experimental-de3b900";
187
+ "0.0.0-experimental-adadca553";
188
188
  }
189
189
  } catch (e) {
190
190
  }
191
191
  function createBrowserRouter(routes, opts) {
192
- return _chunk63YB5VLYjs.createRouter.call(void 0, {
192
+ return _chunkWUKWGNN4js.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: _chunk63YB5VLYjs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
196
+ history: _chunkWUKWGNN4js.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: _chunk63YB5VLYjs.mapRouteProperties,
200
- hydrationRouteProperties: _chunk63YB5VLYjs.hydrationRouteProperties,
199
+ mapRouteProperties: _chunkWUKWGNN4js.mapRouteProperties,
200
+ hydrationRouteProperties: _chunkWUKWGNN4js.hydrationRouteProperties,
201
201
  dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
202
202
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
203
- window: _optionalChain([opts, 'optionalAccess', _9 => _9.window])
203
+ window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
204
+ unstable_instrumentations: _optionalChain([opts, 'optionalAccess', _10 => _10.unstable_instrumentations])
204
205
  }).initialize();
205
206
  }
206
207
  function createHashRouter(routes, opts) {
207
- return _chunk63YB5VLYjs.createRouter.call(void 0, {
208
- basename: _optionalChain([opts, 'optionalAccess', _10 => _10.basename]),
209
- getContext: _optionalChain([opts, 'optionalAccess', _11 => _11.getContext]),
210
- future: _optionalChain([opts, 'optionalAccess', _12 => _12.future]),
211
- history: _chunk63YB5VLYjs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _13 => _13.window]) }),
212
- hydrationData: _optionalChain([opts, 'optionalAccess', _14 => _14.hydrationData]) || parseHydrationData(),
208
+ return _chunkWUKWGNN4js.createRouter.call(void 0, {
209
+ basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
210
+ getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
211
+ future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
212
+ history: _chunkWUKWGNN4js.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
213
+ hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
213
214
  routes,
214
- mapRouteProperties: _chunk63YB5VLYjs.mapRouteProperties,
215
- hydrationRouteProperties: _chunk63YB5VLYjs.hydrationRouteProperties,
216
- dataStrategy: _optionalChain([opts, 'optionalAccess', _15 => _15.dataStrategy]),
217
- patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _16 => _16.patchRoutesOnNavigation]),
218
- window: _optionalChain([opts, 'optionalAccess', _17 => _17.window])
215
+ mapRouteProperties: _chunkWUKWGNN4js.mapRouteProperties,
216
+ hydrationRouteProperties: _chunkWUKWGNN4js.hydrationRouteProperties,
217
+ dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
218
+ patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
219
+ window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
220
+ unstable_instrumentations: _optionalChain([opts, 'optionalAccess', _19 => _19.unstable_instrumentations])
219
221
  }).initialize();
220
222
  }
221
223
  function parseHydrationData() {
222
- let state = _optionalChain([window, 'optionalAccess', _18 => _18.__staticRouterHydrationData]);
224
+ let state = _optionalChain([window, 'optionalAccess', _20 => _20.__staticRouterHydrationData]);
223
225
  if (state && state.errors) {
224
226
  state = {
225
227
  ...state,
@@ -234,7 +236,7 @@ function deserializeErrors(errors) {
234
236
  let serialized = {};
235
237
  for (let [key, val] of entries) {
236
238
  if (val && val.__type === "RouteErrorResponse") {
237
- serialized[key] = new (0, _chunk63YB5VLYjs.ErrorResponseImpl)(
239
+ serialized[key] = new (0, _chunkWUKWGNN4js.ErrorResponseImpl)(
238
240
  val.status,
239
241
  val.statusText,
240
242
  val.data,
@@ -270,7 +272,7 @@ function BrowserRouter({
270
272
  }) {
271
273
  let historyRef = React.useRef();
272
274
  if (historyRef.current == null) {
273
- historyRef.current = _chunk63YB5VLYjs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
275
+ historyRef.current = _chunkWUKWGNN4js.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
274
276
  }
275
277
  let history = historyRef.current;
276
278
  let [state, setStateImpl] = React.useState({
@@ -285,7 +287,7 @@ function BrowserRouter({
285
287
  );
286
288
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
287
289
  return /* @__PURE__ */ React.createElement(
288
- _chunk63YB5VLYjs.Router,
290
+ _chunkWUKWGNN4js.Router,
289
291
  {
290
292
  basename,
291
293
  children,
@@ -298,7 +300,7 @@ function BrowserRouter({
298
300
  function HashRouter({ basename, children, window: window2 }) {
299
301
  let historyRef = React.useRef();
300
302
  if (historyRef.current == null) {
301
- historyRef.current = _chunk63YB5VLYjs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
303
+ historyRef.current = _chunkWUKWGNN4js.createHashHistory.call(void 0, { window: window2, v5Compat: true });
302
304
  }
303
305
  let history = historyRef.current;
304
306
  let [state, setStateImpl] = React.useState({
@@ -313,7 +315,7 @@ function HashRouter({ basename, children, window: window2 }) {
313
315
  );
314
316
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
315
317
  return /* @__PURE__ */ React.createElement(
316
- _chunk63YB5VLYjs.Router,
318
+ _chunkWUKWGNN4js.Router,
317
319
  {
318
320
  basename,
319
321
  children,
@@ -340,7 +342,7 @@ function HistoryRouter({
340
342
  );
341
343
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
342
344
  return /* @__PURE__ */ React.createElement(
343
- _chunk63YB5VLYjs.Router,
345
+ _chunkWUKWGNN4js.Router,
344
346
  {
345
347
  basename,
346
348
  children,
@@ -367,7 +369,7 @@ var Link = React.forwardRef(
367
369
  viewTransition,
368
370
  ...rest
369
371
  }, forwardedRef) {
370
- let { basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
372
+ let { basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
371
373
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
372
374
  let absoluteHref;
373
375
  let isExternal = false;
@@ -377,22 +379,22 @@ var Link = React.forwardRef(
377
379
  try {
378
380
  let currentUrl = new URL(window.location.href);
379
381
  let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
380
- let path = _chunk63YB5VLYjs.stripBasename.call(void 0, targetUrl.pathname, basename);
382
+ let path = _chunkWUKWGNN4js.stripBasename.call(void 0, targetUrl.pathname, basename);
381
383
  if (targetUrl.origin === currentUrl.origin && path != null) {
382
384
  to = path + targetUrl.search + targetUrl.hash;
383
385
  } else {
384
386
  isExternal = true;
385
387
  }
386
388
  } catch (e) {
387
- _chunk63YB5VLYjs.warning.call(void 0,
389
+ _chunkWUKWGNN4js.warning.call(void 0,
388
390
  false,
389
391
  `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
390
392
  );
391
393
  }
392
394
  }
393
395
  }
394
- let href = _chunk63YB5VLYjs.useHref.call(void 0, to, { relative });
395
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunk63YB5VLYjs.usePrefetchBehavior.call(void 0,
396
+ let href = _chunkWUKWGNN4js.useHref.call(void 0, to, { relative });
397
+ let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkWUKWGNN4js.usePrefetchBehavior.call(void 0,
396
398
  prefetch,
397
399
  rest
398
400
  );
@@ -419,13 +421,13 @@ var Link = React.forwardRef(
419
421
  ...prefetchHandlers,
420
422
  href: absoluteHref || href,
421
423
  onClick: isExternal || reloadDocument ? onClick : handleClick,
422
- ref: _chunk63YB5VLYjs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
424
+ ref: _chunkWUKWGNN4js.mergeRefs.call(void 0, forwardedRef, prefetchRef),
423
425
  target,
424
426
  "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
425
427
  }
426
428
  )
427
429
  );
428
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunk63YB5VLYjs.PrefetchPageLinks, { page: href })) : link;
430
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkWUKWGNN4js.PrefetchPageLinks, { page: href })) : link;
429
431
  }
430
432
  );
431
433
  Link.displayName = "Link";
@@ -441,10 +443,10 @@ var NavLink = React.forwardRef(
441
443
  children,
442
444
  ...rest
443
445
  }, ref) {
444
- let path = _chunk63YB5VLYjs.useResolvedPath.call(void 0, to, { relative: rest.relative });
445
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
446
- let routerState = React.useContext(_chunk63YB5VLYjs.DataRouterStateContext);
447
- let { navigator, basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
446
+ let path = _chunkWUKWGNN4js.useResolvedPath.call(void 0, to, { relative: rest.relative });
447
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
448
+ let routerState = React.useContext(_chunkWUKWGNN4js.DataRouterStateContext);
449
+ let { navigator, basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
448
450
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
449
451
  // eslint-disable-next-line react-hooks/rules-of-hooks
450
452
  useViewTransitionState(path) && viewTransition === true;
@@ -457,7 +459,7 @@ var NavLink = React.forwardRef(
457
459
  toPathname = toPathname.toLowerCase();
458
460
  }
459
461
  if (nextLocationPathname && basename) {
460
- nextLocationPathname = _chunk63YB5VLYjs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
462
+ nextLocationPathname = _chunkWUKWGNN4js.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
461
463
  }
462
464
  const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
463
465
  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
@@ -521,7 +523,7 @@ var Form = React.forwardRef(
521
523
  if (event.defaultPrevented) return;
522
524
  event.preventDefault();
523
525
  let submitter = event.nativeEvent.submitter;
524
- let submitMethod = _optionalChain([submitter, 'optionalAccess', _19 => _19.getAttribute, 'call', _20 => _20("formmethod")]) || method;
526
+ let submitMethod = _optionalChain([submitter, 'optionalAccess', _21 => _21.getAttribute, 'call', _22 => _22("formmethod")]) || method;
525
527
  submit(submitter || event.currentTarget, {
526
528
  fetcherKey,
527
529
  method: submitMethod,
@@ -552,10 +554,10 @@ function ScrollRestoration({
552
554
  storageKey,
553
555
  ...props
554
556
  }) {
555
- let remixContext = React.useContext(_chunk63YB5VLYjs.FrameworkContext);
556
- let { basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
557
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
558
- let matches = _chunk63YB5VLYjs.useMatches.call(void 0, );
557
+ let remixContext = React.useContext(_chunkWUKWGNN4js.FrameworkContext);
558
+ let { basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
559
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
560
+ let matches = _chunkWUKWGNN4js.useMatches.call(void 0, );
559
561
  useScrollRestoration({ getKey, storageKey });
560
562
  let ssrKey = React.useMemo(
561
563
  () => {
@@ -609,13 +611,13 @@ function getDataRouterConsoleError(hookName) {
609
611
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
610
612
  }
611
613
  function useDataRouterContext(hookName) {
612
- let ctx = React.useContext(_chunk63YB5VLYjs.DataRouterContext);
613
- _chunk63YB5VLYjs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
614
+ let ctx = React.useContext(_chunkWUKWGNN4js.DataRouterContext);
615
+ _chunkWUKWGNN4js.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
614
616
  return ctx;
615
617
  }
616
618
  function useDataRouterState(hookName) {
617
- let state = React.useContext(_chunk63YB5VLYjs.DataRouterStateContext);
618
- _chunk63YB5VLYjs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
619
+ let state = React.useContext(_chunkWUKWGNN4js.DataRouterStateContext);
620
+ _chunkWUKWGNN4js.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
619
621
  return state;
620
622
  }
621
623
  function useLinkClickHandler(to, {
@@ -626,14 +628,14 @@ function useLinkClickHandler(to, {
626
628
  relative,
627
629
  viewTransition
628
630
  } = {}) {
629
- let navigate = _chunk63YB5VLYjs.useNavigate.call(void 0, );
630
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
631
- let path = _chunk63YB5VLYjs.useResolvedPath.call(void 0, to, { relative });
631
+ let navigate = _chunkWUKWGNN4js.useNavigate.call(void 0, );
632
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
633
+ let path = _chunkWUKWGNN4js.useResolvedPath.call(void 0, to, { relative });
632
634
  return React.useCallback(
633
635
  (event) => {
634
636
  if (shouldProcessLinkClick(event, target)) {
635
637
  event.preventDefault();
636
- let replace = replaceProp !== void 0 ? replaceProp : _chunk63YB5VLYjs.createPath.call(void 0, location) === _chunk63YB5VLYjs.createPath.call(void 0, path);
638
+ let replace = replaceProp !== void 0 ? replaceProp : _chunkWUKWGNN4js.createPath.call(void 0, location) === _chunkWUKWGNN4js.createPath.call(void 0, path);
637
639
  navigate(to, {
638
640
  replace,
639
641
  state,
@@ -658,13 +660,13 @@ function useLinkClickHandler(to, {
658
660
  );
659
661
  }
660
662
  function useSearchParams(defaultInit) {
661
- _chunk63YB5VLYjs.warning.call(void 0,
663
+ _chunkWUKWGNN4js.warning.call(void 0,
662
664
  typeof URLSearchParams !== "undefined",
663
665
  `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.`
664
666
  );
665
667
  let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
666
668
  let hasSetSearchParamsRef = React.useRef(false);
667
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
669
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
668
670
  let searchParams = React.useMemo(
669
671
  () => (
670
672
  // Only merge in the defaults if we haven't yet called setSearchParams.
@@ -677,7 +679,7 @@ function useSearchParams(defaultInit) {
677
679
  ),
678
680
  [location.search]
679
681
  );
680
- let navigate = _chunk63YB5VLYjs.useNavigate.call(void 0, );
682
+ let navigate = _chunkWUKWGNN4js.useNavigate.call(void 0, );
681
683
  let setSearchParams = React.useCallback(
682
684
  (nextInit, navigateOptions) => {
683
685
  const newSearchParams = createSearchParams(
@@ -694,8 +696,8 @@ var fetcherId = 0;
694
696
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
695
697
  function useSubmit() {
696
698
  let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
697
- let { basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
698
- let currentRouteId = _chunk63YB5VLYjs.useRouteId.call(void 0, );
699
+ let { basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
700
+ let currentRouteId = _chunkWUKWGNN4js.useRouteId.call(void 0, );
699
701
  return React.useCallback(
700
702
  async (target, options = {}) => {
701
703
  let { action, method, encType, formData, body } = getFormSubmissionInfo(
@@ -731,12 +733,12 @@ function useSubmit() {
731
733
  );
732
734
  }
733
735
  function useFormAction(action, { relative } = {}) {
734
- let { basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
735
- let routeContext = React.useContext(_chunk63YB5VLYjs.RouteContext);
736
- _chunk63YB5VLYjs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
736
+ let { basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
737
+ let routeContext = React.useContext(_chunkWUKWGNN4js.RouteContext);
738
+ _chunkWUKWGNN4js.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
737
739
  let [match] = routeContext.matches.slice(-1);
738
- let path = { ..._chunk63YB5VLYjs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
739
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
740
+ let path = { ..._chunkWUKWGNN4js.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
741
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
740
742
  if (action == null) {
741
743
  path.search = location.search;
742
744
  let params = new URLSearchParams(path.search);
@@ -753,21 +755,21 @@ function useFormAction(action, { relative } = {}) {
753
755
  path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
754
756
  }
755
757
  if (basename !== "/") {
756
- path.pathname = path.pathname === "/" ? basename : _chunk63YB5VLYjs.joinPaths.call(void 0, [basename, path.pathname]);
758
+ path.pathname = path.pathname === "/" ? basename : _chunkWUKWGNN4js.joinPaths.call(void 0, [basename, path.pathname]);
757
759
  }
758
- return _chunk63YB5VLYjs.createPath.call(void 0, path);
760
+ return _chunkWUKWGNN4js.createPath.call(void 0, path);
759
761
  }
760
762
  function useFetcher({
761
763
  key
762
764
  } = {}) {
763
765
  let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
764
766
  let state = useDataRouterState("useFetcher" /* UseFetcher */);
765
- let fetcherData = React.useContext(_chunk63YB5VLYjs.FetchersContext);
766
- let route = React.useContext(_chunk63YB5VLYjs.RouteContext);
767
- let routeId = _optionalChain([route, 'access', _21 => _21.matches, 'access', _22 => _22[route.matches.length - 1], 'optionalAccess', _23 => _23.route, 'access', _24 => _24.id]);
768
- _chunk63YB5VLYjs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
769
- _chunk63YB5VLYjs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
770
- _chunk63YB5VLYjs.invariant.call(void 0,
767
+ let fetcherData = React.useContext(_chunkWUKWGNN4js.FetchersContext);
768
+ let route = React.useContext(_chunkWUKWGNN4js.RouteContext);
769
+ let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
770
+ _chunkWUKWGNN4js.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
771
+ _chunkWUKWGNN4js.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
772
+ _chunkWUKWGNN4js.invariant.call(void 0,
771
773
  routeId != null,
772
774
  `useFetcher can only be used on routes that contain a unique "id"`
773
775
  );
@@ -782,7 +784,7 @@ function useFetcher({
782
784
  }, [router, fetcherKey]);
783
785
  let load = React.useCallback(
784
786
  async (href, opts) => {
785
- _chunk63YB5VLYjs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
787
+ _chunkWUKWGNN4js.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
786
788
  await router.fetch(fetcherKey, routeId, href, opts);
787
789
  },
788
790
  [fetcherKey, routeId, router]
@@ -808,7 +810,7 @@ function useFetcher({
808
810
  FetcherForm2.displayName = "fetcher.Form";
809
811
  return FetcherForm2;
810
812
  }, [fetcherKey]);
811
- let fetcher = state.fetchers.get(fetcherKey) || _chunk63YB5VLYjs.IDLE_FETCHER;
813
+ let fetcher = state.fetchers.get(fetcherKey) || _chunkWUKWGNN4js.IDLE_FETCHER;
812
814
  let data = fetcherData.get(fetcherKey);
813
815
  let fetcherWithComponents = React.useMemo(
814
816
  () => ({
@@ -839,7 +841,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
839
841
  key = getKey(
840
842
  {
841
843
  ...location,
842
- pathname: _chunk63YB5VLYjs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
844
+ pathname: _chunkWUKWGNN4js.stripBasename.call(void 0, location.pathname, basename) || location.pathname
843
845
  },
844
846
  matches
845
847
  );
@@ -860,10 +862,10 @@ function useScrollRestoration({
860
862
  let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
861
863
  "useScrollRestoration" /* UseScrollRestoration */
862
864
  );
863
- let { basename } = React.useContext(_chunk63YB5VLYjs.NavigationContext);
864
- let location = _chunk63YB5VLYjs.useLocation.call(void 0, );
865
- let matches = _chunk63YB5VLYjs.useMatches.call(void 0, );
866
- let navigation = _chunk63YB5VLYjs.useNavigation.call(void 0, );
865
+ let { basename } = React.useContext(_chunkWUKWGNN4js.NavigationContext);
866
+ let location = _chunkWUKWGNN4js.useLocation.call(void 0, );
867
+ let matches = _chunkWUKWGNN4js.useMatches.call(void 0, );
868
+ let navigation = _chunkWUKWGNN4js.useNavigation.call(void 0, );
867
869
  React.useEffect(() => {
868
870
  window.history.scrollRestoration = "manual";
869
871
  return () => {
@@ -882,7 +884,7 @@ function useScrollRestoration({
882
884
  JSON.stringify(savedScrollPositions)
883
885
  );
884
886
  } catch (error) {
885
- _chunk63YB5VLYjs.warning.call(void 0,
887
+ _chunkWUKWGNN4js.warning.call(void 0,
886
888
  false,
887
889
  `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
888
890
  );
@@ -903,7 +905,7 @@ function useScrollRestoration({
903
905
  }
904
906
  }, [storageKey]);
905
907
  React.useLayoutEffect(() => {
906
- let disableScrollRestoration = _optionalChain([router, 'optionalAccess', _25 => _25.enableScrollRestoration, 'call', _26 => _26(
908
+ let disableScrollRestoration = _optionalChain([router, 'optionalAccess', _27 => _27.enableScrollRestoration, 'call', _28 => _28(
907
909
  savedScrollPositions,
908
910
  () => window.scrollY,
909
911
  getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0
@@ -929,7 +931,7 @@ function useScrollRestoration({
929
931
  }
930
932
  }
931
933
  } catch (e2) {
932
- _chunk63YB5VLYjs.warning.call(void 0,
934
+ _chunkWUKWGNN4js.warning.call(void 0,
933
935
  false,
934
936
  `"${location.hash.slice(
935
937
  1
@@ -967,7 +969,7 @@ function usePrompt({
967
969
  when,
968
970
  message
969
971
  }) {
970
- let blocker = _chunk63YB5VLYjs.useBlocker.call(void 0, when);
972
+ let blocker = _chunkWUKWGNN4js.useBlocker.call(void 0, when);
971
973
  React.useEffect(() => {
972
974
  if (blocker.state === "blocked") {
973
975
  let proceed = window.confirm(message);
@@ -985,21 +987,21 @@ function usePrompt({
985
987
  }, [blocker, when]);
986
988
  }
987
989
  function useViewTransitionState(to, { relative } = {}) {
988
- let vtContext = React.useContext(_chunk63YB5VLYjs.ViewTransitionContext);
989
- _chunk63YB5VLYjs.invariant.call(void 0,
990
+ let vtContext = React.useContext(_chunkWUKWGNN4js.ViewTransitionContext);
991
+ _chunkWUKWGNN4js.invariant.call(void 0,
990
992
  vtContext != null,
991
993
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
992
994
  );
993
995
  let { basename } = useDataRouterContext(
994
996
  "useViewTransitionState" /* useViewTransitionState */
995
997
  );
996
- let path = _chunk63YB5VLYjs.useResolvedPath.call(void 0, to, { relative });
998
+ let path = _chunkWUKWGNN4js.useResolvedPath.call(void 0, to, { relative });
997
999
  if (!vtContext.isTransitioning) {
998
1000
  return false;
999
1001
  }
1000
- let currentPath = _chunk63YB5VLYjs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1001
- let nextPath = _chunk63YB5VLYjs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1002
- return _chunk63YB5VLYjs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunk63YB5VLYjs.matchPath.call(void 0, path.pathname, currentPath) != null;
1002
+ let currentPath = _chunkWUKWGNN4js.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1003
+ let nextPath = _chunkWUKWGNN4js.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1004
+ return _chunkWUKWGNN4js.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkWUKWGNN4js.matchPath.call(void 0, path.pathname, currentPath) != null;
1003
1005
  }
1004
1006
 
1005
1007
  // lib/dom/server.tsx
@@ -1010,7 +1012,7 @@ function StaticRouter({
1010
1012
  location: locationProp = "/"
1011
1013
  }) {
1012
1014
  if (typeof locationProp === "string") {
1013
- locationProp = _chunk63YB5VLYjs.parsePath.call(void 0, locationProp);
1015
+ locationProp = _chunkWUKWGNN4js.parsePath.call(void 0, locationProp);
1014
1016
  }
1015
1017
  let action = "POP" /* Pop */;
1016
1018
  let location = {
@@ -1022,7 +1024,7 @@ function StaticRouter({
1022
1024
  };
1023
1025
  let staticNavigator = getStatelessNavigator();
1024
1026
  return /* @__PURE__ */ React2.createElement(
1025
- _chunk63YB5VLYjs.Router,
1027
+ _chunkWUKWGNN4js.Router,
1026
1028
  {
1027
1029
  basename,
1028
1030
  children,
@@ -1039,7 +1041,7 @@ function StaticRouterProvider({
1039
1041
  hydrate = true,
1040
1042
  nonce
1041
1043
  }) {
1042
- _chunk63YB5VLYjs.invariant.call(void 0,
1044
+ _chunkWUKWGNN4js.invariant.call(void 0,
1043
1045
  router && context,
1044
1046
  "You must provide `router` and `context` to <StaticRouterProvider>"
1045
1047
  );
@@ -1062,8 +1064,8 @@ function StaticRouterProvider({
1062
1064
  hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
1063
1065
  }
1064
1066
  let { state } = dataRouterContext.router;
1065
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunk63YB5VLYjs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1066
- _chunk63YB5VLYjs.Router,
1067
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkWUKWGNN4js.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkWUKWGNN4js.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkWUKWGNN4js.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkWUKWGNN4js.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1068
+ _chunkWUKWGNN4js.Router,
1067
1069
  {
1068
1070
  basename: dataRouterContext.basename,
1069
1071
  location: state.location,
@@ -1093,14 +1095,14 @@ function DataRoutes({
1093
1095
  future,
1094
1096
  state
1095
1097
  }) {
1096
- return _chunk63YB5VLYjs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1098
+ return _chunkWUKWGNN4js.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1097
1099
  }
1098
1100
  function serializeErrors(errors) {
1099
1101
  if (!errors) return null;
1100
1102
  let entries = Object.entries(errors);
1101
1103
  let serialized = {};
1102
1104
  for (let [key, val] of entries) {
1103
- if (_chunk63YB5VLYjs.isRouteErrorResponse.call(void 0, val)) {
1105
+ if (_chunkWUKWGNN4js.isRouteErrorResponse.call(void 0, val)) {
1104
1106
  serialized[key] = { ...val, __type: "RouteErrorResponse" };
1105
1107
  } else if (val instanceof Error) {
1106
1108
  serialized[key] = {
@@ -1150,16 +1152,16 @@ function getStatelessNavigator() {
1150
1152
  };
1151
1153
  }
1152
1154
  function createStaticHandler2(routes, opts) {
1153
- return _chunk63YB5VLYjs.createStaticHandler.call(void 0, routes, {
1155
+ return _chunkWUKWGNN4js.createStaticHandler.call(void 0, routes, {
1154
1156
  ...opts,
1155
- mapRouteProperties: _chunk63YB5VLYjs.mapRouteProperties
1157
+ mapRouteProperties: _chunkWUKWGNN4js.mapRouteProperties
1156
1158
  });
1157
1159
  }
1158
1160
  function createStaticRouter(routes, context, opts = {}) {
1159
1161
  let manifest = {};
1160
- let dataRoutes = _chunk63YB5VLYjs.convertRoutesToDataRoutes.call(void 0,
1162
+ let dataRoutes = _chunkWUKWGNN4js.convertRoutesToDataRoutes.call(void 0,
1161
1163
  routes,
1162
- _chunk63YB5VLYjs.mapRouteProperties,
1164
+ _chunkWUKWGNN4js.mapRouteProperties,
1163
1165
  void 0,
1164
1166
  manifest
1165
1167
  );
@@ -1178,7 +1180,7 @@ function createStaticRouter(routes, context, opts = {}) {
1178
1180
  get future() {
1179
1181
  return {
1180
1182
  v8_middleware: false,
1181
- ..._optionalChain([opts, 'optionalAccess', _27 => _27.future])
1183
+ ..._optionalChain([opts, 'optionalAccess', _29 => _29.future])
1182
1184
  };
1183
1185
  },
1184
1186
  get state() {
@@ -1190,7 +1192,7 @@ function createStaticRouter(routes, context, opts = {}) {
1190
1192
  actionData: context.actionData,
1191
1193
  errors: context.errors,
1192
1194
  initialized: true,
1193
- navigation: _chunk63YB5VLYjs.IDLE_NAVIGATION,
1195
+ navigation: _chunkWUKWGNN4js.IDLE_NAVIGATION,
1194
1196
  restoreScrollPosition: null,
1195
1197
  preventScrollReset: false,
1196
1198
  revalidation: "idle",
@@ -1225,7 +1227,7 @@ function createStaticRouter(routes, context, opts = {}) {
1225
1227
  createHref,
1226
1228
  encodeLocation,
1227
1229
  getFetcher() {
1228
- return _chunk63YB5VLYjs.IDLE_FETCHER;
1230
+ return _chunkWUKWGNN4js.IDLE_FETCHER;
1229
1231
  },
1230
1232
  deleteFetcher() {
1231
1233
  throw msg("deleteFetcher");
@@ -1237,7 +1239,7 @@ function createStaticRouter(routes, context, opts = {}) {
1237
1239
  throw msg("dispose");
1238
1240
  },
1239
1241
  getBlocker() {
1240
- return _chunk63YB5VLYjs.IDLE_BLOCKER;
1242
+ return _chunkWUKWGNN4js.IDLE_BLOCKER;
1241
1243
  },
1242
1244
  deleteBlocker() {
1243
1245
  throw msg("deleteBlocker");
@@ -1255,10 +1257,10 @@ function createStaticRouter(routes, context, opts = {}) {
1255
1257
  };
1256
1258
  }
1257
1259
  function createHref(to) {
1258
- return typeof to === "string" ? to : _chunk63YB5VLYjs.createPath.call(void 0, to);
1260
+ return typeof to === "string" ? to : _chunkWUKWGNN4js.createPath.call(void 0, to);
1259
1261
  }
1260
1262
  function encodeLocation(to) {
1261
- let href = typeof to === "string" ? to : _chunk63YB5VLYjs.createPath.call(void 0, to);
1263
+ let href = typeof to === "string" ? to : _chunkWUKWGNN4js.createPath.call(void 0, to);
1262
1264
  href = href.replace(/ $/, "%20");
1263
1265
  let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
1264
1266
  return {