{"version":3,"sources":["webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@babel+runtime@7.15.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@babel+runtime@7.15.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/markup.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/transition.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/warnings.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/components.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/errorBoundaries.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/invariant.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/links.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/routeModules.js","webpack://@lemon8/webapp-seo/../dom.ts","webpack://@lemon8/webapp-seo/../index.tsx","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/array-species-constructor.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/array-species-create.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/flatten-into-array.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/modules/es.array.flat.js","webpack://@lemon8/webapp-seo/./node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/modules/es.array.unscopables.flat.js"],"names":["_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","key","i","_objectWithoutProperties","sourceSymbolKeys","_extends","Object","assign","bind","arguments","length","prototype","hasOwnProperty","call","apply","ESCAPE_LOOKUP","ESCAPE_REGEX","escapeHtml","html","replace","match","createHtml","__html","IDLE_TRANSITION","state","submission","undefined","location","type","IDLE_FETCHER","data","formMethod","formAction","formEncType","formData","json","text","alreadyWarned","logDeprecationOnce","message","useDataRouterContext","context","React","UNSAFE_DataRouterContext","invariant","useDataRouterStateContext","UNSAFE_DataRouterStateContext","RemixContext","displayName","useRemixContext","RemixRoute","_ref","id","routeModules","future","default","Component","ErrorBoundary","CatchBoundary","v2_errorBoundary","Outlet","concat","RemixRouteError","_ref2","error","useRouteError","V2_RemixRootDefaultErrorBoundary","RemixRootDefaultCatchBoundary","RemixRootDefaultErrorBoundary","isRouteErrorResponse","tError","status","RemixCatchBoundary","catch","component","Error","usePrefetchBehavior","prefetch","theirElementProps","maybePrefetch","setMaybePrefetch","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","ref","callback","entries","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","current","observe","disconnect","setIntent","cancelIntent","setTimeout","clearTimeout","composeEventHandlers","ABSOLUTE_URL_REGEX","NavLink","_ref3","forwardedRef","to","props","_excluded","isAbsolute","test","href","useHref","prefetchHandlers","NavLink$1","mergeRefs","PrefetchPageLinks","page","Link","_ref4","_excluded2","Link$1","theirHandler","ourHandler","event","defaultPrevented","linksWarning","useTransitionWarning","fetcherTypeWarning","fetcherSubmissionWarning","Links","manifest","errors","matches","routerMatches","slice","findIndex","m","route","links","getLinksForMatches","some","link","map","isPageLinkDescriptor","imageSrcSet","imagesrcset","imagesizes","imageSizes","rel","_ref5","dataLinkProps","_excluded3","router","matchRoutes","routes","PrefetchPageLinksImpl","console","warn","usePrefetchedStylesheets","styleLinks","setStyleLinks","interrupted","getStylesheetPrefetchLinks","then","_ref6","nextMatches","linkProps","_excluded4","useLocation","newMatchesForData","getNewMatchesForLinks","newMatchesForAssets","dataHrefs","getDataLinkHrefs","moduleHrefs","getModuleLinkHrefs","as","V1Meta","loaderData","meta","parentsData","routeId","params","routeModule","routeMeta","Array","isArray","path","createElement","Fragment","_ref7","name","value","includes","charSet","String","isOpenGraphTag","flat","content","property","JSON","stringify","V2Meta","_matches","leafMeta","_match","pathname","handle","metaProps","tagName","isValidMetaTag","Comp","title","_metaProps$charSet","charset","err","dangerouslySetInnerHTML","Meta","v2_meta","Await","Await$1","isHydrated","Scripts","serverHandoffString","abortDelay","static","isStatic","staticContext","navigation","useNavigation","deferredScripts","initialScripts","_manifest$hmr","contextScript","activeDeferreds","join","_ref8","deferredData","pendingKeys","Set","promiseKeyValues","deferredKeys","has","push","DeferredHydrationScript","dataKey","scriptProps","trackedPromise","_error","toSerialize","stack","_data","routeModulesScript","hmr","runtime","url","index","module","suppressHydrationWarning","async","__remixContext","a","routePreloads","imports","preloads","crossOrigin","dedupe","_ref9","document","fallback","resolve","errorElement","ErrorDeferredHydrationScript","children","_ref10","useAsyncError","array","useMatches","useMatches$1","useLoaderData","useLoaderData$1","useActionData","useActionData$1","useTransition","useEffect","useMemo","convertNavigationToTransition","isActionSubmission","toUpperCase","method","action","encType","_isRedirect","_isFetchActionRedirect","URL","window","origin","search","URLSearchParams","toString","useFetchers","useFetchers$1","f","fetcher","convertRouterFetcherToRemixFetcher","addFetcherDeprecationWarnings","useFetcher","fetcherRR","useFetcher$1","remixFetcher","fetcherWithComponents","_objectSpread","load","submit","Form","defineProperty","get","set","configurable","enumerable","LiveReload","_len","refs","_key","RemixErrorBoundary","React__default","constructor","getDerivedStateFromError","getDerivedStateFromProps","render","lang","style","fontFamily","padding","fontSize","background","color","overflow","RemixRootDefaultCatchBoundaryImpl","caught","errorString","RemixCatchContext","useCatch","useContext","catchVal","Provider","statusText","descriptors","_module$links","getCurrentPageModulePreloadHrefs","prefetchStyleLinks","descriptor","matchingLinks","filter","media","matchMedia","Promise","all","prefetchStyleLink","removeLink","head","contains","removeChild","onload","onerror","appendChild","object","isHtmlLinkDescriptor","mod","loadRouteModule","currentMatches","mode","parsePathPatch","isNew","matchPathChanged","_currentMatches$index","endsWith","hasLoader","shouldRevalidate","_currentMatches$","routeChoice","currentUrl","hash","currentParams","nextUrl","nextParams","defaultShouldRevalidate","manifestRoute","dedupeHrefs","searchParams","manifestPatch","hrefs","preloadsSet","reduce","deduped","str","add","parsePath","routeModulesCache","reload","defaultMethod","defaultEncType","isHtmlElement","isButtonElement","toLowerCase","isFormElement","isInputElement","isModifiedEvent","metaKey","altKey","ctrlKey","shiftKey","shouldProcessLinkClick","button","createSearchParams","init","keys","memo","v","getSearchParamsForLocation","locationSearch","defaultSearchParams","getAll","append","_formDataSupportsSubmitter","isFormDataSubmitterSupported","FormData","e","supportedFormEncTypes","getFormEncType","getFormSubmissionInfo","basename","body","attr","getAttribute","stripBasename","form","prefix","createBrowserRouter","opts","createRouter","v7_prependBasename","history","createBrowserHistory","hydrationData","parseHydrationData","mapRouteProperties","initialize","createHashRouter","createHashHistory","_window","__staticRouterHydrationData","deserializeErrors","serialized","val","__type","ErrorResponse","internal","START_TRANSITION","startTransitionImpl","BrowserRouter","historyRef","useRef","v5Compat","setStateImpl","useState","v7_startTransition","setState","useCallback","newState","useLayoutEffect","listen","Router","navigationType","navigator","HashRouter","HistoryRouter","isBrowser","onClick","relative","reloadDocument","preventScrollReset","rest","NavigationContext","absoluteHref","isExternal","targetUrl","startsWith","protocol","internalOnClick","useLinkClickHandler","handleClick","ariaCurrentProp","caseSensitive","className","classNameProp","end","styleProp","useResolvedPath","routerState","DataRouterStateContext","toPathname","encodeLocation","locationPathname","nextLocationPathname","isActive","charAt","isPending","ariaCurrent","Boolean","FormImpl","onSubmit","useFormAction","submitHandler","preventDefault","submitter","nativeEvent","submitMethod","currentTarget","ScrollRestoration","getKey","storageKey","useScrollRestoration","DataRouterHook","DataRouterStateHook","getDataRouterConsoleError","hookName","ctx","DataRouterContext","useDataRouterState","_temp","replaceProp","navigate","useNavigate","createPath","useSearchParams","defaultInit","defaultSearchParamsRef","hasSetSearchParamsRef","setSearchParams","nextInit","navigateOptions","newSearchParams","validateClientSideSubmission","useSubmit","UseSubmit","currentRouteId","useRouteId","options","fromRouteId","useSubmitFetcher","fetcherKey","fetcherRouteId","UseSubmitFetcher","fetch","_temp2","routeContext","RouteContext","delete","joinPaths","createFetcherForm","fetcherId","_route$matches","UseFetcher","getFetcher","deleteFetcher","UseFetchers","fetchers","values","SCROLL_RESTORATION_STORAGE_KEY","savedScrollPositions","_temp3","UseScrollRestoration","restoreScrollPosition","scrollRestoration","usePageHide","scrollY","sessionStorage","setItem","sessionPositions","getItem","parse","getKeyWithoutBasename","disableScrollRestoration","enableScrollRestoration","scrollTo","el","getElementById","scrollIntoView","useBeforeUnload","capture","addEventListener","removeEventListener","usePrompt","when","blocker","useBlocker","reset","confirm","proceed","isConstructor","isObject","wellKnownSymbol","SPECIES","$Array","originalArray","C","arraySpeciesConstructor","lengthOfArrayLike","doesNotExceedSafeInteger","flattenIntoArray","original","sourceLen","start","depth","mapper","thisArg","targetIndex","sourceIndex","mapFn","element","elementLen","$","toObject","toIntegerOrInfinity","arraySpeciesCreate","depthArg","O","A","addToUnscopables"],"mappings":"sKAAe,SAASA,EAA8BC,EAAQC,EAAU,CACtE,GAAID,GAAU,KAAM,MAAO,CAAC,EAC5B,IAAI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WC,GAAOC,EAAOC,GAAQC,EAAS,CAMnG,QALIC,EAAcJ,GACdK,EAAc,EACdC,EAAQJ,GAASnmB,EAAKmmB,GAAQC,CAAO,EAAI,GACzCI,EAASC,EAENH,EAAcN,GACfM,KAAejnB,IACjBmnB,EAAUD,EAAQA,EAAMlnB,EAAOinB,GAAcA,EAAaP,EAAQ,EAAI1mB,EAAOinB,GAEzEJ,EAAQ,GAAK5a,EAAQkb,CAAO,GAC9BC,EAAab,EAAkBY,CAAO,EACtCH,EAAcP,EAAiBvmB,EAAQwmB,GAAUS,EAASC,EAAYJ,EAAaH,EAAQ,CAAC,EAAI,IAEhGL,EAAyBQ,EAAc,CAAC,EACxC9mB,EAAO8mB,GAAeG,GAGxBH,KAEFC,IAEF,OAAOD,CACT,EAEAxW,EAAO,QAAUiW,C,kBChCjB,IAAIY,EAAI,EAAQ,KAAqB,EACjCZ,EAAmB,EAAQ,KAAiC,EAC5Da,EAAW,EAAQ,KAAwB,EAC3Cf,EAAoB,EAAQ,IAAmC,EAC/DgB,EAAsB,EAAQ,KAAqC,EACnEC,EAAqB,EAAQ,KAAmC,EAIpEH,EAAE,CAAE,OAAQ,QAAS,MAAO,EAAK,EAAG,CAClC,KAAM,UAAkC,CACtC,IAAII,EAAW,UAAU,OAAS,UAAU,GAAK,OAC7CC,EAAIJ,EAAS,IAAI,EACjBX,GAAYJ,EAAkBmB,CAAC,EAC/BC,EAAIH,EAAmBE,EAAG,CAAC,EAC/B,OAAAC,EAAE,OAASlB,EAAiBkB,EAAGD,EAAGA,EAAGf,GAAW,EAAGc,IAAa,OAAY,EAAIF,EAAoBE,CAAQ,CAAC,EACtGE,CACT,CACF,CAAC,C,kBCjBD,IAAIC,EAAmB,EAAQ,KAAiC,EAGhEA,EAAiB,MAAM,C","file":"110-7525dedeb206e8d6c1a8.js","sourcesContent":["export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nexport { _extends as extends };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// This escapeHtml utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\n// We've chosen to inline the utility here to reduce the number of npm dependencies we have,\n// slightly decrease the code size compared the original package and make it esm compatible.\n\nconst ESCAPE_LOOKUP = {\n \"&\": \"\\\\u0026\",\n \">\": \"\\\\u003e\",\n \"<\": \"\\\\u003c\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction escapeHtml(html) {\n return html.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\nfunction createHtml(html) {\n return {\n __html: html\n };\n}\n\nexport { createHtml, escapeHtml };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// Thanks https://github.com/sindresorhus/type-fest!\n\n// Fetchers need a separate set of types to reflect the json/text submission\n// support in react-router. We do not carry that into useTransition since\n// it's deprecated\n// TODO: keep data around on resubmission?\nconst IDLE_TRANSITION = {\n state: \"idle\",\n submission: undefined,\n location: undefined,\n type: \"idle\"\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n type: \"init\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n submission: undefined\n};\n\nexport { IDLE_FETCHER, IDLE_TRANSITION };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nconst alreadyWarned = {};\nfunction logDeprecationOnce(message, key = message) {\n if (process.env.NODE_ENV !== \"production\" && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n console.warn(message);\n }\n}\n\nexport { logDeprecationOnce };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';\nimport * as React from 'react';\nimport { useHref, NavLink as NavLink$1, Link as Link$1, matchRoutes, useLocation, Await as Await$1, useNavigation, useAsyncError, useMatches as useMatches$1, useLoaderData as useLoaderData$1, useActionData as useActionData$1, useFetchers as useFetchers$1, useFetcher as useFetcher$1, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Outlet, useRouteError, isRouteErrorResponse } from 'react-router-dom';\nimport { RemixRootDefaultErrorBoundary, RemixCatchBoundary, V2_RemixRootDefaultErrorBoundary, RemixRootDefaultCatchBoundary } from './errorBoundaries.js';\nimport invariant from './invariant.js';\nimport { getLinksForMatches, isPageLinkDescriptor, getNewMatchesForLinks, getDataLinkHrefs, getModuleLinkHrefs, getStylesheetPrefetchLinks } from './links.js';\nimport { escapeHtml, createHtml } from './markup.js';\nimport { IDLE_TRANSITION, IDLE_FETCHER } from './transition.js';\nimport { logDeprecationOnce } from './warnings.js';\n\nfunction useDataRouterContext() {\n let context = React.useContext(UNSAFE_DataRouterContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\nfunction useDataRouterStateContext() {\n let context = React.useContext(UNSAFE_DataRouterStateContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// RemixContext\n\nconst RemixContext = /*#__PURE__*/React.createContext(undefined);\nRemixContext.displayName = \"Remix\";\nfunction useRemixContext() {\n let context = React.useContext(RemixContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// RemixRoute\n\nfunction RemixRoute({\n id\n}) {\n let {\n routeModules,\n future\n } = useRemixContext();\n invariant(routeModules, \"Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules.\\n\" + \"Check this link for more details:\\nhttps://remix.run/pages/gotchas#server-code-in-client-bundles\");\n let {\n default: Component,\n ErrorBoundary,\n CatchBoundary\n } = routeModules[id];\n\n // Default Component to Outlet if we expose boundary UI components\n if (!Component && (ErrorBoundary || !future.v2_errorBoundary && CatchBoundary)) {\n Component = Outlet;\n }\n invariant(Component, `Route \"${id}\" has no component! Please go add a \\`default\\` export in the route module file.\\n` + \"If you were trying to navigate or submit to a resource route, use `` instead of `` or `
`.\");\n return /*#__PURE__*/React.createElement(Component, null);\n}\nfunction RemixRouteError({\n id\n}) {\n let {\n future,\n routeModules\n } = useRemixContext();\n\n // This checks prevent cryptic error messages such as: 'Cannot read properties of undefined (reading 'root')'\n invariant(routeModules, \"Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules.\\n\" + \"Check this link for more details:\\nhttps://remix.run/pages/gotchas#server-code-in-client-bundles\");\n let error = useRouteError();\n let {\n CatchBoundary,\n ErrorBoundary\n } = routeModules[id];\n if (future.v2_errorBoundary) {\n // Provide defaults for the root route if they are not present\n if (id === \"root\") {\n ErrorBoundary || (ErrorBoundary = V2_RemixRootDefaultErrorBoundary);\n }\n if (ErrorBoundary) {\n // TODO: Unsure if we can satisfy the typings here\n // @ts-expect-error\n return /*#__PURE__*/React.createElement(ErrorBoundary, null);\n }\n throw error;\n }\n\n // Provide defaults for the root route if they are not present\n if (id === \"root\") {\n CatchBoundary || (CatchBoundary = RemixRootDefaultCatchBoundary);\n ErrorBoundary || (ErrorBoundary = RemixRootDefaultErrorBoundary);\n }\n if (isRouteErrorResponse(error)) {\n let tError = error;\n if (!!(tError !== null && tError !== void 0 && tError.error) && tError.status !== 404 && ErrorBoundary) {\n // Internal framework-thrown ErrorResponses\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n error: tError.error\n });\n }\n if (CatchBoundary) {\n // User-thrown ErrorResponses\n return /*#__PURE__*/React.createElement(RemixCatchBoundary, {\n catch: error,\n component: CatchBoundary\n });\n }\n }\n if (error instanceof Error && ErrorBoundary) {\n // User- or framework-thrown Errors\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n error: error\n });\n }\n throw error;\n}\n////////////////////////////////////////////////////////////////////////////////\n// Public API\n\n/**\n * Defines the prefetching behavior of the link:\n *\n * - \"intent\": Fetched when the user focuses or hovers the link\n * - \"render\": Fetched when the link is rendered\n * - \"none\": Never fetched\n */\nfunction usePrefetchBehavior(prefetch, theirElementProps) {\n let [maybePrefetch, setMaybePrefetch] = React.useState(false);\n let [shouldPrefetch, setShouldPrefetch] = React.useState(false);\n let {\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n onTouchStart\n } = theirElementProps;\n let ref = React.useRef(null);\n React.useEffect(() => {\n if (prefetch === \"render\") {\n setShouldPrefetch(true);\n }\n if (prefetch === \"viewport\") {\n let callback = entries => {\n entries.forEach(entry => {\n setShouldPrefetch(entry.isIntersecting);\n });\n };\n let observer = new IntersectionObserver(callback, {\n threshold: 0.5\n });\n if (ref.current) observer.observe(ref.current);\n return () => {\n observer.disconnect();\n };\n }\n }, [prefetch]);\n let setIntent = () => {\n if (prefetch === \"intent\") {\n setMaybePrefetch(true);\n }\n };\n let cancelIntent = () => {\n if (prefetch === \"intent\") {\n setMaybePrefetch(false);\n setShouldPrefetch(false);\n }\n };\n React.useEffect(() => {\n if (maybePrefetch) {\n let id = setTimeout(() => {\n setShouldPrefetch(true);\n }, 100);\n return () => {\n clearTimeout(id);\n };\n }\n }, [maybePrefetch]);\n return [shouldPrefetch, ref, {\n onFocus: composeEventHandlers(onFocus, setIntent),\n onBlur: composeEventHandlers(onBlur, cancelIntent),\n onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),\n onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),\n onTouchStart: composeEventHandlers(onTouchStart, setIntent)\n }];\n}\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/**\n * A special kind of `` that knows whether or not it is \"active\".\n *\n * @see https://remix.run/components/nav-link\n */\nlet NavLink = /*#__PURE__*/React.forwardRef(({\n to,\n prefetch = \"none\",\n ...props\n}, forwardedRef) => {\n let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n let href = useHref(to);\n let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavLink$1, _extends({}, props, prefetchHandlers, {\n ref: mergeRefs(forwardedRef, ref),\n to: to\n })), shouldPrefetch && !isAbsolute ? /*#__PURE__*/React.createElement(PrefetchPageLinks, {\n page: href\n }) : null);\n});\nNavLink.displayName = \"NavLink\";\n\n/**\n * This component renders an anchor tag and is the primary way the user will\n * navigate around your website.\n *\n * @see https://remix.run/components/link\n */\nlet Link = /*#__PURE__*/React.forwardRef(({\n to,\n prefetch = \"none\",\n ...props\n}, forwardedRef) => {\n let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n let href = useHref(to);\n let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Link$1, _extends({}, props, prefetchHandlers, {\n ref: mergeRefs(forwardedRef, ref),\n to: to\n })), shouldPrefetch && !isAbsolute ? /*#__PURE__*/React.createElement(PrefetchPageLinks, {\n page: href\n }) : null);\n});\nLink.displayName = \"Link\";\nfunction composeEventHandlers(theirHandler, ourHandler) {\n return event => {\n theirHandler && theirHandler(event);\n if (!event.defaultPrevented) {\n ourHandler(event);\n }\n };\n}\nlet linksWarning = \"⚠️ REMIX FUTURE CHANGE: The behavior of links `imagesizes` and `imagesrcset` will be changing in v2. \" + \"Only the React camel case versions will be valid. Please change to `imageSizes` and `imageSrcSet`. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#links-imagesizes-and-imagesrcset\";\nlet useTransitionWarning = \"⚠️ REMIX FUTURE CHANGE: `useTransition` will be removed in v2 in favor of `useNavigation`. \" + \"You can prepare for this change at your convenience by updating to `useNavigation`. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usetransition\";\nlet fetcherTypeWarning = \"⚠️ REMIX FUTURE CHANGE: `fetcher.type` will be removed in v2. \" + \"Please use `fetcher.state`, `fetcher.formData`, and `fetcher.data` to achieve the same UX. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher\";\nlet fetcherSubmissionWarning = \"⚠️ REMIX FUTURE CHANGE : `fetcher.submission` will be removed in v2. \" + \"The submission fields are now part of the fetcher object itself (`fetcher.formData`). \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher\";\n\n/**\n * Renders the `` tags for the current routes.\n *\n * @see https://remix.run/components/links\n */\nfunction Links() {\n let {\n manifest,\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches\n } = useDataRouterStateContext();\n let matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let links = React.useMemo(() => getLinksForMatches(matches, routeModules, manifest), [matches, routeModules, manifest]);\n React.useEffect(() => {\n if (links.some(link => \"imagesizes\" in link || \"imagesrcset\" in link)) {\n logDeprecationOnce(linksWarning);\n }\n }, [links]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, links.map(link => {\n if (isPageLinkDescriptor(link)) {\n return /*#__PURE__*/React.createElement(PrefetchPageLinks, _extends({\n key: link.page\n }, link));\n }\n let imageSrcSet = null;\n\n // In React 17, and will warn\n // because the DOM attributes aren't recognized, so users need to pass\n // them in all lowercase to forward the attributes to the node without a\n // warning. Normalize so that either property can be used in Remix.\n if (\"useId\" in React) {\n if (link.imagesrcset) {\n link.imageSrcSet = imageSrcSet = link.imagesrcset;\n delete link.imagesrcset;\n }\n if (link.imagesizes) {\n link.imageSizes = link.imagesizes;\n delete link.imagesizes;\n }\n } else {\n if (link.imageSrcSet) {\n link.imagesrcset = imageSrcSet = link.imageSrcSet;\n delete link.imageSrcSet;\n }\n if (link.imageSizes) {\n link.imagesizes = link.imageSizes;\n delete link.imageSizes;\n }\n }\n return /*#__PURE__*/React.createElement(\"link\", _extends({\n key: link.rel + (link.href || \"\") + (imageSrcSet || \"\")\n }, link));\n }));\n}\n\n/**\n * This component renders all of the `` and\n * `` tags for all the assets (data, modules, css) of\n * a given page.\n *\n * @param props\n * @param props.page\n * @see https://remix.run/components/prefetch-page-links\n */\nfunction PrefetchPageLinks({\n page,\n ...dataLinkProps\n}) {\n let {\n router\n } = useDataRouterContext();\n let matches = React.useMemo(() => matchRoutes(router.routes, page), [router.routes, page]);\n if (!matches) {\n console.warn(`Tried to prefetch ${page} but no routes matched.`);\n return null;\n }\n return /*#__PURE__*/React.createElement(PrefetchPageLinksImpl, _extends({\n page: page,\n matches: matches\n }, dataLinkProps));\n}\nfunction usePrefetchedStylesheets(matches) {\n let {\n manifest,\n routeModules\n } = useRemixContext();\n let [styleLinks, setStyleLinks] = React.useState([]);\n React.useEffect(() => {\n let interrupted = false;\n getStylesheetPrefetchLinks(matches, manifest, routeModules).then(links => {\n if (!interrupted) setStyleLinks(links);\n });\n return () => {\n interrupted = true;\n };\n }, [matches, manifest, routeModules]);\n return styleLinks;\n}\nfunction PrefetchPageLinksImpl({\n page,\n matches: nextMatches,\n ...linkProps\n}) {\n let location = useLocation();\n let {\n manifest\n } = useRemixContext();\n let {\n matches\n } = useDataRouterStateContext();\n let newMatchesForData = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"data\"), [page, nextMatches, matches, manifest, location]);\n let newMatchesForAssets = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"assets\"), [page, nextMatches, matches, manifest, location]);\n let dataHrefs = React.useMemo(() => getDataLinkHrefs(page, newMatchesForData, manifest), [newMatchesForData, page, manifest]);\n let moduleHrefs = React.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);\n\n // needs to be a hook with async behavior because we need the modules, not\n // just the manifest like the other links in here.\n let styleLinks = usePrefetchedStylesheets(newMatchesForAssets);\n return /*#__PURE__*/React.createElement(React.Fragment, null, dataHrefs.map(href => /*#__PURE__*/React.createElement(\"link\", _extends({\n key: href,\n rel: \"prefetch\",\n as: \"fetch\",\n href: href\n }, linkProps))), moduleHrefs.map(href => /*#__PURE__*/React.createElement(\"link\", _extends({\n key: href,\n rel: \"modulepreload\",\n href: href\n }, linkProps))), styleLinks.map(link =>\n /*#__PURE__*/\n // these don't spread `linkProps` because they are full link descriptors\n // already with their own props\n React.createElement(\"link\", _extends({\n key: link.href\n }, link))));\n}\n\n/**\n * Renders the `` and `<meta>` tags for the current routes.\n *\n * @see https://remix.run/components/meta\n */\nfunction V1Meta() {\n let {\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches,\n loaderData\n } = useDataRouterStateContext();\n let location = useLocation();\n let matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let meta = {};\n let parentsData = {};\n for (let match of matches) {\n let routeId = match.route.id;\n let data = loaderData[routeId];\n let params = match.params;\n let routeModule = routeModules[routeId];\n if (routeModule.meta) {\n let routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n data,\n parentsData,\n params,\n location\n }) : routeModule.meta;\n if (routeMeta && Array.isArray(routeMeta)) {\n throw new Error(\"The route at \" + match.route.path + \" returns an array. This is only supported with the `v2_meta` future flag \" + \"in the Remix config. Either set the flag to `true` or update the route's \" + \"meta function to return an object.\" + \"\\n\\nTo reference the v1 meta function API, see https://remix.run/route/meta\"\n // TODO: Add link to the docs once they are written\n // + \"\\n\\nTo reference future flags and the v2 meta API, see https://remix.run/file-conventions/remix-config#future-v2-meta.\"\n );\n }\n\n Object.assign(meta, routeMeta);\n }\n parentsData[routeId] = data;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, Object.entries(meta).map(([name, value]) => {\n if (!value) {\n return null;\n }\n if ([\"charset\", \"charSet\"].includes(name)) {\n return /*#__PURE__*/React.createElement(\"meta\", {\n key: \"charSet\",\n charSet: value\n });\n }\n if (name === \"title\") {\n return /*#__PURE__*/React.createElement(\"title\", {\n key: \"title\"\n }, String(value));\n }\n\n // Open Graph tags use the `property` attribute, while other meta tags\n // use `name`. See https://ogp.me/\n //\n // Namespaced attributes:\n // - https://ogp.me/#type_music\n // - https://ogp.me/#type_video\n // - https://ogp.me/#type_article\n // - https://ogp.me/#type_book\n // - https://ogp.me/#type_profile\n //\n // Facebook specific tags begin with `fb:` and also use the `property`\n // attribute.\n //\n // Twitter specific tags begin with `twitter:` but they use `name`, so\n // they are excluded.\n let isOpenGraphTag = /^(og|music|video|article|book|profile|fb):.+$/.test(name);\n return [value].flat().map(content => {\n if (isOpenGraphTag) {\n return /*#__PURE__*/React.createElement(\"meta\", {\n property: name,\n content: content,\n key: name + content\n });\n }\n if (typeof content === \"string\") {\n return /*#__PURE__*/React.createElement(\"meta\", {\n name: name,\n content: content,\n key: name + content\n });\n }\n return /*#__PURE__*/React.createElement(\"meta\", _extends({\n key: name + JSON.stringify(content)\n }, content));\n });\n }));\n}\nfunction V2Meta() {\n let {\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches,\n loaderData\n } = useDataRouterStateContext();\n let location = useLocation();\n let _matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let meta = [];\n let leafMeta = null;\n let matches = [];\n for (let i = 0; i < _matches.length; i++) {\n let _match = _matches[i];\n let routeId = _match.route.id;\n let data = loaderData[routeId];\n let params = _match.params;\n let routeModule = routeModules[routeId];\n let routeMeta = [];\n let match = {\n id: routeId,\n data,\n meta: [],\n params: _match.params,\n pathname: _match.pathname,\n handle: _match.route.handle,\n // TODO: Remove in v2. Only leaving it for now because we used it in\n // examples and there's no reason to crash someone's build for one line.\n // They'll get a TS error from the type updates anyway.\n // @ts-expect-error\n get route() {\n console.warn(\"The meta function in \" + _match.route.path + \" accesses the `route` property on `matches`. This is deprecated and will be removed in Remix version 2. See\");\n return _match.route;\n }\n };\n matches[i] = match;\n if (routeModule !== null && routeModule !== void 0 && routeModule.meta) {\n routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n data,\n params,\n location,\n matches\n }) : Array.isArray(routeModule.meta) ? [...routeModule.meta] : routeModule.meta;\n } else if (leafMeta) {\n // We only assign the route's meta to the nearest leaf if there is no meta\n // export in the route. The meta function may return a falsey value which\n // is effectively the same as an empty array.\n routeMeta = [...leafMeta];\n }\n routeMeta = routeMeta || [];\n if (!Array.isArray(routeMeta)) {\n throw new Error(\"The `v2_meta` API is enabled in the Remix config, but the route at \" + _match.route.path + \" returns an invalid value. In v2, all route meta functions must \" + \"return an array of meta objects.\" +\n // TODO: Add link to the docs once they are written\n // \"\\n\\nTo reference future flags and the v2 meta API, see https://remix.run/file-conventions/remix-config#future-v2-meta.\" +\n \"\\n\\nTo reference the v1 meta function API, see https://remix.run/route/meta\");\n }\n match.meta = routeMeta;\n matches[i] = match;\n meta = [...routeMeta];\n leafMeta = meta;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, meta.flat().map(metaProps => {\n if (!metaProps) {\n return null;\n }\n if (\"tagName\" in metaProps) {\n let tagName = metaProps.tagName;\n delete metaProps.tagName;\n if (!isValidMetaTag(tagName)) {\n console.warn(`A meta object uses an invalid tagName: ${tagName}. Expected either 'link' or 'meta'`);\n return null;\n }\n let Comp = tagName;\n return /*#__PURE__*/React.createElement(Comp, _extends({\n key: JSON.stringify(metaProps)\n }, metaProps));\n }\n if (\"title\" in metaProps) {\n return /*#__PURE__*/React.createElement(\"title\", {\n key: \"title\"\n }, String(metaProps.title));\n }\n if (\"charset\" in metaProps) {\n metaProps.charSet ?? (metaProps.charSet = metaProps.charset);\n delete metaProps.charset;\n }\n if (\"charSet\" in metaProps && metaProps.charSet != null) {\n return typeof metaProps.charSet === \"string\" ? /*#__PURE__*/React.createElement(\"meta\", {\n key: \"charSet\",\n charSet: metaProps.charSet\n }) : null;\n }\n if (\"script:ld+json\" in metaProps) {\n let json = null;\n try {\n json = JSON.stringify(metaProps[\"script:ld+json\"]);\n } catch (err) {}\n return json != null && /*#__PURE__*/React.createElement(\"script\", {\n key: \"script:ld+json\",\n type: \"application/ld+json\",\n dangerouslySetInnerHTML: {\n __html: JSON.stringify(metaProps[\"script:ld+json\"])\n }\n });\n }\n return /*#__PURE__*/React.createElement(\"meta\", _extends({\n key: JSON.stringify(metaProps)\n }, metaProps));\n }));\n}\nfunction isValidMetaTag(tagName) {\n return typeof tagName === \"string\" && /^(meta|link)$/.test(tagName);\n}\nfunction Meta() {\n let {\n future\n } = useRemixContext();\n return future !== null && future !== void 0 && future.v2_meta ? /*#__PURE__*/React.createElement(V2Meta, null) : /*#__PURE__*/React.createElement(V1Meta, null);\n}\nfunction Await(props) {\n return /*#__PURE__*/React.createElement(Await$1, props);\n}\n\n/**\n * Tracks whether Remix has finished hydrating or not, so scripts can be skipped\n * during client-side updates.\n */\nlet isHydrated = false;\n/**\n * Renders the `<script>` tags needed for the initial render. Bundles for\n * additional routes are loaded later as needed.\n *\n * @param props Additional properties to add to each script tag that is rendered.\n * In addition to scripts, \\<link rel=\"modulepreload\"> tags receive the crossOrigin\n * property if provided.\n *\n * @see https://remix.run/components/scripts\n */\nfunction Scripts(props) {\n let {\n manifest,\n serverHandoffString,\n abortDelay\n } = useRemixContext();\n let {\n router,\n static: isStatic,\n staticContext\n } = useDataRouterContext();\n let {\n matches\n } = useDataRouterStateContext();\n let navigation = useNavigation();\n React.useEffect(() => {\n isHydrated = true;\n }, []);\n let deferredScripts = [];\n let initialScripts = React.useMemo(() => {\n var _manifest$hmr;\n let contextScript = staticContext ? `window.__remixContext = ${serverHandoffString};` : \" \";\n let activeDeferreds = staticContext === null || staticContext === void 0 ? void 0 : staticContext.activeDeferreds;\n // This sets up the __remixContext with utility functions used by the\n // deferred scripts.\n // - __remixContext.p is a function that takes a resolved value or error and returns a promise.\n // This is used for transmitting pre-resolved promises from the server to the client.\n // - __remixContext.n is a function that takes a routeID and key to returns a promise for later\n // resolution by the subsequently streamed chunks.\n // - __remixContext.r is a function that takes a routeID, key and value or error and resolves\n // the promise created by __remixContext.n.\n // - __remixContext.t is a a map or routeId to keys to an object containing `e` and `r` methods\n // to resolve or reject the promise created by __remixContext.n.\n // - __remixContext.a is the active number of deferred scripts that should be rendered to match\n // the SSR tree for hydration on the client.\n contextScript += !activeDeferreds ? \"\" : [\"__remixContext.p = function(v,e,p,x) {\", \" if (typeof e !== 'undefined') {\", process.env.NODE_ENV === \"development\" ? \" x=new Error(e.message);\\n x.stack=e.stack;\" : ' x=new Error(\"Unexpected Server Error\");\\n x.stack=undefined;', \" p=Promise.reject(x);\", \" } else {\", \" p=Promise.resolve(v);\", \" }\", \" return p;\", \"};\", \"__remixContext.n = function(i,k) {\", \" __remixContext.t = __remixContext.t || {};\", \" __remixContext.t[i] = __remixContext.t[i] || {};\", \" let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});\", typeof abortDelay === \"number\" ? `setTimeout(() => {if(typeof p._error !== \"undefined\" || typeof p._data !== \"undefined\"){return;} __remixContext.t[i][k].e(new Error(\"Server timeout.\"))}, ${abortDelay});` : \"\", \" return p;\", \"};\", \"__remixContext.r = function(i,k,v,e,p,x) {\", \" p = __remixContext.t[i][k];\", \" if (typeof e !== 'undefined') {\", process.env.NODE_ENV === \"development\" ? \" x=new Error(e.message);\\n x.stack=e.stack;\" : ' x=new Error(\"Unexpected Server Error\");\\n x.stack=undefined;', \" p.e(x);\", \" } else {\", \" p.r(v);\", \" }\", \"};\"].join(\"\\n\") + Object.entries(activeDeferreds).map(([routeId, deferredData]) => {\n let pendingKeys = new Set(deferredData.pendingKeys);\n let promiseKeyValues = deferredData.deferredKeys.map(key => {\n if (pendingKeys.has(key)) {\n deferredScripts.push( /*#__PURE__*/React.createElement(DeferredHydrationScript, {\n key: `${routeId} | ${key}`,\n deferredData: deferredData,\n routeId: routeId,\n dataKey: key,\n scriptProps: props\n }));\n return `${JSON.stringify(key)}:__remixContext.n(${JSON.stringify(routeId)}, ${JSON.stringify(key)})`;\n } else {\n let trackedPromise = deferredData.data[key];\n if (typeof trackedPromise._error !== \"undefined\") {\n let toSerialize = process.env.NODE_ENV === \"development\" ? {\n message: trackedPromise._error.message,\n stack: trackedPromise._error.stack\n } : {\n message: \"Unexpected Server Error\",\n stack: undefined\n };\n return `${JSON.stringify(key)}:__remixContext.p(!1, ${escapeHtml(JSON.stringify(toSerialize))})`;\n } else {\n if (typeof trackedPromise._data === \"undefined\") {\n throw new Error(`The deferred data for ${key} was not resolved, did you forget to return data from a deferred promise?`);\n }\n return `${JSON.stringify(key)}:__remixContext.p(${escapeHtml(JSON.stringify(trackedPromise._data))})`;\n }\n }\n }).join(\",\\n\");\n return `Object.assign(__remixContext.state.loaderData[${JSON.stringify(routeId)}], {${promiseKeyValues}});`;\n }).join(\"\\n\") + (deferredScripts.length > 0 ? `__remixContext.a=${deferredScripts.length};` : \"\");\n let routeModulesScript = !isStatic ? \" \" : `${(_manifest$hmr = manifest.hmr) !== null && _manifest$hmr !== void 0 && _manifest$hmr.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : \"\"}import ${JSON.stringify(manifest.url)};\n${matches.map((match, index) => `import * as route${index} from ${JSON.stringify(manifest.routes[match.route.id].module)};`).join(\"\\n\")}\nwindow.__remixRouteModules = {${matches.map((match, index) => `${JSON.stringify(match.route.id)}:route${index}`).join(\",\")}};\n\nimport(${JSON.stringify(manifest.entry.module)});`;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"script\", _extends({}, props, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: createHtml(contextScript),\n type: undefined\n })), /*#__PURE__*/React.createElement(\"script\", _extends({}, props, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: createHtml(routeModulesScript),\n type: \"module\",\n async: true\n })));\n // disabled deps array because we are purposefully only rendering this once\n // for hydration, after that we want to just continue rendering the initial\n // scripts as they were when the page first loaded\n // eslint-disable-next-line\n }, []);\n if (!isStatic && typeof __remixContext === \"object\" && __remixContext.a) {\n for (let i = 0; i < __remixContext.a; i++) {\n deferredScripts.push( /*#__PURE__*/React.createElement(DeferredHydrationScript, {\n key: i,\n scriptProps: props\n }));\n }\n }\n\n // avoid waterfall when importing the next route module\n let nextMatches = React.useMemo(() => {\n if (navigation.location) {\n // FIXME: can probably use transitionManager `nextMatches`\n let matches = matchRoutes(router.routes, navigation.location);\n invariant(matches, `No routes match path \"${navigation.location.pathname}\"`);\n return matches;\n }\n return [];\n }, [navigation.location, router.routes]);\n let routePreloads = matches.concat(nextMatches).map(match => {\n let route = manifest.routes[match.route.id];\n return (route.imports || []).concat([route.module]);\n }).flat(1);\n let preloads = isHydrated ? [] : manifest.entry.imports.concat(routePreloads);\n return isHydrated ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"link\", {\n rel: \"modulepreload\",\n href: manifest.entry.module,\n crossOrigin: props.crossOrigin\n }), dedupe(preloads).map(path => /*#__PURE__*/React.createElement(\"link\", {\n key: path,\n rel: \"modulepreload\",\n href: path,\n crossOrigin: props.crossOrigin\n })), initialScripts, deferredScripts);\n}\nfunction DeferredHydrationScript({\n dataKey,\n deferredData,\n routeId,\n scriptProps\n}) {\n if (typeof document === \"undefined\" && deferredData && dataKey && routeId) {\n invariant(deferredData.pendingKeys.includes(dataKey), `Deferred data for route ${routeId} with key ${dataKey} was not pending but tried to render a script for it.`);\n }\n return /*#__PURE__*/React.createElement(React.Suspense, {\n fallback:\n // This makes absolutely no sense. The server renders null as a fallback,\n // but when hydrating, we need to render a script tag to avoid a hydration issue.\n // To reproduce a hydration mismatch, just render null as a fallback.\n typeof document === \"undefined\" && deferredData && dataKey && routeId ? null : /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: \" \"\n }\n }))\n }, typeof document === \"undefined\" && deferredData && dataKey && routeId ? /*#__PURE__*/React.createElement(Await, {\n resolve: deferredData.data[dataKey],\n errorElement: /*#__PURE__*/React.createElement(ErrorDeferredHydrationScript, {\n dataKey: dataKey,\n routeId: routeId,\n scriptProps: scriptProps\n }),\n children: data => /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `__remixContext.r(${JSON.stringify(routeId)}, ${JSON.stringify(dataKey)}, ${escapeHtml(JSON.stringify(data))});`\n }\n }))\n }) : /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: \" \"\n }\n })));\n}\nfunction ErrorDeferredHydrationScript({\n dataKey,\n routeId,\n scriptProps\n}) {\n let error = useAsyncError();\n let toSerialize = process.env.NODE_ENV === \"development\" ? {\n message: error.message,\n stack: error.stack\n } : {\n message: \"Unexpected Server Error\",\n stack: undefined\n };\n return /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `__remixContext.r(${JSON.stringify(routeId)}, ${JSON.stringify(dataKey)}, !1, ${escapeHtml(JSON.stringify(toSerialize))});`\n }\n }));\n}\nfunction dedupe(array) {\n return [...new Set(array)];\n}\n\n// TODO: Can this be re-exported from RR?\n\nfunction useMatches() {\n let {\n routeModules\n } = useRemixContext();\n let matches = useMatches$1();\n return React.useMemo(() => matches.map(match => {\n let remixMatch = {\n id: match.id,\n pathname: match.pathname,\n params: match.params,\n data: match.data,\n // Need to grab handle here since we don't have it at client-side route\n // creation time\n handle: routeModules[match.id].handle\n };\n return remixMatch;\n }), [matches, routeModules]);\n}\n\n/**\n * Returns the JSON parsed data from the current route's `loader`.\n *\n * @see https://remix.run/hooks/use-loader-data\n */\nfunction useLoaderData() {\n return useLoaderData$1();\n}\n\n/**\n * Returns the JSON parsed data from the current route's `action`.\n *\n * @see https://remix.run/hooks/use-action-data\n */\nfunction useActionData() {\n return useActionData$1();\n}\n\n/**\n * Returns everything you need to know about a page transition to build pending\n * navigation indicators and optimistic UI on data mutations.\n *\n * @deprecated in favor of useNavigation\n *\n * @see https://remix.run/hooks/use-transition\n */\nfunction useTransition() {\n let navigation = useNavigation();\n React.useEffect(() => {\n logDeprecationOnce(useTransitionWarning);\n }, []);\n return React.useMemo(() => convertNavigationToTransition(navigation), [navigation]);\n}\nfunction convertNavigationToTransition(navigation) {\n let {\n location,\n state,\n formMethod,\n formAction,\n formEncType,\n formData\n } = navigation;\n if (!location) {\n return IDLE_TRANSITION;\n }\n let isActionSubmission = formMethod != null && [\"POST\", \"PUT\", \"PATCH\", \"DELETE\"].includes(formMethod.toUpperCase());\n if (state === \"submitting\" && formMethod && formAction && formEncType && formData) {\n if (isActionSubmission) {\n // Actively submitting to an action\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionSubmission\"\n };\n return transition;\n } else {\n // @remix-run/router doesn't mark loader submissions as state: \"submitting\"\n invariant(false, \"Encountered an unexpected navigation scenario in useTransition()\");\n }\n }\n if (state === \"loading\") {\n let {\n _isRedirect,\n _isFetchActionRedirect\n } = location.state || {};\n if (formMethod && formAction && formEncType && formData) {\n if (!_isRedirect) {\n if (isActionSubmission) {\n // We're reloading the same location after an action submission\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionReload\"\n };\n return transition;\n } else {\n // The new router fixes a bug in useTransition where the submission\n // \"action\" represents the request URL not the state of the <form> in\n // the DOM. Back-port it here to maintain behavior, but useNavigation\n // will fix this bug.\n let url = new URL(formAction, window.location.origin);\n\n // This typing override should be safe since this is only running for\n // GET submissions and over in @remix-run/router we have an invariant\n // if you have any non-string values in your FormData when we attempt\n // to convert them to URLSearchParams\n url.search = new URLSearchParams(formData.entries()).toString();\n\n // Actively \"submitting\" to a loader\n let transition = {\n location,\n state: \"submitting\",\n submission: {\n method: formMethod.toUpperCase(),\n action: url.pathname + url.search,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"loaderSubmission\"\n };\n return transition;\n }\n } else {\n // Redirecting after a submission\n if (isActionSubmission) {\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionRedirect\"\n };\n return transition;\n } else {\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"loaderSubmissionRedirect\"\n };\n return transition;\n }\n }\n } else if (_isRedirect) {\n if (_isFetchActionRedirect) {\n let transition = {\n location,\n state,\n submission: undefined,\n type: \"fetchActionRedirect\"\n };\n return transition;\n } else {\n let transition = {\n location,\n state,\n submission: undefined,\n type: \"normalRedirect\"\n };\n return transition;\n }\n }\n }\n\n // If no scenarios above match, then it's a normal load!\n let transition = {\n location,\n state: \"loading\",\n submission: undefined,\n type: \"normalLoad\"\n };\n return transition;\n}\n\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n *\n * @see https://remix.run/api/remix#usefetchers\n */\nfunction useFetchers() {\n let fetchers = useFetchers$1();\n return fetchers.map(f => {\n let fetcher = convertRouterFetcherToRemixFetcher({\n state: f.state,\n data: f.data,\n formMethod: f.formMethod,\n formAction: f.formAction,\n formEncType: f.formEncType,\n formData: f.formData,\n json: f.json,\n text: f.text,\n \" _hasFetcherDoneAnything \": f[\" _hasFetcherDoneAnything \"]\n });\n addFetcherDeprecationWarnings(fetcher);\n return fetcher;\n });\n}\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n *\n * @see https://remix.run/hooks/use-fetcher\n */\nfunction useFetcher() {\n let fetcherRR = useFetcher$1();\n return React.useMemo(() => {\n let remixFetcher = convertRouterFetcherToRemixFetcher({\n state: fetcherRR.state,\n data: fetcherRR.data,\n formMethod: fetcherRR.formMethod,\n formAction: fetcherRR.formAction,\n formEncType: fetcherRR.formEncType,\n formData: fetcherRR.formData,\n json: fetcherRR.json,\n text: fetcherRR.text,\n \" _hasFetcherDoneAnything \": fetcherRR[\" _hasFetcherDoneAnything \"]\n });\n let fetcherWithComponents = {\n ...remixFetcher,\n load: fetcherRR.load,\n submit: fetcherRR.submit,\n Form: fetcherRR.Form\n };\n addFetcherDeprecationWarnings(fetcherWithComponents);\n return fetcherWithComponents;\n }, [fetcherRR]);\n}\nfunction addFetcherDeprecationWarnings(fetcher) {\n let type = fetcher.type;\n Object.defineProperty(fetcher, \"type\", {\n get() {\n logDeprecationOnce(fetcherTypeWarning);\n return type;\n },\n set(value) {\n // Devs should *not* be doing this but we don't want to break their\n // current app if they are\n type = value;\n },\n // These settings should make this behave like a normal object `type` field\n configurable: true,\n enumerable: true\n });\n let submission = fetcher.submission;\n Object.defineProperty(fetcher, \"submission\", {\n get() {\n logDeprecationOnce(fetcherSubmissionWarning);\n return submission;\n },\n set(value) {\n // Devs should *not* be doing this but we don't want to break their\n // current app if they are\n submission = value;\n },\n // These settings should make this behave like a normal object `type` field\n configurable: true,\n enumerable: true\n });\n}\nfunction convertRouterFetcherToRemixFetcher(fetcherRR) {\n let {\n state,\n formMethod,\n formAction,\n formEncType,\n formData,\n json,\n text,\n data\n } = fetcherRR;\n let isActionSubmission = formMethod != null && [\"POST\", \"PUT\", \"PATCH\", \"DELETE\"].includes(formMethod.toUpperCase());\n if (state === \"idle\") {\n if (fetcherRR[\" _hasFetcherDoneAnything \"] === true) {\n let fetcher = {\n state: \"idle\",\n type: \"done\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n submission: undefined,\n data\n };\n return fetcher;\n } else {\n let fetcher = IDLE_FETCHER;\n return fetcher;\n }\n }\n if (state === \"submitting\" && formMethod && formAction && formEncType && (formData || json !== undefined || text !== undefined)) {\n if (isActionSubmission) {\n // Actively submitting to an action\n let fetcher = {\n state,\n type: \"actionSubmission\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n } else {\n // @remix-run/router doesn't mark loader submissions as state: \"submitting\"\n invariant(false, \"Encountered an unexpected fetcher scenario in useFetcher()\");\n }\n }\n if (state === \"loading\") {\n if (formMethod && formAction && formEncType) {\n if (isActionSubmission) {\n if (data) {\n // In a loading state but we have data - must be an actionReload\n let fetcher = {\n state,\n type: \"actionReload\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state,\n type: \"actionRedirect\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data: undefined\n };\n return fetcher;\n }\n } else {\n // The new router fixes a bug in useTransition where the submission\n // \"action\" represents the request URL not the state of the <form> in\n // the DOM. Back-port it here to maintain behavior, but useNavigation\n // will fix this bug.\n let url = new URL(formAction, window.location.origin);\n if (formData) {\n // This typing override should be safe since this is only running for\n // GET submissions and over in @remix-run/router we have an invariant\n // if you have any non-string values in your FormData when we attempt\n // to convert them to URLSearchParams\n url.search = new URLSearchParams(formData.entries()).toString();\n }\n\n // Actively \"submitting\" to a loader\n let fetcher = {\n state: \"submitting\",\n type: \"loaderSubmission\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: url.pathname + url.search,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n }\n }\n }\n\n // If all else fails, it's a normal load!\n let fetcher = {\n state: \"loading\",\n type: \"normalLoad\",\n formMethod: undefined,\n formAction: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n formEncType: undefined,\n submission: undefined,\n data\n };\n return fetcher;\n}\n\n// Dead Code Elimination magic for production builds.\n// This way devs don't have to worry about doing the NODE_ENV check themselves.\n// If running an un-bundled server outside of `remix dev` you will still need\n// to set the REMIX_DEV_SERVER_WS_PORT manually.\nconst LiveReload = process.env.NODE_ENV !== \"development\" ? () => null : function LiveReload({\n // TODO: remove REMIX_DEV_SERVER_WS_PORT in v2\n port,\n timeoutMs = 1000,\n nonce = undefined\n}) {\n let js = String.raw;\n return /*#__PURE__*/React.createElement(\"script\", {\n nonce: nonce,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: js`\n function remixLiveReloadConnect(config) {\n let protocol = location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n let host = location.hostname;\n let port = ${port} || (window.__remixContext && window.__remixContext.dev && window.__remixContext.dev.port) || ${Number(process.env.REMIX_DEV_SERVER_WS_PORT || 8002)};\n let socketPath = protocol + \"//\" + host + \":\" + port + \"/socket\";\n let ws = new WebSocket(socketPath);\n ws.onmessage = async (message) => {\n let event = JSON.parse(message.data);\n if (event.type === \"LOG\") {\n console.log(event.message);\n }\n if (event.type === \"RELOAD\") {\n console.log(\"💿 Reloading window ...\");\n window.location.reload();\n }\n if (event.type === \"HMR\") {\n if (!window.__hmr__ || !window.__hmr__.contexts) {\n console.log(\"💿 [HMR] No HMR context, reloading window ...\");\n window.location.reload();\n return;\n }\n if (!event.updates || !event.updates.length) return;\n let updateAccepted = false;\n let needsRevalidation = new Set();\n for (let update of event.updates) {\n console.log(\"[HMR] \" + update.reason + \" [\" + update.id +\"]\")\n if (update.revalidate) {\n needsRevalidation.add(update.routeId);\n console.log(\"[HMR] Revalidating [\" + update.routeId + \"]\");\n }\n let imported = await import(update.url + '?t=' + event.assetsManifest.hmr.timestamp);\n if (window.__hmr__.contexts[update.id]) {\n let accepted = window.__hmr__.contexts[update.id].emit(\n imported\n );\n if (accepted) {\n console.log(\"[HMR] Updated accepted by\", update.id);\n updateAccepted = true;\n }\n }\n }\n if (event.assetsManifest && window.__hmr__.contexts[\"remix:manifest\"]) {\n let accepted = window.__hmr__.contexts[\"remix:manifest\"].emit(\n { needsRevalidation, assetsManifest: event.assetsManifest }\n );\n if (accepted) {\n console.log(\"[HMR] Updated accepted by\", \"remix:manifest\");\n updateAccepted = true;\n }\n }\n if (!updateAccepted) {\n console.log(\"[HMR] Updated rejected, reloading...\");\n window.location.reload();\n }\n }\n };\n ws.onopen = () => {\n if (config && typeof config.onOpen === \"function\") {\n config.onOpen();\n }\n };\n ws.onclose = (event) => {\n if (event.code === 1006) {\n console.log(\"Remix dev asset server web socket closed. Reconnecting...\");\n setTimeout(\n () =>\n remixLiveReloadConnect({\n onOpen: () => window.location.reload(),\n }),\n ${String(timeoutMs)}\n );\n }\n };\n ws.onerror = (error) => {\n console.log(\"Remix dev asset server web socket error:\");\n console.error(error);\n };\n }\n remixLiveReloadConnect();\n `\n }\n });\n};\nfunction mergeRefs(...refs) {\n return value => {\n refs.forEach(ref => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n });\n };\n}\n\nexport { Await, Link, Links, LiveReload, Meta, NavLink, PrefetchPageLinks, RemixContext, RemixRoute, RemixRouteError, Scripts, composeEventHandlers, useActionData, useFetcher, useFetchers, useLoaderData, useMatches, useTransition };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport React__default, { useContext } from 'react';\nimport { useRouteError, isRouteErrorResponse } from 'react-router-dom';\n\nclass RemixErrorBoundary extends React__default.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: props.error || null,\n location: props.location\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application (even the HTML!) that will have no effect--the error page\n // continues to display. This gives us a mechanism to recover from the error\n // when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location) {\n return {\n error: props.error || null,\n location: props.location\n };\n }\n\n // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error || state.error,\n location: state.location\n };\n }\n render() {\n if (this.state.error) {\n return /*#__PURE__*/React__default.createElement(this.props.component, {\n error: this.state.error\n });\n } else {\n return this.props.children;\n }\n }\n}\n\n/**\n * When app's don't provide a root level ErrorBoundary, we default to this.\n */\nfunction RemixRootDefaultErrorBoundary({\n error\n}) {\n // Only log client side to avoid double-logging on the server\n React__default.useEffect(() => {\n console.error(error);\n }, [error]);\n return /*#__PURE__*/React__default.createElement(\"html\", {\n lang: \"en\"\n }, /*#__PURE__*/React__default.createElement(\"head\", null, /*#__PURE__*/React__default.createElement(\"meta\", {\n charSet: \"utf-8\"\n }), /*#__PURE__*/React__default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1, viewport-fit=cover\"\n }), /*#__PURE__*/React__default.createElement(\"title\", null, \"Application Error!\")), /*#__PURE__*/React__default.createElement(\"body\", null, /*#__PURE__*/React__default.createElement(\"main\", {\n style: {\n fontFamily: \"system-ui, sans-serif\",\n padding: \"2rem\"\n }\n }, /*#__PURE__*/React__default.createElement(\"h1\", {\n style: {\n fontSize: \"24px\"\n }\n }, \"Application Error\"), error.stack ? /*#__PURE__*/React__default.createElement(\"pre\", {\n style: {\n padding: \"2rem\",\n background: \"hsla(10, 50%, 50%, 0.1)\",\n color: \"red\",\n overflow: \"auto\"\n }\n }, error.stack) : null), /*#__PURE__*/React__default.createElement(\"script\", {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"💿 Hey developer👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information.\"\n );\n `\n }\n })));\n}\nfunction V2_RemixRootDefaultErrorBoundary() {\n let error = useRouteError();\n if (isRouteErrorResponse(error)) {\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultCatchBoundaryImpl, {\n caught: error\n });\n } else if (error instanceof Error) {\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultErrorBoundary, {\n error: error\n });\n } else {\n let errorString = error == null ? \"Unknown Error\" : typeof error === \"object\" && \"toString\" in error ? error.toString() : JSON.stringify(error);\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultErrorBoundary, {\n error: new Error(errorString)\n });\n }\n}\nlet RemixCatchContext = /*#__PURE__*/React__default.createContext(undefined);\n\n/**\n * Returns the status code and thrown response data.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/catch-boundary\n */\nfunction useCatch() {\n return useContext(RemixCatchContext);\n}\nfunction RemixCatchBoundary({\n catch: catchVal,\n component: Component,\n children\n}) {\n if (catchVal) {\n return /*#__PURE__*/React__default.createElement(RemixCatchContext.Provider, {\n value: catchVal\n }, /*#__PURE__*/React__default.createElement(Component, null));\n }\n return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);\n}\n\n/**\n * When app's don't provide a root level CatchBoundary, we default to this.\n */\nfunction RemixRootDefaultCatchBoundary() {\n let caught = useCatch();\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultCatchBoundaryImpl, {\n caught: caught\n });\n}\nfunction RemixRootDefaultCatchBoundaryImpl({\n caught\n}) {\n return /*#__PURE__*/React__default.createElement(\"html\", {\n lang: \"en\"\n }, /*#__PURE__*/React__default.createElement(\"head\", null, /*#__PURE__*/React__default.createElement(\"meta\", {\n charSet: \"utf-8\"\n }), /*#__PURE__*/React__default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1, viewport-fit=cover\"\n }), /*#__PURE__*/React__default.createElement(\"title\", null, \"Unhandled Thrown Response!\")), /*#__PURE__*/React__default.createElement(\"body\", null, /*#__PURE__*/React__default.createElement(\"h1\", {\n style: {\n fontFamily: \"system-ui, sans-serif\",\n padding: \"2rem\"\n }\n }, caught.status, \" \", caught.statusText), /*#__PURE__*/React__default.createElement(\"script\", {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"💿 Hey developer👋. You can provide a way better UX than this when your app throws 404s (and other responses). Check out https://remix.run/guides/not-found for more information.\"\n );\n `\n }\n })));\n}\n\nexport { RemixCatchBoundary, RemixErrorBoundary, RemixRootDefaultCatchBoundary, RemixRootDefaultErrorBoundary, V2_RemixRootDefaultErrorBoundary, useCatch };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nexport { invariant as default };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { parsePath } from 'react-router-dom';\nimport { loadRouteModule } from './routeModules.js';\n\n/**\n * Represents a `<link>` element.\n *\n * WHATWG Specification: https://html.spec.whatwg.org/multipage/semantics.html#the-link-element\n */\n\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Gets all the links for a set of matches. The modules are assumed to have been\n * loaded already.\n */\nfunction getLinksForMatches(matches, routeModules, manifest) {\n let descriptors = matches.map(match => {\n var _module$links;\n let module = routeModules[match.route.id];\n return ((_module$links = module.links) === null || _module$links === void 0 ? void 0 : _module$links.call(module)) || [];\n }).flat(1);\n let preloads = getCurrentPageModulePreloadHrefs(matches, manifest);\n return dedupe(descriptors, preloads);\n}\nasync function prefetchStyleLinks(routeModule) {\n if (!routeModule.links) return;\n let descriptors = routeModule.links();\n if (!descriptors) return;\n let styleLinks = [];\n for (let descriptor of descriptors) {\n if (!isPageLinkDescriptor(descriptor) && descriptor.rel === \"stylesheet\") {\n styleLinks.push({\n ...descriptor,\n rel: \"preload\",\n as: \"style\"\n });\n }\n }\n\n // don't block for non-matching media queries\n let matchingLinks = styleLinks.filter(link => !link.media || window.matchMedia(link.media).matches);\n await Promise.all(matchingLinks.map(prefetchStyleLink));\n}\nasync function prefetchStyleLink(descriptor) {\n return new Promise(resolve => {\n let link = document.createElement(\"link\");\n Object.assign(link, descriptor);\n function removeLink() {\n // if a navigation interrupts this prefetch React will update the <head>\n // and remove the link we put in there manually, so we check if it's still\n // there before trying to remove it\n if (document.head.contains(link)) {\n document.head.removeChild(link);\n }\n }\n link.onload = () => {\n removeLink();\n resolve();\n };\n link.onerror = () => {\n removeLink();\n resolve();\n };\n document.head.appendChild(link);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\nfunction isPageLinkDescriptor(object) {\n return object != null && typeof object.page === \"string\";\n}\nfunction isHtmlLinkDescriptor(object) {\n if (object == null) return false;\n\n // <link> may not have an href if <link rel=\"preload\"> is used with imagesrcset + imagesizes\n // https://github.com/remix-run/remix/issues/184\n // https://html.spec.whatwg.org/commit-snapshots/cb4f5ff75de5f4cbd7013c4abad02f21c77d4d1c/#attr-link-imagesrcset\n if (object.href == null) {\n return object.rel === \"preload\" && (typeof object.imageSrcSet === \"string\" || typeof object.imagesrcset === \"string\") && (typeof object.imageSizes === \"string\" || typeof object.imagesizes === \"string\");\n }\n return typeof object.rel === \"string\" && typeof object.href === \"string\";\n}\nasync function getStylesheetPrefetchLinks(matches, manifest, routeModules) {\n let links = await Promise.all(matches.map(async match => {\n let mod = await loadRouteModule(manifest.routes[match.route.id], routeModules);\n return mod.links ? mod.links() : [];\n }));\n return links.flat(1).filter(isHtmlLinkDescriptor).filter(link => link.rel === \"stylesheet\" || link.rel === \"preload\").map(link => link.rel === \"preload\" ? {\n ...link,\n rel: \"prefetch\"\n } : {\n ...link,\n rel: \"prefetch\",\n as: \"style\"\n });\n}\n\n// This is ridiculously identical to transition.ts `filterMatchesToLoad`\nfunction getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {\n let path = parsePathPatch(page);\n let isNew = (match, index) => {\n if (!currentMatches[index]) return true;\n return match.route.id !== currentMatches[index].route.id;\n };\n let matchPathChanged = (match, index) => {\n var _currentMatches$index;\n return (\n // param change, /users/123 -> /users/456\n currentMatches[index].pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n ((_currentMatches$index = currentMatches[index].route.path) === null || _currentMatches$index === void 0 ? void 0 : _currentMatches$index.endsWith(\"*\")) && currentMatches[index].params[\"*\"] !== match.params[\"*\"]\n );\n };\n\n // NOTE: keep this mostly up-to-date w/ the transition data diff, but this\n // version doesn't care about submissions\n let newMatches = mode === \"data\" && location.search !== path.search ?\n // this is really similar to stuff in transition.ts, maybe somebody smarter\n // than me (or in less of a hurry) can share some of it. You're the best.\n nextMatches.filter((match, index) => {\n let manifestRoute = manifest.routes[match.route.id];\n if (!manifestRoute.hasLoader) {\n return false;\n }\n if (isNew(match, index) || matchPathChanged(match, index)) {\n return true;\n }\n if (match.route.shouldRevalidate) {\n var _currentMatches$;\n let routeChoice = match.route.shouldRevalidate({\n currentUrl: new URL(location.pathname + location.search + location.hash, window.origin),\n currentParams: ((_currentMatches$ = currentMatches[0]) === null || _currentMatches$ === void 0 ? void 0 : _currentMatches$.params) || {},\n nextUrl: new URL(page, window.origin),\n nextParams: match.params,\n defaultShouldRevalidate: true\n });\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return true;\n }) : nextMatches.filter((match, index) => {\n let manifestRoute = manifest.routes[match.route.id];\n return (mode === \"assets\" || manifestRoute.hasLoader) && (isNew(match, index) || matchPathChanged(match, index));\n });\n return newMatches;\n}\nfunction getDataLinkHrefs(page, matches, manifest) {\n let path = parsePathPatch(page);\n return dedupeHrefs(matches.filter(match => manifest.routes[match.route.id].hasLoader).map(match => {\n let {\n pathname,\n search\n } = path;\n let searchParams = new URLSearchParams(search);\n searchParams.set(\"_data\", match.route.id);\n return `${pathname}?${searchParams}`;\n }));\n}\nfunction getModuleLinkHrefs(matches, manifestPatch) {\n return dedupeHrefs(matches.map(match => {\n let route = manifestPatch.routes[match.route.id];\n let hrefs = [route.module];\n if (route.imports) {\n hrefs = hrefs.concat(route.imports);\n }\n return hrefs;\n }).flat(1));\n}\n\n// The `<Script>` will render rel=modulepreload for the current page, we don't\n// need to include them in a page prefetch, this gives us the list to remove\n// while deduping.\nfunction getCurrentPageModulePreloadHrefs(matches, manifest) {\n return dedupeHrefs(matches.map(match => {\n let route = manifest.routes[match.route.id];\n let hrefs = [route.module];\n if (route.imports) {\n hrefs = hrefs.concat(route.imports);\n }\n return hrefs;\n }).flat(1));\n}\nfunction dedupeHrefs(hrefs) {\n return [...new Set(hrefs)];\n}\nfunction dedupe(descriptors, preloads) {\n let set = new Set();\n let preloadsSet = new Set(preloads);\n return descriptors.reduce((deduped, descriptor) => {\n let alreadyModulePreload = !isPageLinkDescriptor(descriptor) && descriptor.as === \"script\" && descriptor.href && preloadsSet.has(descriptor.href);\n if (alreadyModulePreload) {\n return deduped;\n }\n let str = JSON.stringify(descriptor);\n if (!set.has(str)) {\n set.add(str);\n deduped.push(descriptor);\n }\n return deduped;\n }, []);\n}\n\n// https://github.com/remix-run/history/issues/897\nfunction parsePathPatch(href) {\n let path = parsePath(href);\n if (path.search === undefined) path.search = \"\";\n return path;\n}\n\nexport { dedupe, getDataLinkHrefs, getLinksForMatches, getModuleLinkHrefs, getNewMatchesForLinks, getStylesheetPrefetchLinks, isHtmlLinkDescriptor, isPageLinkDescriptor, prefetchStyleLinks };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n/**\n * A React component that is rendered when the server throws a Response.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/catch-boundary\n */\n\n/**\n * A React component that is rendered when there is an error on a route.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/error-boundary\n */\n\n/**\n * V2 version of the ErrorBoundary that eliminates the distinction between\n * Error and Catch Boundaries and behaves like RR 6.4 errorElement and captures\n * errors with useRouteError()\n */\n\n/**\n * A function that defines `<link>` tags to be inserted into the `<head>` of\n * the document on route transitions.\n *\n * @see https://remix.run/route/meta\n */\n\n/**\n * A function that returns an object of name + content pairs to use for\n * `<meta>` tags for a route. These tags will be merged with (and take\n * precedence over) tags from parent routes.\n *\n * @see https://remix.run/route/meta\n */\n\n// TODO: Replace in v2\n\n/**\n * A name/content pair used to render `<meta>` tags in a meta function for a\n * route. The value can be either a string, which will render a single `<meta>`\n * tag, or an array of strings that will render multiple tags with the same\n * `name` attribute.\n */\n\n// TODO: Replace in v2\n\n/**\n * A React component that is rendered for a route.\n */\n\n/**\n * An arbitrary object that is associated with a route.\n *\n * @see https://remix.run/route/handle\n */\n\nasync function loadRouteModule(route, routeModulesCache) {\n if (route.id in routeModulesCache) {\n return routeModulesCache[route.id];\n }\n try {\n let routeModule = await import( /* webpackIgnore: true */route.module);\n routeModulesCache[route.id] = routeModule;\n return routeModule;\n } catch (error) {\n // User got caught in the middle of a deploy and the CDN no longer has the\n // asset we're trying to import! Reload from the server and the user\n // (should) get the new manifest--unless the developer purged the static\n // assets, the manifest path, but not the documents 😬\n window.location.reload();\n return new Promise(() => {\n // check out of this hook cause the DJs never gonna re[s]olve this\n });\n }\n}\n\n/**\n * @deprecated The `unstable_shouldReload` function has been removed, so this\n * function will never run and route data will be revalidated on every request.\n * Please update the function name to `shouldRevalidate` and use the\n * `ShouldRevalidateFunction` interface.\n */\n\nexport { loadRouteModule };\n","import type {\n FormEncType,\n HTMLFormMethod,\n RelativeRoutingType,\n} from \"@remix-run/router\";\nimport { stripBasename, UNSAFE_warning as warning } from \"@remix-run/router\";\n\nexport const defaultMethod: HTMLFormMethod = \"get\";\nconst defaultEncType: FormEncType = \"application/x-www-form-urlencoded\";\n\nexport function isHtmlElement(object: any): object is HTMLElement {\n return object != null && typeof object.tagName === \"string\";\n}\n\nexport function isButtonElement(object: any): object is HTMLButtonElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\n\nexport function isFormElement(object: any): object is HTMLFormElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\n\nexport function isInputElement(object: any): object is HTMLInputElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\n\ntype LimitedMouseEvent = Pick<\n MouseEvent,\n \"button\" | \"metaKey\" | \"altKey\" | \"ctrlKey\" | \"shiftKey\"\n>;\n\nfunction isModifiedEvent(event: LimitedMouseEvent) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nexport function shouldProcessLinkClick(\n event: LimitedMouseEvent,\n target?: string\n) {\n return (\n event.button === 0 && // Ignore everything but left clicks\n (!target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n );\n}\n\nexport type ParamKeyValuePair = [string, string];\n\nexport type URLSearchParamsInit =\n | string\n | ParamKeyValuePair[]\n | Record<string, string | string[]>\n | URLSearchParams;\n\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\nexport function createSearchParams(\n init: URLSearchParamsInit = \"\"\n): URLSearchParams {\n return new URLSearchParams(\n typeof init === \"string\" ||\n Array.isArray(init) ||\n init instanceof URLSearchParams\n ? init\n : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [] as ParamKeyValuePair[])\n );\n}\n\nexport function getSearchParamsForLocation(\n locationSearch: string,\n defaultSearchParams: URLSearchParams | null\n) {\n let searchParams = createSearchParams(locationSearch);\n\n if (defaultSearchParams) {\n for (let key of defaultSearchParams.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n }\n }\n\n return searchParams;\n}\n\n// Thanks https://github.com/sindresorhus/type-fest!\ntype JsonObject = { [Key in string]: JsonValue } & {\n [Key in string]?: JsonValue | undefined;\n};\ntype JsonArray = JsonValue[] | readonly JsonValue[];\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | JsonObject | JsonArray;\n\nexport type SubmitTarget =\n | HTMLFormElement\n | HTMLButtonElement\n | HTMLInputElement\n | FormData\n | URLSearchParams\n | JsonValue\n | null;\n\n// One-time check for submitter support\nlet _formDataSupportsSubmitter: boolean | null = null;\n\nfunction isFormDataSubmitterSupported() {\n if (_formDataSupportsSubmitter === null) {\n try {\n new FormData(\n document.createElement(\"form\"),\n // @ts-expect-error if FormData supports the submitter parameter, this will throw\n 0\n );\n _formDataSupportsSubmitter = false;\n } catch (e) {\n _formDataSupportsSubmitter = true;\n }\n }\n return _formDataSupportsSubmitter;\n}\n\nexport interface SubmitOptions {\n /**\n * The HTTP method used to submit the form. Overrides `<form method>`.\n * Defaults to \"GET\".\n */\n method?: HTMLFormMethod;\n\n /**\n * The action URL path used to submit the form. Overrides `<form action>`.\n * Defaults to the path of the current route.\n */\n action?: string;\n\n /**\n * The encoding used to submit the form. Overrides `<form encType>`.\n * Defaults to \"application/x-www-form-urlencoded\".\n */\n encType?: FormEncType;\n\n /**\n * Set `true` to replace the current entry in the browser's history stack\n * instead of creating a new one (i.e. stay on \"the same page\"). Defaults\n * to `false`.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * In browser-based environments, prevent resetting scroll after this\n * navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n}\n\nconst supportedFormEncTypes: Set<FormEncType> = new Set([\n \"application/x-www-form-urlencoded\",\n \"multipart/form-data\",\n \"text/plain\",\n]);\n\nfunction getFormEncType(encType: string | null) {\n if (encType != null && !supportedFormEncTypes.has(encType as FormEncType)) {\n warning(\n false,\n `\"${encType}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` ` +\n `and will default to \"${defaultEncType}\"`\n );\n\n return null;\n }\n return encType;\n}\n\nexport function getFormSubmissionInfo(\n target: SubmitTarget,\n basename: string\n): {\n action: string | null;\n method: string;\n encType: string;\n formData: FormData | undefined;\n body: any;\n} {\n let method: string;\n let action: string | null;\n let encType: string;\n let formData: FormData | undefined;\n let body: any;\n\n if (isFormElement(target)) {\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we'll\n // re-prefix in the router\n let attr = target.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n method = target.getAttribute(\"method\") || defaultMethod;\n encType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n\n formData = new FormData(target);\n } else if (\n isButtonElement(target) ||\n (isInputElement(target) &&\n (target.type === \"submit\" || target.type === \"image\"))\n ) {\n let form = target.form;\n\n if (form == null) {\n throw new Error(\n `Cannot submit a <button> or <input type=\"submit\"> without a <form>`\n );\n }\n\n // <button>/<input type=\"submit\"> may override attributes of <form>\n\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we'll\n // re-prefix in the router\n let attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n\n method =\n target.getAttribute(\"formmethod\") ||\n form.getAttribute(\"method\") ||\n defaultMethod;\n encType =\n getFormEncType(target.getAttribute(\"formenctype\")) ||\n getFormEncType(form.getAttribute(\"enctype\")) ||\n defaultEncType;\n\n // Build a FormData object populated from a form and submitter\n formData = new FormData(form, target);\n\n // If this browser doesn't support the `FormData(el, submitter)` format,\n // then tack on the submitter value at the end. This is a lightweight\n // solution that is not 100% spec compliant. For complete support in older\n // browsers, consider using the `formdata-submitter-polyfill` package\n if (!isFormDataSubmitterSupported()) {\n let { name, type, value } = target;\n if (type === \"image\") {\n let prefix = name ? `${name}.` : \"\";\n formData.append(`${prefix}x`, \"0\");\n formData.append(`${prefix}y`, \"0\");\n } else if (name) {\n formData.append(name, value);\n }\n }\n } else if (isHtmlElement(target)) {\n throw new Error(\n `Cannot submit element that is not <form>, <button>, or ` +\n `<input type=\"submit|image\">`\n );\n } else {\n method = defaultMethod;\n action = null;\n encType = defaultEncType;\n body = target;\n }\n\n // Send body for <Form encType=\"text/plain\" so we encode it into text\n if (formData && encType === \"text/plain\") {\n body = formData;\n formData = undefined;\n }\n\n return { action, method: method.toLowerCase(), encType, formData, body };\n}\n","/**\n * NOTE: If you refactor this to split up the modules into separate files,\n * you'll need to update the rollup config for react-router-dom-v5-compat.\n */\nimport * as React from \"react\";\nimport type {\n FutureConfig,\n Location,\n NavigateOptions,\n NavigationType,\n RelativeRoutingType,\n RouteObject,\n To,\n} from \"react-router\";\nimport {\n Router,\n createPath,\n useHref,\n useLocation,\n useMatches,\n useNavigate,\n useNavigation,\n useResolvedPath,\n unstable_useBlocker as useBlocker,\n UNSAFE_DataRouterContext as DataRouterContext,\n UNSAFE_DataRouterStateContext as DataRouterStateContext,\n UNSAFE_NavigationContext as NavigationContext,\n UNSAFE_RouteContext as RouteContext,\n UNSAFE_mapRouteProperties as mapRouteProperties,\n UNSAFE_useRouteId as useRouteId,\n} from \"react-router\";\nimport type {\n BrowserHistory,\n Fetcher,\n FormEncType,\n FormMethod,\n FutureConfig as RouterFutureConfig,\n GetScrollRestorationKeyFunction,\n HashHistory,\n History,\n HTMLFormMethod,\n HydrationState,\n Router as RemixRouter,\n V7_FormMethod,\n} from \"@remix-run/router\";\nimport {\n createRouter,\n createBrowserHistory,\n createHashHistory,\n joinPaths,\n stripBasename,\n ErrorResponse,\n UNSAFE_invariant as invariant,\n UNSAFE_warning as warning,\n} from \"@remix-run/router\";\n\nimport type {\n SubmitOptions,\n ParamKeyValuePair,\n URLSearchParamsInit,\n SubmitTarget,\n} from \"./dom\";\nimport {\n createSearchParams,\n defaultMethod,\n getFormSubmissionInfo,\n getSearchParamsForLocation,\n shouldProcessLinkClick,\n} from \"./dom\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Re-exports\n////////////////////////////////////////////////////////////////////////////////\n\nexport type {\n FormEncType,\n FormMethod,\n GetScrollRestorationKeyFunction,\n ParamKeyValuePair,\n SubmitOptions,\n URLSearchParamsInit,\n V7_FormMethod,\n};\nexport { createSearchParams };\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n unstable_Blocker,\n unstable_BlockerFunction,\n DataRouteMatch,\n DataRouteObject,\n Fetcher,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LazyRouteFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n To,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n unstable_useBlocker,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_useRouteId,\n} from \"react-router\";\n//#endregion\n\ndeclare global {\n var __staticRouterHydrationData: HydrationState | undefined;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Routers\n////////////////////////////////////////////////////////////////////////////////\n\ninterface DOMRouterOpts {\n basename?: string;\n future?: Partial<Omit<RouterFutureConfig, \"v7_prependBasename\">>;\n hydrationData?: HydrationState;\n window?: Window;\n}\n\nexport function createBrowserRouter(\n routes: RouteObject[],\n opts?: DOMRouterOpts\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n future: {\n ...opts?.future,\n v7_prependBasename: true,\n },\n history: createBrowserHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n }).initialize();\n}\n\nexport function createHashRouter(\n routes: RouteObject[],\n opts?: DOMRouterOpts\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n future: {\n ...opts?.future,\n v7_prependBasename: true,\n },\n history: createHashHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n }).initialize();\n}\n\nfunction parseHydrationData(): HydrationState | undefined {\n let state = window?.__staticRouterHydrationData;\n if (state && state.errors) {\n state = {\n ...state,\n errors: deserializeErrors(state.errors),\n };\n }\n return state;\n}\n\nfunction deserializeErrors(\n errors: RemixRouter[\"state\"][\"errors\"]\n): RemixRouter[\"state\"][\"errors\"] {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized: RemixRouter[\"state\"][\"errors\"] = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponse(\n val.status,\n val.statusText,\n val.data,\n val.internal === true\n );\n } else if (val && val.__type === \"Error\") {\n let error = new Error(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don't serialize SSR stack traces for security reasons\n error.stack = \"\";\n serialized[key] = error;\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn't exist in `React`:\n * import { startTransition } from \"react\"\n * import * as React from from \"react\";\n \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from \"react\";\n \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from \"react\";\n const START_TRANSITION = \"startTransition\";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\nexport interface BrowserRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nexport function BrowserRouter({\n basename,\n children,\n future,\n window,\n}: BrowserRouterProps) {\n let historyRef = React.useRef<BrowserHistory>();\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HashRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nexport function HashRouter({\n basename,\n children,\n future,\n window,\n}: HashRouterProps) {\n let historyRef = React.useRef<HashHistory>();\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HistoryRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n history: History;\n}\n\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter({\n basename,\n children,\n future,\n history,\n}: HistoryRouterProps) {\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nif (__DEV__) {\n HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\n\nexport { HistoryRouter as unstable_HistoryRouter };\n\nexport interface LinkProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n reloadDocument?: boolean;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n to: To;\n}\n\nconst isBrowser =\n typeof window !== \"undefined\" &&\n typeof window.document !== \"undefined\" &&\n typeof window.document.createElement !== \"undefined\";\n\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/**\n * The public API for rendering a history-aware <a>.\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n function LinkWithRef(\n {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n ...rest\n },\n ref\n ) {\n let { basename } = React.useContext(NavigationContext);\n\n // Rendered into <a href> for absolute URLs\n let absoluteHref;\n let isExternal = false;\n\n if (typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to)) {\n // Render the absolute href server- and client-side\n absoluteHref = to;\n\n // Only check for external origins client-side\n if (isBrowser) {\n try {\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith(\"//\")\n ? new URL(currentUrl.protocol + to)\n : new URL(to);\n let path = stripBasename(targetUrl.pathname, basename);\n\n if (targetUrl.origin === currentUrl.origin && path != null) {\n // Strip the protocol/origin/basename for same-origin absolute URLs\n to = path + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n } catch (e) {\n // We can't do external URL detection without a valid URL\n warning(\n false,\n `<Link to=\"${to}\"> contains an invalid URL which will probably break ` +\n `when clicked - please update to a valid URL path.`\n );\n }\n }\n }\n\n // Rendered into <a href> for relative URLs\n let href = useHref(to, { relative });\n\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n });\n function handleClick(\n event: React.MouseEvent<HTMLAnchorElement, MouseEvent>\n ) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n <a\n {...rest}\n href={absoluteHref || href}\n onClick={isExternal || reloadDocument ? onClick : handleClick}\n ref={ref}\n target={target}\n />\n );\n }\n);\n\nif (__DEV__) {\n Link.displayName = \"Link\";\n}\n\nexport interface NavLinkProps\n extends Omit<LinkProps, \"className\" | \"style\" | \"children\"> {\n children?:\n | React.ReactNode\n | ((props: { isActive: boolean; isPending: boolean }) => React.ReactNode);\n caseSensitive?: boolean;\n className?:\n | string\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => string | undefined);\n end?: boolean;\n style?:\n | React.CSSProperties\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => React.CSSProperties | undefined);\n}\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nexport const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(\n function NavLinkWithRef(\n {\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n children,\n ...rest\n },\n ref\n ) {\n let path = useResolvedPath(to, { relative: rest.relative });\n let location = useLocation();\n let routerState = React.useContext(DataRouterStateContext);\n let { navigator } = React.useContext(NavigationContext);\n\n let toPathname = navigator.encodeLocation\n ? navigator.encodeLocation(path).pathname\n : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname =\n routerState && routerState.navigation && routerState.navigation.location\n ? routerState.navigation.location.pathname\n : null;\n\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname\n ? nextLocationPathname.toLowerCase()\n : null;\n toPathname = toPathname.toLowerCase();\n }\n\n let isActive =\n locationPathname === toPathname ||\n (!end &&\n locationPathname.startsWith(toPathname) &&\n locationPathname.charAt(toPathname.length) === \"/\");\n\n let isPending =\n nextLocationPathname != null &&\n (nextLocationPathname === toPathname ||\n (!end &&\n nextLocationPathname.startsWith(toPathname) &&\n nextLocationPathname.charAt(toPathname.length) === \"/\"));\n\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n\n let className: string | undefined;\n if (typeof classNameProp === \"function\") {\n className = classNameProp({ isActive, isPending });\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [\n classNameProp,\n isActive ? \"active\" : null,\n isPending ? \"pending\" : null,\n ]\n .filter(Boolean)\n .join(\" \");\n }\n\n let style =\n typeof styleProp === \"function\"\n ? styleProp({ isActive, isPending })\n : styleProp;\n\n return (\n <Link\n {...rest}\n aria-current={ariaCurrent}\n className={className}\n ref={ref}\n style={style}\n to={to}\n >\n {typeof children === \"function\"\n ? children({ isActive, isPending })\n : children}\n </Link>\n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n}\n\nexport interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {\n /**\n * The HTTP verb to use when the form is submit. Supports \"get\", \"post\",\n * \"put\", \"delete\", \"patch\".\n */\n method?: HTMLFormMethod;\n\n /**\n * `<form encType>` - enhancing beyond the normal string type and limiting\n * to the built-in browser supported values\n */\n encType?:\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\"\n | \"text/plain\";\n\n /**\n * Normal `<form action>` but supports React Router's relative paths.\n */\n action?: string;\n\n /**\n * Forces a full document navigation instead of a fetch.\n */\n reloadDocument?: boolean;\n\n /**\n * Replaces the current entry in the browser history stack when the form\n * navigates. Use this if you don't want the user to be able to click \"back\"\n * to the page with the form on it.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * Prevent the scroll position from resetting to the top of the viewport on\n * completion of the navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n\n /**\n * A function to call when the form is submitted. If you call\n * `event.preventDefault()` then this form will not do anything.\n */\n onSubmit?: React.FormEventHandler<HTMLFormElement>;\n}\n\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nexport const Form = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n let submit = useSubmit();\n return <FormImpl {...props} submit={submit} ref={ref} />;\n }\n);\n\nif (__DEV__) {\n Form.displayName = \"Form\";\n}\n\ntype HTMLSubmitEvent = React.BaseSyntheticEvent<\n SubmitEvent,\n Event,\n HTMLFormElement\n>;\n\ntype HTMLFormSubmitter = HTMLButtonElement | HTMLInputElement;\n\ninterface FormImplProps extends FormProps {\n submit: SubmitFunction | FetcherSubmitFunction;\n}\n\nconst FormImpl = React.forwardRef<HTMLFormElement, FormImplProps>(\n (\n {\n reloadDocument,\n replace,\n method = defaultMethod,\n action,\n onSubmit,\n submit,\n relative,\n preventScrollReset,\n ...props\n },\n forwardedRef\n ) => {\n let formMethod: HTMLFormMethod =\n method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let formAction = useFormAction(action, { relative });\n let submitHandler: React.FormEventHandler<HTMLFormElement> = (event) => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n\n let submitter = (event as unknown as HTMLSubmitEvent).nativeEvent\n .submitter as HTMLFormSubmitter | null;\n\n let submitMethod =\n (submitter?.getAttribute(\"formmethod\") as HTMLFormMethod | undefined) ||\n method;\n\n submit(submitter || event.currentTarget, {\n method: submitMethod,\n replace,\n relative,\n preventScrollReset,\n });\n };\n\n return (\n <form\n ref={forwardedRef}\n method={formMethod}\n action={formAction}\n onSubmit={reloadDocument ? onSubmit : submitHandler}\n {...props}\n />\n );\n }\n);\n\nif (__DEV__) {\n FormImpl.displayName = \"FormImpl\";\n}\n\nexport interface ScrollRestorationProps {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n}\n\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\nexport function ScrollRestoration({\n getKey,\n storageKey,\n}: ScrollRestorationProps) {\n useScrollRestoration({ getKey, storageKey });\n return null;\n}\n\nif (__DEV__) {\n ScrollRestoration.displayName = \"ScrollRestoration\";\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\n\nenum DataRouterHook {\n UseScrollRestoration = \"useScrollRestoration\",\n UseSubmit = \"useSubmit\",\n UseSubmitFetcher = \"useSubmitFetcher\",\n UseFetcher = \"useFetcher\",\n}\n\nenum DataRouterStateHook {\n UseFetchers = \"useFetchers\",\n UseScrollRestoration = \"useScrollRestoration\",\n}\n\nfunction getDataRouterConsoleError(\n hookName: DataRouterHook | DataRouterStateHook\n) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;\n}\n\nfunction useDataRouterContext(hookName: DataRouterHook) {\n let ctx = React.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\n\nfunction useDataRouterState(hookName: DataRouterStateHook) {\n let state = React.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\n\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nexport function useLinkClickHandler<E extends Element = HTMLAnchorElement>(\n to: To,\n {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n }: {\n target?: React.HTMLAttributeAnchorTarget;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n } = {}\n): (event: React.MouseEvent<E, MouseEvent>) => void {\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, { relative });\n\n return React.useCallback(\n (event: React.MouseEvent<E, MouseEvent>) => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n\n // If the URL hasn't changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace =\n replaceProp !== undefined\n ? replaceProp\n : createPath(location) === createPath(path);\n\n navigate(to, { replace, state, preventScrollReset, relative });\n }\n },\n [\n location,\n navigate,\n path,\n replaceProp,\n state,\n target,\n to,\n preventScrollReset,\n relative,\n ]\n );\n}\n\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n warning(\n typeof URLSearchParams !== \"undefined\",\n `You cannot use the \\`useSearchParams\\` hook in a browser that does not ` +\n `support the URLSearchParams API. If you need to support Internet ` +\n `Explorer 11, we recommend you load a polyfill such as ` +\n `https://github.com/ungap/url-search-params\\n\\n` +\n `If you're unsure how to load polyfills, we recommend you check out ` +\n `https://polyfill.io/v3/ which provides some recommendations about how ` +\n `to load polyfills only for users that need them, instead of for every ` +\n `user.`\n );\n\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React.useRef(false);\n\n let location = useLocation();\n let searchParams = React.useMemo(\n () =>\n // Only merge in the defaults if we haven't yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can't\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(\n location.search,\n hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current\n ),\n [location.search]\n );\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback<SetURLSearchParams>(\n (nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOptions);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\nexport type SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\n/**\n * Submits a HTML `<form>` to the server without reloading the page.\n */\nexport interface SubmitFunction {\n (\n /**\n * Specifies the `<form>` to be submitted to the server, a specific\n * `<button>` or `<input type=\"submit\">` to use to submit the form, or some\n * arbitrary data to submit.\n *\n * Note: When using a `<button>` its `name` and `value` will also be\n * included in the form data that is submitted.\n */\n target: SubmitTarget,\n\n /**\n * Options that override the `<form>`'s own attributes. Required when\n * submitting arbitrary data without a backing `<form>`.\n */\n options?: SubmitOptions\n ): void;\n}\n\n/**\n * Submits a fetcher `<form>` to the server without reloading the page.\n */\nexport interface FetcherSubmitFunction {\n (\n target: SubmitTarget,\n // Fetchers cannot replace because they are not navigation events\n options?: Omit<SubmitOptions, \"replace\">\n ): void;\n}\n\nfunction validateClientSideSubmission() {\n if (typeof document === \"undefined\") {\n throw new Error(\n \"You are calling submit during the server render. \" +\n \"Try calling submit within a `useEffect` or callback instead.\"\n );\n }\n}\n\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nexport function useSubmit(): SubmitFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseSubmit);\n let { basename } = React.useContext(NavigationContext);\n let currentRouteId = useRouteId();\n\n return React.useCallback<SubmitFunction>(\n (target, options = {}) => {\n validateClientSideSubmission();\n\n let { action, method, encType, formData, body } = getFormSubmissionInfo(\n target,\n basename\n );\n\n router.navigate(options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || (method as HTMLFormMethod),\n formEncType: options.encType || (encType as FormEncType),\n replace: options.replace,\n fromRouteId: currentRouteId,\n });\n },\n [router, basename, currentRouteId]\n );\n}\n\n/**\n * Returns the implementation for fetcher.submit\n */\nfunction useSubmitFetcher(\n fetcherKey: string,\n fetcherRouteId: string\n): FetcherSubmitFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseSubmitFetcher);\n let { basename } = React.useContext(NavigationContext);\n\n return React.useCallback<FetcherSubmitFunction>(\n (target, options = {}) => {\n validateClientSideSubmission();\n\n let { action, method, encType, formData, body } = getFormSubmissionInfo(\n target,\n basename\n );\n\n invariant(\n fetcherRouteId != null,\n \"No routeId available for useFetcher()\"\n );\n router.fetch(fetcherKey, fetcherRouteId, options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || (method as HTMLFormMethod),\n formEncType: options.encType || (encType as FormEncType),\n });\n },\n [router, basename, fetcherKey, fetcherRouteId]\n );\n}\n\n// v7: Eventually we should deprecate this entirely in favor of using the\n// router method directly?\nexport function useFormAction(\n action?: string,\n { relative }: { relative?: RelativeRoutingType } = {}\n): string {\n let { basename } = React.useContext(NavigationContext);\n let routeContext = React.useContext(RouteContext);\n invariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n\n let [match] = routeContext.matches.slice(-1);\n // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n let path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n\n // Previously we set the default action to \".\". The problem with this is that\n // `useResolvedPath(\".\")` excludes search params and the hash of the resolved\n // URL. This is the intended behavior of when \".\" is specifically provided as\n // the form action, but inconsistent w/ browsers when the action is omitted.\n // https://github.com/remix-run/remix/issues/927\n let location = useLocation();\n if (action == null) {\n // Safe to write to these directly here since if action was undefined, we\n // would have called useResolvedPath(\".\") which will never include a search\n // or hash\n path.search = location.search;\n path.hash = location.hash;\n\n // When grabbing search params from the URL, remove the automatically\n // inserted ?index param so we match the useResolvedPath search behavior\n // which would not include ?index\n if (match.route.index) {\n let params = new URLSearchParams(path.search);\n params.delete(\"index\");\n path.search = params.toString() ? `?${params.toString()}` : \"\";\n }\n }\n\n if ((!action || action === \".\") && match.route.index) {\n path.search = path.search\n ? path.search.replace(/^\\?/, \"?index&\")\n : \"?index\";\n }\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n if (basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\nfunction createFetcherForm(fetcherKey: string, routeId: string) {\n let FetcherForm = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n let submit = useSubmitFetcher(fetcherKey, routeId);\n return <FormImpl {...props} ref={ref} submit={submit} />;\n }\n );\n if (__DEV__) {\n FetcherForm.displayName = \"fetcher.Form\";\n }\n return FetcherForm;\n}\n\nlet fetcherId = 0;\n\nexport type FetcherWithComponents<TData> = Fetcher<TData> & {\n Form: ReturnType<typeof createFetcherForm>;\n submit: FetcherSubmitFunction;\n load: (href: string) => void;\n};\n\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\nexport function useFetcher<TData = any>(): FetcherWithComponents<TData> {\n let { router } = useDataRouterContext(DataRouterHook.UseFetcher);\n\n let route = React.useContext(RouteContext);\n invariant(route, `useFetcher must be used inside a RouteContext`);\n\n let routeId = route.matches[route.matches.length - 1]?.route.id;\n invariant(\n routeId != null,\n `useFetcher can only be used on routes that contain a unique \"id\"`\n );\n\n let [fetcherKey] = React.useState(() => String(++fetcherId));\n let [Form] = React.useState(() => {\n invariant(routeId, `No routeId available for fetcher.Form()`);\n return createFetcherForm(fetcherKey, routeId);\n });\n let [load] = React.useState(() => (href: string) => {\n invariant(router, \"No router available for fetcher.load()\");\n invariant(routeId, \"No routeId available for fetcher.load()\");\n router.fetch(fetcherKey, routeId, href);\n });\n let submit = useSubmitFetcher(fetcherKey, routeId);\n\n let fetcher = router.getFetcher<TData>(fetcherKey);\n\n let fetcherWithComponents = React.useMemo(\n () => ({\n Form,\n submit,\n load,\n ...fetcher,\n }),\n [fetcher, Form, submit, load]\n );\n\n React.useEffect(() => {\n // Is this busted when the React team gets real weird and calls effects\n // twice on mount? We really just need to garbage collect here when this\n // fetcher is no longer around.\n return () => {\n if (!router) {\n console.warn(`No router available to clean up from useFetcher()`);\n return;\n }\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n\n return fetcherWithComponents;\n}\n\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\nexport function useFetchers(): Fetcher[] {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return [...state.fetchers.values()];\n}\n\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions: Record<string, number> = {};\n\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration({\n getKey,\n storageKey,\n}: {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n} = {}) {\n let { router } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let { restoreScrollPosition, preventScrollReset } = useDataRouterState(\n DataRouterStateHook.UseScrollRestoration\n );\n let { basename } = React.useContext(NavigationContext);\n let location = useLocation();\n let matches = useMatches();\n let navigation = useNavigation();\n\n // Trigger manual scroll restoration while we're active\n React.useEffect(() => {\n window.history.scrollRestoration = \"manual\";\n return () => {\n window.history.scrollRestoration = \"auto\";\n };\n }, []);\n\n // Save positions on pagehide\n usePageHide(\n React.useCallback(() => {\n if (navigation.state === \"idle\") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n sessionStorage.setItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY,\n JSON.stringify(savedScrollPositions)\n );\n window.history.scrollRestoration = \"auto\";\n }, [storageKey, getKey, navigation.state, location, matches])\n );\n\n // Read in any saved scroll locations\n if (typeof document !== \"undefined\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY\n );\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n // no-op, use default empty object\n }\n }, [storageKey]);\n\n // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n let getKeyWithoutBasename: GetScrollRestorationKeyFunction | undefined =\n getKey && basename !== \"/\"\n ? (location, matches) =>\n getKey(\n // Strip the basename to match useLocation()\n {\n ...location,\n pathname:\n stripBasename(location.pathname, basename) ||\n location.pathname,\n },\n matches\n )\n : getKey;\n let disableScrollRestoration = router?.enableScrollRestoration(\n savedScrollPositions,\n () => window.scrollY,\n getKeyWithoutBasename\n );\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, basename, getKey]);\n\n // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n // Explicit false means don't do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n }\n\n // been here before, scroll to it\n if (typeof restoreScrollPosition === \"number\") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n\n // try to scroll to the hash\n if (location.hash) {\n let el = document.getElementById(location.hash.slice(1));\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n\n // Don't reset if this navigation opted out\n if (preventScrollReset === true) {\n return;\n }\n\n // otherwise go to the top on new locations\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n\nexport { useScrollRestoration as UNSAFE_useScrollRestoration };\n\n/**\n * Setup a callback to be fired on the window's `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nexport function useBeforeUnload(\n callback: (event: BeforeUnloadEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"beforeunload\", callback, opts);\n return () => {\n window.removeEventListener(\"beforeunload\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Setup a callback to be fired on the window's `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes. This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(\n callback: (event: PageTransitionEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"pagehide\", callback, opts);\n return () => {\n window.removeEventListener(\"pagehide\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open. Use at your own risk.\n */\nfunction usePrompt({ when, message }: { when: boolean; message: string }) {\n let blocker = useBlocker(when);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\") {\n let proceed = window.confirm(message);\n if (proceed) {\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n}\n\nexport { usePrompt as unstable_usePrompt };\n\n//#endregion\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? $Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg) : false;\n var element, elementLen;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n elementLen = lengthOfArrayLike(element);\n targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n } else {\n doesNotExceedSafeInteger(targetIndex + 1);\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://tc39.es/ecma262/#sec-array.prototype.flat\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flat');\n"],"sourceRoot":""}