@luwiostack/router 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["trimPathRight","normalize","useRouter","useRouter","useRouter","useRouteContext","useRouter","useRouteContext","createRoute","useRouter","useRouter","useRouter","useRouter","useRouter","useRouter","createRouter","useRouter","useRouter","useRouter","useRouter","useRouter","useRouter","Locale","tanstackRedirect","redirect","notFound","tanstackNotFound","useTanstackRouter","useTanstackRouter","createTanstackRoute","createTanstackRouter","LocaleProvider","#aliases","#inner","useTanstackRouter","useTanstackRouteContext"],"sources":["../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/utils.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/utils.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/lru-cache.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/path.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/not-found.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/qss.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/searchParams.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/root.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/redirect.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/rewrite.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/stores.js","../../../node_modules/.pnpm/@tanstack+history@1.162.1/node_modules/@tanstack/history/dist/esm/index.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/router.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/load-client.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/defer.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/link.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/manifest.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/route.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/awaited.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/nonRouteComponentContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/ClientOnly.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/routerContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouter.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/matchContext.js","../../../node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/alien.js","../../../node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/atom.js","../../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-store/dist/esm/useStore.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useMatch.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useParams.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useSearch.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useNavigate.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/link.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/route.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/lazyRouteComponent.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/not-found.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/ScriptOnce.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/SafeFragment.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/renderRouteNotFound.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/scroll-restoration-script/client.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Match.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Transitioner.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Matches.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/routerStores.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/router.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/RouterProvider.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouterState.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLocation.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Asset.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/headContentUtils.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/HeadContent.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Scripts.js","../src/router-meta.ts","../src/use-router.ts","../src/create-router.tsx","../src/lazy.ts","../src/route-builder.ts","../src/registry.ts","../src/route-hooks.ts"],"sourcesContent":["\"use client\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n/**\n* React.use if available (React 19+), undefined otherwise.\n* Use dynamic lookup to avoid Webpack compilation errors with React 18.\n*/\nvar reactUse = React$1[\"use\"];\nvar useLayoutEffect = isServer ?? typeof window === \"undefined\" ? React$1.useEffect : React$1.useLayoutEffect;\n/**\n* React hook to wrap `IntersectionObserver`.\n*\n* This hook will create an `IntersectionObserver` and observe the ref passed to it.\n*\n* When the intersection changes, the callback will be called with the `IntersectionObserverEntry`.\n*\n* @param ref - The ref to observe\n* @param callback - The callback to call when the intersection changes\n* @param disabled - Whether observation is disabled\n* @returns The IntersectionObserver instance\n* @example\n* ```tsx\n* const MyComponent = () => {\n* const ref = React.useRef<HTMLDivElement>(null)\n* useIntersectionObserver(\n* ref,\n* (entry) => { doSomething(entry) },\n* false\n* )\n* return <div ref={ref} />\n* ```\n*/\nfunction useIntersectionObserver(ref, callback, disabled) {\n\tReact$1.useEffect(() => {\n\t\tif (!ref.current || disabled || typeof IntersectionObserver !== \"function\") return () => callback();\n\t\tconst observer = new IntersectionObserver((entries) => {\n\t\t\tcallback(entries.pop());\n\t\t}, { rootMargin: \"100px\" });\n\t\tobserver.observe(ref.current);\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t\tcallback();\n\t\t};\n\t}, [\n\t\tcallback,\n\t\tdisabled,\n\t\tref\n\t]);\n}\n/**\n* React hook to take a `React.ForwardedRef` and returns a `ref` that can be used on a DOM element.\n*\n* @param ref - The forwarded ref\n* @returns The inner ref returned by `useRef`\n* @example\n* ```tsx\n* const MyComponent = React.forwardRef((props, ref) => {\n* const innerRef = useForwardedRef(ref)\n* return <div ref={innerRef} />\n* })\n* ```\n*/\nfunction useForwardedRef(ref) {\n\tconst innerRef = React$1.useRef(null);\n\tReact$1.useImperativeHandle(ref, () => innerRef.current, []);\n\treturn innerRef;\n}\n//#endregion\nexport { reactUse, useForwardedRef, useIntersectionObserver, useLayoutEffect };\n\n//# sourceMappingURL=utils.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/utils.ts\n/**\n* Return the last element of an array.\n* Intended for non-empty arrays used within router internals.\n*/\nfunction last(arr) {\n\treturn arr[arr.length - 1];\n}\n/**\n* Apply a value-or-updater to a previous value.\n* Accepts either a literal value or a function of the previous value.\n*/\nfunction functionalUpdate(updater, previous) {\n\tif (typeof updater === \"function\") return updater(previous);\n\treturn updater;\n}\nconst hasOwn = Object.prototype.hasOwnProperty;\nconst isEnumerable = Object.prototype.propertyIsEnumerable;\nfunction hasKeys(obj) {\n\tfor (const key in obj) if (hasOwn.call(obj, key)) return true;\n\treturn false;\n}\nconst createNull = () => Object.create(null);\nconst nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);\n/**\n* This function returns `prev` if `_next` is deeply equal.\n* If not, it will replace any deeply equal children of `b` with those of `a`.\n* This can be used for structural sharing between immutable JSON values for example.\n* Do not use this with signals\n*/\nfunction replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {\n\tif (isServer) return _next;\n\tif (prev === _next) return prev;\n\tif (_depth > 500) return _next;\n\tconst next = _next;\n\tconst array = isPlainArray(prev) && isPlainArray(next);\n\tif (!array && !(isPlainObject(prev) && isPlainObject(next))) return next;\n\tconst prevItems = array ? prev : getEnumerableOwnKeys(prev);\n\tif (!prevItems) return next;\n\tconst nextItems = array ? next : getEnumerableOwnKeys(next);\n\tif (!nextItems) return next;\n\tconst prevSize = prevItems.length;\n\tconst nextSize = nextItems.length;\n\tconst copy = array ? new Array(nextSize) : _makeObj();\n\tlet equalItems = 0;\n\tfor (let i = 0; i < nextSize; i++) {\n\t\tconst key = array ? i : nextItems[i];\n\t\tconst p = prev[key];\n\t\tconst n = next[key];\n\t\tif (p === n) {\n\t\t\tcopy[key] = p;\n\t\t\tif (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (p === null || n === null || typeof p !== \"object\" || typeof n !== \"object\") {\n\t\t\tcopy[key] = n;\n\t\t\tcontinue;\n\t\t}\n\t\tconst v = replaceEqualDeep(p, n, _makeObj, _depth + 1);\n\t\tcopy[key] = v;\n\t\tif (v === p) equalItems++;\n\t}\n\treturn prevSize === nextSize && equalItems === prevSize ? prev : copy;\n}\n/**\n* Equivalent to `Reflect.ownKeys`, but ensures that objects are \"clone-friendly\":\n* will return false if object has any non-enumerable properties.\n*\n* Optimized for the common case where objects have no symbol properties.\n*/\nfunction getEnumerableOwnKeys(o) {\n\tconst keys = Object.keys(o);\n\tif (keys.length !== Object.getOwnPropertyNames(o).length) return false;\n\tconst symbols = Object.getOwnPropertySymbols(o);\n\tif (symbols.length === 0) return keys;\n\tfor (const symbol of symbols) {\n\t\tif (!isEnumerable.call(o, symbol)) return false;\n\t\tkeys.push(symbol);\n\t}\n\treturn keys;\n}\nfunction isPlainObject(o) {\n\tif (!hasObjectPrototype(o)) return false;\n\tconst ctor = o.constructor;\n\tif (typeof ctor === \"undefined\") return true;\n\tconst prot = ctor.prototype;\n\tif (!hasObjectPrototype(prot)) return false;\n\tif (!prot.hasOwnProperty(\"isPrototypeOf\")) return false;\n\treturn true;\n}\nfunction hasObjectPrototype(o) {\n\treturn Object.prototype.toString.call(o) === \"[object Object]\";\n}\n/**\n* Check if a value is a \"plain\" array (no extra enumerable keys).\n*/\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && value.length === Object.keys(value).length;\n}\n/**\n* Perform a deep equality check with options for partial comparison and\n* ignoring `undefined` values. Optimized for router state comparisons.\n*/\nfunction deepEqual(a, b, opts) {\n\tif (a === b) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;\n\t\treturn true;\n\t}\n\tif (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst ignoreUndefined = opts?.ignoreUndefined ?? true;\n\t\tif (opts?.partial) {\n\t\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\t\tif (!deepEqual(a[k], b[k], opts)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tlet aCount = 0;\n\t\tif (!ignoreUndefined) aCount = Object.keys(a).length;\n\t\telse for (const k in a) if (a[k] !== void 0) aCount++;\n\t\tlet bCount = 0;\n\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\tbCount++;\n\t\t\tif (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;\n\t\t}\n\t\treturn aCount === bCount;\n\t}\n\treturn false;\n}\n/**\n* Create a promise with exposed resolve/reject and status fields.\n* Useful for coordinating async router lifecycle operations.\n*/\nfunction createControlledPromise(onResolve) {\n\tlet resolveLoadPromise;\n\tlet rejectLoadPromise;\n\tconst controlledPromise = new Promise((resolve, reject) => {\n\t\tresolveLoadPromise = resolve;\n\t\trejectLoadPromise = reject;\n\t});\n\tcontrolledPromise.status = \"pending\";\n\tcontrolledPromise.resolve = (value) => {\n\t\tcontrolledPromise.status = \"resolved\";\n\t\tcontrolledPromise.value = value;\n\t\tresolveLoadPromise(value);\n\t\tonResolve?.(value);\n\t};\n\tcontrolledPromise.reject = (e) => {\n\t\tcontrolledPromise.status = \"rejected\";\n\t\trejectLoadPromise(e);\n\t};\n\treturn controlledPromise;\n}\n/**\n* Heuristically detect dynamic import \"module not found\" errors\n* across major browsers for lazy route component handling.\n*/\nfunction isModuleNotFoundError(error) {\n\tif (typeof error?.message !== \"string\") return false;\n\treturn error.message.startsWith(\"Failed to fetch dynamically imported module\") || error.message.startsWith(\"error loading dynamically imported module\") || error.message.startsWith(\"Importing a module script failed\");\n}\nfunction findLast(array, predicate) {\n\tfor (let i = array.length - 1; i >= 0; i--) {\n\t\tconst item = array[i];\n\t\tif (predicate(item)) return item;\n\t}\n}\n/**\n* Re-encode characters that are unsafe in URL paths.\n* Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the\n* WHATWG URL \"path percent-encode set\" (\", <, >, `, {, }).\n*\n* Space (0x20) is intentionally excluded — decodeURI decodes %20 to space\n* and the router stores decoded spaces in location.pathname. The existing\n* encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.\n*\n* These characters are decoded by decodeURI but must remain percent-encoded\n* in paths to match how upstream layers (CDNs, edge middleware, browsers)\n* interpret the URL, preventing infinite redirect loops and path mismatches.\n*/\nconst PATH_UNSAFE_RE = /[\\x00-\\x1f\\x7f\"<>`{}]/g;\nfunction sanitizePathSegment(segment) {\n\treturn segment.replace(PATH_UNSAFE_RE, (ch) => \"%\" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, \"0\"));\n}\nfunction decodeSegment(segment) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = decodeURI(segment);\n\t} catch {\n\t\tdecoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {\n\t\t\ttry {\n\t\t\t\treturn decodeURI(match);\n\t\t\t} catch {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t});\n\t}\n\treturn sanitizePathSegment(decoded);\n}\n/**\n* Default list of URL protocols to allow in links, redirects, and navigation.\n* Any absolute URL protocol not in this list is treated as dangerous by default.\n*/\nconst DEFAULT_PROTOCOL_ALLOWLIST = [\n\t\"http:\",\n\t\"https:\",\n\t\"mailto:\",\n\t\"tel:\"\n];\n/**\n* Check if a URL string uses a protocol that is not in the allowlist.\n* Returns true for blocked protocols like javascript:, blob:, data:, etc.\n*\n* The URL constructor correctly normalizes:\n* - Mixed case (JavaScript: → javascript:)\n* - Whitespace/control characters (java\\nscript: → javascript:)\n* - Leading whitespace\n*\n* For relative URLs (no protocol), returns false (safe).\n*\n* @param url - The URL string to check\n* @param allowlist - Set of protocols to allow\n* @returns true if the URL uses a protocol that is not allowed\n*/\nfunction isDangerousProtocol(url, allowlist) {\n\tif (!url) return false;\n\ttry {\n\t\tconst parsed = new URL(url);\n\t\treturn !allowlist.has(parsed.protocol);\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst HTML_ESCAPE_LOOKUP = {\n\t\"&\": \"\\\\u0026\",\n\t\">\": \"\\\\u003e\",\n\t\"<\": \"\\\\u003c\",\n\t\"\\u2028\": \"\\\\u2028\",\n\t\"\\u2029\": \"\\\\u2029\"\n};\nconst HTML_ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\n/**\n* Escape HTML special characters in a string to prevent XSS attacks\n* when embedding strings in script tags during SSR.\n*\n* This is essential for preventing XSS vulnerabilities when user-controlled\n* content is embedded in inline scripts.\n*/\nfunction escapeHtml(str) {\n\treturn str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);\n}\nfunction decodePath(path) {\n\tif (!path) return {\n\t\tpath,\n\t\thandledProtocolRelativeURL: false\n\t};\n\tif (!/[%\\\\\\x00-\\x1f\\x7f]/.test(path) && !path.startsWith(\"//\")) return {\n\t\tpath,\n\t\thandledProtocolRelativeURL: false\n\t};\n\tconst re = /%25|%5C/gi;\n\tlet cursor = 0;\n\tlet result = \"\";\n\tlet match;\n\twhile (null !== (match = re.exec(path))) {\n\t\tresult += decodeSegment(path.slice(cursor, match.index)) + match[0];\n\t\tcursor = re.lastIndex;\n\t}\n\tresult = result + decodeSegment(cursor ? path.slice(cursor) : path);\n\tlet handledProtocolRelativeURL = false;\n\tif (result.startsWith(\"//\")) {\n\t\thandledProtocolRelativeURL = true;\n\t\tresult = \"/\" + result.replace(/^\\/+/, \"\");\n\t}\n\treturn {\n\t\tpath: result,\n\t\thandledProtocolRelativeURL\n\t};\n}\n/**\n* Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.\n*\n* This function encodes:\n* - Whitespace characters (spaces → %20, tabs → %09, etc.)\n* - Non-ASCII/Unicode characters (emojis, accented characters, etc.)\n*\n* It preserves:\n* - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)\n* - ASCII special characters valid in URL paths (@, $, &, +, etc.)\n* - Forward slashes as path separators\n*\n* Used to generate proper href values for SSR without constructing URL objects.\n*\n* @example\n* encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'\n* encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'\n* encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)\n*/\nfunction encodePathLikeUrl(path) {\n\tif (!/\\s|[^\\u0000-\\u007F]/.test(path)) return path;\n\treturn path.replace(/\\s|[^\\u0000-\\u007F]/gu, encodeURIComponent);\n}\n/**\n* Builds the dev-mode CSS styles URL for route-scoped CSS collection.\n* Used by HeadContent components in all framework implementations to construct\n* the URL for the `/@tanstack-start/styles.css` endpoint.\n*\n* @param basepath - The router's basepath (may or may not have leading slash)\n* @param routeIds - Array of matched route IDs to include in the CSS collection\n* @returns The full URL path for the dev styles CSS endpoint\n*/\nfunction buildDevStylesUrl(basepath, routeIds) {\n\tconst trimmedBasepath = basepath.replace(/^\\/+|\\/+$/g, \"\");\n\treturn `${trimmedBasepath === \"\" ? \"\" : `/${trimmedBasepath}`}/@tanstack-start/styles.css?routes=${encodeURIComponent(routeIds.join(\",\"))}`;\n}\nfunction arraysEqual(a, b) {\n\tif (a === b) return true;\n\tif (a.length !== b.length) return false;\n\tfor (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\treturn true;\n}\n//#endregion\nexport { DEFAULT_PROTOCOL_ALLOWLIST, arraysEqual, buildDevStylesUrl, createControlledPromise, decodePath, deepEqual, encodePathLikeUrl, escapeHtml, findLast, functionalUpdate, hasKeys, hasOwn, isDangerousProtocol, isModuleNotFoundError, isPlainArray, isPlainObject, last, nullReplaceEqualDeep, replaceEqualDeep };\n\n//# sourceMappingURL=utils.js.map","//#region src/lru-cache.ts\nfunction createLRUCache(max) {\n\tconst cache = /* @__PURE__ */ new Map();\n\tlet oldest;\n\tlet newest;\n\tconst touch = (entry) => {\n\t\tif (!entry.next) return;\n\t\tif (!entry.prev) {\n\t\t\tentry.next.prev = void 0;\n\t\t\toldest = entry.next;\n\t\t\tentry.next = void 0;\n\t\t\tif (newest) {\n\t\t\t\tentry.prev = newest;\n\t\t\t\tnewest.next = entry;\n\t\t\t}\n\t\t} else {\n\t\t\tentry.prev.next = entry.next;\n\t\t\tentry.next.prev = entry.prev;\n\t\t\tentry.next = void 0;\n\t\t\tif (newest) {\n\t\t\t\tnewest.next = entry;\n\t\t\t\tentry.prev = newest;\n\t\t\t}\n\t\t}\n\t\tnewest = entry;\n\t};\n\treturn {\n\t\tget(key) {\n\t\t\tconst entry = cache.get(key);\n\t\t\tif (!entry) return void 0;\n\t\t\ttouch(entry);\n\t\t\treturn entry.value;\n\t\t},\n\t\tset(key, value) {\n\t\t\tif (cache.size >= max && oldest) {\n\t\t\t\tconst toDelete = oldest;\n\t\t\t\tcache.delete(toDelete.key);\n\t\t\t\tif (toDelete.next) {\n\t\t\t\t\toldest = toDelete.next;\n\t\t\t\t\ttoDelete.next.prev = void 0;\n\t\t\t\t}\n\t\t\t\tif (toDelete === newest) newest = void 0;\n\t\t\t}\n\t\t\tconst existing = cache.get(key);\n\t\t\tif (existing) {\n\t\t\t\texisting.value = value;\n\t\t\t\ttouch(existing);\n\t\t\t} else {\n\t\t\t\tconst entry = {\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue,\n\t\t\t\t\tprev: newest\n\t\t\t\t};\n\t\t\t\tif (newest) newest.next = entry;\n\t\t\t\tnewest = entry;\n\t\t\t\tif (!oldest) oldest = entry;\n\t\t\t\tcache.set(key, entry);\n\t\t\t}\n\t\t},\n\t\tclear() {\n\t\t\tcache.clear();\n\t\t\toldest = void 0;\n\t\t\tnewest = void 0;\n\t\t}\n\t};\n}\n//#endregion\nexport { createLRUCache };\n\n//# sourceMappingURL=lru-cache.js.map","import { last } from \"./utils.js\";\nimport { invariant } from \"./invariant.js\";\nimport { createLRUCache } from \"./lru-cache.js\";\nconst SEGMENT_TYPE_INDEX = 4;\nconst SEGMENT_TYPE_PATHLESS = 5;\n/**\n* Populates the `output` array with the parsed representation of the given `segment` string.\n*\n* Usage:\n* ```ts\n* let output\n* let cursor = 0\n* while (cursor < path.length) {\n* output = parseSegment(path, cursor, output)\n* const end = output[5]\n* cursor = end + 1\n* ```\n*\n* `output` is stored outside to avoid allocations during repeated calls. It doesn't need to be typed\n* or initialized, it will be done automatically.\n*/\nfunction parseSegment(path, start, output = new Uint16Array(6)) {\n\tconst next = path.indexOf(\"/\", start);\n\tconst end = next === -1 ? path.length : next;\n\tconst part = path.substring(start, end);\n\tif (!part || !part.includes(\"$\")) {\n\t\toutput[0] = 0;\n\t\toutput[1] = start;\n\t\toutput[2] = start;\n\t\toutput[3] = end;\n\t\toutput[4] = end;\n\t\toutput[5] = end;\n\t\treturn output;\n\t}\n\tif (part === \"$\") {\n\t\tconst total = path.length;\n\t\toutput[0] = 2;\n\t\toutput[1] = start;\n\t\toutput[2] = start;\n\t\toutput[3] = total;\n\t\toutput[4] = total;\n\t\toutput[5] = total;\n\t\treturn output;\n\t}\n\tif (part.charCodeAt(0) === 36) {\n\t\toutput[0] = 1;\n\t\toutput[1] = start;\n\t\toutput[2] = start + 1;\n\t\toutput[3] = end;\n\t\toutput[4] = end;\n\t\toutput[5] = end;\n\t\treturn output;\n\t}\n\tconst openBrace = part.indexOf(\"{\");\n\tlet closeBrace;\n\tif (openBrace !== -1 && openBrace + 1 < part.length && (closeBrace = part.indexOf(\"}\", openBrace)) !== -1) {\n\t\tconst firstChar = part.charCodeAt(openBrace + 1);\n\t\tif (firstChar === 45) {\n\t\t\tif (openBrace + 2 < part.length && part.charCodeAt(openBrace + 2) === 36) {\n\t\t\t\tconst paramStart = openBrace + 3;\n\t\t\t\tconst paramEnd = closeBrace;\n\t\t\t\tif (paramStart < paramEnd) {\n\t\t\t\t\toutput[0] = 3;\n\t\t\t\t\toutput[1] = start + openBrace;\n\t\t\t\t\toutput[2] = start + paramStart;\n\t\t\t\t\toutput[3] = start + paramEnd;\n\t\t\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\t\t\toutput[5] = end;\n\t\t\t\t\treturn output;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (firstChar === 36) {\n\t\t\tconst dollarPos = openBrace + 1;\n\t\t\tconst afterDollar = openBrace + 2;\n\t\t\tif (afterDollar === closeBrace) {\n\t\t\t\toutput[0] = 2;\n\t\t\t\toutput[1] = start + openBrace;\n\t\t\t\toutput[2] = start + dollarPos;\n\t\t\t\toutput[3] = start + afterDollar;\n\t\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\t\toutput[5] = path.length;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\toutput[0] = 1;\n\t\t\toutput[1] = start + openBrace;\n\t\t\toutput[2] = start + afterDollar;\n\t\t\toutput[3] = start + closeBrace;\n\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\toutput[5] = end;\n\t\t\treturn output;\n\t\t}\n\t}\n\toutput[0] = 0;\n\toutput[1] = start;\n\toutput[2] = start;\n\toutput[3] = end;\n\toutput[4] = end;\n\toutput[5] = end;\n\treturn output;\n}\n/**\n* Recursively parses the segments of the given route tree and populates a segment trie.\n*\n* @param data A reusable Uint16Array for parsing segments. (non important, we're just avoiding allocations)\n* @param route The current route to parse.\n* @param start The starting index for parsing within the route's full path.\n* @param node The current segment node in the trie to populate.\n* @param onRoute Callback invoked for each route processed.\n*/\nfunction parseSegments(defaultCaseSensitive, data, route, start, node, depth, dynamicListsToSort, onRoute) {\n\tonRoute?.(route);\n\tlet cursor = start;\n\t{\n\t\tconst path = route.fullPath ?? route.from;\n\t\tconst options = route.options;\n\t\tconst length = path.length;\n\t\tconst caseSensitive = options?.caseSensitive ?? defaultCaseSensitive;\n\t\tconst parseParams = options?.params?.parse ?? options?.parseParams;\n\t\twhile (cursor < length) {\n\t\t\tconst segment = parseSegment(path, cursor, data);\n\t\t\tlet nextNode;\n\t\t\tconst start = cursor;\n\t\t\tconst end = segment[5];\n\t\t\tcursor = end + 1;\n\t\t\tdepth++;\n\t\t\tconst kind = segment[0];\n\t\t\tswitch (kind) {\n\t\t\t\tcase 0: {\n\t\t\t\t\tconst value = path.substring(segment[2], segment[3]);\n\t\t\t\t\tlet name = value;\n\t\t\t\t\tlet staticChildren;\n\t\t\t\t\tif (caseSensitive) staticChildren = node.static ??= /* @__PURE__ */ new Map();\n\t\t\t\t\telse {\n\t\t\t\t\t\tname = value.toLowerCase();\n\t\t\t\t\t\tstaticChildren = node.staticInsensitive ??= /* @__PURE__ */ new Map();\n\t\t\t\t\t}\n\t\t\t\t\tconst existingNode = staticChildren.get(name);\n\t\t\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst next = createStaticNode(path);\n\t\t\t\t\t\tnext.parent = node;\n\t\t\t\t\t\tnext.depth = depth;\n\t\t\t\t\t\tnextNode = next;\n\t\t\t\t\t\tstaticChildren.set(name, next);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t\tcase 2: {\n\t\t\t\t\tconst prefix_raw = path.substring(start, segment[1]);\n\t\t\t\t\tconst suffix_raw = path.substring(segment[4], end);\n\t\t\t\t\tconst actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);\n\t\t\t\t\tconst prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();\n\t\t\t\t\tconst suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();\n\t\t\t\t\tconst siblings = kind === 1 ? node.dynamic : kind === 3 ? node.optional : node.wildcard;\n\t\t\t\t\tconst existingNode = kind !== 2 && !parseParams && siblings?.find((s) => !s.parse && s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);\n\t\t\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst next = createDynamicNode(kind, path, actuallyCaseSensitive, prefix, suffix);\n\t\t\t\t\t\tnextNode = next;\n\t\t\t\t\t\tnext.parent = node;\n\t\t\t\t\t\tnext.depth = depth;\n\t\t\t\t\t\tlet nodes;\n\t\t\t\t\t\tif (kind === 1) nodes = node.dynamic ??= [];\n\t\t\t\t\t\telse if (kind === 3) nodes = node.optional ??= [];\n\t\t\t\t\t\telse nodes = node.wildcard ??= [];\n\t\t\t\t\t\tnodes.push(next);\n\t\t\t\t\t\tif (nodes.length === 2) dynamicListsToSort?.push(nodes);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode = nextNode;\n\t\t}\n\t\tif (parseParams && route.children && !route.isRoot && route.id && route.id.charCodeAt(route.id.lastIndexOf(\"/\") + 1) === 95) {\n\t\t\tconst pathlessNode = createStaticNode(path);\n\t\t\tpathlessNode.kind = SEGMENT_TYPE_PATHLESS;\n\t\t\tpathlessNode.parent = node;\n\t\t\tdepth++;\n\t\t\tpathlessNode.depth = depth;\n\t\t\tnode.pathless ??= [];\n\t\t\tnode.pathless.push(pathlessNode);\n\t\t\tnode = pathlessNode;\n\t\t}\n\t\tconst isLeaf = (route.path || !route.children) && !route.isRoot;\n\t\tif (isLeaf && path.endsWith(\"/\")) {\n\t\t\tconst indexNode = createStaticNode(path);\n\t\t\tindexNode.kind = SEGMENT_TYPE_INDEX;\n\t\t\tindexNode.parent = node;\n\t\t\tdepth++;\n\t\t\tindexNode.depth = depth;\n\t\t\tnode.index = indexNode;\n\t\t\tnode = indexNode;\n\t\t}\n\t\tnode.parse = parseParams ?? null;\n\t\tnode.priority = options?.params?.priority ?? 0;\n\t\tif (isLeaf && !node.route) {\n\t\t\tnode.route = route;\n\t\t\tnode.fullPath = path;\n\t\t}\n\t}\n\tif (route.children) for (const child of route.children) parseSegments(defaultCaseSensitive, data, child, cursor, node, depth, dynamicListsToSort, onRoute);\n}\nfunction sortDynamic(a, b) {\n\tif (a.parse && !b.parse) return -1;\n\tif (!a.parse && b.parse) return 1;\n\tif (a.parse && b.parse && (a.priority || b.priority)) return b.priority - a.priority;\n\tif (a.prefix && b.prefix && a.prefix !== b.prefix) {\n\t\tif (a.prefix.startsWith(b.prefix)) return -1;\n\t\tif (b.prefix.startsWith(a.prefix)) return 1;\n\t}\n\tif (a.suffix && b.suffix && a.suffix !== b.suffix) {\n\t\tif (a.suffix.endsWith(b.suffix)) return -1;\n\t\tif (b.suffix.endsWith(a.suffix)) return 1;\n\t}\n\tif (a.prefix && !b.prefix) return -1;\n\tif (!a.prefix && b.prefix) return 1;\n\tif (a.suffix && !b.suffix) return -1;\n\tif (!a.suffix && b.suffix) return 1;\n\tif (a.caseSensitive && !b.caseSensitive) return -1;\n\tif (!a.caseSensitive && b.caseSensitive) return 1;\n\treturn 0;\n}\nfunction createStaticNode(fullPath) {\n\treturn {\n\t\tkind: 0,\n\t\tdepth: 0,\n\t\tpathless: null,\n\t\tindex: null,\n\t\tstatic: null,\n\t\tstaticInsensitive: null,\n\t\tdynamic: null,\n\t\toptional: null,\n\t\twildcard: null,\n\t\troute: null,\n\t\tfullPath,\n\t\tparent: null,\n\t\tparse: null,\n\t\tpriority: 0\n\t};\n}\n/**\n* Keys must be declared in the same order as in `SegmentNode` type,\n* to ensure they are represented as the same object class in the engine.\n*/\nfunction createDynamicNode(kind, fullPath, caseSensitive, prefix, suffix) {\n\treturn {\n\t\tkind,\n\t\tdepth: 0,\n\t\tpathless: null,\n\t\tindex: null,\n\t\tstatic: null,\n\t\tstaticInsensitive: null,\n\t\tdynamic: null,\n\t\toptional: null,\n\t\twildcard: null,\n\t\troute: null,\n\t\tfullPath,\n\t\tparent: null,\n\t\tparse: null,\n\t\tpriority: 0,\n\t\tcaseSensitive,\n\t\tprefix,\n\t\tsuffix\n\t};\n}\nfunction processRouteMasks(routeList, processedTree) {\n\tconst segmentTree = createStaticNode(\"/\");\n\tconst data = new Uint16Array(6);\n\tconst dynamicListsToSort = [];\n\tfor (const route of routeList) parseSegments(false, data, route, 1, segmentTree, 0, dynamicListsToSort);\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\tprocessedTree.masksTree = segmentTree;\n\tprocessedTree.flatCache = createLRUCache(1e3);\n}\n/**\n* Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.\n*/\nfunction findFlatMatch(path, processedTree) {\n\tpath ||= \"/\";\n\tconst cached = processedTree.flatCache.get(path);\n\tif (cached !== void 0) return cached;\n\tconst result = findMatch(path, processedTree.masksTree);\n\tprocessedTree.flatCache.set(path, result);\n\treturn result;\n}\n/**\n* @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree\n*/\nfunction findSingleMatch(from, caseSensitive, fuzzy, path, processedTree) {\n\tfrom ||= \"/\";\n\tpath ||= \"/\";\n\tconst key = caseSensitive ? `case\\0${from}` : from;\n\tlet tree = processedTree.singleCache.get(key);\n\tif (!tree) {\n\t\ttree = createStaticNode(\"/\");\n\t\tparseSegments(caseSensitive, new Uint16Array(6), { from }, 1, tree, 0);\n\t\tprocessedTree.singleCache.set(key, tree);\n\t}\n\treturn findMatch(path, tree, fuzzy);\n}\nfunction findRouteMatch(path, processedTree, fuzzy = false) {\n\tconst key = fuzzy ? path : `nofuzz\\0${path}`;\n\tconst cached = processedTree.matchCache.get(key);\n\tif (cached !== void 0) return cached;\n\tpath ||= \"/\";\n\tlet result;\n\ttry {\n\t\tresult = findMatch(path, processedTree.segmentTree, fuzzy);\n\t} catch (err) {\n\t\tif (err instanceof URIError) result = null;\n\t\telse throw err;\n\t}\n\tif (result) result.branch = buildRouteBranch(result.route);\n\tprocessedTree.matchCache.set(key, result);\n\treturn result;\n}\n/** Trim trailing slashes (except preserving root '/'). */\nfunction trimPathRight(path) {\n\treturn path === \"/\" ? path : path.replace(/\\/{1,}$/, \"\");\n}\n/**\n* Processes a route tree into a segment trie for efficient path matching.\n* Also builds lookup maps for routes by ID and by trimmed full path.\n*/\nfunction processRouteTree(routeTree, caseSensitive = false, initRoute) {\n\tconst segmentTree = createStaticNode(routeTree.fullPath);\n\tconst data = new Uint16Array(6);\n\tconst dynamicListsToSort = [];\n\tconst routesById = {};\n\tconst routesByPath = {};\n\tlet index = 0;\n\tparseSegments(caseSensitive, data, routeTree, 1, segmentTree, 0, dynamicListsToSort, (route) => {\n\t\tinitRoute?.(route, index);\n\t\tif (route.id in routesById) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Duplicate routes found with id: ${String(route.id)}`);\n\t\t\tinvariant();\n\t\t}\n\t\troutesById[route.id] = route;\n\t\tif (index !== 0 && route.path) {\n\t\t\tconst trimmedFullPath = trimPathRight(route.fullPath);\n\t\t\tif (!routesByPath[trimmedFullPath] || route.fullPath.endsWith(\"/\")) routesByPath[trimmedFullPath] = route;\n\t\t}\n\t\tindex++;\n\t});\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\treturn {\n\t\tprocessedTree: {\n\t\t\tsegmentTree,\n\t\t\tsingleCache: createLRUCache(1e3),\n\t\t\tmatchCache: createLRUCache(1e3),\n\t\t\tflatCache: null,\n\t\t\tmasksTree: null\n\t\t},\n\t\troutesById,\n\t\troutesByPath\n\t};\n}\nfunction findMatch(path, segmentTree, fuzzy = false) {\n\tconst parts = path.split(\"/\");\n\tconst leaf = getNodeMatch(path, parts, segmentTree, fuzzy);\n\tif (!leaf) return null;\n\tconst [rawParams] = extractParams(path, parts, leaf);\n\treturn {\n\t\troute: leaf.node.route,\n\t\trawParams\n\t};\n}\n/**\n* This function is \"resumable\":\n* - the `leaf` input can contain `extract` and `rawParams` properties from a previous `extractParams` call\n* - the returned `state` can be passed back as `extract` in a future call to continue extracting params from where we left off\n*\n* Inputs are *not* mutated.\n*/\nfunction extractParams(path, parts, leaf) {\n\tconst list = buildBranch(leaf.node);\n\tlet nodeParts = null;\n\tconst rawParams = Object.create(null);\n\t/** which segment of the path we're currently processing */\n\tlet partIndex = leaf.extract?.part ?? 0;\n\t/** which node of the route tree branch we're currently processing */\n\tlet nodeIndex = leaf.extract?.node ?? 0;\n\t/** index of the 1st character of the segment we're processing in the path string */\n\tlet pathIndex = leaf.extract?.path ?? 0;\n\t/** which fullPath segment we're currently processing */\n\tlet segmentCount = leaf.extract?.segment ?? 0;\n\tfor (; nodeIndex < list.length; partIndex++, nodeIndex++, pathIndex++, segmentCount++) {\n\t\tconst node = list[nodeIndex];\n\t\tif (node.kind === SEGMENT_TYPE_INDEX) break;\n\t\tif (node.kind === SEGMENT_TYPE_PATHLESS) {\n\t\t\tsegmentCount--;\n\t\t\tpartIndex--;\n\t\t\tpathIndex--;\n\t\t\tcontinue;\n\t\t}\n\t\tconst part = parts[partIndex];\n\t\tconst currentPathIndex = pathIndex;\n\t\tif (part) pathIndex += part.length;\n\t\tif (node.kind === 1) {\n\t\t\tnodeParts ??= leaf.node.fullPath.split(\"/\");\n\t\t\tconst nodePart = nodeParts[segmentCount];\n\t\t\tconst preLength = node.prefix?.length ?? 0;\n\t\t\tif (nodePart.charCodeAt(preLength) === 123) {\n\t\t\t\tconst sufLength = node.suffix?.length ?? 0;\n\t\t\t\tconst name = nodePart.substring(preLength + 2, nodePart.length - sufLength - 1);\n\t\t\t\tconst value = part.substring(preLength, part.length - sufLength);\n\t\t\t\trawParams[name] = decodeURIComponent(value);\n\t\t\t} else {\n\t\t\t\tconst name = nodePart.substring(1);\n\t\t\t\trawParams[name] = decodeURIComponent(part);\n\t\t\t}\n\t\t} else if (node.kind === 3) {\n\t\t\tif (leaf.skipped & 1 << nodeIndex) {\n\t\t\t\tpartIndex--;\n\t\t\t\tpathIndex = currentPathIndex - 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnodeParts ??= leaf.node.fullPath.split(\"/\");\n\t\t\tconst nodePart = nodeParts[segmentCount];\n\t\t\tconst preLength = node.prefix?.length ?? 0;\n\t\t\tconst sufLength = node.suffix?.length ?? 0;\n\t\t\tconst name = nodePart.substring(preLength + 3, nodePart.length - sufLength - 1);\n\t\t\tconst value = node.suffix || node.prefix ? part.substring(preLength, part.length - sufLength) : part;\n\t\t\tif (value) rawParams[name] = decodeURIComponent(value);\n\t\t} else if (node.kind === 2) {\n\t\t\tconst n = node;\n\t\t\tconst value = path.substring(currentPathIndex + (n.prefix?.length ?? 0), path.length - (n.suffix?.length ?? 0));\n\t\t\tconst splat = decodeURIComponent(value);\n\t\t\trawParams[\"*\"] = splat;\n\t\t\trawParams._splat = splat;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (leaf.rawParams) Object.assign(rawParams, leaf.rawParams);\n\treturn [rawParams, {\n\t\tpart: partIndex,\n\t\tnode: nodeIndex,\n\t\tpath: pathIndex,\n\t\tsegment: segmentCount\n\t}];\n}\nfunction buildRouteBranch(route) {\n\tconst list = [route];\n\twhile (route.parentRoute) {\n\t\troute = route.parentRoute;\n\t\tlist.push(route);\n\t}\n\tlist.reverse();\n\treturn list;\n}\nfunction buildBranch(node) {\n\tconst list = Array(node.depth + 1);\n\tdo {\n\t\tlist[node.depth] = node;\n\t\tnode = node.parent;\n\t} while (node);\n\treturn list;\n}\nfunction getNodeMatch(path, parts, segmentTree, fuzzy) {\n\tif (path === \"/\" && segmentTree.index) return {\n\t\tnode: segmentTree.index,\n\t\tskipped: 0\n\t};\n\tconst trailingSlash = !last(parts);\n\tconst pathIsIndex = trailingSlash && path !== \"/\";\n\tconst partsLength = parts.length - (trailingSlash ? 1 : 0);\n\tconst stack = [{\n\t\tnode: segmentTree,\n\t\tindex: 1,\n\t\tskipped: 0,\n\t\tstatics: 0,\n\t\tdynamics: 0,\n\t\toptionals: 0\n\t}];\n\tlet bestFuzzy = null;\n\tlet bestMatch = null;\n\twhile (stack.length) {\n\t\tconst frame = stack.pop();\n\t\tconst { node, index, skipped, statics, dynamics, optionals } = frame;\n\t\tlet { extract, rawParams } = frame;\n\t\tif (node.kind === 2 && node.route && !isFrameMoreSpecific(bestMatch, frame)) continue;\n\t\tif (node.parse) {\n\t\t\tif (!validateParseParams(path, parts, frame)) continue;\n\t\t\trawParams = frame.rawParams;\n\t\t\textract = frame.extract;\n\t\t}\n\t\tif (fuzzy && node.route && node.kind !== SEGMENT_TYPE_INDEX && isFrameMoreSpecific(bestFuzzy, frame)) bestFuzzy = frame;\n\t\tconst isBeyondPath = index === partsLength;\n\t\tif (isBeyondPath) {\n\t\t\tif (node.route && (!pathIsIndex || node.kind === SEGMENT_TYPE_INDEX || node.kind === 2) && isFrameMoreSpecific(bestMatch, frame)) bestMatch = frame;\n\t\t\tif (!node.optional && !node.wildcard && !node.index && !node.pathless) continue;\n\t\t}\n\t\tconst part = isBeyondPath ? void 0 : parts[index];\n\t\tlet lowerPart;\n\t\tif (isBeyondPath && node.index) {\n\t\t\tconst indexFrame = {\n\t\t\t\tnode: node.index,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t};\n\t\t\tlet indexValid = true;\n\t\t\tif (node.index.parse) {\n\t\t\t\tif (!validateParseParams(path, parts, indexFrame)) indexValid = false;\n\t\t\t}\n\t\t\tif (indexValid) {\n\t\t\t\tif (!dynamics && !optionals && !skipped && isPerfectStaticMatch(statics, partsLength)) return indexFrame;\n\t\t\t\tif (isFrameMoreSpecific(bestMatch, indexFrame)) bestMatch = indexFrame;\n\t\t\t}\n\t\t}\n\t\tif (node.wildcard) for (let i = node.wildcard.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.wildcard[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tif (!(segment.caseSensitive ? part : lowerPart ??= part.toLowerCase()).startsWith(prefix)) continue;\n\t\t\t}\n\t\t\tif (suffix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tconst end = parts.slice(index).join(\"/\").slice(-suffix.length);\n\t\t\t\tif ((segment.caseSensitive ? end : end.toLowerCase()) !== suffix) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: partsLength,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.optional) {\n\t\t\tconst nextSkipped = skipped | 1 << node.depth + 1;\n\t\t\tfor (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex,\n\t\t\t\t\tskipped: nextSkipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals,\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!isBeyondPath) for (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tconst { prefix, suffix } = segment;\n\t\t\t\tif (prefix || suffix) {\n\t\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\t\tif (suffix && !casePart.endsWith(suffix)) continue;\n\t\t\t\t}\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex: index + 1,\n\t\t\t\t\tskipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals: optionals + segmentScore(partsLength, index),\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (!isBeyondPath && node.dynamic && part) for (let i = node.dynamic.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.dynamic[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix || suffix) {\n\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\tif (suffix && !casePart.endsWith(suffix)) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics: dynamics + segmentScore(partsLength, index),\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.staticInsensitive) {\n\t\t\tconst match = node.staticInsensitive.get(lowerPart ??= part.toLowerCase());\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.static) {\n\t\t\tconst match = node.static.get(part);\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.pathless) for (let i = node.pathless.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.pathless[i];\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t}\n\tif (bestMatch) return bestMatch;\n\tif (fuzzy && bestFuzzy) {\n\t\tlet sliceIndex = bestFuzzy.index;\n\t\tfor (let i = 0; i < bestFuzzy.index; i++) sliceIndex += parts[i].length;\n\t\tconst splat = sliceIndex === path.length ? \"/\" : path.slice(sliceIndex);\n\t\tbestFuzzy.rawParams ??= Object.create(null);\n\t\tbestFuzzy.rawParams[\"**\"] = decodeURIComponent(splat);\n\t\treturn bestFuzzy;\n\t}\n\treturn null;\n}\nfunction segmentScore(partsLength, index) {\n\treturn 2 ** (partsLength - index - 1);\n}\nfunction isPerfectStaticMatch(statics, partsLength) {\n\treturn statics === 2 ** (partsLength - 1) - 1;\n}\nfunction validateParseParams(path, parts, frame) {\n\tlet rawParams;\n\tlet state;\n\ttry {\n\t\t[rawParams, state] = extractParams(path, parts, frame);\n\t} catch {\n\t\treturn null;\n\t}\n\tframe.rawParams = rawParams;\n\tframe.extract = state;\n\tif (!frame.node.parse) return true;\n\ttry {\n\t\tif (frame.node.parse(rawParams) === false) return null;\n\t} catch {}\n\treturn true;\n}\nfunction isFrameMoreSpecific(prev, next) {\n\tif (!prev) return true;\n\treturn next.statics > prev.statics || next.statics === prev.statics && (next.dynamics > prev.dynamics || next.dynamics === prev.dynamics && (next.optionals > prev.optionals || next.optionals === prev.optionals && ((next.node.kind === SEGMENT_TYPE_INDEX) > (prev.node.kind === SEGMENT_TYPE_INDEX) || next.node.kind === SEGMENT_TYPE_INDEX === (prev.node.kind === SEGMENT_TYPE_INDEX) && next.node.depth > prev.node.depth)));\n}\n//#endregion\nexport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, parseSegment, processRouteMasks, processRouteTree };\n\n//# sourceMappingURL=new-process-route-tree.js.map","import { last } from \"./utils.js\";\nimport { parseSegment } from \"./new-process-route-tree.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/path.ts\n/** Join path segments, cleaning duplicate slashes between parts. */\nfunction joinPaths(paths) {\n\treturn cleanPath(paths.filter((val) => {\n\t\treturn val !== void 0;\n\t}).join(\"/\"));\n}\n/** Remove repeated slashes from a path string. */\nfunction cleanPath(path) {\n\treturn path.replace(/\\/{2,}/g, \"/\");\n}\n/** Trim leading slashes (except preserving root '/'). */\nfunction trimPathLeft(path) {\n\treturn path === \"/\" ? path : path.replace(/^\\/{1,}/, \"\");\n}\n/** Trim trailing slashes (except preserving root '/'). */\nfunction trimPathRight(path) {\n\tconst len = path.length;\n\treturn len > 1 && path[len - 1] === \"/\" ? path.replace(/\\/{1,}$/, \"\") : path;\n}\n/** Trim both leading and trailing slashes. */\nfunction trimPath(path) {\n\treturn trimPathRight(trimPathLeft(path));\n}\n/** Remove a trailing slash from value when appropriate for comparisons. */\nfunction removeTrailingSlash(value, basepath) {\n\tif (value?.endsWith(\"/\") && value !== \"/\" && value !== `${basepath}/`) return value.slice(0, -1);\n\treturn value;\n}\n/**\n* Compare two pathnames for exact equality after normalizing trailing slashes\n* relative to the provided `basepath`.\n*/\nfunction exactPathTest(pathName1, pathName2, basepath) {\n\treturn removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);\n}\n/**\n* Resolve a destination path against a base, honoring trailing-slash policy\n* and supporting relative segments (`.`/`..`) and absolute `to` values.\n*/\nfunction resolvePath({ base, to, trailingSlash = \"never\", cache }) {\n\tif (to.includes(\"//\")) to = cleanPath(to);\n\tif (to.startsWith(\"/\")) {\n\t\tif (to.length === 1 || trailingSlash === \"preserve\") return to;\n\t\tif (trailingSlash === \"always\") return to.endsWith(\"/\") ? to : `${to}/`;\n\t\treturn to.endsWith(\"/\") ? to.slice(0, -1) : to;\n\t}\n\tconst isBase = to === \".\";\n\tlet key;\n\tif (cache) {\n\t\tkey = isBase ? base : base + \"\\0\" + to;\n\t\tconst cached = cache.get(key);\n\t\tif (cached) return cached;\n\t}\n\tlet baseSegments;\n\tif (isBase) baseSegments = base.split(\"/\");\n\telse {\n\t\tif (base.includes(\"//\")) base = cleanPath(base);\n\t\tbaseSegments = base.split(\"/\");\n\t\twhile (baseSegments.length > 1 && last(baseSegments) === \"\") baseSegments.pop();\n\t\tconst toSegments = to.split(\"/\");\n\t\tfor (let index = 0, length = toSegments.length; index < length; index++) {\n\t\t\tconst value = toSegments[index];\n\t\t\tif (value === \"\") {\n\t\t\t\tif (!index) baseSegments = [value];\n\t\t\t\telse if (index === length - 1) baseSegments.push(value);\n\t\t\t} else if (value === \"..\") if (baseSegments.length > 1) baseSegments.pop();\n\t\t\telse baseSegments = [\"\"];\n\t\t\telse if (value === \".\") {} else baseSegments.push(value);\n\t\t}\n\t}\n\tif (baseSegments.length > 1) {\n\t\tif (last(baseSegments) === \"\") {\n\t\t\tif (trailingSlash === \"never\") baseSegments.pop();\n\t\t} else if (trailingSlash === \"always\") baseSegments.push(\"\");\n\t}\n\tconst joined = baseSegments.join(\"/\");\n\tconst result = (isBase ? cleanPath(joined) : joined) || \"/\";\n\tif (key && cache) cache.set(key, result);\n\treturn result;\n}\n/**\n* Create a pre-compiled decode config from allowed characters.\n* This should be called once at router initialization.\n*/\nfunction compileDecodeCharMap(pathParamsAllowedCharacters) {\n\tconst charMap = new Map(pathParamsAllowedCharacters.map((char) => [encodeURIComponent(char), char]));\n\tconst pattern = Array.from(charMap.keys()).map((key) => key.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\");\n\tconst regex = new RegExp(pattern, \"g\");\n\treturn (encoded) => encoded.replace(regex, (match) => charMap.get(match) ?? match);\n}\nfunction encodeParam(key, params, decoder) {\n\tconst value = params[key];\n\tif (typeof value !== \"string\") return value;\n\tif (key === \"_splat\") {\n\t\tif (/^[a-zA-Z0-9\\-._~!/]*$/.test(value)) return value;\n\t\treturn value.split(\"/\").map((segment) => encodePathParam(segment, decoder)).join(\"/\");\n\t} else return encodePathParam(value, decoder);\n}\n/**\n* Interpolate params and wildcards into a route path template.\n*\n* - Encodes params safely (configurable allowed characters)\n* - Supports `{-$optional}` segments, `{prefix{$id}suffix}` and `{$}` wildcards\n*/\nfunction interpolatePath({ path, params, decoder, ...rest }) {\n\tlet isMissingParams = false;\n\tconst usedParams = Object.create(null);\n\tif (!path || path === \"/\") return {\n\t\tinterpolatedPath: \"/\",\n\t\tusedParams,\n\t\tisMissingParams\n\t};\n\tif (!path.includes(\"$\")) return {\n\t\tinterpolatedPath: path,\n\t\tusedParams,\n\t\tisMissingParams\n\t};\n\tif (isServer ?? rest.server) {\n\t\tif (path.indexOf(\"{\") === -1) {\n\t\t\tconst length = path.length;\n\t\t\tlet cursor = 0;\n\t\t\tlet joined = \"\";\n\t\t\twhile (cursor < length) {\n\t\t\t\twhile (cursor < length && path.charCodeAt(cursor) === 47) cursor++;\n\t\t\t\tif (cursor >= length) break;\n\t\t\t\tconst start = cursor;\n\t\t\t\tlet end = path.indexOf(\"/\", cursor);\n\t\t\t\tif (end === -1) end = length;\n\t\t\t\tcursor = end;\n\t\t\t\tconst part = path.substring(start, end);\n\t\t\t\tif (!part) continue;\n\t\t\t\tif (part.charCodeAt(0) === 36) if (part.length === 1) {\n\t\t\t\t\tconst splat = params._splat;\n\t\t\t\t\tusedParams._splat = splat;\n\t\t\t\t\tusedParams[\"*\"] = splat;\n\t\t\t\t\tif (!splat) {\n\t\t\t\t\t\tisMissingParams = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst value = encodeParam(\"_splat\", params, decoder);\n\t\t\t\t\tjoined += \"/\" + value;\n\t\t\t\t} else {\n\t\t\t\t\tconst key = part.substring(1);\n\t\t\t\t\tif (!isMissingParams && !(key in params)) isMissingParams = true;\n\t\t\t\t\tusedParams[key] = params[key];\n\t\t\t\t\tconst value = encodeParam(key, params, decoder) ?? \"undefined\";\n\t\t\t\t\tjoined += \"/\" + value;\n\t\t\t\t}\n\t\t\t\telse joined += \"/\" + part;\n\t\t\t}\n\t\t\tif (path.endsWith(\"/\")) joined += \"/\";\n\t\t\treturn {\n\t\t\t\tusedParams,\n\t\t\t\tinterpolatedPath: joined || \"/\",\n\t\t\t\tisMissingParams\n\t\t\t};\n\t\t}\n\t}\n\tconst length = path.length;\n\tlet cursor = 0;\n\tlet segment;\n\tlet joined = \"\";\n\twhile (cursor < length) {\n\t\tconst start = cursor;\n\t\tsegment = parseSegment(path, start, segment);\n\t\tconst end = segment[5];\n\t\tcursor = end + 1;\n\t\tif (start === end) continue;\n\t\tconst kind = segment[0];\n\t\tif (kind === 0) {\n\t\t\tjoined += \"/\" + path.substring(start, end);\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 2) {\n\t\t\tconst splat = params._splat;\n\t\t\tusedParams._splat = splat;\n\t\t\tusedParams[\"*\"] = splat;\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tif (!splat) {\n\t\t\t\tisMissingParams = true;\n\t\t\t\tif (prefix || suffix) joined += \"/\" + prefix + suffix;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = encodeParam(\"_splat\", params, decoder);\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 1) {\n\t\t\tconst key = path.substring(segment[2], segment[3]);\n\t\t\tif (!isMissingParams && !(key in params)) isMissingParams = true;\n\t\t\tusedParams[key] = params[key];\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tconst value = encodeParam(key, params, decoder) ?? \"undefined\";\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 3) {\n\t\t\tconst key = path.substring(segment[2], segment[3]);\n\t\t\tconst valueRaw = params[key];\n\t\t\tif (valueRaw == null) continue;\n\t\t\tusedParams[key] = valueRaw;\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tconst value = encodeParam(key, params, decoder) ?? \"\";\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t}\n\tif (path.endsWith(\"/\")) joined += \"/\";\n\treturn {\n\t\tusedParams,\n\t\tinterpolatedPath: joined || \"/\",\n\t\tisMissingParams\n\t};\n}\nfunction encodePathParam(value, decoder) {\n\tconst encoded = encodeURIComponent(value);\n\treturn decoder?.(encoded) ?? encoded;\n}\n//#endregion\nexport { cleanPath, compileDecodeCharMap, exactPathTest, interpolatePath, joinPaths, removeTrailingSlash, resolvePath, trimPath, trimPathLeft, trimPathRight };\n\n//# sourceMappingURL=path.js.map","//#region src/not-found.ts\n/**\n* Create a not-found error object recognized by TanStack Router.\n*\n* Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n* Use `routeId` to target a specific route's not-found boundary. If `throw`\n* is true, the error is thrown instead of returned.\n*\n* @param options Optional settings including `routeId`, `headers`, and `throw`.\n* @returns A not-found error object that can be thrown or returned.\n* @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n*/\nfunction notFound(options = {}) {\n\toptions.isNotFound = true;\n\tif (options.throw) throw options;\n\treturn options;\n}\n/** Determine if a value is a TanStack Router not-found error. */\nfunction isNotFound(obj) {\n\treturn obj?.isNotFound === true;\n}\n//#endregion\nexport { isNotFound, notFound };\n\n//# sourceMappingURL=not-found.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/scroll-restoration.ts\nfunction getSafeSessionStorage() {\n\ttry {\n\t\treturn sessionStorage;\n\t} catch {\n\t\treturn;\n\t}\n}\nconst storageKey = \"tsr-scroll-restoration-v1_3\";\nconst safeSessionStorage = getSafeSessionStorage();\nfunction createScrollRestorationCache() {\n\ttry {\n\t\treturn JSON.parse(safeSessionStorage?.getItem(\"tsr-scroll-restoration-v1_3\") || \"{}\");\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction persistScrollRestorationCache() {\n\ttry {\n\t\tsafeSessionStorage?.setItem(storageKey, JSON.stringify(scrollRestorationCache));\n\t} catch {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(\"[ts-router] Could not persist scroll restoration state to sessionStorage.\");\n\t}\n}\nconst scrollRestorationCache = /* @__PURE__ */ createScrollRestorationCache();\nconst scrollRestorationIdAttribute = \"data-scroll-restoration-id\";\n/**\n* The default `getKey` function for `useScrollRestoration`.\n* It returns the `key` from the location state or the `href` of the location.\n*\n* The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.\n*/\nconst defaultGetScrollRestorationKey = (location) => {\n\treturn location.state.__TSR_key || location.href;\n};\nfunction getScrollRestorationSelector(element) {\n\tconst attrId = element.getAttribute(scrollRestorationIdAttribute);\n\tif (attrId) return `[${scrollRestorationIdAttribute}=\"${attrId}\"]`;\n\tlet selector = \"\";\n\tlet el = element;\n\tlet parent;\n\twhile (parent = el.parentNode) {\n\t\tlet index = 1;\n\t\tlet sibling = el;\n\t\twhile (sibling = sibling.previousElementSibling) index++;\n\t\tconst part = `${el.localName}:nth-child(${index})`;\n\t\tselector = selector ? `${part} > ${selector}` : part;\n\t\tel = parent;\n\t}\n\treturn selector;\n}\nfunction getElementScrollRestorationEntry(router, options) {\n\tconst entries = scrollRestorationCache[(options.getKey || defaultGetScrollRestorationKey)(router.latestLocation)];\n\tif (!entries) return;\n\tif (options.id) return entries[`[${scrollRestorationIdAttribute}=\"${options.id}\"]`];\n\tconst element = options.getElement?.();\n\tif (!element) return;\n\treturn entries[element === window ? windowScrollTarget : getScrollRestorationSelector(element)];\n}\nlet ignoreScroll = false;\nconst windowScrollTarget = \"window\";\nfunction getElement(selector) {\n\ttry {\n\t\treturn typeof selector === \"function\" ? selector() : document.querySelector(selector);\n\t} catch {}\n}\nfunction getScrollToTopElements(scrollToTopSelectors) {\n\tconst elements = /* @__PURE__ */ new Set();\n\tfor (const selector of scrollToTopSelectors) {\n\t\tif (selector === windowScrollTarget) continue;\n\t\tconst element = getElement(selector);\n\t\tif (element) elements.add(element);\n\t}\n\treturn elements;\n}\nfunction setupScrollRestoration(router, force) {\n\tconst shouldSetupScrollRestoration = force ?? router.options.scrollRestoration;\n\tconst scroll = router._scroll;\n\tif (shouldSetupScrollRestoration) scroll.restoring = true;\n\tif (isServer ?? router.isServer) return;\n\tconst getKey = router.options.getScrollRestorationKey || defaultGetScrollRestorationKey;\n\tconst trackedScrollTargets = /* @__PURE__ */ new Set();\n\tconst snapshotCurrentScrollTargets = (restoreKey) => {\n\t\tconst keyEntry = scrollRestorationCache[restoreKey] ||= {};\n\t\tfor (const target of trackedScrollTargets) if (target === document) keyEntry[windowScrollTarget] = {\n\t\t\tscrollX,\n\t\t\tscrollY\n\t\t};\n\t\telse if (target.isConnected) keyEntry[getScrollRestorationSelector(target)] = {\n\t\t\tscrollX: target.scrollLeft,\n\t\t\tscrollY: target.scrollTop\n\t\t};\n\t};\n\tif (shouldSetupScrollRestoration && !scroll.restoration) {\n\t\tscroll.restoration = true;\n\t\tignoreScroll = false;\n\t\thistory.scrollRestoration = \"manual\";\n\t\tdocument.addEventListener(\"scroll\", (event) => {\n\t\t\tif (ignoreScroll) return;\n\t\t\ttrackedScrollTargets.add(event.target);\n\t\t}, true);\n\t\trouter.subscribe(\"onBeforeLoad\", (event) => {\n\t\t\tif (event.fromLocation) snapshotCurrentScrollTargets(getKey(event.fromLocation));\n\t\t\ttrackedScrollTargets.clear();\n\t\t});\n\t\taddEventListener(\"pagehide\", () => {\n\t\t\tsnapshotCurrentScrollTargets(getKey(router.stores.resolvedLocation.get() ?? router.stores.location.get()));\n\t\t\tpersistScrollRestorationCache();\n\t\t});\n\t}\n\tif (scroll.reset) return;\n\tscroll.reset = true;\n\trouter.subscribe(\"onRendered\", (event) => {\n\t\tconst behavior = router.options.scrollRestorationBehavior;\n\t\tconst scrollToTopSelectors = router.options.scrollToTopSelectors;\n\t\tconst shouldResetScroll = scroll.next;\n\t\tconst hashNavigation = scroll.hash;\n\t\tlet scrollToTopElements;\n\t\ttrackedScrollTargets.clear();\n\t\tscroll.next = true;\n\t\tscroll.hash = false;\n\t\tif (typeof router.options.scrollRestoration === \"function\" && !router.options.scrollRestoration({ location: router.latestLocation })) return;\n\t\tconst cacheKey = getKey(event.toLocation);\n\t\tconst fromCacheKey = event.fromLocation && getKey(event.fromLocation);\n\t\tif (scroll.restoring && fromCacheKey && fromCacheKey !== cacheKey) {\n\t\t\tconst fromElementEntries = scrollRestorationCache[fromCacheKey];\n\t\t\tif (fromElementEntries) {\n\t\t\t\tlet toElementEntries = scrollRestorationCache[cacheKey];\n\t\t\t\tfor (const elementSelector in fromElementEntries) {\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (shouldResetScroll) continue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (!element) continue;\n\t\t\t\t\t\tif (shouldResetScroll && scrollToTopSelectors) {\n\t\t\t\t\t\t\tscrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\t\t\t\tif (scrollToTopElements.has(element)) continue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!toElementEntries) toElementEntries = scrollRestorationCache[cacheKey] = {};\n\t\t\t\t\ttoElementEntries[elementSelector] ??= fromElementEntries[elementSelector];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tignoreScroll = true;\n\t\ttry {\n\t\t\tconst hash = event.toLocation.hash;\n\t\t\tconst hashScrollIntoViewOptions = event.toLocation.state.__hashScrollIntoViewOptions ?? true;\n\t\t\tlet windowRestored = false;\n\t\t\tif (shouldResetScroll) {\n\t\t\t\tif (!hash && scrollToTopSelectors) scrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\tconst skipWindowRestore = hash && hashScrollIntoViewOptions && hashNavigation;\n\t\t\t\tconst elementEntries = scroll.restoring ? scrollRestorationCache[cacheKey] : void 0;\n\t\t\t\tif (elementEntries) for (const elementSelector in elementEntries) {\n\t\t\t\t\tconst { scrollX, scrollY } = elementEntries[elementSelector];\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (skipWindowRestore) continue;\n\t\t\t\t\t\tscrollTo({\n\t\t\t\t\t\t\ttop: scrollY,\n\t\t\t\t\t\t\tleft: scrollX,\n\t\t\t\t\t\t\tbehavior\n\t\t\t\t\t\t});\n\t\t\t\t\t\twindowRestored = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\telement.scrollLeft = scrollX;\n\t\t\t\t\t\t\telement.scrollTop = scrollY;\n\t\t\t\t\t\t\tscrollToTopElements?.delete(element);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hash) {\n\t\t\t\t\tconst scrollOptions = {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbehavior\n\t\t\t\t\t};\n\t\t\t\t\tif (!windowRestored) scrollTo(scrollOptions);\n\t\t\t\t\tif (scrollToTopElements) for (const element of scrollToTopElements) element.scrollTo(scrollOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!windowRestored && hash && hashScrollIntoViewOptions) document.getElementById(hash)?.scrollIntoView(hashScrollIntoViewOptions);\n\t\t} finally {\n\t\t\tignoreScroll = false;\n\t\t}\n\t});\n}\n//#endregion\nexport { defaultGetScrollRestorationKey, getElementScrollRestorationEntry, setupScrollRestoration, storageKey };\n\n//# sourceMappingURL=scroll-restoration.js.map","//#region src/qss.ts\n/**\n* Program is a reimplementation of the `qss` package:\n* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License\n* https://github.com/lukeed/qss/blob/master/license.md\n*\n* This reimplementation uses modern browser APIs\n* (namely URLSearchParams) and TypeScript while still\n* maintaining the original functionality and interface.\n*\n* Update: this implementation has also been mangled to\n* fit exactly our use-case (single value per key in encoding).\n*/\n/**\n* Encodes an object into a query string.\n* @param obj - The object to encode into a query string.\n* @param stringify - An optional custom stringify function.\n* @returns The encoded query string.\n* @example\n* ```\n* // Example input: encode({ token: 'foo', key: 'value' })\n* // Expected output: \"token=foo&key=value\"\n* ```\n*/\nfunction encode(obj, stringify = String) {\n\tconst result = new URLSearchParams();\n\tfor (const key in obj) {\n\t\tconst val = obj[key];\n\t\tif (val !== void 0) result.set(key, stringify(val));\n\t}\n\treturn result.toString();\n}\n/**\n* Converts a string value to its appropriate type (string, number, boolean).\n* @param mix - The string value to convert.\n* @returns The converted value.\n* @example\n* // Example input: toValue(\"123\")\n* // Expected output: 123\n*/\nfunction toValue(str) {\n\tif (!str) return \"\";\n\tif (str === \"false\") return false;\n\tif (str === \"true\") return true;\n\treturn +str * 0 === 0 && +str + \"\" === str ? +str : str;\n}\n/**\n* Decodes a query string into an object.\n* @param str - The query string to decode.\n* @returns The decoded key-value pairs in an object format.\n* @example\n* // Example input: decode(\"token=foo&key=value\")\n* // Expected output: { \"token\": \"foo\", \"key\": \"value\" }\n*/\nfunction decode(str) {\n\tconst searchParams = new URLSearchParams(str);\n\tconst result = Object.create(null);\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tconst previousValue = result[key];\n\t\tif (previousValue == null) result[key] = toValue(value);\n\t\telse if (Array.isArray(previousValue)) previousValue.push(toValue(value));\n\t\telse result[key] = [previousValue, toValue(value)];\n\t}\n\treturn result;\n}\n//#endregion\nexport { decode, encode };\n\n//# sourceMappingURL=qss.js.map","import { decode, encode } from \"./qss.js\";\n//#region src/searchParams.ts\nconst jsonStart = /^(?:\\s|[\"[{\\d-]|fa|nu|tr)/;\n/** Default `parseSearch` that strips leading '?' and JSON-parses values. */\nconst defaultParseSearch = parseSearchWith(JSON.parse);\n/** Default `stringifySearch` using JSON.stringify for complex values. */\nconst defaultStringifySearch = stringifySearchWith(JSON.stringify, JSON.parse);\n/**\n* Build a `parseSearch` function using a provided JSON-like parser.\n*\n* The returned function strips a leading `?`, decodes values, and attempts to\n* JSON-parse string values using the given `parser`.\n*\n* @param parser Function to parse a string value (e.g. `JSON.parse`).\n* @returns A `parseSearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction parseSearchWith(parser) {\n\treturn (searchStr) => {\n\t\tif (searchStr[0] === \"?\") searchStr = searchStr.substring(1);\n\t\tconst query = decode(searchStr);\n\t\tfor (const key in query) {\n\t\t\tconst value = query[key];\n\t\t\tif (typeof value === \"string\") try {\n\t\t\t\tquery[key] = parser(value);\n\t\t\t} catch (_err) {}\n\t\t}\n\t\treturn query;\n\t};\n}\n/**\n* Build a `stringifySearch` function using a provided serializer.\n*\n* Non-primitive values are serialized with `stringify`. If a `parser` is\n* supplied, string values that are parseable are re-serialized to ensure\n* symmetry with `parseSearch`.\n*\n* @param stringify Function to serialize a value (e.g. `JSON.stringify`).\n* @param parser Optional parser to detect parseable strings.\n* @returns A `stringifySearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction stringifySearchWith(stringify, parser) {\n\tconst isJsonParser = parser === JSON.parse;\n\tfunction stringifyValue(val) {\n\t\tif (val && typeof val === \"object\") try {\n\t\t\treturn stringify(val);\n\t\t} catch (_err) {}\n\t\telse if (parser && typeof val === \"string\") {\n\t\t\tif (isJsonParser && !jsonStart.test(val)) return val;\n\t\t\ttry {\n\t\t\t\tparser(val);\n\t\t\t\treturn stringify(val);\n\t\t\t} catch (_err) {}\n\t\t}\n\t\treturn val;\n\t}\n\treturn (search) => {\n\t\tconst searchStr = encode(search, stringifyValue);\n\t\treturn searchStr ? `?${searchStr}` : \"\";\n\t};\n}\n//#endregion\nexport { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith };\n\n//# sourceMappingURL=searchParams.js.map","//#region src/root.ts\n/** Stable identifier used for the root route in a route tree. */\nconst rootRouteId = \"__root__\";\n//#endregion\nexport { rootRouteId };\n\n//# sourceMappingURL=root.js.map","//#region src/redirect.ts\n/**\n* Create a redirect Response understood by TanStack Router.\n*\n* Use from route `loader`/`beforeLoad` or server functions to trigger a\n* navigation. If `throw: true` is set, the redirect is thrown instead of\n* returned. When an absolute `href` is supplied and `reloadDocument` is not\n* set, a full-document navigation is inferred.\n*\n* @param opts Options for the redirect. Common fields:\n* - `href`: absolute URL for external redirects; infers `reloadDocument`.\n* - `statusCode`: HTTP status code to use (defaults to 307).\n* - `headers`: additional headers to include on the Response.\n* - Standard navigation options like `to`, `params`, `search`, `replace`,\n* and `reloadDocument` for internal redirects.\n* @returns A Response augmented with router navigation options.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction\n*/\nfunction redirect(opts) {\n\topts.statusCode = opts.statusCode || opts.code || 307;\n\tif (!opts.reloadDocument && typeof opts.href === \"string\") try {\n\t\tnew URL(opts.href);\n\t\topts.reloadDocument = true;\n\t} catch {}\n\tconst headers = new Headers(opts.headers);\n\tif (opts.href && headers.get(\"Location\") === null) headers.set(\"Location\", opts.href);\n\tconst response = new Response(null, {\n\t\tstatus: opts.statusCode,\n\t\theaders\n\t});\n\tresponse.options = opts;\n\tif (opts.throw) throw response;\n\treturn response;\n}\n/** Check whether a value is a TanStack Router redirect Response. */\n/** Check whether a value is a TanStack Router redirect Response. */\nfunction isRedirect(obj) {\n\treturn obj instanceof Response && !!obj.options;\n}\n/** True if value is a redirect with a resolved `href` location. */\n/** True if value is a redirect with a resolved `href` location. */\nfunction isResolvedRedirect(obj) {\n\treturn isRedirect(obj) && !!obj.options.href;\n}\n/** Parse a serialized redirect object back into a redirect Response. */\n/** Parse a serialized redirect object back into a redirect Response. */\nfunction parseRedirect(obj) {\n\tif (obj !== null && typeof obj === \"object\" && obj.isSerializedRedirect) return redirect(obj);\n}\n//#endregion\nexport { isRedirect, isResolvedRedirect, parseRedirect, redirect };\n\n//# sourceMappingURL=redirect.js.map","import { joinPaths, trimPath } from \"./path.js\";\n//#region src/rewrite.ts\n/** Compose multiple rewrite pairs into a single in/out rewrite. */\nfunction composeRewrites(rewrites) {\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tfor (const rewrite of rewrites) url = executeRewriteInput(rewrite, url);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\tfor (let i = rewrites.length - 1; i >= 0; i--) url = executeRewriteOutput(rewrites[i], url);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Create a rewrite pair that strips/adds a basepath on input/output. */\nfunction rewriteBasepath(opts) {\n\tconst trimmedBasepath = trimPath(opts.basepath);\n\tconst normalizedBasepath = `/${trimmedBasepath}`;\n\tconst checkBasepath = opts.caseSensitive ? normalizedBasepath : normalizedBasepath.toLowerCase();\n\tconst checkBasepathWithSlash = `${checkBasepath}/`;\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tconst pathname = opts.caseSensitive ? url.pathname : url.pathname.toLowerCase();\n\t\t\tif (pathname === checkBasepath) url.pathname = \"/\";\n\t\t\telse if (pathname.startsWith(checkBasepathWithSlash)) url.pathname = url.pathname.slice(normalizedBasepath.length);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\turl.pathname = joinPaths([\n\t\t\t\t\"/\",\n\t\t\t\ttrimmedBasepath,\n\t\t\t\turl.pathname\n\t\t\t]);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Execute a location input rewrite if provided. */\nfunction executeRewriteInput(rewrite, url) {\n\tconst res = rewrite?.input?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n/** Execute a location output rewrite if provided. */\nfunction executeRewriteOutput(rewrite, url) {\n\tconst res = rewrite?.output?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n//#endregion\nexport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath };\n\n//# sourceMappingURL=rewrite.js.map","import { arraysEqual, functionalUpdate } from \"./utils.js\";\n//#region src/stores.ts\n/** SSR non-reactive createMutableStore */\nfunction createNonReactiveMutableStore(initialValue) {\n\tlet value = initialValue;\n\treturn {\n\t\tget() {\n\t\t\treturn value;\n\t\t},\n\t\tset(nextOrUpdater) {\n\t\t\tvalue = functionalUpdate(nextOrUpdater, value);\n\t\t}\n\t};\n}\n/** SSR non-reactive createReadonlyStore */\nfunction createNonReactiveReadonlyStore(read) {\n\treturn { get() {\n\t\treturn read();\n\t} };\n}\nfunction createRouterStores(initialLocation, config) {\n\tconst { createMutableStore, createReadonlyStore, batch } = config;\n\tconst byRoute = /* @__PURE__ */ new Map();\n\tconst status = createMutableStore(\"idle\");\n\tconst location = createMutableStore(initialLocation);\n\tconst resolvedLocation = createMutableStore(void 0);\n\tconst ids = createMutableStore([]);\n\tconst matches = createReadonlyStore(() => ids.get().map((id) => byRoute.get(id).get()));\n\tconst __store = createReadonlyStore(() => ({\n\t\tstatus: status.get(),\n\t\tisLoading: status.get() === \"pending\",\n\t\tmatches: matches.get(),\n\t\tlocation: location.get(),\n\t\tresolvedLocation: resolvedLocation.get()\n\t}));\n\tfunction getMatchStore(routeId) {\n\t\tlet matchStore = byRoute.get(routeId);\n\t\tif (!matchStore) {\n\t\t\tmatchStore = createMutableStore(void 0);\n\t\t\tbyRoute.set(routeId, matchStore);\n\t\t}\n\t\treturn matchStore;\n\t}\n\tconst store = {\n\t\tstatus,\n\t\tlocation,\n\t\tresolvedLocation,\n\t\tids,\n\t\tmatches,\n\t\tbyRoute,\n\t\t__store,\n\t\tgetMatchStore,\n\t\tsetMatches\n\t};\n\tfunction setMatches(nextMatches) {\n\t\tconst previousIds = ids.get();\n\t\tconst nextIds = nextMatches.map((match) => match.routeId);\n\t\tbatch(() => {\n\t\t\tif (!arraysEqual(previousIds, nextIds)) ids.set(nextIds);\n\t\t\tfor (const id of previousIds) if (!nextIds.includes(id)) byRoute.get(id).set(() => void 0);\n\t\t\tfor (const nextMatch of nextMatches) {\n\t\t\t\tconst matchStore = getMatchStore(nextMatch.routeId);\n\t\t\t\tif (matchStore.get() !== nextMatch) matchStore.set(nextMatch);\n\t\t\t}\n\t\t});\n\t}\n\treturn store;\n}\n//#endregion\nexport { createNonReactiveMutableStore, createNonReactiveReadonlyStore, createRouterStores };\n\n//# sourceMappingURL=stores.js.map","//#region src/index.ts\nvar stateIndexKey = \"__TSR_index\";\nvar popStateEvent = \"popstate\";\nvar beforeUnloadEvent = \"beforeunload\";\nfunction createHistory(opts) {\n\tlet location = opts.getLocation();\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tconst notify = (action) => {\n\t\tlocation = opts.getLocation();\n\t\tsubscribers.forEach((subscriber) => subscriber({\n\t\t\tlocation,\n\t\t\taction\n\t\t}));\n\t};\n\tconst handleIndexChange = (action) => {\n\t\tif (opts.notifyOnIndexChange ?? true) notify(action);\n\t\telse location = opts.getLocation();\n\t};\n\tconst tryNavigation = async ({ task, navigateOpts, ...actionInfo }) => {\n\t\tif (navigateOpts?.ignoreBlocker ?? false) {\n\t\t\ttask();\n\t\t\treturn;\n\t\t}\n\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\tconst isPushOrReplace = actionInfo.type === \"PUSH\" || actionInfo.type === \"REPLACE\";\n\t\tif (typeof document !== \"undefined\" && blockers.length && isPushOrReplace) for (const blocker of blockers) {\n\t\t\tconst nextLocation = parseHref(actionInfo.path, actionInfo.state);\n\t\t\tif (await blocker.blockerFn({\n\t\t\t\tcurrentLocation: location,\n\t\t\t\tnextLocation,\n\t\t\t\taction: actionInfo.type\n\t\t\t})) {\n\t\t\t\topts.onBlocked?.();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\ttask();\n\t};\n\treturn {\n\t\tget location() {\n\t\t\treturn location;\n\t\t},\n\t\tget length() {\n\t\t\treturn opts.getLength();\n\t\t},\n\t\tsubscribers,\n\t\tsubscribe: (cb) => {\n\t\t\tsubscribers.add(cb);\n\t\t\treturn () => {\n\t\t\t\tsubscribers.delete(cb);\n\t\t\t};\n\t\t},\n\t\tpush: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex + 1, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.pushState(path, state);\n\t\t\t\t\tnotify({ type: \"PUSH\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"PUSH\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\treplace: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.replaceState(path, state);\n\t\t\t\t\tnotify({ type: \"REPLACE\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"REPLACE\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\tgo: (index, navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.go(index);\n\t\t\t\t\thandleIndexChange({\n\t\t\t\t\t\ttype: \"GO\",\n\t\t\t\t\t\tindex\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"GO\"\n\t\t\t});\n\t\t},\n\t\tback: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.back(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"BACK\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"BACK\"\n\t\t\t});\n\t\t},\n\t\tforward: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.forward(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"FORWARD\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"FORWARD\"\n\t\t\t});\n\t\t},\n\t\tcanGoBack: () => location.state[stateIndexKey] !== 0,\n\t\tcreateHref: (str) => opts.createHref(str),\n\t\tblock: (blocker) => {\n\t\t\tif (!opts.setBlockers) return () => {};\n\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\topts.setBlockers([...blockers, blocker]);\n\t\t\treturn () => {\n\t\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\t\topts.setBlockers?.(blockers.filter((b) => b !== blocker));\n\t\t\t};\n\t\t},\n\t\tflush: () => opts.flush?.(),\n\t\tdestroy: () => opts.destroy?.(),\n\t\tnotify\n\t};\n}\nfunction assignKeyAndIndex(index, state) {\n\tif (!state) state = {};\n\tconst key = createRandomKey();\n\treturn {\n\t\t...state,\n\t\tkey,\n\t\t__TSR_key: key,\n\t\t[stateIndexKey]: index\n\t};\n}\n/**\n* Creates a history object that can be used to interact with the browser's\n* navigation. This is a lightweight API wrapping the browser's native methods.\n* It is designed to work with TanStack Router, but could be used as a standalone API as well.\n* IMPORTANT: This API implements history throttling via a microtask to prevent\n* excessive calls to the history API. In some browsers, calling history.pushState or\n* history.replaceState in quick succession can cause the browser to ignore subsequent\n* calls. This API smooths out those differences and ensures that your application\n* state will *eventually* match the browser state. In most cases, this is not a problem,\n* but if you need to ensure that the browser state is up to date, you can use the\n* `history.flush` method to immediately flush all pending state changes to the browser URL.\n* @param opts\n* @param opts.getHref A function that returns the current href (path + search + hash)\n* @param opts.createHref A function that takes a path and returns a href (path + search + hash)\n* @returns A history instance\n*/\nfunction createBrowserHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\tconst originalPushState = win.history.pushState;\n\tconst originalReplaceState = win.history.replaceState;\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\tconst createHref = opts?.createHref ?? ((path) => path);\n\tconst parseLocation = opts?.parseLocation ?? (() => parseHref(`${win.location.pathname}${win.location.search}${win.location.hash}`, win.history.state));\n\tif (!win.history.state?.__TSR_key && !win.history.state?.key) {\n\t\tconst addedKey = createRandomKey();\n\t\twin.history.replaceState({\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey: addedKey,\n\t\t\t__TSR_key: addedKey\n\t\t}, \"\");\n\t}\n\tlet currentLocation = parseLocation();\n\tlet rollbackLocation;\n\tlet nextPopIsGo = false;\n\tlet ignoreNextPop = false;\n\tlet skipBlockerNextPop = false;\n\tlet ignoreNextBeforeUnload = false;\n\tconst getLocation = () => currentLocation;\n\tlet next;\n\tconst flush = () => {\n\t\tif (!next) return;\n\t\thistory._ignoreSubscribers = true;\n\t\t(next[2] ? win.history.pushState : win.history.replaceState)(next[1], \"\", next[0]);\n\t\thistory._ignoreSubscribers = false;\n\t\tnext = void 0;\n\t\trollbackLocation = void 0;\n\t};\n\tconst queueHistoryAction = (isPush, destHref, state) => {\n\t\tconst href = createHref(destHref);\n\t\tconst hasPendingAction = !!next;\n\t\tif (!hasPendingAction) rollbackLocation = currentLocation;\n\t\tcurrentLocation = parseHref(destHref, state);\n\t\tnext = [\n\t\t\thref,\n\t\t\tstate,\n\t\t\tnext?.[2] || isPush\n\t\t];\n\t\tif (!hasPendingAction) queueMicrotask(() => flush());\n\t};\n\tconst onPushPop = (type) => {\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify({ type });\n\t};\n\tconst onPushPopEvent = async () => {\n\t\tif (ignoreNextPop) {\n\t\t\tignoreNextPop = false;\n\t\t\treturn;\n\t\t}\n\t\tconst nextLocation = parseLocation();\n\t\tconst delta = nextLocation.state[stateIndexKey] - currentLocation.state[stateIndexKey];\n\t\tconst isForward = delta === 1;\n\t\tconst isBack = delta === -1;\n\t\tconst isGo = !isForward && !isBack || nextPopIsGo;\n\t\tnextPopIsGo = false;\n\t\tconst action = isGo ? \"GO\" : isBack ? \"BACK\" : \"FORWARD\";\n\t\tconst notify = isGo ? {\n\t\t\ttype: \"GO\",\n\t\t\tindex: delta\n\t\t} : { type: isBack ? \"BACK\" : \"FORWARD\" };\n\t\tif (skipBlockerNextPop) skipBlockerNextPop = false;\n\t\telse {\n\t\t\tconst blockers = _getBlockers();\n\t\t\tif (typeof document !== \"undefined\" && blockers.length) {\n\t\t\t\tfor (const blocker of blockers) if (await blocker.blockerFn({\n\t\t\t\t\tcurrentLocation,\n\t\t\t\t\tnextLocation,\n\t\t\t\t\taction\n\t\t\t\t})) {\n\t\t\t\t\tignoreNextPop = true;\n\t\t\t\t\twin.history.go(1);\n\t\t\t\t\thistory.notify(notify);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify(notify);\n\t};\n\tconst onBeforeUnload = (e) => {\n\t\tif (ignoreNextBeforeUnload) {\n\t\t\tignoreNextBeforeUnload = false;\n\t\t\treturn;\n\t\t}\n\t\tlet shouldBlock = false;\n\t\tconst blockers = _getBlockers();\n\t\tif (typeof document !== \"undefined\" && blockers.length) for (const blocker of blockers) {\n\t\t\tconst shouldHaveBeforeUnload = blocker.enableBeforeUnload ?? true;\n\t\t\tif (shouldHaveBeforeUnload === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (typeof shouldHaveBeforeUnload === \"function\" && shouldHaveBeforeUnload() === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (shouldBlock) {\n\t\t\te.preventDefault();\n\t\t\treturn e.returnValue = \"\";\n\t\t}\n\t};\n\tconst history = createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => win.history.length,\n\t\tpushState: (href, state) => queueHistoryAction(true, href, state),\n\t\treplaceState: (href, state) => queueHistoryAction(false, href, state),\n\t\tback: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) skipBlockerNextPop = true;\n\t\t\tignoreNextBeforeUnload = true;\n\t\t\treturn win.history.back();\n\t\t},\n\t\tforward: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) skipBlockerNextPop = true;\n\t\t\tignoreNextBeforeUnload = true;\n\t\t\twin.history.forward();\n\t\t},\n\t\tgo: (n) => {\n\t\t\tnextPopIsGo = true;\n\t\t\twin.history.go(n);\n\t\t},\n\t\tcreateHref: (href) => createHref(href),\n\t\tflush,\n\t\tdestroy: () => {\n\t\t\twin.history.pushState = originalPushState;\n\t\t\twin.history.replaceState = originalReplaceState;\n\t\t\twin.removeEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\t\t\twin.removeEventListener(popStateEvent, onPushPopEvent);\n\t\t},\n\t\tonBlocked: () => {\n\t\t\tif (rollbackLocation && currentLocation !== rollbackLocation) currentLocation = rollbackLocation;\n\t\t},\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers,\n\t\tnotifyOnIndexChange: false\n\t});\n\twin.addEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\twin.addEventListener(popStateEvent, onPushPopEvent);\n\twin.history.pushState = function(...args) {\n\t\tconst res = originalPushState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"PUSH\");\n\t\treturn res;\n\t};\n\twin.history.replaceState = function(...args) {\n\t\tconst res = originalReplaceState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"REPLACE\");\n\t\treturn res;\n\t};\n\treturn history;\n}\n/**\n* Create a hash-based history implementation.\n* Useful for static hosts or environments without server URL rewriting.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createHashHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\treturn createBrowserHistory({\n\t\twindow: win,\n\t\tparseLocation: () => {\n\t\t\tconst hashSplit = win.location.hash.split(\"#\").slice(1);\n\t\t\tconst pathPart = hashSplit[0] ?? \"/\";\n\t\t\tconst searchPart = win.location.search;\n\t\t\tconst hashEntries = hashSplit.slice(1);\n\t\t\treturn parseHref(`${pathPart}${searchPart}${hashEntries.length === 0 ? \"\" : `#${hashEntries.join(\"#\")}`}`, win.history.state);\n\t\t},\n\t\tcreateHref: (href) => `${win.location.pathname}${win.location.search}#${href}`\n\t});\n}\n/**\n* Create an in-memory history implementation.\n* Ideal for server rendering, tests, and non-DOM environments.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createMemoryHistory(opts = { initialEntries: [\"/\"] }) {\n\tconst entries = opts.initialEntries;\n\tlet index = opts.initialIndex ? Math.min(Math.max(opts.initialIndex, 0), entries.length - 1) : entries.length - 1;\n\tconst states = entries.map((_entry, index) => assignKeyAndIndex(index, void 0));\n\tconst getLocation = () => parseHref(entries[index], states[index]);\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\treturn createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => entries.length,\n\t\tpushState: (path, state) => {\n\t\t\tif (index < entries.length - 1) {\n\t\t\t\tentries.splice(index + 1);\n\t\t\t\tstates.splice(index + 1);\n\t\t\t}\n\t\t\tstates.push(state);\n\t\t\tentries.push(path);\n\t\t\tindex = Math.max(entries.length - 1, 0);\n\t\t},\n\t\treplaceState: (path, state) => {\n\t\t\tstates[index] = state;\n\t\t\tentries[index] = path;\n\t\t},\n\t\tback: () => {\n\t\t\tindex = Math.max(index - 1, 0);\n\t\t},\n\t\tforward: () => {\n\t\t\tindex = Math.min(index + 1, entries.length - 1);\n\t\t},\n\t\tgo: (n) => {\n\t\t\tindex = Math.min(Math.max(index + n, 0), entries.length - 1);\n\t\t},\n\t\tcreateHref: (path) => path,\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers\n\t});\n}\n/**\n* Sanitize a path to prevent open redirect vulnerabilities.\n* Removes control characters and collapses leading double slashes.\n*/\nfunction sanitizePath(path) {\n\tlet sanitized = path.replace(/[\\x00-\\x1f\\x7f]/g, \"\");\n\tif (sanitized.startsWith(\"//\")) sanitized = \"/\" + sanitized.replace(/^\\/+/, \"\");\n\treturn sanitized;\n}\nfunction parseHref(href, state) {\n\tconst sanitizedHref = sanitizePath(href);\n\tconst hashIndex = sanitizedHref.indexOf(\"#\");\n\tconst searchIndex = sanitizedHref.indexOf(\"?\");\n\tconst addedKey = createRandomKey();\n\treturn {\n\t\thref: sanitizedHref,\n\t\tpathname: sanitizedHref.substring(0, hashIndex > 0 ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex : searchIndex > 0 ? searchIndex : sanitizedHref.length),\n\t\thash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : \"\",\n\t\tsearch: searchIndex > -1 ? sanitizedHref.slice(searchIndex, hashIndex === -1 ? void 0 : hashIndex) : \"\",\n\t\tstate: state || {\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey: addedKey,\n\t\t\t__TSR_key: addedKey\n\t\t}\n\t};\n}\nfunction createRandomKey() {\n\treturn (Math.random() + 1).toString(36).substring(7);\n}\n//#endregion\nexport { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory, parseHref };\n\n//# sourceMappingURL=index.js.map","import { DEFAULT_PROTOCOL_ALLOWLIST, decodePath, deepEqual, encodePathLikeUrl, findLast, functionalUpdate, hasKeys, isDangerousProtocol, last, nullReplaceEqualDeep, replaceEqualDeep } from \"./utils.js\";\nimport { createLRUCache } from \"./lru-cache.js\";\nimport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, processRouteMasks, processRouteTree } from \"./new-process-route-tree.js\";\nimport { compileDecodeCharMap, interpolatePath, resolvePath, trimPath, trimPathRight } from \"./path.js\";\nimport { isNotFound } from \"./not-found.js\";\nimport { setupScrollRestoration } from \"./scroll-restoration.js\";\nimport { defaultParseSearch, defaultStringifySearch } from \"./searchParams.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk } from \"./load-client.js\";\nimport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath } from \"./rewrite.js\";\nimport { createRouterStores } from \"./stores.js\";\nimport { createBrowserHistory, parseHref } from \"@tanstack/history\";\nimport { isServer, loadServerRoute } from \"@tanstack/router-core/isServer\";\n//#region src/router.ts\nfunction routeNeedsLoad(route) {\n\treturn route.options.loader || route.options.beforeLoad || route.lazyFn || route.options.component?.preload || route.options.pendingComponent?.preload;\n}\n/**\n* Convert an unknown error into a minimal, serializable object.\n* Includes name and message (and stack in development).\n*/\nfunction defaultSerializeError(err) {\n\tif (err instanceof Error) {\n\t\tconst obj = {\n\t\t\tname: err.name,\n\t\t\tmessage: err.message\n\t\t};\n\t\tif (process.env.NODE_ENV === \"development\") obj.stack = err.stack;\n\t\treturn obj;\n\t}\n\treturn { data: err };\n}\n/** Options for configuring trailing-slash behavior. */\nconst trailingSlashOptions = {\n\talways: \"always\",\n\tnever: \"never\",\n\tpreserve: \"preserve\"\n};\n/**\n* Compute whether path, href or hash changed between previous and current\n* resolved locations.\n*/\nfunction getLocationChangeInfo(location, resolvedLocation) {\n\treturn {\n\t\tfromLocation: resolvedLocation,\n\t\ttoLocation: location,\n\t\tpathChanged: resolvedLocation?.pathname !== location.pathname,\n\t\threfChanged: resolvedLocation?.href !== location.href,\n\t\thashChanged: resolvedLocation?.hash !== location.hash\n\t};\n}\n/**\n* Return only state owned by the application, excluding volatile history\n* bookkeeping. Mask payloads (`__tempLocation`/`__tempKey`) are kept: they\n* distinguish otherwise-identical locations.\n*/\nfunction _getUserHistoryState({ key: _key, __TSR_key: _tsrKey, __TSR_index: _tsrIndex, __hashScrollIntoViewOptions: _hashScroll, ...state }) {\n\treturn state;\n}\n/** Run route lifecycle callbacks in leave/enter/stay phases. */\nfunction runRouteLifecycle(router, previous, matches, owner) {\n\tfor (const match of previous) {\n\t\tif (owner && router._tx !== owner) return;\n\t\tif (!matches.some((candidate) => candidate.routeId === match.routeId)) router.routesById[match.routeId].options.onLeave?.(match);\n\t}\n\tfor (const match of matches) {\n\t\tif (owner && router._tx !== owner) return;\n\t\trouter.routesById[match.routeId].options[previous.some((candidate) => candidate.routeId === match.routeId) ? \"onStay\" : \"onEnter\"]?.(match);\n\t}\n}\n/**\n* Core, framework-agnostic router engine that powers TanStack Router.\n*\n* Provides navigation, matching, loading, preloading, caching and event APIs\n* used by framework adapters (React/Solid). Prefer framework helpers like\n* `createRouter` in app code.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType\n*/\nvar RouterCore = class {\n\t/**\n\t* @deprecated Use the `createRouter` function instead\n\t*/\n\tconstructor(options, getStoreConfig) {\n\t\tthis.tempLocationKey = `${Math.round(Math.random() * 1e7)}`;\n\t\tthis._scroll = { next: true };\n\t\tthis.subscribers = /* @__PURE__ */ new Set();\n\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\tthis._committed = [];\n\t\tthis.routeBranchCache = /* @__PURE__ */ new WeakMap();\n\t\tthis.lightweightCache = /* @__PURE__ */ new WeakMap();\n\t\tthis.startTransition = async (fn) => {\n\t\t\tfn();\n\t\t\treturn false;\n\t\t};\n\t\tthis.update = (newOptions) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (newOptions.notFoundRoute) console.warn(\"The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.\");\n\t\t\t}\n\t\t\tconst prevOptions = this.options;\n\t\t\tconst prevBasepath = this.basepath ?? prevOptions?.basepath ?? \"/\";\n\t\t\tconst basepathWasUnset = this.basepath === void 0;\n\t\t\tconst prevRewriteOption = prevOptions?.rewrite;\n\t\t\tthis.options = {\n\t\t\t\t...prevOptions,\n\t\t\t\t...newOptions\n\t\t\t};\n\t\t\tthis.isServer = this.options.isServer ?? isServer ?? typeof document === \"undefined\";\n\t\t\tthis.protocolAllowlist = new Set(this.options.protocolAllowlist);\n\t\t\tif (this.options.pathParamsAllowedCharacters) this.pathParamsDecoder = compileDecodeCharMap(this.options.pathParamsAllowedCharacters);\n\t\t\tif (!this.history || this.options.history && this.options.history !== this.history) if (!this.options.history) {\n\t\t\t\tif (!(isServer ?? this.isServer)) this.history = createBrowserHistory();\n\t\t\t} else this.history = this.options.history;\n\t\t\tthis.origin = this.options.origin;\n\t\t\tif (!this.origin) if (!(isServer ?? this.isServer) && window?.origin && window.origin !== \"null\") this.origin = window.origin;\n\t\t\telse this.origin = \"http://localhost\";\n\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\tif (this.options.routeTree !== this.routeTree) {\n\t\t\t\tthis.routeTree = this.options.routeTree;\n\t\t\t\tlet processRouteTreeResult;\n\t\t\t\tif ((isServer ?? this.isServer) && process.env.NODE_ENV !== \"development\" && globalThis.__TSR_CACHE__ && globalThis.__TSR_CACHE__.routeTree === this.routeTree) {\n\t\t\t\t\tconst cached = globalThis.__TSR_CACHE__;\n\t\t\t\t\tthis.resolvePathCache = cached.resolvePathCache;\n\t\t\t\t\tprocessRouteTreeResult = cached.processRouteTreeResult;\n\t\t\t\t} else {\n\t\t\t\t\tthis.resolvePathCache = createLRUCache(1e3);\n\t\t\t\t\tprocessRouteTreeResult = this.buildRouteTree();\n\t\t\t\t\tif ((isServer ?? this.isServer) && process.env.NODE_ENV !== \"development\" && globalThis.__TSR_CACHE__ === void 0) globalThis.__TSR_CACHE__ = {\n\t\t\t\t\t\trouteTree: this.routeTree,\n\t\t\t\t\t\tprocessRouteTreeResult,\n\t\t\t\t\t\tresolvePathCache: this.resolvePathCache\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tthis.setRoutes(processRouteTreeResult);\n\t\t\t}\n\t\t\tif (!this.stores && this.latestLocation) {\n\t\t\t\tconst config = this.getStoreConfig(this);\n\t\t\t\tthis.batch = config.batch;\n\t\t\t\tthis.stores = createRouterStores(this.latestLocation, config);\n\t\t\t\tif (!(isServer ?? this.isServer)) setupScrollRestoration(this);\n\t\t\t}\n\t\t\tconst nextBasepath = this.options.basepath ?? \"/\";\n\t\t\tconst nextRewriteOption = this.options.rewrite;\n\t\t\tif (basepathWasUnset || prevBasepath !== nextBasepath || prevRewriteOption !== nextRewriteOption) {\n\t\t\t\tthis.basepath = nextBasepath;\n\t\t\t\tconst rewrites = [];\n\t\t\t\tconst trimmed = trimPath(nextBasepath);\n\t\t\t\tif (trimmed && trimmed !== \"/\") rewrites.push(rewriteBasepath({ basepath: nextBasepath }));\n\t\t\t\tif (nextRewriteOption) rewrites.push(nextRewriteOption);\n\t\t\t\tthis.rewrite = rewrites.length === 0 ? void 0 : rewrites.length === 1 ? rewrites[0] : composeRewrites(rewrites);\n\t\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\t\tif (this.stores) this.stores.location.set(this.latestLocation);\n\t\t\t}\n\t\t};\n\t\tthis.updateLatestLocation = () => {\n\t\t\tthis.latestLocation = this.parseLocation(this.history.location, this.latestLocation);\n\t\t};\n\t\tthis.buildRouteTree = () => {\n\t\t\tconst result = processRouteTree(this.routeTree, this.options.caseSensitive, (route, i) => {\n\t\t\t\troute.init({ originalIndex: i });\n\t\t\t});\n\t\t\tif (this.options.routeMasks) processRouteMasks(this.options.routeMasks, result.processedTree);\n\t\t\treturn result;\n\t\t};\n\t\tthis.subscribe = (eventType, fn) => {\n\t\t\tconst listener = {\n\t\t\t\teventType,\n\t\t\t\tfn\n\t\t\t};\n\t\t\tthis.subscribers.add(listener);\n\t\t\treturn () => {\n\t\t\t\tthis.subscribers.delete(listener);\n\t\t\t};\n\t\t};\n\t\tthis.emit = (routerEvent) => {\n\t\t\tfor (const listener of this.subscribers) if (listener.eventType === routerEvent.type) try {\n\t\t\t\tlistener.fn(routerEvent);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t};\n\t\tthis.parseLocation = (locationToParse, previousLocation) => {\n\t\t\tconst parse = ({ pathname, search, hash, href, state }) => {\n\t\t\t\tif (!this.rewrite && !/[ \\x00-\\x1f\\x7f\\u0080-\\uffff]/.test(pathname)) {\n\t\t\t\t\tconst parsedSearch = this.options.parseSearch(search);\n\t\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\t\treturn {\n\t\t\t\t\t\thref: pathname + searchStr + hash,\n\t\t\t\t\t\tpublicHref: pathname + searchStr + hash,\n\t\t\t\t\t\tpathname: decodePath(pathname).path,\n\t\t\t\t\t\texternal: false,\n\t\t\t\t\t\tsearchStr,\n\t\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\t\thash: decodePath(hash.slice(1)).path,\n\t\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst fullUrl = new URL(href, this.origin);\n\t\t\t\tconst url = executeRewriteInput(this.rewrite, fullUrl);\n\t\t\t\tconst parsedSearch = this.options.parseSearch(url.search);\n\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\turl.search = searchStr;\n\t\t\t\treturn {\n\t\t\t\t\thref: url.href.replace(url.origin, \"\"),\n\t\t\t\t\tpublicHref: href,\n\t\t\t\t\tpathname: decodePath(url.pathname).path,\n\t\t\t\t\texternal: !!this.rewrite && url.origin !== this.origin,\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\thash: decodePath(url.hash.slice(1)).path,\n\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst location = parse(locationToParse);\n\t\t\tconst { __tempLocation, __tempKey } = location.state;\n\t\t\tif (__tempLocation && (!__tempKey || __tempKey === this.tempLocationKey)) {\n\t\t\t\tconst parsedTempLocation = parse(__tempLocation);\n\t\t\t\tparsedTempLocation.state.key = location.state.key;\n\t\t\t\tparsedTempLocation.state.__TSR_key = location.state.__TSR_key;\n\t\t\t\tdelete parsedTempLocation.state.__tempLocation;\n\t\t\t\treturn {\n\t\t\t\t\t...parsedTempLocation,\n\t\t\t\t\tmaskedLocation: location\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn location;\n\t\t};\n\t\tthis.resolvePathWithBase = (from, path) => {\n\t\t\treturn resolvePath({\n\t\t\t\tbase: from,\n\t\t\t\tto: path,\n\t\t\t\ttrailingSlash: this.options.trailingSlash,\n\t\t\t\tcache: this.resolvePathCache\n\t\t\t});\n\t\t};\n\t\tthis.matchRoutes = (pathnameOrNext, locationSearchOrOpts, opts) => {\n\t\t\tif (typeof pathnameOrNext === \"string\") return this.matchRoutesInternal({\n\t\t\t\tpathname: pathnameOrNext,\n\t\t\t\tsearch: locationSearchOrOpts\n\t\t\t}, opts);\n\t\t\treturn this.matchRoutesInternal(pathnameOrNext, locationSearchOrOpts);\n\t\t};\n\t\tthis.getMatchedRoutes = (pathname) => {\n\t\t\tconst rawParams = Object.create(null);\n\t\t\tconst match = findRouteMatch(trimPathRight(pathname), this.processedTree, true);\n\t\t\tif (match) Object.assign(rawParams, match.rawParams);\n\t\t\treturn [\n\t\t\t\tmatch?.branch || [this.routesById[\"__root__\"]],\n\t\t\t\trawParams,\n\t\t\t\tmatch?.route\n\t\t\t];\n\t\t};\n\t\tthis.buildLocation = (opts) => {\n\t\t\tconst build = (dest = {}) => {\n\t\t\t\tif (dest.href) {\n\t\t\t\t\tconst parsed = parseHref(dest.href, {});\n\t\t\t\t\tdest = {\n\t\t\t\t\t\t...dest,\n\t\t\t\t\t\tto: executeRewriteInput(this.rewrite, new URL(parsed.pathname, this.origin)).pathname,\n\t\t\t\t\t\tsearch: this.options.parseSearch(parsed.search),\n\t\t\t\t\t\thash: parsed.hash.slice(1)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst currentLocation = dest._fromLocation || this._pendingLocation || this.latestLocation;\n\t\t\t\tconst lightweightResult = this.matchRoutesLightweight(currentLocation);\n\t\t\t\tif (dest.from && process.env.NODE_ENV !== \"production\" && dest._isNavigate) {\n\t\t\t\t\tconst [allFromMatches] = this.getMatchedRoutes(dest.from);\n\t\t\t\t\tconst matchedFrom = findLast(lightweightResult[0], (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, dest.from);\n\t\t\t\t\t});\n\t\t\t\t\tconst matchedCurrent = findLast(allFromMatches, (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, lightweightResult[1]);\n\t\t\t\t\t});\n\t\t\t\t\tif (!matchedFrom && !matchedCurrent) console.warn(`Could not find match for from: ${dest.from}`);\n\t\t\t\t}\n\t\t\t\tconst defaultedFromPath = dest.unsafeRelative === \"path\" ? currentLocation.pathname : dest.from ?? lightweightResult[1];\n\t\t\t\tconst fromSearch = lightweightResult[2];\n\t\t\t\tconst fromParams = lightweightResult[3];\n\t\t\t\tconst nextTo = this.resolvePathWithBase(defaultedFromPath, dest.to ? `${dest.to}` : \".\");\n\t\t\t\tlet nextParams = resolveNextParams(dest.params, fromParams);\n\t\t\t\tconst destRoute = this.routesByPath[trimPathRight(nextTo)];\n\t\t\t\tlet destRoutes;\n\t\t\t\tif (destRoute) destRoutes = this.getRouteBranch(destRoute);\n\t\t\t\telse if (nextTo.includes(\"$\")) destRoutes = [];\n\t\t\t\telse {\n\t\t\t\t\tconst [matchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(nextTo);\n\t\t\t\t\tdestRoutes = matchedRoutes;\n\t\t\t\t\tif (this.options.notFoundRoute && (!foundRoute || foundRoute.path !== \"/\" && rawParams[\"**\"])) destRoutes = [...destRoutes, this.options.notFoundRoute];\n\t\t\t\t}\n\t\t\t\tif (destRoutes.length && hasKeys(nextParams)) for (const route of destRoutes) {\n\t\t\t\t\tconst fn = route.options.params?.stringify ?? route.options.stringifyParams;\n\t\t\t\t\tif (fn) {\n\t\t\t\t\t\tif (nextParams === fromParams) nextParams = Object.assign(Object.create(null), nextParams);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject.assign(nextParams, fn(nextParams));\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextPathname = opts.leaveParams ? nextTo : decodePath(interpolatePath({\n\t\t\t\t\tpath: nextTo,\n\t\t\t\t\tparams: nextParams,\n\t\t\t\t\tdecoder: this.pathParamsDecoder,\n\t\t\t\t\tserver: this.isServer\n\t\t\t\t}).interpolatedPath).path;\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && destRoute && !opts.leaveParams) try {\n\t\t\t\t\tconst foundRoute = this.getMatchedRoutes(nextPathname)[2];\n\t\t\t\t\tif (foundRoute?.id !== destRoute.id) console.warn(`Generated path \"${nextPathname}\" for route \"${destRoute.id}\" matched route \"${foundRoute?.id}\" instead. This can happen when multiple route templates resolve to the same URL. Use the route template that matches the intended route, or adjust params.stringify if it changed the target path.`);\n\t\t\t\t} catch {}\n\t\t\t\tlet nextSearch = fromSearch;\n\t\t\t\tif (opts._includeValidateSearch && this.options.search?.strict) {\n\t\t\t\t\tconst validatedSearch = {};\n\t\t\t\t\tdestRoutes.forEach((route) => {\n\t\t\t\t\t\tif (route.options.validateSearch) try {\n\t\t\t\t\t\t\tObject.assign(validatedSearch, validateSearch(route.options.validateSearch, {\n\t\t\t\t\t\t\t\t...validatedSearch,\n\t\t\t\t\t\t\t\t...nextSearch\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t});\n\t\t\t\t\tnextSearch = validatedSearch;\n\t\t\t\t}\n\t\t\t\tnextSearch = applySearchMiddleware(nextSearch, dest, destRoutes, opts._includeValidateSearch);\n\t\t\t\tnextSearch = nullReplaceEqualDeep(fromSearch, nextSearch);\n\t\t\t\tconst searchStr = this.options.stringifySearch(nextSearch);\n\t\t\t\tconst hash = dest.hash === true ? currentLocation.hash : dest.hash ? functionalUpdate(dest.hash, currentLocation.hash) : void 0;\n\t\t\t\tconst hashStr = hash ? `#${hash}` : \"\";\n\t\t\t\tlet nextState = dest.state === true ? currentLocation.state : dest.state ? functionalUpdate(dest.state, currentLocation.state) : {};\n\t\t\t\tif (dest.state) nextState = replaceEqualDeep(currentLocation.state, nextState);\n\t\t\t\tconst fullPath = `${nextPathname}${searchStr}${hashStr}`;\n\t\t\t\tlet href;\n\t\t\t\tlet publicHref;\n\t\t\t\tlet external = false;\n\t\t\t\tif (this.rewrite) {\n\t\t\t\t\tconst url = new URL(fullPath, this.origin);\n\t\t\t\t\tconst rewrittenUrl = executeRewriteOutput(this.rewrite, url);\n\t\t\t\t\thref = url.href.replace(url.origin, \"\");\n\t\t\t\t\tif (rewrittenUrl.origin !== this.origin) {\n\t\t\t\t\t\tpublicHref = rewrittenUrl.href;\n\t\t\t\t\t\texternal = true;\n\t\t\t\t\t} else publicHref = rewrittenUrl.pathname + rewrittenUrl.search + rewrittenUrl.hash;\n\t\t\t\t} else {\n\t\t\t\t\thref = encodePathLikeUrl(fullPath);\n\t\t\t\t\tpublicHref = href;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpublicHref,\n\t\t\t\t\thref,\n\t\t\t\t\tpathname: nextPathname,\n\t\t\t\t\tsearch: nextSearch,\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tstate: nextState,\n\t\t\t\t\thash: hash ?? \"\",\n\t\t\t\t\texternal,\n\t\t\t\t\tunmaskOnReload: dest.unmaskOnReload\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst next = build(opts);\n\t\t\tif (opts.mask) next.maskedLocation = build({\n\t\t\t\tfrom: opts.from,\n\t\t\t\t...opts.mask\n\t\t\t});\n\t\t\telse if (this.options.routeMasks) {\n\t\t\t\tconst match = findFlatMatch(next.pathname, this.processedTree);\n\t\t\t\tif (match) {\n\t\t\t\t\tconst params = Object.assign(Object.create(null), match.rawParams);\n\t\t\t\t\tconst { from: _from, params: maskParams, ...maskProps } = match.route;\n\t\t\t\t\tconst nextParams = resolveNextParams(maskParams, params);\n\t\t\t\t\tnext.maskedLocation = build({\n\t\t\t\t\t\tfrom: opts.from,\n\t\t\t\t\t\t...maskProps,\n\t\t\t\t\t\tparams: nextParams\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn next;\n\t\t};\n\t\tthis.commitLocation = async ({ viewTransition, ignoreBlocker, ...next }) => {\n\t\t\tlet historyAction;\n\t\t\tconst isSameLocation = trimPathRight(this.latestLocation.href) === trimPathRight(next.href) && deepEqual(_getUserHistoryState(next.state), _getUserHistoryState(this.latestLocation.state));\n\t\t\tconst previousCommitPromise = this._commitPromise;\n\t\t\tlet resolve;\n\t\t\tconst commitPromise = new Promise((done) => {\n\t\t\t\tresolve = done;\n\t\t\t});\n\t\t\tcommitPromise.resolve = () => {\n\t\t\t\tresolve();\n\t\t\t\tpreviousCommitPromise?.resolve();\n\t\t\t};\n\t\t\tthis._commitPromise = commitPromise;\n\t\t\tif (isSameLocation) this.load();\n\t\t\telse {\n\t\t\t\tlet { maskedLocation, hashScrollIntoView, ...nextHistory } = next;\n\t\t\t\tif (maskedLocation) {\n\t\t\t\t\tnextHistory = {\n\t\t\t\t\t\t...maskedLocation,\n\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t...maskedLocation.state,\n\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t__tempLocation: {\n\t\t\t\t\t\t\t\t...nextHistory,\n\t\t\t\t\t\t\t\tsearch: nextHistory.searchStr,\n\t\t\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t\t\t...nextHistory.state,\n\t\t\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t\t\t__tempLocation: void 0,\n\t\t\t\t\t\t\t\t\t__TSR_key: void 0,\n\t\t\t\t\t\t\t\t\tkey: void 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tif (nextHistory.unmaskOnReload ?? this.options.unmaskOnReload ?? false) nextHistory.state.__tempKey = this.tempLocationKey;\n\t\t\t\t}\n\t\t\t\tnextHistory.state.__hashScrollIntoViewOptions = hashScrollIntoView ?? this.options.defaultHashScrollIntoView ?? true;\n\t\t\t\tthis.shouldViewTransition = viewTransition;\n\t\t\t\thistoryAction = next.replace ? \"REPLACE\" : \"PUSH\";\n\t\t\t\tthis.history[historyAction === \"REPLACE\" ? \"replace\" : \"push\"](nextHistory.publicHref, nextHistory.state, { ignoreBlocker });\n\t\t\t\tif (!this.history.subscribers.size) this.load({ action: { type: historyAction } });\n\t\t\t}\n\t\t\tthis._scroll.next = next.resetScroll ?? true;\n\t\t\treturn this._commitPromise;\n\t\t};\n\t\tthis.buildAndCommitLocation = ({ replace, resetScroll, hashScrollIntoView, viewTransition, ignoreBlocker, ...rest } = {}) => {\n\t\t\tconst location = this.buildLocation({\n\t\t\t\t...rest,\n\t\t\t\t_includeValidateSearch: true\n\t\t\t});\n\t\t\tthis._pendingLocation = location;\n\t\t\tconst commitPromise = this.commitLocation({\n\t\t\t\t...location,\n\t\t\t\tviewTransition,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tif (this._pendingLocation === location) this._pendingLocation = void 0;\n\t\t\t});\n\t\t\treturn commitPromise;\n\t\t};\n\t\tthis.navigate = async ({ to, reloadDocument, href, publicHref, ...rest }) => {\n\t\t\tlet hrefIsUrl = false;\n\t\t\tif (href) try {\n\t\t\t\tnew URL(`${href}`);\n\t\t\t\threfIsUrl = true;\n\t\t\t} catch {}\n\t\t\tif (hrefIsUrl && !reloadDocument) reloadDocument = true;\n\t\t\tif (reloadDocument) {\n\t\t\t\tif (to !== void 0 || !href) {\n\t\t\t\t\tconst location = this.buildLocation({\n\t\t\t\t\t\tto,\n\t\t\t\t\t\t...rest\n\t\t\t\t\t});\n\t\t\t\t\thref = href ?? location.publicHref;\n\t\t\t\t\tpublicHref = publicHref ?? location.publicHref;\n\t\t\t\t}\n\t\t\t\tconst reloadHref = !hrefIsUrl && publicHref ? publicHref : href;\n\t\t\t\tif (isDangerousProtocol(reloadHref, this.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked navigation to dangerous protocol: ${reloadHref}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!rest.ignoreBlocker) {\n\t\t\t\t\tconst blockers = this.history.getBlockers?.() ?? [];\n\t\t\t\t\tfor (const blocker of blockers) if (blocker?.blockerFn) {\n\t\t\t\t\t\tif (await blocker.blockerFn({\n\t\t\t\t\t\t\tcurrentLocation: this.latestLocation,\n\t\t\t\t\t\t\tnextLocation: this.latestLocation,\n\t\t\t\t\t\t\taction: \"PUSH\"\n\t\t\t\t\t\t})) return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (rest.replace) window.location.replace(reloadHref);\n\t\t\t\telse window.location.href = reloadHref;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn this.buildAndCommitLocation({\n\t\t\t\t...rest,\n\t\t\t\thref,\n\t\t\t\tto,\n\t\t\t\t_isNavigate: true\n\t\t\t});\n\t\t};\n\t\tthis.load = async (opts) => {\n\t\t\tif (isServer ?? this.isServer) return loadServerRoute(this, opts);\n\t\t\tthis.updateLatestLocation();\n\t\t\tif (opts?.action) this._scroll.hash = opts.action.type === \"PUSH\" || opts.action.type === \"REPLACE\";\n\t\t\tawait loadClientRoute(this, opts);\n\t\t};\n\t\tthis.startViewTransition = (fn) => {\n\t\t\tconst shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;\n\t\t\tthis.shouldViewTransition = void 0;\n\t\t\tif (shouldViewTransition && !(isServer ?? typeof document === \"undefined\") && typeof document.startViewTransition === \"function\") {\n\t\t\t\tlet startViewTransitionParams;\n\t\t\t\tif (typeof shouldViewTransition === \"object\" && window.CSS?.supports?.(\"selector(:active-view-transition-type(a))\")) {\n\t\t\t\t\tconst next = this.latestLocation;\n\t\t\t\t\tconst prevLocation = this.stores.resolvedLocation.get();\n\t\t\t\t\tconst resolvedViewTransitionTypes = typeof shouldViewTransition.types === \"function\" ? shouldViewTransition.types(getLocationChangeInfo(next, prevLocation)) : shouldViewTransition.types;\n\t\t\t\t\tif (resolvedViewTransitionTypes === false) return fn();\n\t\t\t\t\tstartViewTransitionParams = {\n\t\t\t\t\t\tupdate: fn,\n\t\t\t\t\t\ttypes: resolvedViewTransitionTypes\n\t\t\t\t\t};\n\t\t\t\t} else startViewTransitionParams = fn;\n\t\t\t\treturn document.startViewTransition(startViewTransitionParams).updateCallbackDone;\n\t\t\t}\n\t\t\treturn fn();\n\t\t};\n\t\tthis.invalidate = (opts) => {\n\t\t\tconst committedMatches = this._committed;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst invalidIds = new Set([\n\t\t\t\t...committedMatches,\n\t\t\t\t...this._cache.values(),\n\t\t\t\t...[...preloads?.values() ?? []].flat(),\n\t\t\t\t...this._tx?.[3] ?? []\n\t\t\t].filter((match) => !filter || filter(match)).map((match) => match.id));\n\t\t\tconst discardedPreloads = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (matches.some((match) => invalidIds.has(match.id))) {\n\t\t\t\tpreloads.delete(controller);\n\t\t\t\tdiscardedPreloads.push(controller);\n\t\t\t}\n\t\t\tconst invalidate = (d) => {\n\t\t\t\tif (invalidIds.has(d.id)) {\n\t\t\t\t\tconst route = this.routesById[d.routeId];\n\t\t\t\t\tconst next = {\n\t\t\t\t\t\t...d,\n\t\t\t\t\t\tinvalid: true,\n\t\t\t\t\t\t...(opts?.forcePending || d.status === \"error\" || d.status === \"notFound\") && routeNeedsLoad(route) ? {\n\t\t\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\t\t\terror: void 0\n\t\t\t\t\t\t} : void 0\n\t\t\t\t\t};\n\t\t\t\t\td._flight = void 0;\n\t\t\t\t\treturn next;\n\t\t\t\t}\n\t\t\t\treturn d;\n\t\t\t};\n\t\t\tthis._committed = committedMatches.map(invalidate);\n\t\t\tfor (const [id, match] of this._cache) if (invalidIds.has(id)) {\n\t\t\t\tmatch.invalid = true;\n\t\t\t\tif (opts?.forcePending) match.status = \"pending\";\n\t\t\t}\n\t\t\tfor (const id of invalidIds) this._flights?.delete(id);\n\t\t\tfor (const controller of discardedPreloads) controller.abort();\n\t\t\tthis.shouldViewTransition = false;\n\t\t\treturn this.load({ sync: opts?.sync });\n\t\t};\n\t\tthis.resolveRedirect = (redirect) => {\n\t\t\tconst locationHeader = redirect.headers.get(\"Location\");\n\t\t\tif (!redirect.options.href) {\n\t\t\t\tconst href = this.buildLocation(redirect.options).publicHref || \"/\";\n\t\t\t\tredirect.options.href = href;\n\t\t\t\tredirect.headers.set(\"Location\", href);\n\t\t\t} else if (locationHeader) try {\n\t\t\t\tconst url = new URL(locationHeader);\n\t\t\t\tif (this.origin && url.origin === this.origin) {\n\t\t\t\t\tconst href = url.pathname + url.search + url.hash;\n\t\t\t\t\tredirect.options.href = href;\n\t\t\t\t\tredirect.headers.set(\"Location\", href);\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t\tif (redirect.options.href && isDangerousProtocol(redirect.options.href, this.protocolAllowlist)) throw new Error(process.env.NODE_ENV !== \"production\" ? `Redirect blocked: unsafe protocol in href \"${redirect.options.href}\". Allowed protocols: ${Array.from(this.protocolAllowlist).join(\", \")}.` : \"Redirect blocked: unsafe protocol\");\n\t\t\tif (!redirect.headers.get(\"Location\")) redirect.headers.set(\"Location\", redirect.options.href);\n\t\t\treturn redirect;\n\t\t};\n\t\tthis.clearCache = (opts) => {\n\t\t\tconst cached = this._cache;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst discarded = [];\n\t\t\tconst discardedIds = [];\n\t\t\tfor (const [id, match] of cached) if (!filter || filter(match)) {\n\t\t\t\tdiscardedIds.push(id);\n\t\t\t\tdiscarded.push(match);\n\t\t\t}\n\t\t\tconst abort = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (!filter || matches.some(filter)) {\n\t\t\t\tabort.push(controller);\n\t\t\t\tdiscarded.push(...matches);\n\t\t\t}\n\t\t\tfor (const id of discardedIds) cached.delete(id);\n\t\t\tfor (const controller of abort) preloads.delete(controller);\n\t\t\tfor (const match of discarded) {\n\t\t\t\tconst flight = match._flight;\n\t\t\t\tmatch._flight = void 0;\n\t\t\t\tif (flight && !--flight[2]) {\n\t\t\t\t\tif (this._flights?.get(match.id) === flight) this._flights.delete(match.id);\n\t\t\t\t\tabort.push(flight[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t};\n\t\tthis.loadRouteChunk = loadRouteChunk;\n\t\tthis.preloadRoute = (opts, builtLocation) => preloadClientRoute(this, opts, 0, builtLocation);\n\t\tthis.matchRoute = (location, opts) => {\n\t\t\tconst matchLocation = {\n\t\t\t\t...location,\n\t\t\t\tto: location.to ? this.resolvePathWithBase(location.from || \"\", location.to) : void 0,\n\t\t\t\tparams: location.params || {},\n\t\t\t\tleaveParams: true\n\t\t\t};\n\t\t\tconst next = this.buildLocation(matchLocation);\n\t\t\tconst isPending = this.stores.status.get() === \"pending\";\n\t\t\tif (opts?.pending && !isPending) return false;\n\t\t\tconst baseLocation = opts?.pending ?? !isPending ? this.latestLocation : this.stores.resolvedLocation.get() || this.stores.location.get();\n\t\t\tconst match = findSingleMatch(next.pathname, opts?.caseSensitive ?? false, opts?.fuzzy ?? false, baseLocation.pathname, this.processedTree);\n\t\t\tif (!match) return false;\n\t\t\tif (location.params) {\n\t\t\t\tif (!deepEqual(match.rawParams, location.params, { partial: true })) return false;\n\t\t\t}\n\t\t\tif (opts?.includeSearch ?? true) return deepEqual(baseLocation.search, next.search, { partial: true }) ? match.rawParams : false;\n\t\t\treturn match.rawParams;\n\t\t};\n\t\tthis.getStoreConfig = getStoreConfig;\n\t\tthis.update({\n\t\t\tdefaultPreloadDelay: 50,\n\t\t\tdefaultPendingMs: 1e3,\n\t\t\tdefaultPendingMinMs: 500,\n\t\t\tcontext: void 0,\n\t\t\t...options,\n\t\t\tcaseSensitive: options.caseSensitive ?? false,\n\t\t\tnotFoundMode: options.notFoundMode ?? \"fuzzy\",\n\t\t\tstringifySearch: options.stringifySearch ?? defaultStringifySearch,\n\t\t\tparseSearch: options.parseSearch ?? defaultParseSearch,\n\t\t\tprotocolAllowlist: options.protocolAllowlist ?? DEFAULT_PROTOCOL_ALLOWLIST\n\t\t});\n\t\tif (!(isServer ?? typeof document === \"undefined\")) self.__TSR_ROUTER__ = this;\n\t}\n\tisShell() {\n\t\treturn !!this.options.isShell;\n\t}\n\tget state() {\n\t\treturn this.stores.__store.get();\n\t}\n\tsetRoutes({ routesById, routesByPath, processedTree }) {\n\t\tthis.routesById = routesById;\n\t\tthis.routesByPath = routesByPath;\n\t\tthis.processedTree = processedTree;\n\t\tconst notFoundRoute = this.options.notFoundRoute;\n\t\tif (notFoundRoute) {\n\t\t\tnotFoundRoute.init({ originalIndex: 99999999999 });\n\t\t\tthis.routesById[notFoundRoute.id] = notFoundRoute;\n\t\t}\n\t}\n\tgetRouteBranch(route) {\n\t\tlet branch = this.routeBranchCache.get(route);\n\t\tif (!branch) {\n\t\t\tbranch = buildRouteBranch(route);\n\t\t\tthis.routeBranchCache.set(route, branch);\n\t\t}\n\t\treturn branch;\n\t}\n\tmatchRoutesInternal(next, opts) {\n\t\tconst [initialMatchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(next.pathname);\n\t\tlet matchedRoutes = initialMatchedRoutes;\n\t\tlet isGlobalNotFound = false;\n\t\tif (foundRoute ? foundRoute.path !== \"/\" && rawParams[\"**\"] : trimPathRight(next.pathname)) if (this.options.notFoundRoute) matchedRoutes = [...matchedRoutes, this.options.notFoundRoute];\n\t\telse isGlobalNotFound = true;\n\t\tconst _notFoundRouteId = isGlobalNotFound ? findGlobalNotFoundRouteId(this.options.notFoundMode, matchedRoutes) : void 0;\n\t\tconst matches = new Array(matchedRoutes.length);\n\t\tconst committed = this._committed;\n\t\tconst previousAt = (route, index) => {\n\t\t\tconst match = committed[index];\n\t\t\treturn match?.routeId === route.id ? match : route === this.options.notFoundRoute ? committed.find((candidate) => candidate.routeId === route.id) : void 0;\n\t\t};\n\t\tlet strictParams;\n\t\tfor (let index = 0; index < matchedRoutes.length; index++) {\n\t\t\tconst route = matchedRoutes[index];\n\t\t\tconst parentMatch = matches[index - 1];\n\t\t\tlet preMatchSearch;\n\t\t\tlet strictMatchSearch;\n\t\t\tlet searchError;\n\t\t\t{\n\t\t\t\tconst parentSearch = parentMatch?.search ?? next.search;\n\t\t\t\tconst parentStrictSearch = parentMatch?._strictSearch ?? void 0;\n\t\t\t\ttry {\n\t\t\t\t\tconst strictSearch = validateSearch(route.options.validateSearch, { ...parentSearch }) ?? void 0;\n\t\t\t\t\tpreMatchSearch = {\n\t\t\t\t\t\t...parentSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t\tstrictMatchSearch = {\n\t\t\t\t\t\t...parentStrictSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t} catch (err) {\n\t\t\t\t\tlet searchParamError = err;\n\t\t\t\t\tif (!(err instanceof SearchParamError)) searchParamError = new SearchParamError(err.message, { cause: err });\n\t\t\t\t\tif (opts?.throwOnError) throw searchParamError;\n\t\t\t\t\tpreMatchSearch = parentSearch;\n\t\t\t\t\tstrictMatchSearch = {};\n\t\t\t\t\tsearchError = searchParamError;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet loaderDeps = \"\";\n\t\t\tlet loaderDepsHash = \"\";\n\t\t\ttry {\n\t\t\t\tloaderDeps = route.options.loaderDeps?.({ search: preMatchSearch }) ?? \"\";\n\t\t\t\tloaderDepsHash = loaderDeps ? JSON.stringify(loaderDeps) || \"\" : \"\";\n\t\t\t} catch (cause) {\n\t\t\t\tif (opts?.throwOnError) throw cause;\n\t\t\t\tsearchError ??= cause;\n\t\t\t}\n\t\t\tconst { interpolatedPath, usedParams } = interpolatePath({\n\t\t\t\tpath: route.fullPath,\n\t\t\t\tparams: rawParams,\n\t\t\t\tdecoder: this.pathParamsDecoder,\n\t\t\t\tserver: this.isServer\n\t\t\t});\n\t\t\tconst matchId = route.id + interpolatedPath + loaderDepsHash;\n\t\t\tconst previousMatch = previousAt(route, index);\n\t\t\tconst existingMatch = process.env.NODE_ENV !== \"production\" && opts?._rematerialize ? void 0 : this._cache.get(matchId) ?? (previousMatch?.id === matchId ? previousMatch : void 0);\n\t\t\tstrictParams = existingMatch?._strictParams ?? Object.assign(usedParams, strictParams);\n\t\t\tlet paramsError;\n\t\t\tif (!existingMatch) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch (err) {\n\t\t\t\tif (isNotFound(err) || isRedirect(err)) paramsError = err;\n\t\t\t\telse paramsError = new PathParamError(err.message, { cause: err });\n\t\t\t\tif (opts?.throwOnError) throw paramsError;\n\t\t\t}\n\t\t\tconst cause = previousMatch ? \"stay\" : \"enter\";\n\t\t\tlet match;\n\t\t\tif (existingMatch) match = {\n\t\t\t\t...existingMatch,\n\t\t\t\tcause,\n\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : nullReplaceEqualDeep(existingMatch.search, preMatchSearch),\n\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\tsearchError\n\t\t\t};\n\t\t\telse {\n\t\t\t\tconst status = routeNeedsLoad(route) ? \"pending\" : \"success\";\n\t\t\t\tmatch = {\n\t\t\t\t\tid: matchId,\n\t\t\t\t\tssr: isServer ?? this.isServer ? void 0 : route.options.ssr,\n\t\t\t\t\tindex,\n\t\t\t\t\trouteId: route.id,\n\t\t\t\t\tparams: previousMatch?.params ?? strictParams,\n\t\t\t\t\t_strictParams: strictParams,\n\t\t\t\t\tpathname: interpolatedPath,\n\t\t\t\t\tupdatedAt: Date.now(),\n\t\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : preMatchSearch,\n\t\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\t\tsearchError,\n\t\t\t\t\tstatus,\n\t\t\t\t\tisFetching: false,\n\t\t\t\t\terror: void 0,\n\t\t\t\t\tparamsError,\n\t\t\t\t\tcontext: {},\n\t\t\t\t\tabortController: opts?._controller ?? new AbortController(),\n\t\t\t\t\tcause,\n\t\t\t\t\tloaderDeps: previousMatch ? replaceEqualDeep(previousMatch.loaderDeps, loaderDeps) : loaderDeps,\n\t\t\t\t\tinvalid: false,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tstaticData: route.options.staticData || {},\n\t\t\t\t\tfullPath: route.fullPath\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst _notFound = _notFoundRouteId === route.id;\n\t\t\tif (match._notFound && !_notFound) match.error = void 0;\n\t\t\tmatch._notFound = _notFound;\n\t\t\tmatches[index] = match;\n\t\t}\n\t\tfor (let index = 0; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tmatch.params = match.cause === \"stay\" ? nullReplaceEqualDeep(match.params, strictParams) : strictParams;\n\t\t\tif (opts?._controller) match.context = {};\n\t\t}\n\t\treturn matches;\n\t}\n\t/**\n\t* Lightweight route matching for buildLocation.\n\t* Only computes fullPath, accumulated search, and params - skipping expensive\n\t* operations like AbortController, loaderDeps, and full match objects.\n\t*/\n\tmatchRoutesLightweight(location) {\n\t\tconst lastRouteId = last(this.stores.ids.get());\n\t\tconst lastStateMatch = lastRouteId ? this.stores.byRoute.get(lastRouteId).get() : void 0;\n\t\tconst lastStateMatchId = lastStateMatch?.id;\n\t\tconst cached = this.lightweightCache.get(location);\n\t\tif (cached && cached[0] === lastStateMatchId) return cached[1];\n\t\tconst [matchedRoutes, rawParams] = this.getMatchedRoutes(location.pathname);\n\t\tconst lastRoute = last(matchedRoutes);\n\t\tconst accumulatedSearch = { ...location.search };\n\t\tfor (const route of matchedRoutes) try {\n\t\t\tObject.assign(accumulatedSearch, validateSearch(route.options.validateSearch, accumulatedSearch));\n\t\t} catch {}\n\t\tconst canReuseParams = lastStateMatch && lastStateMatch.routeId === lastRoute.id && lastStateMatch.pathname === location.pathname;\n\t\tlet params;\n\t\tif (canReuseParams) params = lastStateMatch.params;\n\t\telse {\n\t\t\tconst strictParams = Object.assign(Object.create(null), rawParams);\n\t\t\tfor (const route of matchedRoutes) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch {}\n\t\t\tparams = strictParams;\n\t\t}\n\t\tconst result = [\n\t\t\tmatchedRoutes,\n\t\t\tlastRoute.fullPath,\n\t\t\taccumulatedSearch,\n\t\t\tparams\n\t\t];\n\t\tthis.lightweightCache.set(location, [lastStateMatchId, result]);\n\t\treturn result;\n\t}\n};\n/**\n* In non-production environments,\n* augment the RouterCore class with a `_refreshRoute` method\n* dedicated to HMR.\n*/\nif (process.env.NODE_ENV !== \"production\") {\n\tRouterCore.prototype._replaceRouteChunk = replaceRouteChunk;\n\tRouterCore.prototype._refreshRoute = async function() {\n\t\tthis._serverResult = void 0;\n\t\tthis.updateLatestLocation();\n\t\tawait refreshClientRoute(this);\n\t};\n}\n/** Error thrown when search parameter validation fails. */\nvar SearchParamError = class extends Error {};\n/** Error thrown when path parameter parsing/validation fails. */\nvar PathParamError = class extends Error {};\nconst normalize = (str) => str.endsWith(\"/\") && str.length > 1 ? str.slice(0, -1) : str;\nfunction comparePaths(a, b) {\n\treturn normalize(a) === normalize(b);\n}\n/**\n* Lazily import a module function and forward arguments to it, retaining\n* parameter and return types for the selected export key.\n*/\nfunction lazyFn(fn, key) {\n\treturn async (...args) => {\n\t\treturn (await fn())[key || \"default\"](...args);\n\t};\n}\n/** Create an initial RouterState from a parsed location. */\nfunction getInitialRouterState(location) {\n\treturn {\n\t\tisLoading: false,\n\t\tstatus: \"idle\",\n\t\tresolvedLocation: void 0,\n\t\tlocation,\n\t\tmatches: []\n\t};\n}\nfunction validateSearch(validateSearch, input) {\n\tif (validateSearch == null) return {};\n\tif (\"~standard\" in validateSearch) {\n\t\tconst result = validateSearch[\"~standard\"].validate(input);\n\t\tif (result instanceof Promise) throw new SearchParamError(\"Async validation not supported\");\n\t\tif (result.issues) throw new SearchParamError(JSON.stringify(result.issues, void 0, 2), { cause: result });\n\t\treturn result.value;\n\t}\n\tif (\"parse\" in validateSearch) return validateSearch.parse(input);\n\tif (typeof validateSearch === \"function\") return validateSearch(input);\n\treturn {};\n}\nfunction applySearchMiddleware(search, dest, destRoutes, includeValidateSearch) {\n\tconst middlewares = [];\n\tfor (const route of destRoutes) {\n\t\tconst routeOptions = route.options;\n\t\tif (\"search\" in routeOptions) {\n\t\t\tif (routeOptions.search?.middlewares) middlewares.push(...routeOptions.search.middlewares);\n\t\t} else if (routeOptions.preSearchFilters || routeOptions.postSearchFilters) {\n\t\t\tconst legacyMiddleware = ({ search, next }) => {\n\t\t\t\tconst result = next(routeOptions.preSearchFilters ? routeOptions.preSearchFilters.reduce((prev, next) => next(prev), search) : search);\n\t\t\t\treturn routeOptions.postSearchFilters ? routeOptions.postSearchFilters.reduce((prev, next) => next(prev), result) : result;\n\t\t\t};\n\t\t\tmiddlewares.push(legacyMiddleware);\n\t\t}\n\t\tconst routeValidateSearch = routeOptions.validateSearch;\n\t\tif (includeValidateSearch && routeValidateSearch) {\n\t\t\tconst validate = ({ search, next, meta }) => {\n\t\t\t\tconst result = next(search);\n\t\t\t\ttry {\n\t\t\t\t\tconst validated = validateSearch(routeValidateSearch, result);\n\t\t\t\t\tif (meta && validated) {\n\t\t\t\t\t\tfor (const key in validated) if (!(key in result)) (meta.defaulted ||= /* @__PURE__ */ new Map()).set(key, validated[key]);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\t...validated\n\t\t\t\t\t};\n\t\t\t\t} catch {}\n\t\t\t\treturn result;\n\t\t\t};\n\t\t\tmiddlewares.push(validate);\n\t\t}\n\t}\n\tconst applyNext = (index, currentSearch, meta) => {\n\t\tif (index >= middlewares.length) {\n\t\t\tif (!dest.search) return {};\n\t\t\tif (dest.search === true) return currentSearch;\n\t\t\tconst result = functionalUpdate(dest.search, currentSearch);\n\t\t\tif (meta) meta.explicit = result;\n\t\t\treturn result;\n\t\t}\n\t\tconst next = (newSearch, collectMeta) => {\n\t\t\tif (collectMeta) {\n\t\t\t\tconst nextMeta = meta || {};\n\t\t\t\treturn {\n\t\t\t\t\tsearch: applyNext(index + 1, newSearch, nextMeta),\n\t\t\t\t\tmeta: nextMeta\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyNext(index + 1, newSearch, meta);\n\t\t};\n\t\treturn middlewares[index]({\n\t\t\tsearch: currentSearch,\n\t\t\tnext,\n\t\t\tmeta\n\t\t});\n\t};\n\treturn applyNext(0, search);\n}\nfunction findGlobalNotFoundRouteId(notFoundMode, routes) {\n\tif (notFoundMode !== \"root\") {\n\t\tlet fallback;\n\t\tfor (let i = routes.length - 1; i >= 0; i--) {\n\t\t\tconst route = routes[i];\n\t\t\tif (route.options.notFoundComponent) return route.id;\n\t\t\tfallback ||= route.children && route.id;\n\t\t}\n\t\tif (fallback) return fallback;\n\t}\n\treturn rootRouteId;\n}\nfunction resolveNextParams(spec, base) {\n\tif (spec === false || spec === null) return Object.create(null);\n\tif ((spec ?? true) === true) return base;\n\tconst next = Object.assign(Object.create(null), base);\n\treturn Object.assign(next, functionalUpdate(spec, next));\n}\nfunction extractStrictParams(route, accumulatedParams) {\n\tconst parseParams = route.options.params?.parse ?? route.options.parseParams;\n\tif (parseParams) Object.assign(accumulatedParams, parseParams(accumulatedParams));\n}\n//#endregion\nexport { PathParamError, RouterCore, SearchParamError, defaultSerializeError, getInitialRouterState, getLocationChangeInfo, lazyFn, runRouteLifecycle, trailingSlashOptions };\n\n//# sourceMappingURL=router.js.map","import { isNotFound } from \"./not-found.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { hydrateSsrMatchId } from \"./ssr/ssr-match-id.js\";\nimport { getLocationChangeInfo, runRouteLifecycle } from \"./router.js\";\n//#region src/load-client.ts\nfunction replaceRouteChunk(route, lazyFn) {\n\troute.lazyFn = lazyFn ?? route.lazyFn;\n\troute._lazy = void 0;\n}\nfunction preloadComponent(route, type) {\n\treturn route.options[type]?.preload?.();\n}\nfunction loadComponents(route, onPendingReady) {\n\tconst component = preloadComponent(route, \"component\");\n\tconst pending = preloadComponent(route, \"pendingComponent\");\n\tconst pendingReady = onPendingReady && pending ? pending.then(onPendingReady) : pending;\n\tif (onPendingReady && !pending) onPendingReady();\n\tif (component && pendingReady) return Promise.all([component, pendingReady]).then(() => {});\n\treturn component ?? pendingReady;\n}\nfunction loadRouteChunk(route, componentType, onPendingReady) {\n\tconst afterLazy = () => componentType === false ? void 0 : componentType ? preloadComponent(route, componentType) : loadComponents(route, onPendingReady);\n\tconst current = route._lazy;\n\tif (current) return current === true ? afterLazy() : current.then(afterLazy);\n\tif (!route.lazyFn) return afterLazy();\n\tconst promise = route.lazyFn().then((lazyRoute) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) {\n\t\t\tconst { id: _id, ...options } = lazyRoute.options;\n\t\t\tObject.assign(route.options, options);\n\t\t\troute._lazy = true;\n\t\t}\n\t}, (error) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) route._lazy = void 0;\n\t\tthrow error;\n\t});\n\troute._lazy = promise;\n\treturn promise.then(afterLazy);\n}\n/** Return the structural lane through the first terminal render boundary. */\nfunction _getRenderedMatches(matches) {\n\tconst end = matches.findIndex((match) => match.status !== \"success\" || match._notFound) + 1;\n\treturn end && end < matches.length ? matches.slice(0, end) : matches;\n}\n/** Return the lane whose document assets belong to the current presentation. */\nfunction _getAssetMatches(matches) {\n\tlet end = matches.length;\n\tfor (let index = 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tif (match._assetEnd !== void 0) {\n\t\t\tend = Math.min(end, Math.max(index + 1, match._assetEnd));\n\t\t\tcontinue;\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) {\n\t\t\tend = index + 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn end < matches.length ? matches.slice(0, end) : matches;\n}\nconst SUCCESS = 0;\nconst ERROR = 1;\nconst NOT_FOUND = 2;\nconst REDIRECTED = 3;\nconst CANCELED_OUTCOME = [4];\nfunction isControl(result) {\n\treturn typeof result[0] === \"number\";\n}\nfunction waitFor(value, signal) {\n\tif (signal.aborted) return Promise.race([Promise.reject(signal), value]);\n\treturn new Promise((resolve, reject) => {\n\t\tconst abort = () => reject(signal);\n\t\tsignal.addEventListener(\"abort\", abort, { once: true });\n\t\tPromise.resolve(value).then(resolve, reject).finally(() => signal.removeEventListener(\"abort\", abort));\n\t});\n}\nfunction getRoute(router, match) {\n\treturn router.routesById[match.routeId];\n}\nfunction normalize(value, rejected, routeId) {\n\tif (isRedirect(value)) return [REDIRECTED, value];\n\tif (isNotFound(value)) {\n\t\tvalue.routeId ||= routeId;\n\t\treturn [NOT_FOUND, value];\n\t}\n\tif (rejected && typeof value?.then === \"function\") value = new Error(\"A Promise was thrown\", { cause: value });\n\treturn rejected ? [ERROR, value] : [SUCCESS, value];\n}\nfunction normalizeError(route, cause) {\n\tlet outcome = normalize(cause, true, route.id);\n\tif (outcome[0] !== ERROR) return outcome;\n\ttry {\n\t\troute.options.onError?.(outcome[1]);\n\t} catch (onErrorCause) {\n\t\toutcome = normalize(onErrorCause, true, route.id);\n\t}\n\treturn outcome;\n}\nfunction normalizeLaneError(router, lane, route, cause, options) {\n\tif (options[0].signal.aborted) return CANCELED_OUTCOME;\n\treturn materializeRedirect(router, lane, route, normalizeError(route, cause), options);\n}\nasync function contextualize(router, lane, options, end, planSuccessfulLane, retainedEnd) {\n\tconst [location, matches] = lane;\n\tconst signal = options[0].signal;\n\tconst preload = !!options[3];\n\tfor (let index = options[6] ?? 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst route = getRoute(router, match);\n\t\tmatch.abortController = options[0];\n\t\tconst parentContext = matches[index - 1]?.context ?? router.options.context ?? {};\n\t\tconst common = {\n\t\t\tparams: match.params,\n\t\t\tlocation,\n\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t...opts,\n\t\t\t\t_fromLocation: location\n\t\t\t}),\n\t\t\tbuildLocation: router.buildLocation,\n\t\t\tcause: preload ? \"preload\" : match.cause,\n\t\t\tabortController: options[0],\n\t\t\tpreload,\n\t\t\tmatches,\n\t\t\trouteId: route.id\n\t\t};\n\t\tlet context = parentContext;\n\t\ttry {\n\t\t\tlet routeContext = match._ctx;\n\t\t\tif (!routeContext && route.options.context) routeContext = match._ctx = route.options.context({\n\t\t\t\t...common,\n\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\tcontext: parentContext\n\t\t\t}) || {};\n\t\t\tcontext = {\n\t\t\t\t...parentContext,\n\t\t\t\t...routeContext\n\t\t\t};\n\t\t\tmatch.context = context;\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t}\n\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\tconst validationError = match.paramsError ?? match.searchError;\n\t\tif (validationError !== void 0) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, validationError, options)];\n\t\t}\n\t\tconst beforeLoad = route.options.beforeLoad;\n\t\tif (!beforeLoad) continue;\n\t\tconst beforeLoadContext = {\n\t\t\t...common,\n\t\t\tsearch: match.search,\n\t\t\tcontext,\n\t\t\t...router.options.additionalContext\n\t\t};\n\t\tconst previousStatus = match.status;\n\t\tif (index >= retainedEnd) {\n\t\t\tmatch.status = \"pending\";\n\t\t\toptions[7]?.();\n\t\t}\n\t\ttry {\n\t\t\tsetFetching(router, match, \"beforeLoad\", options[0]);\n\t\t\tconst result = await waitFor(beforeLoad(beforeLoadContext), signal);\n\t\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\t\tconst outcome = materializeRedirect(router, lane, route, normalize(result, false, route.id), options);\n\t\t\tif (outcome[0] !== SUCCESS) {\n\t\t\t\treleaseFlight(router, match);\n\t\t\t\treturn [index, outcome];\n\t\t\t}\n\t\t\tmatch.context = {\n\t\t\t\t...context,\n\t\t\t\t...result\n\t\t\t};\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t} finally {\n\t\t\tif (match.status === \"pending\") match.status = previousStatus;\n\t\t\tsetFetching(router, match, false, options[0]);\n\t\t}\n\t}\n\tplanSuccessfulLane();\n}\nfunction releaseOwnedFlight(router, match, flight) {\n\tif (!flight || --flight[2]) return;\n\tif (router._flights?.get(match.id) === flight) {\n\t\tconst current = router._tx;\n\t\tif (current && !current[0].signal.aborted && !current[3].includes(match) && current[3].some((candidate) => candidate.id === match.id) && current[3].some((candidate) => candidate.isFetching === \"beforeLoad\")) return;\n\t\trouter._flights.delete(match.id);\n\t}\n\treturn flight[1];\n}\nfunction releaseFlight(router, match) {\n\tconst flight = match._flight;\n\tmatch._flight = void 0;\n\treleaseOwnedFlight(router, match, flight)?.abort();\n}\n/**\n* Not passing in a `next` ownership recipient\n* is equivalent to discarding the match resources\n*/\nfunction transferMatchResources(router, previous, next, deferSameIdFlight) {\n\tconst abort = [];\n\tfor (const match of previous) if (!next?.includes(match)) {\n\t\tconst flight = match._flight;\n\t\tmatch._flight = void 0;\n\t\tif (deferSameIdFlight && flight?.[2] === 1 && router._flights?.get(match.id) === flight && next?.some((candidate) => candidate.id === match.id)) flight[2] = 0;\n\t\telse {\n\t\t\tconst controller = releaseOwnedFlight(router, match, flight);\n\t\t\tif (controller) abort.push(controller);\n\t\t}\n\t}\n\tfor (const controller of abort) controller.abort();\n}\nfunction acquireMatchResources(matches) {\n\tfor (const match of matches) {\n\t\tconst flight = match._flight;\n\t\tif (flight) flight[2]++;\n\t}\n}\nfunction setFetching(router, match, value, owner) {\n\tmatch.isFetching = value;\n\tif (owner && router._tx?.[0] !== owner) return;\n\tconst store = router.stores.byRoute.get(match.routeId);\n\tconst presented = store?.get();\n\tif (presented?.id === match.id) store.set({\n\t\t...presented,\n\t\tisFetching: value\n\t});\n}\nfunction getLoaderContext(router, lane, match, route, controller, parentMatchPromise, preload) {\n\tconst location = lane[0];\n\treturn {\n\t\tparams: match.params,\n\t\tlocation,\n\t\tnavigate: (opts) => router.navigate({\n\t\t\t...opts,\n\t\t\t_fromLocation: location\n\t\t}),\n\t\tcause: preload ? \"preload\" : match.cause,\n\t\tabortController: controller,\n\t\tpreload,\n\t\tdeps: match.loaderDeps,\n\t\tparentMatchPromise,\n\t\tcontext: match.context,\n\t\troute,\n\t\t...router.options.additionalContext\n\t};\n}\nasync function loadResource(router, lane, match, route, loader, parentMatchPromise, options) {\n\tconst owner = options[0];\n\tconst signal = owner.signal;\n\tif (signal.aborted) return CANCELED_OUTCOME;\n\tif (!loader) return [SUCCESS, void 0];\n\tlet flight = match._flight;\n\tsetFetching(router, match, \"loader\", owner);\n\ttry {\n\t\tif (!flight) {\n\t\t\tconst controller = new AbortController();\n\t\t\tflight = [\n\t\t\t\tPromise.resolve().then(() => loader(getLoaderContext(router, lane, match, route, controller, parentMatchPromise, !!options[3]))).then((value) => normalize(value, false, route.id), (cause) => normalize(cause, true, route.id)).then((result) => {\n\t\t\t\t\tif (result[0] !== SUCCESS && router._flights?.get(match.id) === flight) {\n\t\t\t\t\t\trouter._flights.delete(match.id);\n\t\t\t\t\t\tif (!flight[2]) controller.abort();\n\t\t\t\t\t}\n\t\t\t\t\treturn result[0] === ERROR && flight[2] ? normalizeError(route, result[1]) : result;\n\t\t\t\t}),\n\t\t\t\tcontroller,\n\t\t\t\t1\n\t\t\t];\n\t\t\t(router._flights ??= /* @__PURE__ */ new Map()).set(match.id, flight);\n\t\t}\n\t\tmatch._flight = flight;\n\t\tmatch.abortController = flight[1];\n\t\treturn materializeRedirect(router, lane, route, await waitFor(flight[0], signal), options);\n\t} catch (cause) {\n\t\tif (cause !== signal || !signal.aborted) throw cause;\n\t\treleaseFlight(router, match);\n\t\treturn CANCELED_OUTCOME;\n\t} finally {\n\t\tsetFetching(router, match, false, owner);\n\t}\n}\nfunction settleInto(match, result, preload) {\n\tif (result[0] === SUCCESS) {\n\t\tmatch.loaderData = result[1];\n\t\tmatch.error = void 0;\n\t\tmatch.status = \"success\";\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t\tmatch.preload = preload;\n\t} else if (result[0] !== REDIRECTED) {\n\t\tmatch.status = \"success\";\n\t\tmatch.error = void 0;\n\t\tmatch.invalid = true;\n\t}\n}\nfunction cacheLoaderMatch(router, match, planned) {\n\tconst current = router._cache.get(match.id);\n\tif (current !== planned || router._committed.some((candidate) => candidate.id === match.id && candidate._flight === match._flight)) return;\n\tconst cached = {\n\t\t...match,\n\t\t_notFound: void 0,\n\t\tcontext: {}\n\t};\n\tif (cached._flight) cached._flight[2]++;\n\trouter._cache.set(match.id, cached);\n\tif (current) releaseFlight(router, current);\n}\nfunction getParentSnapshot(match, outcome) {\n\tif (outcome[0] === ERROR || outcome[0] === NOT_FOUND) return {\n\t\t...match,\n\t\tstatus: outcome[0] === ERROR ? \"error\" : \"notFound\",\n\t\terror: outcome[1],\n\t\t_flight: void 0\n\t};\n\treturn match;\n}\nfunction createLoaderTask(router, lane, index, tasks, semanticParent, options, retainedEnd) {\n\tconst match = lane[1][index];\n\tconst route = getRoute(router, match);\n\tconst preload = !!options[3];\n\tconst plannedCacheMatch = router._cache.get(match.id);\n\tlet configured;\n\tlet reload = false;\n\tlet reloadFailure;\n\ttry {\n\t\tif (match.status === \"success\") {\n\t\t\tconfigured = route.options.shouldReload;\n\t\t\tif (typeof configured === \"function\") configured = configured(getLoaderContext(router, lane, match, route, options[0], semanticParent, preload));\n\t\t\tif (options[0].signal.aborted) reloadFailure = CANCELED_OUTCOME;\n\t\t}\n\t\tif (!reloadFailure) if (match.status !== \"success\") reload = true;\n\t\telse {\n\t\t\tconst staleAge = options[3] || match.preload ? route.options.preloadStaleTime ?? router.options.defaultPreloadStaleTime ?? 3e4 : route.options.staleTime ?? router.options.defaultStaleTime ?? 0;\n\t\t\treload = !!(match.invalid || configured || configured === void 0 && Date.now() - match.updatedAt >= staleAge && (options[5] || match.cause === \"enter\" || options[2].some((candidate) => candidate.routeId === match.routeId && candidate.id !== match.id)));\n\t\t}\n\t} catch (cause) {\n\t\tmatch.invalid = true;\n\t\treleaseFlight(router, match);\n\t\treloadFailure = normalizeLaneError(router, lane, route, cause, options);\n\t}\n\tconst routeLoader = route.options.loader;\n\tconst loader = typeof routeLoader === \"function\" ? routeLoader : routeLoader?.handler;\n\tlet donor = (!preload || route.options.preload !== false) && routeLoader && !(process.env.NODE_ENV !== \"production\" && router._tx?.[6]) ? router._flights?.get(match.id) : void 0;\n\tif (donor === match._flight || reloadFailure) donor = void 0;\n\telse if (donor && !reload && !preload && configured === void 0) reload = true;\n\telse if (!reload) donor = void 0;\n\tconst background = !!(routeLoader && reload && match.status === \"success\" && !preload && !options[4] && ((typeof routeLoader === \"function\" ? void 0 : routeLoader?.staleReloadMode) ?? router.options.defaultStaleReloadMode) !== \"blocking\");\n\tconst loaded = reload && (!preload || route.options.preload !== false);\n\tconst blocking = loaded && !background && (match.status !== \"success\" || !!routeLoader);\n\tconst onReady = index >= retainedEnd ? options[7] : void 0;\n\tconst onLazyReady = route.lazyFn && route._lazy !== true ? onReady : void 0;\n\tif (loaded && !routeLoader) {\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t}\n\tif (donor) donor[2]++;\n\tif (blocking) {\n\t\tconst acceptedFlight = match._flight;\n\t\tmatch._flight = donor;\n\t\treleaseOwnedFlight(router, match, acceptedFlight)?.abort();\n\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\tonReady?.();\n\t}\n\tif (!loaded) match.isFetching = false;\n\tconst outcome = (reloadFailure ? Promise.resolve(reloadFailure) : !blocking ? Promise.resolve([SUCCESS, match.loaderData]) : loadResource(router, lane, match, route, loader, semanticParent, options)).then((result) => {\n\t\tif (blocking) {\n\t\t\tsettleInto(match, result, preload);\n\t\t\tif (result[0] === SUCCESS) {\n\t\t\t\tif (routeLoader && !options[0].signal.aborted) cacheLoaderMatch(router, match, plannedCacheMatch);\n\t\t\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t});\n\tconst chunkFailure = waitFor(Promise.resolve().then(() => loadRouteChunk(route, void 0, onLazyReady)), options[0].signal).then(() => void 0, (cause) => lane[1].some((candidate, candidateIndex) => candidateIndex <= index && (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound)) ? void 0 : [index, normalizeLaneError(router, lane, route, cause, options)]).then((failure) => outcome.then((result) => {\n\t\tif (blocking && !failure && result[0] === SUCCESS && match.status === \"pending\" && !options[0].signal.aborted) {\n\t\t\tmatch.status = \"success\";\n\t\t\tonReady?.();\n\t\t}\n\t\treturn failure;\n\t}));\n\ttasks.push([\n\t\tindex,\n\t\toutcome,\n\t\tchunkFailure\n\t]);\n\tif (!background) return outcome.then((result) => getParentSnapshot(match, result));\n\tconst candidate = {\n\t\t...match,\n\t\tstatus: \"pending\",\n\t\tpreload: false,\n\t\t_flight: donor\n\t};\n\tmatch.invalid = false;\n\tmatch.isFetching = \"loader\";\n\tconst backgroundOutcome = loadResource(router, lane, candidate, route, loader, semanticParent, options).then((result) => {\n\t\tmatch.isFetching = false;\n\t\tsettleInto(candidate, result, false);\n\t\treturn result;\n\t});\n\t(lane[2] ??= []).push([\n\t\tindex,\n\t\tbackgroundOutcome,\n\t\tchunkFailure,\n\t\tcandidate\n\t]);\n\treturn backgroundOutcome.then((result) => getParentSnapshot(candidate, result));\n}\nasync function getNotFoundBoundary(router, matches, indexed, signal, fallback = 0) {\n\tconst cause = indexed?.[1][1];\n\tlet index = cause?.routeId ? matches.findIndex((match) => match.routeId === cause.routeId) : indexed?.[0] ?? matches.length - 1;\n\tif (index < 0) index = 0;\n\tfor (let i = index; i >= 0; i--) {\n\t\tconst route = getRoute(router, matches[i]);\n\t\ttry {\n\t\t\tconst loading = loadRouteChunk(route, false);\n\t\t\tif (loading) await waitFor(loading, signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) throw cause;\n\t\t}\n\t\tif (route.options.notFoundComponent) return i;\n\t}\n\treturn cause?.routeId ? index : fallback;\n}\nfunction discardBackground(router, lane) {\n\tif (lane[2]) {\n\t\ttransferMatchResources(router, lane[2].map((task) => task[3]));\n\t\tlane[2] = void 0;\n\t}\n}\nasync function settleTasks(tasks, serialFailure, redirectTasks, gate) {\n\tlet loaderFailure;\n\ttry {\n\t\tawait Promise.all(tasks.map((task) => task[1].then(async (outcome) => {\n\t\t\tconst taskIndex = task[0];\n\t\t\tif (gate && taskIndex >= await gate) return;\n\t\t\tif (outcome[0] >= REDIRECTED) throw [taskIndex, outcome];\n\t\t\tif (!loaderFailure && outcome[0] !== SUCCESS) {\n\t\t\t\tloaderFailure = [taskIndex, outcome];\n\t\t\t\tawait Promise.all((redirectTasks ?? []).map((nextTask) => {\n\t\t\t\t\tif (nextTask[0] <= taskIndex) return;\n\t\t\t\t\treturn nextTask[1].then((nextOutcome) => {\n\t\t\t\t\t\tif (nextOutcome[0] === REDIRECTED) throw [nextTask[0], nextOutcome];\n\t\t\t\t\t});\n\t\t\t\t}));\n\t\t\t}\n\t\t})));\n\t} catch (cause) {\n\t\treturn cause;\n\t}\n\treturn serialFailure ?? loaderFailure;\n}\nfunction materializeRedirect(router, lane, route, outcome, options, failed) {\n\twhile (outcome[0] === REDIRECTED) {\n\t\tconst redirect = outcome[1];\n\t\tif (redirect.options.reloadDocument ? options[3] : options[1] >= 20) return outcome;\n\t\ttry {\n\t\t\tif (redirect.options.href && redirect.options.reloadDocument) {\n\t\t\t\trouter.resolveRedirect(redirect);\n\t\t\t\treturn outcome;\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tREDIRECTED,\n\t\t\t\tredirect,\n\t\t\t\trouter.buildLocation({\n\t\t\t\t\t...redirect.options,\n\t\t\t\t\t_fromLocation: lane[0],\n\t\t\t\t\t_includeValidateSearch: true\n\t\t\t\t})\n\t\t\t];\n\t\t} catch (cause) {\n\t\t\toutcome = failed ? [ERROR, cause] : normalizeError(route, cause);\n\t\t\tfailed = true;\n\t\t}\n\t}\n\treturn outcome;\n}\nasync function reduceLane(router, lane, tasks, controller, settlement, onReady) {\n\tconst matches = lane[1];\n\tlet failure = await settlement;\n\tlet redirectLimitExceeded = false;\n\tconst plannedBoundary = matches.findIndex((match) => match._notFound);\n\tconst boundaryOf = (found) => found[1][0] === NOT_FOUND ? getNotFoundBoundary(router, matches, found, controller.signal) : found[0];\n\tlet readinessEnd = plannedBoundary < 0 ? matches.length : plannedBoundary;\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) readinessEnd = 0;\n\telse if (failure) {\n\t\treadinessEnd = failure[2] ??= await boundaryOf(failure);\n\t\tfor (const task of tasks) {\n\t\t\tif (task[0] >= readinessEnd) break;\n\t\t\tconst outcome = await task[1];\n\t\t\tif (outcome[0] !== SUCCESS && outcome[0] < REDIRECTED && !(\"loaderData\" in matches[task[0]])) {\n\t\t\t\tfailure = [task[0], outcome];\n\t\t\t\treadinessEnd = failure[2] = await boundaryOf(failure);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor (const task of tasks) {\n\t\tif (task[0] >= readinessEnd) break;\n\t\tconst chunkFailure = await task[2];\n\t\tif (!chunkFailure) continue;\n\t\tfailure = chunkFailure;\n\t\tbreak;\n\t}\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) {\n\t\tconst outcome = failure[1];\n\t\tif (outcome[0] !== REDIRECTED || outcome[1].options.reloadDocument || outcome[2]) {\n\t\t\tdiscardBackground(router, lane);\n\t\t\treturn outcome;\n\t\t}\n\t\tredirectLimitExceeded = true;\n\t\tfailure = [0, [ERROR, /* @__PURE__ */ new Error(\"Too many redirects\")]];\n\t}\n\tconst boundary = failure ? failure[2] ?? await boundaryOf(failure) : plannedBoundary;\n\tif (boundary >= 0) {\n\t\tconst outcome = failure?.[1];\n\t\tconst kind = outcome?.[0];\n\t\tconst match = matches[boundary];\n\t\tconst cause = outcome?.[1];\n\t\tconst install = () => {\n\t\t\tif (outcome) {\n\t\t\t\tmatch._notFound = void 0;\n\t\t\t\tif (kind === ERROR) match.status = \"error\";\n\t\t\t\telse {\n\t\t\t\t\tcause.routeId = match.routeId;\n\t\t\t\t\tif (match.routeId === router.routeTree.id) {\n\t\t\t\t\t\tmatch.status = \"success\";\n\t\t\t\t\t\tmatch._notFound = true;\n\t\t\t\t\t} else match.status = \"notFound\";\n\t\t\t\t}\n\t\t\t\tmatch.error = cause;\n\t\t\t\tmatch.isFetching = false;\n\t\t\t}\n\t\t};\n\t\tinstall();\n\t\tif (!outcome) onReady?.();\n\t\tconst route = getRoute(router, match);\n\t\ttry {\n\t\t\tawait waitFor(outcome ? Promise.resolve().then(() => loadRouteChunk(route, kind === ERROR ? \"errorComponent\" : \"notFoundComponent\")) : Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]), controller.signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === controller.signal && controller.signal.aborted) {\n\t\t\t\tdiscardBackground(router, lane);\n\t\t\t\treturn CANCELED_OUTCOME;\n\t\t\t}\n\t\t}\n\t\tif (!outcome) match.status = \"success\";\n\t\telse if (redirectLimitExceeded) {\n\t\t\tcontroller.abort();\n\t\t\tawait Promise.all([\n\t\t\t\t...tasks.map((task) => task[1]),\n\t\t\t\t...tasks.map((task) => task[2]),\n\t\t\t\t...(lane[2] ?? []).map((task) => task[1])\n\t\t\t]);\n\t\t\tdiscardBackground(router, lane);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tinstall();\n\t\t}\n\t}\n\treturn lane;\n}\nasync function projectLane(router, lane, signal, start = 0, end = lane[1].length) {\n\tconst matches = lane[1];\n\tfor (let index = start; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst routeOptions = getRoute(router, match).options;\n\t\tif (routeOptions.head || routeOptions.scripts) try {\n\t\t\tconst context = {\n\t\t\t\tssr: router.options.ssr,\n\t\t\t\tmatches,\n\t\t\t\tmatch,\n\t\t\t\tparams: match.params,\n\t\t\t\tloaderData: match.loaderData\n\t\t\t};\n\t\t\tconst [head, scripts] = await waitFor(Promise.all([routeOptions.head?.(context), routeOptions.scripts?.(context)]), signal);\n\t\t\tmatch.meta = head?.meta;\n\t\t\tmatch.links = head?.links;\n\t\t\tmatch.headScripts = head?.scripts;\n\t\t\tmatch.styles = head?.styles;\n\t\t\tmatch.scripts = scripts;\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) break;\n\t\t\tconsole.error(cause);\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) break;\n\t}\n\treturn lane;\n}\nasync function executeClientLane(router, location, matches, options) {\n\tconst matched = [location, matches];\n\tconst signal = options[0].signal;\n\tlet reduced;\n\ttry {\n\t\tconst presented = router.stores.matches.get();\n\t\tlet plannedBoundary = matches.findIndex((match) => match._notFound);\n\t\tif (router.options.notFoundMode !== \"root\" && plannedBoundary >= 0) {\n\t\t\tconst boundary = await getNotFoundBoundary(router, matched[1], void 0, signal, plannedBoundary);\n\t\t\tif (boundary !== plannedBoundary) {\n\t\t\t\tmatches[plannedBoundary]._notFound = void 0;\n\t\t\t\tmatches[boundary]._notFound = true;\n\t\t\t}\n\t\t\tplannedBoundary = boundary;\n\t\t}\n\t\tlet end = plannedBoundary < 0 ? matches.length : plannedBoundary + 1;\n\t\tlet retainedEnd = 0;\n\t\twhile (retainedEnd < end && retainedEnd !== plannedBoundary) {\n\t\t\tconst match = matches[retainedEnd];\n\t\t\tconst committed = options[2][retainedEnd];\n\t\t\tconst visible = presented[retainedEnd];\n\t\t\tif (committed?.id !== match.id || committed.status !== \"success\" || committed._notFound || match.preload || visible?.id !== match.id || visible.status !== \"success\" || visible._notFound) break;\n\t\t\tretainedEnd++;\n\t\t}\n\t\tconst tasks = [];\n\t\tconst start = options[6] ?? 0;\n\t\tlet semanticParent = start ? Promise.resolve(matched[1][start - 1]) : void 0;\n\t\tconst planSuccessfulLane = () => {\n\t\t\tfor (let index = start; index < end; index++) {\n\t\t\t\tif (signal.aborted) break;\n\t\t\t\tsemanticParent = createLoaderTask(router, matched, index, tasks, semanticParent, options, retainedEnd);\n\t\t\t}\n\t\t};\n\t\tconst failure = await contextualize(router, matched, options, end, planSuccessfulLane, retainedEnd);\n\t\tif (failure) {\n\t\t\toptions[4] = true;\n\t\t\tend = failure[0];\n\t\t\tif (failure[1][0] === NOT_FOUND) {\n\t\t\t\tconst boundary = await getNotFoundBoundary(router, matched[1], failure, signal);\n\t\t\t\tfailure[2] = boundary;\n\t\t\t\tend = Math.min(end, boundary + 1);\n\t\t\t} else if (failure[1][0] >= REDIRECTED) end = 0;\n\t\t\tplanSuccessfulLane();\n\t\t}\n\t\tif (!signal.aborted && !options[3]) {\n\t\t\tconst abort = [];\n\t\t\tfor (const [id, flight] of router._flights ?? []) if (!flight[2]) {\n\t\t\t\trouter._flights.delete(id);\n\t\t\t\tabort.push(flight[1]);\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t}\n\t\tconst reduction = reduceLane(router, matched, tasks, options[0], settleTasks(tasks, failure, matched[2]), options[7]);\n\t\tif (matched[2]?.length) matched[3] = settleTasks(matched[2], void 0, void 0, reduction.then((foreground) => isControl(foreground) ? 0 : _getRenderedMatches(foreground[1]).length, () => 0));\n\t\treduced = await reduction;\n\t} catch (cause) {\n\t\tdiscardBackground(router, matched);\n\t\tif (cause === signal && signal.aborted) return CANCELED_OUTCOME;\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) return reduced;\n\treturn projectLane(router, reduced, signal, options[6] === reduced[1].length ? options[6] : 0);\n}\n/**\n* Waits for `pendingMs`, then presents the complete lane. Rendering applies the\n* selected boundary cutoff while retaining every match's structural state.\n* A replacement load for the same match keeps the timer; choosing a different\n* match resets it. `pendingMinMs` starts after the fallback renders.\n*/\nfunction offerPending(router, tx) {\n\tif (router._tx !== tx) return;\n\tconst matches = tx[3];\n\tconst presented = router.stores.matches.get();\n\tlet session = router._pending;\n\tfor (let index = 0; index < matches.length; index++) {\n\t\tconst match = matches[index];\n\t\tconst success = match.status === \"success\" && !match._notFound;\n\t\tconst presentedPending = presented[index]?.id === match.id && presented[index]?.status === \"pending\";\n\t\tif (success && !presentedPending) continue;\n\t\tconst route = getRoute(router, match);\n\t\tconst delay = success && presentedPending || match.invalid ? 0 : route.options.pendingMs ?? router.options.defaultPendingMs;\n\t\tconst component = route.options.pendingComponent ?? router.options.defaultPendingComponent;\n\t\tif (!component || typeof delay !== \"number\" || delay === Infinity) {\n\t\t\tif (session) {\n\t\t\t\tsession[0] = tx;\n\t\t\t\tsession[2] = 0;\n\t\t\t\tsession[4] = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst min = route.options.pendingMinMs ?? router.options.defaultPendingMinMs ?? 0;\n\t\tlet tookOver = false;\n\t\tif (session?.[1] === match.id) {\n\t\t\ttookOver = session[0] !== tx;\n\t\t\tsession[0] = tx;\n\t\t} else {\n\t\t\tclearTimeout(session?.[3]);\n\t\t\trouter._pending = session = void 0;\n\t\t}\n\t\tif (!session) router._pending = session = [\n\t\t\ttx,\n\t\t\tmatch.id,\n\t\t\tpresentedPending ? Date.now() + min : tx[4] + delay,\n\t\t\tvoid 0,\n\t\t\tpresentedPending || void 0,\n\t\t\tcomponent\n\t\t];\n\t\tif (session[4] && !tookOver && session[5] === component) return;\n\t\tsession[5] = component;\n\t\tif (!session[4]) {\n\t\t\tclearTimeout(session[3]);\n\t\t\tconst remaining = session[2] - Date.now();\n\t\t\tif (remaining > 0) {\n\t\t\t\tsession[3] = setTimeout(() => offerPending(router, tx), remaining);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsession[2] = 0;\n\t\t}\n\t\tconst offered = matches.map((match) => ({\n\t\t\t...match,\n\t\t\t_flight: void 0\n\t\t}));\n\t\toffered[index].status = \"pending\";\n\t\tconst ack = session[4] = router.startTransition(() => router.stores.setMatches(offered), offered).then((rendered) => {\n\t\t\tif (rendered && router._pending === session && session[4] === ack && !session[2]) session[2] = Date.now() + min;\n\t\t\treturn rendered;\n\t\t});\n\t\treturn;\n\t}\n}\n/**\n* Cancels pending UI timing unless the current successor can take over the\n* same boundary that remains painted.\n*/\nfunction finishPending(router, tx) {\n\tconst session = router._pending;\n\tif (router._tx === tx || !router._tx?.[3].some((match) => match.id === session?.[1])) {\n\t\tclearTimeout(session?.[3]);\n\t\trouter._pending = void 0;\n\t}\n}\nasync function awaitPendingMinimum(router, tx) {\n\tconst session = router._pending;\n\tif (!session) return;\n\tclearTimeout(session[3]);\n\tconst remaining = session[2] - Date.now();\n\tif (!session[4] || remaining <= 0 || !_getRenderedMatches(tx[3]).some((match) => match.id === session[1])) return;\n\tlet timer;\n\ttry {\n\t\tawait waitFor(new Promise((resolve) => {\n\t\t\ttimer = setTimeout(resolve, remaining);\n\t\t}), tx[0].signal);\n\t} catch {}\n\tclearTimeout(timer);\n}\nfunction publishMatches(router, matches) {\n\trouter._committed = matches;\n\trouter.stores.setMatches(matches);\n}\nfunction commitMatches(router, tx, matches, resolvedPrefix) {\n\tconst previous = router._committed;\n\tconst previousCached = router._cache;\n\tfor (const match of matches) {\n\t\tmatch.preload = false;\n\t\tif (resolvedPrefix) match._assetEnd = void 0;\n\t}\n\tconst cut = _getRenderedMatches(matches).length;\n\tconst cached = /* @__PURE__ */ new Map();\n\tif (process.env.NODE_ENV === \"production\" || !tx[6]) {\n\t\tconst now = Date.now();\n\t\tfor (const match of [...previous, ...previousCached.values()]) {\n\t\t\tif (match.status !== \"success\" || matches.some((candidate, index) => candidate.id === match.id && (index < cut || candidate.status === \"success\"))) continue;\n\t\t\tconst route = getRoute(router, match);\n\t\t\tif (!route.options.loader || now - match.updatedAt >= (match.preload ? route.options.preloadGcTime ?? router.options.defaultPreloadGcTime ?? 3e5 : route.options.gcTime ?? router.options.defaultGcTime ?? 3e5)) continue;\n\t\t\tcached.set(match.id, previousCached.get(match.id) === match ? match : {\n\t\t\t\t...match,\n\t\t\t\t_flight: void 0,\n\t\t\t\tisFetching: false,\n\t\t\t\tcontext: {}\n\t\t\t});\n\t\t}\n\t}\n\ttx[3] = [];\n\trouter._cache = cached;\n\tpublishMatches(router, matches);\n\ttransferMatchResources(router, [...previousCached.values(), ...previous], [...matches, ...cached.values()]);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst handoff = tx[6]?.[0];\n\t\tif (handoff && router._handoff === handoff) handoff[1]();\n\t}\n\trunRouteLifecycle(router, previous, matches, tx);\n}\nasync function awaitCurrent(router, owner) {\n\tlet current = router._tx;\n\twhile (current && current !== owner) {\n\t\tawait current[5];\n\t\tif (router._tx === current) return;\n\t\tcurrent = router._tx;\n\t}\n}\nasync function followRedirect(router, tx, outcome) {\n\tconst redirect = outcome[1];\n\tconst location = outcome[2];\n\tif (!location) {\n\t\tawait router.navigate({\n\t\t\t...redirect.options,\n\t\t\treplace: true,\n\t\t\tignoreBlocker: true\n\t\t});\n\t\treturn;\n\t}\n\tif (redirect.options.reloadDocument) {\n\t\tawait router.navigate({\n\t\t\thref: location.publicHref,\n\t\t\treloadDocument: true,\n\t\t\treplace: true,\n\t\t\tignoreBlocker: true\n\t\t});\n\t\treturn;\n\t}\n\tlocation._redirects = tx[1] + 1;\n\trouter._pendingLocation = location;\n\tconst committed = router.commitLocation({\n\t\t...location,\n\t\tviewTransition: redirect.options.viewTransition,\n\t\treplace: true,\n\t\tresetScroll: redirect.options.resetScroll,\n\t\thashScrollIntoView: redirect.options.hashScrollIntoView,\n\t\tignoreBlocker: true\n\t});\n\tqueueMicrotask(() => {\n\t\tif (router._pendingLocation === location) router._pendingLocation = void 0;\n\t});\n\tawait committed;\n}\nasync function runBackground(router, tx, base, tasks, settlement) {\n\tconst next = base.map((match) => ({ ...match }));\n\tacquireMatchResources(next);\n\tfor (const task of tasks) {\n\t\treleaseFlight(router, next[task[0]]);\n\t\tnext[task[0]] = task[3];\n\t}\n\tconst lane = [tx[2], next];\n\tlet reduced;\n\ttry {\n\t\treduced = await reduceLane(router, lane, tasks, tx[0], settlement);\n\t} catch (cause) {\n\t\ttransferMatchResources(router, next);\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) {\n\t\ttransferMatchResources(router, next);\n\t\tif (reduced[0] === REDIRECTED && router._tx === tx && router._committed === base) await followRedirect(router, tx, reduced);\n\t\treturn;\n\t}\n\tconst projected = await projectLane(router, reduced, tx[0].signal);\n\tif (router._tx !== tx || router._committed !== base) {\n\t\ttransferMatchResources(router, projected[1]);\n\t\treturn;\n\t}\n\tfor (const match of projected[1]) {\n\t\tconst cached = router._cache.get(match.id);\n\t\tif (cached?._flight && cached._flight === match._flight) {\n\t\t\trouter._cache.delete(match.id);\n\t\t\treleaseFlight(router, cached);\n\t\t}\n\t}\n\tpublishMatches(router, projected[1]);\n\ttransferMatchResources(router, base, projected[1]);\n}\nasync function runClientTransaction(router, tx, forceStaleReload, onReady, sync, resolvedPrefix) {\n\tconst options = [\n\t\ttx[0],\n\t\ttx[1],\n\t\trouter._committed,\n\t\tvoid 0,\n\t\tsync,\n\t\tforceStaleReload,\n\t\tresolvedPrefix,\n\t\tonReady\n\t];\n\tconst result = await executeClientLane(router, tx[2], tx[3], options);\n\tif (isControl(result)) {\n\t\tconst follow = result[0] === REDIRECTED && router._tx === tx;\n\t\tif (!follow || result[1].options.reloadDocument) finishPending(router, tx);\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tif (!follow) return;\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\treturn;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) router._refreshNextLoad = true;\n\t\tawait followRedirect(router, tx, result);\n\t\treturn;\n\t}\n\tif (router._tx !== tx) {\n\t\tfinishPending(router, tx);\n\t\ttransferMatchResources(router, result[1]);\n\t\tdiscardBackground(router, result);\n\t\treturn;\n\t}\n\tawait awaitPendingMinimum(router, tx);\n\tif (router._tx !== tx) {\n\t\tfinishPending(router, tx);\n\t\ttransferMatchResources(router, result[1]);\n\t\tdiscardBackground(router, result);\n\t\treturn;\n\t}\n\tconst toLocation = tx[2];\n\tconst changeInfo = getLocationChangeInfo(toLocation, router.stores.resolvedLocation.get());\n\tconst background = result[2];\n\tawait router.startViewTransition(async () => {\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\ttransferMatchResources(router, result[1]);\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tawait awaitPendingMinimum(router, tx);\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\ttransferMatchResources(router, result[1]);\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tconst commit = () => {\n\t\t\tfinishPending(router, tx);\n\t\t\tcommitMatches(router, tx, result[1], resolvedPrefix);\n\t\t\tif (router._tx !== tx) return;\n\t\t\trouter.emit({\n\t\t\t\ttype: \"onLoad\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onBeforeRouteMount\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t};\n\t\tconst rendered = await router.startTransition(commit, result[1]);\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) tx[6] = void 0;\n\t\tif (router._tx !== tx) {\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tif (background?.length) runBackground(router, tx, result[1], background, result[3]).catch(console.error);\n\t\trouter.batch(() => {\n\t\t\trouter.stores.resolvedLocation.set(toLocation);\n\t\t\trouter.stores.status.set(\"idle\");\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onResolved\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (rendered && router._tx === tx) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t});\n\t\tif (router._tx !== tx) return;\n\t\trouter._commitPromise?.resolve();\n\t\trouter._commitPromise = void 0;\n\t});\n}\nasync function loadClientRoute(router, opts) {\n\tlet rematerialize = false;\n\tif (process.env.NODE_ENV !== \"production\") rematerialize = !!router._refreshNextLoad || !!router._tx?.[6];\n\tconst previousOwner = router._tx;\n\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\tconst previousLocation = resolvedLocation ?? router.stores.location.get();\n\tconst location = router.latestLocation;\n\tconst pendingLocation = router._pendingLocation;\n\tconst redirects = pendingLocation?.href === location.href ? pendingLocation._redirects ?? 0 : 0;\n\tconst handoff = router._handoff;\n\tconst hydrationController = rematerialize ? void 0 : handoff?.[0]();\n\tconst preflight = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = preflight;\n\tif (!rematerialize && !hydrationController) handoff?.[1]();\n\tpreviousPreflight?.abort();\n\tif (preflight.signal.aborted) {\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\tconst changeInfo = getLocationChangeInfo(location, resolvedLocation);\n\trouter.emit({\n\t\ttype: \"onBeforeNavigate\",\n\t\t...changeInfo\n\t});\n\tif (!preflight.signal.aborted) router.emit({\n\t\ttype: \"onBeforeLoad\",\n\t\t...changeInfo\n\t});\n\tif (preflight.signal.aborted) {\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\tconst sameHref = previousLocation.href === location.href;\n\tlet controller = preflight;\n\tconst matches = process.env.NODE_ENV !== \"production\" && rematerialize ? router.matchRoutes(location, {\n\t\t_controller: preflight,\n\t\t_rematerialize: true\n\t}) : router.matchRoutes(location, { _controller: preflight });\n\tacquireMatchResources(matches);\n\tconst resolvedPrefix = hydrationController ? handoff[1](matches) : void 0;\n\tif (resolvedPrefix) controller = hydrationController;\n\telse hydrationController?.abort();\n\tif (preflight.signal.aborted) {\n\t\ttransferMatchResources(router, matches);\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\trouter._preflight = void 0;\n\tconst tx = [\n\t\tcontroller,\n\t\tredirects,\n\t\tlocation,\n\t\tmatches,\n\t\tDate.now(),\n\t\tPromise.resolve().then(() => runClientTransaction(router, tx, sameHref, () => offerPending(router, tx), opts?.sync, resolvedPrefix)).then()\n\t];\n\tif (process.env.NODE_ENV !== \"production\" && rematerialize) {\n\t\ttx[6] = [handoff];\n\t\trouter._refreshNextLoad = void 0;\n\t}\n\trouter._tx = tx;\n\tif (previousOwner) {\n\t\tfor (const match of router.stores.matches.get()) {\n\t\t\tif (router._tx !== tx) break;\n\t\t\tif (match.isFetching) setFetching(router, match, false);\n\t\t}\n\t\tpreviousOwner[0].abort();\n\t\ttransferMatchResources(router, previousOwner[3], tx[3], true);\n\t}\n\tif (router._tx !== tx) {\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tawait awaitCurrent(router, tx);\n\t\treturn;\n\t}\n\trouter.batch(() => {\n\t\trouter.stores.status.set(\"pending\");\n\t\trouter.stores.location.set(location);\n\t});\n\tif (resolvedPrefix || !router._committed.length && !matches.some((match) => match._notFound)) offerPending(router, tx);\n\tawait tx[5];\n\tawait awaitCurrent(router, tx);\n}\nasync function refreshClientRoute(router) {\n\tconst pending = router._tx;\n\tif (pending && !pending[6] && router.stores.status.get() === \"pending\") {\n\t\tawait pending[5];\n\t\tif (router._tx !== pending) await awaitCurrent(router, pending);\n\t}\n\trouter._flights?.clear();\n\trouter.clearCache();\n\trouter._refreshNextLoad = true;\n\tawait loadClientRoute(router, { sync: true });\n}\nasync function preloadClientRoute(router, opts, redirects = 0, builtLocation) {\n\tif (process.env.NODE_ENV !== \"production\" && (router._refreshNextLoad || router._tx?.[6])) return;\n\tconst location = builtLocation ?? router.buildLocation(opts);\n\tconst base = router._committed;\n\tconst controller = new AbortController();\n\tlet matches;\n\ttry {\n\t\tmatches = router.matchRoutes(location, { _controller: controller });\n\t\tacquireMatchResources(matches);\n\t} catch (cause) {\n\t\tcontroller.abort();\n\t\tif (!isNotFound(cause)) console.error(cause);\n\t\treturn;\n\t}\n\t(router._preloads ??= /* @__PURE__ */ new Map()).set(controller, matches);\n\tlet active;\n\ttry {\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await executeClientLane(router, location, matches, [\n\t\t\t\tcontroller,\n\t\t\t\tredirects,\n\t\t\t\tbase,\n\t\t\t\ttrue\n\t\t\t]);\n\t\t} finally {\n\t\t\tactive = router._preloads.delete(controller);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tcontroller.abort();\n\t\t}\n\t\tif (!isControl(result)) return result[1];\n\t\tif (active && result[0] === REDIRECTED && !result[1].options.reloadDocument) return preloadClientRoute(router, result[1].options, redirects + 1, result[2]);\n\t} catch (cause) {\n\t\tif (!isNotFound(cause)) console.error(cause);\n\t}\n}\nasync function hydrate(router) {\n\tif (process.env.NODE_ENV !== \"production\" && !window.$_TSR) throw new Error(\"Invariant failed: Expected to find bootstrap data on window.$_TSR, but we did not. Please file an issue!\");\n\tconst tsr = window.$_TSR;\n\tconst adapters = router.options.serializationAdapters;\n\tif (adapters?.length) {\n\t\ttsr.t = new Map(adapters.map((adapter) => [adapter.key, adapter.fromSerializable]));\n\t\ttsr.buffer.forEach((script) => script());\n\t}\n\ttsr.initialized = true;\n\tconst dehydratedRouter = tsr.router;\n\tif (process.env.NODE_ENV !== \"production\" && !dehydratedRouter) throw new Error(\"Invariant failed: Expected to find a dehydrated data on window.$_TSR.router, but we did not. Please file an issue!\");\n\trouter.ssr = { manifest: dehydratedRouter.manifest };\n\trouter.options.ssr = { nonce: document.querySelector(\"meta[property=\\\"csp-nonce\\\"]\")?.content };\n\tconst dehydratedMatches = dehydratedRouter.matches;\n\tconst controller = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = controller;\n\tpreviousPreflight?.abort();\n\tconst isCurrent = () => router._preflight === controller;\n\tlet location;\n\tlet candidates;\n\tlet handoffHistoryHref;\n\tlet handoffHistoryState;\n\ttry {\n\t\tawait waitFor(router.options.hydrate?.(dehydratedRouter.dehydratedData), controller.signal);\n\t\tif (!isCurrent()) return;\n\t\tconst historyLocation = router.history.location;\n\t\thandoffHistoryHref = historyLocation.href;\n\t\thandoffHistoryState = historyLocation.state;\n\t\trouter.updateLatestLocation();\n\t\tlocation = router.latestLocation;\n\t\trouter.stores.location.set(location);\n\t\tcandidates = router.matchRoutes(location, { _controller: controller });\n\t} catch (cause) {\n\t\tif (isCurrent()) router._preflight = void 0;\n\t\tcontroller.abort(cause);\n\t\tif (cause !== controller.signal) throw cause;\n\t}\n\tif (!isCurrent()) return;\n\tconst committed = [];\n\tlet pendingBoundary;\n\tlet verifiedAssetEnd = 0;\n\tconst retryFrom = (index) => {\n\t\tverifiedAssetEnd = Math.min(verifiedAssetEnd, index + 1);\n\t\tconst removed = committed.splice(index);\n\t\tfor (const match of removed) if (getRoute(router, match).options.loader && (match.status === \"success\" || !match.invalid && \"loaderData\" in match)) cacheLoaderMatch(router, {\n\t\t\t...match,\n\t\t\tstatus: \"success\",\n\t\t\terror: void 0,\n\t\t\tpreload: true\n\t\t}, router._cache.get(match.id));\n\t\ttransferMatchResources(router, removed);\n\t};\n\tconst shared = dehydratedMatches.length > candidates.length ? candidates.findIndex((match) => match._notFound) + 1 : dehydratedMatches.length;\n\tlet isTerminal = false;\n\tfor (let index = 0; index < shared; index++) {\n\t\tconst candidate = candidates[index];\n\t\tconst dehydrated = dehydratedMatches[index];\n\t\tif (typeof dehydrated.i !== \"string\" || hydrateSsrMatchId(dehydrated.i) !== candidate.id) {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tverifiedAssetEnd = index + 1;\n\t\tconst route = getRoute(router, candidate);\n\t\tif (\"l\" in dehydrated || dehydrated.s === \"success\" && dehydrated.e === void 0 && route.options.loader) candidate.loaderData = dehydrated.l;\n\t\tcandidate.status = dehydrated.s;\n\t\tcandidate.ssr = dehydrated.ssr;\n\t\troute.options.ssr = candidate.ssr;\n\t\tcandidate.updatedAt = dehydrated.u;\n\t\tcandidate.error = dehydrated.e;\n\t\tcandidate._notFound ||= dehydrated.g;\n\t\tif (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound) {\n\t\t\tisTerminal = true;\n\t\t\tcommitted.push(candidate);\n\t\t\tif (candidate.ssr === false || candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tif (candidate.status === \"pending\") {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tcommitted.push(candidate);\n\t\tif (candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t}\n\tif (!isTerminal && committed.length === shared && shared < candidates.length) pendingBoundary = shared;\n\tconst chunks = committed.map(async (match) => {\n\t\ttry {\n\t\t\tconst route = getRoute(router, match);\n\t\t\tif (match._notFound) await Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]);\n\t\t\telse await loadRouteChunk(route, match.status === \"error\" ? \"errorComponent\" : match.status === \"notFound\" ? \"notFoundComponent\" : void 0);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t});\n\tlet chunkFailure = 0;\n\ttry {\n\t\twhile (chunkFailure < chunks.length && await waitFor(chunks[chunkFailure], controller.signal)) chunkFailure++;\n\t} catch {\n\t\treturn;\n\t}\n\tif (!isCurrent()) return;\n\tif (chunkFailure < committed.length) retryFrom(chunkFailure);\n\tconst contextEnd = Math.max(pendingBoundary === committed.length ? committed.length + 1 : committed.length, chunkFailure < chunks.length ? chunkFailure : verifiedAssetEnd);\n\tfor (let index = 0; index < contextEnd; index++) {\n\t\tconst match = candidates[index];\n\t\tconst route = getRoute(router, match);\n\t\tconst parentContext = candidates[index - 1]?.context ?? router.options.context ?? {};\n\t\tlet routeContext;\n\t\tif (route.options.context) {\n\t\t\ttry {\n\t\t\t\trouteContext = match._ctx = route.options.context({\n\t\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\t\tparams: match.params,\n\t\t\t\t\tcontext: parentContext,\n\t\t\t\t\tlocation,\n\t\t\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t\t\t...opts,\n\t\t\t\t\t\t_fromLocation: location\n\t\t\t\t\t}),\n\t\t\t\t\tbuildLocation: router.buildLocation,\n\t\t\t\t\tcause: match.cause,\n\t\t\t\t\tabortController: controller,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tmatches: candidates,\n\t\t\t\t\trouteId: route.id\n\t\t\t\t}) || {};\n\t\t\t} catch {\n\t\t\t\tif (!isCurrent()) return;\n\t\t\t\tif (match.status !== \"error\" && match.status !== \"notFound\" && !match._notFound) {\n\t\t\t\t\tretryFrom(index);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isCurrent()) return;\n\t\t}\n\t\tmatch.context = {\n\t\t\t...parentContext,\n\t\t\t...routeContext,\n\t\t\t...committed[index] && dehydratedMatches[index].b\n\t\t};\n\t}\n\tawait projectLane(router, [location, candidates], controller.signal, 0, verifiedAssetEnd);\n\tif (!isCurrent()) return;\n\tconst needsClientLoad = pendingBoundary !== void 0 || committed.length < shared;\n\tconst committedMatches = isTerminal && committed.length === shared ? candidates : committed;\n\tlet presented = needsClientLoad ? candidates : committedMatches;\n\tlet dataOnlyAssetEnd;\n\tif (needsClientLoad && pendingBoundary !== void 0) {\n\t\tconst boundary = presented[pendingBoundary];\n\t\tdataOnlyAssetEnd = boundary.ssr === \"data-only\" && verifiedAssetEnd > pendingBoundary + 1 ? verifiedAssetEnd : void 0;\n\t\tpresented = presented.slice();\n\t\tpresented[pendingBoundary] = {\n\t\t\t...boundary,\n\t\t\tstatus: \"pending\",\n\t\t\tssr: boundary.ssr === \"data-only\" ? \"data-only\" : false,\n\t\t\t_assetEnd: dataOnlyAssetEnd\n\t\t};\n\t}\n\tconst claim = () => {\n\t\tconst historyLocation = router.history.location;\n\t\treturn needsClientLoad && !router._tx && historyLocation.href === handoffHistoryHref && historyLocation.state === handoffHistoryState && router._committed === committedMatches && committedMatches.length && !controller.signal.aborted ? controller : void 0;\n\t};\n\tconst handoff = [claim, (matches) => {\n\t\tif (router._handoff !== handoff) return;\n\t\trouter._handoff = void 0;\n\t\tconst prefix = committedMatches.length;\n\t\tif (!matches || !claim() || committedMatches.some((match, index) => match.id !== matches[index]?.id)) {\n\t\t\tcontroller.abort();\n\t\t\treturn;\n\t\t}\n\t\tlet handoffAssetEnd = dataOnlyAssetEnd;\n\t\tif (handoffAssetEnd !== void 0) {\n\t\t\tfor (let index = prefix; index < handoffAssetEnd; index++) if (candidates[index]?.id !== matches[index]?.id) {\n\t\t\t\thandoffAssetEnd = index > pendingBoundary + 1 ? index : void 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst clones = committedMatches.map((match) => ({ ...match }));\n\t\tif (handoffAssetEnd !== void 0) clones[pendingBoundary]._assetEnd = handoffAssetEnd;\n\t\ttransferMatchResources(router, matches.splice(0, prefix, ...clones));\n\t\tfor (let index = prefix; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tconst hydrated = candidates[index];\n\t\t\tif (hydrated?.id === match.id && hydrated._ctx) match._ctx = hydrated._ctx;\n\t\t\tmatch.abortController = controller;\n\t\t}\n\t\treturn prefix;\n\t}];\n\trouter._committed = committedMatches;\n\trouter._handoff = handoff;\n\trouter._preflight = void 0;\n\trouter.batch(() => {\n\t\trouter.stores.setMatches(presented);\n\t\trouter.stores.status.set(\"idle\");\n\t\tif (!needsClientLoad) router.stores.resolvedLocation.set(router.stores.location.get());\n\t});\n}\n//#endregion\nexport { _getAssetMatches, _getRenderedMatches, hydrate, loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk };\n\n//# sourceMappingURL=load-client.js.map","import { defaultSerializeError } from \"./router.js\";\n//#region src/defer.ts\n/**\n* Well-known symbol used by {@link defer} to tag a promise with\n* its deferred state. Consumers can read `promise[TSR_DEFERRED_PROMISE]`\n* to access `status`, `data`, or `error`.\n*/\nconst TSR_DEFERRED_PROMISE = Symbol.for(\"TSR_DEFERRED_PROMISE\");\n/**\n* Wrap a promise with a deferred state for use with `<Await>` and `useAwaited`.\n*\n* The returned promise is augmented with internal state (status/data/error)\n* so UI can read progress or suspend until it settles.\n*\n* @param _promise The promise to wrap.\n* @param options Optional config. Provide `serializeError` to customize how\n* errors are serialized for transfer.\n* @returns The same promise with attached deferred metadata.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/deferFunction\n*/\nfunction defer(_promise, options) {\n\tconst promise = _promise;\n\tif (promise[TSR_DEFERRED_PROMISE]) return promise;\n\tpromise[TSR_DEFERRED_PROMISE] = { status: \"pending\" };\n\tpromise.then((data) => {\n\t\tpromise[TSR_DEFERRED_PROMISE].status = \"success\";\n\t\tpromise[TSR_DEFERRED_PROMISE].data = data;\n\t}).catch((error) => {\n\t\tpromise[TSR_DEFERRED_PROMISE].status = \"error\";\n\t\tpromise[TSR_DEFERRED_PROMISE].error = {\n\t\t\tdata: (options?.serializeError ?? defaultSerializeError)(error),\n\t\t\t__isServerError: true\n\t\t};\n\t});\n\treturn promise;\n}\n//#endregion\nexport { TSR_DEFERRED_PROMISE, defer };\n\n//# sourceMappingURL=defer.js.map","//#region src/link.ts\nconst preloadWarning = \"Error preloading route! ☝️\";\n//#endregion\nexport { preloadWarning };\n\n//# sourceMappingURL=link.js.map","//#region src/manifest.ts\nconst DEV_STYLES_ATTR = \"data-tanstack-router-dev-styles\";\nfunction getAssetCrossOrigin(assetCrossOrigin, kind) {\n\tif (!assetCrossOrigin) return;\n\tif (typeof assetCrossOrigin === \"string\") return assetCrossOrigin;\n\treturn assetCrossOrigin[kind];\n}\nfunction getManifestScriptFormat(manifest) {\n\treturn manifest?.scriptFormat ?? \"module\";\n}\nfunction getScriptPreloadAttrs(manifest, link, assetCrossOrigin) {\n\tconst preloadLink = resolveManifestAssetLink(link);\n\tconst crossOrigin = getAssetCrossOrigin(assetCrossOrigin, \"script\") ?? preloadLink.crossOrigin;\n\treturn {\n\t\t...getManifestScriptFormat(manifest) === \"iife\" ? {\n\t\t\trel: \"preload\",\n\t\t\tas: \"script\"\n\t\t} : { rel: \"modulepreload\" },\n\t\thref: preloadLink.href,\n\t\t...crossOrigin ? { crossOrigin } : {}\n\t};\n}\nfunction resolveManifestAssetLink(link) {\n\tif (typeof link === \"string\") return {\n\t\thref: link,\n\t\tcrossOrigin: void 0\n\t};\n\treturn link;\n}\nfunction appendUniqueUserTags(target, tags) {\n\tif (tags.length === 0) return;\n\tif (tags.length === 1) {\n\t\ttarget.push(tags[0]);\n\t\treturn;\n\t}\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const tag of tags) {\n\t\tconst key = JSON.stringify(tag);\n\t\tif (seen.has(key)) continue;\n\t\tseen.add(key);\n\t\ttarget.push(tag);\n\t}\n}\nfunction getStylesheetHref(asset) {\n\treturn resolveManifestCssLink(asset).href;\n}\nfunction resolveManifestCssLink(link) {\n\tif (typeof link === \"string\") return {\n\t\thref: link,\n\t\tcrossOrigin: void 0\n\t};\n\treturn link;\n}\nfunction createInlineCssStyleAsset(css) {\n\treturn {\n\t\tattrs: { suppressHydrationWarning: true },\n\t\tchildren: css\n\t};\n}\nfunction createInlineCssPlaceholderAsset() {\n\treturn { attrs: { suppressHydrationWarning: true } };\n}\n//#endregion\nexport { DEV_STYLES_ATTR, appendUniqueUserTags, createInlineCssPlaceholderAsset, createInlineCssStyleAsset, getAssetCrossOrigin, getManifestScriptFormat, getScriptPreloadAttrs, getStylesheetHref, resolveManifestAssetLink, resolveManifestCssLink };\n\n//# sourceMappingURL=manifest.js.map","import { invariant } from \"./invariant.js\";\nimport { joinPaths, trimPathLeft, trimPathRight } from \"./path.js\";\nimport { notFound } from \"./not-found.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { redirect } from \"./redirect.js\";\n//#region src/route.ts\nvar BaseRoute = class {\n\tget to() {\n\t\treturn this._to;\n\t}\n\tget id() {\n\t\treturn this._id;\n\t}\n\tget path() {\n\t\treturn this._path;\n\t}\n\tget fullPath() {\n\t\treturn this._fullPath;\n\t}\n\tconstructor(options) {\n\t\tthis.init = (opts) => {\n\t\t\tthis.originalIndex = opts.originalIndex;\n\t\t\tconst options = this.options;\n\t\t\tconst isRoot = !options?.path && !options?.id;\n\t\t\tthis.parentRoute = this.options.getParentRoute?.();\n\t\t\tif (isRoot) this._path = rootRouteId;\n\t\t\telse if (!this.parentRoute) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\tlet path = isRoot ? rootRouteId : options?.path;\n\t\t\tif (path && path !== \"/\") path = trimPathLeft(path);\n\t\t\tconst customId = options?.id || path;\n\t\t\tlet id = isRoot ? rootRouteId : joinPaths([this.parentRoute.id === \"__root__\" ? \"\" : this.parentRoute.id, customId]);\n\t\t\tif (path === \"__root__\") path = \"/\";\n\t\t\tif (id !== \"__root__\") id = joinPaths([\"/\", id]);\n\t\t\tconst fullPath = id === \"__root__\" ? \"/\" : joinPaths([this.parentRoute.fullPath, path]);\n\t\t\tthis._path = path;\n\t\t\tthis._id = id;\n\t\t\tthis._fullPath = fullPath;\n\t\t\tthis._to = trimPathRight(fullPath);\n\t\t};\n\t\tthis.addChildren = (children) => {\n\t\t\treturn this._addFileChildren(children);\n\t\t};\n\t\tthis._addFileChildren = (children) => {\n\t\t\tif (Array.isArray(children)) this.children = children;\n\t\t\tif (typeof children === \"object\" && children !== null) this.children = Object.values(children);\n\t\t\treturn this;\n\t\t};\n\t\tthis._addFileTypes = () => {\n\t\t\treturn this;\n\t\t};\n\t\tthis.updateLoader = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.update = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.lazy = (lazyFn) => {\n\t\t\tthis.lazyFn = lazyFn;\n\t\t\treturn this;\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.fullPath,\n\t\t\t...opts\n\t\t});\n\t\tthis.options = options || {};\n\t\tthis.isRoot = !options?.getParentRoute;\n\t\tif (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);\n\t}\n};\nvar BaseRouteApi = class {\n\tconstructor({ id }) {\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.id,\n\t\t\t...opts\n\t\t});\n\t\tthis.id = id;\n\t}\n};\nvar BaseRootRoute = class extends BaseRoute {\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n};\n//#endregion\nexport { BaseRootRoute, BaseRoute, BaseRouteApi };\n\n//# sourceMappingURL=route.js.map","import { reactUse } from \"./utils.js\";\nimport { TSR_DEFERRED_PROMISE, defer } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/awaited.tsx\n/** Suspend until a deferred promise resolves or rejects and return its data. */\nfunction useAwaited({ promise: _promise }) {\n\tif (reactUse) return reactUse(_promise);\n\tconst promise = defer(_promise);\n\tif (promise[TSR_DEFERRED_PROMISE].status === \"pending\") throw promise;\n\tif (promise[TSR_DEFERRED_PROMISE].status === \"error\") throw promise[TSR_DEFERRED_PROMISE].error;\n\treturn promise[TSR_DEFERRED_PROMISE].data;\n}\n/**\n* Component that suspends on a deferred promise and renders its child with\n* the resolved value. Optionally provides a Suspense fallback.\n*/\nfunction Await(props) {\n\tconst inner = /* @__PURE__ */ jsx(AwaitInner, { ...props });\n\tif (props.fallback) return /* @__PURE__ */ jsx(React$1.Suspense, {\n\t\tfallback: props.fallback,\n\t\tchildren: inner\n\t});\n\treturn inner;\n}\nfunction AwaitInner(props) {\n\tconst data = useAwaited(props);\n\treturn props.children(data);\n}\n//#endregion\nexport { Await, useAwaited };\n\n//# sourceMappingURL=awaited.js.map","\"use client\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/nonRouteComponentContext.tsx\nvar nonRouteComponentContext = process.env.NODE_ENV !== \"production\" ? React$1.createContext(void 0) : void 0;\nfunction wrapInNonRouteComponentContext(element, component) {\n\treturn /* @__PURE__ */ jsx(nonRouteComponentContext.Provider, {\n\t\tvalue: component,\n\t\tchildren: element\n\t});\n}\n//#endregion\nexport { nonRouteComponentContext, wrapInNonRouteComponentContext };\n\n//# sourceMappingURL=nonRouteComponentContext.js.map","\"use client\";\nimport { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport * as React$1 from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n//#region src/CatchBoundary.tsx\nvar CatchBoundary = class extends React$1.Component {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\tthis.state = { error: null };\n\t\tthis.reset = () => {\n\t\t\tthis.setState({ error: null });\n\t\t};\n\t}\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tconst resetKey = props.getResetKey();\n\t\tif (state.error && state.resetKey !== resetKey) return {\n\t\t\tresetKey,\n\t\t\terror: null\n\t\t};\n\t\treturn { resetKey };\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tthis.props.onCatch?.(error, errorInfo);\n\t}\n\trender() {\n\t\tconst error = this.state.error;\n\t\tif (error) {\n\t\t\tconst element = React$1.createElement(this.props.errorComponent ?? ErrorComponent, {\n\t\t\t\terror,\n\t\t\t\treset: this.reset\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(element, \"errorComponent\") : element;\n\t\t}\n\t\treturn this.props.children;\n\t}\n};\nfunction ErrorComponent({ error }) {\n\tconst [show, setShow] = React$1.useState(process.env.NODE_ENV !== \"production\");\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tstyle: {\n\t\t\tpadding: \".5rem\",\n\t\t\tmaxWidth: \"100%\"\n\t\t},\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\tgap: \".5rem\"\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"strong\", {\n\t\t\t\t\tstyle: { fontSize: \"1rem\" },\n\t\t\t\t\tchildren: \"Something went wrong!\"\n\t\t\t\t}), /* @__PURE__ */ jsx(\"button\", {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tappearance: \"none\",\n\t\t\t\t\t\tfontSize: \".6em\",\n\t\t\t\t\t\tborder: \"1px solid currentColor\",\n\t\t\t\t\t\tpadding: \".1rem .2rem\",\n\t\t\t\t\t\tfontWeight: \"bold\",\n\t\t\t\t\t\tborderRadius: \".25rem\"\n\t\t\t\t\t},\n\t\t\t\t\tonClick: () => setShow((d) => !d),\n\t\t\t\t\tchildren: show ? \"Hide Error\" : \"Show Error\"\n\t\t\t\t})]\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"div\", { style: { height: \".25rem\" } }),\n\t\t\tshow ? /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(\"pre\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tfontSize: \".7em\",\n\t\t\t\t\tborder: \"1px solid red\",\n\t\t\t\t\tborderRadius: \".25rem\",\n\t\t\t\t\tpadding: \".3rem\",\n\t\t\t\t\tcolor: \"red\",\n\t\t\t\t\toverflow: \"auto\"\n\t\t\t\t},\n\t\t\t\tchildren: error.message ? /* @__PURE__ */ jsx(\"code\", { children: error.message }) : null\n\t\t\t}) }) : null\n\t\t]\n\t});\n}\n//#endregion\nexport { CatchBoundary, ErrorComponent };\n\n//# sourceMappingURL=CatchBoundary.js.map","\"use client\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ClientOnly.tsx\n/**\n* Render the children only after the JS has loaded client-side. Use an optional\n* fallback component if the JS is not yet loaded.\n*\n* @example\n* Render a Chart component if JS loads, renders a simple FakeChart\n* component server-side or if there is no JS. The FakeChart can have only the\n* UI without the behavior or be a loading spinner or skeleton.\n*\n* ```tsx\n* return (\n* <ClientOnly fallback={<FakeChart />}>\n* <Chart />\n* </ClientOnly>\n* )\n* ```\n*/\nfunction ClientOnly({ children, fallback = null }) {\n\treturn /* @__PURE__ */ jsx(React.Fragment, { children: useHydrated() ? children : fallback });\n}\n/**\n* Return a boolean indicating if the JS has been hydrated already.\n* When doing Server-Side Rendering, the result will always be false.\n* When doing Client-Side Rendering, the result will always be false on the\n* first render and true from then on. Even if a new component renders it will\n* always start with true.\n*\n* @example\n* ```tsx\n* // Disable a button that needs JS to work.\n* let hydrated = useHydrated()\n* return (\n* <button type=\"button\" disabled={!hydrated} onClick={doSomethingCustom}>\n* Click me\n* </button>\n* )\n* ```\n* @returns True if the JS has been hydrated already, false otherwise.\n*/\nfunction useHydrated() {\n\treturn React.useSyncExternalStore(subscribe, () => true, () => false);\n}\nfunction subscribe() {\n\treturn () => {};\n}\n//#endregion\nexport { ClientOnly, useHydrated };\n\n//# sourceMappingURL=ClientOnly.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/routerContext.tsx\nvar routerContext = React$1.createContext(null);\n//#endregion\nexport { routerContext };\n\n//# sourceMappingURL=routerContext.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport * as React$1 from \"react\";\n//#region src/useRouter.tsx\n/**\n* Access the current TanStack Router instance from React context.\n* Must be used within a `RouterProvider`.\n*\n* Options:\n* - `warn`: Log a warning if no router context is found (default: true).\n*\n* @returns The registered router instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterHook\n*/\nfunction useRouter(opts) {\n\tconst value = React$1.useContext(routerContext);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif ((opts?.warn ?? true) && !value) console.warn(\"Warning: useRouter must be used inside a <RouterProvider> component!\");\n\t}\n\treturn value;\n}\n//#endregion\nexport { useRouter };\n\n//# sourceMappingURL=useRouter.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/matchContext.tsx\nvar matchContext = React$1.createContext(void 0);\nvar dummyMatchContext = React$1.createContext(void 0);\n//#endregion\nexport { dummyMatchContext, matchContext };\n\n//# sourceMappingURL=matchContext.js.map","var ReactiveFlags = /* @__PURE__ */ ((ReactiveFlags2) => {\n ReactiveFlags2[ReactiveFlags2[\"None\"] = 0] = \"None\";\n ReactiveFlags2[ReactiveFlags2[\"Mutable\"] = 1] = \"Mutable\";\n ReactiveFlags2[ReactiveFlags2[\"Watching\"] = 2] = \"Watching\";\n ReactiveFlags2[ReactiveFlags2[\"RecursedCheck\"] = 4] = \"RecursedCheck\";\n ReactiveFlags2[ReactiveFlags2[\"Recursed\"] = 8] = \"Recursed\";\n ReactiveFlags2[ReactiveFlags2[\"Dirty\"] = 16] = \"Dirty\";\n ReactiveFlags2[ReactiveFlags2[\"Pending\"] = 32] = \"Pending\";\n return ReactiveFlags2;\n})(ReactiveFlags || {});\n// @__NO_SIDE_EFFECTS__\nfunction createReactiveSystem({\n update,\n notify,\n unwatched\n}) {\n return {\n link,\n unlink,\n propagate,\n checkDirty,\n shallowPropagate\n };\n function link(dep, sub, version) {\n const prevDep = sub.depsTail;\n if (prevDep !== void 0 && prevDep.dep === dep) {\n return;\n }\n const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;\n if (nextDep !== void 0 && nextDep.dep === dep) {\n nextDep.version = version;\n sub.depsTail = nextDep;\n return;\n }\n const prevSub = dep.subsTail;\n if (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) {\n return;\n }\n const newLink = sub.depsTail = dep.subsTail = {\n version,\n dep,\n sub,\n prevDep,\n nextDep,\n prevSub,\n nextSub: void 0\n };\n if (nextDep !== void 0) {\n nextDep.prevDep = newLink;\n }\n if (prevDep !== void 0) {\n prevDep.nextDep = newLink;\n } else {\n sub.deps = newLink;\n }\n if (prevSub !== void 0) {\n prevSub.nextSub = newLink;\n } else {\n dep.subs = newLink;\n }\n }\n function unlink(link2, sub = link2.sub) {\n const dep = link2.dep;\n const prevDep = link2.prevDep;\n const nextDep = link2.nextDep;\n const nextSub = link2.nextSub;\n const prevSub = link2.prevSub;\n if (nextDep !== void 0) {\n nextDep.prevDep = prevDep;\n } else {\n sub.depsTail = prevDep;\n }\n if (prevDep !== void 0) {\n prevDep.nextDep = nextDep;\n } else {\n sub.deps = nextDep;\n }\n if (nextSub !== void 0) {\n nextSub.prevSub = prevSub;\n } else {\n dep.subsTail = prevSub;\n }\n if (prevSub !== void 0) {\n prevSub.nextSub = nextSub;\n } else if ((dep.subs = nextSub) === void 0) {\n unwatched(dep);\n }\n return nextDep;\n }\n function propagate(link2) {\n let next = link2.nextSub;\n let stack;\n top: do {\n const sub = link2.sub;\n let flags = sub.flags;\n if (!(flags & (4 | 8 | 16 | 32))) {\n sub.flags = flags | 32;\n } else if (!(flags & (4 | 8))) {\n flags = 0;\n } else if (!(flags & 4)) {\n sub.flags = flags & -9 | 32;\n } else if (!(flags & (16 | 32)) && isValidLink(link2, sub)) {\n sub.flags = flags | (8 | 32);\n flags &= 1;\n } else {\n flags = 0;\n }\n if (flags & 2) {\n notify(sub);\n }\n if (flags & 1) {\n const subSubs = sub.subs;\n if (subSubs !== void 0) {\n const nextSub = (link2 = subSubs).nextSub;\n if (nextSub !== void 0) {\n stack = { value: next, prev: stack };\n next = nextSub;\n }\n continue;\n }\n }\n if ((link2 = next) !== void 0) {\n next = link2.nextSub;\n continue;\n }\n while (stack !== void 0) {\n link2 = stack.value;\n stack = stack.prev;\n if (link2 !== void 0) {\n next = link2.nextSub;\n continue top;\n }\n }\n break;\n } while (true);\n }\n function checkDirty(link2, sub) {\n let stack;\n let checkDepth = 0;\n let dirty = false;\n top: do {\n const dep = link2.dep;\n const flags = dep.flags;\n if (sub.flags & 16) {\n dirty = true;\n } else if ((flags & (1 | 16)) === (1 | 16)) {\n if (update(dep)) {\n const subs = dep.subs;\n if (subs.nextSub !== void 0) {\n shallowPropagate(subs);\n }\n dirty = true;\n }\n } else if ((flags & (1 | 32)) === (1 | 32)) {\n if (link2.nextSub !== void 0 || link2.prevSub !== void 0) {\n stack = { value: link2, prev: stack };\n }\n link2 = dep.deps;\n sub = dep;\n ++checkDepth;\n continue;\n }\n if (!dirty) {\n const nextDep = link2.nextDep;\n if (nextDep !== void 0) {\n link2 = nextDep;\n continue;\n }\n }\n while (checkDepth--) {\n const firstSub = sub.subs;\n const hasMultipleSubs = firstSub.nextSub !== void 0;\n if (hasMultipleSubs) {\n link2 = stack.value;\n stack = stack.prev;\n } else {\n link2 = firstSub;\n }\n if (dirty) {\n if (update(sub)) {\n if (hasMultipleSubs) {\n shallowPropagate(firstSub);\n }\n sub = link2.sub;\n continue;\n }\n dirty = false;\n } else {\n sub.flags &= -33;\n }\n sub = link2.sub;\n const nextDep = link2.nextDep;\n if (nextDep !== void 0) {\n link2 = nextDep;\n continue top;\n }\n }\n return dirty;\n } while (true);\n }\n function shallowPropagate(link2) {\n do {\n const sub = link2.sub;\n const flags = sub.flags;\n if ((flags & (32 | 16)) === 32) {\n sub.flags = flags | 16;\n if ((flags & (2 | 4)) === 2) {\n notify(sub);\n }\n }\n } while ((link2 = link2.nextSub) !== void 0);\n }\n function isValidLink(checkLink, sub) {\n let link2 = sub.depsTail;\n while (link2 !== void 0) {\n if (link2 === checkLink) {\n return true;\n }\n link2 = link2.prevDep;\n }\n return false;\n }\n}\nexport {\n ReactiveFlags,\n createReactiveSystem\n};\n//# sourceMappingURL=alien.js.map\n","import { createReactiveSystem, ReactiveFlags } from \"./alien.js\";\nfunction toObserver(nextHandler, errorHandler, completionHandler) {\n const isObserver = typeof nextHandler === \"object\";\n const self = isObserver ? nextHandler : void 0;\n return {\n next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),\n error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),\n complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(\n self\n )\n };\n}\nconst queuedEffects = [];\nlet cycle = 0;\nconst { link, unlink, propagate, checkDirty, shallowPropagate } = createReactiveSystem({\n update(atom) {\n return atom._update();\n },\n // eslint-disable-next-line no-shadow\n notify(effect2) {\n queuedEffects[queuedEffectsLength++] = effect2;\n effect2.flags &= ~ReactiveFlags.Watching;\n },\n unwatched(atom) {\n if (atom.depsTail !== void 0) {\n atom.depsTail = void 0;\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;\n purgeDeps(atom);\n }\n }\n});\nlet notifyIndex = 0;\nlet queuedEffectsLength = 0;\nlet activeSub;\nlet batchDepth = 0;\nfunction batch(fn) {\n try {\n ++batchDepth;\n fn();\n } finally {\n if (!--batchDepth) {\n flush();\n }\n }\n}\nfunction purgeDeps(sub) {\n const depsTail = sub.depsTail;\n let dep = depsTail !== void 0 ? depsTail.nextDep : sub.deps;\n while (dep !== void 0) {\n dep = unlink(dep, sub);\n }\n}\nfunction flush() {\n if (batchDepth > 0) {\n return;\n }\n while (notifyIndex < queuedEffectsLength) {\n const effect2 = queuedEffects[notifyIndex];\n queuedEffects[notifyIndex++] = void 0;\n effect2.notify();\n }\n notifyIndex = 0;\n queuedEffectsLength = 0;\n}\nfunction createAsyncAtom(getValue, options) {\n const ref = {};\n const atom = createAtom(() => {\n getValue().then(\n (data) => {\n const internalAtom = ref.current;\n if (internalAtom._update({ status: \"done\", data })) {\n const subs = internalAtom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n },\n (error) => {\n const internalAtom = ref.current;\n if (internalAtom._update({ status: \"error\", error })) {\n const subs = internalAtom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n }\n );\n return { status: \"pending\" };\n }, options);\n ref.current = atom;\n return atom;\n}\nfunction createAtom(valueOrFn, options) {\n const isComputed = typeof valueOrFn === \"function\";\n const getter = valueOrFn;\n const atom = {\n _snapshot: isComputed ? void 0 : valueOrFn,\n subs: void 0,\n subsTail: void 0,\n deps: void 0,\n depsTail: void 0,\n flags: isComputed ? ReactiveFlags.None : ReactiveFlags.Mutable,\n get() {\n if (activeSub !== void 0) {\n link(atom, activeSub, cycle);\n }\n return atom._snapshot;\n },\n subscribe(observerOrFn) {\n const obs = toObserver(observerOrFn);\n const observed = { current: false };\n const e = effect(() => {\n atom.get();\n if (!observed.current) {\n observed.current = true;\n } else {\n obs.next?.(atom._snapshot);\n }\n });\n return {\n unsubscribe: () => {\n e.stop();\n }\n };\n },\n _update(getValue) {\n const prevSub = activeSub;\n const compare = options?.compare ?? Object.is;\n if (isComputed) {\n activeSub = atom;\n ++cycle;\n atom.depsTail = void 0;\n } else if (getValue === void 0) {\n return false;\n }\n if (isComputed) {\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck;\n }\n try {\n const oldValue = atom._snapshot;\n const newValue = typeof getValue === \"function\" ? getValue(oldValue) : getValue === void 0 && isComputed ? getter(oldValue) : getValue;\n if (oldValue === void 0 || !compare(oldValue, newValue)) {\n atom._snapshot = newValue;\n return true;\n }\n return false;\n } finally {\n activeSub = prevSub;\n if (isComputed) {\n atom.flags &= ~ReactiveFlags.RecursedCheck;\n }\n purgeDeps(atom);\n }\n }\n };\n if (isComputed) {\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;\n atom.get = function() {\n const flags = atom.flags;\n if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(atom.deps, atom)) {\n if (atom._update()) {\n const subs = atom.subs;\n if (subs !== void 0) {\n shallowPropagate(subs);\n }\n }\n } else if (flags & ReactiveFlags.Pending) {\n atom.flags = flags & ~ReactiveFlags.Pending;\n }\n if (activeSub !== void 0) {\n link(atom, activeSub, cycle);\n }\n return atom._snapshot;\n };\n } else {\n atom.set = function(valueOrFn2) {\n if (atom._update(valueOrFn2)) {\n const subs = atom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n };\n }\n return atom;\n}\nfunction effect(fn) {\n const run = () => {\n const prevSub = activeSub;\n activeSub = effectObj;\n ++cycle;\n effectObj.depsTail = void 0;\n effectObj.flags = ReactiveFlags.Watching | ReactiveFlags.RecursedCheck;\n try {\n return fn();\n } finally {\n activeSub = prevSub;\n effectObj.flags &= ~ReactiveFlags.RecursedCheck;\n purgeDeps(effectObj);\n }\n };\n const effectObj = {\n deps: void 0,\n depsTail: void 0,\n subs: void 0,\n subsTail: void 0,\n flags: ReactiveFlags.Watching | ReactiveFlags.RecursedCheck,\n notify() {\n const flags = this.flags;\n if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(this.deps, this)) {\n run();\n } else {\n this.flags = ReactiveFlags.Watching;\n }\n },\n stop() {\n this.flags = ReactiveFlags.None;\n this.depsTail = void 0;\n purgeDeps(this);\n }\n };\n run();\n return effectObj;\n}\nexport {\n batch,\n createAsyncAtom,\n createAtom,\n flush,\n toObserver\n};\n//# sourceMappingURL=atom.js.map\n","import { useCallback } from \"react\";\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/shim/with-selector\";\nfunction defaultCompare(a, b) {\n return a === b;\n}\nfunction useStore(atom, selector, compare = defaultCompare) {\n const subscribe = useCallback(\n (handleStoreChange) => {\n if (!atom) {\n return () => {\n };\n }\n const { unsubscribe } = atom.subscribe(handleStoreChange);\n return unsubscribe;\n },\n [atom]\n );\n const boundGetSnapshot = useCallback(() => atom?.get(), [atom]);\n const selectedSnapshot = useSyncExternalStoreWithSelector(\n subscribe,\n boundGetSnapshot,\n boundGetSnapshot,\n selector,\n compare\n );\n return selectedSnapshot;\n}\nexport {\n useStore\n};\n//# sourceMappingURL=useStore.js.map\n","\"use client\";\nimport { dummyMatchContext, matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { invariant, replaceEqualDeep } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useMatch.tsx\nvar dummyMatch = {};\nfunction useStructuralSharing(opts, router) {\n\tconst previousResult = React$1.useRef();\n\treturn (slice) => {\n\t\tconst selected = opts?.select ? opts.select(slice) : slice;\n\t\tif (opts?.structuralSharing ?? router.options.defaultStructuralSharing) return previousResult.current = replaceEqualDeep(previousResult.current, selected);\n\t\treturn selected;\n\t};\n}\n/**\n* Read and select the nearest or targeted route match.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook\n*/\nfunction useMatch(opts) {\n\tconst router = useRouter();\n\tconst nearestRouteId = React$1.useContext(opts.from ? dummyMatchContext : matchContext);\n\tconst routeId = opts.from ?? nearestRouteId;\n\tconst matchStore = router.stores.getMatchStore(routeId);\n\tif (isServer ?? router.isServer) {\n\t\tconst match = matchStore.get();\n\t\tif (!match) {\n\t\t\tif (opts.shouldThrow ?? true) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn opts.select ? opts.select(match) : match;\n\t}\n\tconst selector = useStructuralSharing(opts, router);\n\tconst matchSelection = useStore(matchStore, (match) => match ? selector(match) : dummyMatch);\n\tif (matchSelection !== dummyMatch) return matchSelection;\n\tif (opts.shouldThrow ?? true) {\n\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\tinvariant();\n\t}\n}\n//#endregion\nexport { useMatch, useStructuralSharing };\n\n//# sourceMappingURL=useMatch.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderData.tsx\n/**\n* Read and select the current route's loader data with type‑safety.\n*\n* Options:\n* - `from`/`strict`: Choose which route's data to read and strictness\n* - `select`: Map the loader data to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader data (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook\n*/\nfunction useLoaderData(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.loaderData) : match.loaderData;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderData };\n\n//# sourceMappingURL=useLoaderData.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderDeps.tsx\n/**\n* Read and select the current route's loader dependencies object.\n*\n* Options:\n* - `from`: Choose which route's loader deps to read\n* - `select`: Map the deps to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader deps (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook\n*/\nfunction useLoaderDeps(opts) {\n\tconst { select, ...rest } = opts;\n\treturn useMatch({\n\t\t...rest,\n\t\tselect: (match) => {\n\t\t\treturn select ? select(match.loaderDeps) : match.loaderDeps;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderDeps };\n\n//# sourceMappingURL=useLoaderDeps.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useParams.tsx\n/**\n* Access the current route's path parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Specify the matched route and whether to enforce strict typing\n* - `select`: Project the params object to a derived value for memoized renders\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw if the route is not found in strict contexts\n*\n* @returns The params object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook\n*/\nfunction useParams(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tstrict: opts.strict,\n\t\tselect: (match) => {\n\t\t\tconst params = opts.strict === false ? match.params : match._strictParams;\n\t\t\treturn opts.select ? opts.select(params) : params;\n\t\t}\n\t});\n}\n//#endregion\nexport { useParams };\n\n//# sourceMappingURL=useParams.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useSearch.tsx\n/**\n* Read and select the current route's search parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Control which route's search is read and how strictly it's typed\n* - `select`: Map the search object to a derived value for render optimization\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw when the route is not found (strict contexts)\n*\n* @returns The search object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook\n*/\nfunction useSearch(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.search) : match.search;\n\t\t}\n\t});\n}\n//#endregion\nexport { useSearch };\n\n//# sourceMappingURL=useSearch.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport * as React$1 from \"react\";\n//#region src/useNavigate.tsx\n/**\n* Imperative navigation hook.\n*\n* Returns a stable `navigate(options)` function to change the current location\n* programmatically. Prefer the `Link` component for user-initiated navigation,\n* and use this hook from effects, callbacks, or handlers where imperative\n* navigation is required.\n*\n* Options:\n* - `from`: Optional route base used to resolve relative `to` paths.\n*\n* @returns A function that accepts `NavigateOptions`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useNavigateHook\n*/\nfunction useNavigate(_defaultOpts) {\n\tconst router = useRouter();\n\treturn React$1.useCallback((options) => {\n\t\treturn router.navigate({\n\t\t\t...options,\n\t\t\tfrom: options.from ?? _defaultOpts?.from\n\t\t});\n\t}, [_defaultOpts?.from, router]);\n}\n/**\n* Component that triggers a navigation when rendered. Navigation executes\n* in an effect after mount/update.\n*\n* Props are the same as `NavigateOptions` used by `navigate()`.\n*\n* @returns null\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/navigateComponent\n*/\nfunction Navigate(props) {\n\tconst router = useRouter();\n\tconst navigate = useNavigate();\n\tconst previousPropsRef = React$1.useRef(null);\n\tuseLayoutEffect(() => {\n\t\tif (previousPropsRef.current !== props) {\n\t\t\tnavigate(props);\n\t\t\tpreviousPropsRef.current = props;\n\t\t}\n\t}, [\n\t\trouter,\n\t\tprops,\n\t\tnavigate\n\t]);\n\treturn null;\n}\n//#endregion\nexport { Navigate, useNavigate };\n\n//# sourceMappingURL=useNavigate.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useRouteContext.ts\nfunction useRouteContext(opts) {\n\treturn useMatch({\n\t\t...opts,\n\t\tselect: (match) => opts.select ? opts.select(match.context) : match.context\n\t});\n}\n//#endregion\nexport { useRouteContext };\n\n//# sourceMappingURL=useRouteContext.js.map","\"use client\";\nimport { useForwardedRef, useIntersectionObserver } from \"./utils.js\";\nimport { useHydrated } from \"./ClientOnly.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { deepEqual, exactPathTest, functionalUpdate, hasKeys, isDangerousProtocol, preloadWarning, removeTrailingSlash } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/link.tsx\nfunction useValueStable(value) {\n\tconst ref = React$1.useRef(value);\n\tif (!deepEqual(ref.current, value, { ignoreUndefined: false })) ref.current = value;\n\treturn ref.current;\n}\nfunction compareLinkState(a, b) {\n\treturn a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\nfunction resolveExternalLink(hrefOption, to, protocolAllowlist) {\n\tif (hrefOption?.external) {\n\t\tif (isDangerousProtocol(hrefOption.href, protocolAllowlist)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);\n\t\t\treturn;\n\t\t}\n\t\treturn hrefOption.href;\n\t}\n\tif (isSafeInternal(to)) return;\n\tif (typeof to !== \"string\" || to.indexOf(\":\") === -1) return;\n\ttry {\n\t\tnew URL(to);\n\t\tif (isDangerousProtocol(to, protocolAllowlist)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\treturn;\n\t\t}\n\t\treturn to;\n\t} catch {}\n}\nfunction resolveIsActive(location, next, activeOptions, basepath, isHydrated, isExternal) {\n\tif (isExternal) return false;\n\tif (activeOptions?.exact) {\n\t\tif (!exactPathTest(location.pathname, next.pathname, basepath)) return false;\n\t} else {\n\t\tconst currentPathSplit = removeTrailingSlash(location.pathname, basepath);\n\t\tconst nextPathSplit = removeTrailingSlash(next.pathname, basepath);\n\t\tif (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === \"/\"))) return false;\n\t}\n\tif (activeOptions?.includeSearch ?? true) {\n\t\tif (!deepEqual(location.search, next.search, {\n\t\t\tpartial: !activeOptions?.exact,\n\t\t\tignoreUndefined: !activeOptions?.explicitUndefined\n\t\t})) return false;\n\t}\n\tif (activeOptions?.includeHash) return isHydrated && location.hash === next.hash;\n\treturn true;\n}\n/**\n* Build anchor-like props for declarative navigation and preloading.\n*\n* Returns stable `href`, event handlers and accessibility props derived from\n* router options and active state. Used internally by `Link` and custom links.\n*\n* Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,\n* `activeProps`, `inactiveProps`, and more.\n*\n* @returns React anchor props suitable for `<a>` or custom components.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook\n*/\nfunction useLinkProps(options, forwardedRef) {\n\tconst router = useRouter();\n\tconst innerRef = useForwardedRef(forwardedRef);\n\tconst { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, preloadIntentProximity: _preloadIntentProximity, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onBlur, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;\n\tif (isServer ?? router.isServer) {\n\t\tconst safeInternal = isSafeInternal(to);\n\t\tif (typeof to === \"string\" && !safeInternal && to.indexOf(\":\") > -1) try {\n\t\t\tnew URL(to);\n\t\t\tif (isDangerousProtocol(to, router.protocolAllowlist)) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\t\treturn {\n\t\t\t\t\t...propsSafeToSpread,\n\t\t\t\t\tref: innerRef,\n\t\t\t\t\thref: void 0,\n\t\t\t\t\t...children && { children },\n\t\t\t\t\t...target && { target },\n\t\t\t\t\t...disabled && { disabled },\n\t\t\t\t\t...style && { style },\n\t\t\t\t\t...className && { className }\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...propsSafeToSpread,\n\t\t\t\tref: innerRef,\n\t\t\t\thref: to,\n\t\t\t\t...children && { children },\n\t\t\t\t...target && { target },\n\t\t\t\t...disabled && { disabled },\n\t\t\t\t...style && { style },\n\t\t\t\t...className && { className }\n\t\t\t};\n\t\t} catch {}\n\t\tconst next = router.buildLocation({\n\t\t\t...options,\n\t\t\tfrom: options.from\n\t\t});\n\t\tconst hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);\n\t\tconst externalLink = (() => {\n\t\t\tif (hrefOption?.external) {\n\t\t\t\tif (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn hrefOption.href;\n\t\t\t}\n\t\t\tif (safeInternal) return void 0;\n\t\t\tif (typeof to === \"string\" && to.indexOf(\":\") > -1) try {\n\t\t\t\tnew URL(to);\n\t\t\t\tif (isDangerousProtocol(to, router.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn to;\n\t\t\t} catch {}\n\t\t})();\n\t\tconst isActive = (() => {\n\t\t\tif (externalLink) return false;\n\t\t\tconst currentLocation = router.stores.location.get();\n\t\t\tconst exact = activeOptions?.exact ?? false;\n\t\t\tif (exact) {\n\t\t\t\tif (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;\n\t\t\t} else {\n\t\t\t\tconst currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);\n\t\t\t\tconst nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);\n\t\t\t\tif (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === \"/\"))) return false;\n\t\t\t}\n\t\t\tif (activeOptions?.includeSearch ?? true) {\n\t\t\t\tif (currentLocation.search !== next.search) {\n\t\t\t\t\tconst currentSearchEmpty = !currentLocation.search || typeof currentLocation.search === \"object\" && !hasKeys(currentLocation.search);\n\t\t\t\t\tconst nextSearchEmpty = !next.search || typeof next.search === \"object\" && !hasKeys(next.search);\n\t\t\t\t\tif (!(currentSearchEmpty && nextSearchEmpty)) {\n\t\t\t\t\t\tif (!deepEqual(currentLocation.search, next.search, {\n\t\t\t\t\t\t\tpartial: !exact,\n\t\t\t\t\t\t\tignoreUndefined: !activeOptions?.explicitUndefined\n\t\t\t\t\t\t})) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (activeOptions?.includeHash) return false;\n\t\t\treturn true;\n\t\t})();\n\t\tif (externalLink) return {\n\t\t\t...propsSafeToSpread,\n\t\t\tref: innerRef,\n\t\t\thref: externalLink,\n\t\t\t...children && { children },\n\t\t\t...target && { target },\n\t\t\t...disabled && { disabled },\n\t\t\t...style && { style },\n\t\t\t...className && { className }\n\t\t};\n\t\tconst resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;\n\t\tconst resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;\n\t\tconst resolvedStyle = (() => {\n\t\t\tconst baseStyle = style;\n\t\t\tconst activeStyle = resolvedActiveProps.style;\n\t\t\tconst inactiveStyle = resolvedInactiveProps.style;\n\t\t\tif (!baseStyle && !activeStyle && !inactiveStyle) return;\n\t\t\tif (baseStyle && !activeStyle && !inactiveStyle) return baseStyle;\n\t\t\tif (!baseStyle && activeStyle && !inactiveStyle) return activeStyle;\n\t\t\tif (!baseStyle && !activeStyle && inactiveStyle) return inactiveStyle;\n\t\t\treturn {\n\t\t\t\t...baseStyle,\n\t\t\t\t...activeStyle,\n\t\t\t\t...inactiveStyle\n\t\t\t};\n\t\t})();\n\t\tconst resolvedClassName = (() => {\n\t\t\tconst baseClassName = className;\n\t\t\tconst activeClassName = resolvedActiveProps.className;\n\t\t\tconst inactiveClassName = resolvedInactiveProps.className;\n\t\t\tif (!baseClassName && !activeClassName && !inactiveClassName) return \"\";\n\t\t\tlet out = \"\";\n\t\t\tif (baseClassName) out = baseClassName;\n\t\t\tif (activeClassName) out = out ? `${out} ${activeClassName}` : activeClassName;\n\t\t\tif (inactiveClassName) out = out ? `${out} ${inactiveClassName}` : inactiveClassName;\n\t\t\treturn out;\n\t\t})();\n\t\treturn {\n\t\t\t...propsSafeToSpread,\n\t\t\t...resolvedActiveProps,\n\t\t\t...resolvedInactiveProps,\n\t\t\thref: hrefOption?.href,\n\t\t\tref: innerRef,\n\t\t\tdisabled: !!disabled,\n\t\t\ttarget,\n\t\t\t...resolvedStyle && { style: resolvedStyle },\n\t\t\t...resolvedClassName && { className: resolvedClassName },\n\t\t\t...disabled && STATIC_DISABLED_PROPS,\n\t\t\t...isActive && STATIC_ACTIVE_PROPS\n\t\t};\n\t}\n\tconst isHydrated = useHydrated();\n\tconst stableSearch = useValueStable(options.search);\n\tconst stableParams = useValueStable(options.params);\n\tconst stableActiveOptions = useValueStable(activeOptions);\n\tconst _options = React$1.useMemo(() => options, [\n\t\trouter,\n\t\toptions.from,\n\t\toptions._fromLocation,\n\t\toptions.hash,\n\t\toptions.to,\n\t\tstableSearch,\n\t\tstableParams,\n\t\toptions.state,\n\t\toptions.mask,\n\t\toptions.unsafeRelative\n\t]);\n\tconst selectLinkState = React$1.useCallback((location) => {\n\t\tconst next = router.buildLocation({\n\t\t\t_fromLocation: location,\n\t\t\t..._options\n\t\t});\n\t\tconst hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);\n\t\tconst externalLink = resolveExternalLink(hrefOption, to, router.protocolAllowlist);\n\t\treturn [\n\t\t\threfOption?.href,\n\t\t\texternalLink,\n\t\t\tresolveIsActive(location, next, stableActiveOptions, router.basepath, isHydrated, externalLink !== void 0)\n\t\t];\n\t}, [\n\t\tstableActiveOptions,\n\t\tdisabled,\n\t\tisHydrated,\n\t\t_options,\n\t\trouter,\n\t\tto\n\t]);\n\tconst [href, externalLink, isActive] = useStore(router.stores.location, selectLinkState, compareLinkState);\n\tconst resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;\n\tconst resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;\n\tconst resolvedClassName = [\n\t\tclassName,\n\t\tresolvedActiveProps.className,\n\t\tresolvedInactiveProps.className\n\t].filter(Boolean).join(\" \");\n\tconst resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {\n\t\t...style,\n\t\t...resolvedActiveProps.style,\n\t\t...resolvedInactiveProps.style\n\t};\n\tconst hasRenderFetched = React$1.useRef(false);\n\tconst preload = options.reloadDocument || externalLink || disabled ? false : userPreload ?? router.options.defaultPreload;\n\tconst preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;\n\tconst doPreload = React$1.useCallback(() => {\n\t\trouter.preloadRoute(_options).catch((err) => {\n\t\t\tconsole.warn(err);\n\t\t\tconsole.warn(preloadWarning);\n\t\t});\n\t}, [router, _options]);\n\tconst enqueuePreload = React$1.useCallback((e) => {\n\t\tif (!e) {\n\t\t\tcancelPreload(innerRef);\n\t\t\treturn;\n\t\t}\n\t\tif (!(e.isIntersecting ?? preload === \"intent\")) {\n\t\t\tif (e.isIntersecting === false) cancelPreload(innerRef);\n\t\t\treturn;\n\t\t}\n\t\tif (!preloadDelay) {\n\t\t\tdoPreload();\n\t\t\treturn;\n\t\t}\n\t\tif (timeoutMap.has(innerRef)) return;\n\t\ttimeoutMap.set(innerRef, setTimeout(() => {\n\t\t\ttimeoutMap.delete(innerRef);\n\t\t\tdoPreload();\n\t\t}, preloadDelay));\n\t}, [\n\t\tdoPreload,\n\t\tinnerRef,\n\t\tpreload,\n\t\tpreloadDelay\n\t]);\n\tuseIntersectionObserver(innerRef, enqueuePreload, preload !== \"viewport\");\n\tReact$1.useEffect(() => {\n\t\tif (hasRenderFetched.current) return;\n\t\tif (preload === \"render\") {\n\t\t\tdoPreload();\n\t\t\thasRenderFetched.current = true;\n\t\t}\n\t}, [doPreload, preload]);\n\tconst handleClick = (e) => {\n\t\tconst elementTarget = e.currentTarget.getAttribute(\"target\");\n\t\tconst effectiveTarget = target !== void 0 ? target : elementTarget;\n\t\tif (!disabled && !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === \"_self\") && e.button === 0) {\n\t\t\te.preventDefault();\n\t\t\trouter.navigate({\n\t\t\t\t..._options,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tstartTransition,\n\t\t\t\tviewTransition,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t}\n\t};\n\tif (externalLink) return {\n\t\t...propsSafeToSpread,\n\t\tref: innerRef,\n\t\thref: externalLink,\n\t\t...children && { children },\n\t\t...target && { target },\n\t\t...disabled && { disabled },\n\t\t...style && { style },\n\t\t...className && { className },\n\t\t...onClick && { onClick },\n\t\t...onBlur && { onBlur },\n\t\t...onFocus && { onFocus },\n\t\t...onMouseEnter && { onMouseEnter },\n\t\t...onMouseLeave && { onMouseLeave },\n\t\t...onTouchStart && { onTouchStart }\n\t};\n\tconst handleTouchStart = () => {\n\t\tif (preload !== \"intent\") return;\n\t\tdoPreload();\n\t};\n\tconst handleLeave = () => {\n\t\tif (preload === \"intent\") cancelPreload(innerRef);\n\t};\n\treturn {\n\t\t...propsSafeToSpread,\n\t\t...resolvedActiveProps,\n\t\t...resolvedInactiveProps,\n\t\thref,\n\t\tref: innerRef,\n\t\tonClick: composeHandlers([onClick, handleClick]),\n\t\tonBlur: composeHandlers([onBlur, handleLeave]),\n\t\tonFocus: composeHandlers([onFocus, enqueuePreload]),\n\t\tonMouseEnter: composeHandlers([onMouseEnter, enqueuePreload]),\n\t\tonMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n\t\tonTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n\t\tdisabled: !!disabled,\n\t\ttarget,\n\t\t...resolvedStyle && { style: resolvedStyle },\n\t\t...resolvedClassName && { className: resolvedClassName },\n\t\t...disabled && STATIC_DISABLED_PROPS,\n\t\t...isActive && STATIC_ACTIVE_PROPS\n\t};\n}\nvar STATIC_EMPTY_OBJECT = {};\nvar STATIC_ACTIVE_OBJECT = { className: \"active\" };\nvar STATIC_DISABLED_PROPS = {\n\trole: \"link\",\n\t\"aria-disabled\": true\n};\nvar STATIC_ACTIVE_PROPS = {\n\t\"data-status\": \"active\",\n\t\"aria-current\": \"page\"\n};\nvar timeoutMap = /* @__PURE__ */ new WeakMap();\nvar cancelPreload = (eventTarget) => {\n\tclearTimeout(timeoutMap.get(eventTarget));\n\ttimeoutMap.delete(eventTarget);\n};\nvar composeHandlers = (handlers) => (e) => {\n\tfor (const handler of handlers) {\n\t\tif (!handler) continue;\n\t\tif (e.defaultPrevented) return;\n\t\thandler(e);\n\t}\n};\nfunction getHrefOption(publicHref, external, history, disabled) {\n\tif (disabled) return void 0;\n\tif (external) return {\n\t\thref: publicHref,\n\t\texternal: true\n\t};\n\treturn {\n\t\thref: history.createHref(publicHref) || \"/\",\n\t\texternal: false\n\t};\n}\nfunction isSafeInternal(to) {\n\tif (typeof to !== \"string\") return false;\n\tconst zero = to.charCodeAt(0);\n\tif (zero === 47) return to.charCodeAt(1) !== 47;\n\treturn zero === 46;\n}\n/**\n* Creates a typed Link-like component that preserves TanStack Router's\n* navigation semantics and type-safety while delegating rendering to the\n* provided host component.\n*\n* Useful for integrating design system anchors/buttons while keeping\n* router-aware props (eg. `to`, `params`, `search`, `preload`).\n*\n* @param Comp The host component to render (eg. a design-system Link/Button)\n* @returns A router-aware component with the same API as `Link`.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link\n*/\nfunction createLink(Comp) {\n\treturn React$1.forwardRef(function CreatedLink(props, ref) {\n\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t...props,\n\t\t\t_asChild: Comp,\n\t\t\tref\n\t\t});\n\t});\n}\n/**\n* A strongly-typed anchor component for declarative navigation.\n* Handles path, search, hash and state updates with optional route preloading\n* and active-state styling.\n*\n* Props:\n* - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)\n* - `preloadDelay`: Delay in ms before preloading on focus, hover, or viewport entry\n* - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive\n* - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation\n* - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation\n* - `ignoreBlocker`: Bypass registered blockers\n*\n* @returns An anchor-like element that navigates without full page reloads.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent\n*/\nvar Link = React$1.forwardRef((props, ref) => {\n\tconst { _asChild, ...rest } = props;\n\tconst { type: _type, ...linkProps } = useLinkProps(rest, ref);\n\tconst children = typeof rest.children === \"function\" ? rest.children({ isActive: linkProps[\"data-status\"] === \"active\" }) : rest.children;\n\tif (!_asChild) {\n\t\tconst { disabled: _, ...rest } = linkProps;\n\t\treturn React$1.createElement(\"a\", rest, children);\n\t}\n\treturn React$1.createElement(_asChild, linkProps, children);\n});\n/**\n* Validate and reuse navigation options for `Link`, `navigate` or `redirect`.\n* Accepts a literal options object and returns it typed for later spreading.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\nvar linkOptions = (options) => {\n\treturn options;\n};\n/**\n* Type-check a literal object for use with `Link`, `navigate` or `redirect`.\n* Use to validate and reuse navigation options across your app.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\n//#endregion\nexport { Link, createLink, linkOptions, useLinkProps };\n\n//# sourceMappingURL=link.js.map","import { useRouter } from \"./useRouter.js\";\nimport { useMatch } from \"./useMatch.js\";\nimport { useLoaderData } from \"./useLoaderData.js\";\nimport { useLoaderDeps } from \"./useLoaderDeps.js\";\nimport { useParams } from \"./useParams.js\";\nimport { useSearch } from \"./useSearch.js\";\nimport { useNavigate } from \"./useNavigate.js\";\nimport { useRouteContext } from \"./useRouteContext.js\";\nimport { Link } from \"./link.js\";\nimport { BaseRootRoute, BaseRoute, BaseRouteApi, notFound } from \"@tanstack/router-core\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/route.tsx\n/**\n* Returns a route-specific API that exposes type-safe hooks pre-bound\n* to a single route ID. Useful for consuming a route's APIs from files\n* where the route object isn't directly imported (e.g. code-split files).\n*\n* @param id Route ID string literal for the target route.\n* @returns A `RouteApi` instance bound to the given route ID.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/getRouteApiFunction\n*/\nfunction getRouteApi(id) {\n\treturn new RouteApi({ id });\n}\nvar RouteApi = class extends BaseRouteApi {\n\t/**\n\t* @deprecated Use the `getRouteApi` function instead.\n\t*/\n\tconstructor({ id }) {\n\t\tsuper({ id });\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: useRouter().routesById[this.id].fullPath });\n\t\t};\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\tconst fullPath = useRouter().routesById[this.id].fullPath;\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\nvar Route = class extends BaseRoute {\n\t/**\n\t* @deprecated Use the `createRoute` function instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a non-root Route instance for code-based routing.\n*\n* Use this to define a route that will be composed into a route tree\n* (typically via a parent route's `addChildren`). If you're using file-based\n* routing, prefer `createFileRoute`.\n*\n* @param options Route options (path, component, loader, context, etc.).\n* @returns A Route instance to be attached to the route tree.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouteFunction\n*/\nfunction createRoute(options) {\n\treturn new Route(options);\n}\n/**\n* Creates a root route factory that requires a router context type.\n*\n* Use when your root route expects `context` to be provided to `createRouter`.\n* The returned function behaves like `createRootRoute` but enforces a context type.\n*\n* @returns A factory function to configure and return a root route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteWithContextFunction\n*/\nfunction createRootRouteWithContext() {\n\treturn (options) => {\n\t\treturn createRootRoute(options);\n\t};\n}\n/**\n* @deprecated Use the `createRootRouteWithContext` function instead.\n*/\nvar rootRouteWithContext = createRootRouteWithContext;\nvar RootRoute = class extends BaseRootRoute {\n\t/**\n\t* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a root Route instance used to build your route tree.\n*\n* Typically paired with `createRouter({ routeTree })`. If you need to require\n* a typed router context, use `createRootRouteWithContext` instead.\n*\n* @param options Root route options (component, error, pending, etc.).\n* @returns A root route instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteFunction\n*/\nfunction createRootRoute(options) {\n\treturn new RootRoute(options);\n}\nfunction createRouteMask(opts) {\n\treturn opts;\n}\nvar NotFoundRoute = class extends Route {\n\tconstructor(options) {\n\t\tsuper({\n\t\t\t...options,\n\t\t\tid: \"404\"\n\t\t});\n\t}\n};\n//#endregion\nexport { NotFoundRoute, RootRoute, Route, RouteApi, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, rootRouteWithContext };\n\n//# sourceMappingURL=route.js.map","import { reactUse } from \"./utils.js\";\nimport { isModuleNotFoundError } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/lazyRouteComponent.tsx\n/**\n* Wrap a dynamic import to create a route component that supports\n* `.preload()` and friendly reload-on-module-missing behavior.\n*\n* @param importer Function returning a module promise\n* @param exportName Named export to use (default: `default`)\n* @returns A lazy route component compatible with TanStack Router\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/lazyRouteComponentFunction\n*/\nfunction lazyRouteComponent(importer, exportName) {\n\tlet loadPromise;\n\tlet comp;\n\tlet error;\n\tconst load = () => {\n\t\tif (!loadPromise) {\n\t\t\terror = void 0;\n\t\t\tloadPromise = importer().then((res) => {\n\t\t\t\tif (!(isServer ?? typeof window === \"undefined\")) {\n\t\t\t\t\tloadPromise = void 0;\n\t\t\t\t\tlazyComp.preload = void 0;\n\t\t\t\t}\n\t\t\t\tcomp = res[exportName ?? \"default\"];\n\t\t\t}).catch((err) => {\n\t\t\t\tloadPromise = void 0;\n\t\t\t\terror = err;\n\t\t\t});\n\t\t}\n\t\treturn loadPromise;\n\t};\n\tconst lazyComp = function Lazy(props) {\n\t\tif (error) {\n\t\t\tif (isModuleNotFoundError(error) && !(isServer ?? typeof window === \"undefined\") && typeof sessionStorage !== \"undefined\") {\n\t\t\t\tconst storageKey = `tanstack_router_reload:${error.message}`;\n\t\t\t\tif (!sessionStorage.getItem(storageKey)) {\n\t\t\t\t\tsessionStorage.setItem(storageKey, \"1\");\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\tthrow new Promise(() => {});\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (!comp) if (reactUse) reactUse(load());\n\t\telse throw load();\n\t\treturn React$1.createElement(comp, props);\n\t};\n\tlazyComp.preload = load;\n\treturn lazyComp;\n}\n//#endregion\nexport { lazyRouteComponent };\n\n//# sourceMappingURL=lazyRouteComponent.js.map","import { CatchBoundary } from \"./CatchBoundary.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { isNotFound } from \"@tanstack/router-core\";\nimport \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/not-found.tsx\nfunction CatchNotFound(props) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst resetKey = `not-found-${router.stores.location.get().pathname}-${router.stores.status.get()}`;\n\t\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => resetKey,\n\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\terrorComponent: ({ error }) => {\n\t\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\tchildren: props.children\n\t\t});\n\t}\n\tconst resetKey = `not-found-${useStore(router.stores.location, (location) => location.pathname)}-${useStore(router.stores.status, (status) => status)}`;\n\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\tgetResetKey: () => resetKey,\n\t\tonCatch: (error, errorInfo) => {\n\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\telse throw error;\n\t\t},\n\t\terrorComponent: ({ error }) => {\n\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\telse throw error;\n\t\t},\n\t\tchildren: props.children\n\t});\n}\nfunction DefaultGlobalNotFound() {\n\treturn /* @__PURE__ */ jsx(\"p\", { children: \"Not Found\" });\n}\n//#endregion\nexport { CatchNotFound, DefaultGlobalNotFound };\n\n//# sourceMappingURL=not-found.js.map","import { useRouter } from \"./useRouter.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ScriptOnce.tsx\n/**\n* Server-only helper to emit a script tag exactly once during SSR.\n*/\nfunction ScriptOnce({ children }) {\n\tconst router = useRouter();\n\tif (!(isServer ?? router.isServer)) return null;\n\treturn /* @__PURE__ */ jsx(\"script\", {\n\t\tnonce: router.options.ssr?.nonce,\n\t\tdangerouslySetInnerHTML: { __html: children + \";document.currentScript.remove()\" }\n\t});\n}\n//#endregion\nexport { ScriptOnce };\n\n//# sourceMappingURL=ScriptOnce.js.map","import \"react\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\n//#region src/SafeFragment.tsx\nfunction SafeFragment(props) {\n\treturn /* @__PURE__ */ jsx(Fragment, { children: props.children });\n}\n//#endregion\nexport { SafeFragment };\n\n//# sourceMappingURL=SafeFragment.js.map","import { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { DefaultGlobalNotFound } from \"./not-found.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/renderRouteNotFound.tsx\n/**\n* Renders a not found component for a route when no matching route is found.\n*\n* @param router - The router instance containing the route configuration\n* @param route - The route that triggered the not found state\n* @param data - Additional data to pass to the not found component\n* @returns The rendered not found component or a default fallback component\n*/\nfunction renderRouteNotFound(router, route, data) {\n\tif (!route.options.notFoundComponent) {\n\t\tif (router.options.defaultNotFoundComponent) {\n\t\t\tconst notFoundElement = /* @__PURE__ */ jsx(router.options.defaultNotFoundComponent, { ...data });\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!route.options.notFoundComponent) console.warn(`Warning: A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`);\n\t\t}\n\t\treturn /* @__PURE__ */ jsx(DefaultGlobalNotFound, {});\n\t}\n\tconst notFoundElement = /* @__PURE__ */ jsx(route.options.notFoundComponent, { ...data });\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n}\n//#endregion\nexport { renderRouteNotFound };\n\n//# sourceMappingURL=renderRouteNotFound.js.map","//#region src/scroll-restoration-script/client.ts\nfunction getScrollRestorationScriptForRouter(_router) {\n\treturn null;\n}\n//#endregion\nexport { getScrollRestorationScriptForRouter };\n\n//# sourceMappingURL=client.js.map","import { useRouter } from \"./useRouter.js\";\nimport { ScriptOnce } from \"./ScriptOnce.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { getScrollRestorationScriptForRouter } from \"@tanstack/router-core/scroll-restoration-script\";\n//#region src/scroll-restoration.tsx\nfunction ScrollRestoration() {\n\tconst script = getScrollRestorationScriptForRouter(useRouter());\n\tif (!script) return null;\n\treturn /* @__PURE__ */ jsx(ScriptOnce, { children: script });\n}\n//#endregion\nexport { ScrollRestoration };\n\n//# sourceMappingURL=scroll-restoration.js.map","\"use client\";\nimport { nonRouteComponentContext, wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { CatchBoundary, ErrorComponent } from \"./CatchBoundary.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { CatchNotFound } from \"./not-found.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { renderRouteNotFound } from \"./renderRouteNotFound.js\";\nimport { ScrollRestoration } from \"./scroll-restoration.js\";\nimport { isNotFound, rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Match.tsx\nfunction renderPending(router, route) {\n\tconst PendingComponent = route?.options.pendingComponent ?? router.options.defaultPendingComponent;\n\tif (!PendingComponent) return null;\n\tconst pendingElement = /* @__PURE__ */ jsx(PendingComponent, {});\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(pendingElement, \"pendingComponent\") : pendingElement;\n}\nvar outletMatchSelectionEqual = (a, b) => a[0] === b[0] && a[1] === b[1];\nvar canWrapInSuspense = (router, route, ssr) => !route.isRoot || route.options.shellComponent || route.options.wrapInSuspense || ssr === false || ssr === \"data-only\" || !((isServer ?? router.isServer) || router.ssr);\nvar Match = React$1.memo(function MatchImpl({ routeId }) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: router.stores.byRoute.get(routeId).get()\n\t});\n\treturn /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: useStore(router.stores.getMatchStore(routeId), (value) => value)\n\t});\n});\nfunction MatchView({ router, match }) {\n\tconst route = router.routesById[match.routeId];\n\tconst pendingElement = renderPending(router, route);\n\tconst routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;\n\tconst routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;\n\tconst routeNotFoundComponent = route.isRoot ? route.options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route.options.notFoundComponent;\n\tconst resolvedNoSsr = match.ssr === false || match.ssr === \"data-only\";\n\tconst ResolvedSuspenseBoundary = canWrapInSuspense(router, route, match.ssr) && (route.options.wrapInSuspense ?? pendingElement ?? (route.options.errorComponent?.preload || resolvedNoSsr)) ? React$1.Suspense : SafeFragment;\n\tconst ResolvedCatchBoundary = routeErrorComponent ? CatchBoundary : SafeFragment;\n\tconst ResolvedNotFoundBoundary = routeNotFoundComponent ? CatchNotFound : SafeFragment;\n\treturn /* @__PURE__ */ jsxs(route.isRoot ? route.options.shellComponent ?? SafeFragment : SafeFragment, { children: [/* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: match.routeId,\n\t\tchildren: /* @__PURE__ */ jsx(ResolvedSuspenseBoundary, {\n\t\t\tfallback: pendingElement,\n\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedCatchBoundary, {\n\t\t\t\tgetResetKey: () => match,\n\t\t\t\terrorComponent: routeErrorComponent,\n\t\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\t\tif (isNotFound(error)) {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Warning: Error in route match: ${match.id}`);\n\t\t\t\t\trouteOnCatch?.(error, errorInfo);\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedNotFoundBoundary, {\n\t\t\t\t\tfallback: (error) => {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tif (error.routeId !== match.routeId) throw error;\n\t\t\t\t\t\tconst notFoundElement = React$1.createElement(routeNotFoundComponent, error);\n\t\t\t\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t\t\t\t},\n\t\t\t\t\tchildren: resolvedNoSsr ? /* @__PURE__ */ jsx(ClientOnly, {\n\t\t\t\t\t\tfallback: pendingElement,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t\t}) : /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}), (isServer ?? router.isServer) && route.parentRoute?.id === rootRouteId && router.options.scrollRestoration ? /* @__PURE__ */ jsx(ScrollRestoration, {}) : null] });\n}\nvar MatchInner = React$1.memo(function MatchInnerImpl({ match }) {\n\tconst router = useRouter();\n\tconst routeId = match.routeId;\n\tconst route = router.routesById[routeId];\n\tconst key = React$1.useMemo(() => {\n\t\tconst remountDeps = (route.options.remountDeps ?? router.options.defaultRemountDeps)?.({\n\t\t\trouteId,\n\t\t\tloaderDeps: match.loaderDeps,\n\t\t\tparams: match._strictParams,\n\t\t\tsearch: match._strictSearch\n\t\t});\n\t\treturn remountDeps ? JSON.stringify(remountDeps) : void 0;\n\t}, [\n\t\trouteId,\n\t\tmatch.loaderDeps,\n\t\tmatch._strictParams,\n\t\tmatch._strictSearch,\n\t\troute.options.remountDeps,\n\t\trouter.options.defaultRemountDeps\n\t]);\n\tconst out = React$1.useMemo(() => {\n\t\tconst Comp = route.options.component ?? router.options.defaultComponent;\n\t\treturn Comp ? /* @__PURE__ */ jsx(Comp, {}, key) : /* @__PURE__ */ jsx(Outlet, {});\n\t}, [\n\t\tkey,\n\t\troute.options.component,\n\t\trouter.options.defaultComponent\n\t]);\n\tif (match.status === \"pending\") {\n\t\tif (router.ssr && !canWrapInSuspense(router, route, match.ssr)) return out;\n\t\tif (router._tx) throw router._tx[5];\n\t\treturn renderPending(router, route);\n\t}\n\tif (match.status === \"notFound\") return renderRouteNotFound(router, route, match.error);\n\tif (match.status === \"error\") {\n\t\tif (isServer ?? router.isServer) {\n\t\t\tconst errorElement = /* @__PURE__ */ jsx((route.options.errorComponent ?? router.options.defaultErrorComponent) || ErrorComponent, {\n\t\t\t\terror: match.error,\n\t\t\t\treset: void 0,\n\t\t\t\tinfo: { componentStack: \"\" }\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(errorElement, \"errorComponent\") : errorElement;\n\t\t}\n\t\tthrow match.error;\n\t}\n\treturn out;\n});\n/**\n* Render the next child match in the route tree. Typically used inside\n* a route component to render nested routes.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/outletComponent\n*/\nvar Outlet = React$1.memo(function OutletImpl() {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst nonRouteComponent = React$1.useContext(nonRouteComponentContext);\n\t\tif (nonRouteComponent) console.warn(`Warning: An <Outlet /> was rendered inside a ${nonRouteComponent}. <Outlet /> should only be rendered inside a route component.`);\n\t}\n\tconst router = useRouter();\n\tconst routeId = React$1.useContext(matchContext);\n\tlet parentGlobalNotFound;\n\tlet parentNotFoundError;\n\tlet childRouteId;\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\tconst parentIndex = matches.findIndex((match) => match.routeId === routeId);\n\t\tconst parentMatch = matches[parentIndex];\n\t\tparentGlobalNotFound = !!parentMatch._notFound;\n\t\tparentNotFoundError = parentMatch.error;\n\t\tchildRouteId = matches[parentIndex + 1]?.routeId;\n\t} else {\n\t\tconst parentMatchStore = router.stores.getMatchStore(routeId);\n\t\t[parentGlobalNotFound, parentNotFoundError] = useStore(parentMatchStore, (match) => [!!match._notFound, match.error], outletMatchSelectionEqual);\n\t\tchildRouteId = useStore(router.stores.ids, (ids) => {\n\t\t\treturn ids[ids.indexOf(routeId) + 1];\n\t\t});\n\t}\n\tif (parentGlobalNotFound) return renderRouteNotFound(router, router.routesById[routeId], parentNotFoundError);\n\tif (!childRouteId) return null;\n\tconst nextMatch = /* @__PURE__ */ jsx(Match, { routeId: childRouteId });\n\tif (routeId === rootRouteId) return /* @__PURE__ */ jsx(React$1.Suspense, {\n\t\tfallback: renderPending(router),\n\t\tchildren: nextMatch\n\t});\n\treturn nextMatch;\n});\n//#endregion\nexport { Match, Outlet, renderPending };\n\n//# sourceMappingURL=Match.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { getLocationChangeInfo, trimPathRight } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\n//#region src/Transitioner.tsx\nfunction settleOwner(owner, rendered) {\n\tconst settle = owner[1];\n\towner.length = 0;\n\tsettle?.(rendered);\n}\nfunction Transitioner({ t }) {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered ??= [];\n\tconst mounted = process.env.NODE_ENV !== \"production\" ? React$1.useRef(false) : void 0;\n\trouter.startTransition = (fn, expected) => new Promise((resolve) => {\n\t\tsettleOwner(acknowledgement, false);\n\t\tacknowledgement.push(expected, resolve);\n\t\tt(router);\n\t\tReact$1.startTransition(fn);\n\t});\n\tuseLayoutEffect(() => {\n\t\tconst unsub = router.history.subscribe(router.load);\n\t\tif (mounted?.current) return unsub;\n\t\tif (mounted) mounted.current = true;\n\t\trouter.updateLatestLocation();\n\t\tconst location = router.latestLocation;\n\t\tconst nextLocation = router.buildLocation({\n\t\t\tto: location.pathname,\n\t\t\tsearch: true,\n\t\t\tparams: true,\n\t\t\thash: true,\n\t\t\tstate: true,\n\t\t\t_includeValidateSearch: true\n\t\t});\n\t\tif (trimPathRight(location.publicHref) !== trimPathRight(nextLocation.publicHref)) {\n\t\t\trouter.commitLocation({\n\t\t\t\t...nextLocation,\n\t\t\t\treplace: true,\n\t\t\t\tignoreBlocker: true\n\t\t\t});\n\t\t\treturn unsub;\n\t\t}\n\t\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\t\tif (resolvedLocation?.href === location.href && resolvedLocation.state.__TSR_key === location.state.__TSR_key) acknowledgement.push(router.stores.matches.get(), (rendered) => {\n\t\t\tif (rendered) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...getLocationChangeInfo(resolvedLocation, resolvedLocation)\n\t\t\t});\n\t\t});\n\t\telse if (!router._tx) router.load().catch(console.error);\n\t\treturn unsub;\n\t}, [router, router.history]);\n\treturn null;\n}\n//#endregion\nexport { Transitioner, settleOwner };\n\n//# sourceMappingURL=Transitioner.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { CatchBoundary } from \"./CatchBoundary.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { Transitioner, settleOwner } from \"./Transitioner.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { Match, renderPending } from \"./Match.js\";\nimport { rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Matches.tsx\n/**\n* Internal component that renders the router's active match tree with\n* suspense, error, and not-found boundaries. Rendered by `RouterProvider`.\n*/\nfunction Matches() {\n\tconst router = useRouter();\n\tconst rootRoute = router.routesById[rootRouteId];\n\tconst pendingElement = renderPending(router, rootRoute);\n\tconst ResolvedSuspense = (isServer ?? router.isServer) || router.ssr ? SafeFragment : React$1.Suspense;\n\tconst inner = /* @__PURE__ */ jsxs(Fragment, { children: [!(isServer ?? router.isServer) && /* @__PURE__ */ jsx(Transitioner, { t: React$1.useState()[1] }), /* @__PURE__ */ jsx(ResolvedSuspense, {\n\t\tfallback: pendingElement,\n\t\tchildren: /* @__PURE__ */ jsx(MatchesInner, {})\n\t})] });\n\treturn router.options.InnerWrap ? /* @__PURE__ */ jsx(router.options.InnerWrap, { children: inner }) : inner;\n}\nfunction MatchesInner() {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered;\n\tconst matches = isServer ?? router.isServer ? router.stores.matches.get() : useStore(router.stores.matches, (value) => acknowledgement[0] ?? value);\n\tconst match = matches[0];\n\tconst routeId = match?.routeId;\n\tuseLayoutEffect(() => {\n\t\tif (acknowledgement[0] === matches) settleOwner(acknowledgement, true);\n\t}, [acknowledgement, matches]);\n\tconst matchComponent = routeId ? /* @__PURE__ */ jsx(Match, { routeId }) : null;\n\treturn /* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: routeId,\n\t\tchildren: router.options.disableGlobalCatchBoundary ? matchComponent : /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => match,\n\t\t\tonCatch: process.env.NODE_ENV !== \"production\" ? (error) => {\n\t\t\t\tconsole.warn(`Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`);\n\t\t\t\tconsole.warn(`Warning: ${error.message || error.toString()}`);\n\t\t\t} : void 0,\n\t\t\tchildren: matchComponent\n\t\t})\n\t});\n}\n/**\n* Create a matcher function for testing locations against route definitions.\n*\n* The returned function accepts standard navigation options (`to`, `params`,\n* `search`, etc.) and returns either `false` (no match) or the matched params\n* object when the route matches the current or pending location.\n*\n* Useful for conditional rendering and active UI states because it subscribes\n* the component to the router state used for matching. The returned function's\n* identity changes when that state changes. For imperative checks in event\n* handlers, get the router with `useRouter` and call `router.matchRoute(...)`\n* to avoid that subscription.\n*\n* @returns A `matchRoute(options)` function that returns `false` or params.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchRouteHook\n*/\nfunction useMatchRoute() {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return (opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t};\n\treturn React$1.useCallback((opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t}, [\n\t\trouter,\n\t\tuseStore(router.stores.location, (location) => location.href),\n\t\tuseStore(router.stores.resolvedLocation, (location) => location?.href),\n\t\tuseStore(router.stores.status, (status) => status)\n\t]);\n}\n/**\n* Component that conditionally renders its children based on whether a route\n* matches the provided `from`/`to` options. If `children` is a function, it\n* receives the matched params object.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/matchRouteComponent\n*/\nfunction MatchRoute(props) {\n\tconst params = useMatchRoute()(props);\n\tif (typeof props.children === \"function\") return props.children(params);\n\treturn params ? props.children : null;\n}\nfunction useMatches(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\treturn opts?.select ? opts.select(matches) : matches;\n\t}\n\treturn useStore(router.stores.matches, useStructuralSharing(opts, router));\n}\n/**\n* Read the presented route matches above the current match, or select a\n* derived value from them.\n*/\nfunction useParentMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(0, matches.findIndex((d) => d.routeId === contextRouteId));\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n/**\n* Read the presented route matches below the current match, or select a\n* derived value from them.\n*/\nfunction useChildMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(matches.findIndex((d) => d.routeId === contextRouteId) + 1);\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n//#endregion\nexport { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches };\n\n//# sourceMappingURL=Matches.js.map","import { createNonReactiveMutableStore, createNonReactiveReadonlyStore } from \"@tanstack/router-core\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { batch, createAtom } from \"@tanstack/react-store\";\n//#region src/routerStores.ts\nvar getStoreFactory = (opts) => {\n\tif (isServer ?? opts.isServer) return {\n\t\tcreateMutableStore: createNonReactiveMutableStore,\n\t\tcreateReadonlyStore: createNonReactiveReadonlyStore,\n\t\tbatch: (fn) => fn()\n\t};\n\treturn {\n\t\tcreateMutableStore: createAtom,\n\t\tcreateReadonlyStore: createAtom,\n\t\tbatch\n\t};\n};\n//#endregion\nexport { getStoreFactory };\n\n//# sourceMappingURL=routerStores.js.map","import { getStoreFactory } from \"./routerStores.js\";\nimport { RouterCore } from \"@tanstack/router-core\";\n//#region src/router.ts\n/**\n* Creates a new Router instance for React.\n*\n* Pass the returned router to `RouterProvider` to enable routing.\n* Notable options: `routeTree` (your route definitions) and `context`\n* (required if the root route was created with `createRootRouteWithContext`).\n*\n* @param options Router options used to configure the router.\n* @returns A Router instance to be provided to `RouterProvider`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nvar createRouter = (options) => {\n\treturn new Router(options);\n};\nvar Router = class extends RouterCore {\n\tconstructor(options) {\n\t\tsuper(options, getStoreFactory);\n\t}\n};\n//#endregion\nexport { Router, createRouter };\n\n//# sourceMappingURL=router.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport { Matches } from \"./Matches.js\";\nimport { hasKeys } from \"@tanstack/router-core\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/RouterProvider.tsx\n/**\n* Low-level provider that places the router into React context and optionally\n* updates router options from props. Most apps should use `RouterProvider`.\n*/\nfunction RouterContextProvider({ router, children, ...rest }) {\n\tif (hasKeys(rest)) router.update({\n\t\t...router.options,\n\t\t...rest,\n\t\tcontext: {\n\t\t\t...router.options.context,\n\t\t\t...rest.context\n\t\t}\n\t});\n\tconst provider = /* @__PURE__ */ jsx(routerContext.Provider, {\n\t\tvalue: router,\n\t\tchildren\n\t});\n\tif (router.options.Wrap) return /* @__PURE__ */ jsx(router.options.Wrap, { children: provider });\n\treturn provider;\n}\n/**\n* Renders the current match presentation and provides the router to the React\n* tree via context.\n*\n* Accepts the same options as `createRouter` via props to update the router\n* instance after creation.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nfunction RouterProvider({ router, ...rest }) {\n\treturn /* @__PURE__ */ jsx(RouterContextProvider, {\n\t\trouter,\n\t\t...rest,\n\t\tchildren: /* @__PURE__ */ jsx(Matches, {})\n\t});\n}\n//#endregion\nexport { RouterContextProvider, RouterProvider };\n\n//# sourceMappingURL=RouterProvider.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useRouterState.tsx\n/**\n* Subscribe to the router's state store with optional selection and\n* structural sharing for render optimization.\n*\n* Options:\n* - `select`: Project the full router state to a derived slice\n* - `structuralSharing`: Replace-equal semantics for stable references\n* - `router`: Read state from a specific router instance instead of context\n*\n* @returns The selected router state (or the full state by default).\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterStateHook\n*/\nfunction useRouterState(opts) {\n\tconst contextRouter = useRouter({ warn: opts?.router === void 0 });\n\tconst router = opts?.router || contextRouter;\n\tif (isServer ?? router.isServer) {\n\t\tconst state = router.stores.__store.get();\n\t\treturn opts?.select ? opts.select(state) : state;\n\t}\n\treturn useStore(router.stores.__store, useStructuralSharing(opts, router));\n}\n//#endregion\nexport { useRouterState };\n\n//# sourceMappingURL=useRouterState.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useLocation.tsx\n/**\n* Read the current location from the router state with optional selection.\n* Useful for subscribing to just the pieces of location you care about.\n*\n* Options:\n* - `select`: Project the `location` object to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The current location (or selected value).\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook\n*/\nfunction useLocation(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst location = router.stores.location.get();\n\t\treturn opts?.select ? opts.select(location) : location;\n\t}\n\treturn useStore(router.stores.location, useStructuralSharing(opts, router));\n}\n//#endregion\nexport { useLocation };\n\n//# sourceMappingURL=useLocation.js.map","\"use client\";\nimport { useHydrated } from \"./ClientOnly.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/Asset.tsx\nvar INLINE_CSS_HYDRATION_ATTR = \"data-tsr-inline-css\";\nvar noopScriptHandler = () => {};\nfunction setScriptAttrs(script, attrs) {\n\tif (!attrs) return;\n\tfor (const [key, value] of Object.entries(attrs)) if (key !== \"suppressHydrationWarning\" && value !== void 0 && value !== false) script.setAttribute(key, typeof value === \"boolean\" ? \"\" : String(value));\n}\nfunction Asset(asset) {\n\tconst { attrs, children, nonce, preventScriptHoist } = asset;\n\tswitch (asset.tag) {\n\t\tcase \"title\": return /* @__PURE__ */ jsx(\"title\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true,\n\t\t\tchildren\n\t\t});\n\t\tcase \"meta\": return /* @__PURE__ */ jsx(\"meta\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tcase \"link\": return /* @__PURE__ */ jsx(\"link\", {\n\t\t\t...attrs,\n\t\t\tprecedence: attrs?.precedence ?? (attrs?.rel === \"stylesheet\" ? \"default\" : void 0),\n\t\t\tnonce,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tcase \"style\":\n\t\t\tif (asset.inlineCss && (process.env.TSS_INLINE_CSS_ENABLED === \"true\" || process.env.TSS_INLINE_CSS_ENABLED === void 0 && isServer)) return /* @__PURE__ */ jsx(InlineCssStyle, {\n\t\t\t\tattrs,\n\t\t\t\tnonce,\n\t\t\t\tchildren\n\t\t\t});\n\t\t\treturn /* @__PURE__ */ jsx(\"style\", {\n\t\t\t\t...attrs,\n\t\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\t\tnonce\n\t\t\t});\n\t\tcase \"script\": return /* @__PURE__ */ jsx(Script, {\n\t\t\tattrs,\n\t\t\tpreventScriptHoist,\n\t\t\tchildren\n\t\t});\n\t\tdefault: return null;\n\t}\n}\nfunction InlineCssStyle({ attrs, children, nonce }) {\n\tconst isInlineCssPlaceholder = children === void 0;\n\tconst [hydratedInlineCss] = React$1.useState(() => {\n\t\tif (!isInlineCssPlaceholder || typeof document === \"undefined\") return;\n\t\treturn document.querySelector(`style[${INLINE_CSS_HYDRATION_ATTR}]`)?.textContent ?? void 0;\n\t});\n\tconst html = isInlineCssPlaceholder ? hydratedInlineCss ?? \"\" : children ?? \"\";\n\treturn /* @__PURE__ */ jsx(\"style\", {\n\t\t...attrs,\n\t\t[INLINE_CSS_HYDRATION_ATTR]: \"\",\n\t\tdangerouslySetInnerHTML: { __html: html },\n\t\tnonce,\n\t\tsuppressHydrationWarning: true\n\t});\n}\nfunction Script({ attrs, children, preventScriptHoist }) {\n\tconst router = useRouter();\n\tconst hydrated = useHydrated();\n\tconst dataScript = typeof attrs?.type === \"string\" && attrs.type !== \"\" && attrs.type !== \"text/javascript\" && attrs.type !== \"module\";\n\tif (process.env.NODE_ENV !== \"production\" && attrs?.src && typeof children === \"string\" && children.trim().length) console.warn(\"[TanStack Router] <Script> received both `src` and `children`. The `children` content will be ignored. Remove `children` or remove `src`.\");\n\tReact$1.useEffect(() => {\n\t\tif (dataScript) return;\n\t\tif (attrs?.src) {\n\t\t\tconst normSrc = (() => {\n\t\t\t\ttry {\n\t\t\t\t\tconst base = document.baseURI || window.location.href;\n\t\t\t\t\treturn new URL(attrs.src, base).href;\n\t\t\t\t} catch {\n\t\t\t\t\treturn attrs.src;\n\t\t\t\t}\n\t\t\t})();\n\t\t\tfor (const el of document.querySelectorAll(\"script[src]\")) if (el.src === normSrc) return;\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tsetScriptAttrs(script, attrs);\n\t\t\tdocument.head.appendChild(script);\n\t\t\treturn () => script.remove();\n\t\t}\n\t\tif (typeof children === \"string\") {\n\t\t\tconst typeAttr = typeof attrs?.type === \"string\" ? attrs.type : \"text/javascript\";\n\t\t\tconst nonceAttr = typeof attrs?.nonce === \"string\" ? attrs.nonce : void 0;\n\t\t\tfor (const el of document.querySelectorAll(\"script:not([src])\")) {\n\t\t\t\tif (!(el instanceof HTMLScriptElement)) continue;\n\t\t\t\tconst sType = el.getAttribute(\"type\") ?? \"text/javascript\";\n\t\t\t\tconst sNonce = el.getAttribute(\"nonce\") ?? void 0;\n\t\t\t\tif (el.textContent === children && sType === typeAttr && sNonce === nonceAttr) return;\n\t\t\t}\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.textContent = children;\n\t\t\tsetScriptAttrs(script, attrs);\n\t\t\tdocument.head.appendChild(script);\n\t\t\treturn () => script.remove();\n\t\t}\n\t}, [\n\t\tattrs,\n\t\tchildren,\n\t\tdataScript\n\t]);\n\tif (isServer ?? router.isServer) {\n\t\tif (attrs?.src) {\n\t\t\tif (!preventScriptHoist) return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t\t...attrs,\n\t\t\t\tsuppressHydrationWarning: true\n\t\t\t});\n\t\t\treturn /* @__PURE__ */ jsx(\"script\", {\n\t\t\t\t...attrs,\n\t\t\t\tonLoad: noopScriptHandler,\n\t\t\t\tsuppressHydrationWarning: true\n\t\t\t});\n\t\t}\n\t\tif (typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\treturn null;\n\t}\n\tif (dataScript && typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t...attrs,\n\t\tsuppressHydrationWarning: true,\n\t\tdangerouslySetInnerHTML: { __html: children }\n\t});\n\tif (!hydrated) {\n\t\tif (attrs?.src) return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tif (typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t}\n\treturn null;\n}\n//#endregion\nexport { Asset };\n\n//# sourceMappingURL=Asset.js.map","import { useRouter } from \"./useRouter.js\";\nimport { _getAssetMatches, appendUniqueUserTags, deepEqual, escapeHtml, getAssetCrossOrigin, getScriptPreloadAttrs, resolveManifestCssLink } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/headContentUtils.tsx\nfunction buildTagsFromMatches(router, nonce, matches, assetCrossOrigin) {\n\tmatches = _getAssetMatches(matches);\n\tconst routeMeta = matches.map((match) => match.meta).filter((meta) => meta !== void 0);\n\tconst resultMeta = [];\n\tconst metaByAttribute = {};\n\tlet title;\n\tfor (let i = routeMeta.length - 1; i >= 0; i--) {\n\t\tconst metas = routeMeta[i];\n\t\tfor (let j = metas.length - 1; j >= 0; j--) {\n\t\t\tconst m = metas[j];\n\t\t\tif (!m) continue;\n\t\t\tif (m.title) {\n\t\t\t\tif (!title) title = {\n\t\t\t\t\ttag: \"title\",\n\t\t\t\t\tchildren: m.title\n\t\t\t\t};\n\t\t\t} else if (\"script:ld+json\" in m) try {\n\t\t\t\tconst json = JSON.stringify(m[\"script:ld+json\"]);\n\t\t\t\tresultMeta.push({\n\t\t\t\t\ttag: \"script\",\n\t\t\t\t\tattrs: { type: \"application/ld+json\" },\n\t\t\t\t\tchildren: escapeHtml(json)\n\t\t\t\t});\n\t\t\t} catch {}\n\t\t\telse {\n\t\t\t\tconst attribute = m.name ?? m.property;\n\t\t\t\tif (attribute) if (metaByAttribute[attribute]) continue;\n\t\t\t\telse metaByAttribute[attribute] = true;\n\t\t\t\tresultMeta.push({\n\t\t\t\t\ttag: \"meta\",\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\t...m,\n\t\t\t\t\t\tnonce\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tif (title) resultMeta.push(title);\n\tif (nonce) resultMeta.push({\n\t\ttag: \"meta\",\n\t\tattrs: {\n\t\t\tproperty: \"csp-nonce\",\n\t\t\tcontent: nonce\n\t\t}\n\t});\n\tresultMeta.reverse();\n\tconst constructedLinks = matches.flatMap((match) => match.links ?? []).filter((link) => link !== void 0).map((link) => ({\n\t\ttag: \"link\",\n\t\tattrs: {\n\t\t\t...link,\n\t\t\tnonce\n\t\t}\n\t}));\n\tconst manifest = router.ssr?.manifest;\n\tconst manifestCssTags = [];\n\tif (manifest) {\n\t\tmatches.forEach((match) => {\n\t\t\t(manifest.routes[match.routeId]?.css)?.forEach((link) => {\n\t\t\t\tconst resolvedLink = resolveManifestCssLink(link);\n\t\t\t\tmanifestCssTags.push({\n\t\t\t\t\ttag: \"link\",\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\trel: \"stylesheet\",\n\t\t\t\t\t\t...resolvedLink,\n\t\t\t\t\t\tcrossOrigin: getAssetCrossOrigin(assetCrossOrigin, \"stylesheet\") ?? resolvedLink.crossOrigin,\n\t\t\t\t\t\tsuppressHydrationWarning: true,\n\t\t\t\t\t\tnonce\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\tif (manifest.inlineStyle) manifestCssTags.push({\n\t\t\ttag: \"style\",\n\t\t\tattrs: {\n\t\t\t\t...manifest.inlineStyle.attrs,\n\t\t\t\tnonce\n\t\t\t},\n\t\t\tchildren: manifest.inlineStyle.children,\n\t\t\tinlineCss: true\n\t\t});\n\t}\n\tconst preloadLinks = [];\n\tif (manifest) matches.forEach((match) => {\n\t\tmanifest.routes[match.routeId]?.preloads?.forEach((preload) => {\n\t\t\tpreloadLinks.push({\n\t\t\t\ttag: \"link\",\n\t\t\t\tattrs: {\n\t\t\t\t\t...getScriptPreloadAttrs(manifest, preload, assetCrossOrigin),\n\t\t\t\t\tnonce\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\tconst styles = matches.flatMap((match) => match.styles ?? []).filter((style) => style !== void 0).map(({ children, ...attrs }) => ({\n\t\ttag: \"style\",\n\t\tattrs: {\n\t\t\t...attrs,\n\t\t\tnonce\n\t\t},\n\t\tchildren\n\t}));\n\tconst headScripts = matches.flatMap((match) => match.headScripts ?? []).filter((script) => script !== void 0).map(({ children, ...script }) => ({\n\t\ttag: \"script\",\n\t\tattrs: {\n\t\t\t...script,\n\t\t\tnonce\n\t\t},\n\t\tchildren\n\t}));\n\tconst tags = [];\n\tappendUniqueUserTags(tags, resultMeta);\n\ttags.push(...preloadLinks);\n\tappendUniqueUserTags(tags, constructedLinks);\n\ttags.push(...manifestCssTags);\n\tappendUniqueUserTags(tags, styles);\n\tappendUniqueUserTags(tags, headScripts);\n\treturn tags;\n}\n/**\n* Build the head/link/meta/script tags from the renderable presented prefix.\n* Used internally by `HeadContent`.\n*/\nvar useTags = (assetCrossOrigin) => {\n\tconst router = useRouter();\n\tconst nonce = router.options.ssr?.nonce;\n\tif (isServer ?? router.isServer) return buildTagsFromMatches(router, nonce, router.stores.matches.get(), assetCrossOrigin);\n\tconst selectTags = React$1.useCallback((matches) => buildTagsFromMatches(router, nonce, matches, assetCrossOrigin), [\n\t\tassetCrossOrigin,\n\t\tnonce,\n\t\trouter\n\t]);\n\treturn useStore(router.stores.matches, selectTags, deepEqual);\n};\n//#endregion\nexport { useTags };\n\n//# sourceMappingURL=headContentUtils.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { Asset } from \"./Asset.js\";\nimport { useTags } from \"./headContentUtils.js\";\nimport { createElement } from \"react\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\n//#region src/HeadContent.tsx\n/**\n* Render route-managed head tags (title, meta, links, styles, head scripts).\n* Place inside the document head of your app shell.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management\n*/\nfunction HeadContent(props) {\n\tconst tags = useTags(props.assetCrossOrigin);\n\tconst nonce = useRouter().options.ssr?.nonce;\n\treturn /* @__PURE__ */ jsx(Fragment, { children: tags.map((tag) => /* @__PURE__ */ createElement(Asset, {\n\t\t...tag,\n\t\tkey: `tsr-meta-${JSON.stringify(tag)}`,\n\t\tnonce\n\t})) });\n}\n//#endregion\nexport { HeadContent };\n\n//# sourceMappingURL=HeadContent.js.map","import { useRouter } from \"./useRouter.js\";\nimport { Asset } from \"./Asset.js\";\nimport { _getAssetMatches, deepEqual } from \"@tanstack/router-core\";\nimport { createElement } from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Scripts.tsx\n/**\n* Render body script tags collected from route matches and SSR manifests.\n* Should be placed near the end of the document body.\n*/\nvar Scripts = () => {\n\tconst router = useRouter();\n\tconst nonce = router.options.ssr?.nonce;\n\tconst getScripts = (matches) => {\n\t\tmatches = _getAssetMatches(matches);\n\t\tconst scripts = matches.flatMap((match) => match.scripts ?? []).filter(Boolean).map(({ children, ...script }) => ({\n\t\t\ttag: \"script\",\n\t\t\tattrs: {\n\t\t\t\t...script,\n\t\t\t\tsuppressHydrationWarning: true,\n\t\t\t\tnonce\n\t\t\t},\n\t\t\tchildren\n\t\t}));\n\t\tconst manifest = router.ssr?.manifest;\n\t\tif (!manifest) return scripts;\n\t\tfor (const match of matches) {\n\t\t\tconst manifestScripts = manifest.routes[match.routeId]?.scripts;\n\t\t\tif (!manifestScripts) continue;\n\t\t\tfor (const asset of manifestScripts) scripts.push({\n\t\t\t\ttag: \"script\",\n\t\t\t\tattrs: {\n\t\t\t\t\t...asset.attrs,\n\t\t\t\t\tnonce\n\t\t\t\t},\n\t\t\t\tchildren: asset.children,\n\t\t\t\t...typeof asset.attrs?.src === \"string\" ? { preventScriptHoist: true } : {}\n\t\t\t});\n\t\t}\n\t\treturn scripts;\n\t};\n\tif (isServer ?? router.isServer) return renderScripts(router, getScripts(router.stores.matches.get()));\n\treturn renderScripts(router, useStore(router.stores.matches, getScripts, deepEqual));\n};\nfunction renderScripts(router, scripts) {\n\tif ((isServer ?? router.isServer) && router.serverSsr) {\n\t\tconst serverBufferedScript = router.serverSsr.takeBufferedScripts();\n\t\tif (serverBufferedScript) scripts.unshift(serverBufferedScript);\n\t}\n\treturn /* @__PURE__ */ jsx(Fragment, { children: scripts.map((asset, i) => /* @__PURE__ */ createElement(Asset, {\n\t\t...asset,\n\t\tkey: `tsr-scripts-${asset.tag}-${i}`\n\t})) });\n}\n//#endregion\nexport { Scripts };\n\n//# sourceMappingURL=Scripts.js.map","import type { ILocale } from '@luwiostack/locale'\nimport type { AnyRoute, AnyRouter } from '@tanstack/react-router'\nimport type { RouterConfig } from './create-router'\nimport type { RouteRegistry } from './registry'\n\n/** The locale metadata a router was built with — needed by {@link useRouter} to compute hrefs. */\nexport interface RouterMeta {\n registry: RouteRegistry\n config: RouterConfig\n /** The ids actually mounted — the registry minus anything dropped by `config.exclude`. */\n mounted: ReadonlySet<string>\n}\n\n// Keyed by the router instance so a built router carries its own registry + config without any public\n// API change. A WeakMap lets the metadata be garbage-collected alongside the router.\nconst store = new WeakMap<AnyRouter, RouterMeta>()\n\n/** Stamp the locale metadata onto a router. Called by {@link createRouter}. */\nexport function setRouterMeta(router: AnyRouter, meta: RouterMeta): void {\n store.set(router, meta)\n}\n\n/** Read the locale metadata off a router, if it was built by {@link createRouter}. */\nexport function getRouterMeta(router: AnyRouter): RouterMeta | undefined {\n return store.get(router)\n}\n\n/** Which of our routes a built TanStack route is, and the locale sub-tree it was mounted in. */\nexport interface RouteTag {\n id: string\n locale: ILocale\n}\n\n// The same trick per route: createRouter tags every TanStack route it builds from a RouteBuilder, so a\n// path TanStack matched can be mapped back to our route id. Synthetic routes (the locale layout, the\n// 404 catch-all, excluded-forbidden guards, legacy redirects) stay untagged: they aren't pages.\nconst tags = new WeakMap<AnyRoute, RouteTag>()\n\n/** Tag a built route with the route id + locale it came from. Called by {@link createRouter}. */\nexport function tagRoute(route: AnyRoute, tag: RouteTag): void {\n tags.set(route, tag)\n}\n\n/** The route id + locale a built route came from, or `undefined` for a synthetic route. */\nexport function getRouteTag(route: AnyRoute | undefined): RouteTag | undefined {\n return route ? tags.get(route) : undefined\n}\n","import { type ILocale, Locale } from '@luwiostack/locale'\nimport {\n type AnyRouter,\n notFound as tanstackNotFound,\n redirect as tanstackRedirect,\n useRouterState,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport type { RouterConfig, StatusPages } from './create-router'\nimport type { RouteRegistry } from './registry'\nimport type { RouteBuilder } from './route-builder'\nimport type { RouteFailure } from './route-hooks'\nimport { getRouterMeta, getRouteTag } from './router-meta'\n\n/** A full {@link ILocale}, or a locale code like `'nl-BE'`. */\nexport type LocaleInput = ILocale | string\n/** Path params — fill `$param` segments and the splat (`$` → `params['*']`). */\nexport type PathParams = Record<string, string>\n/** Query string params — `null`/`undefined` values are dropped. */\nexport type QueryParams = Record<string, string | number | boolean | null | undefined>\n\n/**\n * **Opt-in** route typing. Augment this interface (module augmentation) to map each route `id` to\n * its `params` and/or `search` shape; `href`, `path`, `absolute` and `navigate` then check the id,\n * require the right `params`, type `query`, and reject unknown ids. Leave it empty — the default —\n * and everything falls back to a loose `string` id + {@link PathParams} / {@link QueryParams}, so no\n * augmentation is required.\n *\n * @example\n * declare module '@luwiostack/router' {\n * interface RouteRegister {\n * about: {} // no params\n * 'blog.post': { params: { postId: string }; search: { page?: number } }\n * }\n * }\n */\n// biome-ignore lint/suspicious/noEmptyInterface: intentionally empty — consumers augment it.\nexport interface RouteRegister {}\n\n/** Every registered route id — or `string` while {@link RouteRegister} is left unaugmented. */\nexport type RouteId = [keyof RouteRegister] extends [never] ? string : keyof RouteRegister\n\n/** The `params` shape declared for an id in {@link RouteRegister}; loose {@link PathParams} otherwise. */\nexport type ParamsFor<Id extends RouteId> = Id extends keyof RouteRegister\n ? RouteRegister[Id] extends { params: infer P }\n ? P\n : PathParams\n : PathParams\n\n/** The `search` shape declared for an id in {@link RouteRegister}; loose {@link QueryParams} otherwise. */\nexport type SearchFor<Id extends RouteId> = Id extends keyof RouteRegister\n ? RouteRegister[Id] extends { search: infer S }\n ? S\n : QueryParams\n : QueryParams\n\n// `{ params }` — required when the id declares required params, optional otherwise (including the\n// unaugmented loose case, where `{}` is assignable to `PathParams`). The bare `{}` is deliberate\n// here: `{} extends T` is precisely the \"does T have no required keys?\" test.\ntype ParamsArg<Id extends RouteId> =\n // biome-ignore lint/complexity/noBannedTypes: `{} extends T` tests for no required keys\n {} extends ParamsFor<Id> ? { params?: ParamsFor<Id> } : { params: ParamsFor<Id> }\n\n/** Params for {@link IRouter.href}. */\nexport type HrefParams<Id extends RouteId = RouteId> = {\n /** A registered route id (e.g. `'about'`, `'blog.post'`). */\n id: Id\n /** Target locale. Defaults to the active locale. */\n locale?: LocaleInput\n query?: SearchFor<Id>\n hash?: string\n /**\n * Add the current page to the URL as `?referrer=`, so the page you're sending the user to can send\n * them back with {@link IRouter.goToReferrer}. Off unless you ask for it.\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.absolute}. */\nexport type AbsoluteHrefParams<Id extends RouteId = RouteId> = HrefParams<Id> & {\n /**\n * Origin to prepend. Defaults to the router's `origin` config (set it for SSR / pre-render), and\n * only then to `window.location.origin` in the browser.\n */\n baseUrl?: string\n}\n\n/** Params for {@link IRouter.path}. */\nexport type PathParamsInput<Id extends RouteId = RouteId> = {\n id: Id\n locale?: LocaleInput\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.navigate}. */\nexport type NavigateParams<Id extends RouteId = RouteId> = {\n /** Target route id (e.g. `'about'`, `'blog.post'`) — the same id `href` takes. */\n id: Id\n from?: string\n query?: SearchFor<Id>\n hash?: string\n /** Omit to stay in the active locale; set to navigate to that locale's path. */\n locale?: LocaleInput\n /** Replace the current history entry instead of pushing a new one. */\n replace?: boolean\n state?: Record<string, unknown>\n /** `'_blank'` opens the resolved absolute URL in a new tab. */\n target?: '_self' | '_blank'\n /**\n * Add the current page to the URL as `?referrer=`, so the page you're sending the user to can send\n * them back with {@link IRouter.goToReferrer}. Off unless you ask for it.\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.redirect} — the same id-based shape as {@link NavigateParams}. */\nexport type RedirectParams<Id extends RouteId = RouteId> = {\n /** Target route id (e.g. `'about'`, `'blog.post'`) — the same id `href` takes. */\n id: Id\n /** Omit to redirect within the active locale; set to target another locale's path. */\n locale?: LocaleInput\n query?: SearchFor<Id>\n hash?: string\n /** Replace the current history entry instead of pushing a new one. */\n replace?: boolean\n /** HTTP status code for the redirect (SSR). */\n statusCode?: number\n /**\n * Add the page being loaded to the URL as `?referrer=`: from a guard, the page the user was trying\n * to reach. The destination sends them back with {@link IRouter.goToReferrer}. Off by default for\n * `redirect()`; **on** by default for `forbidden()` (pass `referrer: false` to leave it out).\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Options for {@link IRouter.referrer}, `canGoToReferrer` and `goToReferrer`. */\nexport interface ReferrerOptions {\n /**\n * Check this value instead of the current URL's `?referrer=` — e.g. one carried in an OAuth `state`.\n * It is just as untrusted, so it gets the same checks. Once `from` is given the URL isn't read at\n * all: `from: undefined` (nothing in `state`) means there is no referrer.\n */\n from?: string | null\n}\n\n/** A locale-aware router, returned by {@link useRouter}. */\nexport interface IRouter {\n /** The active locale. */\n locale: ILocale\n /** The active route's id — `undefined` before the first match resolves. */\n routeId: string | undefined\n /** Every locale this router was configured with. */\n locales: ILocale[]\n /**\n * Whether a route id is mounted in this router — i.e. registered and not dropped by\n * `config.exclude`. Pass a locale to also require the route be available in that locale (it and\n * its non-layout ancestors aliased there). Returns `false` for unknown ids rather than throwing.\n */\n has(id: string, locale?: LocaleInput): boolean\n /**\n * The locales a route id is available in — those it (and its non-layout ancestors) are aliased\n * for. Empty if the route was excluded. Use it to build a language switcher that only offers valid\n * locales, or hreflang alternates.\n */\n availableLocales(id: RouteId): ILocale[]\n /** Navigate to a route id (optionally in another locale). */\n navigate<Id extends RouteId>(params: NavigateParams<Id>): Promise<void>\n /**\n * A redirect to a route id, to **throw** from a `beforeLoad` / `loader` (or component) — same\n * id-based shape as {@link IRouter.navigate}. `throw router.redirect({ id: 'login' })`.\n */\n redirect<Id extends RouteId>(params: RedirectParams<Id>): ReturnType<typeof tanstackRedirect>\n /** A not-found result to **throw** from a `beforeLoad` / `loader`. `throw router.notFound()`. */\n notFound(options?: Parameters<typeof tanstackNotFound>[0]): ReturnType<typeof tanstackNotFound>\n /**\n * A **forbidden** result to **throw** from a `beforeLoad` / `loader` guard — a locale-aware redirect\n * to `statusPages[403]` (falling back to `statusPages.default` if 403 has no dedicated page).\n * `throw router.forbidden()`. It adds the page being loaded as `?referrer=` by default, so the 403\n * page (typically sign-in) can send the user back with {@link IRouter.goToReferrer}; pass\n * `referrer: false` to leave it out. The target page can read\n * `useRouteFailure()` for `{ status: 403 }`.\n */\n forbidden(params?: Omit<RedirectParams, 'id'>): ReturnType<typeof tanstackRedirect>\n /**\n * The **referrer**: the page in the current URL's `?referrer=` (added by `forbidden()`, or with\n * `referrer: true`),\n * turned back into a route — `{ id, params, query?, hash?, locale? }` — or `undefined` when there is\n * none or it isn't safe to follow. Not the browser's `document.referrer`, and not history.\n *\n * `?referrer=` is untrusted — anyone can link to `/sign-in?referrer=https://evil.example` — so it is\n * checked every time it's read: it must be a path on this site that the router serves with a page\n * (not another origin, not unknown, excluded or behind a 403 guard), and not the current route or\n * a `statusPages` page (a loop).\n *\n * The route has no `locale`, so it resolves in the **active** locale: someone who switched language\n * on the sign-in page goes back in the new one. It keeps its own locale only when the route doesn't\n * exist in the active one. It reads the raw query string, so no route has to declare `referrer` in\n * its `validateSearch`.\n *\n * Pass `from` to check a referrer that arrived some other way, such as inside an OAuth `state`\n * after the round trip through an identity provider. It gets exactly the same checks.\n *\n * @example\n * // sign-in route: already signed in? skip the page\n * const back = context.router.referrer()\n * if (getSession()) throw context.router.redirect(back ?? { id: 'dashboard' })\n */\n referrer(options?: ReferrerOptions): HrefParams<RouteId> | undefined\n /** Whether there is a safe {@link IRouter.referrer} to go to — the referrer twin of `canGoBack()`. */\n canGoToReferrer(options?: ReferrerOptions): boolean\n /**\n * Navigate to the {@link IRouter.referrer}; does nothing when there is none. The referrer twin of\n * `goBack()`, which follows browser history instead.\n *\n * @example\n * router.canGoToReferrer() ? router.goToReferrer({ replace: true }) : router.navigate({ id: 'dashboard' })\n */\n goToReferrer(options?: ReferrerOptions & { replace?: boolean }): Promise<void>\n /** Re-run the active route's loaders. */\n reload(): Promise<void>\n /** Navigate back in history. */\n goBack(): Promise<void>\n /** Whether there is history to go back to. */\n canGoBack(): boolean\n /** The localized pathname for a route id (no query/hash). */\n path<Id extends RouteId>(params: PathParamsInput<Id>): string\n /** A root-relative href: pathname + query + hash. */\n href<Id extends RouteId>(params: HrefParams<Id>): string\n /** An absolute URL: origin + href. */\n absolute<Id extends RouteId>(params: AbsoluteHrefParams<Id>): string\n}\n\n// The runtime is locale-parameterised and id-addressed, so the impl works in loose `string` terms;\n// this shape checks that impl, and useRouter() casts it up to the generic {@link IRouter} surface.\ninterface LooseRouter {\n locale: ILocale\n routeId: string | undefined\n locales: ILocale[]\n has(id: string, locale?: LocaleInput): boolean\n availableLocales(id: string): ILocale[]\n navigate(params: {\n id: string\n from?: string\n params?: PathParams\n query?: QueryParams\n hash?: string\n locale?: LocaleInput\n replace?: boolean\n state?: Record<string, unknown>\n target?: '_self' | '_blank'\n referrer?: boolean\n }): Promise<void>\n redirect(params: {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n referrer?: boolean\n }): ReturnType<typeof tanstackRedirect>\n notFound(options?: Parameters<typeof tanstackNotFound>[0]): ReturnType<typeof tanstackNotFound>\n forbidden(params?: {\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n referrer?: boolean\n }): ReturnType<typeof tanstackRedirect>\n referrer(options?: ReferrerOptions): LooseHref | undefined\n canGoToReferrer(options?: ReferrerOptions): boolean\n goToReferrer(options?: ReferrerOptions & { replace?: boolean }): Promise<void>\n reload(): Promise<void>\n goBack(): Promise<void>\n canGoBack(): boolean\n path(params: { id: string; locale?: LocaleInput; params?: PathParams }): string\n href(params: LooseHref): string\n absolute(params: LooseHref & { baseUrl?: string }): string\n}\n\ninterface LooseHref {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n referrer?: boolean\n}\n\n/** The query param the referrer travels in. */\nconst REFERRER = 'referrer'\n\n// A throwaway origin to parse a root-relative href against: if the parsed origin differs, the value\n// pointed at another host (`//evil`, `/\\evil`, an absolute URL).\nconst SAME_ORIGIN = 'http://same-origin.invalid'\n\n// Fill one segment from params. A named `$param` is required — missing it throws rather than\n// silently dropping the segment (which would yield a plausible but wrong URL). The splat `$` may\n// legitimately be empty (it then matches the route itself), so it falls back to ''.\nconst fillSegment = (seg: string, params: PathParams, id: string): string => {\n if (seg === '$') return params['*'] ?? ''\n if (!seg.startsWith('$')) return seg\n const name = seg.slice(1)\n const value = params[name]\n if (value == null) {\n throw new Error(`useRouter: route \"${id}\" requires path param \"${name}\".`)\n }\n return value\n}\n\n/**\n * root→self URL segments for a route id in a locale (layout routes contribute nothing).\n *\n * @throws If the parent chain is circular.\n */\nfunction segmentsFor(registry: RouteRegistry, id: string, locale: ILocale): string[] {\n const out: string[] = []\n const seen = new Set<string>()\n for (let b = registry.get(id); b; b = b.parent ? registry.get(b.parent) : undefined) {\n if (seen.has(b.id)) {\n throw new Error(`useRouter: route \"${id}\" has a circular parent chain (at \"${b.id}\").`)\n }\n seen.add(b.id)\n if (!b.layout) out.unshift(b.slugFor(locale))\n }\n return out\n}\n\n/**\n * Resolve a route id + locale to its localized pathname. Pure and exported for testing.\n *\n * `config` may be omitted — useful outside React (e.g. a route's `beforeLoad`, where `useRouter`\n * isn't available). Without it the path is always `/{locale}`-prefixed, the form that resolves in\n * every locale (including the unprefixed default). Pass `config` to honour `unprefixedDefault` and\n * strip the prefix for the default locale, exactly as {@link useRouter}'s `path` does.\n *\n * @throws If the id is not registered.\n */\nexport function routePath(\n registry: RouteRegistry,\n config: RouterConfig | undefined,\n id: string,\n locale: ILocale,\n params: PathParams = {},\n): string {\n if (!registry.get(id)) {\n throw new Error(`useRouter: unknown route id \"${id}\".`)\n }\n const body = segmentsFor(registry, id, locale)\n // An alias may itself be a multi-segment path (e.g. `'blog/$postId'`), so split before filling —\n // each `$param` / splat is resolved individually.\n .flatMap((slug) => slug.split('/'))\n .map((s) => fillSegment(s, params, id))\n .filter(Boolean)\n .join('/')\n const unprefixed = config?.unprefixedDefault === true && locale.code === config.defaultLocale.code\n const prefix = unprefixed ? '' : `/${locale.code}`\n return `${prefix}/${body}`.replace(/\\/{2,}/g, '/').replace(/(.)\\/$/, '$1') || '/'\n}\n\n/**\n * The locales a route id is available in: every configured locale for which the route and all of its\n * non-layout ancestors have an explicit alias. Pure and exported for testing.\n *\n * @throws If the id is not registered.\n */\nexport function availableLocales(\n registry: RouteRegistry,\n config: RouterConfig,\n id: string,\n): ILocale[] {\n if (!registry.get(id)) {\n throw new Error(`useRouter: unknown route id \"${id}\".`)\n }\n const chain: RouteBuilder[] = []\n const seen = new Set<string>()\n for (let b = registry.get(id); b; b = b.parent ? registry.get(b.parent) : undefined) {\n if (seen.has(b.id)) {\n throw new Error(`useRouter: route \"${id}\" has a circular parent chain (at \"${b.id}\").`)\n }\n seen.add(b.id)\n chain.push(b)\n }\n return config.locales.filter((loc) => chain.every((b) => b.layout || b.hasAlias(loc)))\n}\n\n/**\n * The route id {@link RouterConfig.statusPages} sends a given HTTP status to: that status's own\n * entry, else `default` (always present — {@link StatusPages} requires it). Pure and exported for\n * testing; used for 404, 403, and every `beforeLoad`/`loader` failure.\n */\nexport function statusPageFor(statusPages: StatusPages, status: number): string {\n return statusPages[status] ?? statusPages.default\n}\n\n// Drop `null`/`undefined` entries but keep the original value types — TanStack owns search\n// serialization for navigate(), so numbers/booleans must survive for a typed `validateSearch`.\nconst definedEntries = (query: QueryParams): [string, string | number | boolean][] =>\n Object.entries(query).filter(([, v]) => v != null) as [string, string | number | boolean][]\n\nconst cleanSearch = (query: QueryParams): Record<string, string | number | boolean> =>\n Object.fromEntries(definedEntries(query))\n\nconst suffix = (query?: QueryParams, hash?: string): string => {\n const qs = query\n ? new URLSearchParams(definedEntries(query).map(([k, v]) => [k, String(v)])).toString()\n : ''\n return `${qs ? `?${qs}` : ''}${hash ? `#${hash.replace(/^#/, '')}` : ''}`\n}\n\n/**\n * Resolve the origin for an absolute URL, SSR-safe: an explicit `baseUrl` wins, then the router's\n * `config.origin` (set it for SSR / pre-render), then `window.location.origin` in the browser, and\n * finally `''` on the server when no origin was configured — never touching `window` when it's\n * absent. The single source of truth for both the runtime router API and the head/canonical emitter.\n */\nexport const resolveOrigin = (config: RouterConfig, baseUrl?: string): string =>\n baseUrl ?? config.origin ?? (typeof window !== 'undefined' ? window.location.origin : '')\n\n/** What {@link routerApi} needs to build a router for one active locale + route. */\nexport interface RouterApiInput {\n registry: RouteRegistry\n config: RouterConfig\n /** Ids that survived `exclude` — for `has` / `availableLocales`. */\n mounted: ReadonlySet<string>\n /** The active locale for this router (the matched sub-tree's locale). */\n active: ILocale\n /** The active route's id, or `undefined` before the first match. */\n activeId: string | undefined\n /**\n * The live TanStack router, for `navigate` / `reload` / `goBack`. A getter so a context-injected\n * router can reference the instance that's only built later; the URL/redirect methods work without\n * it, so `beforeLoad` can call `redirect` / `href` even before the router exists.\n */\n getTanstack: () => AnyRouter | undefined\n}\n\n/**\n * Build the locale-aware router surface — shared by {@link useRouter} (React) and by the router that\n * `createRouter` injects into every route's `context` (so `beforeLoad` / `loader` can `redirect`,\n * `notFound`, and generate hrefs without a hook). Bound to one active locale, so `redirect` /\n * `navigate` / `link` default to it exactly like `navigate` does.\n */\nexport function routerApi(input: RouterApiInput): LooseRouter {\n const { registry, config, mounted, active, activeId, getTanstack } = input\n\n const toLocale = (l?: LocaleInput): ILocale =>\n l == null\n ? active\n : typeof l !== 'string'\n ? l\n : (config.locales.find((x) => x.code === l) ?? Locale.new({ languageOrLocale: l }))\n\n const path: LooseRouter['path'] = ({ id, locale, params }) =>\n routePath(registry, config, id, toLocale(locale), params)\n\n // The location being loaded right now. Inside a guard's beforeLoad that's the page the user is\n // trying to reach; `state.location` would still be the page they're leaving.\n const latest = () =>\n getTanstack()?.latestLocation as { href?: string; searchStr?: string } | undefined\n\n const withReferrer = (query: QueryParams | undefined, referrer: boolean | undefined) => {\n const current = referrer ? latest()?.href : undefined\n return current === undefined ? query : { ...query, [REFERRER]: current }\n }\n\n const href: LooseRouter['href'] = ({ id, locale, params, query, hash, referrer }) =>\n path({ id, locale, params }) + suffix(withReferrer(query, referrer), hash)\n\n const absolute: LooseRouter['absolute'] = ({ baseUrl, ...rest }) =>\n resolveOrigin(config, baseUrl) + href(rest)\n\n const liveRouter = (): AnyRouter => {\n const t = getTanstack()\n if (!t)\n throw new Error('router: navigation is unavailable in this context (no live router yet).')\n return t\n }\n\n const navigate: LooseRouter['navigate'] = async ({\n id,\n from,\n params,\n query,\n hash,\n locale,\n replace,\n state,\n target,\n referrer,\n }) => {\n if (target === '_blank') {\n if (typeof window !== 'undefined')\n window.open(absolute({ id, locale, params, query, hash, referrer }), '_blank')\n return\n }\n const search = withReferrer(query, referrer)\n await liveRouter().navigate({\n to: path({ id, locale, params }),\n search: search ? cleanSearch(search) : undefined,\n hash,\n replace,\n state,\n from,\n } as never)\n }\n\n // Shared by `redirect()` and `forbidden()` — the latter is just the former bound to the 403 page,\n // a default statusCode, and a `RouteFailure` state; building both through one place keeps them from\n // drifting apart (e.g. one gaining a field the other forgets).\n const buildRedirect = (opts: {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n state?: RouteFailure\n referrer?: boolean\n }) => {\n const search = withReferrer(opts.query, opts.referrer)\n return tanstackRedirect({\n to: path({ id: opts.id, locale: opts.locale, params: opts.params }),\n search: search ? cleanSearch(search) : undefined,\n hash: opts.hash,\n replace: opts.replace,\n ...(opts.statusCode != null ? { statusCode: opts.statusCode } : {}),\n ...(opts.state ? { state: opts.state } : {}),\n } as never)\n }\n\n const redirect: LooseRouter['redirect'] = (params) => buildRedirect(params)\n\n const notFound: LooseRouter['notFound'] = (options) => tanstackNotFound(options)\n\n const forbidden: LooseRouter['forbidden'] = (params) =>\n buildRedirect({\n id: statusPageFor(config.statusPages, 403),\n locale: params?.locale,\n params: params?.params,\n query: params?.query,\n hash: params?.hash,\n replace: params?.replace,\n statusCode: params?.statusCode ?? 403,\n state: { status: 403 },\n referrer: params?.referrer ?? true, // a 403 page (sign-in) nearly always wants to send them back\n })\n\n const referrer: LooseRouter['referrer'] = (options) => {\n // 1. A root-relative path on this site — never another origin.\n const raw =\n options && 'from' in options\n ? options.from\n : new URLSearchParams(latest()?.searchStr ?? '').get(REFERRER)\n if (typeof raw !== 'string' || !raw.startsWith('/') || /^\\/[/\\\\]/.test(raw)) return undefined\n let url: URL\n try {\n url = new URL(raw, SAME_ORIGIN)\n } catch {\n return undefined\n }\n if (url.origin !== SAME_ORIGIN) return undefined\n\n // 2. A page the router serves: let TanStack match it and map the route back to ours. Unknown\n // paths hit the 404 catch-all and excluded-forbidden paths a 403 guard — both untagged.\n const live = getTanstack()\n if (!live) return undefined\n const [, rawParams, foundRoute] = live.getMatchedRoutes(url.pathname)\n const tag = getRouteTag(foundRoute)\n if (!tag) return undefined\n\n // 3. Not a loop: this very route, or a status page.\n if (tag.id === activeId || Object.values(config.statusPages).includes(tag.id)) return undefined\n\n const { _splat: _, ...params } = rawParams // TanStack also mirrors the splat as `_splat`\n url.searchParams.delete(REFERRER) // never chain referrers\n const query = Object.fromEntries(url.searchParams)\n const hash = url.hash.slice(1)\n const inActive = availableLocales(registry, config, tag.id).some((l) => l.code === active.code)\n return {\n id: tag.id,\n params,\n ...(Object.keys(query).length > 0 ? { query } : {}),\n ...(hash ? { hash } : {}),\n ...(inActive ? {} : { locale: tag.locale }), // no locale → the active one\n }\n }\n\n return {\n locale: active,\n routeId: activeId,\n locales: config.locales,\n has: (id, locale) => {\n if (!mounted.has(id)) return false\n if (locale == null) return true\n const code = toLocale(locale).code\n return availableLocales(registry, config, id).some((l) => l.code === code)\n },\n availableLocales: (id) => (mounted.has(id) ? availableLocales(registry, config, id) : []),\n path,\n href,\n absolute,\n redirect,\n notFound,\n forbidden,\n referrer,\n canGoToReferrer: (options) => referrer(options) !== undefined,\n goToReferrer: async ({ replace, ...options } = {}) => {\n const target = referrer(options)\n if (target) await navigate({ ...target, replace })\n },\n reload: () => liveRouter().invalidate(),\n goBack: async () => {\n liveRouter().history.back()\n },\n canGoBack: () =>\n getTanstack()?.history.canGoBack?.() ??\n (typeof window !== 'undefined' && window.history.length > 1),\n navigate,\n }\n}\n\n/**\n * A locale-aware router hook for routers built with {@link createRouter}.\n *\n * Generates hrefs and navigates by **route id + locale**, resolving translated URL segments from the\n * registry. Switching locale simply navigates to that locale's real path. `redirect` / `notFound` are\n * also on the same object (usually thrown from a route's `beforeLoad` via `context.router`).\n *\n * @throws If used outside a router created by {@link createRouter}.\n *\n * @example\n * const { router } = useRouter()\n * router.href({ id: 'about', locale: 'nl-BE' }) // '/nl-BE/over-ons'\n * await router.navigate({ id: 'about', locale: 'fr-BE' })\n */\nexport function useRouter(): { router: IRouter } {\n const tanstack = useTanstackRouter()\n const meta = getRouterMeta(tanstack)\n if (!meta) {\n throw new Error('useRouter must be used inside a router created by createRouter().')\n }\n const { registry, config, mounted } = meta\n\n const leaf = useRouterState({\n select: (s) => s.matches.at(-1)?.context as { locale?: ILocale; routeId?: string } | undefined,\n })\n\n const router = routerApi({\n registry,\n config,\n mounted,\n active: leaf?.locale ?? config.defaultLocale,\n activeId: leaf?.routeId,\n getTanstack: () => tanstack,\n })\n\n // Bridge the loose runtime impl to the generic public surface (see LooseRouter's note).\n return { router: router as unknown as IRouter }\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport { Locale as LocaleProvider } from '@luwiostack/locale/react'\nimport type { AnyRoute, AnyRouter } from '@tanstack/react-router'\nimport {\n createRootRoute,\n createRoute as createTanstackRoute,\n createRouter as createTanstackRouter,\n HeadContent,\n isNotFound,\n isRedirect,\n Outlet,\n redirect,\n Scripts,\n useRouterState,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport { useEffect } from 'react'\nimport type { RouteRegistry } from './registry'\nimport type { RouteBuilder } from './route-builder'\nimport type { RouteFailure } from './route-hooks'\nimport { setRouterMeta, tagRoute } from './router-meta'\nimport {\n availableLocales,\n type IRouter,\n resolveOrigin,\n routePath,\n routerApi,\n statusPageFor,\n} from './use-router'\n\n/**\n * Route ids for the pages `createRouter` redirects to on a failure, keyed by HTTP status. `default`\n * is **required** — the catch-all covering any status with no entry of its own, or a `beforeLoad`/\n * `loader` failure with no status at all (a `TypeError`, a genuine bug). Every other key is optional:\n * add `404`/`403` as best practice (a dedicated not-found / forbidden page), and any other status\n * (`503`, `429`, …) for a dedicated page per failure kind — anything you don't list falls through to\n * `default`, so the router always has *somewhere* to send a failure.\n *\n * @example\n * { 404: 'notFound', 403: 'signin', 503: 'maintenance', default: 'serverError' }\n * @example\n * { default: 'error' } // the bare minimum: one page for absolutely everything\n */\nexport type StatusPages = Record<number, string> & { default: string }\n\n/** Configuration for {@link createRouter}. */\nexport interface RouterConfig {\n /** The locales to mount. Each becomes a `/{locale.code}` sub-tree. */\n locales: ILocale[]\n /** Where `/` redirects to, and the locale used for the {@link RouterConfig.unprefixedDefault} tree. */\n defaultLocale: ILocale\n /**\n * Absolute origin (`https://example.com`) used to build the `canonical` and `hreflang` URLs the\n * router emits into every page's head. Defaults to `window.location.origin`; set it for SSR /\n * pre-render, where there is no `window`.\n */\n origin?: string\n /** Also mount the default locale without a `/{locale}` prefix (so `/about` resolves as well). */\n unprefixedDefault?: boolean\n /** Drop these route ids and all of their descendants. Everything else is mounted. */\n exclude?: string[]\n /**\n * How a URL that matches an **excluded** route's aliased path responds.\n *\n * - `'notFound'` (default) — the excluded route is dropped entirely, so its URL falls through to\n * the not-found catch-all like any other miss (→ **404**, via {@link RouterConfig.statusPages}).\n * - `'forbidden'` — the excluded route's *path* stays mounted (in every locale it's aliased in) as a\n * guard that redirects to `statusPages[403]` with a **403** status. Use it when a route is\n * disabled by config/feature-flag but should read as \"exists, but not available\" rather than\n * \"never existed\".\n *\n * This is scoped to `exclude` (a route id within a mounted locale). A **missing locale** is\n * unaffected: a `/{code}` sub-tree that isn't in {@link RouterConfig.locales} has no node at all, so\n * `/{code}/…` always **404**s regardless of this setting — there is nothing to forbid.\n */\n excludeStatus?: 'notFound' | 'forbidden'\n /**\n * Route ids for the router's generic 404 / 403 / 5xx handling — so no route ever needs its own\n * try/catch, or its own \"where does a rejected request go\" logic:\n *\n * - **404** (`statusPages[404]`) — where an unmatched URL, or an explicit `throw notFound()` from a\n * *matched* route (a loader that couldn't find its resource), redirects, in the active locale.\n * - **403** (`statusPages[403]`) — where `context.router.forbidden()` / `useRouter().router.forbidden()`\n * redirects (typically sign-in), adding `?referrer=` so it can send the user back.\n * - **Any other status** (e.g. `503`, `429`) — a dedicated page for a `beforeLoad`/`loader` failure\n * whose thrown value carries that `status` (an `HttpError` from `@luwiostack/http`, or anything\n * shaped like one).\n * - **`default`** — the catch-all: 404/403 fall back to it when not given their own entry, and so\n * does any other unlisted status or a `beforeLoad`/`loader` failure with no status at all.\n *\n * A `beforeLoad`/`loader` failure is logged (`console.error`, so it still reaches an error tracker)\n * before the redirect. Every status page can read {@link useRouteFailure} for `{ status, error? }` —\n * `error` (the underlying message) is only present for an actual `beforeLoad`/`loader` failure; a\n * 404/403 carries `status` only, since there's no exception behind either.\n *\n * **Only the data lifecycle is covered.** An error thrown by a route's own `component` DURING\n * RENDER is a UI bug, not a load failure, and is never touched by `statusPages` — that's left\n * entirely to the implementor: that route's own `errorComponent`, {@link RouterConfig.rootErrorComponent},\n * or TanStack's own default.\n *\n * @see {@link StatusPages}\n */\n statusPages: StatusPages\n /**\n * Permanent (301) redirects for **legacy URLs** — old bookmarks / indexed links that no longer\n * match a route (e.g. after renaming locale codes). A map of `pattern → target`:\n *\n * - **Wildcard** — a pattern ending in `/*` captures the rest of the path and appends it to the\n * target's `/*`: `'/nl/*': '/nl-BE/*'` sends `/nl/over-ons` → `/nl-BE/over-ons` (query + hash\n * preserved). The bare prefix redirects too: `/nl` → `/nl-BE`.\n * - **Exact** — a pattern with no `*` redirects that one path: `'/pricing': '/plans'`.\n *\n * Patterns are matched before the not-found catch-all, so a legacy URL redirects instead of\n * 404-ing. A pattern must not collide with a real mounted path (old locale codes differ from the\n * new ones, so they don't).\n */\n redirects?: Record<string, string>\n /** Extra options forwarded to TanStack's `createRouter` (`context`, `defaultPreload`, …). */\n router?: Record<string, unknown>\n /**\n * The **root** route's component. Defaults to one that renders `<HeadContent />` (so the SEO head\n * the router computes per page — title/og/canonical/hreflang — actually reaches the document),\n * `<Outlet />`, and `<Scripts />` (the SSR hydration mount point). Override it to own the document\n * shell yourself — but then you must render `<HeadContent />` and `<Scripts />` (both re-exported\n * from `@luwiostack/router`), or those emitted tags won't appear.\n */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n rootComponent?: any\n /**\n * The root `errorComponent` — the top-level boundary for an uncaught RENDER error (from a route's\n * `component`) that no nested route's own `errorComponent` caught. Unrelated to\n * {@link RouterConfig.statusPages}, which handles `beforeLoad`/`loader` failures instead, before a\n * component ever renders. Omit it and a render error falls through to TanStack's own default.\n */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n rootErrorComponent?: any\n}\n\n/**\n * The default root component: emit the per-page head the router computes (`<HeadContent />`), render\n * the matched tree (`<Outlet />`), and mount SSR hydration scripts (`<Scripts />`). Replace it with\n * {@link RouterConfig.rootComponent} to own the shell — then render `<HeadContent />`/`<Scripts />`\n * yourself.\n */\nfunction DefaultRoot() {\n return (\n <>\n <HeadContent />\n <Outlet />\n <Scripts />\n </>\n )\n}\n\n/** The active locale for a boundary component rendered where no route may have matched at all. */\nfunction useBoundaryLocale(defaultLocale: ILocale): ILocale {\n return (\n useRouterState({\n select: (s) => (s.matches.at(-1)?.context as { locale?: ILocale } | undefined)?.locale,\n }) ?? defaultLocale\n )\n}\n\n/**\n * The root route's `notFoundComponent`: redirects (client-side, replacing history) to\n * `statusPages[404]` (falling back to `statusPages.default`) in the active locale, carrying\n * `{ status: 404 }` for the target page's {@link useRouteFailure}. This is what catches an explicit\n * `throw notFound()` from a *matched* route's own `loader`/`beforeLoad` with no nested\n * `notFoundComponent` of its own — an unmatched URL is already redirected earlier, by the per-locale\n * catch-all `beforeLoad`. Always wired: a target is always available, since `statusPages.default` is\n * required — there is no escape hatch to render inline instead, matching `forbidden()`'s own \"always\n * redirects\" behavior.\n */\nfunction notFoundRedirectComponent(\n registry: RouteRegistry,\n config: RouterConfig,\n // biome-ignore lint/suspicious/noExplicitAny: assigned into TanStack's own (any-typed here) option\n): any {\n const id = statusPageFor(config.statusPages, 404)\n return function NotFoundRedirect() {\n const tanstack = useTanstackRouter()\n const locale = useBoundaryLocale(config.defaultLocale)\n useEffect(() => {\n tanstack.navigate({\n to: routePath(registry, config, id, locale),\n replace: true,\n state: { status: 404 } satisfies RouteFailure,\n } as never)\n }, [locale, tanstack])\n return null\n }\n}\n\n// TanStack's createRoute/createRouter are heavily generic; a locale-parameterised tree is built at\n// runtime, so we forward plain objects through a single, well-contained cast boundary here.\ntype RouteInput = Record<string, unknown>\nconst buildRoute = createTanstackRoute as unknown as (options: RouteInput) => AnyRoute\nconst buildRouter = createTanstackRouter as unknown as (options: RouteInput) => AnyRouter\n\nconst toPath = (slug: string): string => (slug === '' ? '/' : `/${slug}`)\n\n/**\n * Throw a redirect to `to` for a resolved `statusPages` page — the router's 404/403/5xx guards all\n * go through this one place, so the `{ status, error? }` state {@link useRouteFailure} reads (and the\n * matching HTTP `statusCode`) can never drift between them.\n */\nfunction throwStatusRedirect(to: string, status: number, error?: RouteFailure['error']): never {\n throw redirect({\n to,\n statusCode: status,\n state: { status, ...(error ? { error } : {}) } satisfies RouteFailure,\n } as never)\n}\n\n/**\n * Synthetic root routes for `config.redirects` — permanent (301) legacy-URL redirects. A `/prefix/*`\n * pattern becomes a splat route that appends the captured tail (`params['*']`) to the target base,\n * plus a bare-prefix route so `/prefix` itself redirects; a pattern without `*` is an exact redirect.\n * The current URL's query and hash are carried over. Matched before the not-found catch-all.\n */\nfunction redirectRoutes(config: RouterConfig, root: AnyRoute): AnyRoute[] {\n const strip = (p: string) => p.replace(/^\\/+/, '')\n // Throw a 301 to `to`, carrying over the incoming query + hash from the TanStack `location` ctx.\n const go = (to: string, ctx: Record<string, unknown>): never => {\n const loc = ctx.location as { search?: Record<string, unknown>; hash?: string } | undefined\n throw redirect({\n to,\n ...(loc?.search && Object.keys(loc.search).length > 0 ? { search: loc.search } : {}),\n ...(loc?.hash ? { hash: loc.hash } : {}),\n statusCode: 301,\n } as never)\n }\n\n const out: AnyRoute[] = []\n for (const [pattern, target] of Object.entries(config.redirects ?? {})) {\n if (pattern.endsWith('/*')) {\n const prefix = strip(pattern.slice(0, -2)) // '/nl/*' → 'nl'\n const base = target.replace(/\\/\\*$/, '') // '/nl-BE/*' → '/nl-BE'\n // /nl/<rest> → /nl-BE/<rest>\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: `${prefix}/$`,\n beforeLoad: (ctx: Record<string, unknown>) => {\n const rest = (ctx.params as Record<string, string> | undefined)?.['*'] ?? ''\n return go(rest ? `${base}/${rest}` : base, ctx)\n },\n }),\n )\n // the bare prefix itself: /nl → /nl-BE\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: prefix,\n beforeLoad: (ctx: Record<string, unknown>) => go(base, ctx),\n }),\n )\n } else {\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: strip(pattern),\n beforeLoad: (ctx: Record<string, unknown>) => go(target, ctx),\n }),\n )\n }\n }\n return out\n}\n\n/**\n * Expand a {@link RouteRegistry} into a TanStack router: one localized sub-tree per configured\n * locale, with translated URL segments resolved from each route's aliases.\n *\n * Every TanStack option on a route (`loader`, `beforeLoad`, `component`, …) is forwarded\n * untouched. Before a route's own `beforeLoad` runs, `{ routeId, locale }` is injected into the\n * route context, so loaders and guards can read the active {@link ILocale}.\n *\n * @example\n * const router = createRouter(routeRegistry, {\n * locales: ['en-BE', 'nl-BE'].map((l) => Locale.new({ languageOrLocale: l })),\n * defaultLocale: Locale.new({ languageOrLocale: 'en-BE' }),\n * statusPages: { 404: 'notFound', 403: 'signin', default: 'serverError' },\n * })\n */\nexport function createRouter(registry: RouteRegistry, config: RouterConfig): AnyRouter {\n // `excludeStatus: 'forbidden'` sends excluded URLs to the 403 page, so it must exist — fail loud at\n // build rather than silently 404ing (the tombstones would have no target to redirect to).\n if (config.excludeStatus === 'forbidden') {\n const forbiddenTarget = statusPageFor(config.statusPages, 403)\n if (!registry.get(forbiddenTarget)) {\n throw new Error(\n `createRouter: excludeStatus 'forbidden' needs its 403 page (\"${forbiddenTarget}\") to be registered.`,\n )\n }\n }\n const { kept: builders, tombstones } = planRoutes(registry.all(), config)\n // A URL-bearing route needs at least one alias — its localized URL segment. It then mounts in\n // exactly the locales it is aliased in (partial coverage is fine — a route can live in a subset of\n // locales). A route with no alias at all would mount nowhere, which is a definition mistake, so\n // catch it here at build. Layout routes (pathless, no URL) are exempt.\n for (const b of builders) {\n if (b.layout) continue\n if (b.aliasCount === 0) {\n throw new Error(\n `Route \"${b.id}\" has no alias — call .alias(locale, slug) at least once ` +\n `(only layout routes may omit it).`,\n )\n }\n // title + description are required on every URL-bearing route — the router emits them (and the\n // rest of the SEO head) itself. Only layout routes (no URL) are exempt.\n if (typeof b.options.title !== 'function') {\n throw new Error(\n `Route \"${b.id}\" has no title() — it's required for SEO (layout routes exempt).`,\n )\n }\n if (typeof b.options.description !== 'function') {\n throw new Error(`Route \"${b.id}\" has no description() — it's required for SEO.`)\n }\n }\n const byParent = groupByParent(builders)\n const mounted = new Set(builders.map((b) => b.id))\n // Excluded-forbidden guards (empty unless `excludeStatus: 'forbidden'`), grouped by the kept\n // ancestor they attach under so they mount alongside that node's real children.\n const tombstonesByParent = new Map<string | undefined, Tombstone[]>()\n for (const t of tombstones) {\n const list = tombstonesByParent.get(t.mountParent) ?? []\n list.push(t)\n tombstonesByParent.set(t.mountParent, list)\n }\n\n // The built router isn't available until the tree is assembled, but each route's `beforeLoad`\n // needs a router in context. Fill this holder right after `buildRouter`; by the time any\n // `beforeLoad` runs (request time), it's set — and the URL/redirect methods don't need it anyway.\n const routerRef: { current?: AnyRouter } = {}\n const apiCtx = { registry, config, mounted, getTanstack: () => routerRef.current }\n\n const root = createRootRoute({\n component: config.rootComponent ?? DefaultRoot,\n ...(config.rootErrorComponent ? { errorComponent: config.rootErrorComponent } : {}),\n notFoundComponent: notFoundRedirectComponent(registry, config),\n })\n\n // A locale sub-tree. `prefixed` gets a `/{code}` path segment; the unprefixed default gets a\n // PATHLESS layout (an `id`, not a `path`) so its children mount at their bare paths directly under\n // root — a `path: '/'` layout would be treated as an index and never nest `/home` under it.\n const mountLocale = (\n locale: ILocale,\n mount: { path: string } | { pathless: string },\n ): AnyRoute => {\n const layout = buildRoute({\n getParentRoute: () => root,\n ...('path' in mount ? { path: mount.path } : { id: mount.pathless }),\n beforeLoad: () => ({ locale }),\n component: () => (\n <LocaleProvider locale={locale}>\n <Outlet />\n </LocaleProvider>\n ),\n })\n\n // The 403 page's localized path, if it's available in this locale — the target every\n // excluded-forbidden tombstone in this locale redirects to. Undefined (no tombstones mounted, so\n // those paths fall through to 404) when that page isn't aliased here, mirroring the not-found\n // catch-all's own availability guard below.\n const fb = statusPageFor(config.statusPages, 403)\n const forbiddenTarget =\n tombstones.length > 0 && registry.get(fb)?.hasAlias(locale)\n ? routePath(registry, config, fb, locale)\n : undefined\n\n const build = (parentId: string | undefined, parent: AnyRoute): AnyRoute[] => {\n const routes = (byParent.get(parentId) ?? [])\n // A route mounts in a locale only if it's aliased there; layout routes (no URL) always mount.\n .filter((b) => b.layout || b.hasAlias(locale))\n .map((b) => {\n const head = withHead(b, locale, apiCtx)\n // title/description/head are OUR options (consumed by withHead) — strip them so they're not\n // forwarded to TanStack as unknown route options. loader is pulled out too, so it can be\n // wrapped in the same generic 500 handling as beforeLoad (see guardLoadPhase).\n const {\n title: _t,\n description: _d,\n head: _h,\n loader: userLoader,\n ...tanstackOptions\n } = b.options\n const route = buildRoute({\n ...tanstackOptions,\n getParentRoute: () => parent,\n ...(b.layout ? { id: b.id } : { path: toPath(b.slugFor(locale)) }),\n beforeLoad: withContext(b, locale, apiCtx),\n ...(userLoader\n ? {\n loader: guardLoadPhase(\n userLoader as (ctx: Record<string, unknown>) => unknown,\n apiCtx,\n locale,\n ),\n }\n : {}),\n ...(head ? { head } : {}),\n })\n // So router.referrer() can map a path TanStack matched back to this route (layouts never match).\n if (!b.layout) tagRoute(route, { id: b.id, locale })\n const children = build(b.id, route)\n return children.length ? route.addChildren(children) : route\n })\n\n // Excluded-forbidden guards under this node: mount at the excluded route's own slug (only where\n // it's aliased, and only if the forbidden target resolves in this locale), with a `$` splat so\n // descendant paths 403 too instead of 404ing.\n if (forbiddenTarget !== undefined) {\n for (const { builder } of tombstonesByParent.get(parentId) ?? []) {\n if (!builder.hasAlias(locale)) continue\n const guard = () => throwStatusRedirect(forbiddenTarget, 403)\n const node = buildRoute({\n getParentRoute: () => parent,\n path: toPath(builder.slugFor(locale)),\n beforeLoad: guard,\n })\n const splat = buildRoute({ getParentRoute: () => node, path: '$', beforeLoad: guard })\n routes.push(node.addChildren([splat]))\n }\n }\n return routes\n }\n\n const children = build(undefined, layout)\n\n // A synthetic catch-all: any path under this locale that matched no real route redirects to the\n // 404 page (in this locale). Added last and as a splat, so every real route — including the 404\n // page itself — matches first; only genuine misses reach it. Skipped for a locale the 404 page\n // isn't available in (it would have no URL there).\n const nf = statusPageFor(config.statusPages, 404)\n if (registry.get(nf) && (registry.get(nf)?.layout || registry.get(nf)?.hasAlias(locale))) {\n const target = routePath(registry, config, nf, locale)\n children.push(\n buildRoute({\n getParentRoute: () => layout,\n path: '$',\n beforeLoad: () => throwStatusRedirect(target, 404),\n }),\n )\n }\n\n return layout.addChildren(children)\n }\n\n const trees: AnyRoute[] = config.locales.map((l) => mountLocale(l, { path: `/${l.code}` }))\n\n // Legacy-URL 301 redirects (`/nl/*` → `/nl-BE/*`, …). Added before the not-found catch-all so a\n // matching old URL redirects instead of 404-ing; their concrete prefixes match before it anyway.\n trees.push(...redirectRoutes(config, root))\n\n if (config.unprefixedDefault) {\n // Also serve the default locale without a prefix: `/home` alongside `/{default}/home`. Its own\n // catch-all (added in mountLocale) already handles bare unmatched paths like `/typo`.\n trees.push(mountLocale(config.defaultLocale, { pathless: '__luwio_unprefixed__' }))\n } else {\n trees.push(\n buildRoute({\n getParentRoute: () => root,\n path: '/',\n beforeLoad: () => {\n throw redirect({ to: `/${config.defaultLocale.code}` })\n },\n }),\n )\n // Catch prefix-less unmatched paths (`/typo`, an unknown `/xx/…`) and send them to the default\n // locale's 404 page — locale sub-trees match their `/{code}` prefix first.\n const nf = statusPageFor(config.statusPages, 404)\n const dl = config.defaultLocale\n if (registry.get(nf) && (registry.get(nf)?.layout || registry.get(nf)?.hasAlias(dl))) {\n const target = routePath(registry, config, nf, dl)\n trees.push(\n buildRoute({\n getParentRoute: () => root,\n path: '$',\n beforeLoad: () => throwStatusRedirect(target, 404),\n }),\n )\n }\n }\n\n const routeTree = root.addChildren(trees)\n const router = buildRouter({ routeTree, ...config.router })\n routerRef.current = router\n // Carry the registry + config (and which ids survived exclude) so useRouter() can resolve route\n // ids to localized hrefs and answer availability checks.\n setRouterMeta(router, { registry, config, mounted })\n return router\n}\n\n/** Group builders by their parent id for tree assembly. */\nfunction groupByParent(builders: readonly RouteBuilder[]): Map<string | undefined, RouteBuilder[]> {\n const byParent = new Map<string | undefined, RouteBuilder[]>()\n for (const b of builders) {\n const list = byParent.get(b.parent) ?? []\n list.push(b)\n byParent.set(b.parent, list)\n }\n return byParent\n}\n\n/**\n * A route excluded under `excludeStatus: 'forbidden'` whose path still gets mounted as a 403 guard.\n * `mountParent` is the id of the nearest **kept** ancestor to attach under (or `undefined` for the\n * locale root); the builder carries the localized slug + aliases to mount at.\n */\ninterface Tombstone {\n builder: RouteBuilder\n mountParent: string | undefined\n}\n\n/** The plan {@link createRouter} builds from: the mounted routes plus any excluded-forbidden guards. */\ninterface RoutePlan {\n kept: RouteBuilder[]\n tombstones: Tombstone[]\n}\n\n/**\n * Resolve which routes to mount, and (under `excludeStatus: 'forbidden'`) which excluded routes keep\n * a 403 guard at their path. Every route is mounted by default; `exclude` drops a route and all of\n * its descendants — dropped for good with the default `excludeStatus`, or kept as a forbidden\n * tombstone otherwise.\n */\nfunction planRoutes(all: readonly RouteBuilder[], config: RouterConfig): RoutePlan {\n const byId = new Map(all.map((b) => [b.id, b]))\n const childrenOf = new Map<string | undefined, string[]>()\n for (const b of all) {\n const list = childrenOf.get(b.parent) ?? []\n list.push(b.id)\n childrenOf.set(b.parent, list)\n }\n\n const descendants = (id: string): string[] => {\n const out: string[] = []\n const seen = new Set<string>([id])\n const stack = [id]\n while (stack.length > 0) {\n const next = stack.pop()\n if (next === undefined) break\n for (const child of childrenOf.get(next) ?? []) {\n if (seen.has(child)) continue // guard against a circular parent chain\n seen.add(child)\n out.push(child)\n stack.push(child)\n }\n }\n return out\n }\n\n const keep = new Set(all.map((b) => b.id))\n for (const id of config.exclude ?? []) {\n keep.delete(id)\n for (const d of descendants(id)) keep.delete(d)\n }\n\n const kept = all.filter((b) => keep.has(b.id))\n for (const b of kept) {\n if (b.parent !== undefined && !keep.has(b.parent)) {\n throw new Error(`Route \"${b.id}\" has parent \"${b.parent}\", which is not in the built set.`)\n }\n }\n\n const tombstones =\n config.excludeStatus === 'forbidden' ? forbiddenTombstones(all, keep, byId) : []\n return { kept, tombstones }\n}\n\n/**\n * The 403 guards for excluded routes. A tombstone is mounted only at each **URL-bearing** excluded\n * route with no excluded URL-bearing ancestor — the topmost dropped route in a subtree — because a\n * `$` splat under it already covers every descendant path. (Excluded pathless layouts contribute no\n * segment, so their URL-bearing children become the tombstone roots.) It attaches under the nearest\n * *kept* ancestor; the removed ancestors in between are all pathless layouts, so the tombstone's own\n * slug is its full path there.\n */\nfunction forbiddenTombstones(\n all: readonly RouteBuilder[],\n keep: ReadonlySet<string>,\n byId: Map<string, RouteBuilder>,\n): Tombstone[] {\n // A dropped route already covered by an ancestor tombstone: it has a dropped, URL-bearing ancestor.\n const coveredByAncestor = (b: RouteBuilder): boolean => {\n for (let p = b.parent; p !== undefined; p = byId.get(p)?.parent) {\n const anc = byId.get(p)\n if (!anc) break\n if (!keep.has(anc.id) && !anc.layout) return true\n }\n return false\n }\n // The nearest ancestor that survived `exclude` (its route node exists to attach under), else the\n // locale root (`undefined`).\n const nearestKept = (b: RouteBuilder): string | undefined => {\n for (let p = b.parent; p !== undefined; p = byId.get(p)?.parent) {\n if (keep.has(p)) return p\n }\n return undefined\n }\n\n const tombstones: Tombstone[] = []\n for (const b of all) {\n if (keep.has(b.id) || b.layout) continue // mounted, or pathless (no URL to guard)\n if (coveredByAncestor(b)) continue // an ancestor tombstone's splat already 403s this path\n tombstones.push({ builder: b, mountParent: nearestKept(b) })\n }\n return tombstones\n}\n\n/** What {@link withContext} needs to build the per-route `context.router`. */\ninterface ApiCtx {\n registry: RouteRegistry\n config: RouterConfig\n mounted: Set<string>\n getTanstack: () => AnyRouter | undefined\n}\n\n/**\n * Wraps a route's `beforeLoad`/`loader` — the DATA lifecycle, which runs before the component ever\n * renders — so a genuine, unexpected error it throws redirects to the matching\n * {@link RouterConfig.statusPages} entry instead of leaving the match in TanStack's \"error\" state.\n * This is the router's generic 5xx handling, the same shape as its generic 404 and 403 handling: the\n * route never needs its own try/catch.\n *\n * A deliberate `redirect()` (how `forbidden()`'s 403 works too) or `notFound()` is control flow, not\n * a failure, and always passes through untouched. Everything else is logged (`console.error`, so it\n * still reaches the console / an error tracker) and turned into a redirect, carrying `{ status,\n * error: { message } }` as history state for the target page's {@link useRouteFailure} — `status` is\n * the thrown value's own `status` if it has a numeric one (an `HttpError`-shaped error), else 500.\n */\nfunction guardLoadPhase(\n fn: (ctx: Record<string, unknown>) => unknown,\n apiCtx: ApiCtx,\n locale: ILocale,\n): (ctx: Record<string, unknown>) => unknown {\n const onError = (error: unknown): never => {\n if (isRedirect(error) || isNotFound(error)) throw error\n console.error(error)\n const rawStatus = (error as { status?: unknown } | null)?.status\n const status = typeof rawStatus === 'number' ? rawStatus : 500\n const id = statusPageFor(apiCtx.config.statusPages, status)\n const message = error instanceof Error ? error.message : String(error)\n throwStatusRedirect(routePath(apiCtx.registry, apiCtx.config, id, locale), status, { message })\n }\n return (ctx: Record<string, unknown>) => {\n try {\n const result = fn(ctx)\n return result instanceof Promise ? result.catch(onError) : result\n } catch (error) {\n return onError(error)\n }\n }\n}\n\n/**\n * Wrap a route's `beforeLoad` so `{ routeId, locale, router }` is available in context — both to the\n * route's own `beforeLoad` and, merged with its return value, to every descendant. The injected\n * `router` is a locale-bound {@link IRouter} (same surface as `useRouter().router`), so a guard can\n * `throw context.router.redirect(...)` / `notFound()` without a hook. The user's `beforeLoad` is\n * wrapped in {@link guardLoadPhase}, so an unexpected throw generically redirects to `statusPages`.\n */\nfunction withContext(builder: RouteBuilder, locale: ILocale, apiCtx: ApiCtx) {\n const rawUser = builder.options.beforeLoad as\n | ((ctx: Record<string, unknown>) => unknown)\n | undefined\n const user = rawUser ? guardLoadPhase(rawUser, apiCtx, locale) : undefined\n // `locale` and `builder.id` are fixed for this (route × locale) binding, so build the router surface\n // ONCE here instead of on every match. Its `getTanstack` is a getter, so it still resolves the live\n // router lazily at request time. `base` is likewise stable and shared across matches.\n const router = routerApi({\n ...apiCtx,\n active: locale,\n activeId: builder.id,\n }) as unknown as IRouter\n const base = { routeId: builder.id, locale, router }\n // No user `beforeLoad` → nothing to await; return the injected context synchronously (TanStack\n // merges it onto the parent context for us), sparing every such route an async hop.\n if (!user) return () => base\n return async (ctx: Record<string, unknown>): Promise<Record<string, unknown>> => {\n const parentContext = (ctx.context as Record<string, unknown> | undefined) ?? {}\n const merged = { ...ctx, context: { ...parentContext, ...base } }\n const extra = (await user(merged)) as Record<string, unknown> | undefined\n return { ...base, ...extra }\n }\n}\n\ntype Params = Record<string, string>\ntype HeadTags = {\n meta?: Array<Record<string, unknown>>\n links?: Array<Record<string, unknown>>\n scripts?: Array<Record<string, unknown>>\n styles?: Array<Record<string, unknown>>\n}\n\n/** Absolute URL for a route id in a locale: `origin` (config or window) + its localized pathname. */\nfunction absoluteFor(\n registry: RouteRegistry,\n config: RouterConfig,\n id: string,\n locale: ILocale,\n params: Params,\n): string {\n return resolveOrigin(config) + routePath(registry, config, id, locale, params)\n}\n\n/**\n * Build a URL route's `head`: the enforced SEO essentials the router emits itself — `<title>`,\n * `<meta name=\"description\">`, `og:title`/`og:description`/`og:locale`, plus (from the **leaf** match\n * only, so links don't duplicate across ancestors) `canonical`, `og:url`, and one `hreflang`\n * alternate per locale the route is available in + `x-default`. The route's optional `head` is merged\n * on top. Returns `undefined` for a layout route (no `title`/`description`/`head`).\n */\nfunction withHead(builder: RouteBuilder, locale: ILocale, apiCtx: ApiCtx) {\n const { registry, config } = apiCtx\n const title = builder.options.title as ((ctx: Record<string, unknown>) => string) | undefined\n const description = builder.options.description as\n | ((ctx: Record<string, unknown>) => string)\n | undefined\n const userHead = builder.options.head as ((ctx: Record<string, unknown>) => HeadTags) | undefined\n if (!title && !description && !userHead) return undefined\n const id = builder.id\n\n return (ctx: Record<string, unknown>) => {\n const match = ctx.match as { context?: Record<string, unknown>; routeId?: unknown } | undefined\n const context = { routeId: id, locale, ...(match?.context ?? {}) }\n const headCtx = { ...ctx, context }\n const params = (ctx.params as Params | undefined) ?? {}\n\n const meta: Array<Record<string, unknown>> = []\n const links: Array<Record<string, unknown>> = []\n\n if (title) {\n const value = title(headCtx)\n meta.push({ title: value }, { property: 'og:title', content: value })\n }\n if (description) {\n const value = description(headCtx)\n meta.push(\n { name: 'description', content: value },\n { property: 'og:description', content: value },\n )\n }\n meta.push({ property: 'og:locale', content: locale.code })\n\n // canonical + hreflang come from the LEAF match only — TanStack concatenates `links`, so emitting\n // them from every matched ancestor would duplicate them.\n const matches = ctx.matches as Array<{ routeId?: unknown }> | undefined\n const isLeaf = !!match && matches?.[matches.length - 1]?.routeId === match.routeId\n if (isLeaf) {\n const canonical = absoluteFor(registry, config, id, locale, params)\n meta.push({ property: 'og:url', content: canonical })\n links.push({ rel: 'canonical', href: canonical })\n const avail = availableLocales(registry, config, id)\n for (const loc of avail) {\n // `hrefLang` (camelCase) — TanStack renders links with React, which wants the JSX prop name.\n links.push({\n rel: 'alternate',\n hrefLang: loc.code,\n href: absoluteFor(registry, config, id, loc, params),\n })\n }\n // x-default → the default locale when the route lives there, otherwise the first locale it does\n // (a partially-aliased route may not exist in the default locale — don't ask for a URL it lacks).\n const xDefault = avail.find((l) => l.code === config.defaultLocale.code) ?? avail[0]\n if (xDefault) {\n links.push({\n rel: 'alternate',\n hrefLang: 'x-default',\n href: absoluteFor(registry, config, id, xDefault, params),\n })\n }\n }\n\n const extra = userHead ? userHead(headCtx) : undefined\n return {\n // Within one route's `meta`, two `{ title }` (or two same-`name`/`property`) entries both\n // render — a duplicate `<title>`. So a user `head` that returns the same tag OVERRIDES ours\n // rather than appending. (Cross-route de-dup is TanStack's job: deepest match wins.)\n meta: mergeMeta(meta, extra?.meta ?? []),\n links: [...links, ...(extra?.links ?? [])],\n ...(extra?.scripts ? { scripts: extra.scripts } : {}),\n ...(extra?.styles ? { styles: extra.styles } : {}),\n }\n }\n}\n\n/**\n * The identity of a head `meta` tag — `title`, or its `name` / `property`. Two entries with the same\n * identity would both render (a duplicate `<title>` / meta), so {@link mergeMeta} collapses them.\n * Tags with no such key (e.g. `{ 'script:ld+json': … }`) have no identity and always append.\n */\nfunction metaKey(m: Record<string, unknown>): string | undefined {\n if ('title' in m) return 'title'\n if (typeof m.name === 'string') return `name:${m.name}`\n if (typeof m.property === 'string') return `property:${m.property}`\n return undefined\n}\n\n/** Concatenate `extra` onto `base`, but let a same-identity `extra` tag replace the `base` one. */\nfunction mergeMeta(\n base: Array<Record<string, unknown>>,\n extra: Array<Record<string, unknown>>,\n): Array<Record<string, unknown>> {\n const out = [...base]\n for (const m of extra) {\n const key = metaKey(m)\n const at = key ? out.findIndex((x) => metaKey(x) === key) : -1\n if (at >= 0) out[at] = m\n else out.push(m)\n }\n return out\n}\n","import { lazyRouteComponent } from '@tanstack/react-router'\n\n/**\n * Code-split a route's component so its module lands in its own chunk instead of the initial bundle.\n *\n * The Vite plugin ({@link luwioRouter}) imports every `*.route` file eagerly — the registry needs\n * every route's id/parent/aliases/`title`/`description` up front to build the localized tree. So keep\n * route files **thin**: define the route here, but load the page component through `lazy()` from its\n * own module. The route definition stays eager (it's tiny); the component — and everything it pulls\n * in — splits out and loads only when the route is matched (TanStack preloads it on intent, e.g.\n * hover, when `defaultPreload` is on).\n *\n * Pass a bare dynamic import for a **default** export, or the export name as the second argument for a\n * **named** one. Point it at the component's own module — not the `*.route` file — or nothing splits.\n *\n * @example\n * // Home.tsx has `export function Home() { … }`\n * export default createRoute({\n * id: 'home',\n * component: lazy(() => import('./Home'), 'Home'),\n * title: ({ context }) => context.t(tokens.homeTitle),\n * description: ({ context }) => context.t(tokens.homeIntro),\n * }).alias(Locale.new({ languageOrLocale: 'en-US' }), '')\n *\n * @example\n * // About.tsx has `export default function About() { … }`\n * component: lazy(() => import('./About'))\n */\nexport function lazy<\n // biome-ignore lint/suspicious/noExplicitAny: the module's component props are opaque to us\n T extends Record<string, any>,\n TKey extends keyof T = 'default',\n>(importer: () => Promise<T>, exportName?: TKey): ReturnType<typeof lazyRouteComponent<T, TKey>> {\n return lazyRouteComponent(importer, exportName)\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport type { IRouter } from './use-router'\n\n/**\n * The route context that {@link createRouter} injects before every route's own `beforeLoad`: it\n * always carries `{ routeId, locale, router }`, plus whatever ancestors returned from their\n * `beforeLoad`. The router is translation-agnostic — to translate in `title` / `description` / a\n * component, an ancestor `beforeLoad` puts a translator on context (e.g. `return { t }`); it then\n * shows up here as `context.t` (augment this interface to type it).\n */\nexport interface RouteContext {\n /** This route's id. */\n routeId: string\n /** The active locale for the sub-tree this route was mounted in. */\n locale: ILocale\n /**\n * A locale-aware router bound to this route — the same surface as `useRouter().router`, so a guard\n * can `throw context.router.redirect({ id: 'login' })` or `throw context.router.notFound()`.\n */\n router: IRouter\n /** Anything an ancestor's `beforeLoad` merged into context (typed as `unknown`). */\n [key: string]: unknown\n}\n\n/**\n * The context object passed to a route's `beforeLoad` / `loader`. Type its `params` and `search`\n * via {@link createRoute}'s generics; `context.locale` is always available. Other TanStack ctx\n * fields (`location`, `cause`, `abortController`, …) remain reachable as `unknown`.\n */\nexport interface RouteHandlerCtx<\n TParams = Record<string, string>,\n TSearch = Record<string, unknown>,\n> {\n context: RouteContext\n params: TParams\n search: TSearch\n [key: string]: unknown\n}\n\n/**\n * The document-head tags a route contributes, rendered by `<HeadContent />` (re-exported from\n * `@luwiostack/router`). TanStack merges tags across the matched routes: for `title` and for each\n * `meta` `name`/`property`, the **deepest** route wins; `links`, `styles` and head `scripts` are\n * concatenated.\n */\nexport interface RouteHead {\n /**\n * `<title>` and `<meta>` tags. `{ title: '…' }` sets the document title; `{ name, content }` and\n * `{ property, content }` set `<meta>`; `{ 'script:ld+json': {…} }` emits a JSON-LD script.\n */\n meta?: Array<Record<string, unknown>>\n /** `<link>` tags — canonical, `alternate`/hreflang, preload, and so on. */\n links?: Array<Record<string, unknown>>\n /** `<script>` tags placed in the head. */\n scripts?: Array<Record<string, unknown>>\n /** `<style>` tags. */\n styles?: Array<Record<string, unknown>>\n}\n\n/**\n * The context passed to a route's {@link RouteConfig.head | head}. It mirrors TanStack's head ctx\n * (`match`, `matches`, `params`, `loaderData`) and — because `@luwiostack/router` wraps `head` — adds\n * `context` at the top level, so `context.locale` reads exactly like it does in `beforeLoad` and\n * `loader` (TanStack's raw head ctx exposes it only as `match.context`).\n */\nexport interface RouteHeadCtx<TParams = Record<string, string>> {\n /** Route context — always carries `{ routeId, locale }`, plus anything `beforeLoad` merged in. */\n context: RouteContext\n params: TParams\n loaderData: unknown\n /** The current route match — its `context` is the same {@link RouteContext}. */\n match: { context: RouteContext; params: TParams; loaderData: unknown; [key: string]: unknown }\n matches: ReadonlyArray<unknown>\n [key: string]: unknown\n}\n\n/**\n * The configuration passed to {@link createRoute}. It accepts this package's own three keys\n * ({@link RouteConfig.id | id}, {@link RouteConfig.parent | parent}, {@link RouteConfig.layout | layout})\n * plus TanStack Router's route options, which are forwarded verbatim when the tree is built. The\n * common options are surfaced below with types and docs; the index signature keeps every other\n * TanStack option available too.\n *\n * The generics type the `params` / `search` seen by `beforeLoad`, `loader` and `head` (and\n * `validateSearch`'s return) — `createRoute<{ postId: string }>({ … })`. They default to loose\n * records, so untyped usage keeps working; `context.locale` (and `head`'s `locale`) is always typed.\n *\n * `path` and `getParentRoute` are intentionally NOT accepted: the URL path is derived per locale\n * from {@link RouteBuilder.alias} (one or more segments), and the parent is wired from\n * {@link RouteConfig.parent | parent}.\n */\nexport interface RouteConfig<TParams = Record<string, string>, TSearch = Record<string, unknown>> {\n // ── @luwiostack/router options ──────────────────────────────────────────────\n /** Stable, unique id. Wires {@link RouteConfig.parent} and identifies the route for navigation. */\n id: string\n /** Parent route id. Omit for a top-level route (mounted directly under the locale layout). */\n parent?: string\n /**\n * Marks a **pathless** route: it contributes no URL segment. Use it for an auth guard\n * (`beforeLoad`) or a shared layout (`component` wrapping an `<Outlet />`). Layout routes\n * take no aliases.\n */\n layout?: boolean\n\n // ── Data & lifecycle (TanStack) ────────────────────────────────────────\n /**\n * Runs before this route (and its children) load. Its return value is **merged into the route\n * context** for this route and every descendant. Receives a typed ctx whose `context.locale` is\n * the active locale. Use it for auth guards (`throw redirect(...)`) and to derive context.\n */\n beforeLoad?: (ctx: RouteHandlerCtx<TParams, TSearch>) => unknown\n /**\n * Loads this route's data before its component renders. The return is the route's loader data\n * (read with `useRouteLoaderData()`). Receives a typed ctx; `context.locale` is available.\n */\n loader?: (ctx: RouteHandlerCtx<TParams, TSearch>) => unknown\n /**\n * Selects the slice of `search` the {@link RouteConfig.loader | loader} depends on, so the loader\n * re-runs only when those values change.\n */\n loaderDeps?: (opts: { search: TSearch }) => Record<string, unknown>\n /** Parse and validate the query string into the typed `search` this route exposes. */\n validateSearch?: (search: Record<string, unknown>) => TSearch\n /**\n * The page title — **required** for every URL-bearing route (SEO). Receives the head ctx, so\n * `context.locale` (and anything an ancestor put on context, like a translator) is available:\n * `title: ({ context }) => context.t('about.title')`. The router renders it as `<title>` and\n * `og:title`. Layout routes omit it. `createRouter` throws if a URL route has none.\n */\n title?: (ctx: RouteHeadCtx<TParams>) => string\n /**\n * The meta description — **required** for every URL-bearing route (SEO). Same ctx as {@link\n * RouteConfig.title | title}. The router renders it as `<meta name=\"description\">` and\n * `og:description`. Layout routes omit it. `createRouter` throws if a URL route has none.\n */\n description?: (ctx: RouteHeadCtx<TParams>) => string\n /**\n * **Optional** extra head tags beyond the SEO essentials the router already emits (title,\n * description, canonical, hreflang alternates, og:*). Use it for JSON-LD, preloads, extra og/twitter\n * tags, etc. Same ctx as `title`/`description`; merged with the other matched routes — see\n * {@link RouteHead}.\n */\n head?: (ctx: RouteHeadCtx<TParams>) => RouteHead\n\n // ── UI (TanStack) ──────────────────────────────────────────────────────\n /** The route's component — the page (or layout shell wrapping `<Outlet />`). */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n component?: any\n /** Shown while this route's loader is pending. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n pendingComponent?: any\n /** Shown when this route (or a child) throws during load or render. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n errorComponent?: any\n /** Shown when `notFound()` is thrown beneath this route. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n notFoundComponent?: any\n\n // ── Behaviour (TanStack) ───────────────────────────────────────────────\n /** Milliseconds the loader data stays fresh; within it, navigation reuses the cache instead of re-loading. */\n staleTime?: number\n /** Milliseconds cached loader data is kept after the route is no longer active before being garbage-collected. */\n gcTime?: number\n /** Whether the loader re-runs on navigation — a boolean or a predicate over the match. */\n shouldReload?: boolean | ((ctx: RouteHandlerCtx<TParams, TSearch>) => boolean)\n /** Match this route's path case-sensitively (default: false). */\n caseSensitive?: boolean\n /** Wrap the component in a `<Suspense>` boundary (default: true for lazy components). */\n wrapInSuspense?: boolean\n\n /** Any other TanStack Router route option — forwarded to `createRoute` untouched. */\n [option: string]: unknown\n}\n\n/** The forwarded TanStack options — {@link RouteConfig} without this package's own keys. */\nexport type RouteOptions = Omit<RouteConfig, 'id' | 'parent' | 'layout'>\n\n/**\n * The route-config keys we recognise: this package's own three, the SEO/head keys the router adds,\n * and the TanStack Router route options. {@link RouteConfig}'s index signature makes every key\n * type-check, so a typo (`componet`, `beforeLod`) would slip through and the route would silently\n * render nothing. {@link warnUnknownKeys} uses this set to flag a key that looks like a typo of one\n * of these — it does NOT reject unknown keys outright, so a newer TanStack option we haven't listed\n * still passes through untouched.\n */\nconst KNOWN_KEYS: ReadonlySet<string> = new Set([\n // @luwiostack/router\n 'id',\n 'parent',\n 'layout',\n 'title',\n 'description',\n 'head',\n // TanStack — data & lifecycle\n 'beforeLoad',\n 'loader',\n 'loaderDeps',\n 'validateSearch',\n 'shouldReload',\n 'remountDeps',\n 'onEnter',\n 'onLeave',\n 'onStay',\n 'onCatch',\n // TanStack — components\n 'component',\n 'pendingComponent',\n 'errorComponent',\n 'notFoundComponent',\n 'shellComponent',\n // TanStack — caching & behaviour\n 'staleTime',\n 'preloadStaleTime',\n 'gcTime',\n 'preloadGcTime',\n 'caseSensitive',\n 'wrapInSuspense',\n 'preload',\n 'ssr',\n 'pendingMs',\n 'pendingMinMs',\n // TanStack — params, search & head\n 'context',\n 'params',\n 'stringifyParams',\n 'parseParams',\n 'search',\n 'scripts',\n 'links',\n 'meta',\n 'headers',\n 'codeSplitGroupings',\n])\n\n/** Levenshtein edit distance, bailing out as soon as it exceeds `max` (we only care about near-misses). */\nfunction editDistance(a: string, b: string, max: number): number {\n if (Math.abs(a.length - b.length) > max) return max + 1\n let prev = new Array<number>(b.length + 1)\n let curr = new Array<number>(b.length + 1)\n for (let j = 0; j <= b.length; j++) prev[j] = j\n for (let i = 1; i <= a.length; i++) {\n curr[0] = i\n let rowMin = i\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1\n const d = Math.min((prev[j] ?? 0) + 1, (curr[j - 1] ?? 0) + 1, (prev[j - 1] ?? 0) + cost)\n curr[j] = d\n if (d < rowMin) rowMin = d\n }\n // whole row already past the budget — can't recover\n if (rowMin > max) return max + 1\n ;[prev, curr] = [curr, prev]\n }\n return prev[b.length] ?? max + 1\n}\n\n/**\n * Warn (once, to the console) about a route-config key that looks like a typo of a {@link KNOWN_KEYS}\n * option — `componet` → `component`, `beforeLod` → `beforeLoad`. A key that's simply unknown but not\n * close to any known one is left alone (it may be a valid TanStack option we don't list). Best-effort\n * DX only: it never throws, so a mistyped key still forwards to TanStack exactly as before.\n */\nfunction warnUnknownKeys(id: string, keys: readonly string[]): void {\n for (const key of keys) {\n if (KNOWN_KEYS.has(key) || key.startsWith('$')) continue\n // Only short-ish typos of short-ish keys — long keys with distance 2 are usually genuinely\n // different options, not slips.\n let suggestion: string | undefined\n for (const known of KNOWN_KEYS) {\n const budget = key.length <= 5 ? 1 : 2\n if (editDistance(key, known, budget) <= budget) {\n suggestion = known\n break\n }\n }\n if (suggestion) {\n console.warn(\n `createRoute(\"${id}\"): unknown option \"${key}\" — did you mean \"${suggestion}\"? ` +\n `It will be forwarded to TanStack as-is and likely ignored.`,\n )\n }\n }\n}\n\n/**\n * A deferred route definition. Created by {@link createRoute}, it collects the TanStack options\n * plus a per-locale alias map. The real TanStack routes are only created later, once\n * `createRouter` knows which locales to build.\n */\nexport class RouteBuilder {\n readonly id: string\n readonly parent: string | undefined\n readonly layout: boolean\n readonly options: RouteOptions\n readonly #aliases = new Map<string, string>()\n\n // Accepts any generic instantiation of RouteConfig — the builder erases the param/search types\n // (they only guide createRoute's callbacks); the runtime just forwards options.\n // biome-ignore lint/suspicious/noExplicitAny: variance-neutral so every RouteConfig<…> is accepted\n constructor(config: RouteConfig<any, any>) {\n const { id, parent, layout = false, ...options } = config\n this.id = id\n this.parent = parent\n this.layout = layout\n this.options = options\n warnUnknownKeys(id, Object.keys(config))\n }\n\n /**\n * Register the localized URL path for one locale. The slug is a full TanStack path pattern, so it\n * may be a single segment (`'over-ons'`), the empty string (the locale index), or a **multi-segment\n * path** with static parts and dynamic params (`'blog/$postId'`) — a bare `$` segment is a splat.\n * Both the static parts and the pattern can differ per locale.\n *\n * @example\n * route.alias(Locale.new({ languageOrLocale: 'nl-BE' }), 'over-ons')\n * route.alias(Locale.new({ languageOrLocale: 'en-BE' }), 'blog/$postId')\n *\n * @throws If the route is a layout route (it has no URL), or if the locale is already aliased.\n */\n alias(locale: ILocale, slug: string): this {\n if (this.layout) {\n throw new Error(\n `Route \"${this.id}\" is a layout route and has no URL, so alias() is not allowed.`,\n )\n }\n if (this.#aliases.has(locale.code)) {\n throw new Error(`Route \"${this.id}\" already has an alias for \"${locale.code}\".`)\n }\n this.#aliases.set(locale.code, slug)\n return this\n }\n\n /** Whether an explicit alias exists for the given locale. */\n hasAlias(locale: ILocale): boolean {\n return this.#aliases.has(locale.code)\n }\n\n /** How many locales this route is aliased in. A URL-bearing route must have at least one. */\n get aliasCount(): number {\n return this.#aliases.size\n }\n\n /**\n * The URL path for a locale (one or more segments), from the alias registered for that locale.\n * `createRouter` mounts a route only in the locales it is aliased in, so this is only called when\n * an alias is present — it throws rather than invent a segment from the id.\n */\n slugFor(locale: ILocale): string {\n const slug = this.#aliases.get(locale.code)\n if (slug === undefined) {\n throw new Error(`Route \"${this.id}\" has no alias for \"${locale.code}\".`)\n }\n return slug\n }\n}\n\n/**\n * Define a locale-aware route. Returns a {@link RouteBuilder}; call {@link RouteBuilder.alias} to\n * give it a localized URL segment per locale, then register it with a {@link RouteRegistry}.\n *\n * Optionally type the `params` / `search` the route's `beforeLoad` and `loader` receive:\n * `createRoute<{ postId: string }>({ … })`.\n *\n * @example\n * const route = createRoute({ id: 'about', component: About })\n * route.alias(Locale.new({ languageOrLocale: 'en-BE' }), 'about')\n * route.alias(Locale.new({ languageOrLocale: 'nl-BE' }), 'over-ons')\n */\nexport function createRoute<TParams = Record<string, string>, TSearch = Record<string, unknown>>(\n config: RouteConfig<TParams, TSearch>,\n): RouteBuilder {\n if (!config.id) {\n throw new Error('createRoute requires an \"id\".')\n }\n return new RouteBuilder(config)\n}\n","import { collectModules, createModuleRegistry, type ModuleRegistry } from '@luwiostack/registry'\nimport { RouteBuilder } from './route-builder'\n\nconst isRoute = (value: unknown): value is RouteBuilder => value instanceof RouteBuilder\n\n/**\n * Collects {@link RouteBuilder}s. Routes usually land here via {@link registerModules} (driven by\n * the `@luwiostack/router/vite` plugin or a glob), then the registry is handed to `createRouter`, which\n * expands it into a real TanStack route tree.\n *\n * Most apps use the shared {@link routeRegistry} singleton. Construct your own `RouteRegistry` when\n * you need an isolated set — tests, or several routers in one app. Built on\n * `@luwiostack/registry`'s `createModuleRegistry` (deduping by route id, throwing on a clash).\n */\nexport class RouteRegistry {\n readonly #inner: ModuleRegistry<RouteBuilder> = createModuleRegistry<RouteBuilder>({\n idOf: (route) => route.id,\n match: isRoute,\n onDuplicate: 'throw',\n label: 'route',\n })\n\n /**\n * Register a route. A low-level primitive — route files normally just `export` their route and\n * let {@link registerModules} add it.\n *\n * @throws If a *different* route with the same id was already registered.\n */\n add(route: RouteBuilder): this {\n this.#inner.add(route)\n return this\n }\n\n /** All registered routes, in registration order. */\n all(): readonly RouteBuilder[] {\n return this.#inner.all()\n }\n\n /** Look up a registered route by id. */\n get(id: string): RouteBuilder | undefined {\n return this.#inner.get(id)\n }\n\n /** Remove every registered route. Mainly useful in tests. */\n clear(): void {\n this.#inner.clear()\n }\n}\n\n/** The shared registry used by most apps. */\nexport const routeRegistry = new RouteRegistry()\n\n/**\n * Register every {@link RouteBuilder} exported by the given modules — so route files just\n * `export` their route and never call `add()` themselves.\n *\n * Accepts what a bundler hands you: the record from `import.meta.glob(..., { eager: true })`, or an\n * array of module namespaces (what the `@luwiostack/router/vite` plugin passes). Any export that is a\n * `RouteBuilder` — default or named — is registered; everything else is ignored.\n *\n * @example\n * // No plugin? One line in your app:\n * registerModules(import.meta.glob('./routes/**\\/*.route.tsx', { eager: true }))\n */\nexport function registerModules(\n modules: Record<string, unknown> | readonly unknown[],\n registry: RouteRegistry = routeRegistry,\n): RouteRegistry {\n for (const route of collectModules(modules, isRoute)) registry.add(route)\n return registry\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport {\n useLoaderData,\n useParams,\n useRouterState,\n useSearch,\n useRouteContext as useTanstackRouteContext,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport { getRouterMeta } from './router-meta'\n\n// Thin, locale-aware wrappers around TanStack's per-route hooks. Each defaults to the CURRENT route\n// (TanStack's `strict: false`), so a page component reads its own data with no `from` boilerplate.\n// To target another route type-safely, use TanStack's hooks directly with a `from` id.\n\n/**\n * The active locale, read straight from the router state (the `{ routeId, locale }` injected into\n * context by `createRouter`). Unlike `@luwiostack/locale`'s `useLocale`, this does not require the\n * `<Locale>` provider — so it also works in a `notFoundComponent` above it.\n *\n * @throws If used outside a router created by {@link createRouter}.\n */\nexport function useRouteLocale(): { locale: ILocale; language: string; region: string } {\n const tanstack = useTanstackRouter()\n const fallback = getRouterMeta(tanstack)?.config.defaultLocale\n const locale =\n useRouterState({\n select: (s) => (s.matches.at(-1)?.context as { locale?: ILocale } | undefined)?.locale,\n }) ?? fallback\n if (!locale) {\n throw new Error('useRouteLocale must be used inside a router created by createRouter().')\n }\n return { locale, language: locale.language_code, region: locale.country_code }\n}\n\n/**\n * The current route's path params (wraps TanStack `useParams`). Pass a `select` to subscribe to just\n * one param — the component then re-renders only when that selected value changes, not on every param\n * update.\n *\n * @example\n * const params = useRouteParams<{ postId: string }>() // the whole object\n * const postId = useRouteParams((p) => p.postId) // just one — re-renders only when postId changes\n */\nexport function useRouteParams<T = Record<string, string>, S = T>(select?: (params: T) => S): S {\n return useParams({ strict: false, select: select as never }) as unknown as S\n}\n\n/**\n * The current route's query/search params (wraps TanStack `useSearch`). Pass a `select` to subscribe\n * to just one value — the component then re-renders only when that selected value changes.\n *\n * @example\n * const query = useRouteQuery<{ page?: number }>() // the whole object\n * const page = useRouteQuery((s) => s.page ?? 1) // just one — re-renders only when page changes\n */\nexport function useRouteQuery<T = Record<string, unknown>, S = T>(select?: (search: T) => S): S {\n return useSearch({ strict: false, select: select as never }) as unknown as S\n}\n\n/** The current route's loader data (wraps TanStack `useLoaderData`). */\nexport function useRouteLoaderData<T = unknown>(): T {\n return useLoaderData({ strict: false }) as unknown as T\n}\n\n/**\n * The current route's context — includes the `{ routeId, locale }` injected by `createRouter`\n * (wraps TanStack `useRouteContext`).\n */\nexport function useRouteContext<T = unknown>(): T {\n return useTanstackRouteContext({ strict: false }) as unknown as T\n}\n\n/**\n * What a `statusPages` page (see `createRouter`'s config) receives about the failure that redirected\n * here. `error` is only present for a `beforeLoad`/`loader` failure — a 404/403 has no underlying\n * exception, just a status — see {@link useRouteFailure}.\n */\nexport interface RouteFailure {\n /** The HTTP status the router resolved — 404, 403, or whatever the thrown error carried (else 500). */\n status: number\n /** The underlying error, for a `beforeLoad`/`loader` failure only. */\n error?: { message: string }\n}\n\n/**\n * The failure that redirected here, for a page configured in `createRouter`'s `statusPages` (404,\n * 403, a dedicated status like 503, or the `default` catch-all). The router attaches this as history\n * state on every status-page redirect, so the page can render the real status/message instead of a\n * hardcoded string:\n *\n * @example\n * function Maintenance() {\n * const failure = useRouteFailure()\n * return <h1>{failure?.status ?? 503} — The website is in maintenance</h1>\n * }\n *\n * `undefined` when the page was opened directly (a bookmark, a typed URL) rather than via a\n * router-triggered redirect — there's no failure to report.\n */\nexport function useRouteFailure(): RouteFailure | undefined {\n const state = useRouterState({\n select: (s) =>\n s.location.state as { status?: unknown; error?: { message: string } } | undefined,\n })\n return typeof state?.status === 'number'\n ? { status: state.status, error: state.error }\n : undefined\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57],"mappings":";;;;;;;;;;;;AAOA,IAAI,WAAW,QAAQ;AACvB,IAAI,kBAAkF,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;AAwB9F,SAAS,wBAAwB,KAAK,UAAU,UAAU;CACzD,QAAQ,gBAAgB;EACvB,IAAI,CAAC,IAAI,WAAW,YAAY,OAAO,yBAAyB,YAAY,aAAa,SAAS;EAClG,MAAM,WAAW,IAAI,sBAAsB,YAAY;GACtD,SAAS,QAAQ,IAAI,CAAC;EACvB,GAAG,EAAE,YAAY,QAAQ,CAAC;EAC1B,SAAS,QAAQ,IAAI,OAAO;EAC5B,aAAa;GACZ,SAAS,WAAW;GACpB,SAAS;EACV;CACD,GAAG;EACF;EACA;EACA;CACD,CAAC;AACF;;;;;;;;;;;;;;AAcA,SAAS,gBAAgB,KAAK;CAC7B,MAAM,WAAW,QAAQ,OAAO,IAAI;CACpC,QAAQ,oBAAoB,WAAW,SAAS,SAAS,CAAC,CAAC;CAC3D,OAAO;AACR;;;;;;;AC5DA,SAAS,KAAK,KAAK;CAClB,OAAO,IAAI,IAAI,SAAS;AACzB;;;;;AAKA,SAAS,iBAAiB,SAAS,UAAU;CAC5C,IAAI,OAAO,YAAY,YAAY,OAAO,QAAQ,QAAQ;CAC1D,OAAO;AACR;AACA,MAAM,SAAS,OAAO,U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BAAgB,IAAI,cAAc;;;;;;;;;;;;;AAc/C,SAAgB,gBACd,SACA,WAA0B,eACX;CACf,KAAK,MAAM,SAAS,eAAe,SAAS,OAAO,GAAG,SAAS,IAAI,KAAK;CACxE,OAAO;AACT;;;;;;;;;;AChDA,SAAgB,iBAAwE;CAEtF,MAAM,WAAW,cADAC,YACc,CAAQ,CAAC,EAAE,OAAO;CACjD,MAAM,SACJ,eAAe,EACb,SAAS,OAAO,EAAE,QAAQ,GAAG,EAAE,CAAC,EAAE,QAAA,EAA8C,OAClF,CAAC,KAAK;CACR,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,wEAAwE;CAE1F,OAAO;EAAE;EAAQ,UAAU,OAAO;EAAe,QAAQ,OAAO;CAAa;AAC/E;;;;;;;;;;AAWA,SAAgB,eAAkD,QAA8B;CAC9F,OAAO,UAAU;EAAE,QAAQ;EAAe;CAAgB,CAAC;AAC7D;;;;;;;;;AAUA,SAAgB,cAAkD,QAA8B;CAC9F,OAAO,UAAU;EAAE,QAAQ;EAAe;CAAgB,CAAC;AAC7D;;AAGA,SAAgB,qBAAqC;CACnD,OAAO,cAAc,EAAE,QAAQ,MAAM,CAAC;AACxC;;;;;AAMA,SAAgB,kBAAkC;CAChD,OAAOC,kBAAwB,EAAE,QAAQ,MAAM,CAAC;AAClD;;;;;;;;;;;;;;;;AA6BA,SAAgB,kBAA4C;CAC1D,MAAM,QAAQ,eAAe,EAC3B,SAAS,MACP,EAAE,SAAS,MACf,CAAC;CACD,OAAO,OAAO,OAAO,WAAW,WAC5B;EAAE,QAAQ,MAAM;EAAQ,OAAO,MAAM;CAAM,IAC3C,KAAA;AACN"}
1
+ {"version":3,"file":"index.mjs","names":["trimPathRight","normalize","useRouter","useRouter","useRouter","useRouteContext","useRouter","useRouteContext","createRoute","useRouter","useRouter","useRouter","useRouter","useRouter","useRouter","createRouter","useRouter","useRouter","useRouter","useRouter","useRouter","useRouter","Locale","tanstackRedirect","redirect","notFound","tanstackNotFound","useTanstackRouter","useTanstackRouter","createTanstackRoute","createTanstackRouter","LocaleProvider","#aliases","#inner","useTanstackRouter","useTanstackRouteContext"],"sources":["../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/utils.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/utils.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/lru-cache.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/path.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/not-found.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/qss.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/searchParams.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/root.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/redirect.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/rewrite.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/stores.js","../../../node_modules/.pnpm/@tanstack+history@1.162.1/node_modules/@tanstack/history/dist/esm/index.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/router.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/load-client.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/defer.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/link.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/manifest.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/route.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/awaited.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/nonRouteComponentContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/CatchBoundary.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/ClientOnly.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/routerContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouter.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/matchContext.js","../../../node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/alien.js","../../../node_modules/.pnpm/@tanstack+store@0.9.3/node_modules/@tanstack/store/dist/esm/atom.js","../../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-store/dist/esm/useStore.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useMatch.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLoaderData.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLoaderDeps.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useParams.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useSearch.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useNavigate.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouteContext.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/link.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/route.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/lazyRouteComponent.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/not-found.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/ScriptOnce.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/SafeFragment.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/renderRouteNotFound.js","../../../node_modules/.pnpm/@tanstack+router-core@1.171.26/node_modules/@tanstack/router-core/dist/esm/scroll-restoration-script/client.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/scroll-restoration.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Match.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Transitioner.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Matches.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/routerStores.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/router.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/RouterProvider.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useRouterState.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/useLocation.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Asset.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/headContentUtils.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/HeadContent.js","../../../node_modules/.pnpm/@tanstack+react-router@1.170.31_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@tanstack/react-router/dist/esm/Scripts.js","../src/router-meta.ts","../src/page-view.ts","../src/use-router.ts","../src/create-router.tsx","../src/lazy.ts","../src/route-builder.ts","../src/registry.ts","../src/route-hooks.ts"],"sourcesContent":["\"use client\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n/**\n* React.use if available (React 19+), undefined otherwise.\n* Use dynamic lookup to avoid Webpack compilation errors with React 18.\n*/\nvar reactUse = React$1[\"use\"];\nvar useLayoutEffect = isServer ?? typeof window === \"undefined\" ? React$1.useEffect : React$1.useLayoutEffect;\n/**\n* React hook to wrap `IntersectionObserver`.\n*\n* This hook will create an `IntersectionObserver` and observe the ref passed to it.\n*\n* When the intersection changes, the callback will be called with the `IntersectionObserverEntry`.\n*\n* @param ref - The ref to observe\n* @param callback - The callback to call when the intersection changes\n* @param disabled - Whether observation is disabled\n* @returns The IntersectionObserver instance\n* @example\n* ```tsx\n* const MyComponent = () => {\n* const ref = React.useRef<HTMLDivElement>(null)\n* useIntersectionObserver(\n* ref,\n* (entry) => { doSomething(entry) },\n* false\n* )\n* return <div ref={ref} />\n* ```\n*/\nfunction useIntersectionObserver(ref, callback, disabled) {\n\tReact$1.useEffect(() => {\n\t\tif (!ref.current || disabled || typeof IntersectionObserver !== \"function\") return () => callback();\n\t\tconst observer = new IntersectionObserver((entries) => {\n\t\t\tcallback(entries.pop());\n\t\t}, { rootMargin: \"100px\" });\n\t\tobserver.observe(ref.current);\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t\tcallback();\n\t\t};\n\t}, [\n\t\tcallback,\n\t\tdisabled,\n\t\tref\n\t]);\n}\n/**\n* React hook to take a `React.ForwardedRef` and returns a `ref` that can be used on a DOM element.\n*\n* @param ref - The forwarded ref\n* @returns The inner ref returned by `useRef`\n* @example\n* ```tsx\n* const MyComponent = React.forwardRef((props, ref) => {\n* const innerRef = useForwardedRef(ref)\n* return <div ref={innerRef} />\n* })\n* ```\n*/\nfunction useForwardedRef(ref) {\n\tconst innerRef = React$1.useRef(null);\n\tReact$1.useImperativeHandle(ref, () => innerRef.current, []);\n\treturn innerRef;\n}\n//#endregion\nexport { reactUse, useForwardedRef, useIntersectionObserver, useLayoutEffect };\n\n//# sourceMappingURL=utils.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/utils.ts\n/**\n* Return the last element of an array.\n* Intended for non-empty arrays used within router internals.\n*/\nfunction last(arr) {\n\treturn arr[arr.length - 1];\n}\n/**\n* Apply a value-or-updater to a previous value.\n* Accepts either a literal value or a function of the previous value.\n*/\nfunction functionalUpdate(updater, previous) {\n\tif (typeof updater === \"function\") return updater(previous);\n\treturn updater;\n}\nconst hasOwn = Object.prototype.hasOwnProperty;\nconst isEnumerable = Object.prototype.propertyIsEnumerable;\nfunction hasKeys(obj) {\n\tfor (const key in obj) if (hasOwn.call(obj, key)) return true;\n\treturn false;\n}\nconst createNull = () => Object.create(null);\nconst nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);\n/**\n* This function returns `prev` if `_next` is deeply equal.\n* If not, it will replace any deeply equal children of `b` with those of `a`.\n* This can be used for structural sharing between immutable JSON values for example.\n* Do not use this with signals\n*/\nfunction replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {\n\tif (isServer) return _next;\n\tif (prev === _next) return prev;\n\tif (_depth > 500) return _next;\n\tconst next = _next;\n\tconst array = isPlainArray(prev) && isPlainArray(next);\n\tif (!array && !(isPlainObject(prev) && isPlainObject(next))) return next;\n\tconst prevItems = array ? prev : getEnumerableOwnKeys(prev);\n\tif (!prevItems) return next;\n\tconst nextItems = array ? next : getEnumerableOwnKeys(next);\n\tif (!nextItems) return next;\n\tconst prevSize = prevItems.length;\n\tconst nextSize = nextItems.length;\n\tconst copy = array ? new Array(nextSize) : _makeObj();\n\tlet equalItems = 0;\n\tfor (let i = 0; i < nextSize; i++) {\n\t\tconst key = array ? i : nextItems[i];\n\t\tconst p = prev[key];\n\t\tconst n = next[key];\n\t\tif (p === n) {\n\t\t\tcopy[key] = p;\n\t\t\tif (array ? i < prevSize : hasOwn.call(prev, key)) equalItems++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (p === null || n === null || typeof p !== \"object\" || typeof n !== \"object\") {\n\t\t\tcopy[key] = n;\n\t\t\tcontinue;\n\t\t}\n\t\tconst v = replaceEqualDeep(p, n, _makeObj, _depth + 1);\n\t\tcopy[key] = v;\n\t\tif (v === p) equalItems++;\n\t}\n\treturn prevSize === nextSize && equalItems === prevSize ? prev : copy;\n}\n/**\n* Equivalent to `Reflect.ownKeys`, but ensures that objects are \"clone-friendly\":\n* will return false if object has any non-enumerable properties.\n*\n* Optimized for the common case where objects have no symbol properties.\n*/\nfunction getEnumerableOwnKeys(o) {\n\tconst keys = Object.keys(o);\n\tif (keys.length !== Object.getOwnPropertyNames(o).length) return false;\n\tconst symbols = Object.getOwnPropertySymbols(o);\n\tif (symbols.length === 0) return keys;\n\tfor (const symbol of symbols) {\n\t\tif (!isEnumerable.call(o, symbol)) return false;\n\t\tkeys.push(symbol);\n\t}\n\treturn keys;\n}\nfunction isPlainObject(o) {\n\tif (!hasObjectPrototype(o)) return false;\n\tconst ctor = o.constructor;\n\tif (typeof ctor === \"undefined\") return true;\n\tconst prot = ctor.prototype;\n\tif (!hasObjectPrototype(prot)) return false;\n\tif (!prot.hasOwnProperty(\"isPrototypeOf\")) return false;\n\treturn true;\n}\nfunction hasObjectPrototype(o) {\n\treturn Object.prototype.toString.call(o) === \"[object Object]\";\n}\n/**\n* Check if a value is a \"plain\" array (no extra enumerable keys).\n*/\nfunction isPlainArray(value) {\n\treturn Array.isArray(value) && value.length === Object.keys(value).length;\n}\n/**\n* Perform a deep equality check with options for partial comparison and\n* ignoring `undefined` values. Optimized for router state comparisons.\n*/\nfunction deepEqual(a, b, opts) {\n\tif (a === b) return true;\n\tif (typeof a !== typeof b) return false;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;\n\t\treturn true;\n\t}\n\tif (isPlainObject(a) && isPlainObject(b)) {\n\t\tconst ignoreUndefined = opts?.ignoreUndefined ?? true;\n\t\tif (opts?.partial) {\n\t\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\t\tif (!deepEqual(a[k], b[k], opts)) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tlet aCount = 0;\n\t\tif (!ignoreUndefined) aCount = Object.keys(a).length;\n\t\telse for (const k in a) if (a[k] !== void 0) aCount++;\n\t\tlet bCount = 0;\n\t\tfor (const k in b) if (!ignoreUndefined || b[k] !== void 0) {\n\t\t\tbCount++;\n\t\t\tif (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;\n\t\t}\n\t\treturn aCount === bCount;\n\t}\n\treturn false;\n}\n/**\n* Create a promise with exposed resolve/reject and status fields.\n* Useful for coordinating async router lifecycle operations.\n*/\nfunction createControlledPromise(onResolve) {\n\tlet resolveLoadPromise;\n\tlet rejectLoadPromise;\n\tconst controlledPromise = new Promise((resolve, reject) => {\n\t\tresolveLoadPromise = resolve;\n\t\trejectLoadPromise = reject;\n\t});\n\tcontrolledPromise.status = \"pending\";\n\tcontrolledPromise.resolve = (value) => {\n\t\tcontrolledPromise.status = \"resolved\";\n\t\tcontrolledPromise.value = value;\n\t\tresolveLoadPromise(value);\n\t\tonResolve?.(value);\n\t};\n\tcontrolledPromise.reject = (e) => {\n\t\tcontrolledPromise.status = \"rejected\";\n\t\trejectLoadPromise(e);\n\t};\n\treturn controlledPromise;\n}\n/**\n* Heuristically detect dynamic import \"module not found\" errors\n* across major browsers for lazy route component handling.\n*/\nfunction isModuleNotFoundError(error) {\n\tif (typeof error?.message !== \"string\") return false;\n\treturn error.message.startsWith(\"Failed to fetch dynamically imported module\") || error.message.startsWith(\"error loading dynamically imported module\") || error.message.startsWith(\"Importing a module script failed\");\n}\nfunction findLast(array, predicate) {\n\tfor (let i = array.length - 1; i >= 0; i--) {\n\t\tconst item = array[i];\n\t\tif (predicate(item)) return item;\n\t}\n}\n/**\n* Re-encode characters that are unsafe in URL paths.\n* Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the\n* WHATWG URL \"path percent-encode set\" (\", <, >, `, {, }).\n*\n* Space (0x20) is intentionally excluded — decodeURI decodes %20 to space\n* and the router stores decoded spaces in location.pathname. The existing\n* encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.\n*\n* These characters are decoded by decodeURI but must remain percent-encoded\n* in paths to match how upstream layers (CDNs, edge middleware, browsers)\n* interpret the URL, preventing infinite redirect loops and path mismatches.\n*/\nconst PATH_UNSAFE_RE = /[\\x00-\\x1f\\x7f\"<>`{}]/g;\nfunction sanitizePathSegment(segment) {\n\treturn segment.replace(PATH_UNSAFE_RE, (ch) => \"%\" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, \"0\"));\n}\nfunction decodeSegment(segment) {\n\tlet decoded;\n\ttry {\n\t\tdecoded = decodeURI(segment);\n\t} catch {\n\t\tdecoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {\n\t\t\ttry {\n\t\t\t\treturn decodeURI(match);\n\t\t\t} catch {\n\t\t\t\treturn match;\n\t\t\t}\n\t\t});\n\t}\n\treturn sanitizePathSegment(decoded);\n}\n/**\n* Default list of URL protocols to allow in links, redirects, and navigation.\n* Any absolute URL protocol not in this list is treated as dangerous by default.\n*/\nconst DEFAULT_PROTOCOL_ALLOWLIST = [\n\t\"http:\",\n\t\"https:\",\n\t\"mailto:\",\n\t\"tel:\"\n];\n/**\n* Check if a URL string uses a protocol that is not in the allowlist.\n* Returns true for blocked protocols like javascript:, blob:, data:, etc.\n*\n* The URL constructor correctly normalizes:\n* - Mixed case (JavaScript: → javascript:)\n* - Whitespace/control characters (java\\nscript: → javascript:)\n* - Leading whitespace\n*\n* For relative URLs (no protocol), returns false (safe).\n*\n* @param url - The URL string to check\n* @param allowlist - Set of protocols to allow\n* @returns true if the URL uses a protocol that is not allowed\n*/\nfunction isDangerousProtocol(url, allowlist) {\n\tif (!url) return false;\n\ttry {\n\t\tconst parsed = new URL(url);\n\t\treturn !allowlist.has(parsed.protocol);\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst HTML_ESCAPE_LOOKUP = {\n\t\"&\": \"\\\\u0026\",\n\t\">\": \"\\\\u003e\",\n\t\"<\": \"\\\\u003c\",\n\t\"\\u2028\": \"\\\\u2028\",\n\t\"\\u2029\": \"\\\\u2029\"\n};\nconst HTML_ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\n/**\n* Escape HTML special characters in a string to prevent XSS attacks\n* when embedding strings in script tags during SSR.\n*\n* This is essential for preventing XSS vulnerabilities when user-controlled\n* content is embedded in inline scripts.\n*/\nfunction escapeHtml(str) {\n\treturn str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);\n}\nfunction decodePath(path) {\n\tif (!path) return {\n\t\tpath,\n\t\thandledProtocolRelativeURL: false\n\t};\n\tif (!/[%\\\\\\x00-\\x1f\\x7f]/.test(path) && !path.startsWith(\"//\")) return {\n\t\tpath,\n\t\thandledProtocolRelativeURL: false\n\t};\n\tconst re = /%25|%5C/gi;\n\tlet cursor = 0;\n\tlet result = \"\";\n\tlet match;\n\twhile (null !== (match = re.exec(path))) {\n\t\tresult += decodeSegment(path.slice(cursor, match.index)) + match[0];\n\t\tcursor = re.lastIndex;\n\t}\n\tresult = result + decodeSegment(cursor ? path.slice(cursor) : path);\n\tlet handledProtocolRelativeURL = false;\n\tif (result.startsWith(\"//\")) {\n\t\thandledProtocolRelativeURL = true;\n\t\tresult = \"/\" + result.replace(/^\\/+/, \"\");\n\t}\n\treturn {\n\t\tpath: result,\n\t\thandledProtocolRelativeURL\n\t};\n}\n/**\n* Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.\n*\n* This function encodes:\n* - Whitespace characters (spaces → %20, tabs → %09, etc.)\n* - Non-ASCII/Unicode characters (emojis, accented characters, etc.)\n*\n* It preserves:\n* - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)\n* - ASCII special characters valid in URL paths (@, $, &, +, etc.)\n* - Forward slashes as path separators\n*\n* Used to generate proper href values for SSR without constructing URL objects.\n*\n* @example\n* encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'\n* encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'\n* encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)\n*/\nfunction encodePathLikeUrl(path) {\n\tif (!/\\s|[^\\u0000-\\u007F]/.test(path)) return path;\n\treturn path.replace(/\\s|[^\\u0000-\\u007F]/gu, encodeURIComponent);\n}\n/**\n* Builds the dev-mode CSS styles URL for route-scoped CSS collection.\n* Used by HeadContent components in all framework implementations to construct\n* the URL for the `/@tanstack-start/styles.css` endpoint.\n*\n* @param basepath - The router's basepath (may or may not have leading slash)\n* @param routeIds - Array of matched route IDs to include in the CSS collection\n* @returns The full URL path for the dev styles CSS endpoint\n*/\nfunction buildDevStylesUrl(basepath, routeIds) {\n\tconst trimmedBasepath = basepath.replace(/^\\/+|\\/+$/g, \"\");\n\treturn `${trimmedBasepath === \"\" ? \"\" : `/${trimmedBasepath}`}/@tanstack-start/styles.css?routes=${encodeURIComponent(routeIds.join(\",\"))}`;\n}\nfunction arraysEqual(a, b) {\n\tif (a === b) return true;\n\tif (a.length !== b.length) return false;\n\tfor (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n\treturn true;\n}\n//#endregion\nexport { DEFAULT_PROTOCOL_ALLOWLIST, arraysEqual, buildDevStylesUrl, createControlledPromise, decodePath, deepEqual, encodePathLikeUrl, escapeHtml, findLast, functionalUpdate, hasKeys, hasOwn, isDangerousProtocol, isModuleNotFoundError, isPlainArray, isPlainObject, last, nullReplaceEqualDeep, replaceEqualDeep };\n\n//# sourceMappingURL=utils.js.map","//#region src/lru-cache.ts\nfunction createLRUCache(max) {\n\tconst cache = /* @__PURE__ */ new Map();\n\tlet oldest;\n\tlet newest;\n\tconst touch = (entry) => {\n\t\tif (!entry.next) return;\n\t\tif (!entry.prev) {\n\t\t\tentry.next.prev = void 0;\n\t\t\toldest = entry.next;\n\t\t\tentry.next = void 0;\n\t\t\tif (newest) {\n\t\t\t\tentry.prev = newest;\n\t\t\t\tnewest.next = entry;\n\t\t\t}\n\t\t} else {\n\t\t\tentry.prev.next = entry.next;\n\t\t\tentry.next.prev = entry.prev;\n\t\t\tentry.next = void 0;\n\t\t\tif (newest) {\n\t\t\t\tnewest.next = entry;\n\t\t\t\tentry.prev = newest;\n\t\t\t}\n\t\t}\n\t\tnewest = entry;\n\t};\n\treturn {\n\t\tget(key) {\n\t\t\tconst entry = cache.get(key);\n\t\t\tif (!entry) return void 0;\n\t\t\ttouch(entry);\n\t\t\treturn entry.value;\n\t\t},\n\t\tset(key, value) {\n\t\t\tif (cache.size >= max && oldest) {\n\t\t\t\tconst toDelete = oldest;\n\t\t\t\tcache.delete(toDelete.key);\n\t\t\t\tif (toDelete.next) {\n\t\t\t\t\toldest = toDelete.next;\n\t\t\t\t\ttoDelete.next.prev = void 0;\n\t\t\t\t}\n\t\t\t\tif (toDelete === newest) newest = void 0;\n\t\t\t}\n\t\t\tconst existing = cache.get(key);\n\t\t\tif (existing) {\n\t\t\t\texisting.value = value;\n\t\t\t\ttouch(existing);\n\t\t\t} else {\n\t\t\t\tconst entry = {\n\t\t\t\t\tkey,\n\t\t\t\t\tvalue,\n\t\t\t\t\tprev: newest\n\t\t\t\t};\n\t\t\t\tif (newest) newest.next = entry;\n\t\t\t\tnewest = entry;\n\t\t\t\tif (!oldest) oldest = entry;\n\t\t\t\tcache.set(key, entry);\n\t\t\t}\n\t\t},\n\t\tclear() {\n\t\t\tcache.clear();\n\t\t\toldest = void 0;\n\t\t\tnewest = void 0;\n\t\t}\n\t};\n}\n//#endregion\nexport { createLRUCache };\n\n//# sourceMappingURL=lru-cache.js.map","import { last } from \"./utils.js\";\nimport { invariant } from \"./invariant.js\";\nimport { createLRUCache } from \"./lru-cache.js\";\nconst SEGMENT_TYPE_INDEX = 4;\nconst SEGMENT_TYPE_PATHLESS = 5;\n/**\n* Populates the `output` array with the parsed representation of the given `segment` string.\n*\n* Usage:\n* ```ts\n* let output\n* let cursor = 0\n* while (cursor < path.length) {\n* output = parseSegment(path, cursor, output)\n* const end = output[5]\n* cursor = end + 1\n* ```\n*\n* `output` is stored outside to avoid allocations during repeated calls. It doesn't need to be typed\n* or initialized, it will be done automatically.\n*/\nfunction parseSegment(path, start, output = new Uint16Array(6)) {\n\tconst next = path.indexOf(\"/\", start);\n\tconst end = next === -1 ? path.length : next;\n\tconst part = path.substring(start, end);\n\tif (!part || !part.includes(\"$\")) {\n\t\toutput[0] = 0;\n\t\toutput[1] = start;\n\t\toutput[2] = start;\n\t\toutput[3] = end;\n\t\toutput[4] = end;\n\t\toutput[5] = end;\n\t\treturn output;\n\t}\n\tif (part === \"$\") {\n\t\tconst total = path.length;\n\t\toutput[0] = 2;\n\t\toutput[1] = start;\n\t\toutput[2] = start;\n\t\toutput[3] = total;\n\t\toutput[4] = total;\n\t\toutput[5] = total;\n\t\treturn output;\n\t}\n\tif (part.charCodeAt(0) === 36) {\n\t\toutput[0] = 1;\n\t\toutput[1] = start;\n\t\toutput[2] = start + 1;\n\t\toutput[3] = end;\n\t\toutput[4] = end;\n\t\toutput[5] = end;\n\t\treturn output;\n\t}\n\tconst openBrace = part.indexOf(\"{\");\n\tlet closeBrace;\n\tif (openBrace !== -1 && openBrace + 1 < part.length && (closeBrace = part.indexOf(\"}\", openBrace)) !== -1) {\n\t\tconst firstChar = part.charCodeAt(openBrace + 1);\n\t\tif (firstChar === 45) {\n\t\t\tif (openBrace + 2 < part.length && part.charCodeAt(openBrace + 2) === 36) {\n\t\t\t\tconst paramStart = openBrace + 3;\n\t\t\t\tconst paramEnd = closeBrace;\n\t\t\t\tif (paramStart < paramEnd) {\n\t\t\t\t\toutput[0] = 3;\n\t\t\t\t\toutput[1] = start + openBrace;\n\t\t\t\t\toutput[2] = start + paramStart;\n\t\t\t\t\toutput[3] = start + paramEnd;\n\t\t\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\t\t\toutput[5] = end;\n\t\t\t\t\treturn output;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (firstChar === 36) {\n\t\t\tconst dollarPos = openBrace + 1;\n\t\t\tconst afterDollar = openBrace + 2;\n\t\t\tif (afterDollar === closeBrace) {\n\t\t\t\toutput[0] = 2;\n\t\t\t\toutput[1] = start + openBrace;\n\t\t\t\toutput[2] = start + dollarPos;\n\t\t\t\toutput[3] = start + afterDollar;\n\t\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\t\toutput[5] = path.length;\n\t\t\t\treturn output;\n\t\t\t}\n\t\t\toutput[0] = 1;\n\t\t\toutput[1] = start + openBrace;\n\t\t\toutput[2] = start + afterDollar;\n\t\t\toutput[3] = start + closeBrace;\n\t\t\toutput[4] = start + closeBrace + 1;\n\t\t\toutput[5] = end;\n\t\t\treturn output;\n\t\t}\n\t}\n\toutput[0] = 0;\n\toutput[1] = start;\n\toutput[2] = start;\n\toutput[3] = end;\n\toutput[4] = end;\n\toutput[5] = end;\n\treturn output;\n}\n/**\n* Recursively parses the segments of the given route tree and populates a segment trie.\n*\n* @param data A reusable Uint16Array for parsing segments. (non important, we're just avoiding allocations)\n* @param route The current route to parse.\n* @param start The starting index for parsing within the route's full path.\n* @param node The current segment node in the trie to populate.\n* @param onRoute Callback invoked for each route processed.\n*/\nfunction parseSegments(defaultCaseSensitive, data, route, start, node, depth, dynamicListsToSort, onRoute) {\n\tonRoute?.(route);\n\tlet cursor = start;\n\t{\n\t\tconst path = route.fullPath ?? route.from;\n\t\tconst options = route.options;\n\t\tconst length = path.length;\n\t\tconst caseSensitive = options?.caseSensitive ?? defaultCaseSensitive;\n\t\tconst parseParams = options?.params?.parse ?? options?.parseParams;\n\t\twhile (cursor < length) {\n\t\t\tconst segment = parseSegment(path, cursor, data);\n\t\t\tlet nextNode;\n\t\t\tconst start = cursor;\n\t\t\tconst end = segment[5];\n\t\t\tcursor = end + 1;\n\t\t\tdepth++;\n\t\t\tconst kind = segment[0];\n\t\t\tswitch (kind) {\n\t\t\t\tcase 0: {\n\t\t\t\t\tconst value = path.substring(segment[2], segment[3]);\n\t\t\t\t\tlet name = value;\n\t\t\t\t\tlet staticChildren;\n\t\t\t\t\tif (caseSensitive) staticChildren = node.static ??= /* @__PURE__ */ new Map();\n\t\t\t\t\telse {\n\t\t\t\t\t\tname = value.toLowerCase();\n\t\t\t\t\t\tstaticChildren = node.staticInsensitive ??= /* @__PURE__ */ new Map();\n\t\t\t\t\t}\n\t\t\t\t\tconst existingNode = staticChildren.get(name);\n\t\t\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst next = createStaticNode(path);\n\t\t\t\t\t\tnext.parent = node;\n\t\t\t\t\t\tnext.depth = depth;\n\t\t\t\t\t\tnextNode = next;\n\t\t\t\t\t\tstaticChildren.set(name, next);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:\n\t\t\t\tcase 3:\n\t\t\t\tcase 2: {\n\t\t\t\t\tconst prefix_raw = path.substring(start, segment[1]);\n\t\t\t\t\tconst suffix_raw = path.substring(segment[4], end);\n\t\t\t\t\tconst actuallyCaseSensitive = caseSensitive && !!(prefix_raw || suffix_raw);\n\t\t\t\t\tconst prefix = !prefix_raw ? void 0 : actuallyCaseSensitive ? prefix_raw : prefix_raw.toLowerCase();\n\t\t\t\t\tconst suffix = !suffix_raw ? void 0 : actuallyCaseSensitive ? suffix_raw : suffix_raw.toLowerCase();\n\t\t\t\t\tconst siblings = kind === 1 ? node.dynamic : kind === 3 ? node.optional : node.wildcard;\n\t\t\t\t\tconst existingNode = kind !== 2 && !parseParams && siblings?.find((s) => !s.parse && s.caseSensitive === actuallyCaseSensitive && s.prefix === prefix && s.suffix === suffix);\n\t\t\t\t\tif (existingNode) nextNode = existingNode;\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst next = createDynamicNode(kind, path, actuallyCaseSensitive, prefix, suffix);\n\t\t\t\t\t\tnextNode = next;\n\t\t\t\t\t\tnext.parent = node;\n\t\t\t\t\t\tnext.depth = depth;\n\t\t\t\t\t\tlet nodes;\n\t\t\t\t\t\tif (kind === 1) nodes = node.dynamic ??= [];\n\t\t\t\t\t\telse if (kind === 3) nodes = node.optional ??= [];\n\t\t\t\t\t\telse nodes = node.wildcard ??= [];\n\t\t\t\t\t\tnodes.push(next);\n\t\t\t\t\t\tif (nodes.length === 2) dynamicListsToSort?.push(nodes);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnode = nextNode;\n\t\t}\n\t\tif (parseParams && route.children && !route.isRoot && route.id && route.id.charCodeAt(route.id.lastIndexOf(\"/\") + 1) === 95) {\n\t\t\tconst pathlessNode = createStaticNode(path);\n\t\t\tpathlessNode.kind = SEGMENT_TYPE_PATHLESS;\n\t\t\tpathlessNode.parent = node;\n\t\t\tdepth++;\n\t\t\tpathlessNode.depth = depth;\n\t\t\tnode.pathless ??= [];\n\t\t\tnode.pathless.push(pathlessNode);\n\t\t\tnode = pathlessNode;\n\t\t}\n\t\tconst isLeaf = (route.path || !route.children) && !route.isRoot;\n\t\tif (isLeaf && path.endsWith(\"/\")) {\n\t\t\tconst indexNode = createStaticNode(path);\n\t\t\tindexNode.kind = SEGMENT_TYPE_INDEX;\n\t\t\tindexNode.parent = node;\n\t\t\tdepth++;\n\t\t\tindexNode.depth = depth;\n\t\t\tnode.index = indexNode;\n\t\t\tnode = indexNode;\n\t\t}\n\t\tnode.parse = parseParams ?? null;\n\t\tnode.priority = options?.params?.priority ?? 0;\n\t\tif (isLeaf && !node.route) {\n\t\t\tnode.route = route;\n\t\t\tnode.fullPath = path;\n\t\t}\n\t}\n\tif (route.children) for (const child of route.children) parseSegments(defaultCaseSensitive, data, child, cursor, node, depth, dynamicListsToSort, onRoute);\n}\nfunction sortDynamic(a, b) {\n\tif (a.parse && !b.parse) return -1;\n\tif (!a.parse && b.parse) return 1;\n\tif (a.parse && b.parse && (a.priority || b.priority)) return b.priority - a.priority;\n\tif (a.prefix && b.prefix && a.prefix !== b.prefix) {\n\t\tif (a.prefix.startsWith(b.prefix)) return -1;\n\t\tif (b.prefix.startsWith(a.prefix)) return 1;\n\t}\n\tif (a.suffix && b.suffix && a.suffix !== b.suffix) {\n\t\tif (a.suffix.endsWith(b.suffix)) return -1;\n\t\tif (b.suffix.endsWith(a.suffix)) return 1;\n\t}\n\tif (a.prefix && !b.prefix) return -1;\n\tif (!a.prefix && b.prefix) return 1;\n\tif (a.suffix && !b.suffix) return -1;\n\tif (!a.suffix && b.suffix) return 1;\n\tif (a.caseSensitive && !b.caseSensitive) return -1;\n\tif (!a.caseSensitive && b.caseSensitive) return 1;\n\treturn 0;\n}\nfunction createStaticNode(fullPath) {\n\treturn {\n\t\tkind: 0,\n\t\tdepth: 0,\n\t\tpathless: null,\n\t\tindex: null,\n\t\tstatic: null,\n\t\tstaticInsensitive: null,\n\t\tdynamic: null,\n\t\toptional: null,\n\t\twildcard: null,\n\t\troute: null,\n\t\tfullPath,\n\t\tparent: null,\n\t\tparse: null,\n\t\tpriority: 0\n\t};\n}\n/**\n* Keys must be declared in the same order as in `SegmentNode` type,\n* to ensure they are represented as the same object class in the engine.\n*/\nfunction createDynamicNode(kind, fullPath, caseSensitive, prefix, suffix) {\n\treturn {\n\t\tkind,\n\t\tdepth: 0,\n\t\tpathless: null,\n\t\tindex: null,\n\t\tstatic: null,\n\t\tstaticInsensitive: null,\n\t\tdynamic: null,\n\t\toptional: null,\n\t\twildcard: null,\n\t\troute: null,\n\t\tfullPath,\n\t\tparent: null,\n\t\tparse: null,\n\t\tpriority: 0,\n\t\tcaseSensitive,\n\t\tprefix,\n\t\tsuffix\n\t};\n}\nfunction processRouteMasks(routeList, processedTree) {\n\tconst segmentTree = createStaticNode(\"/\");\n\tconst data = new Uint16Array(6);\n\tconst dynamicListsToSort = [];\n\tfor (const route of routeList) parseSegments(false, data, route, 1, segmentTree, 0, dynamicListsToSort);\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\tprocessedTree.masksTree = segmentTree;\n\tprocessedTree.flatCache = createLRUCache(1e3);\n}\n/**\n* Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.\n*/\nfunction findFlatMatch(path, processedTree) {\n\tpath ||= \"/\";\n\tconst cached = processedTree.flatCache.get(path);\n\tif (cached !== void 0) return cached;\n\tconst result = findMatch(path, processedTree.masksTree);\n\tprocessedTree.flatCache.set(path, result);\n\treturn result;\n}\n/**\n* @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree\n*/\nfunction findSingleMatch(from, caseSensitive, fuzzy, path, processedTree) {\n\tfrom ||= \"/\";\n\tpath ||= \"/\";\n\tconst key = caseSensitive ? `case\\0${from}` : from;\n\tlet tree = processedTree.singleCache.get(key);\n\tif (!tree) {\n\t\ttree = createStaticNode(\"/\");\n\t\tparseSegments(caseSensitive, new Uint16Array(6), { from }, 1, tree, 0);\n\t\tprocessedTree.singleCache.set(key, tree);\n\t}\n\treturn findMatch(path, tree, fuzzy);\n}\nfunction findRouteMatch(path, processedTree, fuzzy = false) {\n\tconst key = fuzzy ? path : `nofuzz\\0${path}`;\n\tconst cached = processedTree.matchCache.get(key);\n\tif (cached !== void 0) return cached;\n\tpath ||= \"/\";\n\tlet result;\n\ttry {\n\t\tresult = findMatch(path, processedTree.segmentTree, fuzzy);\n\t} catch (err) {\n\t\tif (err instanceof URIError) result = null;\n\t\telse throw err;\n\t}\n\tif (result) result.branch = buildRouteBranch(result.route);\n\tprocessedTree.matchCache.set(key, result);\n\treturn result;\n}\n/** Trim trailing slashes (except preserving root '/'). */\nfunction trimPathRight(path) {\n\treturn path === \"/\" ? path : path.replace(/\\/{1,}$/, \"\");\n}\n/**\n* Processes a route tree into a segment trie for efficient path matching.\n* Also builds lookup maps for routes by ID and by trimmed full path.\n*/\nfunction processRouteTree(routeTree, caseSensitive = false, initRoute) {\n\tconst segmentTree = createStaticNode(routeTree.fullPath);\n\tconst data = new Uint16Array(6);\n\tconst dynamicListsToSort = [];\n\tconst routesById = {};\n\tconst routesByPath = {};\n\tlet index = 0;\n\tparseSegments(caseSensitive, data, routeTree, 1, segmentTree, 0, dynamicListsToSort, (route) => {\n\t\tinitRoute?.(route, index);\n\t\tif (route.id in routesById) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Duplicate routes found with id: ${String(route.id)}`);\n\t\t\tinvariant();\n\t\t}\n\t\troutesById[route.id] = route;\n\t\tif (index !== 0 && route.path) {\n\t\t\tconst trimmedFullPath = trimPathRight(route.fullPath);\n\t\t\tif (!routesByPath[trimmedFullPath] || route.fullPath.endsWith(\"/\")) routesByPath[trimmedFullPath] = route;\n\t\t}\n\t\tindex++;\n\t});\n\tfor (const nodes of dynamicListsToSort) nodes.sort(sortDynamic);\n\treturn {\n\t\tprocessedTree: {\n\t\t\tsegmentTree,\n\t\t\tsingleCache: createLRUCache(1e3),\n\t\t\tmatchCache: createLRUCache(1e3),\n\t\t\tflatCache: null,\n\t\t\tmasksTree: null\n\t\t},\n\t\troutesById,\n\t\troutesByPath\n\t};\n}\nfunction findMatch(path, segmentTree, fuzzy = false) {\n\tconst parts = path.split(\"/\");\n\tconst leaf = getNodeMatch(path, parts, segmentTree, fuzzy);\n\tif (!leaf) return null;\n\tconst [rawParams] = extractParams(path, parts, leaf);\n\treturn {\n\t\troute: leaf.node.route,\n\t\trawParams\n\t};\n}\n/**\n* This function is \"resumable\":\n* - the `leaf` input can contain `extract` and `rawParams` properties from a previous `extractParams` call\n* - the returned `state` can be passed back as `extract` in a future call to continue extracting params from where we left off\n*\n* Inputs are *not* mutated.\n*/\nfunction extractParams(path, parts, leaf) {\n\tconst list = buildBranch(leaf.node);\n\tlet nodeParts = null;\n\tconst rawParams = Object.create(null);\n\t/** which segment of the path we're currently processing */\n\tlet partIndex = leaf.extract?.part ?? 0;\n\t/** which node of the route tree branch we're currently processing */\n\tlet nodeIndex = leaf.extract?.node ?? 0;\n\t/** index of the 1st character of the segment we're processing in the path string */\n\tlet pathIndex = leaf.extract?.path ?? 0;\n\t/** which fullPath segment we're currently processing */\n\tlet segmentCount = leaf.extract?.segment ?? 0;\n\tfor (; nodeIndex < list.length; partIndex++, nodeIndex++, pathIndex++, segmentCount++) {\n\t\tconst node = list[nodeIndex];\n\t\tif (node.kind === SEGMENT_TYPE_INDEX) break;\n\t\tif (node.kind === SEGMENT_TYPE_PATHLESS) {\n\t\t\tsegmentCount--;\n\t\t\tpartIndex--;\n\t\t\tpathIndex--;\n\t\t\tcontinue;\n\t\t}\n\t\tconst part = parts[partIndex];\n\t\tconst currentPathIndex = pathIndex;\n\t\tif (part) pathIndex += part.length;\n\t\tif (node.kind === 1) {\n\t\t\tnodeParts ??= leaf.node.fullPath.split(\"/\");\n\t\t\tconst nodePart = nodeParts[segmentCount];\n\t\t\tconst preLength = node.prefix?.length ?? 0;\n\t\t\tif (nodePart.charCodeAt(preLength) === 123) {\n\t\t\t\tconst sufLength = node.suffix?.length ?? 0;\n\t\t\t\tconst name = nodePart.substring(preLength + 2, nodePart.length - sufLength - 1);\n\t\t\t\tconst value = part.substring(preLength, part.length - sufLength);\n\t\t\t\trawParams[name] = decodeURIComponent(value);\n\t\t\t} else {\n\t\t\t\tconst name = nodePart.substring(1);\n\t\t\t\trawParams[name] = decodeURIComponent(part);\n\t\t\t}\n\t\t} else if (node.kind === 3) {\n\t\t\tif (leaf.skipped & 1 << nodeIndex) {\n\t\t\t\tpartIndex--;\n\t\t\t\tpathIndex = currentPathIndex - 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnodeParts ??= leaf.node.fullPath.split(\"/\");\n\t\t\tconst nodePart = nodeParts[segmentCount];\n\t\t\tconst preLength = node.prefix?.length ?? 0;\n\t\t\tconst sufLength = node.suffix?.length ?? 0;\n\t\t\tconst name = nodePart.substring(preLength + 3, nodePart.length - sufLength - 1);\n\t\t\tconst value = node.suffix || node.prefix ? part.substring(preLength, part.length - sufLength) : part;\n\t\t\tif (value) rawParams[name] = decodeURIComponent(value);\n\t\t} else if (node.kind === 2) {\n\t\t\tconst n = node;\n\t\t\tconst value = path.substring(currentPathIndex + (n.prefix?.length ?? 0), path.length - (n.suffix?.length ?? 0));\n\t\t\tconst splat = decodeURIComponent(value);\n\t\t\trawParams[\"*\"] = splat;\n\t\t\trawParams._splat = splat;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (leaf.rawParams) Object.assign(rawParams, leaf.rawParams);\n\treturn [rawParams, {\n\t\tpart: partIndex,\n\t\tnode: nodeIndex,\n\t\tpath: pathIndex,\n\t\tsegment: segmentCount\n\t}];\n}\nfunction buildRouteBranch(route) {\n\tconst list = [route];\n\twhile (route.parentRoute) {\n\t\troute = route.parentRoute;\n\t\tlist.push(route);\n\t}\n\tlist.reverse();\n\treturn list;\n}\nfunction buildBranch(node) {\n\tconst list = Array(node.depth + 1);\n\tdo {\n\t\tlist[node.depth] = node;\n\t\tnode = node.parent;\n\t} while (node);\n\treturn list;\n}\nfunction getNodeMatch(path, parts, segmentTree, fuzzy) {\n\tif (path === \"/\" && segmentTree.index) return {\n\t\tnode: segmentTree.index,\n\t\tskipped: 0\n\t};\n\tconst trailingSlash = !last(parts);\n\tconst pathIsIndex = trailingSlash && path !== \"/\";\n\tconst partsLength = parts.length - (trailingSlash ? 1 : 0);\n\tconst stack = [{\n\t\tnode: segmentTree,\n\t\tindex: 1,\n\t\tskipped: 0,\n\t\tstatics: 0,\n\t\tdynamics: 0,\n\t\toptionals: 0\n\t}];\n\tlet bestFuzzy = null;\n\tlet bestMatch = null;\n\twhile (stack.length) {\n\t\tconst frame = stack.pop();\n\t\tconst { node, index, skipped, statics, dynamics, optionals } = frame;\n\t\tlet { extract, rawParams } = frame;\n\t\tif (node.kind === 2 && node.route && !isFrameMoreSpecific(bestMatch, frame)) continue;\n\t\tif (node.parse) {\n\t\t\tif (!validateParseParams(path, parts, frame)) continue;\n\t\t\trawParams = frame.rawParams;\n\t\t\textract = frame.extract;\n\t\t}\n\t\tif (fuzzy && node.route && node.kind !== SEGMENT_TYPE_INDEX && isFrameMoreSpecific(bestFuzzy, frame)) bestFuzzy = frame;\n\t\tconst isBeyondPath = index === partsLength;\n\t\tif (isBeyondPath) {\n\t\t\tif (node.route && (!pathIsIndex || node.kind === SEGMENT_TYPE_INDEX || node.kind === 2) && isFrameMoreSpecific(bestMatch, frame)) bestMatch = frame;\n\t\t\tif (!node.optional && !node.wildcard && !node.index && !node.pathless) continue;\n\t\t}\n\t\tconst part = isBeyondPath ? void 0 : parts[index];\n\t\tlet lowerPart;\n\t\tif (isBeyondPath && node.index) {\n\t\t\tconst indexFrame = {\n\t\t\t\tnode: node.index,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t};\n\t\t\tlet indexValid = true;\n\t\t\tif (node.index.parse) {\n\t\t\t\tif (!validateParseParams(path, parts, indexFrame)) indexValid = false;\n\t\t\t}\n\t\t\tif (indexValid) {\n\t\t\t\tif (!dynamics && !optionals && !skipped && isPerfectStaticMatch(statics, partsLength)) return indexFrame;\n\t\t\t\tif (isFrameMoreSpecific(bestMatch, indexFrame)) bestMatch = indexFrame;\n\t\t\t}\n\t\t}\n\t\tif (node.wildcard) for (let i = node.wildcard.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.wildcard[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tif (!(segment.caseSensitive ? part : lowerPart ??= part.toLowerCase()).startsWith(prefix)) continue;\n\t\t\t}\n\t\t\tif (suffix) {\n\t\t\t\tif (isBeyondPath) continue;\n\t\t\t\tconst end = parts.slice(index).join(\"/\").slice(-suffix.length);\n\t\t\t\tif ((segment.caseSensitive ? end : end.toLowerCase()) !== suffix) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: partsLength,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.optional) {\n\t\t\tconst nextSkipped = skipped | 1 << node.depth + 1;\n\t\t\tfor (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex,\n\t\t\t\t\tskipped: nextSkipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals,\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!isBeyondPath) for (let i = node.optional.length - 1; i >= 0; i--) {\n\t\t\t\tconst segment = node.optional[i];\n\t\t\t\tconst { prefix, suffix } = segment;\n\t\t\t\tif (prefix || suffix) {\n\t\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\t\tif (suffix && !casePart.endsWith(suffix)) continue;\n\t\t\t\t}\n\t\t\t\tstack.push({\n\t\t\t\t\tnode: segment,\n\t\t\t\t\tindex: index + 1,\n\t\t\t\t\tskipped,\n\t\t\t\t\tstatics,\n\t\t\t\t\tdynamics,\n\t\t\t\t\toptionals: optionals + segmentScore(partsLength, index),\n\t\t\t\t\textract,\n\t\t\t\t\trawParams\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (!isBeyondPath && node.dynamic && part) for (let i = node.dynamic.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.dynamic[i];\n\t\t\tconst { prefix, suffix } = segment;\n\t\t\tif (prefix || suffix) {\n\t\t\t\tconst casePart = segment.caseSensitive ? part : lowerPart ??= part.toLowerCase();\n\t\t\t\tif (prefix && !casePart.startsWith(prefix)) continue;\n\t\t\t\tif (suffix && !casePart.endsWith(suffix)) continue;\n\t\t\t}\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics: dynamics + segmentScore(partsLength, index),\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.staticInsensitive) {\n\t\t\tconst match = node.staticInsensitive.get(lowerPart ??= part.toLowerCase());\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (!isBeyondPath && node.static) {\n\t\t\tconst match = node.static.get(part);\n\t\t\tif (match) stack.push({\n\t\t\t\tnode: match,\n\t\t\t\tindex: index + 1,\n\t\t\t\tskipped,\n\t\t\t\tstatics: statics + segmentScore(partsLength, index),\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t\tif (node.pathless) for (let i = node.pathless.length - 1; i >= 0; i--) {\n\t\t\tconst segment = node.pathless[i];\n\t\t\tstack.push({\n\t\t\t\tnode: segment,\n\t\t\t\tindex,\n\t\t\t\tskipped,\n\t\t\t\tstatics,\n\t\t\t\tdynamics,\n\t\t\t\toptionals,\n\t\t\t\textract,\n\t\t\t\trawParams\n\t\t\t});\n\t\t}\n\t}\n\tif (bestMatch) return bestMatch;\n\tif (fuzzy && bestFuzzy) {\n\t\tlet sliceIndex = bestFuzzy.index;\n\t\tfor (let i = 0; i < bestFuzzy.index; i++) sliceIndex += parts[i].length;\n\t\tconst splat = sliceIndex === path.length ? \"/\" : path.slice(sliceIndex);\n\t\tbestFuzzy.rawParams ??= Object.create(null);\n\t\tbestFuzzy.rawParams[\"**\"] = decodeURIComponent(splat);\n\t\treturn bestFuzzy;\n\t}\n\treturn null;\n}\nfunction segmentScore(partsLength, index) {\n\treturn 2 ** (partsLength - index - 1);\n}\nfunction isPerfectStaticMatch(statics, partsLength) {\n\treturn statics === 2 ** (partsLength - 1) - 1;\n}\nfunction validateParseParams(path, parts, frame) {\n\tlet rawParams;\n\tlet state;\n\ttry {\n\t\t[rawParams, state] = extractParams(path, parts, frame);\n\t} catch {\n\t\treturn null;\n\t}\n\tframe.rawParams = rawParams;\n\tframe.extract = state;\n\tif (!frame.node.parse) return true;\n\ttry {\n\t\tif (frame.node.parse(rawParams) === false) return null;\n\t} catch {}\n\treturn true;\n}\nfunction isFrameMoreSpecific(prev, next) {\n\tif (!prev) return true;\n\treturn next.statics > prev.statics || next.statics === prev.statics && (next.dynamics > prev.dynamics || next.dynamics === prev.dynamics && (next.optionals > prev.optionals || next.optionals === prev.optionals && ((next.node.kind === SEGMENT_TYPE_INDEX) > (prev.node.kind === SEGMENT_TYPE_INDEX) || next.node.kind === SEGMENT_TYPE_INDEX === (prev.node.kind === SEGMENT_TYPE_INDEX) && next.node.depth > prev.node.depth)));\n}\n//#endregion\nexport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, parseSegment, processRouteMasks, processRouteTree };\n\n//# sourceMappingURL=new-process-route-tree.js.map","import { last } from \"./utils.js\";\nimport { parseSegment } from \"./new-process-route-tree.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/path.ts\n/** Join path segments, cleaning duplicate slashes between parts. */\nfunction joinPaths(paths) {\n\treturn cleanPath(paths.filter((val) => {\n\t\treturn val !== void 0;\n\t}).join(\"/\"));\n}\n/** Remove repeated slashes from a path string. */\nfunction cleanPath(path) {\n\treturn path.replace(/\\/{2,}/g, \"/\");\n}\n/** Trim leading slashes (except preserving root '/'). */\nfunction trimPathLeft(path) {\n\treturn path === \"/\" ? path : path.replace(/^\\/{1,}/, \"\");\n}\n/** Trim trailing slashes (except preserving root '/'). */\nfunction trimPathRight(path) {\n\tconst len = path.length;\n\treturn len > 1 && path[len - 1] === \"/\" ? path.replace(/\\/{1,}$/, \"\") : path;\n}\n/** Trim both leading and trailing slashes. */\nfunction trimPath(path) {\n\treturn trimPathRight(trimPathLeft(path));\n}\n/** Remove a trailing slash from value when appropriate for comparisons. */\nfunction removeTrailingSlash(value, basepath) {\n\tif (value?.endsWith(\"/\") && value !== \"/\" && value !== `${basepath}/`) return value.slice(0, -1);\n\treturn value;\n}\n/**\n* Compare two pathnames for exact equality after normalizing trailing slashes\n* relative to the provided `basepath`.\n*/\nfunction exactPathTest(pathName1, pathName2, basepath) {\n\treturn removeTrailingSlash(pathName1, basepath) === removeTrailingSlash(pathName2, basepath);\n}\n/**\n* Resolve a destination path against a base, honoring trailing-slash policy\n* and supporting relative segments (`.`/`..`) and absolute `to` values.\n*/\nfunction resolvePath({ base, to, trailingSlash = \"never\", cache }) {\n\tif (to.includes(\"//\")) to = cleanPath(to);\n\tif (to.startsWith(\"/\")) {\n\t\tif (to.length === 1 || trailingSlash === \"preserve\") return to;\n\t\tif (trailingSlash === \"always\") return to.endsWith(\"/\") ? to : `${to}/`;\n\t\treturn to.endsWith(\"/\") ? to.slice(0, -1) : to;\n\t}\n\tconst isBase = to === \".\";\n\tlet key;\n\tif (cache) {\n\t\tkey = isBase ? base : base + \"\\0\" + to;\n\t\tconst cached = cache.get(key);\n\t\tif (cached) return cached;\n\t}\n\tlet baseSegments;\n\tif (isBase) baseSegments = base.split(\"/\");\n\telse {\n\t\tif (base.includes(\"//\")) base = cleanPath(base);\n\t\tbaseSegments = base.split(\"/\");\n\t\twhile (baseSegments.length > 1 && last(baseSegments) === \"\") baseSegments.pop();\n\t\tconst toSegments = to.split(\"/\");\n\t\tfor (let index = 0, length = toSegments.length; index < length; index++) {\n\t\t\tconst value = toSegments[index];\n\t\t\tif (value === \"\") {\n\t\t\t\tif (!index) baseSegments = [value];\n\t\t\t\telse if (index === length - 1) baseSegments.push(value);\n\t\t\t} else if (value === \"..\") if (baseSegments.length > 1) baseSegments.pop();\n\t\t\telse baseSegments = [\"\"];\n\t\t\telse if (value === \".\") {} else baseSegments.push(value);\n\t\t}\n\t}\n\tif (baseSegments.length > 1) {\n\t\tif (last(baseSegments) === \"\") {\n\t\t\tif (trailingSlash === \"never\") baseSegments.pop();\n\t\t} else if (trailingSlash === \"always\") baseSegments.push(\"\");\n\t}\n\tconst joined = baseSegments.join(\"/\");\n\tconst result = (isBase ? cleanPath(joined) : joined) || \"/\";\n\tif (key && cache) cache.set(key, result);\n\treturn result;\n}\n/**\n* Create a pre-compiled decode config from allowed characters.\n* This should be called once at router initialization.\n*/\nfunction compileDecodeCharMap(pathParamsAllowedCharacters) {\n\tconst charMap = new Map(pathParamsAllowedCharacters.map((char) => [encodeURIComponent(char), char]));\n\tconst pattern = Array.from(charMap.keys()).map((key) => key.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\");\n\tconst regex = new RegExp(pattern, \"g\");\n\treturn (encoded) => encoded.replace(regex, (match) => charMap.get(match) ?? match);\n}\nfunction encodeParam(key, params, decoder) {\n\tconst value = params[key];\n\tif (typeof value !== \"string\") return value;\n\tif (key === \"_splat\") {\n\t\tif (/^[a-zA-Z0-9\\-._~!/]*$/.test(value)) return value;\n\t\treturn value.split(\"/\").map((segment) => encodePathParam(segment, decoder)).join(\"/\");\n\t} else return encodePathParam(value, decoder);\n}\n/**\n* Interpolate params and wildcards into a route path template.\n*\n* - Encodes params safely (configurable allowed characters)\n* - Supports `{-$optional}` segments, `{prefix{$id}suffix}` and `{$}` wildcards\n*/\nfunction interpolatePath({ path, params, decoder, ...rest }) {\n\tlet isMissingParams = false;\n\tconst usedParams = Object.create(null);\n\tif (!path || path === \"/\") return {\n\t\tinterpolatedPath: \"/\",\n\t\tusedParams,\n\t\tisMissingParams\n\t};\n\tif (!path.includes(\"$\")) return {\n\t\tinterpolatedPath: path,\n\t\tusedParams,\n\t\tisMissingParams\n\t};\n\tif (isServer ?? rest.server) {\n\t\tif (path.indexOf(\"{\") === -1) {\n\t\t\tconst length = path.length;\n\t\t\tlet cursor = 0;\n\t\t\tlet joined = \"\";\n\t\t\twhile (cursor < length) {\n\t\t\t\twhile (cursor < length && path.charCodeAt(cursor) === 47) cursor++;\n\t\t\t\tif (cursor >= length) break;\n\t\t\t\tconst start = cursor;\n\t\t\t\tlet end = path.indexOf(\"/\", cursor);\n\t\t\t\tif (end === -1) end = length;\n\t\t\t\tcursor = end;\n\t\t\t\tconst part = path.substring(start, end);\n\t\t\t\tif (!part) continue;\n\t\t\t\tif (part.charCodeAt(0) === 36) if (part.length === 1) {\n\t\t\t\t\tconst splat = params._splat;\n\t\t\t\t\tusedParams._splat = splat;\n\t\t\t\t\tusedParams[\"*\"] = splat;\n\t\t\t\t\tif (!splat) {\n\t\t\t\t\t\tisMissingParams = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst value = encodeParam(\"_splat\", params, decoder);\n\t\t\t\t\tjoined += \"/\" + value;\n\t\t\t\t} else {\n\t\t\t\t\tconst key = part.substring(1);\n\t\t\t\t\tif (!isMissingParams && !(key in params)) isMissingParams = true;\n\t\t\t\t\tusedParams[key] = params[key];\n\t\t\t\t\tconst value = encodeParam(key, params, decoder) ?? \"undefined\";\n\t\t\t\t\tjoined += \"/\" + value;\n\t\t\t\t}\n\t\t\t\telse joined += \"/\" + part;\n\t\t\t}\n\t\t\tif (path.endsWith(\"/\")) joined += \"/\";\n\t\t\treturn {\n\t\t\t\tusedParams,\n\t\t\t\tinterpolatedPath: joined || \"/\",\n\t\t\t\tisMissingParams\n\t\t\t};\n\t\t}\n\t}\n\tconst length = path.length;\n\tlet cursor = 0;\n\tlet segment;\n\tlet joined = \"\";\n\twhile (cursor < length) {\n\t\tconst start = cursor;\n\t\tsegment = parseSegment(path, start, segment);\n\t\tconst end = segment[5];\n\t\tcursor = end + 1;\n\t\tif (start === end) continue;\n\t\tconst kind = segment[0];\n\t\tif (kind === 0) {\n\t\t\tjoined += \"/\" + path.substring(start, end);\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 2) {\n\t\t\tconst splat = params._splat;\n\t\t\tusedParams._splat = splat;\n\t\t\tusedParams[\"*\"] = splat;\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tif (!splat) {\n\t\t\t\tisMissingParams = true;\n\t\t\t\tif (prefix || suffix) joined += \"/\" + prefix + suffix;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = encodeParam(\"_splat\", params, decoder);\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 1) {\n\t\t\tconst key = path.substring(segment[2], segment[3]);\n\t\t\tif (!isMissingParams && !(key in params)) isMissingParams = true;\n\t\t\tusedParams[key] = params[key];\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tconst value = encodeParam(key, params, decoder) ?? \"undefined\";\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t\tif (kind === 3) {\n\t\t\tconst key = path.substring(segment[2], segment[3]);\n\t\t\tconst valueRaw = params[key];\n\t\t\tif (valueRaw == null) continue;\n\t\t\tusedParams[key] = valueRaw;\n\t\t\tconst prefix = path.substring(start, segment[1]);\n\t\t\tconst suffix = path.substring(segment[4], end);\n\t\t\tconst value = encodeParam(key, params, decoder) ?? \"\";\n\t\t\tjoined += \"/\" + prefix + value + suffix;\n\t\t\tcontinue;\n\t\t}\n\t}\n\tif (path.endsWith(\"/\")) joined += \"/\";\n\treturn {\n\t\tusedParams,\n\t\tinterpolatedPath: joined || \"/\",\n\t\tisMissingParams\n\t};\n}\nfunction encodePathParam(value, decoder) {\n\tconst encoded = encodeURIComponent(value);\n\treturn decoder?.(encoded) ?? encoded;\n}\n//#endregion\nexport { cleanPath, compileDecodeCharMap, exactPathTest, interpolatePath, joinPaths, removeTrailingSlash, resolvePath, trimPath, trimPathLeft, trimPathRight };\n\n//# sourceMappingURL=path.js.map","//#region src/not-found.ts\n/**\n* Create a not-found error object recognized by TanStack Router.\n*\n* Throw this from loaders/actions to trigger the nearest `notFoundComponent`.\n* Use `routeId` to target a specific route's not-found boundary. If `throw`\n* is true, the error is thrown instead of returned.\n*\n* @param options Optional settings including `routeId`, `headers`, and `throw`.\n* @returns A not-found error object that can be thrown or returned.\n* @link https://tanstack.com/router/latest/docs/router/framework/react/api/router/notFoundFunction\n*/\nfunction notFound(options = {}) {\n\toptions.isNotFound = true;\n\tif (options.throw) throw options;\n\treturn options;\n}\n/** Determine if a value is a TanStack Router not-found error. */\nfunction isNotFound(obj) {\n\treturn obj?.isNotFound === true;\n}\n//#endregion\nexport { isNotFound, notFound };\n\n//# sourceMappingURL=not-found.js.map","import { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/scroll-restoration.ts\nfunction getSafeSessionStorage() {\n\ttry {\n\t\treturn sessionStorage;\n\t} catch {\n\t\treturn;\n\t}\n}\nconst storageKey = \"tsr-scroll-restoration-v1_3\";\nconst safeSessionStorage = getSafeSessionStorage();\nfunction createScrollRestorationCache() {\n\ttry {\n\t\treturn JSON.parse(safeSessionStorage?.getItem(\"tsr-scroll-restoration-v1_3\") || \"{}\");\n\t} catch {\n\t\treturn {};\n\t}\n}\nfunction persistScrollRestorationCache() {\n\ttry {\n\t\tsafeSessionStorage?.setItem(storageKey, JSON.stringify(scrollRestorationCache));\n\t} catch {\n\t\tif (process.env.NODE_ENV !== \"production\") console.warn(\"[ts-router] Could not persist scroll restoration state to sessionStorage.\");\n\t}\n}\nconst scrollRestorationCache = /* @__PURE__ */ createScrollRestorationCache();\nconst scrollRestorationIdAttribute = \"data-scroll-restoration-id\";\n/**\n* The default `getKey` function for `useScrollRestoration`.\n* It returns the `key` from the location state or the `href` of the location.\n*\n* The `location.href` is used as a fallback to support the use case where the location state is not available like the initial render.\n*/\nconst defaultGetScrollRestorationKey = (location) => {\n\treturn location.state.__TSR_key || location.href;\n};\nfunction getScrollRestorationSelector(element) {\n\tconst attrId = element.getAttribute(scrollRestorationIdAttribute);\n\tif (attrId) return `[${scrollRestorationIdAttribute}=\"${attrId}\"]`;\n\tlet selector = \"\";\n\tlet el = element;\n\tlet parent;\n\twhile (parent = el.parentNode) {\n\t\tlet index = 1;\n\t\tlet sibling = el;\n\t\twhile (sibling = sibling.previousElementSibling) index++;\n\t\tconst part = `${el.localName}:nth-child(${index})`;\n\t\tselector = selector ? `${part} > ${selector}` : part;\n\t\tel = parent;\n\t}\n\treturn selector;\n}\nfunction getElementScrollRestorationEntry(router, options) {\n\tconst entries = scrollRestorationCache[(options.getKey || defaultGetScrollRestorationKey)(router.latestLocation)];\n\tif (!entries) return;\n\tif (options.id) return entries[`[${scrollRestorationIdAttribute}=\"${options.id}\"]`];\n\tconst element = options.getElement?.();\n\tif (!element) return;\n\treturn entries[element === window ? windowScrollTarget : getScrollRestorationSelector(element)];\n}\nlet ignoreScroll = false;\nconst windowScrollTarget = \"window\";\nfunction getElement(selector) {\n\ttry {\n\t\treturn typeof selector === \"function\" ? selector() : document.querySelector(selector);\n\t} catch {}\n}\nfunction getScrollToTopElements(scrollToTopSelectors) {\n\tconst elements = /* @__PURE__ */ new Set();\n\tfor (const selector of scrollToTopSelectors) {\n\t\tif (selector === windowScrollTarget) continue;\n\t\tconst element = getElement(selector);\n\t\tif (element) elements.add(element);\n\t}\n\treturn elements;\n}\nfunction setupScrollRestoration(router, force) {\n\tconst shouldSetupScrollRestoration = force ?? router.options.scrollRestoration;\n\tconst scroll = router._scroll;\n\tif (shouldSetupScrollRestoration) scroll.restoring = true;\n\tif (isServer ?? router.isServer) return;\n\tconst getKey = router.options.getScrollRestorationKey || defaultGetScrollRestorationKey;\n\tconst trackedScrollTargets = /* @__PURE__ */ new Set();\n\tconst snapshotCurrentScrollTargets = (restoreKey) => {\n\t\tconst keyEntry = scrollRestorationCache[restoreKey] ||= {};\n\t\tfor (const target of trackedScrollTargets) if (target === document) keyEntry[windowScrollTarget] = {\n\t\t\tscrollX,\n\t\t\tscrollY\n\t\t};\n\t\telse if (target.isConnected) keyEntry[getScrollRestorationSelector(target)] = {\n\t\t\tscrollX: target.scrollLeft,\n\t\t\tscrollY: target.scrollTop\n\t\t};\n\t};\n\tif (shouldSetupScrollRestoration && !scroll.restoration) {\n\t\tscroll.restoration = true;\n\t\tignoreScroll = false;\n\t\thistory.scrollRestoration = \"manual\";\n\t\tdocument.addEventListener(\"scroll\", (event) => {\n\t\t\tif (ignoreScroll) return;\n\t\t\ttrackedScrollTargets.add(event.target);\n\t\t}, true);\n\t\trouter.subscribe(\"onBeforeLoad\", (event) => {\n\t\t\tif (event.fromLocation) snapshotCurrentScrollTargets(getKey(event.fromLocation));\n\t\t\ttrackedScrollTargets.clear();\n\t\t});\n\t\taddEventListener(\"pagehide\", () => {\n\t\t\tsnapshotCurrentScrollTargets(getKey(router.stores.resolvedLocation.get() ?? router.stores.location.get()));\n\t\t\tpersistScrollRestorationCache();\n\t\t});\n\t}\n\tif (scroll.reset) return;\n\tscroll.reset = true;\n\trouter.subscribe(\"onRendered\", (event) => {\n\t\tconst behavior = router.options.scrollRestorationBehavior;\n\t\tconst scrollToTopSelectors = router.options.scrollToTopSelectors;\n\t\tconst shouldResetScroll = scroll.next;\n\t\tconst hashNavigation = scroll.hash;\n\t\tlet scrollToTopElements;\n\t\ttrackedScrollTargets.clear();\n\t\tscroll.next = true;\n\t\tscroll.hash = false;\n\t\tif (typeof router.options.scrollRestoration === \"function\" && !router.options.scrollRestoration({ location: router.latestLocation })) return;\n\t\tconst cacheKey = getKey(event.toLocation);\n\t\tconst fromCacheKey = event.fromLocation && getKey(event.fromLocation);\n\t\tif (scroll.restoring && fromCacheKey && fromCacheKey !== cacheKey) {\n\t\t\tconst fromElementEntries = scrollRestorationCache[fromCacheKey];\n\t\t\tif (fromElementEntries) {\n\t\t\t\tlet toElementEntries = scrollRestorationCache[cacheKey];\n\t\t\t\tfor (const elementSelector in fromElementEntries) {\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (shouldResetScroll) continue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (!element) continue;\n\t\t\t\t\t\tif (shouldResetScroll && scrollToTopSelectors) {\n\t\t\t\t\t\t\tscrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\t\t\t\tif (scrollToTopElements.has(element)) continue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!toElementEntries) toElementEntries = scrollRestorationCache[cacheKey] = {};\n\t\t\t\t\ttoElementEntries[elementSelector] ??= fromElementEntries[elementSelector];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tignoreScroll = true;\n\t\ttry {\n\t\t\tconst hash = event.toLocation.hash;\n\t\t\tconst hashScrollIntoViewOptions = event.toLocation.state.__hashScrollIntoViewOptions ?? true;\n\t\t\tlet windowRestored = false;\n\t\t\tif (shouldResetScroll) {\n\t\t\t\tif (!hash && scrollToTopSelectors) scrollToTopElements ??= getScrollToTopElements(scrollToTopSelectors);\n\t\t\t\tconst skipWindowRestore = hash && hashScrollIntoViewOptions && hashNavigation;\n\t\t\t\tconst elementEntries = scroll.restoring ? scrollRestorationCache[cacheKey] : void 0;\n\t\t\t\tif (elementEntries) for (const elementSelector in elementEntries) {\n\t\t\t\t\tconst { scrollX, scrollY } = elementEntries[elementSelector];\n\t\t\t\t\tif (elementSelector === windowScrollTarget) {\n\t\t\t\t\t\tif (skipWindowRestore) continue;\n\t\t\t\t\t\tscrollTo({\n\t\t\t\t\t\t\ttop: scrollY,\n\t\t\t\t\t\t\tleft: scrollX,\n\t\t\t\t\t\t\tbehavior\n\t\t\t\t\t\t});\n\t\t\t\t\t\twindowRestored = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst element = getElement(elementSelector);\n\t\t\t\t\t\tif (element) {\n\t\t\t\t\t\t\telement.scrollLeft = scrollX;\n\t\t\t\t\t\t\telement.scrollTop = scrollY;\n\t\t\t\t\t\t\tscrollToTopElements?.delete(element);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!hash) {\n\t\t\t\t\tconst scrollOptions = {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbehavior\n\t\t\t\t\t};\n\t\t\t\t\tif (!windowRestored) scrollTo(scrollOptions);\n\t\t\t\t\tif (scrollToTopElements) for (const element of scrollToTopElements) element.scrollTo(scrollOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!windowRestored && hash && hashScrollIntoViewOptions) document.getElementById(hash)?.scrollIntoView(hashScrollIntoViewOptions);\n\t\t} finally {\n\t\t\tignoreScroll = false;\n\t\t}\n\t});\n}\n//#endregion\nexport { defaultGetScrollRestorationKey, getElementScrollRestorationEntry, setupScrollRestoration, storageKey };\n\n//# sourceMappingURL=scroll-restoration.js.map","//#region src/qss.ts\n/**\n* Program is a reimplementation of the `qss` package:\n* Copyright (c) Luke Edwards luke.edwards05@gmail.com, MIT License\n* https://github.com/lukeed/qss/blob/master/license.md\n*\n* This reimplementation uses modern browser APIs\n* (namely URLSearchParams) and TypeScript while still\n* maintaining the original functionality and interface.\n*\n* Update: this implementation has also been mangled to\n* fit exactly our use-case (single value per key in encoding).\n*/\n/**\n* Encodes an object into a query string.\n* @param obj - The object to encode into a query string.\n* @param stringify - An optional custom stringify function.\n* @returns The encoded query string.\n* @example\n* ```\n* // Example input: encode({ token: 'foo', key: 'value' })\n* // Expected output: \"token=foo&key=value\"\n* ```\n*/\nfunction encode(obj, stringify = String) {\n\tconst result = new URLSearchParams();\n\tfor (const key in obj) {\n\t\tconst val = obj[key];\n\t\tif (val !== void 0) result.set(key, stringify(val));\n\t}\n\treturn result.toString();\n}\n/**\n* Converts a string value to its appropriate type (string, number, boolean).\n* @param mix - The string value to convert.\n* @returns The converted value.\n* @example\n* // Example input: toValue(\"123\")\n* // Expected output: 123\n*/\nfunction toValue(str) {\n\tif (!str) return \"\";\n\tif (str === \"false\") return false;\n\tif (str === \"true\") return true;\n\treturn +str * 0 === 0 && +str + \"\" === str ? +str : str;\n}\n/**\n* Decodes a query string into an object.\n* @param str - The query string to decode.\n* @returns The decoded key-value pairs in an object format.\n* @example\n* // Example input: decode(\"token=foo&key=value\")\n* // Expected output: { \"token\": \"foo\", \"key\": \"value\" }\n*/\nfunction decode(str) {\n\tconst searchParams = new URLSearchParams(str);\n\tconst result = Object.create(null);\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tconst previousValue = result[key];\n\t\tif (previousValue == null) result[key] = toValue(value);\n\t\telse if (Array.isArray(previousValue)) previousValue.push(toValue(value));\n\t\telse result[key] = [previousValue, toValue(value)];\n\t}\n\treturn result;\n}\n//#endregion\nexport { decode, encode };\n\n//# sourceMappingURL=qss.js.map","import { decode, encode } from \"./qss.js\";\n//#region src/searchParams.ts\nconst jsonStart = /^(?:\\s|[\"[{\\d-]|fa|nu|tr)/;\n/** Default `parseSearch` that strips leading '?' and JSON-parses values. */\nconst defaultParseSearch = parseSearchWith(JSON.parse);\n/** Default `stringifySearch` using JSON.stringify for complex values. */\nconst defaultStringifySearch = stringifySearchWith(JSON.stringify, JSON.parse);\n/**\n* Build a `parseSearch` function using a provided JSON-like parser.\n*\n* The returned function strips a leading `?`, decodes values, and attempts to\n* JSON-parse string values using the given `parser`.\n*\n* @param parser Function to parse a string value (e.g. `JSON.parse`).\n* @returns A `parseSearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction parseSearchWith(parser) {\n\treturn (searchStr) => {\n\t\tif (searchStr[0] === \"?\") searchStr = searchStr.substring(1);\n\t\tconst query = decode(searchStr);\n\t\tfor (const key in query) {\n\t\t\tconst value = query[key];\n\t\t\tif (typeof value === \"string\") try {\n\t\t\t\tquery[key] = parser(value);\n\t\t\t} catch (_err) {}\n\t\t}\n\t\treturn query;\n\t};\n}\n/**\n* Build a `stringifySearch` function using a provided serializer.\n*\n* Non-primitive values are serialized with `stringify`. If a `parser` is\n* supplied, string values that are parseable are re-serialized to ensure\n* symmetry with `parseSearch`.\n*\n* @param stringify Function to serialize a value (e.g. `JSON.stringify`).\n* @param parser Optional parser to detect parseable strings.\n* @returns A `stringifySearch` function compatible with `Router` options.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization\n*/\nfunction stringifySearchWith(stringify, parser) {\n\tconst isJsonParser = parser === JSON.parse;\n\tfunction stringifyValue(val) {\n\t\tif (val && typeof val === \"object\") try {\n\t\t\treturn stringify(val);\n\t\t} catch (_err) {}\n\t\telse if (parser && typeof val === \"string\") {\n\t\t\tif (isJsonParser && !jsonStart.test(val)) return val;\n\t\t\ttry {\n\t\t\t\tparser(val);\n\t\t\t\treturn stringify(val);\n\t\t\t} catch (_err) {}\n\t\t}\n\t\treturn val;\n\t}\n\treturn (search) => {\n\t\tconst searchStr = encode(search, stringifyValue);\n\t\treturn searchStr ? `?${searchStr}` : \"\";\n\t};\n}\n//#endregion\nexport { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith };\n\n//# sourceMappingURL=searchParams.js.map","//#region src/root.ts\n/** Stable identifier used for the root route in a route tree. */\nconst rootRouteId = \"__root__\";\n//#endregion\nexport { rootRouteId };\n\n//# sourceMappingURL=root.js.map","//#region src/redirect.ts\n/**\n* Create a redirect Response understood by TanStack Router.\n*\n* Use from route `loader`/`beforeLoad` or server functions to trigger a\n* navigation. If `throw: true` is set, the redirect is thrown instead of\n* returned. When an absolute `href` is supplied and `reloadDocument` is not\n* set, a full-document navigation is inferred.\n*\n* @param opts Options for the redirect. Common fields:\n* - `href`: absolute URL for external redirects; infers `reloadDocument`.\n* - `statusCode`: HTTP status code to use (defaults to 307).\n* - `headers`: additional headers to include on the Response.\n* - Standard navigation options like `to`, `params`, `search`, `replace`,\n* and `reloadDocument` for internal redirects.\n* @returns A Response augmented with router navigation options.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction\n*/\nfunction redirect(opts) {\n\topts.statusCode = opts.statusCode || opts.code || 307;\n\tif (!opts.reloadDocument && typeof opts.href === \"string\") try {\n\t\tnew URL(opts.href);\n\t\topts.reloadDocument = true;\n\t} catch {}\n\tconst headers = new Headers(opts.headers);\n\tif (opts.href && headers.get(\"Location\") === null) headers.set(\"Location\", opts.href);\n\tconst response = new Response(null, {\n\t\tstatus: opts.statusCode,\n\t\theaders\n\t});\n\tresponse.options = opts;\n\tif (opts.throw) throw response;\n\treturn response;\n}\n/** Check whether a value is a TanStack Router redirect Response. */\n/** Check whether a value is a TanStack Router redirect Response. */\nfunction isRedirect(obj) {\n\treturn obj instanceof Response && !!obj.options;\n}\n/** True if value is a redirect with a resolved `href` location. */\n/** True if value is a redirect with a resolved `href` location. */\nfunction isResolvedRedirect(obj) {\n\treturn isRedirect(obj) && !!obj.options.href;\n}\n/** Parse a serialized redirect object back into a redirect Response. */\n/** Parse a serialized redirect object back into a redirect Response. */\nfunction parseRedirect(obj) {\n\tif (obj !== null && typeof obj === \"object\" && obj.isSerializedRedirect) return redirect(obj);\n}\n//#endregion\nexport { isRedirect, isResolvedRedirect, parseRedirect, redirect };\n\n//# sourceMappingURL=redirect.js.map","import { joinPaths, trimPath } from \"./path.js\";\n//#region src/rewrite.ts\n/** Compose multiple rewrite pairs into a single in/out rewrite. */\nfunction composeRewrites(rewrites) {\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tfor (const rewrite of rewrites) url = executeRewriteInput(rewrite, url);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\tfor (let i = rewrites.length - 1; i >= 0; i--) url = executeRewriteOutput(rewrites[i], url);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Create a rewrite pair that strips/adds a basepath on input/output. */\nfunction rewriteBasepath(opts) {\n\tconst trimmedBasepath = trimPath(opts.basepath);\n\tconst normalizedBasepath = `/${trimmedBasepath}`;\n\tconst checkBasepath = opts.caseSensitive ? normalizedBasepath : normalizedBasepath.toLowerCase();\n\tconst checkBasepathWithSlash = `${checkBasepath}/`;\n\treturn {\n\t\tinput: ({ url }) => {\n\t\t\tconst pathname = opts.caseSensitive ? url.pathname : url.pathname.toLowerCase();\n\t\t\tif (pathname === checkBasepath) url.pathname = \"/\";\n\t\t\telse if (pathname.startsWith(checkBasepathWithSlash)) url.pathname = url.pathname.slice(normalizedBasepath.length);\n\t\t\treturn url;\n\t\t},\n\t\toutput: ({ url }) => {\n\t\t\turl.pathname = joinPaths([\n\t\t\t\t\"/\",\n\t\t\t\ttrimmedBasepath,\n\t\t\t\turl.pathname\n\t\t\t]);\n\t\t\treturn url;\n\t\t}\n\t};\n}\n/** Execute a location input rewrite if provided. */\nfunction executeRewriteInput(rewrite, url) {\n\tconst res = rewrite?.input?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n/** Execute a location output rewrite if provided. */\nfunction executeRewriteOutput(rewrite, url) {\n\tconst res = rewrite?.output?.({ url });\n\tif (res) {\n\t\tif (typeof res === \"string\") return new URL(res);\n\t\telse if (res instanceof URL) return res;\n\t}\n\treturn url;\n}\n//#endregion\nexport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath };\n\n//# sourceMappingURL=rewrite.js.map","import { arraysEqual, functionalUpdate } from \"./utils.js\";\n//#region src/stores.ts\n/** SSR non-reactive createMutableStore */\nfunction createNonReactiveMutableStore(initialValue) {\n\tlet value = initialValue;\n\treturn {\n\t\tget() {\n\t\t\treturn value;\n\t\t},\n\t\tset(nextOrUpdater) {\n\t\t\tvalue = functionalUpdate(nextOrUpdater, value);\n\t\t}\n\t};\n}\n/** SSR non-reactive createReadonlyStore */\nfunction createNonReactiveReadonlyStore(read) {\n\treturn { get() {\n\t\treturn read();\n\t} };\n}\nfunction createRouterStores(initialLocation, config) {\n\tconst { createMutableStore, createReadonlyStore, batch } = config;\n\tconst byRoute = /* @__PURE__ */ new Map();\n\tconst status = createMutableStore(\"idle\");\n\tconst location = createMutableStore(initialLocation);\n\tconst resolvedLocation = createMutableStore(void 0);\n\tconst ids = createMutableStore([]);\n\tconst matches = createReadonlyStore(() => ids.get().map((id) => byRoute.get(id).get()));\n\tconst __store = createReadonlyStore(() => ({\n\t\tstatus: status.get(),\n\t\tisLoading: status.get() === \"pending\",\n\t\tmatches: matches.get(),\n\t\tlocation: location.get(),\n\t\tresolvedLocation: resolvedLocation.get()\n\t}));\n\tfunction getMatchStore(routeId) {\n\t\tlet matchStore = byRoute.get(routeId);\n\t\tif (!matchStore) {\n\t\t\tmatchStore = createMutableStore(void 0);\n\t\t\tbyRoute.set(routeId, matchStore);\n\t\t}\n\t\treturn matchStore;\n\t}\n\tconst store = {\n\t\tstatus,\n\t\tlocation,\n\t\tresolvedLocation,\n\t\tids,\n\t\tmatches,\n\t\tbyRoute,\n\t\t__store,\n\t\tgetMatchStore,\n\t\tsetMatches\n\t};\n\tfunction setMatches(nextMatches) {\n\t\tconst previousIds = ids.get();\n\t\tconst nextIds = nextMatches.map((match) => match.routeId);\n\t\tbatch(() => {\n\t\t\tif (!arraysEqual(previousIds, nextIds)) ids.set(nextIds);\n\t\t\tfor (const id of previousIds) if (!nextIds.includes(id)) byRoute.get(id).set(() => void 0);\n\t\t\tfor (const nextMatch of nextMatches) {\n\t\t\t\tconst matchStore = getMatchStore(nextMatch.routeId);\n\t\t\t\tif (matchStore.get() !== nextMatch) matchStore.set(nextMatch);\n\t\t\t}\n\t\t});\n\t}\n\treturn store;\n}\n//#endregion\nexport { createNonReactiveMutableStore, createNonReactiveReadonlyStore, createRouterStores };\n\n//# sourceMappingURL=stores.js.map","//#region src/index.ts\nvar stateIndexKey = \"__TSR_index\";\nvar popStateEvent = \"popstate\";\nvar beforeUnloadEvent = \"beforeunload\";\nfunction createHistory(opts) {\n\tlet location = opts.getLocation();\n\tconst subscribers = /* @__PURE__ */ new Set();\n\tconst notify = (action) => {\n\t\tlocation = opts.getLocation();\n\t\tsubscribers.forEach((subscriber) => subscriber({\n\t\t\tlocation,\n\t\t\taction\n\t\t}));\n\t};\n\tconst handleIndexChange = (action) => {\n\t\tif (opts.notifyOnIndexChange ?? true) notify(action);\n\t\telse location = opts.getLocation();\n\t};\n\tconst tryNavigation = async ({ task, navigateOpts, ...actionInfo }) => {\n\t\tif (navigateOpts?.ignoreBlocker ?? false) {\n\t\t\ttask();\n\t\t\treturn;\n\t\t}\n\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\tconst isPushOrReplace = actionInfo.type === \"PUSH\" || actionInfo.type === \"REPLACE\";\n\t\tif (typeof document !== \"undefined\" && blockers.length && isPushOrReplace) for (const blocker of blockers) {\n\t\t\tconst nextLocation = parseHref(actionInfo.path, actionInfo.state);\n\t\t\tif (await blocker.blockerFn({\n\t\t\t\tcurrentLocation: location,\n\t\t\t\tnextLocation,\n\t\t\t\taction: actionInfo.type\n\t\t\t})) {\n\t\t\t\topts.onBlocked?.();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\ttask();\n\t};\n\treturn {\n\t\tget location() {\n\t\t\treturn location;\n\t\t},\n\t\tget length() {\n\t\t\treturn opts.getLength();\n\t\t},\n\t\tsubscribers,\n\t\tsubscribe: (cb) => {\n\t\t\tsubscribers.add(cb);\n\t\t\treturn () => {\n\t\t\t\tsubscribers.delete(cb);\n\t\t\t};\n\t\t},\n\t\tpush: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex + 1, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.pushState(path, state);\n\t\t\t\t\tnotify({ type: \"PUSH\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"PUSH\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\treplace: (path, state, navigateOpts) => {\n\t\t\tconst currentIndex = location.state[stateIndexKey];\n\t\t\tstate = assignKeyAndIndex(currentIndex, state);\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.replaceState(path, state);\n\t\t\t\t\tnotify({ type: \"REPLACE\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"REPLACE\",\n\t\t\t\tpath,\n\t\t\t\tstate\n\t\t\t});\n\t\t},\n\t\tgo: (index, navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.go(index);\n\t\t\t\t\thandleIndexChange({\n\t\t\t\t\t\ttype: \"GO\",\n\t\t\t\t\t\tindex\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"GO\"\n\t\t\t});\n\t\t},\n\t\tback: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.back(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"BACK\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"BACK\"\n\t\t\t});\n\t\t},\n\t\tforward: (navigateOpts) => {\n\t\t\ttryNavigation({\n\t\t\t\ttask: () => {\n\t\t\t\t\topts.forward(navigateOpts?.ignoreBlocker ?? false);\n\t\t\t\t\thandleIndexChange({ type: \"FORWARD\" });\n\t\t\t\t},\n\t\t\t\tnavigateOpts,\n\t\t\t\ttype: \"FORWARD\"\n\t\t\t});\n\t\t},\n\t\tcanGoBack: () => location.state[stateIndexKey] !== 0,\n\t\tcreateHref: (str) => opts.createHref(str),\n\t\tblock: (blocker) => {\n\t\t\tif (!opts.setBlockers) return () => {};\n\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\topts.setBlockers([...blockers, blocker]);\n\t\t\treturn () => {\n\t\t\t\tconst blockers = opts.getBlockers?.() ?? [];\n\t\t\t\topts.setBlockers?.(blockers.filter((b) => b !== blocker));\n\t\t\t};\n\t\t},\n\t\tflush: () => opts.flush?.(),\n\t\tdestroy: () => opts.destroy?.(),\n\t\tnotify\n\t};\n}\nfunction assignKeyAndIndex(index, state) {\n\tif (!state) state = {};\n\tconst key = createRandomKey();\n\treturn {\n\t\t...state,\n\t\tkey,\n\t\t__TSR_key: key,\n\t\t[stateIndexKey]: index\n\t};\n}\n/**\n* Creates a history object that can be used to interact with the browser's\n* navigation. This is a lightweight API wrapping the browser's native methods.\n* It is designed to work with TanStack Router, but could be used as a standalone API as well.\n* IMPORTANT: This API implements history throttling via a microtask to prevent\n* excessive calls to the history API. In some browsers, calling history.pushState or\n* history.replaceState in quick succession can cause the browser to ignore subsequent\n* calls. This API smooths out those differences and ensures that your application\n* state will *eventually* match the browser state. In most cases, this is not a problem,\n* but if you need to ensure that the browser state is up to date, you can use the\n* `history.flush` method to immediately flush all pending state changes to the browser URL.\n* @param opts\n* @param opts.getHref A function that returns the current href (path + search + hash)\n* @param opts.createHref A function that takes a path and returns a href (path + search + hash)\n* @returns A history instance\n*/\nfunction createBrowserHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\tconst originalPushState = win.history.pushState;\n\tconst originalReplaceState = win.history.replaceState;\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\tconst createHref = opts?.createHref ?? ((path) => path);\n\tconst parseLocation = opts?.parseLocation ?? (() => parseHref(`${win.location.pathname}${win.location.search}${win.location.hash}`, win.history.state));\n\tif (!win.history.state?.__TSR_key && !win.history.state?.key) {\n\t\tconst addedKey = createRandomKey();\n\t\twin.history.replaceState({\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey: addedKey,\n\t\t\t__TSR_key: addedKey\n\t\t}, \"\");\n\t}\n\tlet currentLocation = parseLocation();\n\tlet rollbackLocation;\n\tlet nextPopIsGo = false;\n\tlet ignoreNextPop = false;\n\tlet skipBlockerNextPop = false;\n\tlet ignoreNextBeforeUnload = false;\n\tconst getLocation = () => currentLocation;\n\tlet next;\n\tconst flush = () => {\n\t\tif (!next) return;\n\t\thistory._ignoreSubscribers = true;\n\t\t(next[2] ? win.history.pushState : win.history.replaceState)(next[1], \"\", next[0]);\n\t\thistory._ignoreSubscribers = false;\n\t\tnext = void 0;\n\t\trollbackLocation = void 0;\n\t};\n\tconst queueHistoryAction = (isPush, destHref, state) => {\n\t\tconst href = createHref(destHref);\n\t\tconst hasPendingAction = !!next;\n\t\tif (!hasPendingAction) rollbackLocation = currentLocation;\n\t\tcurrentLocation = parseHref(destHref, state);\n\t\tnext = [\n\t\t\thref,\n\t\t\tstate,\n\t\t\tnext?.[2] || isPush\n\t\t];\n\t\tif (!hasPendingAction) queueMicrotask(() => flush());\n\t};\n\tconst onPushPop = (type) => {\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify({ type });\n\t};\n\tconst onPushPopEvent = async () => {\n\t\tif (ignoreNextPop) {\n\t\t\tignoreNextPop = false;\n\t\t\treturn;\n\t\t}\n\t\tconst nextLocation = parseLocation();\n\t\tconst delta = nextLocation.state[stateIndexKey] - currentLocation.state[stateIndexKey];\n\t\tconst isForward = delta === 1;\n\t\tconst isBack = delta === -1;\n\t\tconst isGo = !isForward && !isBack || nextPopIsGo;\n\t\tnextPopIsGo = false;\n\t\tconst action = isGo ? \"GO\" : isBack ? \"BACK\" : \"FORWARD\";\n\t\tconst notify = isGo ? {\n\t\t\ttype: \"GO\",\n\t\t\tindex: delta\n\t\t} : { type: isBack ? \"BACK\" : \"FORWARD\" };\n\t\tif (skipBlockerNextPop) skipBlockerNextPop = false;\n\t\telse {\n\t\t\tconst blockers = _getBlockers();\n\t\t\tif (typeof document !== \"undefined\" && blockers.length) {\n\t\t\t\tfor (const blocker of blockers) if (await blocker.blockerFn({\n\t\t\t\t\tcurrentLocation,\n\t\t\t\t\tnextLocation,\n\t\t\t\t\taction\n\t\t\t\t})) {\n\t\t\t\t\tignoreNextPop = true;\n\t\t\t\t\twin.history.go(1);\n\t\t\t\t\thistory.notify(notify);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcurrentLocation = parseLocation();\n\t\thistory.notify(notify);\n\t};\n\tconst onBeforeUnload = (e) => {\n\t\tif (ignoreNextBeforeUnload) {\n\t\t\tignoreNextBeforeUnload = false;\n\t\t\treturn;\n\t\t}\n\t\tlet shouldBlock = false;\n\t\tconst blockers = _getBlockers();\n\t\tif (typeof document !== \"undefined\" && blockers.length) for (const blocker of blockers) {\n\t\t\tconst shouldHaveBeforeUnload = blocker.enableBeforeUnload ?? true;\n\t\t\tif (shouldHaveBeforeUnload === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (typeof shouldHaveBeforeUnload === \"function\" && shouldHaveBeforeUnload() === true) {\n\t\t\t\tshouldBlock = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (shouldBlock) {\n\t\t\te.preventDefault();\n\t\t\treturn e.returnValue = \"\";\n\t\t}\n\t};\n\tconst history = createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => win.history.length,\n\t\tpushState: (href, state) => queueHistoryAction(true, href, state),\n\t\treplaceState: (href, state) => queueHistoryAction(false, href, state),\n\t\tback: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) skipBlockerNextPop = true;\n\t\t\tignoreNextBeforeUnload = true;\n\t\t\treturn win.history.back();\n\t\t},\n\t\tforward: (ignoreBlocker) => {\n\t\t\tif (ignoreBlocker) skipBlockerNextPop = true;\n\t\t\tignoreNextBeforeUnload = true;\n\t\t\twin.history.forward();\n\t\t},\n\t\tgo: (n) => {\n\t\t\tnextPopIsGo = true;\n\t\t\twin.history.go(n);\n\t\t},\n\t\tcreateHref: (href) => createHref(href),\n\t\tflush,\n\t\tdestroy: () => {\n\t\t\twin.history.pushState = originalPushState;\n\t\t\twin.history.replaceState = originalReplaceState;\n\t\t\twin.removeEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\t\t\twin.removeEventListener(popStateEvent, onPushPopEvent);\n\t\t},\n\t\tonBlocked: () => {\n\t\t\tif (rollbackLocation && currentLocation !== rollbackLocation) currentLocation = rollbackLocation;\n\t\t},\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers,\n\t\tnotifyOnIndexChange: false\n\t});\n\twin.addEventListener(beforeUnloadEvent, onBeforeUnload, { capture: true });\n\twin.addEventListener(popStateEvent, onPushPopEvent);\n\twin.history.pushState = function(...args) {\n\t\tconst res = originalPushState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"PUSH\");\n\t\treturn res;\n\t};\n\twin.history.replaceState = function(...args) {\n\t\tconst res = originalReplaceState.apply(win.history, args);\n\t\tif (!history._ignoreSubscribers) onPushPop(\"REPLACE\");\n\t\treturn res;\n\t};\n\treturn history;\n}\n/**\n* Create a hash-based history implementation.\n* Useful for static hosts or environments without server URL rewriting.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createHashHistory(opts) {\n\tconst win = opts?.window ?? (typeof document !== \"undefined\" ? window : void 0);\n\treturn createBrowserHistory({\n\t\twindow: win,\n\t\tparseLocation: () => {\n\t\t\tconst hashSplit = win.location.hash.split(\"#\").slice(1);\n\t\t\tconst pathPart = hashSplit[0] ?? \"/\";\n\t\t\tconst searchPart = win.location.search;\n\t\t\tconst hashEntries = hashSplit.slice(1);\n\t\t\treturn parseHref(`${pathPart}${searchPart}${hashEntries.length === 0 ? \"\" : `#${hashEntries.join(\"#\")}`}`, win.history.state);\n\t\t},\n\t\tcreateHref: (href) => `${win.location.pathname}${win.location.search}#${href}`\n\t});\n}\n/**\n* Create an in-memory history implementation.\n* Ideal for server rendering, tests, and non-DOM environments.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/history-types\n*/\nfunction createMemoryHistory(opts = { initialEntries: [\"/\"] }) {\n\tconst entries = opts.initialEntries;\n\tlet index = opts.initialIndex ? Math.min(Math.max(opts.initialIndex, 0), entries.length - 1) : entries.length - 1;\n\tconst states = entries.map((_entry, index) => assignKeyAndIndex(index, void 0));\n\tconst getLocation = () => parseHref(entries[index], states[index]);\n\tlet blockers = [];\n\tconst _getBlockers = () => blockers;\n\tconst _setBlockers = (newBlockers) => blockers = newBlockers;\n\treturn createHistory({\n\t\tgetLocation,\n\t\tgetLength: () => entries.length,\n\t\tpushState: (path, state) => {\n\t\t\tif (index < entries.length - 1) {\n\t\t\t\tentries.splice(index + 1);\n\t\t\t\tstates.splice(index + 1);\n\t\t\t}\n\t\t\tstates.push(state);\n\t\t\tentries.push(path);\n\t\t\tindex = Math.max(entries.length - 1, 0);\n\t\t},\n\t\treplaceState: (path, state) => {\n\t\t\tstates[index] = state;\n\t\t\tentries[index] = path;\n\t\t},\n\t\tback: () => {\n\t\t\tindex = Math.max(index - 1, 0);\n\t\t},\n\t\tforward: () => {\n\t\t\tindex = Math.min(index + 1, entries.length - 1);\n\t\t},\n\t\tgo: (n) => {\n\t\t\tindex = Math.min(Math.max(index + n, 0), entries.length - 1);\n\t\t},\n\t\tcreateHref: (path) => path,\n\t\tgetBlockers: _getBlockers,\n\t\tsetBlockers: _setBlockers\n\t});\n}\n/**\n* Sanitize a path to prevent open redirect vulnerabilities.\n* Removes control characters and collapses leading double slashes.\n*/\nfunction sanitizePath(path) {\n\tlet sanitized = path.replace(/[\\x00-\\x1f\\x7f]/g, \"\");\n\tif (sanitized.startsWith(\"//\")) sanitized = \"/\" + sanitized.replace(/^\\/+/, \"\");\n\treturn sanitized;\n}\nfunction parseHref(href, state) {\n\tconst sanitizedHref = sanitizePath(href);\n\tconst hashIndex = sanitizedHref.indexOf(\"#\");\n\tconst searchIndex = sanitizedHref.indexOf(\"?\");\n\tconst addedKey = createRandomKey();\n\treturn {\n\t\thref: sanitizedHref,\n\t\tpathname: sanitizedHref.substring(0, hashIndex > 0 ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex : searchIndex > 0 ? searchIndex : sanitizedHref.length),\n\t\thash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : \"\",\n\t\tsearch: searchIndex > -1 ? sanitizedHref.slice(searchIndex, hashIndex === -1 ? void 0 : hashIndex) : \"\",\n\t\tstate: state || {\n\t\t\t[stateIndexKey]: 0,\n\t\t\tkey: addedKey,\n\t\t\t__TSR_key: addedKey\n\t\t}\n\t};\n}\nfunction createRandomKey() {\n\treturn (Math.random() + 1).toString(36).substring(7);\n}\n//#endregion\nexport { createBrowserHistory, createHashHistory, createHistory, createMemoryHistory, parseHref };\n\n//# sourceMappingURL=index.js.map","import { DEFAULT_PROTOCOL_ALLOWLIST, decodePath, deepEqual, encodePathLikeUrl, findLast, functionalUpdate, hasKeys, isDangerousProtocol, last, nullReplaceEqualDeep, replaceEqualDeep } from \"./utils.js\";\nimport { createLRUCache } from \"./lru-cache.js\";\nimport { buildRouteBranch, findFlatMatch, findRouteMatch, findSingleMatch, processRouteMasks, processRouteTree } from \"./new-process-route-tree.js\";\nimport { compileDecodeCharMap, interpolatePath, resolvePath, trimPath, trimPathRight } from \"./path.js\";\nimport { isNotFound } from \"./not-found.js\";\nimport { setupScrollRestoration } from \"./scroll-restoration.js\";\nimport { defaultParseSearch, defaultStringifySearch } from \"./searchParams.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk } from \"./load-client.js\";\nimport { composeRewrites, executeRewriteInput, executeRewriteOutput, rewriteBasepath } from \"./rewrite.js\";\nimport { createRouterStores } from \"./stores.js\";\nimport { createBrowserHistory, parseHref } from \"@tanstack/history\";\nimport { isServer, loadServerRoute } from \"@tanstack/router-core/isServer\";\n//#region src/router.ts\nfunction routeNeedsLoad(route) {\n\treturn route.options.loader || route.options.beforeLoad || route.lazyFn || route.options.component?.preload || route.options.pendingComponent?.preload;\n}\n/**\n* Convert an unknown error into a minimal, serializable object.\n* Includes name and message (and stack in development).\n*/\nfunction defaultSerializeError(err) {\n\tif (err instanceof Error) {\n\t\tconst obj = {\n\t\t\tname: err.name,\n\t\t\tmessage: err.message\n\t\t};\n\t\tif (process.env.NODE_ENV === \"development\") obj.stack = err.stack;\n\t\treturn obj;\n\t}\n\treturn { data: err };\n}\n/** Options for configuring trailing-slash behavior. */\nconst trailingSlashOptions = {\n\talways: \"always\",\n\tnever: \"never\",\n\tpreserve: \"preserve\"\n};\n/**\n* Compute whether path, href or hash changed between previous and current\n* resolved locations.\n*/\nfunction getLocationChangeInfo(location, resolvedLocation) {\n\treturn {\n\t\tfromLocation: resolvedLocation,\n\t\ttoLocation: location,\n\t\tpathChanged: resolvedLocation?.pathname !== location.pathname,\n\t\threfChanged: resolvedLocation?.href !== location.href,\n\t\thashChanged: resolvedLocation?.hash !== location.hash\n\t};\n}\n/**\n* Return only state owned by the application, excluding volatile history\n* bookkeeping. Mask payloads (`__tempLocation`/`__tempKey`) are kept: they\n* distinguish otherwise-identical locations.\n*/\nfunction _getUserHistoryState({ key: _key, __TSR_key: _tsrKey, __TSR_index: _tsrIndex, __hashScrollIntoViewOptions: _hashScroll, ...state }) {\n\treturn state;\n}\n/** Run route lifecycle callbacks in leave/enter/stay phases. */\nfunction runRouteLifecycle(router, previous, matches, owner) {\n\tfor (const match of previous) {\n\t\tif (owner && router._tx !== owner) return;\n\t\tif (!matches.some((candidate) => candidate.routeId === match.routeId)) router.routesById[match.routeId].options.onLeave?.(match);\n\t}\n\tfor (const match of matches) {\n\t\tif (owner && router._tx !== owner) return;\n\t\trouter.routesById[match.routeId].options[previous.some((candidate) => candidate.routeId === match.routeId) ? \"onStay\" : \"onEnter\"]?.(match);\n\t}\n}\n/**\n* Core, framework-agnostic router engine that powers TanStack Router.\n*\n* Provides navigation, matching, loading, preloading, caching and event APIs\n* used by framework adapters (React/Solid). Prefer framework helpers like\n* `createRouter` in app code.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/RouterType\n*/\nvar RouterCore = class {\n\t/**\n\t* @deprecated Use the `createRouter` function instead\n\t*/\n\tconstructor(options, getStoreConfig) {\n\t\tthis.tempLocationKey = `${Math.round(Math.random() * 1e7)}`;\n\t\tthis._scroll = { next: true };\n\t\tthis.subscribers = /* @__PURE__ */ new Set();\n\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\tthis._committed = [];\n\t\tthis.routeBranchCache = /* @__PURE__ */ new WeakMap();\n\t\tthis.lightweightCache = /* @__PURE__ */ new WeakMap();\n\t\tthis.startTransition = async (fn) => {\n\t\t\tfn();\n\t\t\treturn false;\n\t\t};\n\t\tthis.update = (newOptions) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (newOptions.notFoundRoute) console.warn(\"The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.\");\n\t\t\t}\n\t\t\tconst prevOptions = this.options;\n\t\t\tconst prevBasepath = this.basepath ?? prevOptions?.basepath ?? \"/\";\n\t\t\tconst basepathWasUnset = this.basepath === void 0;\n\t\t\tconst prevRewriteOption = prevOptions?.rewrite;\n\t\t\tthis.options = {\n\t\t\t\t...prevOptions,\n\t\t\t\t...newOptions\n\t\t\t};\n\t\t\tthis.isServer = this.options.isServer ?? isServer ?? typeof document === \"undefined\";\n\t\t\tthis.protocolAllowlist = new Set(this.options.protocolAllowlist);\n\t\t\tif (this.options.pathParamsAllowedCharacters) this.pathParamsDecoder = compileDecodeCharMap(this.options.pathParamsAllowedCharacters);\n\t\t\tif (!this.history || this.options.history && this.options.history !== this.history) if (!this.options.history) {\n\t\t\t\tif (!(isServer ?? this.isServer)) this.history = createBrowserHistory();\n\t\t\t} else this.history = this.options.history;\n\t\t\tthis.origin = this.options.origin;\n\t\t\tif (!this.origin) if (!(isServer ?? this.isServer) && window?.origin && window.origin !== \"null\") this.origin = window.origin;\n\t\t\telse this.origin = \"http://localhost\";\n\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\tif (this.options.routeTree !== this.routeTree) {\n\t\t\t\tthis.routeTree = this.options.routeTree;\n\t\t\t\tlet processRouteTreeResult;\n\t\t\t\tif ((isServer ?? this.isServer) && process.env.NODE_ENV !== \"development\" && globalThis.__TSR_CACHE__ && globalThis.__TSR_CACHE__.routeTree === this.routeTree) {\n\t\t\t\t\tconst cached = globalThis.__TSR_CACHE__;\n\t\t\t\t\tthis.resolvePathCache = cached.resolvePathCache;\n\t\t\t\t\tprocessRouteTreeResult = cached.processRouteTreeResult;\n\t\t\t\t} else {\n\t\t\t\t\tthis.resolvePathCache = createLRUCache(1e3);\n\t\t\t\t\tprocessRouteTreeResult = this.buildRouteTree();\n\t\t\t\t\tif ((isServer ?? this.isServer) && process.env.NODE_ENV !== \"development\" && globalThis.__TSR_CACHE__ === void 0) globalThis.__TSR_CACHE__ = {\n\t\t\t\t\t\trouteTree: this.routeTree,\n\t\t\t\t\t\tprocessRouteTreeResult,\n\t\t\t\t\t\tresolvePathCache: this.resolvePathCache\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tthis.setRoutes(processRouteTreeResult);\n\t\t\t}\n\t\t\tif (!this.stores && this.latestLocation) {\n\t\t\t\tconst config = this.getStoreConfig(this);\n\t\t\t\tthis.batch = config.batch;\n\t\t\t\tthis.stores = createRouterStores(this.latestLocation, config);\n\t\t\t\tif (!(isServer ?? this.isServer)) setupScrollRestoration(this);\n\t\t\t}\n\t\t\tconst nextBasepath = this.options.basepath ?? \"/\";\n\t\t\tconst nextRewriteOption = this.options.rewrite;\n\t\t\tif (basepathWasUnset || prevBasepath !== nextBasepath || prevRewriteOption !== nextRewriteOption) {\n\t\t\t\tthis.basepath = nextBasepath;\n\t\t\t\tconst rewrites = [];\n\t\t\t\tconst trimmed = trimPath(nextBasepath);\n\t\t\t\tif (trimmed && trimmed !== \"/\") rewrites.push(rewriteBasepath({ basepath: nextBasepath }));\n\t\t\t\tif (nextRewriteOption) rewrites.push(nextRewriteOption);\n\t\t\t\tthis.rewrite = rewrites.length === 0 ? void 0 : rewrites.length === 1 ? rewrites[0] : composeRewrites(rewrites);\n\t\t\t\tif (this.history) this.updateLatestLocation();\n\t\t\t\tif (this.stores) this.stores.location.set(this.latestLocation);\n\t\t\t}\n\t\t};\n\t\tthis.updateLatestLocation = () => {\n\t\t\tthis.latestLocation = this.parseLocation(this.history.location, this.latestLocation);\n\t\t};\n\t\tthis.buildRouteTree = () => {\n\t\t\tconst result = processRouteTree(this.routeTree, this.options.caseSensitive, (route, i) => {\n\t\t\t\troute.init({ originalIndex: i });\n\t\t\t});\n\t\t\tif (this.options.routeMasks) processRouteMasks(this.options.routeMasks, result.processedTree);\n\t\t\treturn result;\n\t\t};\n\t\tthis.subscribe = (eventType, fn) => {\n\t\t\tconst listener = {\n\t\t\t\teventType,\n\t\t\t\tfn\n\t\t\t};\n\t\t\tthis.subscribers.add(listener);\n\t\t\treturn () => {\n\t\t\t\tthis.subscribers.delete(listener);\n\t\t\t};\n\t\t};\n\t\tthis.emit = (routerEvent) => {\n\t\t\tfor (const listener of this.subscribers) if (listener.eventType === routerEvent.type) try {\n\t\t\t\tlistener.fn(routerEvent);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e);\n\t\t\t}\n\t\t};\n\t\tthis.parseLocation = (locationToParse, previousLocation) => {\n\t\t\tconst parse = ({ pathname, search, hash, href, state }) => {\n\t\t\t\tif (!this.rewrite && !/[ \\x00-\\x1f\\x7f\\u0080-\\uffff]/.test(pathname)) {\n\t\t\t\t\tconst parsedSearch = this.options.parseSearch(search);\n\t\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\t\treturn {\n\t\t\t\t\t\thref: pathname + searchStr + hash,\n\t\t\t\t\t\tpublicHref: pathname + searchStr + hash,\n\t\t\t\t\t\tpathname: decodePath(pathname).path,\n\t\t\t\t\t\texternal: false,\n\t\t\t\t\t\tsearchStr,\n\t\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\t\thash: decodePath(hash.slice(1)).path,\n\t\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst fullUrl = new URL(href, this.origin);\n\t\t\t\tconst url = executeRewriteInput(this.rewrite, fullUrl);\n\t\t\t\tconst parsedSearch = this.options.parseSearch(url.search);\n\t\t\t\tconst searchStr = this.options.stringifySearch(parsedSearch);\n\t\t\t\turl.search = searchStr;\n\t\t\t\treturn {\n\t\t\t\t\thref: url.href.replace(url.origin, \"\"),\n\t\t\t\t\tpublicHref: href,\n\t\t\t\t\tpathname: decodePath(url.pathname).path,\n\t\t\t\t\texternal: !!this.rewrite && url.origin !== this.origin,\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tsearch: nullReplaceEqualDeep(previousLocation?.search, parsedSearch),\n\t\t\t\t\thash: decodePath(url.hash.slice(1)).path,\n\t\t\t\t\tstate: replaceEqualDeep(previousLocation?.state, state)\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst location = parse(locationToParse);\n\t\t\tconst { __tempLocation, __tempKey } = location.state;\n\t\t\tif (__tempLocation && (!__tempKey || __tempKey === this.tempLocationKey)) {\n\t\t\t\tconst parsedTempLocation = parse(__tempLocation);\n\t\t\t\tparsedTempLocation.state.key = location.state.key;\n\t\t\t\tparsedTempLocation.state.__TSR_key = location.state.__TSR_key;\n\t\t\t\tdelete parsedTempLocation.state.__tempLocation;\n\t\t\t\treturn {\n\t\t\t\t\t...parsedTempLocation,\n\t\t\t\t\tmaskedLocation: location\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn location;\n\t\t};\n\t\tthis.resolvePathWithBase = (from, path) => {\n\t\t\treturn resolvePath({\n\t\t\t\tbase: from,\n\t\t\t\tto: path,\n\t\t\t\ttrailingSlash: this.options.trailingSlash,\n\t\t\t\tcache: this.resolvePathCache\n\t\t\t});\n\t\t};\n\t\tthis.matchRoutes = (pathnameOrNext, locationSearchOrOpts, opts) => {\n\t\t\tif (typeof pathnameOrNext === \"string\") return this.matchRoutesInternal({\n\t\t\t\tpathname: pathnameOrNext,\n\t\t\t\tsearch: locationSearchOrOpts\n\t\t\t}, opts);\n\t\t\treturn this.matchRoutesInternal(pathnameOrNext, locationSearchOrOpts);\n\t\t};\n\t\tthis.getMatchedRoutes = (pathname) => {\n\t\t\tconst rawParams = Object.create(null);\n\t\t\tconst match = findRouteMatch(trimPathRight(pathname), this.processedTree, true);\n\t\t\tif (match) Object.assign(rawParams, match.rawParams);\n\t\t\treturn [\n\t\t\t\tmatch?.branch || [this.routesById[\"__root__\"]],\n\t\t\t\trawParams,\n\t\t\t\tmatch?.route\n\t\t\t];\n\t\t};\n\t\tthis.buildLocation = (opts) => {\n\t\t\tconst build = (dest = {}) => {\n\t\t\t\tif (dest.href) {\n\t\t\t\t\tconst parsed = parseHref(dest.href, {});\n\t\t\t\t\tdest = {\n\t\t\t\t\t\t...dest,\n\t\t\t\t\t\tto: executeRewriteInput(this.rewrite, new URL(parsed.pathname, this.origin)).pathname,\n\t\t\t\t\t\tsearch: this.options.parseSearch(parsed.search),\n\t\t\t\t\t\thash: parsed.hash.slice(1)\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst currentLocation = dest._fromLocation || this._pendingLocation || this.latestLocation;\n\t\t\t\tconst lightweightResult = this.matchRoutesLightweight(currentLocation);\n\t\t\t\tif (dest.from && process.env.NODE_ENV !== \"production\" && dest._isNavigate) {\n\t\t\t\t\tconst [allFromMatches] = this.getMatchedRoutes(dest.from);\n\t\t\t\t\tconst matchedFrom = findLast(lightweightResult[0], (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, dest.from);\n\t\t\t\t\t});\n\t\t\t\t\tconst matchedCurrent = findLast(allFromMatches, (d) => {\n\t\t\t\t\t\treturn comparePaths(d.fullPath, lightweightResult[1]);\n\t\t\t\t\t});\n\t\t\t\t\tif (!matchedFrom && !matchedCurrent) console.warn(`Could not find match for from: ${dest.from}`);\n\t\t\t\t}\n\t\t\t\tconst defaultedFromPath = dest.unsafeRelative === \"path\" ? currentLocation.pathname : dest.from ?? lightweightResult[1];\n\t\t\t\tconst fromSearch = lightweightResult[2];\n\t\t\t\tconst fromParams = lightweightResult[3];\n\t\t\t\tconst nextTo = this.resolvePathWithBase(defaultedFromPath, dest.to ? `${dest.to}` : \".\");\n\t\t\t\tlet nextParams = resolveNextParams(dest.params, fromParams);\n\t\t\t\tconst destRoute = this.routesByPath[trimPathRight(nextTo)];\n\t\t\t\tlet destRoutes;\n\t\t\t\tif (destRoute) destRoutes = this.getRouteBranch(destRoute);\n\t\t\t\telse if (nextTo.includes(\"$\")) destRoutes = [];\n\t\t\t\telse {\n\t\t\t\t\tconst [matchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(nextTo);\n\t\t\t\t\tdestRoutes = matchedRoutes;\n\t\t\t\t\tif (this.options.notFoundRoute && (!foundRoute || foundRoute.path !== \"/\" && rawParams[\"**\"])) destRoutes = [...destRoutes, this.options.notFoundRoute];\n\t\t\t\t}\n\t\t\t\tif (destRoutes.length && hasKeys(nextParams)) for (const route of destRoutes) {\n\t\t\t\t\tconst fn = route.options.params?.stringify ?? route.options.stringifyParams;\n\t\t\t\t\tif (fn) {\n\t\t\t\t\t\tif (nextParams === fromParams) nextParams = Object.assign(Object.create(null), nextParams);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject.assign(nextParams, fn(nextParams));\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextPathname = opts.leaveParams ? nextTo : decodePath(interpolatePath({\n\t\t\t\t\tpath: nextTo,\n\t\t\t\t\tparams: nextParams,\n\t\t\t\t\tdecoder: this.pathParamsDecoder,\n\t\t\t\t\tserver: this.isServer\n\t\t\t\t}).interpolatedPath).path;\n\t\t\t\tif (process.env.NODE_ENV !== \"production\" && destRoute && !opts.leaveParams) try {\n\t\t\t\t\tconst foundRoute = this.getMatchedRoutes(nextPathname)[2];\n\t\t\t\t\tif (foundRoute?.id !== destRoute.id) console.warn(`Generated path \"${nextPathname}\" for route \"${destRoute.id}\" matched route \"${foundRoute?.id}\" instead. This can happen when multiple route templates resolve to the same URL. Use the route template that matches the intended route, or adjust params.stringify if it changed the target path.`);\n\t\t\t\t} catch {}\n\t\t\t\tlet nextSearch = fromSearch;\n\t\t\t\tif (opts._includeValidateSearch && this.options.search?.strict) {\n\t\t\t\t\tconst validatedSearch = {};\n\t\t\t\t\tdestRoutes.forEach((route) => {\n\t\t\t\t\t\tif (route.options.validateSearch) try {\n\t\t\t\t\t\t\tObject.assign(validatedSearch, validateSearch(route.options.validateSearch, {\n\t\t\t\t\t\t\t\t...validatedSearch,\n\t\t\t\t\t\t\t\t...nextSearch\n\t\t\t\t\t\t\t}));\n\t\t\t\t\t\t} catch {}\n\t\t\t\t\t});\n\t\t\t\t\tnextSearch = validatedSearch;\n\t\t\t\t}\n\t\t\t\tnextSearch = applySearchMiddleware(nextSearch, dest, destRoutes, opts._includeValidateSearch);\n\t\t\t\tnextSearch = nullReplaceEqualDeep(fromSearch, nextSearch);\n\t\t\t\tconst searchStr = this.options.stringifySearch(nextSearch);\n\t\t\t\tconst hash = dest.hash === true ? currentLocation.hash : dest.hash ? functionalUpdate(dest.hash, currentLocation.hash) : void 0;\n\t\t\t\tconst hashStr = hash ? `#${hash}` : \"\";\n\t\t\t\tlet nextState = dest.state === true ? currentLocation.state : dest.state ? functionalUpdate(dest.state, currentLocation.state) : {};\n\t\t\t\tif (dest.state) nextState = replaceEqualDeep(currentLocation.state, nextState);\n\t\t\t\tconst fullPath = `${nextPathname}${searchStr}${hashStr}`;\n\t\t\t\tlet href;\n\t\t\t\tlet publicHref;\n\t\t\t\tlet external = false;\n\t\t\t\tif (this.rewrite) {\n\t\t\t\t\tconst url = new URL(fullPath, this.origin);\n\t\t\t\t\tconst rewrittenUrl = executeRewriteOutput(this.rewrite, url);\n\t\t\t\t\thref = url.href.replace(url.origin, \"\");\n\t\t\t\t\tif (rewrittenUrl.origin !== this.origin) {\n\t\t\t\t\t\tpublicHref = rewrittenUrl.href;\n\t\t\t\t\t\texternal = true;\n\t\t\t\t\t} else publicHref = rewrittenUrl.pathname + rewrittenUrl.search + rewrittenUrl.hash;\n\t\t\t\t} else {\n\t\t\t\t\thref = encodePathLikeUrl(fullPath);\n\t\t\t\t\tpublicHref = href;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpublicHref,\n\t\t\t\t\thref,\n\t\t\t\t\tpathname: nextPathname,\n\t\t\t\t\tsearch: nextSearch,\n\t\t\t\t\tsearchStr,\n\t\t\t\t\tstate: nextState,\n\t\t\t\t\thash: hash ?? \"\",\n\t\t\t\t\texternal,\n\t\t\t\t\tunmaskOnReload: dest.unmaskOnReload\n\t\t\t\t};\n\t\t\t};\n\t\t\tconst next = build(opts);\n\t\t\tif (opts.mask) next.maskedLocation = build({\n\t\t\t\tfrom: opts.from,\n\t\t\t\t...opts.mask\n\t\t\t});\n\t\t\telse if (this.options.routeMasks) {\n\t\t\t\tconst match = findFlatMatch(next.pathname, this.processedTree);\n\t\t\t\tif (match) {\n\t\t\t\t\tconst params = Object.assign(Object.create(null), match.rawParams);\n\t\t\t\t\tconst { from: _from, params: maskParams, ...maskProps } = match.route;\n\t\t\t\t\tconst nextParams = resolveNextParams(maskParams, params);\n\t\t\t\t\tnext.maskedLocation = build({\n\t\t\t\t\t\tfrom: opts.from,\n\t\t\t\t\t\t...maskProps,\n\t\t\t\t\t\tparams: nextParams\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn next;\n\t\t};\n\t\tthis.commitLocation = async ({ viewTransition, ignoreBlocker, ...next }) => {\n\t\t\tlet historyAction;\n\t\t\tconst isSameLocation = trimPathRight(this.latestLocation.href) === trimPathRight(next.href) && deepEqual(_getUserHistoryState(next.state), _getUserHistoryState(this.latestLocation.state));\n\t\t\tconst previousCommitPromise = this._commitPromise;\n\t\t\tlet resolve;\n\t\t\tconst commitPromise = new Promise((done) => {\n\t\t\t\tresolve = done;\n\t\t\t});\n\t\t\tcommitPromise.resolve = () => {\n\t\t\t\tresolve();\n\t\t\t\tpreviousCommitPromise?.resolve();\n\t\t\t};\n\t\t\tthis._commitPromise = commitPromise;\n\t\t\tif (isSameLocation) this.load();\n\t\t\telse {\n\t\t\t\tlet { maskedLocation, hashScrollIntoView, ...nextHistory } = next;\n\t\t\t\tif (maskedLocation) {\n\t\t\t\t\tnextHistory = {\n\t\t\t\t\t\t...maskedLocation,\n\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t...maskedLocation.state,\n\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t__tempLocation: {\n\t\t\t\t\t\t\t\t...nextHistory,\n\t\t\t\t\t\t\t\tsearch: nextHistory.searchStr,\n\t\t\t\t\t\t\t\tstate: {\n\t\t\t\t\t\t\t\t\t...nextHistory.state,\n\t\t\t\t\t\t\t\t\t__tempKey: void 0,\n\t\t\t\t\t\t\t\t\t__tempLocation: void 0,\n\t\t\t\t\t\t\t\t\t__TSR_key: void 0,\n\t\t\t\t\t\t\t\t\tkey: void 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tif (nextHistory.unmaskOnReload ?? this.options.unmaskOnReload ?? false) nextHistory.state.__tempKey = this.tempLocationKey;\n\t\t\t\t}\n\t\t\t\tnextHistory.state.__hashScrollIntoViewOptions = hashScrollIntoView ?? this.options.defaultHashScrollIntoView ?? true;\n\t\t\t\tthis.shouldViewTransition = viewTransition;\n\t\t\t\thistoryAction = next.replace ? \"REPLACE\" : \"PUSH\";\n\t\t\t\tthis.history[historyAction === \"REPLACE\" ? \"replace\" : \"push\"](nextHistory.publicHref, nextHistory.state, { ignoreBlocker });\n\t\t\t\tif (!this.history.subscribers.size) this.load({ action: { type: historyAction } });\n\t\t\t}\n\t\t\tthis._scroll.next = next.resetScroll ?? true;\n\t\t\treturn this._commitPromise;\n\t\t};\n\t\tthis.buildAndCommitLocation = ({ replace, resetScroll, hashScrollIntoView, viewTransition, ignoreBlocker, ...rest } = {}) => {\n\t\t\tconst location = this.buildLocation({\n\t\t\t\t...rest,\n\t\t\t\t_includeValidateSearch: true\n\t\t\t});\n\t\t\tthis._pendingLocation = location;\n\t\t\tconst commitPromise = this.commitLocation({\n\t\t\t\t...location,\n\t\t\t\tviewTransition,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tif (this._pendingLocation === location) this._pendingLocation = void 0;\n\t\t\t});\n\t\t\treturn commitPromise;\n\t\t};\n\t\tthis.navigate = async ({ to, reloadDocument, href, publicHref, ...rest }) => {\n\t\t\tlet hrefIsUrl = false;\n\t\t\tif (href) try {\n\t\t\t\tnew URL(`${href}`);\n\t\t\t\threfIsUrl = true;\n\t\t\t} catch {}\n\t\t\tif (hrefIsUrl && !reloadDocument) reloadDocument = true;\n\t\t\tif (reloadDocument) {\n\t\t\t\tif (to !== void 0 || !href) {\n\t\t\t\t\tconst location = this.buildLocation({\n\t\t\t\t\t\tto,\n\t\t\t\t\t\t...rest\n\t\t\t\t\t});\n\t\t\t\t\thref = href ?? location.publicHref;\n\t\t\t\t\tpublicHref = publicHref ?? location.publicHref;\n\t\t\t\t}\n\t\t\t\tconst reloadHref = !hrefIsUrl && publicHref ? publicHref : href;\n\t\t\t\tif (isDangerousProtocol(reloadHref, this.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked navigation to dangerous protocol: ${reloadHref}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!rest.ignoreBlocker) {\n\t\t\t\t\tconst blockers = this.history.getBlockers?.() ?? [];\n\t\t\t\t\tfor (const blocker of blockers) if (blocker?.blockerFn) {\n\t\t\t\t\t\tif (await blocker.blockerFn({\n\t\t\t\t\t\t\tcurrentLocation: this.latestLocation,\n\t\t\t\t\t\t\tnextLocation: this.latestLocation,\n\t\t\t\t\t\t\taction: \"PUSH\"\n\t\t\t\t\t\t})) return;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (rest.replace) window.location.replace(reloadHref);\n\t\t\t\telse window.location.href = reloadHref;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn this.buildAndCommitLocation({\n\t\t\t\t...rest,\n\t\t\t\thref,\n\t\t\t\tto,\n\t\t\t\t_isNavigate: true\n\t\t\t});\n\t\t};\n\t\tthis.load = async (opts) => {\n\t\t\tif (isServer ?? this.isServer) return loadServerRoute(this, opts);\n\t\t\tthis.updateLatestLocation();\n\t\t\tif (opts?.action) this._scroll.hash = opts.action.type === \"PUSH\" || opts.action.type === \"REPLACE\";\n\t\t\tawait loadClientRoute(this, opts);\n\t\t};\n\t\tthis.startViewTransition = (fn) => {\n\t\t\tconst shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;\n\t\t\tthis.shouldViewTransition = void 0;\n\t\t\tif (shouldViewTransition && !(isServer ?? typeof document === \"undefined\") && typeof document.startViewTransition === \"function\") {\n\t\t\t\tlet startViewTransitionParams;\n\t\t\t\tif (typeof shouldViewTransition === \"object\" && window.CSS?.supports?.(\"selector(:active-view-transition-type(a))\")) {\n\t\t\t\t\tconst next = this.latestLocation;\n\t\t\t\t\tconst prevLocation = this.stores.resolvedLocation.get();\n\t\t\t\t\tconst resolvedViewTransitionTypes = typeof shouldViewTransition.types === \"function\" ? shouldViewTransition.types(getLocationChangeInfo(next, prevLocation)) : shouldViewTransition.types;\n\t\t\t\t\tif (resolvedViewTransitionTypes === false) return fn();\n\t\t\t\t\tstartViewTransitionParams = {\n\t\t\t\t\t\tupdate: fn,\n\t\t\t\t\t\ttypes: resolvedViewTransitionTypes\n\t\t\t\t\t};\n\t\t\t\t} else startViewTransitionParams = fn;\n\t\t\t\treturn document.startViewTransition(startViewTransitionParams).updateCallbackDone;\n\t\t\t}\n\t\t\treturn fn();\n\t\t};\n\t\tthis.invalidate = (opts) => {\n\t\t\tconst committedMatches = this._committed;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst invalidIds = new Set([\n\t\t\t\t...committedMatches,\n\t\t\t\t...this._cache.values(),\n\t\t\t\t...[...preloads?.values() ?? []].flat(),\n\t\t\t\t...this._tx?.[3] ?? []\n\t\t\t].filter((match) => !filter || filter(match)).map((match) => match.id));\n\t\t\tconst discardedPreloads = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (matches.some((match) => invalidIds.has(match.id))) {\n\t\t\t\tpreloads.delete(controller);\n\t\t\t\tdiscardedPreloads.push(controller);\n\t\t\t}\n\t\t\tconst invalidate = (d) => {\n\t\t\t\tif (invalidIds.has(d.id)) {\n\t\t\t\t\tconst route = this.routesById[d.routeId];\n\t\t\t\t\tconst next = {\n\t\t\t\t\t\t...d,\n\t\t\t\t\t\tinvalid: true,\n\t\t\t\t\t\t...(opts?.forcePending || d.status === \"error\" || d.status === \"notFound\") && routeNeedsLoad(route) ? {\n\t\t\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\t\t\terror: void 0\n\t\t\t\t\t\t} : void 0\n\t\t\t\t\t};\n\t\t\t\t\td._flight = void 0;\n\t\t\t\t\treturn next;\n\t\t\t\t}\n\t\t\t\treturn d;\n\t\t\t};\n\t\t\tthis._committed = committedMatches.map(invalidate);\n\t\t\tfor (const [id, match] of this._cache) if (invalidIds.has(id)) {\n\t\t\t\tmatch.invalid = true;\n\t\t\t\tif (opts?.forcePending) match.status = \"pending\";\n\t\t\t}\n\t\t\tfor (const id of invalidIds) this._flights?.delete(id);\n\t\t\tfor (const controller of discardedPreloads) controller.abort();\n\t\t\tthis.shouldViewTransition = false;\n\t\t\treturn this.load({ sync: opts?.sync });\n\t\t};\n\t\tthis.resolveRedirect = (redirect) => {\n\t\t\tconst locationHeader = redirect.headers.get(\"Location\");\n\t\t\tif (!redirect.options.href) {\n\t\t\t\tconst href = this.buildLocation(redirect.options).publicHref || \"/\";\n\t\t\t\tredirect.options.href = href;\n\t\t\t\tredirect.headers.set(\"Location\", href);\n\t\t\t} else if (locationHeader) try {\n\t\t\t\tconst url = new URL(locationHeader);\n\t\t\t\tif (this.origin && url.origin === this.origin) {\n\t\t\t\t\tconst href = url.pathname + url.search + url.hash;\n\t\t\t\t\tredirect.options.href = href;\n\t\t\t\t\tredirect.headers.set(\"Location\", href);\n\t\t\t\t}\n\t\t\t} catch {}\n\t\t\tif (redirect.options.href && isDangerousProtocol(redirect.options.href, this.protocolAllowlist)) throw new Error(process.env.NODE_ENV !== \"production\" ? `Redirect blocked: unsafe protocol in href \"${redirect.options.href}\". Allowed protocols: ${Array.from(this.protocolAllowlist).join(\", \")}.` : \"Redirect blocked: unsafe protocol\");\n\t\t\tif (!redirect.headers.get(\"Location\")) redirect.headers.set(\"Location\", redirect.options.href);\n\t\t\treturn redirect;\n\t\t};\n\t\tthis.clearCache = (opts) => {\n\t\t\tconst cached = this._cache;\n\t\t\tconst preloads = this._preloads;\n\t\t\tconst filter = opts?.filter;\n\t\t\tconst discarded = [];\n\t\t\tconst discardedIds = [];\n\t\t\tfor (const [id, match] of cached) if (!filter || filter(match)) {\n\t\t\t\tdiscardedIds.push(id);\n\t\t\t\tdiscarded.push(match);\n\t\t\t}\n\t\t\tconst abort = [];\n\t\t\tfor (const [controller, matches] of preloads ?? []) if (!filter || matches.some(filter)) {\n\t\t\t\tabort.push(controller);\n\t\t\t\tdiscarded.push(...matches);\n\t\t\t}\n\t\t\tfor (const id of discardedIds) cached.delete(id);\n\t\t\tfor (const controller of abort) preloads.delete(controller);\n\t\t\tfor (const match of discarded) {\n\t\t\t\tconst flight = match._flight;\n\t\t\t\tmatch._flight = void 0;\n\t\t\t\tif (flight && !--flight[2]) {\n\t\t\t\t\tif (this._flights?.get(match.id) === flight) this._flights.delete(match.id);\n\t\t\t\t\tabort.push(flight[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t};\n\t\tthis.loadRouteChunk = loadRouteChunk;\n\t\tthis.preloadRoute = (opts, builtLocation) => preloadClientRoute(this, opts, 0, builtLocation);\n\t\tthis.matchRoute = (location, opts) => {\n\t\t\tconst matchLocation = {\n\t\t\t\t...location,\n\t\t\t\tto: location.to ? this.resolvePathWithBase(location.from || \"\", location.to) : void 0,\n\t\t\t\tparams: location.params || {},\n\t\t\t\tleaveParams: true\n\t\t\t};\n\t\t\tconst next = this.buildLocation(matchLocation);\n\t\t\tconst isPending = this.stores.status.get() === \"pending\";\n\t\t\tif (opts?.pending && !isPending) return false;\n\t\t\tconst baseLocation = opts?.pending ?? !isPending ? this.latestLocation : this.stores.resolvedLocation.get() || this.stores.location.get();\n\t\t\tconst match = findSingleMatch(next.pathname, opts?.caseSensitive ?? false, opts?.fuzzy ?? false, baseLocation.pathname, this.processedTree);\n\t\t\tif (!match) return false;\n\t\t\tif (location.params) {\n\t\t\t\tif (!deepEqual(match.rawParams, location.params, { partial: true })) return false;\n\t\t\t}\n\t\t\tif (opts?.includeSearch ?? true) return deepEqual(baseLocation.search, next.search, { partial: true }) ? match.rawParams : false;\n\t\t\treturn match.rawParams;\n\t\t};\n\t\tthis.getStoreConfig = getStoreConfig;\n\t\tthis.update({\n\t\t\tdefaultPreloadDelay: 50,\n\t\t\tdefaultPendingMs: 1e3,\n\t\t\tdefaultPendingMinMs: 500,\n\t\t\tcontext: void 0,\n\t\t\t...options,\n\t\t\tcaseSensitive: options.caseSensitive ?? false,\n\t\t\tnotFoundMode: options.notFoundMode ?? \"fuzzy\",\n\t\t\tstringifySearch: options.stringifySearch ?? defaultStringifySearch,\n\t\t\tparseSearch: options.parseSearch ?? defaultParseSearch,\n\t\t\tprotocolAllowlist: options.protocolAllowlist ?? DEFAULT_PROTOCOL_ALLOWLIST\n\t\t});\n\t\tif (!(isServer ?? typeof document === \"undefined\")) self.__TSR_ROUTER__ = this;\n\t}\n\tisShell() {\n\t\treturn !!this.options.isShell;\n\t}\n\tget state() {\n\t\treturn this.stores.__store.get();\n\t}\n\tsetRoutes({ routesById, routesByPath, processedTree }) {\n\t\tthis.routesById = routesById;\n\t\tthis.routesByPath = routesByPath;\n\t\tthis.processedTree = processedTree;\n\t\tconst notFoundRoute = this.options.notFoundRoute;\n\t\tif (notFoundRoute) {\n\t\t\tnotFoundRoute.init({ originalIndex: 99999999999 });\n\t\t\tthis.routesById[notFoundRoute.id] = notFoundRoute;\n\t\t}\n\t}\n\tgetRouteBranch(route) {\n\t\tlet branch = this.routeBranchCache.get(route);\n\t\tif (!branch) {\n\t\t\tbranch = buildRouteBranch(route);\n\t\t\tthis.routeBranchCache.set(route, branch);\n\t\t}\n\t\treturn branch;\n\t}\n\tmatchRoutesInternal(next, opts) {\n\t\tconst [initialMatchedRoutes, rawParams, foundRoute] = this.getMatchedRoutes(next.pathname);\n\t\tlet matchedRoutes = initialMatchedRoutes;\n\t\tlet isGlobalNotFound = false;\n\t\tif (foundRoute ? foundRoute.path !== \"/\" && rawParams[\"**\"] : trimPathRight(next.pathname)) if (this.options.notFoundRoute) matchedRoutes = [...matchedRoutes, this.options.notFoundRoute];\n\t\telse isGlobalNotFound = true;\n\t\tconst _notFoundRouteId = isGlobalNotFound ? findGlobalNotFoundRouteId(this.options.notFoundMode, matchedRoutes) : void 0;\n\t\tconst matches = new Array(matchedRoutes.length);\n\t\tconst committed = this._committed;\n\t\tconst previousAt = (route, index) => {\n\t\t\tconst match = committed[index];\n\t\t\treturn match?.routeId === route.id ? match : route === this.options.notFoundRoute ? committed.find((candidate) => candidate.routeId === route.id) : void 0;\n\t\t};\n\t\tlet strictParams;\n\t\tfor (let index = 0; index < matchedRoutes.length; index++) {\n\t\t\tconst route = matchedRoutes[index];\n\t\t\tconst parentMatch = matches[index - 1];\n\t\t\tlet preMatchSearch;\n\t\t\tlet strictMatchSearch;\n\t\t\tlet searchError;\n\t\t\t{\n\t\t\t\tconst parentSearch = parentMatch?.search ?? next.search;\n\t\t\t\tconst parentStrictSearch = parentMatch?._strictSearch ?? void 0;\n\t\t\t\ttry {\n\t\t\t\t\tconst strictSearch = validateSearch(route.options.validateSearch, { ...parentSearch }) ?? void 0;\n\t\t\t\t\tpreMatchSearch = {\n\t\t\t\t\t\t...parentSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t\tstrictMatchSearch = {\n\t\t\t\t\t\t...parentStrictSearch,\n\t\t\t\t\t\t...strictSearch\n\t\t\t\t\t};\n\t\t\t\t} catch (err) {\n\t\t\t\t\tlet searchParamError = err;\n\t\t\t\t\tif (!(err instanceof SearchParamError)) searchParamError = new SearchParamError(err.message, { cause: err });\n\t\t\t\t\tif (opts?.throwOnError) throw searchParamError;\n\t\t\t\t\tpreMatchSearch = parentSearch;\n\t\t\t\t\tstrictMatchSearch = {};\n\t\t\t\t\tsearchError = searchParamError;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet loaderDeps = \"\";\n\t\t\tlet loaderDepsHash = \"\";\n\t\t\ttry {\n\t\t\t\tloaderDeps = route.options.loaderDeps?.({ search: preMatchSearch }) ?? \"\";\n\t\t\t\tloaderDepsHash = loaderDeps ? JSON.stringify(loaderDeps) || \"\" : \"\";\n\t\t\t} catch (cause) {\n\t\t\t\tif (opts?.throwOnError) throw cause;\n\t\t\t\tsearchError ??= cause;\n\t\t\t}\n\t\t\tconst { interpolatedPath, usedParams } = interpolatePath({\n\t\t\t\tpath: route.fullPath,\n\t\t\t\tparams: rawParams,\n\t\t\t\tdecoder: this.pathParamsDecoder,\n\t\t\t\tserver: this.isServer\n\t\t\t});\n\t\t\tconst matchId = route.id + interpolatedPath + loaderDepsHash;\n\t\t\tconst previousMatch = previousAt(route, index);\n\t\t\tconst existingMatch = process.env.NODE_ENV !== \"production\" && opts?._rematerialize ? void 0 : this._cache.get(matchId) ?? (previousMatch?.id === matchId ? previousMatch : void 0);\n\t\t\tstrictParams = existingMatch?._strictParams ?? Object.assign(usedParams, strictParams);\n\t\t\tlet paramsError;\n\t\t\tif (!existingMatch) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch (err) {\n\t\t\t\tif (isNotFound(err) || isRedirect(err)) paramsError = err;\n\t\t\t\telse paramsError = new PathParamError(err.message, { cause: err });\n\t\t\t\tif (opts?.throwOnError) throw paramsError;\n\t\t\t}\n\t\t\tconst cause = previousMatch ? \"stay\" : \"enter\";\n\t\t\tlet match;\n\t\t\tif (existingMatch) match = {\n\t\t\t\t...existingMatch,\n\t\t\t\tcause,\n\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : nullReplaceEqualDeep(existingMatch.search, preMatchSearch),\n\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\tsearchError\n\t\t\t};\n\t\t\telse {\n\t\t\t\tconst status = routeNeedsLoad(route) ? \"pending\" : \"success\";\n\t\t\t\tmatch = {\n\t\t\t\t\tid: matchId,\n\t\t\t\t\tssr: isServer ?? this.isServer ? void 0 : route.options.ssr,\n\t\t\t\t\tindex,\n\t\t\t\t\trouteId: route.id,\n\t\t\t\t\tparams: previousMatch?.params ?? strictParams,\n\t\t\t\t\t_strictParams: strictParams,\n\t\t\t\t\tpathname: interpolatedPath,\n\t\t\t\t\tupdatedAt: Date.now(),\n\t\t\t\t\tsearch: previousMatch ? nullReplaceEqualDeep(previousMatch.search, preMatchSearch) : preMatchSearch,\n\t\t\t\t\t_strictSearch: strictMatchSearch,\n\t\t\t\t\tsearchError,\n\t\t\t\t\tstatus,\n\t\t\t\t\tisFetching: false,\n\t\t\t\t\terror: void 0,\n\t\t\t\t\tparamsError,\n\t\t\t\t\tcontext: {},\n\t\t\t\t\tabortController: opts?._controller ?? new AbortController(),\n\t\t\t\t\tcause,\n\t\t\t\t\tloaderDeps: previousMatch ? replaceEqualDeep(previousMatch.loaderDeps, loaderDeps) : loaderDeps,\n\t\t\t\t\tinvalid: false,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tstaticData: route.options.staticData || {},\n\t\t\t\t\tfullPath: route.fullPath\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst _notFound = _notFoundRouteId === route.id;\n\t\t\tif (match._notFound && !_notFound) match.error = void 0;\n\t\t\tmatch._notFound = _notFound;\n\t\t\tmatches[index] = match;\n\t\t}\n\t\tfor (let index = 0; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tmatch.params = match.cause === \"stay\" ? nullReplaceEqualDeep(match.params, strictParams) : strictParams;\n\t\t\tif (opts?._controller) match.context = {};\n\t\t}\n\t\treturn matches;\n\t}\n\t/**\n\t* Lightweight route matching for buildLocation.\n\t* Only computes fullPath, accumulated search, and params - skipping expensive\n\t* operations like AbortController, loaderDeps, and full match objects.\n\t*/\n\tmatchRoutesLightweight(location) {\n\t\tconst lastRouteId = last(this.stores.ids.get());\n\t\tconst lastStateMatch = lastRouteId ? this.stores.byRoute.get(lastRouteId).get() : void 0;\n\t\tconst lastStateMatchId = lastStateMatch?.id;\n\t\tconst cached = this.lightweightCache.get(location);\n\t\tif (cached && cached[0] === lastStateMatchId) return cached[1];\n\t\tconst [matchedRoutes, rawParams] = this.getMatchedRoutes(location.pathname);\n\t\tconst lastRoute = last(matchedRoutes);\n\t\tconst accumulatedSearch = { ...location.search };\n\t\tfor (const route of matchedRoutes) try {\n\t\t\tObject.assign(accumulatedSearch, validateSearch(route.options.validateSearch, accumulatedSearch));\n\t\t} catch {}\n\t\tconst canReuseParams = lastStateMatch && lastStateMatch.routeId === lastRoute.id && lastStateMatch.pathname === location.pathname;\n\t\tlet params;\n\t\tif (canReuseParams) params = lastStateMatch.params;\n\t\telse {\n\t\t\tconst strictParams = Object.assign(Object.create(null), rawParams);\n\t\t\tfor (const route of matchedRoutes) try {\n\t\t\t\textractStrictParams(route, strictParams);\n\t\t\t} catch {}\n\t\t\tparams = strictParams;\n\t\t}\n\t\tconst result = [\n\t\t\tmatchedRoutes,\n\t\t\tlastRoute.fullPath,\n\t\t\taccumulatedSearch,\n\t\t\tparams\n\t\t];\n\t\tthis.lightweightCache.set(location, [lastStateMatchId, result]);\n\t\treturn result;\n\t}\n};\n/**\n* In non-production environments,\n* augment the RouterCore class with a `_refreshRoute` method\n* dedicated to HMR.\n*/\nif (process.env.NODE_ENV !== \"production\") {\n\tRouterCore.prototype._replaceRouteChunk = replaceRouteChunk;\n\tRouterCore.prototype._refreshRoute = async function() {\n\t\tthis._serverResult = void 0;\n\t\tthis.updateLatestLocation();\n\t\tawait refreshClientRoute(this);\n\t};\n}\n/** Error thrown when search parameter validation fails. */\nvar SearchParamError = class extends Error {};\n/** Error thrown when path parameter parsing/validation fails. */\nvar PathParamError = class extends Error {};\nconst normalize = (str) => str.endsWith(\"/\") && str.length > 1 ? str.slice(0, -1) : str;\nfunction comparePaths(a, b) {\n\treturn normalize(a) === normalize(b);\n}\n/**\n* Lazily import a module function and forward arguments to it, retaining\n* parameter and return types for the selected export key.\n*/\nfunction lazyFn(fn, key) {\n\treturn async (...args) => {\n\t\treturn (await fn())[key || \"default\"](...args);\n\t};\n}\n/** Create an initial RouterState from a parsed location. */\nfunction getInitialRouterState(location) {\n\treturn {\n\t\tisLoading: false,\n\t\tstatus: \"idle\",\n\t\tresolvedLocation: void 0,\n\t\tlocation,\n\t\tmatches: []\n\t};\n}\nfunction validateSearch(validateSearch, input) {\n\tif (validateSearch == null) return {};\n\tif (\"~standard\" in validateSearch) {\n\t\tconst result = validateSearch[\"~standard\"].validate(input);\n\t\tif (result instanceof Promise) throw new SearchParamError(\"Async validation not supported\");\n\t\tif (result.issues) throw new SearchParamError(JSON.stringify(result.issues, void 0, 2), { cause: result });\n\t\treturn result.value;\n\t}\n\tif (\"parse\" in validateSearch) return validateSearch.parse(input);\n\tif (typeof validateSearch === \"function\") return validateSearch(input);\n\treturn {};\n}\nfunction applySearchMiddleware(search, dest, destRoutes, includeValidateSearch) {\n\tconst middlewares = [];\n\tfor (const route of destRoutes) {\n\t\tconst routeOptions = route.options;\n\t\tif (\"search\" in routeOptions) {\n\t\t\tif (routeOptions.search?.middlewares) middlewares.push(...routeOptions.search.middlewares);\n\t\t} else if (routeOptions.preSearchFilters || routeOptions.postSearchFilters) {\n\t\t\tconst legacyMiddleware = ({ search, next }) => {\n\t\t\t\tconst result = next(routeOptions.preSearchFilters ? routeOptions.preSearchFilters.reduce((prev, next) => next(prev), search) : search);\n\t\t\t\treturn routeOptions.postSearchFilters ? routeOptions.postSearchFilters.reduce((prev, next) => next(prev), result) : result;\n\t\t\t};\n\t\t\tmiddlewares.push(legacyMiddleware);\n\t\t}\n\t\tconst routeValidateSearch = routeOptions.validateSearch;\n\t\tif (includeValidateSearch && routeValidateSearch) {\n\t\t\tconst validate = ({ search, next, meta }) => {\n\t\t\t\tconst result = next(search);\n\t\t\t\ttry {\n\t\t\t\t\tconst validated = validateSearch(routeValidateSearch, result);\n\t\t\t\t\tif (meta && validated) {\n\t\t\t\t\t\tfor (const key in validated) if (!(key in result)) (meta.defaulted ||= /* @__PURE__ */ new Map()).set(key, validated[key]);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...result,\n\t\t\t\t\t\t...validated\n\t\t\t\t\t};\n\t\t\t\t} catch {}\n\t\t\t\treturn result;\n\t\t\t};\n\t\t\tmiddlewares.push(validate);\n\t\t}\n\t}\n\tconst applyNext = (index, currentSearch, meta) => {\n\t\tif (index >= middlewares.length) {\n\t\t\tif (!dest.search) return {};\n\t\t\tif (dest.search === true) return currentSearch;\n\t\t\tconst result = functionalUpdate(dest.search, currentSearch);\n\t\t\tif (meta) meta.explicit = result;\n\t\t\treturn result;\n\t\t}\n\t\tconst next = (newSearch, collectMeta) => {\n\t\t\tif (collectMeta) {\n\t\t\t\tconst nextMeta = meta || {};\n\t\t\t\treturn {\n\t\t\t\t\tsearch: applyNext(index + 1, newSearch, nextMeta),\n\t\t\t\t\tmeta: nextMeta\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyNext(index + 1, newSearch, meta);\n\t\t};\n\t\treturn middlewares[index]({\n\t\t\tsearch: currentSearch,\n\t\t\tnext,\n\t\t\tmeta\n\t\t});\n\t};\n\treturn applyNext(0, search);\n}\nfunction findGlobalNotFoundRouteId(notFoundMode, routes) {\n\tif (notFoundMode !== \"root\") {\n\t\tlet fallback;\n\t\tfor (let i = routes.length - 1; i >= 0; i--) {\n\t\t\tconst route = routes[i];\n\t\t\tif (route.options.notFoundComponent) return route.id;\n\t\t\tfallback ||= route.children && route.id;\n\t\t}\n\t\tif (fallback) return fallback;\n\t}\n\treturn rootRouteId;\n}\nfunction resolveNextParams(spec, base) {\n\tif (spec === false || spec === null) return Object.create(null);\n\tif ((spec ?? true) === true) return base;\n\tconst next = Object.assign(Object.create(null), base);\n\treturn Object.assign(next, functionalUpdate(spec, next));\n}\nfunction extractStrictParams(route, accumulatedParams) {\n\tconst parseParams = route.options.params?.parse ?? route.options.parseParams;\n\tif (parseParams) Object.assign(accumulatedParams, parseParams(accumulatedParams));\n}\n//#endregion\nexport { PathParamError, RouterCore, SearchParamError, defaultSerializeError, getInitialRouterState, getLocationChangeInfo, lazyFn, runRouteLifecycle, trailingSlashOptions };\n\n//# sourceMappingURL=router.js.map","import { isNotFound } from \"./not-found.js\";\nimport { isRedirect } from \"./redirect.js\";\nimport { hydrateSsrMatchId } from \"./ssr/ssr-match-id.js\";\nimport { getLocationChangeInfo, runRouteLifecycle } from \"./router.js\";\n//#region src/load-client.ts\nfunction replaceRouteChunk(route, lazyFn) {\n\troute.lazyFn = lazyFn ?? route.lazyFn;\n\troute._lazy = void 0;\n}\nfunction preloadComponent(route, type) {\n\treturn route.options[type]?.preload?.();\n}\nfunction loadComponents(route, onPendingReady) {\n\tconst component = preloadComponent(route, \"component\");\n\tconst pending = preloadComponent(route, \"pendingComponent\");\n\tconst pendingReady = onPendingReady && pending ? pending.then(onPendingReady) : pending;\n\tif (onPendingReady && !pending) onPendingReady();\n\tif (component && pendingReady) return Promise.all([component, pendingReady]).then(() => {});\n\treturn component ?? pendingReady;\n}\nfunction loadRouteChunk(route, componentType, onPendingReady) {\n\tconst afterLazy = () => componentType === false ? void 0 : componentType ? preloadComponent(route, componentType) : loadComponents(route, onPendingReady);\n\tconst current = route._lazy;\n\tif (current) return current === true ? afterLazy() : current.then(afterLazy);\n\tif (!route.lazyFn) return afterLazy();\n\tconst promise = route.lazyFn().then((lazyRoute) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) {\n\t\t\tconst { id: _id, ...options } = lazyRoute.options;\n\t\t\tObject.assign(route.options, options);\n\t\t\troute._lazy = true;\n\t\t}\n\t}, (error) => {\n\t\tif (process.env.NODE_ENV === \"production\" || route._lazy === promise) route._lazy = void 0;\n\t\tthrow error;\n\t});\n\troute._lazy = promise;\n\treturn promise.then(afterLazy);\n}\n/** Return the structural lane through the first terminal render boundary. */\nfunction _getRenderedMatches(matches) {\n\tconst end = matches.findIndex((match) => match.status !== \"success\" || match._notFound) + 1;\n\treturn end && end < matches.length ? matches.slice(0, end) : matches;\n}\n/** Return the lane whose document assets belong to the current presentation. */\nfunction _getAssetMatches(matches) {\n\tlet end = matches.length;\n\tfor (let index = 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tif (match._assetEnd !== void 0) {\n\t\t\tend = Math.min(end, Math.max(index + 1, match._assetEnd));\n\t\t\tcontinue;\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) {\n\t\t\tend = index + 1;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn end < matches.length ? matches.slice(0, end) : matches;\n}\nconst SUCCESS = 0;\nconst ERROR = 1;\nconst NOT_FOUND = 2;\nconst REDIRECTED = 3;\nconst CANCELED_OUTCOME = [4];\nfunction isControl(result) {\n\treturn typeof result[0] === \"number\";\n}\nfunction waitFor(value, signal) {\n\tif (signal.aborted) return Promise.race([Promise.reject(signal), value]);\n\treturn new Promise((resolve, reject) => {\n\t\tconst abort = () => reject(signal);\n\t\tsignal.addEventListener(\"abort\", abort, { once: true });\n\t\tPromise.resolve(value).then(resolve, reject).finally(() => signal.removeEventListener(\"abort\", abort));\n\t});\n}\nfunction getRoute(router, match) {\n\treturn router.routesById[match.routeId];\n}\nfunction normalize(value, rejected, routeId) {\n\tif (isRedirect(value)) return [REDIRECTED, value];\n\tif (isNotFound(value)) {\n\t\tvalue.routeId ||= routeId;\n\t\treturn [NOT_FOUND, value];\n\t}\n\tif (rejected && typeof value?.then === \"function\") value = new Error(\"A Promise was thrown\", { cause: value });\n\treturn rejected ? [ERROR, value] : [SUCCESS, value];\n}\nfunction normalizeError(route, cause) {\n\tlet outcome = normalize(cause, true, route.id);\n\tif (outcome[0] !== ERROR) return outcome;\n\ttry {\n\t\troute.options.onError?.(outcome[1]);\n\t} catch (onErrorCause) {\n\t\toutcome = normalize(onErrorCause, true, route.id);\n\t}\n\treturn outcome;\n}\nfunction normalizeLaneError(router, lane, route, cause, options) {\n\tif (options[0].signal.aborted) return CANCELED_OUTCOME;\n\treturn materializeRedirect(router, lane, route, normalizeError(route, cause), options);\n}\nasync function contextualize(router, lane, options, end, planSuccessfulLane, retainedEnd) {\n\tconst [location, matches] = lane;\n\tconst signal = options[0].signal;\n\tconst preload = !!options[3];\n\tfor (let index = options[6] ?? 0; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst route = getRoute(router, match);\n\t\tmatch.abortController = options[0];\n\t\tconst parentContext = matches[index - 1]?.context ?? router.options.context ?? {};\n\t\tconst common = {\n\t\t\tparams: match.params,\n\t\t\tlocation,\n\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t...opts,\n\t\t\t\t_fromLocation: location\n\t\t\t}),\n\t\t\tbuildLocation: router.buildLocation,\n\t\t\tcause: preload ? \"preload\" : match.cause,\n\t\t\tabortController: options[0],\n\t\t\tpreload,\n\t\t\tmatches,\n\t\t\trouteId: route.id\n\t\t};\n\t\tlet context = parentContext;\n\t\ttry {\n\t\t\tlet routeContext = match._ctx;\n\t\t\tif (!routeContext && route.options.context) routeContext = match._ctx = route.options.context({\n\t\t\t\t...common,\n\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\tcontext: parentContext\n\t\t\t}) || {};\n\t\t\tcontext = {\n\t\t\t\t...parentContext,\n\t\t\t\t...routeContext\n\t\t\t};\n\t\t\tmatch.context = context;\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t}\n\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\tconst validationError = match.paramsError ?? match.searchError;\n\t\tif (validationError !== void 0) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, validationError, options)];\n\t\t}\n\t\tconst beforeLoad = route.options.beforeLoad;\n\t\tif (!beforeLoad) continue;\n\t\tconst beforeLoadContext = {\n\t\t\t...common,\n\t\t\tsearch: match.search,\n\t\t\tcontext,\n\t\t\t...router.options.additionalContext\n\t\t};\n\t\tconst previousStatus = match.status;\n\t\tif (index >= retainedEnd) {\n\t\t\tmatch.status = \"pending\";\n\t\t\toptions[7]?.();\n\t\t}\n\t\ttry {\n\t\t\tsetFetching(router, match, \"beforeLoad\", options[0]);\n\t\t\tconst result = await waitFor(beforeLoad(beforeLoadContext), signal);\n\t\t\tif (signal.aborted) return [index, CANCELED_OUTCOME];\n\t\t\tconst outcome = materializeRedirect(router, lane, route, normalize(result, false, route.id), options);\n\t\t\tif (outcome[0] !== SUCCESS) {\n\t\t\t\treleaseFlight(router, match);\n\t\t\t\treturn [index, outcome];\n\t\t\t}\n\t\t\tmatch.context = {\n\t\t\t\t...context,\n\t\t\t\t...result\n\t\t\t};\n\t\t} catch (cause) {\n\t\t\treleaseFlight(router, match);\n\t\t\treturn [index, normalizeLaneError(router, lane, route, cause, options)];\n\t\t} finally {\n\t\t\tif (match.status === \"pending\") match.status = previousStatus;\n\t\t\tsetFetching(router, match, false, options[0]);\n\t\t}\n\t}\n\tplanSuccessfulLane();\n}\nfunction releaseOwnedFlight(router, match, flight) {\n\tif (!flight || --flight[2]) return;\n\tif (router._flights?.get(match.id) === flight) {\n\t\tconst current = router._tx;\n\t\tif (current && !current[0].signal.aborted && !current[3].includes(match) && current[3].some((candidate) => candidate.id === match.id) && current[3].some((candidate) => candidate.isFetching === \"beforeLoad\")) return;\n\t\trouter._flights.delete(match.id);\n\t}\n\treturn flight[1];\n}\nfunction releaseFlight(router, match) {\n\tconst flight = match._flight;\n\tmatch._flight = void 0;\n\treleaseOwnedFlight(router, match, flight)?.abort();\n}\n/**\n* Not passing in a `next` ownership recipient\n* is equivalent to discarding the match resources\n*/\nfunction transferMatchResources(router, previous, next, deferSameIdFlight) {\n\tconst abort = [];\n\tfor (const match of previous) if (!next?.includes(match)) {\n\t\tconst flight = match._flight;\n\t\tmatch._flight = void 0;\n\t\tif (deferSameIdFlight && flight?.[2] === 1 && router._flights?.get(match.id) === flight && next?.some((candidate) => candidate.id === match.id)) flight[2] = 0;\n\t\telse {\n\t\t\tconst controller = releaseOwnedFlight(router, match, flight);\n\t\t\tif (controller) abort.push(controller);\n\t\t}\n\t}\n\tfor (const controller of abort) controller.abort();\n}\nfunction acquireMatchResources(matches) {\n\tfor (const match of matches) {\n\t\tconst flight = match._flight;\n\t\tif (flight) flight[2]++;\n\t}\n}\nfunction setFetching(router, match, value, owner) {\n\tmatch.isFetching = value;\n\tif (owner && router._tx?.[0] !== owner) return;\n\tconst store = router.stores.byRoute.get(match.routeId);\n\tconst presented = store?.get();\n\tif (presented?.id === match.id) store.set({\n\t\t...presented,\n\t\tisFetching: value\n\t});\n}\nfunction getLoaderContext(router, lane, match, route, controller, parentMatchPromise, preload) {\n\tconst location = lane[0];\n\treturn {\n\t\tparams: match.params,\n\t\tlocation,\n\t\tnavigate: (opts) => router.navigate({\n\t\t\t...opts,\n\t\t\t_fromLocation: location\n\t\t}),\n\t\tcause: preload ? \"preload\" : match.cause,\n\t\tabortController: controller,\n\t\tpreload,\n\t\tdeps: match.loaderDeps,\n\t\tparentMatchPromise,\n\t\tcontext: match.context,\n\t\troute,\n\t\t...router.options.additionalContext\n\t};\n}\nasync function loadResource(router, lane, match, route, loader, parentMatchPromise, options) {\n\tconst owner = options[0];\n\tconst signal = owner.signal;\n\tif (signal.aborted) return CANCELED_OUTCOME;\n\tif (!loader) return [SUCCESS, void 0];\n\tlet flight = match._flight;\n\tsetFetching(router, match, \"loader\", owner);\n\ttry {\n\t\tif (!flight) {\n\t\t\tconst controller = new AbortController();\n\t\t\tflight = [\n\t\t\t\tPromise.resolve().then(() => loader(getLoaderContext(router, lane, match, route, controller, parentMatchPromise, !!options[3]))).then((value) => normalize(value, false, route.id), (cause) => normalize(cause, true, route.id)).then((result) => {\n\t\t\t\t\tif (result[0] !== SUCCESS && router._flights?.get(match.id) === flight) {\n\t\t\t\t\t\trouter._flights.delete(match.id);\n\t\t\t\t\t\tif (!flight[2]) controller.abort();\n\t\t\t\t\t}\n\t\t\t\t\treturn result[0] === ERROR && flight[2] ? normalizeError(route, result[1]) : result;\n\t\t\t\t}),\n\t\t\t\tcontroller,\n\t\t\t\t1\n\t\t\t];\n\t\t\t(router._flights ??= /* @__PURE__ */ new Map()).set(match.id, flight);\n\t\t}\n\t\tmatch._flight = flight;\n\t\tmatch.abortController = flight[1];\n\t\treturn materializeRedirect(router, lane, route, await waitFor(flight[0], signal), options);\n\t} catch (cause) {\n\t\tif (cause !== signal || !signal.aborted) throw cause;\n\t\treleaseFlight(router, match);\n\t\treturn CANCELED_OUTCOME;\n\t} finally {\n\t\tsetFetching(router, match, false, owner);\n\t}\n}\nfunction settleInto(match, result, preload) {\n\tif (result[0] === SUCCESS) {\n\t\tmatch.loaderData = result[1];\n\t\tmatch.error = void 0;\n\t\tmatch.status = \"success\";\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t\tmatch.preload = preload;\n\t} else if (result[0] !== REDIRECTED) {\n\t\tmatch.status = \"success\";\n\t\tmatch.error = void 0;\n\t\tmatch.invalid = true;\n\t}\n}\nfunction cacheLoaderMatch(router, match, planned) {\n\tconst current = router._cache.get(match.id);\n\tif (current !== planned || router._committed.some((candidate) => candidate.id === match.id && candidate._flight === match._flight)) return;\n\tconst cached = {\n\t\t...match,\n\t\t_notFound: void 0,\n\t\tcontext: {}\n\t};\n\tif (cached._flight) cached._flight[2]++;\n\trouter._cache.set(match.id, cached);\n\tif (current) releaseFlight(router, current);\n}\nfunction getParentSnapshot(match, outcome) {\n\tif (outcome[0] === ERROR || outcome[0] === NOT_FOUND) return {\n\t\t...match,\n\t\tstatus: outcome[0] === ERROR ? \"error\" : \"notFound\",\n\t\terror: outcome[1],\n\t\t_flight: void 0\n\t};\n\treturn match;\n}\nfunction createLoaderTask(router, lane, index, tasks, semanticParent, options, retainedEnd) {\n\tconst match = lane[1][index];\n\tconst route = getRoute(router, match);\n\tconst preload = !!options[3];\n\tconst plannedCacheMatch = router._cache.get(match.id);\n\tlet configured;\n\tlet reload = false;\n\tlet reloadFailure;\n\ttry {\n\t\tif (match.status === \"success\") {\n\t\t\tconfigured = route.options.shouldReload;\n\t\t\tif (typeof configured === \"function\") configured = configured(getLoaderContext(router, lane, match, route, options[0], semanticParent, preload));\n\t\t\tif (options[0].signal.aborted) reloadFailure = CANCELED_OUTCOME;\n\t\t}\n\t\tif (!reloadFailure) if (match.status !== \"success\") reload = true;\n\t\telse {\n\t\t\tconst staleAge = options[3] || match.preload ? route.options.preloadStaleTime ?? router.options.defaultPreloadStaleTime ?? 3e4 : route.options.staleTime ?? router.options.defaultStaleTime ?? 0;\n\t\t\treload = !!(match.invalid || configured || configured === void 0 && Date.now() - match.updatedAt >= staleAge && (options[5] || match.cause === \"enter\" || options[2].some((candidate) => candidate.routeId === match.routeId && candidate.id !== match.id)));\n\t\t}\n\t} catch (cause) {\n\t\tmatch.invalid = true;\n\t\treleaseFlight(router, match);\n\t\treloadFailure = normalizeLaneError(router, lane, route, cause, options);\n\t}\n\tconst routeLoader = route.options.loader;\n\tconst loader = typeof routeLoader === \"function\" ? routeLoader : routeLoader?.handler;\n\tlet donor = (!preload || route.options.preload !== false) && routeLoader && !(process.env.NODE_ENV !== \"production\" && router._tx?.[6]) ? router._flights?.get(match.id) : void 0;\n\tif (donor === match._flight || reloadFailure) donor = void 0;\n\telse if (donor && !reload && !preload && configured === void 0) reload = true;\n\telse if (!reload) donor = void 0;\n\tconst background = !!(routeLoader && reload && match.status === \"success\" && !preload && !options[4] && ((typeof routeLoader === \"function\" ? void 0 : routeLoader?.staleReloadMode) ?? router.options.defaultStaleReloadMode) !== \"blocking\");\n\tconst loaded = reload && (!preload || route.options.preload !== false);\n\tconst blocking = loaded && !background && (match.status !== \"success\" || !!routeLoader);\n\tconst onReady = index >= retainedEnd ? options[7] : void 0;\n\tconst onLazyReady = route.lazyFn && route._lazy !== true ? onReady : void 0;\n\tif (loaded && !routeLoader) {\n\t\tmatch.invalid = false;\n\t\tmatch.updatedAt = Date.now();\n\t}\n\tif (donor) donor[2]++;\n\tif (blocking) {\n\t\tconst acceptedFlight = match._flight;\n\t\tmatch._flight = donor;\n\t\treleaseOwnedFlight(router, match, acceptedFlight)?.abort();\n\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\tonReady?.();\n\t}\n\tif (!loaded) match.isFetching = false;\n\tconst outcome = (reloadFailure ? Promise.resolve(reloadFailure) : !blocking ? Promise.resolve([SUCCESS, match.loaderData]) : loadResource(router, lane, match, route, loader, semanticParent, options)).then((result) => {\n\t\tif (blocking) {\n\t\t\tsettleInto(match, result, preload);\n\t\t\tif (result[0] === SUCCESS) {\n\t\t\t\tif (routeLoader && !options[0].signal.aborted) cacheLoaderMatch(router, match, plannedCacheMatch);\n\t\t\t\tif (index >= retainedEnd) match.status = \"pending\";\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t});\n\tconst chunkFailure = waitFor(Promise.resolve().then(() => loadRouteChunk(route, void 0, onLazyReady)), options[0].signal).then(() => void 0, (cause) => lane[1].some((candidate, candidateIndex) => candidateIndex <= index && (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound)) ? void 0 : [index, normalizeLaneError(router, lane, route, cause, options)]).then((failure) => outcome.then((result) => {\n\t\tif (blocking && !failure && result[0] === SUCCESS && match.status === \"pending\" && !options[0].signal.aborted) {\n\t\t\tmatch.status = \"success\";\n\t\t\tonReady?.();\n\t\t}\n\t\treturn failure;\n\t}));\n\ttasks.push([\n\t\tindex,\n\t\toutcome,\n\t\tchunkFailure\n\t]);\n\tif (!background) return outcome.then((result) => getParentSnapshot(match, result));\n\tconst candidate = {\n\t\t...match,\n\t\tstatus: \"pending\",\n\t\tpreload: false,\n\t\t_flight: donor\n\t};\n\tmatch.invalid = false;\n\tmatch.isFetching = \"loader\";\n\tconst backgroundOutcome = loadResource(router, lane, candidate, route, loader, semanticParent, options).then((result) => {\n\t\tmatch.isFetching = false;\n\t\tsettleInto(candidate, result, false);\n\t\treturn result;\n\t});\n\t(lane[2] ??= []).push([\n\t\tindex,\n\t\tbackgroundOutcome,\n\t\tchunkFailure,\n\t\tcandidate\n\t]);\n\treturn backgroundOutcome.then((result) => getParentSnapshot(candidate, result));\n}\nasync function getNotFoundBoundary(router, matches, indexed, signal, fallback = 0) {\n\tconst cause = indexed?.[1][1];\n\tlet index = cause?.routeId ? matches.findIndex((match) => match.routeId === cause.routeId) : indexed?.[0] ?? matches.length - 1;\n\tif (index < 0) index = 0;\n\tfor (let i = index; i >= 0; i--) {\n\t\tconst route = getRoute(router, matches[i]);\n\t\ttry {\n\t\t\tconst loading = loadRouteChunk(route, false);\n\t\t\tif (loading) await waitFor(loading, signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) throw cause;\n\t\t}\n\t\tif (route.options.notFoundComponent) return i;\n\t}\n\treturn cause?.routeId ? index : fallback;\n}\nfunction discardBackground(router, lane) {\n\tif (lane[2]) {\n\t\ttransferMatchResources(router, lane[2].map((task) => task[3]));\n\t\tlane[2] = void 0;\n\t}\n}\nasync function settleTasks(tasks, serialFailure, redirectTasks, gate) {\n\tlet loaderFailure;\n\ttry {\n\t\tawait Promise.all(tasks.map((task) => task[1].then(async (outcome) => {\n\t\t\tconst taskIndex = task[0];\n\t\t\tif (gate && taskIndex >= await gate) return;\n\t\t\tif (outcome[0] >= REDIRECTED) throw [taskIndex, outcome];\n\t\t\tif (!loaderFailure && outcome[0] !== SUCCESS) {\n\t\t\t\tloaderFailure = [taskIndex, outcome];\n\t\t\t\tawait Promise.all((redirectTasks ?? []).map((nextTask) => {\n\t\t\t\t\tif (nextTask[0] <= taskIndex) return;\n\t\t\t\t\treturn nextTask[1].then((nextOutcome) => {\n\t\t\t\t\t\tif (nextOutcome[0] === REDIRECTED) throw [nextTask[0], nextOutcome];\n\t\t\t\t\t});\n\t\t\t\t}));\n\t\t\t}\n\t\t})));\n\t} catch (cause) {\n\t\treturn cause;\n\t}\n\treturn serialFailure ?? loaderFailure;\n}\nfunction materializeRedirect(router, lane, route, outcome, options, failed) {\n\twhile (outcome[0] === REDIRECTED) {\n\t\tconst redirect = outcome[1];\n\t\tif (redirect.options.reloadDocument ? options[3] : options[1] >= 20) return outcome;\n\t\ttry {\n\t\t\tif (redirect.options.href && redirect.options.reloadDocument) {\n\t\t\t\trouter.resolveRedirect(redirect);\n\t\t\t\treturn outcome;\n\t\t\t}\n\t\t\treturn [\n\t\t\t\tREDIRECTED,\n\t\t\t\tredirect,\n\t\t\t\trouter.buildLocation({\n\t\t\t\t\t...redirect.options,\n\t\t\t\t\t_fromLocation: lane[0],\n\t\t\t\t\t_includeValidateSearch: true\n\t\t\t\t})\n\t\t\t];\n\t\t} catch (cause) {\n\t\t\toutcome = failed ? [ERROR, cause] : normalizeError(route, cause);\n\t\t\tfailed = true;\n\t\t}\n\t}\n\treturn outcome;\n}\nasync function reduceLane(router, lane, tasks, controller, settlement, onReady) {\n\tconst matches = lane[1];\n\tlet failure = await settlement;\n\tlet redirectLimitExceeded = false;\n\tconst plannedBoundary = matches.findIndex((match) => match._notFound);\n\tconst boundaryOf = (found) => found[1][0] === NOT_FOUND ? getNotFoundBoundary(router, matches, found, controller.signal) : found[0];\n\tlet readinessEnd = plannedBoundary < 0 ? matches.length : plannedBoundary;\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) readinessEnd = 0;\n\telse if (failure) {\n\t\treadinessEnd = failure[2] ??= await boundaryOf(failure);\n\t\tfor (const task of tasks) {\n\t\t\tif (task[0] >= readinessEnd) break;\n\t\t\tconst outcome = await task[1];\n\t\t\tif (outcome[0] !== SUCCESS && outcome[0] < REDIRECTED && !(\"loaderData\" in matches[task[0]])) {\n\t\t\t\tfailure = [task[0], outcome];\n\t\t\t\treadinessEnd = failure[2] = await boundaryOf(failure);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tfor (const task of tasks) {\n\t\tif (task[0] >= readinessEnd) break;\n\t\tconst chunkFailure = await task[2];\n\t\tif (!chunkFailure) continue;\n\t\tfailure = chunkFailure;\n\t\tbreak;\n\t}\n\tif ((failure?.[1][0] ?? 0) >= REDIRECTED) {\n\t\tconst outcome = failure[1];\n\t\tif (outcome[0] !== REDIRECTED || outcome[1].options.reloadDocument || outcome[2]) {\n\t\t\tdiscardBackground(router, lane);\n\t\t\treturn outcome;\n\t\t}\n\t\tredirectLimitExceeded = true;\n\t\tfailure = [0, [ERROR, /* @__PURE__ */ new Error(\"Too many redirects\")]];\n\t}\n\tconst boundary = failure ? failure[2] ?? await boundaryOf(failure) : plannedBoundary;\n\tif (boundary >= 0) {\n\t\tconst outcome = failure?.[1];\n\t\tconst kind = outcome?.[0];\n\t\tconst match = matches[boundary];\n\t\tconst cause = outcome?.[1];\n\t\tconst install = () => {\n\t\t\tif (outcome) {\n\t\t\t\tmatch._notFound = void 0;\n\t\t\t\tif (kind === ERROR) match.status = \"error\";\n\t\t\t\telse {\n\t\t\t\t\tcause.routeId = match.routeId;\n\t\t\t\t\tif (match.routeId === router.routeTree.id) {\n\t\t\t\t\t\tmatch.status = \"success\";\n\t\t\t\t\t\tmatch._notFound = true;\n\t\t\t\t\t} else match.status = \"notFound\";\n\t\t\t\t}\n\t\t\t\tmatch.error = cause;\n\t\t\t\tmatch.isFetching = false;\n\t\t\t}\n\t\t};\n\t\tinstall();\n\t\tif (!outcome) onReady?.();\n\t\tconst route = getRoute(router, match);\n\t\ttry {\n\t\t\tawait waitFor(outcome ? Promise.resolve().then(() => loadRouteChunk(route, kind === ERROR ? \"errorComponent\" : \"notFoundComponent\")) : Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]), controller.signal);\n\t\t} catch (cause) {\n\t\t\tif (cause === controller.signal && controller.signal.aborted) {\n\t\t\t\tdiscardBackground(router, lane);\n\t\t\t\treturn CANCELED_OUTCOME;\n\t\t\t}\n\t\t}\n\t\tif (!outcome) match.status = \"success\";\n\t\telse if (redirectLimitExceeded) {\n\t\t\tcontroller.abort();\n\t\t\tawait Promise.all([\n\t\t\t\t...tasks.map((task) => task[1]),\n\t\t\t\t...tasks.map((task) => task[2]),\n\t\t\t\t...(lane[2] ?? []).map((task) => task[1])\n\t\t\t]);\n\t\t\tdiscardBackground(router, lane);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tinstall();\n\t\t}\n\t}\n\treturn lane;\n}\nasync function projectLane(router, lane, signal, start = 0, end = lane[1].length) {\n\tconst matches = lane[1];\n\tfor (let index = start; index < end; index++) {\n\t\tconst match = matches[index];\n\t\tconst routeOptions = getRoute(router, match).options;\n\t\tif (routeOptions.head || routeOptions.scripts) try {\n\t\t\tconst context = {\n\t\t\t\tssr: router.options.ssr,\n\t\t\t\tmatches,\n\t\t\t\tmatch,\n\t\t\t\tparams: match.params,\n\t\t\t\tloaderData: match.loaderData\n\t\t\t};\n\t\t\tconst [head, scripts] = await waitFor(Promise.all([routeOptions.head?.(context), routeOptions.scripts?.(context)]), signal);\n\t\t\tmatch.meta = head?.meta;\n\t\t\tmatch.links = head?.links;\n\t\t\tmatch.headScripts = head?.scripts;\n\t\t\tmatch.styles = head?.styles;\n\t\t\tmatch.scripts = scripts;\n\t\t} catch (cause) {\n\t\t\tif (cause === signal && signal.aborted) break;\n\t\t\tconsole.error(cause);\n\t\t}\n\t\tif (match.status !== \"success\" || match._notFound) break;\n\t}\n\treturn lane;\n}\nasync function executeClientLane(router, location, matches, options) {\n\tconst matched = [location, matches];\n\tconst signal = options[0].signal;\n\tlet reduced;\n\ttry {\n\t\tconst presented = router.stores.matches.get();\n\t\tlet plannedBoundary = matches.findIndex((match) => match._notFound);\n\t\tif (router.options.notFoundMode !== \"root\" && plannedBoundary >= 0) {\n\t\t\tconst boundary = await getNotFoundBoundary(router, matched[1], void 0, signal, plannedBoundary);\n\t\t\tif (boundary !== plannedBoundary) {\n\t\t\t\tmatches[plannedBoundary]._notFound = void 0;\n\t\t\t\tmatches[boundary]._notFound = true;\n\t\t\t}\n\t\t\tplannedBoundary = boundary;\n\t\t}\n\t\tlet end = plannedBoundary < 0 ? matches.length : plannedBoundary + 1;\n\t\tlet retainedEnd = 0;\n\t\twhile (retainedEnd < end && retainedEnd !== plannedBoundary) {\n\t\t\tconst match = matches[retainedEnd];\n\t\t\tconst committed = options[2][retainedEnd];\n\t\t\tconst visible = presented[retainedEnd];\n\t\t\tif (committed?.id !== match.id || committed.status !== \"success\" || committed._notFound || match.preload || visible?.id !== match.id || visible.status !== \"success\" || visible._notFound) break;\n\t\t\tretainedEnd++;\n\t\t}\n\t\tconst tasks = [];\n\t\tconst start = options[6] ?? 0;\n\t\tlet semanticParent = start ? Promise.resolve(matched[1][start - 1]) : void 0;\n\t\tconst planSuccessfulLane = () => {\n\t\t\tfor (let index = start; index < end; index++) {\n\t\t\t\tif (signal.aborted) break;\n\t\t\t\tsemanticParent = createLoaderTask(router, matched, index, tasks, semanticParent, options, retainedEnd);\n\t\t\t}\n\t\t};\n\t\tconst failure = await contextualize(router, matched, options, end, planSuccessfulLane, retainedEnd);\n\t\tif (failure) {\n\t\t\toptions[4] = true;\n\t\t\tend = failure[0];\n\t\t\tif (failure[1][0] === NOT_FOUND) {\n\t\t\t\tconst boundary = await getNotFoundBoundary(router, matched[1], failure, signal);\n\t\t\t\tfailure[2] = boundary;\n\t\t\t\tend = Math.min(end, boundary + 1);\n\t\t\t} else if (failure[1][0] >= REDIRECTED) end = 0;\n\t\t\tplanSuccessfulLane();\n\t\t}\n\t\tif (!signal.aborted && !options[3]) {\n\t\t\tconst abort = [];\n\t\t\tfor (const [id, flight] of router._flights ?? []) if (!flight[2]) {\n\t\t\t\trouter._flights.delete(id);\n\t\t\t\tabort.push(flight[1]);\n\t\t\t}\n\t\t\tfor (const controller of abort) controller.abort();\n\t\t}\n\t\tconst reduction = reduceLane(router, matched, tasks, options[0], settleTasks(tasks, failure, matched[2]), options[7]);\n\t\tif (matched[2]?.length) matched[3] = settleTasks(matched[2], void 0, void 0, reduction.then((foreground) => isControl(foreground) ? 0 : _getRenderedMatches(foreground[1]).length, () => 0));\n\t\treduced = await reduction;\n\t} catch (cause) {\n\t\tdiscardBackground(router, matched);\n\t\tif (cause === signal && signal.aborted) return CANCELED_OUTCOME;\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) return reduced;\n\treturn projectLane(router, reduced, signal, options[6] === reduced[1].length ? options[6] : 0);\n}\n/**\n* Waits for `pendingMs`, then presents the complete lane. Rendering applies the\n* selected boundary cutoff while retaining every match's structural state.\n* A replacement load for the same match keeps the timer; choosing a different\n* match resets it. `pendingMinMs` starts after the fallback renders.\n*/\nfunction offerPending(router, tx) {\n\tif (router._tx !== tx) return;\n\tconst matches = tx[3];\n\tconst presented = router.stores.matches.get();\n\tlet session = router._pending;\n\tfor (let index = 0; index < matches.length; index++) {\n\t\tconst match = matches[index];\n\t\tconst success = match.status === \"success\" && !match._notFound;\n\t\tconst presentedPending = presented[index]?.id === match.id && presented[index]?.status === \"pending\";\n\t\tif (success && !presentedPending) continue;\n\t\tconst route = getRoute(router, match);\n\t\tconst delay = success && presentedPending || match.invalid ? 0 : route.options.pendingMs ?? router.options.defaultPendingMs;\n\t\tconst component = route.options.pendingComponent ?? router.options.defaultPendingComponent;\n\t\tif (!component || typeof delay !== \"number\" || delay === Infinity) {\n\t\t\tif (session) {\n\t\t\t\tsession[0] = tx;\n\t\t\t\tsession[2] = 0;\n\t\t\t\tsession[4] = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst min = route.options.pendingMinMs ?? router.options.defaultPendingMinMs ?? 0;\n\t\tlet tookOver = false;\n\t\tif (session?.[1] === match.id) {\n\t\t\ttookOver = session[0] !== tx;\n\t\t\tsession[0] = tx;\n\t\t} else {\n\t\t\tclearTimeout(session?.[3]);\n\t\t\trouter._pending = session = void 0;\n\t\t}\n\t\tif (!session) router._pending = session = [\n\t\t\ttx,\n\t\t\tmatch.id,\n\t\t\tpresentedPending ? Date.now() + min : tx[4] + delay,\n\t\t\tvoid 0,\n\t\t\tpresentedPending || void 0,\n\t\t\tcomponent\n\t\t];\n\t\tif (session[4] && !tookOver && session[5] === component) return;\n\t\tsession[5] = component;\n\t\tif (!session[4]) {\n\t\t\tclearTimeout(session[3]);\n\t\t\tconst remaining = session[2] - Date.now();\n\t\t\tif (remaining > 0) {\n\t\t\t\tsession[3] = setTimeout(() => offerPending(router, tx), remaining);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsession[2] = 0;\n\t\t}\n\t\tconst offered = matches.map((match) => ({\n\t\t\t...match,\n\t\t\t_flight: void 0\n\t\t}));\n\t\toffered[index].status = \"pending\";\n\t\tconst ack = session[4] = router.startTransition(() => router.stores.setMatches(offered), offered).then((rendered) => {\n\t\t\tif (rendered && router._pending === session && session[4] === ack && !session[2]) session[2] = Date.now() + min;\n\t\t\treturn rendered;\n\t\t});\n\t\treturn;\n\t}\n}\n/**\n* Cancels pending UI timing unless the current successor can take over the\n* same boundary that remains painted.\n*/\nfunction finishPending(router, tx) {\n\tconst session = router._pending;\n\tif (router._tx === tx || !router._tx?.[3].some((match) => match.id === session?.[1])) {\n\t\tclearTimeout(session?.[3]);\n\t\trouter._pending = void 0;\n\t}\n}\nasync function awaitPendingMinimum(router, tx) {\n\tconst session = router._pending;\n\tif (!session) return;\n\tclearTimeout(session[3]);\n\tconst remaining = session[2] - Date.now();\n\tif (!session[4] || remaining <= 0 || !_getRenderedMatches(tx[3]).some((match) => match.id === session[1])) return;\n\tlet timer;\n\ttry {\n\t\tawait waitFor(new Promise((resolve) => {\n\t\t\ttimer = setTimeout(resolve, remaining);\n\t\t}), tx[0].signal);\n\t} catch {}\n\tclearTimeout(timer);\n}\nfunction publishMatches(router, matches) {\n\trouter._committed = matches;\n\trouter.stores.setMatches(matches);\n}\nfunction commitMatches(router, tx, matches, resolvedPrefix) {\n\tconst previous = router._committed;\n\tconst previousCached = router._cache;\n\tfor (const match of matches) {\n\t\tmatch.preload = false;\n\t\tif (resolvedPrefix) match._assetEnd = void 0;\n\t}\n\tconst cut = _getRenderedMatches(matches).length;\n\tconst cached = /* @__PURE__ */ new Map();\n\tif (process.env.NODE_ENV === \"production\" || !tx[6]) {\n\t\tconst now = Date.now();\n\t\tfor (const match of [...previous, ...previousCached.values()]) {\n\t\t\tif (match.status !== \"success\" || matches.some((candidate, index) => candidate.id === match.id && (index < cut || candidate.status === \"success\"))) continue;\n\t\t\tconst route = getRoute(router, match);\n\t\t\tif (!route.options.loader || now - match.updatedAt >= (match.preload ? route.options.preloadGcTime ?? router.options.defaultPreloadGcTime ?? 3e5 : route.options.gcTime ?? router.options.defaultGcTime ?? 3e5)) continue;\n\t\t\tcached.set(match.id, previousCached.get(match.id) === match ? match : {\n\t\t\t\t...match,\n\t\t\t\t_flight: void 0,\n\t\t\t\tisFetching: false,\n\t\t\t\tcontext: {}\n\t\t\t});\n\t\t}\n\t}\n\ttx[3] = [];\n\trouter._cache = cached;\n\tpublishMatches(router, matches);\n\ttransferMatchResources(router, [...previousCached.values(), ...previous], [...matches, ...cached.values()]);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst handoff = tx[6]?.[0];\n\t\tif (handoff && router._handoff === handoff) handoff[1]();\n\t}\n\trunRouteLifecycle(router, previous, matches, tx);\n}\nasync function awaitCurrent(router, owner) {\n\tlet current = router._tx;\n\twhile (current && current !== owner) {\n\t\tawait current[5];\n\t\tif (router._tx === current) return;\n\t\tcurrent = router._tx;\n\t}\n}\nasync function followRedirect(router, tx, outcome) {\n\tconst redirect = outcome[1];\n\tconst location = outcome[2];\n\tif (!location) {\n\t\tawait router.navigate({\n\t\t\t...redirect.options,\n\t\t\treplace: true,\n\t\t\tignoreBlocker: true\n\t\t});\n\t\treturn;\n\t}\n\tif (redirect.options.reloadDocument) {\n\t\tawait router.navigate({\n\t\t\thref: location.publicHref,\n\t\t\treloadDocument: true,\n\t\t\treplace: true,\n\t\t\tignoreBlocker: true\n\t\t});\n\t\treturn;\n\t}\n\tlocation._redirects = tx[1] + 1;\n\trouter._pendingLocation = location;\n\tconst committed = router.commitLocation({\n\t\t...location,\n\t\tviewTransition: redirect.options.viewTransition,\n\t\treplace: true,\n\t\tresetScroll: redirect.options.resetScroll,\n\t\thashScrollIntoView: redirect.options.hashScrollIntoView,\n\t\tignoreBlocker: true\n\t});\n\tqueueMicrotask(() => {\n\t\tif (router._pendingLocation === location) router._pendingLocation = void 0;\n\t});\n\tawait committed;\n}\nasync function runBackground(router, tx, base, tasks, settlement) {\n\tconst next = base.map((match) => ({ ...match }));\n\tacquireMatchResources(next);\n\tfor (const task of tasks) {\n\t\treleaseFlight(router, next[task[0]]);\n\t\tnext[task[0]] = task[3];\n\t}\n\tconst lane = [tx[2], next];\n\tlet reduced;\n\ttry {\n\t\treduced = await reduceLane(router, lane, tasks, tx[0], settlement);\n\t} catch (cause) {\n\t\ttransferMatchResources(router, next);\n\t\tthrow cause;\n\t}\n\tif (isControl(reduced)) {\n\t\ttransferMatchResources(router, next);\n\t\tif (reduced[0] === REDIRECTED && router._tx === tx && router._committed === base) await followRedirect(router, tx, reduced);\n\t\treturn;\n\t}\n\tconst projected = await projectLane(router, reduced, tx[0].signal);\n\tif (router._tx !== tx || router._committed !== base) {\n\t\ttransferMatchResources(router, projected[1]);\n\t\treturn;\n\t}\n\tfor (const match of projected[1]) {\n\t\tconst cached = router._cache.get(match.id);\n\t\tif (cached?._flight && cached._flight === match._flight) {\n\t\t\trouter._cache.delete(match.id);\n\t\t\treleaseFlight(router, cached);\n\t\t}\n\t}\n\tpublishMatches(router, projected[1]);\n\ttransferMatchResources(router, base, projected[1]);\n}\nasync function runClientTransaction(router, tx, forceStaleReload, onReady, sync, resolvedPrefix) {\n\tconst options = [\n\t\ttx[0],\n\t\ttx[1],\n\t\trouter._committed,\n\t\tvoid 0,\n\t\tsync,\n\t\tforceStaleReload,\n\t\tresolvedPrefix,\n\t\tonReady\n\t];\n\tconst result = await executeClientLane(router, tx[2], tx[3], options);\n\tif (isControl(result)) {\n\t\tconst follow = result[0] === REDIRECTED && router._tx === tx;\n\t\tif (!follow || result[1].options.reloadDocument) finishPending(router, tx);\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tif (!follow) return;\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\treturn;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) router._refreshNextLoad = true;\n\t\tawait followRedirect(router, tx, result);\n\t\treturn;\n\t}\n\tif (router._tx !== tx) {\n\t\tfinishPending(router, tx);\n\t\ttransferMatchResources(router, result[1]);\n\t\tdiscardBackground(router, result);\n\t\treturn;\n\t}\n\tawait awaitPendingMinimum(router, tx);\n\tif (router._tx !== tx) {\n\t\tfinishPending(router, tx);\n\t\ttransferMatchResources(router, result[1]);\n\t\tdiscardBackground(router, result);\n\t\treturn;\n\t}\n\tconst toLocation = tx[2];\n\tconst changeInfo = getLocationChangeInfo(toLocation, router.stores.resolvedLocation.get());\n\tconst background = result[2];\n\tawait router.startViewTransition(async () => {\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\ttransferMatchResources(router, result[1]);\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tawait awaitPendingMinimum(router, tx);\n\t\tif (router._tx !== tx) {\n\t\t\tfinishPending(router, tx);\n\t\t\ttransferMatchResources(router, result[1]);\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tconst commit = () => {\n\t\t\tfinishPending(router, tx);\n\t\t\tcommitMatches(router, tx, result[1], resolvedPrefix);\n\t\t\tif (router._tx !== tx) return;\n\t\t\trouter.emit({\n\t\t\t\ttype: \"onLoad\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onBeforeRouteMount\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t};\n\t\tconst rendered = await router.startTransition(commit, result[1]);\n\t\tif (process.env.NODE_ENV !== \"production\" && tx[6]) tx[6] = void 0;\n\t\tif (router._tx !== tx) {\n\t\t\tdiscardBackground(router, result);\n\t\t\treturn;\n\t\t}\n\t\tif (background?.length) runBackground(router, tx, result[1], background, result[3]).catch(console.error);\n\t\trouter.batch(() => {\n\t\t\trouter.stores.resolvedLocation.set(toLocation);\n\t\t\trouter.stores.status.set(\"idle\");\n\t\t\tif (router._tx === tx) router.emit({\n\t\t\t\ttype: \"onResolved\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t\tif (rendered && router._tx === tx) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...changeInfo\n\t\t\t});\n\t\t});\n\t\tif (router._tx !== tx) return;\n\t\trouter._commitPromise?.resolve();\n\t\trouter._commitPromise = void 0;\n\t});\n}\nasync function loadClientRoute(router, opts) {\n\tlet rematerialize = false;\n\tif (process.env.NODE_ENV !== \"production\") rematerialize = !!router._refreshNextLoad || !!router._tx?.[6];\n\tconst previousOwner = router._tx;\n\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\tconst previousLocation = resolvedLocation ?? router.stores.location.get();\n\tconst location = router.latestLocation;\n\tconst pendingLocation = router._pendingLocation;\n\tconst redirects = pendingLocation?.href === location.href ? pendingLocation._redirects ?? 0 : 0;\n\tconst handoff = router._handoff;\n\tconst hydrationController = rematerialize ? void 0 : handoff?.[0]();\n\tconst preflight = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = preflight;\n\tif (!rematerialize && !hydrationController) handoff?.[1]();\n\tpreviousPreflight?.abort();\n\tif (preflight.signal.aborted) {\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\tconst changeInfo = getLocationChangeInfo(location, resolvedLocation);\n\trouter.emit({\n\t\ttype: \"onBeforeNavigate\",\n\t\t...changeInfo\n\t});\n\tif (!preflight.signal.aborted) router.emit({\n\t\ttype: \"onBeforeLoad\",\n\t\t...changeInfo\n\t});\n\tif (preflight.signal.aborted) {\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\tconst sameHref = previousLocation.href === location.href;\n\tlet controller = preflight;\n\tconst matches = process.env.NODE_ENV !== \"production\" && rematerialize ? router.matchRoutes(location, {\n\t\t_controller: preflight,\n\t\t_rematerialize: true\n\t}) : router.matchRoutes(location, { _controller: preflight });\n\tacquireMatchResources(matches);\n\tconst resolvedPrefix = hydrationController ? handoff[1](matches) : void 0;\n\tif (resolvedPrefix) controller = hydrationController;\n\telse hydrationController?.abort();\n\tif (preflight.signal.aborted) {\n\t\ttransferMatchResources(router, matches);\n\t\tawait awaitCurrent(router, previousOwner);\n\t\treturn;\n\t}\n\trouter._preflight = void 0;\n\tconst tx = [\n\t\tcontroller,\n\t\tredirects,\n\t\tlocation,\n\t\tmatches,\n\t\tDate.now(),\n\t\tPromise.resolve().then(() => runClientTransaction(router, tx, sameHref, () => offerPending(router, tx), opts?.sync, resolvedPrefix)).then()\n\t];\n\tif (process.env.NODE_ENV !== \"production\" && rematerialize) {\n\t\ttx[6] = [handoff];\n\t\trouter._refreshNextLoad = void 0;\n\t}\n\trouter._tx = tx;\n\tif (previousOwner) {\n\t\tfor (const match of router.stores.matches.get()) {\n\t\t\tif (router._tx !== tx) break;\n\t\t\tif (match.isFetching) setFetching(router, match, false);\n\t\t}\n\t\tpreviousOwner[0].abort();\n\t\ttransferMatchResources(router, previousOwner[3], tx[3], true);\n\t}\n\tif (router._tx !== tx) {\n\t\ttransferMatchResources(router, tx[3]);\n\t\ttx[3] = [];\n\t\tawait awaitCurrent(router, tx);\n\t\treturn;\n\t}\n\trouter.batch(() => {\n\t\trouter.stores.status.set(\"pending\");\n\t\trouter.stores.location.set(location);\n\t});\n\tif (resolvedPrefix || !router._committed.length && !matches.some((match) => match._notFound)) offerPending(router, tx);\n\tawait tx[5];\n\tawait awaitCurrent(router, tx);\n}\nasync function refreshClientRoute(router) {\n\tconst pending = router._tx;\n\tif (pending && !pending[6] && router.stores.status.get() === \"pending\") {\n\t\tawait pending[5];\n\t\tif (router._tx !== pending) await awaitCurrent(router, pending);\n\t}\n\trouter._flights?.clear();\n\trouter.clearCache();\n\trouter._refreshNextLoad = true;\n\tawait loadClientRoute(router, { sync: true });\n}\nasync function preloadClientRoute(router, opts, redirects = 0, builtLocation) {\n\tif (process.env.NODE_ENV !== \"production\" && (router._refreshNextLoad || router._tx?.[6])) return;\n\tconst location = builtLocation ?? router.buildLocation(opts);\n\tconst base = router._committed;\n\tconst controller = new AbortController();\n\tlet matches;\n\ttry {\n\t\tmatches = router.matchRoutes(location, { _controller: controller });\n\t\tacquireMatchResources(matches);\n\t} catch (cause) {\n\t\tcontroller.abort();\n\t\tif (!isNotFound(cause)) console.error(cause);\n\t\treturn;\n\t}\n\t(router._preloads ??= /* @__PURE__ */ new Map()).set(controller, matches);\n\tlet active;\n\ttry {\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await executeClientLane(router, location, matches, [\n\t\t\t\tcontroller,\n\t\t\t\tredirects,\n\t\t\t\tbase,\n\t\t\t\ttrue\n\t\t\t]);\n\t\t} finally {\n\t\t\tactive = router._preloads.delete(controller);\n\t\t\ttransferMatchResources(router, matches);\n\t\t\tcontroller.abort();\n\t\t}\n\t\tif (!isControl(result)) return result[1];\n\t\tif (active && result[0] === REDIRECTED && !result[1].options.reloadDocument) return preloadClientRoute(router, result[1].options, redirects + 1, result[2]);\n\t} catch (cause) {\n\t\tif (!isNotFound(cause)) console.error(cause);\n\t}\n}\nasync function hydrate(router) {\n\tif (process.env.NODE_ENV !== \"production\" && !window.$_TSR) throw new Error(\"Invariant failed: Expected to find bootstrap data on window.$_TSR, but we did not. Please file an issue!\");\n\tconst tsr = window.$_TSR;\n\tconst adapters = router.options.serializationAdapters;\n\tif (adapters?.length) {\n\t\ttsr.t = new Map(adapters.map((adapter) => [adapter.key, adapter.fromSerializable]));\n\t\ttsr.buffer.forEach((script) => script());\n\t}\n\ttsr.initialized = true;\n\tconst dehydratedRouter = tsr.router;\n\tif (process.env.NODE_ENV !== \"production\" && !dehydratedRouter) throw new Error(\"Invariant failed: Expected to find a dehydrated data on window.$_TSR.router, but we did not. Please file an issue!\");\n\trouter.ssr = { manifest: dehydratedRouter.manifest };\n\trouter.options.ssr = { nonce: document.querySelector(\"meta[property=\\\"csp-nonce\\\"]\")?.content };\n\tconst dehydratedMatches = dehydratedRouter.matches;\n\tconst controller = new AbortController();\n\tconst previousPreflight = router._preflight;\n\trouter._preflight = controller;\n\tpreviousPreflight?.abort();\n\tconst isCurrent = () => router._preflight === controller;\n\tlet location;\n\tlet candidates;\n\tlet handoffHistoryHref;\n\tlet handoffHistoryState;\n\ttry {\n\t\tawait waitFor(router.options.hydrate?.(dehydratedRouter.dehydratedData), controller.signal);\n\t\tif (!isCurrent()) return;\n\t\tconst historyLocation = router.history.location;\n\t\thandoffHistoryHref = historyLocation.href;\n\t\thandoffHistoryState = historyLocation.state;\n\t\trouter.updateLatestLocation();\n\t\tlocation = router.latestLocation;\n\t\trouter.stores.location.set(location);\n\t\tcandidates = router.matchRoutes(location, { _controller: controller });\n\t} catch (cause) {\n\t\tif (isCurrent()) router._preflight = void 0;\n\t\tcontroller.abort(cause);\n\t\tif (cause !== controller.signal) throw cause;\n\t}\n\tif (!isCurrent()) return;\n\tconst committed = [];\n\tlet pendingBoundary;\n\tlet verifiedAssetEnd = 0;\n\tconst retryFrom = (index) => {\n\t\tverifiedAssetEnd = Math.min(verifiedAssetEnd, index + 1);\n\t\tconst removed = committed.splice(index);\n\t\tfor (const match of removed) if (getRoute(router, match).options.loader && (match.status === \"success\" || !match.invalid && \"loaderData\" in match)) cacheLoaderMatch(router, {\n\t\t\t...match,\n\t\t\tstatus: \"success\",\n\t\t\terror: void 0,\n\t\t\tpreload: true\n\t\t}, router._cache.get(match.id));\n\t\ttransferMatchResources(router, removed);\n\t};\n\tconst shared = dehydratedMatches.length > candidates.length ? candidates.findIndex((match) => match._notFound) + 1 : dehydratedMatches.length;\n\tlet isTerminal = false;\n\tfor (let index = 0; index < shared; index++) {\n\t\tconst candidate = candidates[index];\n\t\tconst dehydrated = dehydratedMatches[index];\n\t\tif (typeof dehydrated.i !== \"string\" || hydrateSsrMatchId(dehydrated.i) !== candidate.id) {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tverifiedAssetEnd = index + 1;\n\t\tconst route = getRoute(router, candidate);\n\t\tif (\"l\" in dehydrated || dehydrated.s === \"success\" && dehydrated.e === void 0 && route.options.loader) candidate.loaderData = dehydrated.l;\n\t\tcandidate.status = dehydrated.s;\n\t\tcandidate.ssr = dehydrated.ssr;\n\t\troute.options.ssr = candidate.ssr;\n\t\tcandidate.updatedAt = dehydrated.u;\n\t\tcandidate.error = dehydrated.e;\n\t\tcandidate._notFound ||= dehydrated.g;\n\t\tif (candidate.status === \"error\" || candidate.status === \"notFound\" || candidate._notFound) {\n\t\t\tisTerminal = true;\n\t\t\tcommitted.push(candidate);\n\t\t\tif (candidate.ssr === false || candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tif (candidate.status === \"pending\") {\n\t\t\tpendingBoundary ??= index;\n\t\t\tbreak;\n\t\t}\n\t\tcommitted.push(candidate);\n\t\tif (candidate.ssr === \"data-only\") pendingBoundary ??= index;\n\t}\n\tif (!isTerminal && committed.length === shared && shared < candidates.length) pendingBoundary = shared;\n\tconst chunks = committed.map(async (match) => {\n\t\ttry {\n\t\t\tconst route = getRoute(router, match);\n\t\t\tif (match._notFound) await Promise.all([loadRouteChunk(route), loadRouteChunk(route, \"notFoundComponent\")]);\n\t\t\telse await loadRouteChunk(route, match.status === \"error\" ? \"errorComponent\" : match.status === \"notFound\" ? \"notFoundComponent\" : void 0);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t});\n\tlet chunkFailure = 0;\n\ttry {\n\t\twhile (chunkFailure < chunks.length && await waitFor(chunks[chunkFailure], controller.signal)) chunkFailure++;\n\t} catch {\n\t\treturn;\n\t}\n\tif (!isCurrent()) return;\n\tif (chunkFailure < committed.length) retryFrom(chunkFailure);\n\tconst contextEnd = Math.max(pendingBoundary === committed.length ? committed.length + 1 : committed.length, chunkFailure < chunks.length ? chunkFailure : verifiedAssetEnd);\n\tfor (let index = 0; index < contextEnd; index++) {\n\t\tconst match = candidates[index];\n\t\tconst route = getRoute(router, match);\n\t\tconst parentContext = candidates[index - 1]?.context ?? router.options.context ?? {};\n\t\tlet routeContext;\n\t\tif (route.options.context) {\n\t\t\ttry {\n\t\t\t\trouteContext = match._ctx = route.options.context({\n\t\t\t\t\tdeps: match.loaderDeps,\n\t\t\t\t\tparams: match.params,\n\t\t\t\t\tcontext: parentContext,\n\t\t\t\t\tlocation,\n\t\t\t\t\tnavigate: (opts) => router.navigate({\n\t\t\t\t\t\t...opts,\n\t\t\t\t\t\t_fromLocation: location\n\t\t\t\t\t}),\n\t\t\t\t\tbuildLocation: router.buildLocation,\n\t\t\t\t\tcause: match.cause,\n\t\t\t\t\tabortController: controller,\n\t\t\t\t\tpreload: false,\n\t\t\t\t\tmatches: candidates,\n\t\t\t\t\trouteId: route.id\n\t\t\t\t}) || {};\n\t\t\t} catch {\n\t\t\t\tif (!isCurrent()) return;\n\t\t\t\tif (match.status !== \"error\" && match.status !== \"notFound\" && !match._notFound) {\n\t\t\t\t\tretryFrom(index);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!isCurrent()) return;\n\t\t}\n\t\tmatch.context = {\n\t\t\t...parentContext,\n\t\t\t...routeContext,\n\t\t\t...committed[index] && dehydratedMatches[index].b\n\t\t};\n\t}\n\tawait projectLane(router, [location, candidates], controller.signal, 0, verifiedAssetEnd);\n\tif (!isCurrent()) return;\n\tconst needsClientLoad = pendingBoundary !== void 0 || committed.length < shared;\n\tconst committedMatches = isTerminal && committed.length === shared ? candidates : committed;\n\tlet presented = needsClientLoad ? candidates : committedMatches;\n\tlet dataOnlyAssetEnd;\n\tif (needsClientLoad && pendingBoundary !== void 0) {\n\t\tconst boundary = presented[pendingBoundary];\n\t\tdataOnlyAssetEnd = boundary.ssr === \"data-only\" && verifiedAssetEnd > pendingBoundary + 1 ? verifiedAssetEnd : void 0;\n\t\tpresented = presented.slice();\n\t\tpresented[pendingBoundary] = {\n\t\t\t...boundary,\n\t\t\tstatus: \"pending\",\n\t\t\tssr: boundary.ssr === \"data-only\" ? \"data-only\" : false,\n\t\t\t_assetEnd: dataOnlyAssetEnd\n\t\t};\n\t}\n\tconst claim = () => {\n\t\tconst historyLocation = router.history.location;\n\t\treturn needsClientLoad && !router._tx && historyLocation.href === handoffHistoryHref && historyLocation.state === handoffHistoryState && router._committed === committedMatches && committedMatches.length && !controller.signal.aborted ? controller : void 0;\n\t};\n\tconst handoff = [claim, (matches) => {\n\t\tif (router._handoff !== handoff) return;\n\t\trouter._handoff = void 0;\n\t\tconst prefix = committedMatches.length;\n\t\tif (!matches || !claim() || committedMatches.some((match, index) => match.id !== matches[index]?.id)) {\n\t\t\tcontroller.abort();\n\t\t\treturn;\n\t\t}\n\t\tlet handoffAssetEnd = dataOnlyAssetEnd;\n\t\tif (handoffAssetEnd !== void 0) {\n\t\t\tfor (let index = prefix; index < handoffAssetEnd; index++) if (candidates[index]?.id !== matches[index]?.id) {\n\t\t\t\thandoffAssetEnd = index > pendingBoundary + 1 ? index : void 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconst clones = committedMatches.map((match) => ({ ...match }));\n\t\tif (handoffAssetEnd !== void 0) clones[pendingBoundary]._assetEnd = handoffAssetEnd;\n\t\ttransferMatchResources(router, matches.splice(0, prefix, ...clones));\n\t\tfor (let index = prefix; index < matches.length; index++) {\n\t\t\tconst match = matches[index];\n\t\t\tconst hydrated = candidates[index];\n\t\t\tif (hydrated?.id === match.id && hydrated._ctx) match._ctx = hydrated._ctx;\n\t\t\tmatch.abortController = controller;\n\t\t}\n\t\treturn prefix;\n\t}];\n\trouter._committed = committedMatches;\n\trouter._handoff = handoff;\n\trouter._preflight = void 0;\n\trouter.batch(() => {\n\t\trouter.stores.setMatches(presented);\n\t\trouter.stores.status.set(\"idle\");\n\t\tif (!needsClientLoad) router.stores.resolvedLocation.set(router.stores.location.get());\n\t});\n}\n//#endregion\nexport { _getAssetMatches, _getRenderedMatches, hydrate, loadClientRoute, loadRouteChunk, preloadClientRoute, refreshClientRoute, replaceRouteChunk };\n\n//# sourceMappingURL=load-client.js.map","import { defaultSerializeError } from \"./router.js\";\n//#region src/defer.ts\n/**\n* Well-known symbol used by {@link defer} to tag a promise with\n* its deferred state. Consumers can read `promise[TSR_DEFERRED_PROMISE]`\n* to access `status`, `data`, or `error`.\n*/\nconst TSR_DEFERRED_PROMISE = Symbol.for(\"TSR_DEFERRED_PROMISE\");\n/**\n* Wrap a promise with a deferred state for use with `<Await>` and `useAwaited`.\n*\n* The returned promise is augmented with internal state (status/data/error)\n* so UI can read progress or suspend until it settles.\n*\n* @param _promise The promise to wrap.\n* @param options Optional config. Provide `serializeError` to customize how\n* errors are serialized for transfer.\n* @returns The same promise with attached deferred metadata.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/deferFunction\n*/\nfunction defer(_promise, options) {\n\tconst promise = _promise;\n\tif (promise[TSR_DEFERRED_PROMISE]) return promise;\n\tpromise[TSR_DEFERRED_PROMISE] = { status: \"pending\" };\n\tpromise.then((data) => {\n\t\tpromise[TSR_DEFERRED_PROMISE].status = \"success\";\n\t\tpromise[TSR_DEFERRED_PROMISE].data = data;\n\t}).catch((error) => {\n\t\tpromise[TSR_DEFERRED_PROMISE].status = \"error\";\n\t\tpromise[TSR_DEFERRED_PROMISE].error = {\n\t\t\tdata: (options?.serializeError ?? defaultSerializeError)(error),\n\t\t\t__isServerError: true\n\t\t};\n\t});\n\treturn promise;\n}\n//#endregion\nexport { TSR_DEFERRED_PROMISE, defer };\n\n//# sourceMappingURL=defer.js.map","//#region src/link.ts\nconst preloadWarning = \"Error preloading route! ☝️\";\n//#endregion\nexport { preloadWarning };\n\n//# sourceMappingURL=link.js.map","//#region src/manifest.ts\nconst DEV_STYLES_ATTR = \"data-tanstack-router-dev-styles\";\nfunction getAssetCrossOrigin(assetCrossOrigin, kind) {\n\tif (!assetCrossOrigin) return;\n\tif (typeof assetCrossOrigin === \"string\") return assetCrossOrigin;\n\treturn assetCrossOrigin[kind];\n}\nfunction getManifestScriptFormat(manifest) {\n\treturn manifest?.scriptFormat ?? \"module\";\n}\nfunction getScriptPreloadAttrs(manifest, link, assetCrossOrigin) {\n\tconst preloadLink = resolveManifestAssetLink(link);\n\tconst crossOrigin = getAssetCrossOrigin(assetCrossOrigin, \"script\") ?? preloadLink.crossOrigin;\n\treturn {\n\t\t...getManifestScriptFormat(manifest) === \"iife\" ? {\n\t\t\trel: \"preload\",\n\t\t\tas: \"script\"\n\t\t} : { rel: \"modulepreload\" },\n\t\thref: preloadLink.href,\n\t\t...crossOrigin ? { crossOrigin } : {}\n\t};\n}\nfunction resolveManifestAssetLink(link) {\n\tif (typeof link === \"string\") return {\n\t\thref: link,\n\t\tcrossOrigin: void 0\n\t};\n\treturn link;\n}\nfunction appendUniqueUserTags(target, tags) {\n\tif (tags.length === 0) return;\n\tif (tags.length === 1) {\n\t\ttarget.push(tags[0]);\n\t\treturn;\n\t}\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const tag of tags) {\n\t\tconst key = JSON.stringify(tag);\n\t\tif (seen.has(key)) continue;\n\t\tseen.add(key);\n\t\ttarget.push(tag);\n\t}\n}\nfunction getStylesheetHref(asset) {\n\treturn resolveManifestCssLink(asset).href;\n}\nfunction resolveManifestCssLink(link) {\n\tif (typeof link === \"string\") return {\n\t\thref: link,\n\t\tcrossOrigin: void 0\n\t};\n\treturn link;\n}\nfunction createInlineCssStyleAsset(css) {\n\treturn {\n\t\tattrs: { suppressHydrationWarning: true },\n\t\tchildren: css\n\t};\n}\nfunction createInlineCssPlaceholderAsset() {\n\treturn { attrs: { suppressHydrationWarning: true } };\n}\n//#endregion\nexport { DEV_STYLES_ATTR, appendUniqueUserTags, createInlineCssPlaceholderAsset, createInlineCssStyleAsset, getAssetCrossOrigin, getManifestScriptFormat, getScriptPreloadAttrs, getStylesheetHref, resolveManifestAssetLink, resolveManifestCssLink };\n\n//# sourceMappingURL=manifest.js.map","import { invariant } from \"./invariant.js\";\nimport { joinPaths, trimPathLeft, trimPathRight } from \"./path.js\";\nimport { notFound } from \"./not-found.js\";\nimport { rootRouteId } from \"./root.js\";\nimport { redirect } from \"./redirect.js\";\n//#region src/route.ts\nvar BaseRoute = class {\n\tget to() {\n\t\treturn this._to;\n\t}\n\tget id() {\n\t\treturn this._id;\n\t}\n\tget path() {\n\t\treturn this._path;\n\t}\n\tget fullPath() {\n\t\treturn this._fullPath;\n\t}\n\tconstructor(options) {\n\t\tthis.init = (opts) => {\n\t\t\tthis.originalIndex = opts.originalIndex;\n\t\t\tconst options = this.options;\n\t\t\tconst isRoot = !options?.path && !options?.id;\n\t\t\tthis.parentRoute = this.options.getParentRoute?.();\n\t\t\tif (isRoot) this._path = rootRouteId;\n\t\t\telse if (!this.parentRoute) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\tlet path = isRoot ? rootRouteId : options?.path;\n\t\t\tif (path && path !== \"/\") path = trimPathLeft(path);\n\t\t\tconst customId = options?.id || path;\n\t\t\tlet id = isRoot ? rootRouteId : joinPaths([this.parentRoute.id === \"__root__\" ? \"\" : this.parentRoute.id, customId]);\n\t\t\tif (path === \"__root__\") path = \"/\";\n\t\t\tif (id !== \"__root__\") id = joinPaths([\"/\", id]);\n\t\t\tconst fullPath = id === \"__root__\" ? \"/\" : joinPaths([this.parentRoute.fullPath, path]);\n\t\t\tthis._path = path;\n\t\t\tthis._id = id;\n\t\t\tthis._fullPath = fullPath;\n\t\t\tthis._to = trimPathRight(fullPath);\n\t\t};\n\t\tthis.addChildren = (children) => {\n\t\t\treturn this._addFileChildren(children);\n\t\t};\n\t\tthis._addFileChildren = (children) => {\n\t\t\tif (Array.isArray(children)) this.children = children;\n\t\t\tif (typeof children === \"object\" && children !== null) this.children = Object.values(children);\n\t\t\treturn this;\n\t\t};\n\t\tthis._addFileTypes = () => {\n\t\t\treturn this;\n\t\t};\n\t\tthis.updateLoader = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.update = (options) => {\n\t\t\tObject.assign(this.options, options);\n\t\t\treturn this;\n\t\t};\n\t\tthis.lazy = (lazyFn) => {\n\t\t\tthis.lazyFn = lazyFn;\n\t\t\treturn this;\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.fullPath,\n\t\t\t...opts\n\t\t});\n\t\tthis.options = options || {};\n\t\tthis.isRoot = !options?.getParentRoute;\n\t\tif (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);\n\t}\n};\nvar BaseRouteApi = class {\n\tconstructor({ id }) {\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.redirect = (opts) => redirect({\n\t\t\tfrom: this.id,\n\t\t\t...opts\n\t\t});\n\t\tthis.id = id;\n\t}\n};\nvar BaseRootRoute = class extends BaseRoute {\n\tconstructor(options) {\n\t\tsuper(options);\n\t}\n};\n//#endregion\nexport { BaseRootRoute, BaseRoute, BaseRouteApi };\n\n//# sourceMappingURL=route.js.map","import { reactUse } from \"./utils.js\";\nimport { TSR_DEFERRED_PROMISE, defer } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/awaited.tsx\n/** Suspend until a deferred promise resolves or rejects and return its data. */\nfunction useAwaited({ promise: _promise }) {\n\tif (reactUse) return reactUse(_promise);\n\tconst promise = defer(_promise);\n\tif (promise[TSR_DEFERRED_PROMISE].status === \"pending\") throw promise;\n\tif (promise[TSR_DEFERRED_PROMISE].status === \"error\") throw promise[TSR_DEFERRED_PROMISE].error;\n\treturn promise[TSR_DEFERRED_PROMISE].data;\n}\n/**\n* Component that suspends on a deferred promise and renders its child with\n* the resolved value. Optionally provides a Suspense fallback.\n*/\nfunction Await(props) {\n\tconst inner = /* @__PURE__ */ jsx(AwaitInner, { ...props });\n\tif (props.fallback) return /* @__PURE__ */ jsx(React$1.Suspense, {\n\t\tfallback: props.fallback,\n\t\tchildren: inner\n\t});\n\treturn inner;\n}\nfunction AwaitInner(props) {\n\tconst data = useAwaited(props);\n\treturn props.children(data);\n}\n//#endregion\nexport { Await, useAwaited };\n\n//# sourceMappingURL=awaited.js.map","\"use client\";\nimport * as React$1 from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/nonRouteComponentContext.tsx\nvar nonRouteComponentContext = process.env.NODE_ENV !== \"production\" ? React$1.createContext(void 0) : void 0;\nfunction wrapInNonRouteComponentContext(element, component) {\n\treturn /* @__PURE__ */ jsx(nonRouteComponentContext.Provider, {\n\t\tvalue: component,\n\t\tchildren: element\n\t});\n}\n//#endregion\nexport { nonRouteComponentContext, wrapInNonRouteComponentContext };\n\n//# sourceMappingURL=nonRouteComponentContext.js.map","\"use client\";\nimport { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport * as React$1 from \"react\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\n//#region src/CatchBoundary.tsx\nvar CatchBoundary = class extends React$1.Component {\n\tconstructor(..._args) {\n\t\tsuper(..._args);\n\t\tthis.state = { error: null };\n\t\tthis.reset = () => {\n\t\t\tthis.setState({ error: null });\n\t\t};\n\t}\n\tstatic getDerivedStateFromProps(props, state) {\n\t\tconst resetKey = props.getResetKey();\n\t\tif (state.error && state.resetKey !== resetKey) return {\n\t\t\tresetKey,\n\t\t\terror: null\n\t\t};\n\t\treturn { resetKey };\n\t}\n\tstatic getDerivedStateFromError(error) {\n\t\treturn { error };\n\t}\n\tcomponentDidCatch(error, errorInfo) {\n\t\tthis.props.onCatch?.(error, errorInfo);\n\t}\n\trender() {\n\t\tconst error = this.state.error;\n\t\tif (error) {\n\t\t\tconst element = React$1.createElement(this.props.errorComponent ?? ErrorComponent, {\n\t\t\t\terror,\n\t\t\t\treset: this.reset\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(element, \"errorComponent\") : element;\n\t\t}\n\t\treturn this.props.children;\n\t}\n};\nfunction ErrorComponent({ error }) {\n\tconst [show, setShow] = React$1.useState(process.env.NODE_ENV !== \"production\");\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tstyle: {\n\t\t\tpadding: \".5rem\",\n\t\t\tmaxWidth: \"100%\"\n\t\t},\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsxs(\"div\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tdisplay: \"flex\",\n\t\t\t\t\talignItems: \"center\",\n\t\t\t\t\tgap: \".5rem\"\n\t\t\t\t},\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(\"strong\", {\n\t\t\t\t\tstyle: { fontSize: \"1rem\" },\n\t\t\t\t\tchildren: \"Something went wrong!\"\n\t\t\t\t}), /* @__PURE__ */ jsx(\"button\", {\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tappearance: \"none\",\n\t\t\t\t\t\tfontSize: \".6em\",\n\t\t\t\t\t\tborder: \"1px solid currentColor\",\n\t\t\t\t\t\tpadding: \".1rem .2rem\",\n\t\t\t\t\t\tfontWeight: \"bold\",\n\t\t\t\t\t\tborderRadius: \".25rem\"\n\t\t\t\t\t},\n\t\t\t\t\tonClick: () => setShow((d) => !d),\n\t\t\t\t\tchildren: show ? \"Hide Error\" : \"Show Error\"\n\t\t\t\t})]\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"div\", { style: { height: \".25rem\" } }),\n\t\t\tshow ? /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(\"pre\", {\n\t\t\t\tstyle: {\n\t\t\t\t\tfontSize: \".7em\",\n\t\t\t\t\tborder: \"1px solid red\",\n\t\t\t\t\tborderRadius: \".25rem\",\n\t\t\t\t\tpadding: \".3rem\",\n\t\t\t\t\tcolor: \"red\",\n\t\t\t\t\toverflow: \"auto\"\n\t\t\t\t},\n\t\t\t\tchildren: error.message ? /* @__PURE__ */ jsx(\"code\", { children: error.message }) : null\n\t\t\t}) }) : null\n\t\t]\n\t});\n}\n//#endregion\nexport { CatchBoundary, ErrorComponent };\n\n//# sourceMappingURL=CatchBoundary.js.map","\"use client\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ClientOnly.tsx\n/**\n* Render the children only after the JS has loaded client-side. Use an optional\n* fallback component if the JS is not yet loaded.\n*\n* @example\n* Render a Chart component if JS loads, renders a simple FakeChart\n* component server-side or if there is no JS. The FakeChart can have only the\n* UI without the behavior or be a loading spinner or skeleton.\n*\n* ```tsx\n* return (\n* <ClientOnly fallback={<FakeChart />}>\n* <Chart />\n* </ClientOnly>\n* )\n* ```\n*/\nfunction ClientOnly({ children, fallback = null }) {\n\treturn /* @__PURE__ */ jsx(React.Fragment, { children: useHydrated() ? children : fallback });\n}\n/**\n* Return a boolean indicating if the JS has been hydrated already.\n* When doing Server-Side Rendering, the result will always be false.\n* When doing Client-Side Rendering, the result will always be false on the\n* first render and true from then on. Even if a new component renders it will\n* always start with true.\n*\n* @example\n* ```tsx\n* // Disable a button that needs JS to work.\n* let hydrated = useHydrated()\n* return (\n* <button type=\"button\" disabled={!hydrated} onClick={doSomethingCustom}>\n* Click me\n* </button>\n* )\n* ```\n* @returns True if the JS has been hydrated already, false otherwise.\n*/\nfunction useHydrated() {\n\treturn React.useSyncExternalStore(subscribe, () => true, () => false);\n}\nfunction subscribe() {\n\treturn () => {};\n}\n//#endregion\nexport { ClientOnly, useHydrated };\n\n//# sourceMappingURL=ClientOnly.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/routerContext.tsx\nvar routerContext = React$1.createContext(null);\n//#endregion\nexport { routerContext };\n\n//# sourceMappingURL=routerContext.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport * as React$1 from \"react\";\n//#region src/useRouter.tsx\n/**\n* Access the current TanStack Router instance from React context.\n* Must be used within a `RouterProvider`.\n*\n* Options:\n* - `warn`: Log a warning if no router context is found (default: true).\n*\n* @returns The registered router instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterHook\n*/\nfunction useRouter(opts) {\n\tconst value = React$1.useContext(routerContext);\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tif ((opts?.warn ?? true) && !value) console.warn(\"Warning: useRouter must be used inside a <RouterProvider> component!\");\n\t}\n\treturn value;\n}\n//#endregion\nexport { useRouter };\n\n//# sourceMappingURL=useRouter.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/matchContext.tsx\nvar matchContext = React$1.createContext(void 0);\nvar dummyMatchContext = React$1.createContext(void 0);\n//#endregion\nexport { dummyMatchContext, matchContext };\n\n//# sourceMappingURL=matchContext.js.map","var ReactiveFlags = /* @__PURE__ */ ((ReactiveFlags2) => {\n ReactiveFlags2[ReactiveFlags2[\"None\"] = 0] = \"None\";\n ReactiveFlags2[ReactiveFlags2[\"Mutable\"] = 1] = \"Mutable\";\n ReactiveFlags2[ReactiveFlags2[\"Watching\"] = 2] = \"Watching\";\n ReactiveFlags2[ReactiveFlags2[\"RecursedCheck\"] = 4] = \"RecursedCheck\";\n ReactiveFlags2[ReactiveFlags2[\"Recursed\"] = 8] = \"Recursed\";\n ReactiveFlags2[ReactiveFlags2[\"Dirty\"] = 16] = \"Dirty\";\n ReactiveFlags2[ReactiveFlags2[\"Pending\"] = 32] = \"Pending\";\n return ReactiveFlags2;\n})(ReactiveFlags || {});\n// @__NO_SIDE_EFFECTS__\nfunction createReactiveSystem({\n update,\n notify,\n unwatched\n}) {\n return {\n link,\n unlink,\n propagate,\n checkDirty,\n shallowPropagate\n };\n function link(dep, sub, version) {\n const prevDep = sub.depsTail;\n if (prevDep !== void 0 && prevDep.dep === dep) {\n return;\n }\n const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;\n if (nextDep !== void 0 && nextDep.dep === dep) {\n nextDep.version = version;\n sub.depsTail = nextDep;\n return;\n }\n const prevSub = dep.subsTail;\n if (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) {\n return;\n }\n const newLink = sub.depsTail = dep.subsTail = {\n version,\n dep,\n sub,\n prevDep,\n nextDep,\n prevSub,\n nextSub: void 0\n };\n if (nextDep !== void 0) {\n nextDep.prevDep = newLink;\n }\n if (prevDep !== void 0) {\n prevDep.nextDep = newLink;\n } else {\n sub.deps = newLink;\n }\n if (prevSub !== void 0) {\n prevSub.nextSub = newLink;\n } else {\n dep.subs = newLink;\n }\n }\n function unlink(link2, sub = link2.sub) {\n const dep = link2.dep;\n const prevDep = link2.prevDep;\n const nextDep = link2.nextDep;\n const nextSub = link2.nextSub;\n const prevSub = link2.prevSub;\n if (nextDep !== void 0) {\n nextDep.prevDep = prevDep;\n } else {\n sub.depsTail = prevDep;\n }\n if (prevDep !== void 0) {\n prevDep.nextDep = nextDep;\n } else {\n sub.deps = nextDep;\n }\n if (nextSub !== void 0) {\n nextSub.prevSub = prevSub;\n } else {\n dep.subsTail = prevSub;\n }\n if (prevSub !== void 0) {\n prevSub.nextSub = nextSub;\n } else if ((dep.subs = nextSub) === void 0) {\n unwatched(dep);\n }\n return nextDep;\n }\n function propagate(link2) {\n let next = link2.nextSub;\n let stack;\n top: do {\n const sub = link2.sub;\n let flags = sub.flags;\n if (!(flags & (4 | 8 | 16 | 32))) {\n sub.flags = flags | 32;\n } else if (!(flags & (4 | 8))) {\n flags = 0;\n } else if (!(flags & 4)) {\n sub.flags = flags & -9 | 32;\n } else if (!(flags & (16 | 32)) && isValidLink(link2, sub)) {\n sub.flags = flags | (8 | 32);\n flags &= 1;\n } else {\n flags = 0;\n }\n if (flags & 2) {\n notify(sub);\n }\n if (flags & 1) {\n const subSubs = sub.subs;\n if (subSubs !== void 0) {\n const nextSub = (link2 = subSubs).nextSub;\n if (nextSub !== void 0) {\n stack = { value: next, prev: stack };\n next = nextSub;\n }\n continue;\n }\n }\n if ((link2 = next) !== void 0) {\n next = link2.nextSub;\n continue;\n }\n while (stack !== void 0) {\n link2 = stack.value;\n stack = stack.prev;\n if (link2 !== void 0) {\n next = link2.nextSub;\n continue top;\n }\n }\n break;\n } while (true);\n }\n function checkDirty(link2, sub) {\n let stack;\n let checkDepth = 0;\n let dirty = false;\n top: do {\n const dep = link2.dep;\n const flags = dep.flags;\n if (sub.flags & 16) {\n dirty = true;\n } else if ((flags & (1 | 16)) === (1 | 16)) {\n if (update(dep)) {\n const subs = dep.subs;\n if (subs.nextSub !== void 0) {\n shallowPropagate(subs);\n }\n dirty = true;\n }\n } else if ((flags & (1 | 32)) === (1 | 32)) {\n if (link2.nextSub !== void 0 || link2.prevSub !== void 0) {\n stack = { value: link2, prev: stack };\n }\n link2 = dep.deps;\n sub = dep;\n ++checkDepth;\n continue;\n }\n if (!dirty) {\n const nextDep = link2.nextDep;\n if (nextDep !== void 0) {\n link2 = nextDep;\n continue;\n }\n }\n while (checkDepth--) {\n const firstSub = sub.subs;\n const hasMultipleSubs = firstSub.nextSub !== void 0;\n if (hasMultipleSubs) {\n link2 = stack.value;\n stack = stack.prev;\n } else {\n link2 = firstSub;\n }\n if (dirty) {\n if (update(sub)) {\n if (hasMultipleSubs) {\n shallowPropagate(firstSub);\n }\n sub = link2.sub;\n continue;\n }\n dirty = false;\n } else {\n sub.flags &= -33;\n }\n sub = link2.sub;\n const nextDep = link2.nextDep;\n if (nextDep !== void 0) {\n link2 = nextDep;\n continue top;\n }\n }\n return dirty;\n } while (true);\n }\n function shallowPropagate(link2) {\n do {\n const sub = link2.sub;\n const flags = sub.flags;\n if ((flags & (32 | 16)) === 32) {\n sub.flags = flags | 16;\n if ((flags & (2 | 4)) === 2) {\n notify(sub);\n }\n }\n } while ((link2 = link2.nextSub) !== void 0);\n }\n function isValidLink(checkLink, sub) {\n let link2 = sub.depsTail;\n while (link2 !== void 0) {\n if (link2 === checkLink) {\n return true;\n }\n link2 = link2.prevDep;\n }\n return false;\n }\n}\nexport {\n ReactiveFlags,\n createReactiveSystem\n};\n//# sourceMappingURL=alien.js.map\n","import { createReactiveSystem, ReactiveFlags } from \"./alien.js\";\nfunction toObserver(nextHandler, errorHandler, completionHandler) {\n const isObserver = typeof nextHandler === \"object\";\n const self = isObserver ? nextHandler : void 0;\n return {\n next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),\n error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),\n complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(\n self\n )\n };\n}\nconst queuedEffects = [];\nlet cycle = 0;\nconst { link, unlink, propagate, checkDirty, shallowPropagate } = createReactiveSystem({\n update(atom) {\n return atom._update();\n },\n // eslint-disable-next-line no-shadow\n notify(effect2) {\n queuedEffects[queuedEffectsLength++] = effect2;\n effect2.flags &= ~ReactiveFlags.Watching;\n },\n unwatched(atom) {\n if (atom.depsTail !== void 0) {\n atom.depsTail = void 0;\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;\n purgeDeps(atom);\n }\n }\n});\nlet notifyIndex = 0;\nlet queuedEffectsLength = 0;\nlet activeSub;\nlet batchDepth = 0;\nfunction batch(fn) {\n try {\n ++batchDepth;\n fn();\n } finally {\n if (!--batchDepth) {\n flush();\n }\n }\n}\nfunction purgeDeps(sub) {\n const depsTail = sub.depsTail;\n let dep = depsTail !== void 0 ? depsTail.nextDep : sub.deps;\n while (dep !== void 0) {\n dep = unlink(dep, sub);\n }\n}\nfunction flush() {\n if (batchDepth > 0) {\n return;\n }\n while (notifyIndex < queuedEffectsLength) {\n const effect2 = queuedEffects[notifyIndex];\n queuedEffects[notifyIndex++] = void 0;\n effect2.notify();\n }\n notifyIndex = 0;\n queuedEffectsLength = 0;\n}\nfunction createAsyncAtom(getValue, options) {\n const ref = {};\n const atom = createAtom(() => {\n getValue().then(\n (data) => {\n const internalAtom = ref.current;\n if (internalAtom._update({ status: \"done\", data })) {\n const subs = internalAtom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n },\n (error) => {\n const internalAtom = ref.current;\n if (internalAtom._update({ status: \"error\", error })) {\n const subs = internalAtom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n }\n );\n return { status: \"pending\" };\n }, options);\n ref.current = atom;\n return atom;\n}\nfunction createAtom(valueOrFn, options) {\n const isComputed = typeof valueOrFn === \"function\";\n const getter = valueOrFn;\n const atom = {\n _snapshot: isComputed ? void 0 : valueOrFn,\n subs: void 0,\n subsTail: void 0,\n deps: void 0,\n depsTail: void 0,\n flags: isComputed ? ReactiveFlags.None : ReactiveFlags.Mutable,\n get() {\n if (activeSub !== void 0) {\n link(atom, activeSub, cycle);\n }\n return atom._snapshot;\n },\n subscribe(observerOrFn) {\n const obs = toObserver(observerOrFn);\n const observed = { current: false };\n const e = effect(() => {\n atom.get();\n if (!observed.current) {\n observed.current = true;\n } else {\n obs.next?.(atom._snapshot);\n }\n });\n return {\n unsubscribe: () => {\n e.stop();\n }\n };\n },\n _update(getValue) {\n const prevSub = activeSub;\n const compare = options?.compare ?? Object.is;\n if (isComputed) {\n activeSub = atom;\n ++cycle;\n atom.depsTail = void 0;\n } else if (getValue === void 0) {\n return false;\n }\n if (isComputed) {\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.RecursedCheck;\n }\n try {\n const oldValue = atom._snapshot;\n const newValue = typeof getValue === \"function\" ? getValue(oldValue) : getValue === void 0 && isComputed ? getter(oldValue) : getValue;\n if (oldValue === void 0 || !compare(oldValue, newValue)) {\n atom._snapshot = newValue;\n return true;\n }\n return false;\n } finally {\n activeSub = prevSub;\n if (isComputed) {\n atom.flags &= ~ReactiveFlags.RecursedCheck;\n }\n purgeDeps(atom);\n }\n }\n };\n if (isComputed) {\n atom.flags = ReactiveFlags.Mutable | ReactiveFlags.Dirty;\n atom.get = function() {\n const flags = atom.flags;\n if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(atom.deps, atom)) {\n if (atom._update()) {\n const subs = atom.subs;\n if (subs !== void 0) {\n shallowPropagate(subs);\n }\n }\n } else if (flags & ReactiveFlags.Pending) {\n atom.flags = flags & ~ReactiveFlags.Pending;\n }\n if (activeSub !== void 0) {\n link(atom, activeSub, cycle);\n }\n return atom._snapshot;\n };\n } else {\n atom.set = function(valueOrFn2) {\n if (atom._update(valueOrFn2)) {\n const subs = atom.subs;\n if (subs !== void 0) {\n propagate(subs);\n shallowPropagate(subs);\n flush();\n }\n }\n };\n }\n return atom;\n}\nfunction effect(fn) {\n const run = () => {\n const prevSub = activeSub;\n activeSub = effectObj;\n ++cycle;\n effectObj.depsTail = void 0;\n effectObj.flags = ReactiveFlags.Watching | ReactiveFlags.RecursedCheck;\n try {\n return fn();\n } finally {\n activeSub = prevSub;\n effectObj.flags &= ~ReactiveFlags.RecursedCheck;\n purgeDeps(effectObj);\n }\n };\n const effectObj = {\n deps: void 0,\n depsTail: void 0,\n subs: void 0,\n subsTail: void 0,\n flags: ReactiveFlags.Watching | ReactiveFlags.RecursedCheck,\n notify() {\n const flags = this.flags;\n if (flags & ReactiveFlags.Dirty || flags & ReactiveFlags.Pending && checkDirty(this.deps, this)) {\n run();\n } else {\n this.flags = ReactiveFlags.Watching;\n }\n },\n stop() {\n this.flags = ReactiveFlags.None;\n this.depsTail = void 0;\n purgeDeps(this);\n }\n };\n run();\n return effectObj;\n}\nexport {\n batch,\n createAsyncAtom,\n createAtom,\n flush,\n toObserver\n};\n//# sourceMappingURL=atom.js.map\n","import { useCallback } from \"react\";\nimport { useSyncExternalStoreWithSelector } from \"use-sync-external-store/shim/with-selector\";\nfunction defaultCompare(a, b) {\n return a === b;\n}\nfunction useStore(atom, selector, compare = defaultCompare) {\n const subscribe = useCallback(\n (handleStoreChange) => {\n if (!atom) {\n return () => {\n };\n }\n const { unsubscribe } = atom.subscribe(handleStoreChange);\n return unsubscribe;\n },\n [atom]\n );\n const boundGetSnapshot = useCallback(() => atom?.get(), [atom]);\n const selectedSnapshot = useSyncExternalStoreWithSelector(\n subscribe,\n boundGetSnapshot,\n boundGetSnapshot,\n selector,\n compare\n );\n return selectedSnapshot;\n}\nexport {\n useStore\n};\n//# sourceMappingURL=useStore.js.map\n","\"use client\";\nimport { dummyMatchContext, matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { invariant, replaceEqualDeep } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useMatch.tsx\nvar dummyMatch = {};\nfunction useStructuralSharing(opts, router) {\n\tconst previousResult = React$1.useRef();\n\treturn (slice) => {\n\t\tconst selected = opts?.select ? opts.select(slice) : slice;\n\t\tif (opts?.structuralSharing ?? router.options.defaultStructuralSharing) return previousResult.current = replaceEqualDeep(previousResult.current, selected);\n\t\treturn selected;\n\t};\n}\n/**\n* Read and select the nearest or targeted route match.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchHook\n*/\nfunction useMatch(opts) {\n\tconst router = useRouter();\n\tconst nearestRouteId = React$1.useContext(opts.from ? dummyMatchContext : matchContext);\n\tconst routeId = opts.from ?? nearestRouteId;\n\tconst matchStore = router.stores.getMatchStore(routeId);\n\tif (isServer ?? router.isServer) {\n\t\tconst match = matchStore.get();\n\t\tif (!match) {\n\t\t\tif (opts.shouldThrow ?? true) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\t\t\tinvariant();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\treturn opts.select ? opts.select(match) : match;\n\t}\n\tconst selector = useStructuralSharing(opts, router);\n\tconst matchSelection = useStore(matchStore, (match) => match ? selector(match) : dummyMatch);\n\tif (matchSelection !== dummyMatch) return matchSelection;\n\tif (opts.shouldThrow ?? true) {\n\t\tif (process.env.NODE_ENV !== \"production\") throw new Error(`Invariant failed: Could not find ${opts.from ? `an active match from \"${opts.from}\"` : \"a nearest match!\"}`);\n\t\tinvariant();\n\t}\n}\n//#endregion\nexport { useMatch, useStructuralSharing };\n\n//# sourceMappingURL=useMatch.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderData.tsx\n/**\n* Read and select the current route's loader data with type‑safety.\n*\n* Options:\n* - `from`/`strict`: Choose which route's data to read and strictness\n* - `select`: Map the loader data to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader data (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook\n*/\nfunction useLoaderData(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.loaderData) : match.loaderData;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderData };\n\n//# sourceMappingURL=useLoaderData.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useLoaderDeps.tsx\n/**\n* Read and select the current route's loader dependencies object.\n*\n* Options:\n* - `from`: Choose which route's loader deps to read\n* - `select`: Map the deps to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The loader deps (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook\n*/\nfunction useLoaderDeps(opts) {\n\tconst { select, ...rest } = opts;\n\treturn useMatch({\n\t\t...rest,\n\t\tselect: (match) => {\n\t\t\treturn select ? select(match.loaderDeps) : match.loaderDeps;\n\t\t}\n\t});\n}\n//#endregion\nexport { useLoaderDeps };\n\n//# sourceMappingURL=useLoaderDeps.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useParams.tsx\n/**\n* Access the current route's path parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Specify the matched route and whether to enforce strict typing\n* - `select`: Project the params object to a derived value for memoized renders\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw if the route is not found in strict contexts\n*\n* @returns The params object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook\n*/\nfunction useParams(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tstrict: opts.strict,\n\t\tselect: (match) => {\n\t\t\tconst params = opts.strict === false ? match.params : match._strictParams;\n\t\t\treturn opts.select ? opts.select(params) : params;\n\t\t}\n\t});\n}\n//#endregion\nexport { useParams };\n\n//# sourceMappingURL=useParams.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useSearch.tsx\n/**\n* Read and select the current route's search parameters with type-safety.\n*\n* Options:\n* - `from`/`strict`: Control which route's search is read and how strictly it's typed\n* - `select`: Map the search object to a derived value for render optimization\n* - `structuralSharing`: Enable structural sharing for stable references\n* - `shouldThrow`: Throw when the route is not found (strict contexts)\n*\n* @returns The search object (or selected value) for the matched route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook\n*/\nfunction useSearch(opts) {\n\treturn useMatch({\n\t\tfrom: opts.from,\n\t\tstrict: opts.strict,\n\t\tshouldThrow: opts.shouldThrow,\n\t\tstructuralSharing: opts.structuralSharing,\n\t\tselect: (match) => {\n\t\t\treturn opts.select ? opts.select(match.search) : match.search;\n\t\t}\n\t});\n}\n//#endregion\nexport { useSearch };\n\n//# sourceMappingURL=useSearch.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport * as React$1 from \"react\";\n//#region src/useNavigate.tsx\n/**\n* Imperative navigation hook.\n*\n* Returns a stable `navigate(options)` function to change the current location\n* programmatically. Prefer the `Link` component for user-initiated navigation,\n* and use this hook from effects, callbacks, or handlers where imperative\n* navigation is required.\n*\n* Options:\n* - `from`: Optional route base used to resolve relative `to` paths.\n*\n* @returns A function that accepts `NavigateOptions`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useNavigateHook\n*/\nfunction useNavigate(_defaultOpts) {\n\tconst router = useRouter();\n\treturn React$1.useCallback((options) => {\n\t\treturn router.navigate({\n\t\t\t...options,\n\t\t\tfrom: options.from ?? _defaultOpts?.from\n\t\t});\n\t}, [_defaultOpts?.from, router]);\n}\n/**\n* Component that triggers a navigation when rendered. Navigation executes\n* in an effect after mount/update.\n*\n* Props are the same as `NavigateOptions` used by `navigate()`.\n*\n* @returns null\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/navigateComponent\n*/\nfunction Navigate(props) {\n\tconst router = useRouter();\n\tconst navigate = useNavigate();\n\tconst previousPropsRef = React$1.useRef(null);\n\tuseLayoutEffect(() => {\n\t\tif (previousPropsRef.current !== props) {\n\t\t\tnavigate(props);\n\t\t\tpreviousPropsRef.current = props;\n\t\t}\n\t}, [\n\t\trouter,\n\t\tprops,\n\t\tnavigate\n\t]);\n\treturn null;\n}\n//#endregion\nexport { Navigate, useNavigate };\n\n//# sourceMappingURL=useNavigate.js.map","import { useMatch } from \"./useMatch.js\";\n//#region src/useRouteContext.ts\nfunction useRouteContext(opts) {\n\treturn useMatch({\n\t\t...opts,\n\t\tselect: (match) => opts.select ? opts.select(match.context) : match.context\n\t});\n}\n//#endregion\nexport { useRouteContext };\n\n//# sourceMappingURL=useRouteContext.js.map","\"use client\";\nimport { useForwardedRef, useIntersectionObserver } from \"./utils.js\";\nimport { useHydrated } from \"./ClientOnly.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { deepEqual, exactPathTest, functionalUpdate, hasKeys, isDangerousProtocol, preloadWarning, removeTrailingSlash } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/link.tsx\nfunction useValueStable(value) {\n\tconst ref = React$1.useRef(value);\n\tif (!deepEqual(ref.current, value, { ignoreUndefined: false })) ref.current = value;\n\treturn ref.current;\n}\nfunction compareLinkState(a, b) {\n\treturn a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\nfunction resolveExternalLink(hrefOption, to, protocolAllowlist) {\n\tif (hrefOption?.external) {\n\t\tif (isDangerousProtocol(hrefOption.href, protocolAllowlist)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);\n\t\t\treturn;\n\t\t}\n\t\treturn hrefOption.href;\n\t}\n\tif (isSafeInternal(to)) return;\n\tif (typeof to !== \"string\" || to.indexOf(\":\") === -1) return;\n\ttry {\n\t\tnew URL(to);\n\t\tif (isDangerousProtocol(to, protocolAllowlist)) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\treturn;\n\t\t}\n\t\treturn to;\n\t} catch {}\n}\nfunction resolveIsActive(location, next, activeOptions, basepath, isHydrated, isExternal) {\n\tif (isExternal) return false;\n\tif (activeOptions?.exact) {\n\t\tif (!exactPathTest(location.pathname, next.pathname, basepath)) return false;\n\t} else {\n\t\tconst currentPathSplit = removeTrailingSlash(location.pathname, basepath);\n\t\tconst nextPathSplit = removeTrailingSlash(next.pathname, basepath);\n\t\tif (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === \"/\"))) return false;\n\t}\n\tif (activeOptions?.includeSearch ?? true) {\n\t\tif (!deepEqual(location.search, next.search, {\n\t\t\tpartial: !activeOptions?.exact,\n\t\t\tignoreUndefined: !activeOptions?.explicitUndefined\n\t\t})) return false;\n\t}\n\tif (activeOptions?.includeHash) return isHydrated && location.hash === next.hash;\n\treturn true;\n}\n/**\n* Build anchor-like props for declarative navigation and preloading.\n*\n* Returns stable `href`, event handlers and accessibility props derived from\n* router options and active state. Used internally by `Link` and custom links.\n*\n* Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,\n* `activeProps`, `inactiveProps`, and more.\n*\n* @returns React anchor props suitable for `<a>` or custom components.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook\n*/\nfunction useLinkProps(options, forwardedRef) {\n\tconst router = useRouter();\n\tconst innerRef = useForwardedRef(forwardedRef);\n\tconst { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, preloadIntentProximity: _preloadIntentProximity, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onBlur, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;\n\tif (isServer ?? router.isServer) {\n\t\tconst safeInternal = isSafeInternal(to);\n\t\tif (typeof to === \"string\" && !safeInternal && to.indexOf(\":\") > -1) try {\n\t\t\tnew URL(to);\n\t\t\tif (isDangerousProtocol(to, router.protocolAllowlist)) {\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\t\treturn {\n\t\t\t\t\t...propsSafeToSpread,\n\t\t\t\t\tref: innerRef,\n\t\t\t\t\thref: void 0,\n\t\t\t\t\t...children && { children },\n\t\t\t\t\t...target && { target },\n\t\t\t\t\t...disabled && { disabled },\n\t\t\t\t\t...style && { style },\n\t\t\t\t\t...className && { className }\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...propsSafeToSpread,\n\t\t\t\tref: innerRef,\n\t\t\t\thref: to,\n\t\t\t\t...children && { children },\n\t\t\t\t...target && { target },\n\t\t\t\t...disabled && { disabled },\n\t\t\t\t...style && { style },\n\t\t\t\t...className && { className }\n\t\t\t};\n\t\t} catch {}\n\t\tconst next = router.buildLocation({\n\t\t\t...options,\n\t\t\tfrom: options.from\n\t\t});\n\t\tconst hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);\n\t\tconst externalLink = (() => {\n\t\t\tif (hrefOption?.external) {\n\t\t\t\tif (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${hrefOption.href}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn hrefOption.href;\n\t\t\t}\n\t\t\tif (safeInternal) return void 0;\n\t\t\tif (typeof to === \"string\" && to.indexOf(\":\") > -1) try {\n\t\t\t\tnew URL(to);\n\t\t\t\tif (isDangerousProtocol(to, router.protocolAllowlist)) {\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Blocked Link with dangerous protocol: ${to}`);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn to;\n\t\t\t} catch {}\n\t\t})();\n\t\tconst isActive = (() => {\n\t\t\tif (externalLink) return false;\n\t\t\tconst currentLocation = router.stores.location.get();\n\t\t\tconst exact = activeOptions?.exact ?? false;\n\t\t\tif (exact) {\n\t\t\t\tif (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;\n\t\t\t} else {\n\t\t\t\tconst currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);\n\t\t\t\tconst nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);\n\t\t\t\tif (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === \"/\"))) return false;\n\t\t\t}\n\t\t\tif (activeOptions?.includeSearch ?? true) {\n\t\t\t\tif (currentLocation.search !== next.search) {\n\t\t\t\t\tconst currentSearchEmpty = !currentLocation.search || typeof currentLocation.search === \"object\" && !hasKeys(currentLocation.search);\n\t\t\t\t\tconst nextSearchEmpty = !next.search || typeof next.search === \"object\" && !hasKeys(next.search);\n\t\t\t\t\tif (!(currentSearchEmpty && nextSearchEmpty)) {\n\t\t\t\t\t\tif (!deepEqual(currentLocation.search, next.search, {\n\t\t\t\t\t\t\tpartial: !exact,\n\t\t\t\t\t\t\tignoreUndefined: !activeOptions?.explicitUndefined\n\t\t\t\t\t\t})) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (activeOptions?.includeHash) return false;\n\t\t\treturn true;\n\t\t})();\n\t\tif (externalLink) return {\n\t\t\t...propsSafeToSpread,\n\t\t\tref: innerRef,\n\t\t\thref: externalLink,\n\t\t\t...children && { children },\n\t\t\t...target && { target },\n\t\t\t...disabled && { disabled },\n\t\t\t...style && { style },\n\t\t\t...className && { className }\n\t\t};\n\t\tconst resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;\n\t\tconst resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;\n\t\tconst resolvedStyle = (() => {\n\t\t\tconst baseStyle = style;\n\t\t\tconst activeStyle = resolvedActiveProps.style;\n\t\t\tconst inactiveStyle = resolvedInactiveProps.style;\n\t\t\tif (!baseStyle && !activeStyle && !inactiveStyle) return;\n\t\t\tif (baseStyle && !activeStyle && !inactiveStyle) return baseStyle;\n\t\t\tif (!baseStyle && activeStyle && !inactiveStyle) return activeStyle;\n\t\t\tif (!baseStyle && !activeStyle && inactiveStyle) return inactiveStyle;\n\t\t\treturn {\n\t\t\t\t...baseStyle,\n\t\t\t\t...activeStyle,\n\t\t\t\t...inactiveStyle\n\t\t\t};\n\t\t})();\n\t\tconst resolvedClassName = (() => {\n\t\t\tconst baseClassName = className;\n\t\t\tconst activeClassName = resolvedActiveProps.className;\n\t\t\tconst inactiveClassName = resolvedInactiveProps.className;\n\t\t\tif (!baseClassName && !activeClassName && !inactiveClassName) return \"\";\n\t\t\tlet out = \"\";\n\t\t\tif (baseClassName) out = baseClassName;\n\t\t\tif (activeClassName) out = out ? `${out} ${activeClassName}` : activeClassName;\n\t\t\tif (inactiveClassName) out = out ? `${out} ${inactiveClassName}` : inactiveClassName;\n\t\t\treturn out;\n\t\t})();\n\t\treturn {\n\t\t\t...propsSafeToSpread,\n\t\t\t...resolvedActiveProps,\n\t\t\t...resolvedInactiveProps,\n\t\t\thref: hrefOption?.href,\n\t\t\tref: innerRef,\n\t\t\tdisabled: !!disabled,\n\t\t\ttarget,\n\t\t\t...resolvedStyle && { style: resolvedStyle },\n\t\t\t...resolvedClassName && { className: resolvedClassName },\n\t\t\t...disabled && STATIC_DISABLED_PROPS,\n\t\t\t...isActive && STATIC_ACTIVE_PROPS\n\t\t};\n\t}\n\tconst isHydrated = useHydrated();\n\tconst stableSearch = useValueStable(options.search);\n\tconst stableParams = useValueStable(options.params);\n\tconst stableActiveOptions = useValueStable(activeOptions);\n\tconst _options = React$1.useMemo(() => options, [\n\t\trouter,\n\t\toptions.from,\n\t\toptions._fromLocation,\n\t\toptions.hash,\n\t\toptions.to,\n\t\tstableSearch,\n\t\tstableParams,\n\t\toptions.state,\n\t\toptions.mask,\n\t\toptions.unsafeRelative\n\t]);\n\tconst selectLinkState = React$1.useCallback((location) => {\n\t\tconst next = router.buildLocation({\n\t\t\t_fromLocation: location,\n\t\t\t..._options\n\t\t});\n\t\tconst hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);\n\t\tconst externalLink = resolveExternalLink(hrefOption, to, router.protocolAllowlist);\n\t\treturn [\n\t\t\threfOption?.href,\n\t\t\texternalLink,\n\t\t\tresolveIsActive(location, next, stableActiveOptions, router.basepath, isHydrated, externalLink !== void 0)\n\t\t];\n\t}, [\n\t\tstableActiveOptions,\n\t\tdisabled,\n\t\tisHydrated,\n\t\t_options,\n\t\trouter,\n\t\tto\n\t]);\n\tconst [href, externalLink, isActive] = useStore(router.stores.location, selectLinkState, compareLinkState);\n\tconst resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;\n\tconst resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;\n\tconst resolvedClassName = [\n\t\tclassName,\n\t\tresolvedActiveProps.className,\n\t\tresolvedInactiveProps.className\n\t].filter(Boolean).join(\" \");\n\tconst resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {\n\t\t...style,\n\t\t...resolvedActiveProps.style,\n\t\t...resolvedInactiveProps.style\n\t};\n\tconst hasRenderFetched = React$1.useRef(false);\n\tconst preload = options.reloadDocument || externalLink || disabled ? false : userPreload ?? router.options.defaultPreload;\n\tconst preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;\n\tconst doPreload = React$1.useCallback(() => {\n\t\trouter.preloadRoute(_options).catch((err) => {\n\t\t\tconsole.warn(err);\n\t\t\tconsole.warn(preloadWarning);\n\t\t});\n\t}, [router, _options]);\n\tconst enqueuePreload = React$1.useCallback((e) => {\n\t\tif (!e) {\n\t\t\tcancelPreload(innerRef);\n\t\t\treturn;\n\t\t}\n\t\tif (!(e.isIntersecting ?? preload === \"intent\")) {\n\t\t\tif (e.isIntersecting === false) cancelPreload(innerRef);\n\t\t\treturn;\n\t\t}\n\t\tif (!preloadDelay) {\n\t\t\tdoPreload();\n\t\t\treturn;\n\t\t}\n\t\tif (timeoutMap.has(innerRef)) return;\n\t\ttimeoutMap.set(innerRef, setTimeout(() => {\n\t\t\ttimeoutMap.delete(innerRef);\n\t\t\tdoPreload();\n\t\t}, preloadDelay));\n\t}, [\n\t\tdoPreload,\n\t\tinnerRef,\n\t\tpreload,\n\t\tpreloadDelay\n\t]);\n\tuseIntersectionObserver(innerRef, enqueuePreload, preload !== \"viewport\");\n\tReact$1.useEffect(() => {\n\t\tif (hasRenderFetched.current) return;\n\t\tif (preload === \"render\") {\n\t\t\tdoPreload();\n\t\t\thasRenderFetched.current = true;\n\t\t}\n\t}, [doPreload, preload]);\n\tconst handleClick = (e) => {\n\t\tconst elementTarget = e.currentTarget.getAttribute(\"target\");\n\t\tconst effectiveTarget = target !== void 0 ? target : elementTarget;\n\t\tif (!disabled && !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === \"_self\") && e.button === 0) {\n\t\t\te.preventDefault();\n\t\t\trouter.navigate({\n\t\t\t\t..._options,\n\t\t\t\treplace,\n\t\t\t\tresetScroll,\n\t\t\t\thashScrollIntoView,\n\t\t\t\tstartTransition,\n\t\t\t\tviewTransition,\n\t\t\t\tignoreBlocker\n\t\t\t});\n\t\t}\n\t};\n\tif (externalLink) return {\n\t\t...propsSafeToSpread,\n\t\tref: innerRef,\n\t\thref: externalLink,\n\t\t...children && { children },\n\t\t...target && { target },\n\t\t...disabled && { disabled },\n\t\t...style && { style },\n\t\t...className && { className },\n\t\t...onClick && { onClick },\n\t\t...onBlur && { onBlur },\n\t\t...onFocus && { onFocus },\n\t\t...onMouseEnter && { onMouseEnter },\n\t\t...onMouseLeave && { onMouseLeave },\n\t\t...onTouchStart && { onTouchStart }\n\t};\n\tconst handleTouchStart = () => {\n\t\tif (preload !== \"intent\") return;\n\t\tdoPreload();\n\t};\n\tconst handleLeave = () => {\n\t\tif (preload === \"intent\") cancelPreload(innerRef);\n\t};\n\treturn {\n\t\t...propsSafeToSpread,\n\t\t...resolvedActiveProps,\n\t\t...resolvedInactiveProps,\n\t\thref,\n\t\tref: innerRef,\n\t\tonClick: composeHandlers([onClick, handleClick]),\n\t\tonBlur: composeHandlers([onBlur, handleLeave]),\n\t\tonFocus: composeHandlers([onFocus, enqueuePreload]),\n\t\tonMouseEnter: composeHandlers([onMouseEnter, enqueuePreload]),\n\t\tonMouseLeave: composeHandlers([onMouseLeave, handleLeave]),\n\t\tonTouchStart: composeHandlers([onTouchStart, handleTouchStart]),\n\t\tdisabled: !!disabled,\n\t\ttarget,\n\t\t...resolvedStyle && { style: resolvedStyle },\n\t\t...resolvedClassName && { className: resolvedClassName },\n\t\t...disabled && STATIC_DISABLED_PROPS,\n\t\t...isActive && STATIC_ACTIVE_PROPS\n\t};\n}\nvar STATIC_EMPTY_OBJECT = {};\nvar STATIC_ACTIVE_OBJECT = { className: \"active\" };\nvar STATIC_DISABLED_PROPS = {\n\trole: \"link\",\n\t\"aria-disabled\": true\n};\nvar STATIC_ACTIVE_PROPS = {\n\t\"data-status\": \"active\",\n\t\"aria-current\": \"page\"\n};\nvar timeoutMap = /* @__PURE__ */ new WeakMap();\nvar cancelPreload = (eventTarget) => {\n\tclearTimeout(timeoutMap.get(eventTarget));\n\ttimeoutMap.delete(eventTarget);\n};\nvar composeHandlers = (handlers) => (e) => {\n\tfor (const handler of handlers) {\n\t\tif (!handler) continue;\n\t\tif (e.defaultPrevented) return;\n\t\thandler(e);\n\t}\n};\nfunction getHrefOption(publicHref, external, history, disabled) {\n\tif (disabled) return void 0;\n\tif (external) return {\n\t\thref: publicHref,\n\t\texternal: true\n\t};\n\treturn {\n\t\thref: history.createHref(publicHref) || \"/\",\n\t\texternal: false\n\t};\n}\nfunction isSafeInternal(to) {\n\tif (typeof to !== \"string\") return false;\n\tconst zero = to.charCodeAt(0);\n\tif (zero === 47) return to.charCodeAt(1) !== 47;\n\treturn zero === 46;\n}\n/**\n* Creates a typed Link-like component that preserves TanStack Router's\n* navigation semantics and type-safety while delegating rendering to the\n* provided host component.\n*\n* Useful for integrating design system anchors/buttons while keeping\n* router-aware props (eg. `to`, `params`, `search`, `preload`).\n*\n* @param Comp The host component to render (eg. a design-system Link/Button)\n* @returns A router-aware component with the same API as `Link`.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-link\n*/\nfunction createLink(Comp) {\n\treturn React$1.forwardRef(function CreatedLink(props, ref) {\n\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t...props,\n\t\t\t_asChild: Comp,\n\t\t\tref\n\t\t});\n\t});\n}\n/**\n* A strongly-typed anchor component for declarative navigation.\n* Handles path, search, hash and state updates with optional route preloading\n* and active-state styling.\n*\n* Props:\n* - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)\n* - `preloadDelay`: Delay in ms before preloading on focus, hover, or viewport entry\n* - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive\n* - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation\n* - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation\n* - `ignoreBlocker`: Bypass registered blockers\n*\n* @returns An anchor-like element that navigates without full page reloads.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent\n*/\nvar Link = React$1.forwardRef((props, ref) => {\n\tconst { _asChild, ...rest } = props;\n\tconst { type: _type, ...linkProps } = useLinkProps(rest, ref);\n\tconst children = typeof rest.children === \"function\" ? rest.children({ isActive: linkProps[\"data-status\"] === \"active\" }) : rest.children;\n\tif (!_asChild) {\n\t\tconst { disabled: _, ...rest } = linkProps;\n\t\treturn React$1.createElement(\"a\", rest, children);\n\t}\n\treturn React$1.createElement(_asChild, linkProps, children);\n});\n/**\n* Validate and reuse navigation options for `Link`, `navigate` or `redirect`.\n* Accepts a literal options object and returns it typed for later spreading.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\nvar linkOptions = (options) => {\n\treturn options;\n};\n/**\n* Type-check a literal object for use with `Link`, `navigate` or `redirect`.\n* Use to validate and reuse navigation options across your app.\n* @example\n* const opts = linkOptions({ to: '/dashboard', search: { tab: 'home' } })\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkOptions\n*/\n//#endregion\nexport { Link, createLink, linkOptions, useLinkProps };\n\n//# sourceMappingURL=link.js.map","import { useRouter } from \"./useRouter.js\";\nimport { useMatch } from \"./useMatch.js\";\nimport { useLoaderData } from \"./useLoaderData.js\";\nimport { useLoaderDeps } from \"./useLoaderDeps.js\";\nimport { useParams } from \"./useParams.js\";\nimport { useSearch } from \"./useSearch.js\";\nimport { useNavigate } from \"./useNavigate.js\";\nimport { useRouteContext } from \"./useRouteContext.js\";\nimport { Link } from \"./link.js\";\nimport { BaseRootRoute, BaseRoute, BaseRouteApi, notFound } from \"@tanstack/router-core\";\nimport React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/route.tsx\n/**\n* Returns a route-specific API that exposes type-safe hooks pre-bound\n* to a single route ID. Useful for consuming a route's APIs from files\n* where the route object isn't directly imported (e.g. code-split files).\n*\n* @param id Route ID string literal for the target route.\n* @returns A `RouteApi` instance bound to the given route ID.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/getRouteApiFunction\n*/\nfunction getRouteApi(id) {\n\treturn new RouteApi({ id });\n}\nvar RouteApi = class extends BaseRouteApi {\n\t/**\n\t* @deprecated Use the `getRouteApi` function instead.\n\t*/\n\tconstructor({ id }) {\n\t\tsuper({ id });\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstrict: false\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: useRouter().routesById[this.id].fullPath });\n\t\t};\n\t\tthis.notFound = (opts) => {\n\t\t\treturn notFound({\n\t\t\t\trouteId: this.id,\n\t\t\t\t...opts\n\t\t\t});\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\tconst fullPath = useRouter().routesById[this.id].fullPath;\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\nvar Route = class extends BaseRoute {\n\t/**\n\t* @deprecated Use the `createRoute` function instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a non-root Route instance for code-based routing.\n*\n* Use this to define a route that will be composed into a route tree\n* (typically via a parent route's `addChildren`). If you're using file-based\n* routing, prefer `createFileRoute`.\n*\n* @param options Route options (path, component, loader, context, etc.).\n* @returns A Route instance to be attached to the route tree.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouteFunction\n*/\nfunction createRoute(options) {\n\treturn new Route(options);\n}\n/**\n* Creates a root route factory that requires a router context type.\n*\n* Use when your root route expects `context` to be provided to `createRouter`.\n* The returned function behaves like `createRootRoute` but enforces a context type.\n*\n* @returns A factory function to configure and return a root route.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteWithContextFunction\n*/\nfunction createRootRouteWithContext() {\n\treturn (options) => {\n\t\treturn createRootRoute(options);\n\t};\n}\n/**\n* @deprecated Use the `createRootRouteWithContext` function instead.\n*/\nvar rootRouteWithContext = createRootRouteWithContext;\nvar RootRoute = class extends BaseRootRoute {\n\t/**\n\t* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.\n\t*/\n\tconstructor(options) {\n\t\tsuper(options);\n\t\tthis.useMatch = (opts) => {\n\t\t\treturn useMatch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tfrom: this.id,\n\t\t\t\tstructuralSharing: opts?.structuralSharing\n\t\t\t});\n\t\t};\n\t\tthis.useRouteContext = (opts) => {\n\t\t\treturn useRouteContext({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useSearch = (opts) => {\n\t\t\treturn useSearch({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useParams = (opts) => {\n\t\t\treturn useParams({\n\t\t\t\tselect: opts?.select,\n\t\t\t\tstructuralSharing: opts?.structuralSharing,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderDeps = (opts) => {\n\t\t\treturn useLoaderDeps({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useLoaderData = (opts) => {\n\t\t\treturn useLoaderData({\n\t\t\t\t...opts,\n\t\t\t\tfrom: this.id\n\t\t\t});\n\t\t};\n\t\tthis.useNavigate = () => {\n\t\t\treturn useNavigate({ from: this.fullPath });\n\t\t};\n\t\tthis.Link = React.forwardRef((props, ref) => {\n\t\t\treturn /* @__PURE__ */ jsx(Link, {\n\t\t\t\tref,\n\t\t\t\tfrom: this.fullPath,\n\t\t\t\t...props\n\t\t\t});\n\t\t});\n\t}\n};\n/**\n* Creates a root Route instance used to build your route tree.\n*\n* Typically paired with `createRouter({ routeTree })`. If you need to require\n* a typed router context, use `createRootRouteWithContext` instead.\n*\n* @param options Root route options (component, error, pending, etc.).\n* @returns A root route instance.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteFunction\n*/\nfunction createRootRoute(options) {\n\treturn new RootRoute(options);\n}\nfunction createRouteMask(opts) {\n\treturn opts;\n}\nvar NotFoundRoute = class extends Route {\n\tconstructor(options) {\n\t\tsuper({\n\t\t\t...options,\n\t\t\tid: \"404\"\n\t\t});\n\t}\n};\n//#endregion\nexport { NotFoundRoute, RootRoute, Route, RouteApi, createRootRoute, createRootRouteWithContext, createRoute, createRouteMask, getRouteApi, rootRouteWithContext };\n\n//# sourceMappingURL=route.js.map","import { reactUse } from \"./utils.js\";\nimport { isModuleNotFoundError } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\n//#region src/lazyRouteComponent.tsx\n/**\n* Wrap a dynamic import to create a route component that supports\n* `.preload()` and friendly reload-on-module-missing behavior.\n*\n* @param importer Function returning a module promise\n* @param exportName Named export to use (default: `default`)\n* @returns A lazy route component compatible with TanStack Router\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/lazyRouteComponentFunction\n*/\nfunction lazyRouteComponent(importer, exportName) {\n\tlet loadPromise;\n\tlet comp;\n\tlet error;\n\tconst load = () => {\n\t\tif (!loadPromise) {\n\t\t\terror = void 0;\n\t\t\tloadPromise = importer().then((res) => {\n\t\t\t\tif (!(isServer ?? typeof window === \"undefined\")) {\n\t\t\t\t\tloadPromise = void 0;\n\t\t\t\t\tlazyComp.preload = void 0;\n\t\t\t\t}\n\t\t\t\tcomp = res[exportName ?? \"default\"];\n\t\t\t}).catch((err) => {\n\t\t\t\tloadPromise = void 0;\n\t\t\t\terror = err;\n\t\t\t});\n\t\t}\n\t\treturn loadPromise;\n\t};\n\tconst lazyComp = function Lazy(props) {\n\t\tif (error) {\n\t\t\tif (isModuleNotFoundError(error) && !(isServer ?? typeof window === \"undefined\") && typeof sessionStorage !== \"undefined\") {\n\t\t\t\tconst storageKey = `tanstack_router_reload:${error.message}`;\n\t\t\t\tif (!sessionStorage.getItem(storageKey)) {\n\t\t\t\t\tsessionStorage.setItem(storageKey, \"1\");\n\t\t\t\t\twindow.location.reload();\n\t\t\t\t\tthrow new Promise(() => {});\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (!comp) if (reactUse) reactUse(load());\n\t\telse throw load();\n\t\treturn React$1.createElement(comp, props);\n\t};\n\tlazyComp.preload = load;\n\treturn lazyComp;\n}\n//#endregion\nexport { lazyRouteComponent };\n\n//# sourceMappingURL=lazyRouteComponent.js.map","import { CatchBoundary } from \"./CatchBoundary.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { isNotFound } from \"@tanstack/router-core\";\nimport \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/not-found.tsx\nfunction CatchNotFound(props) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst resetKey = `not-found-${router.stores.location.get().pathname}-${router.stores.status.get()}`;\n\t\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => resetKey,\n\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\terrorComponent: ({ error }) => {\n\t\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\t\telse throw error;\n\t\t\t},\n\t\t\tchildren: props.children\n\t\t});\n\t}\n\tconst resetKey = `not-found-${useStore(router.stores.location, (location) => location.pathname)}-${useStore(router.stores.status, (status) => status)}`;\n\treturn /* @__PURE__ */ jsx(CatchBoundary, {\n\t\tgetResetKey: () => resetKey,\n\t\tonCatch: (error, errorInfo) => {\n\t\t\tif (isNotFound(error)) props.onCatch?.(error, errorInfo);\n\t\t\telse throw error;\n\t\t},\n\t\terrorComponent: ({ error }) => {\n\t\t\tif (isNotFound(error)) return props.fallback?.(error);\n\t\t\telse throw error;\n\t\t},\n\t\tchildren: props.children\n\t});\n}\nfunction DefaultGlobalNotFound() {\n\treturn /* @__PURE__ */ jsx(\"p\", { children: \"Not Found\" });\n}\n//#endregion\nexport { CatchNotFound, DefaultGlobalNotFound };\n\n//# sourceMappingURL=not-found.js.map","import { useRouter } from \"./useRouter.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/ScriptOnce.tsx\n/**\n* Server-only helper to emit a script tag exactly once during SSR.\n*/\nfunction ScriptOnce({ children }) {\n\tconst router = useRouter();\n\tif (!(isServer ?? router.isServer)) return null;\n\treturn /* @__PURE__ */ jsx(\"script\", {\n\t\tnonce: router.options.ssr?.nonce,\n\t\tdangerouslySetInnerHTML: { __html: children + \";document.currentScript.remove()\" }\n\t});\n}\n//#endregion\nexport { ScriptOnce };\n\n//# sourceMappingURL=ScriptOnce.js.map","import \"react\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\n//#region src/SafeFragment.tsx\nfunction SafeFragment(props) {\n\treturn /* @__PURE__ */ jsx(Fragment, { children: props.children });\n}\n//#endregion\nexport { SafeFragment };\n\n//# sourceMappingURL=SafeFragment.js.map","import { wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { DefaultGlobalNotFound } from \"./not-found.js\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/renderRouteNotFound.tsx\n/**\n* Renders a not found component for a route when no matching route is found.\n*\n* @param router - The router instance containing the route configuration\n* @param route - The route that triggered the not found state\n* @param data - Additional data to pass to the not found component\n* @returns The rendered not found component or a default fallback component\n*/\nfunction renderRouteNotFound(router, route, data) {\n\tif (!route.options.notFoundComponent) {\n\t\tif (router.options.defaultNotFoundComponent) {\n\t\t\tconst notFoundElement = /* @__PURE__ */ jsx(router.options.defaultNotFoundComponent, { ...data });\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (!route.options.notFoundComponent) console.warn(`Warning: A notFoundError was encountered on the route with ID \"${route.id}\", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`);\n\t\t}\n\t\treturn /* @__PURE__ */ jsx(DefaultGlobalNotFound, {});\n\t}\n\tconst notFoundElement = /* @__PURE__ */ jsx(route.options.notFoundComponent, { ...data });\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n}\n//#endregion\nexport { renderRouteNotFound };\n\n//# sourceMappingURL=renderRouteNotFound.js.map","//#region src/scroll-restoration-script/client.ts\nfunction getScrollRestorationScriptForRouter(_router) {\n\treturn null;\n}\n//#endregion\nexport { getScrollRestorationScriptForRouter };\n\n//# sourceMappingURL=client.js.map","import { useRouter } from \"./useRouter.js\";\nimport { ScriptOnce } from \"./ScriptOnce.js\";\nimport { jsx } from \"react/jsx-runtime\";\nimport { getScrollRestorationScriptForRouter } from \"@tanstack/router-core/scroll-restoration-script\";\n//#region src/scroll-restoration.tsx\nfunction ScrollRestoration() {\n\tconst script = getScrollRestorationScriptForRouter(useRouter());\n\tif (!script) return null;\n\treturn /* @__PURE__ */ jsx(ScriptOnce, { children: script });\n}\n//#endregion\nexport { ScrollRestoration };\n\n//# sourceMappingURL=scroll-restoration.js.map","\"use client\";\nimport { nonRouteComponentContext, wrapInNonRouteComponentContext } from \"./nonRouteComponentContext.js\";\nimport { CatchBoundary, ErrorComponent } from \"./CatchBoundary.js\";\nimport { ClientOnly } from \"./ClientOnly.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { CatchNotFound } from \"./not-found.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { renderRouteNotFound } from \"./renderRouteNotFound.js\";\nimport { ScrollRestoration } from \"./scroll-restoration.js\";\nimport { isNotFound, rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Match.tsx\nfunction renderPending(router, route) {\n\tconst PendingComponent = route?.options.pendingComponent ?? router.options.defaultPendingComponent;\n\tif (!PendingComponent) return null;\n\tconst pendingElement = /* @__PURE__ */ jsx(PendingComponent, {});\n\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(pendingElement, \"pendingComponent\") : pendingElement;\n}\nvar outletMatchSelectionEqual = (a, b) => a[0] === b[0] && a[1] === b[1];\nvar canWrapInSuspense = (router, route, ssr) => !route.isRoot || route.options.shellComponent || route.options.wrapInSuspense || ssr === false || ssr === \"data-only\" || !((isServer ?? router.isServer) || router.ssr);\nvar Match = React$1.memo(function MatchImpl({ routeId }) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: router.stores.byRoute.get(routeId).get()\n\t});\n\treturn /* @__PURE__ */ jsx(MatchView, {\n\t\trouter,\n\t\tmatch: useStore(router.stores.getMatchStore(routeId), (value) => value)\n\t});\n});\nfunction MatchView({ router, match }) {\n\tconst route = router.routesById[match.routeId];\n\tconst pendingElement = renderPending(router, route);\n\tconst routeErrorComponent = route.options.errorComponent ?? router.options.defaultErrorComponent;\n\tconst routeOnCatch = route.options.onCatch ?? router.options.defaultOnCatch;\n\tconst routeNotFoundComponent = route.isRoot ? route.options.notFoundComponent ?? router.options.notFoundRoute?.options.component : route.options.notFoundComponent;\n\tconst resolvedNoSsr = match.ssr === false || match.ssr === \"data-only\";\n\tconst ResolvedSuspenseBoundary = canWrapInSuspense(router, route, match.ssr) && (route.options.wrapInSuspense ?? pendingElement ?? (route.options.errorComponent?.preload || resolvedNoSsr)) ? React$1.Suspense : SafeFragment;\n\tconst ResolvedCatchBoundary = routeErrorComponent ? CatchBoundary : SafeFragment;\n\tconst ResolvedNotFoundBoundary = routeNotFoundComponent ? CatchNotFound : SafeFragment;\n\treturn /* @__PURE__ */ jsxs(route.isRoot ? route.options.shellComponent ?? SafeFragment : SafeFragment, { children: [/* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: match.routeId,\n\t\tchildren: /* @__PURE__ */ jsx(ResolvedSuspenseBoundary, {\n\t\t\tfallback: pendingElement,\n\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedCatchBoundary, {\n\t\t\t\tgetResetKey: () => match,\n\t\t\t\terrorComponent: routeErrorComponent,\n\t\t\t\tonCatch: (error, errorInfo) => {\n\t\t\t\t\tif (isNotFound(error)) {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t\tif (process.env.NODE_ENV !== \"production\") console.warn(`Warning: Error in route match: ${match.id}`);\n\t\t\t\t\trouteOnCatch?.(error, errorInfo);\n\t\t\t\t},\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ResolvedNotFoundBoundary, {\n\t\t\t\t\tfallback: (error) => {\n\t\t\t\t\t\terror.routeId ??= match.routeId;\n\t\t\t\t\t\tif (error.routeId !== match.routeId) throw error;\n\t\t\t\t\t\tconst notFoundElement = React$1.createElement(routeNotFoundComponent, error);\n\t\t\t\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(notFoundElement, \"notFoundComponent\") : notFoundElement;\n\t\t\t\t\t},\n\t\t\t\t\tchildren: resolvedNoSsr ? /* @__PURE__ */ jsx(ClientOnly, {\n\t\t\t\t\t\tfallback: pendingElement,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t\t}) : /* @__PURE__ */ jsx(MatchInner, { match })\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}), (isServer ?? router.isServer) && route.parentRoute?.id === rootRouteId && router.options.scrollRestoration ? /* @__PURE__ */ jsx(ScrollRestoration, {}) : null] });\n}\nvar MatchInner = React$1.memo(function MatchInnerImpl({ match }) {\n\tconst router = useRouter();\n\tconst routeId = match.routeId;\n\tconst route = router.routesById[routeId];\n\tconst key = React$1.useMemo(() => {\n\t\tconst remountDeps = (route.options.remountDeps ?? router.options.defaultRemountDeps)?.({\n\t\t\trouteId,\n\t\t\tloaderDeps: match.loaderDeps,\n\t\t\tparams: match._strictParams,\n\t\t\tsearch: match._strictSearch\n\t\t});\n\t\treturn remountDeps ? JSON.stringify(remountDeps) : void 0;\n\t}, [\n\t\trouteId,\n\t\tmatch.loaderDeps,\n\t\tmatch._strictParams,\n\t\tmatch._strictSearch,\n\t\troute.options.remountDeps,\n\t\trouter.options.defaultRemountDeps\n\t]);\n\tconst out = React$1.useMemo(() => {\n\t\tconst Comp = route.options.component ?? router.options.defaultComponent;\n\t\treturn Comp ? /* @__PURE__ */ jsx(Comp, {}, key) : /* @__PURE__ */ jsx(Outlet, {});\n\t}, [\n\t\tkey,\n\t\troute.options.component,\n\t\trouter.options.defaultComponent\n\t]);\n\tif (match.status === \"pending\") {\n\t\tif (router.ssr && !canWrapInSuspense(router, route, match.ssr)) return out;\n\t\tif (router._tx) throw router._tx[5];\n\t\treturn renderPending(router, route);\n\t}\n\tif (match.status === \"notFound\") return renderRouteNotFound(router, route, match.error);\n\tif (match.status === \"error\") {\n\t\tif (isServer ?? router.isServer) {\n\t\t\tconst errorElement = /* @__PURE__ */ jsx((route.options.errorComponent ?? router.options.defaultErrorComponent) || ErrorComponent, {\n\t\t\t\terror: match.error,\n\t\t\t\treset: void 0,\n\t\t\t\tinfo: { componentStack: \"\" }\n\t\t\t});\n\t\t\treturn process.env.NODE_ENV !== \"production\" ? wrapInNonRouteComponentContext(errorElement, \"errorComponent\") : errorElement;\n\t\t}\n\t\tthrow match.error;\n\t}\n\treturn out;\n});\n/**\n* Render the next child match in the route tree. Typically used inside\n* a route component to render nested routes.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/outletComponent\n*/\nvar Outlet = React$1.memo(function OutletImpl() {\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tconst nonRouteComponent = React$1.useContext(nonRouteComponentContext);\n\t\tif (nonRouteComponent) console.warn(`Warning: An <Outlet /> was rendered inside a ${nonRouteComponent}. <Outlet /> should only be rendered inside a route component.`);\n\t}\n\tconst router = useRouter();\n\tconst routeId = React$1.useContext(matchContext);\n\tlet parentGlobalNotFound;\n\tlet parentNotFoundError;\n\tlet childRouteId;\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\tconst parentIndex = matches.findIndex((match) => match.routeId === routeId);\n\t\tconst parentMatch = matches[parentIndex];\n\t\tparentGlobalNotFound = !!parentMatch._notFound;\n\t\tparentNotFoundError = parentMatch.error;\n\t\tchildRouteId = matches[parentIndex + 1]?.routeId;\n\t} else {\n\t\tconst parentMatchStore = router.stores.getMatchStore(routeId);\n\t\t[parentGlobalNotFound, parentNotFoundError] = useStore(parentMatchStore, (match) => [!!match._notFound, match.error], outletMatchSelectionEqual);\n\t\tchildRouteId = useStore(router.stores.ids, (ids) => {\n\t\t\treturn ids[ids.indexOf(routeId) + 1];\n\t\t});\n\t}\n\tif (parentGlobalNotFound) return renderRouteNotFound(router, router.routesById[routeId], parentNotFoundError);\n\tif (!childRouteId) return null;\n\tconst nextMatch = /* @__PURE__ */ jsx(Match, { routeId: childRouteId });\n\tif (routeId === rootRouteId) return /* @__PURE__ */ jsx(React$1.Suspense, {\n\t\tfallback: renderPending(router),\n\t\tchildren: nextMatch\n\t});\n\treturn nextMatch;\n});\n//#endregion\nexport { Match, Outlet, renderPending };\n\n//# sourceMappingURL=Match.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { getLocationChangeInfo, trimPathRight } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\n//#region src/Transitioner.tsx\nfunction settleOwner(owner, rendered) {\n\tconst settle = owner[1];\n\towner.length = 0;\n\tsettle?.(rendered);\n}\nfunction Transitioner({ t }) {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered ??= [];\n\tconst mounted = process.env.NODE_ENV !== \"production\" ? React$1.useRef(false) : void 0;\n\trouter.startTransition = (fn, expected) => new Promise((resolve) => {\n\t\tsettleOwner(acknowledgement, false);\n\t\tacknowledgement.push(expected, resolve);\n\t\tt(router);\n\t\tReact$1.startTransition(fn);\n\t});\n\tuseLayoutEffect(() => {\n\t\tconst unsub = router.history.subscribe(router.load);\n\t\tif (mounted?.current) return unsub;\n\t\tif (mounted) mounted.current = true;\n\t\trouter.updateLatestLocation();\n\t\tconst location = router.latestLocation;\n\t\tconst nextLocation = router.buildLocation({\n\t\t\tto: location.pathname,\n\t\t\tsearch: true,\n\t\t\tparams: true,\n\t\t\thash: true,\n\t\t\tstate: true,\n\t\t\t_includeValidateSearch: true\n\t\t});\n\t\tif (trimPathRight(location.publicHref) !== trimPathRight(nextLocation.publicHref)) {\n\t\t\trouter.commitLocation({\n\t\t\t\t...nextLocation,\n\t\t\t\treplace: true,\n\t\t\t\tignoreBlocker: true\n\t\t\t});\n\t\t\treturn unsub;\n\t\t}\n\t\tconst resolvedLocation = router.stores.resolvedLocation.get();\n\t\tif (resolvedLocation?.href === location.href && resolvedLocation.state.__TSR_key === location.state.__TSR_key) acknowledgement.push(router.stores.matches.get(), (rendered) => {\n\t\t\tif (rendered) router.emit({\n\t\t\t\ttype: \"onRendered\",\n\t\t\t\t...getLocationChangeInfo(resolvedLocation, resolvedLocation)\n\t\t\t});\n\t\t});\n\t\telse if (!router._tx) router.load().catch(console.error);\n\t\treturn unsub;\n\t}, [router, router.history]);\n\treturn null;\n}\n//#endregion\nexport { Transitioner, settleOwner };\n\n//# sourceMappingURL=Transitioner.js.map","\"use client\";\nimport { useLayoutEffect } from \"./utils.js\";\nimport { CatchBoundary } from \"./CatchBoundary.js\";\nimport { matchContext } from \"./matchContext.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { Transitioner, settleOwner } from \"./Transitioner.js\";\nimport { SafeFragment } from \"./SafeFragment.js\";\nimport { Match, renderPending } from \"./Match.js\";\nimport { rootRouteId } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Matches.tsx\n/**\n* Internal component that renders the router's active match tree with\n* suspense, error, and not-found boundaries. Rendered by `RouterProvider`.\n*/\nfunction Matches() {\n\tconst router = useRouter();\n\tconst rootRoute = router.routesById[rootRouteId];\n\tconst pendingElement = renderPending(router, rootRoute);\n\tconst ResolvedSuspense = (isServer ?? router.isServer) || router.ssr ? SafeFragment : React$1.Suspense;\n\tconst inner = /* @__PURE__ */ jsxs(Fragment, { children: [!(isServer ?? router.isServer) && /* @__PURE__ */ jsx(Transitioner, { t: React$1.useState()[1] }), /* @__PURE__ */ jsx(ResolvedSuspense, {\n\t\tfallback: pendingElement,\n\t\tchildren: /* @__PURE__ */ jsx(MatchesInner, {})\n\t})] });\n\treturn router.options.InnerWrap ? /* @__PURE__ */ jsx(router.options.InnerWrap, { children: inner }) : inner;\n}\nfunction MatchesInner() {\n\tconst router = useRouter();\n\tconst acknowledgement = router._rendered;\n\tconst matches = isServer ?? router.isServer ? router.stores.matches.get() : useStore(router.stores.matches, (value) => acknowledgement[0] ?? value);\n\tconst match = matches[0];\n\tconst routeId = match?.routeId;\n\tuseLayoutEffect(() => {\n\t\tif (acknowledgement[0] === matches) settleOwner(acknowledgement, true);\n\t}, [acknowledgement, matches]);\n\tconst matchComponent = routeId ? /* @__PURE__ */ jsx(Match, { routeId }) : null;\n\treturn /* @__PURE__ */ jsx(matchContext.Provider, {\n\t\tvalue: routeId,\n\t\tchildren: router.options.disableGlobalCatchBoundary ? matchComponent : /* @__PURE__ */ jsx(CatchBoundary, {\n\t\t\tgetResetKey: () => match,\n\t\t\tonCatch: process.env.NODE_ENV !== \"production\" ? (error) => {\n\t\t\t\tconsole.warn(`Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`);\n\t\t\t\tconsole.warn(`Warning: ${error.message || error.toString()}`);\n\t\t\t} : void 0,\n\t\t\tchildren: matchComponent\n\t\t})\n\t});\n}\n/**\n* Create a matcher function for testing locations against route definitions.\n*\n* The returned function accepts standard navigation options (`to`, `params`,\n* `search`, etc.) and returns either `false` (no match) or the matched params\n* object when the route matches the current or pending location.\n*\n* Useful for conditional rendering and active UI states because it subscribes\n* the component to the router state used for matching. The returned function's\n* identity changes when that state changes. For imperative checks in event\n* handlers, get the router with `useRouter` and call `router.matchRoute(...)`\n* to avoid that subscription.\n*\n* @returns A `matchRoute(options)` function that returns `false` or params.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useMatchRouteHook\n*/\nfunction useMatchRoute() {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) return (opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t};\n\treturn React$1.useCallback((opts) => {\n\t\tconst { pending, caseSensitive, fuzzy, includeSearch, ...rest } = opts;\n\t\treturn router.matchRoute(rest, {\n\t\t\tpending,\n\t\t\tcaseSensitive,\n\t\t\tfuzzy,\n\t\t\tincludeSearch\n\t\t});\n\t}, [\n\t\trouter,\n\t\tuseStore(router.stores.location, (location) => location.href),\n\t\tuseStore(router.stores.resolvedLocation, (location) => location?.href),\n\t\tuseStore(router.stores.status, (status) => status)\n\t]);\n}\n/**\n* Component that conditionally renders its children based on whether a route\n* matches the provided `from`/`to` options. If `children` is a function, it\n* receives the matched params object.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/matchRouteComponent\n*/\nfunction MatchRoute(props) {\n\tconst params = useMatchRoute()(props);\n\tif (typeof props.children === \"function\") return props.children(params);\n\treturn params ? props.children : null;\n}\nfunction useMatches(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst matches = router.stores.matches.get();\n\t\treturn opts?.select ? opts.select(matches) : matches;\n\t}\n\treturn useStore(router.stores.matches, useStructuralSharing(opts, router));\n}\n/**\n* Read the presented route matches above the current match, or select a\n* derived value from them.\n*/\nfunction useParentMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(0, matches.findIndex((d) => d.routeId === contextRouteId));\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n/**\n* Read the presented route matches below the current match, or select a\n* derived value from them.\n*/\nfunction useChildMatches(opts) {\n\tconst contextRouteId = React$1.useContext(matchContext);\n\treturn useMatches({\n\t\tselect: (matches) => {\n\t\t\tmatches = matches.slice(matches.findIndex((d) => d.routeId === contextRouteId) + 1);\n\t\t\treturn opts?.select ? opts.select(matches) : matches;\n\t\t},\n\t\tstructuralSharing: opts?.structuralSharing\n\t});\n}\n//#endregion\nexport { MatchRoute, Matches, useChildMatches, useMatchRoute, useMatches, useParentMatches };\n\n//# sourceMappingURL=Matches.js.map","import { createNonReactiveMutableStore, createNonReactiveReadonlyStore } from \"@tanstack/router-core\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { batch, createAtom } from \"@tanstack/react-store\";\n//#region src/routerStores.ts\nvar getStoreFactory = (opts) => {\n\tif (isServer ?? opts.isServer) return {\n\t\tcreateMutableStore: createNonReactiveMutableStore,\n\t\tcreateReadonlyStore: createNonReactiveReadonlyStore,\n\t\tbatch: (fn) => fn()\n\t};\n\treturn {\n\t\tcreateMutableStore: createAtom,\n\t\tcreateReadonlyStore: createAtom,\n\t\tbatch\n\t};\n};\n//#endregion\nexport { getStoreFactory };\n\n//# sourceMappingURL=routerStores.js.map","import { getStoreFactory } from \"./routerStores.js\";\nimport { RouterCore } from \"@tanstack/router-core\";\n//#region src/router.ts\n/**\n* Creates a new Router instance for React.\n*\n* Pass the returned router to `RouterProvider` to enable routing.\n* Notable options: `routeTree` (your route definitions) and `context`\n* (required if the root route was created with `createRootRouteWithContext`).\n*\n* @param options Router options used to configure the router.\n* @returns A Router instance to be provided to `RouterProvider`.\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nvar createRouter = (options) => {\n\treturn new Router(options);\n};\nvar Router = class extends RouterCore {\n\tconstructor(options) {\n\t\tsuper(options, getStoreFactory);\n\t}\n};\n//#endregion\nexport { Router, createRouter };\n\n//# sourceMappingURL=router.js.map","\"use client\";\nimport { routerContext } from \"./routerContext.js\";\nimport { Matches } from \"./Matches.js\";\nimport { hasKeys } from \"@tanstack/router-core\";\nimport \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/RouterProvider.tsx\n/**\n* Low-level provider that places the router into React context and optionally\n* updates router options from props. Most apps should use `RouterProvider`.\n*/\nfunction RouterContextProvider({ router, children, ...rest }) {\n\tif (hasKeys(rest)) router.update({\n\t\t...router.options,\n\t\t...rest,\n\t\tcontext: {\n\t\t\t...router.options.context,\n\t\t\t...rest.context\n\t\t}\n\t});\n\tconst provider = /* @__PURE__ */ jsx(routerContext.Provider, {\n\t\tvalue: router,\n\t\tchildren\n\t});\n\tif (router.options.Wrap) return /* @__PURE__ */ jsx(router.options.Wrap, { children: provider });\n\treturn provider;\n}\n/**\n* Renders the current match presentation and provides the router to the React\n* tree via context.\n*\n* Accepts the same options as `createRouter` via props to update the router\n* instance after creation.\n*\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouterFunction\n*/\nfunction RouterProvider({ router, ...rest }) {\n\treturn /* @__PURE__ */ jsx(RouterContextProvider, {\n\t\trouter,\n\t\t...rest,\n\t\tchildren: /* @__PURE__ */ jsx(Matches, {})\n\t});\n}\n//#endregion\nexport { RouterContextProvider, RouterProvider };\n\n//# sourceMappingURL=RouterProvider.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useRouterState.tsx\n/**\n* Subscribe to the router's state store with optional selection and\n* structural sharing for render optimization.\n*\n* Options:\n* - `select`: Project the full router state to a derived slice\n* - `structuralSharing`: Replace-equal semantics for stable references\n* - `router`: Read state from a specific router instance instead of context\n*\n* @returns The selected router state (or the full state by default).\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterStateHook\n*/\nfunction useRouterState(opts) {\n\tconst contextRouter = useRouter({ warn: opts?.router === void 0 });\n\tconst router = opts?.router || contextRouter;\n\tif (isServer ?? router.isServer) {\n\t\tconst state = router.stores.__store.get();\n\t\treturn opts?.select ? opts.select(state) : state;\n\t}\n\treturn useStore(router.stores.__store, useStructuralSharing(opts, router));\n}\n//#endregion\nexport { useRouterState };\n\n//# sourceMappingURL=useRouterState.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { useStructuralSharing } from \"./useMatch.js\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/useLocation.tsx\n/**\n* Read the current location from the router state with optional selection.\n* Useful for subscribing to just the pieces of location you care about.\n*\n* Options:\n* - `select`: Project the `location` object to a derived value\n* - `structuralSharing`: Enable structural sharing for stable references\n*\n* @returns The current location (or selected value).\n* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLocationHook\n*/\nfunction useLocation(opts) {\n\tconst router = useRouter();\n\tif (isServer ?? router.isServer) {\n\t\tconst location = router.stores.location.get();\n\t\treturn opts?.select ? opts.select(location) : location;\n\t}\n\treturn useStore(router.stores.location, useStructuralSharing(opts, router));\n}\n//#endregion\nexport { useLocation };\n\n//# sourceMappingURL=useLocation.js.map","\"use client\";\nimport { useHydrated } from \"./ClientOnly.js\";\nimport { useRouter } from \"./useRouter.js\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { jsx } from \"react/jsx-runtime\";\n//#region src/Asset.tsx\nvar INLINE_CSS_HYDRATION_ATTR = \"data-tsr-inline-css\";\nvar noopScriptHandler = () => {};\nfunction setScriptAttrs(script, attrs) {\n\tif (!attrs) return;\n\tfor (const [key, value] of Object.entries(attrs)) if (key !== \"suppressHydrationWarning\" && value !== void 0 && value !== false) script.setAttribute(key, typeof value === \"boolean\" ? \"\" : String(value));\n}\nfunction Asset(asset) {\n\tconst { attrs, children, nonce, preventScriptHoist } = asset;\n\tswitch (asset.tag) {\n\t\tcase \"title\": return /* @__PURE__ */ jsx(\"title\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true,\n\t\t\tchildren\n\t\t});\n\t\tcase \"meta\": return /* @__PURE__ */ jsx(\"meta\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tcase \"link\": return /* @__PURE__ */ jsx(\"link\", {\n\t\t\t...attrs,\n\t\t\tprecedence: attrs?.precedence ?? (attrs?.rel === \"stylesheet\" ? \"default\" : void 0),\n\t\t\tnonce,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tcase \"style\":\n\t\t\tif (asset.inlineCss && (process.env.TSS_INLINE_CSS_ENABLED === \"true\" || process.env.TSS_INLINE_CSS_ENABLED === void 0 && isServer)) return /* @__PURE__ */ jsx(InlineCssStyle, {\n\t\t\t\tattrs,\n\t\t\t\tnonce,\n\t\t\t\tchildren\n\t\t\t});\n\t\t\treturn /* @__PURE__ */ jsx(\"style\", {\n\t\t\t\t...attrs,\n\t\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\t\tnonce\n\t\t\t});\n\t\tcase \"script\": return /* @__PURE__ */ jsx(Script, {\n\t\t\tattrs,\n\t\t\tpreventScriptHoist,\n\t\t\tchildren\n\t\t});\n\t\tdefault: return null;\n\t}\n}\nfunction InlineCssStyle({ attrs, children, nonce }) {\n\tconst isInlineCssPlaceholder = children === void 0;\n\tconst [hydratedInlineCss] = React$1.useState(() => {\n\t\tif (!isInlineCssPlaceholder || typeof document === \"undefined\") return;\n\t\treturn document.querySelector(`style[${INLINE_CSS_HYDRATION_ATTR}]`)?.textContent ?? void 0;\n\t});\n\tconst html = isInlineCssPlaceholder ? hydratedInlineCss ?? \"\" : children ?? \"\";\n\treturn /* @__PURE__ */ jsx(\"style\", {\n\t\t...attrs,\n\t\t[INLINE_CSS_HYDRATION_ATTR]: \"\",\n\t\tdangerouslySetInnerHTML: { __html: html },\n\t\tnonce,\n\t\tsuppressHydrationWarning: true\n\t});\n}\nfunction Script({ attrs, children, preventScriptHoist }) {\n\tconst router = useRouter();\n\tconst hydrated = useHydrated();\n\tconst dataScript = typeof attrs?.type === \"string\" && attrs.type !== \"\" && attrs.type !== \"text/javascript\" && attrs.type !== \"module\";\n\tif (process.env.NODE_ENV !== \"production\" && attrs?.src && typeof children === \"string\" && children.trim().length) console.warn(\"[TanStack Router] <Script> received both `src` and `children`. The `children` content will be ignored. Remove `children` or remove `src`.\");\n\tReact$1.useEffect(() => {\n\t\tif (dataScript) return;\n\t\tif (attrs?.src) {\n\t\t\tconst normSrc = (() => {\n\t\t\t\ttry {\n\t\t\t\t\tconst base = document.baseURI || window.location.href;\n\t\t\t\t\treturn new URL(attrs.src, base).href;\n\t\t\t\t} catch {\n\t\t\t\t\treturn attrs.src;\n\t\t\t\t}\n\t\t\t})();\n\t\t\tfor (const el of document.querySelectorAll(\"script[src]\")) if (el.src === normSrc) return;\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tsetScriptAttrs(script, attrs);\n\t\t\tdocument.head.appendChild(script);\n\t\t\treturn () => script.remove();\n\t\t}\n\t\tif (typeof children === \"string\") {\n\t\t\tconst typeAttr = typeof attrs?.type === \"string\" ? attrs.type : \"text/javascript\";\n\t\t\tconst nonceAttr = typeof attrs?.nonce === \"string\" ? attrs.nonce : void 0;\n\t\t\tfor (const el of document.querySelectorAll(\"script:not([src])\")) {\n\t\t\t\tif (!(el instanceof HTMLScriptElement)) continue;\n\t\t\t\tconst sType = el.getAttribute(\"type\") ?? \"text/javascript\";\n\t\t\t\tconst sNonce = el.getAttribute(\"nonce\") ?? void 0;\n\t\t\t\tif (el.textContent === children && sType === typeAttr && sNonce === nonceAttr) return;\n\t\t\t}\n\t\t\tconst script = document.createElement(\"script\");\n\t\t\tscript.textContent = children;\n\t\t\tsetScriptAttrs(script, attrs);\n\t\t\tdocument.head.appendChild(script);\n\t\t\treturn () => script.remove();\n\t\t}\n\t}, [\n\t\tattrs,\n\t\tchildren,\n\t\tdataScript\n\t]);\n\tif (isServer ?? router.isServer) {\n\t\tif (attrs?.src) {\n\t\t\tif (!preventScriptHoist) return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t\t...attrs,\n\t\t\t\tsuppressHydrationWarning: true\n\t\t\t});\n\t\t\treturn /* @__PURE__ */ jsx(\"script\", {\n\t\t\t\t...attrs,\n\t\t\t\tonLoad: noopScriptHandler,\n\t\t\t\tsuppressHydrationWarning: true\n\t\t\t});\n\t\t}\n\t\tif (typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\treturn null;\n\t}\n\tif (dataScript && typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t...attrs,\n\t\tsuppressHydrationWarning: true,\n\t\tdangerouslySetInnerHTML: { __html: children }\n\t});\n\tif (!hydrated) {\n\t\tif (attrs?.src) return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t\tif (typeof children === \"string\") return /* @__PURE__ */ jsx(\"script\", {\n\t\t\t...attrs,\n\t\t\tdangerouslySetInnerHTML: { __html: children },\n\t\t\tsuppressHydrationWarning: true\n\t\t});\n\t}\n\treturn null;\n}\n//#endregion\nexport { Asset };\n\n//# sourceMappingURL=Asset.js.map","import { useRouter } from \"./useRouter.js\";\nimport { _getAssetMatches, appendUniqueUserTags, deepEqual, escapeHtml, getAssetCrossOrigin, getScriptPreloadAttrs, resolveManifestCssLink } from \"@tanstack/router-core\";\nimport * as React$1 from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/headContentUtils.tsx\nfunction buildTagsFromMatches(router, nonce, matches, assetCrossOrigin) {\n\tmatches = _getAssetMatches(matches);\n\tconst routeMeta = matches.map((match) => match.meta).filter((meta) => meta !== void 0);\n\tconst resultMeta = [];\n\tconst metaByAttribute = {};\n\tlet title;\n\tfor (let i = routeMeta.length - 1; i >= 0; i--) {\n\t\tconst metas = routeMeta[i];\n\t\tfor (let j = metas.length - 1; j >= 0; j--) {\n\t\t\tconst m = metas[j];\n\t\t\tif (!m) continue;\n\t\t\tif (m.title) {\n\t\t\t\tif (!title) title = {\n\t\t\t\t\ttag: \"title\",\n\t\t\t\t\tchildren: m.title\n\t\t\t\t};\n\t\t\t} else if (\"script:ld+json\" in m) try {\n\t\t\t\tconst json = JSON.stringify(m[\"script:ld+json\"]);\n\t\t\t\tresultMeta.push({\n\t\t\t\t\ttag: \"script\",\n\t\t\t\t\tattrs: { type: \"application/ld+json\" },\n\t\t\t\t\tchildren: escapeHtml(json)\n\t\t\t\t});\n\t\t\t} catch {}\n\t\t\telse {\n\t\t\t\tconst attribute = m.name ?? m.property;\n\t\t\t\tif (attribute) if (metaByAttribute[attribute]) continue;\n\t\t\t\telse metaByAttribute[attribute] = true;\n\t\t\t\tresultMeta.push({\n\t\t\t\t\ttag: \"meta\",\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\t...m,\n\t\t\t\t\t\tnonce\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\tif (title) resultMeta.push(title);\n\tif (nonce) resultMeta.push({\n\t\ttag: \"meta\",\n\t\tattrs: {\n\t\t\tproperty: \"csp-nonce\",\n\t\t\tcontent: nonce\n\t\t}\n\t});\n\tresultMeta.reverse();\n\tconst constructedLinks = matches.flatMap((match) => match.links ?? []).filter((link) => link !== void 0).map((link) => ({\n\t\ttag: \"link\",\n\t\tattrs: {\n\t\t\t...link,\n\t\t\tnonce\n\t\t}\n\t}));\n\tconst manifest = router.ssr?.manifest;\n\tconst manifestCssTags = [];\n\tif (manifest) {\n\t\tmatches.forEach((match) => {\n\t\t\t(manifest.routes[match.routeId]?.css)?.forEach((link) => {\n\t\t\t\tconst resolvedLink = resolveManifestCssLink(link);\n\t\t\t\tmanifestCssTags.push({\n\t\t\t\t\ttag: \"link\",\n\t\t\t\t\tattrs: {\n\t\t\t\t\t\trel: \"stylesheet\",\n\t\t\t\t\t\t...resolvedLink,\n\t\t\t\t\t\tcrossOrigin: getAssetCrossOrigin(assetCrossOrigin, \"stylesheet\") ?? resolvedLink.crossOrigin,\n\t\t\t\t\t\tsuppressHydrationWarning: true,\n\t\t\t\t\t\tnonce\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\tif (manifest.inlineStyle) manifestCssTags.push({\n\t\t\ttag: \"style\",\n\t\t\tattrs: {\n\t\t\t\t...manifest.inlineStyle.attrs,\n\t\t\t\tnonce\n\t\t\t},\n\t\t\tchildren: manifest.inlineStyle.children,\n\t\t\tinlineCss: true\n\t\t});\n\t}\n\tconst preloadLinks = [];\n\tif (manifest) matches.forEach((match) => {\n\t\tmanifest.routes[match.routeId]?.preloads?.forEach((preload) => {\n\t\t\tpreloadLinks.push({\n\t\t\t\ttag: \"link\",\n\t\t\t\tattrs: {\n\t\t\t\t\t...getScriptPreloadAttrs(manifest, preload, assetCrossOrigin),\n\t\t\t\t\tnonce\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\tconst styles = matches.flatMap((match) => match.styles ?? []).filter((style) => style !== void 0).map(({ children, ...attrs }) => ({\n\t\ttag: \"style\",\n\t\tattrs: {\n\t\t\t...attrs,\n\t\t\tnonce\n\t\t},\n\t\tchildren\n\t}));\n\tconst headScripts = matches.flatMap((match) => match.headScripts ?? []).filter((script) => script !== void 0).map(({ children, ...script }) => ({\n\t\ttag: \"script\",\n\t\tattrs: {\n\t\t\t...script,\n\t\t\tnonce\n\t\t},\n\t\tchildren\n\t}));\n\tconst tags = [];\n\tappendUniqueUserTags(tags, resultMeta);\n\ttags.push(...preloadLinks);\n\tappendUniqueUserTags(tags, constructedLinks);\n\ttags.push(...manifestCssTags);\n\tappendUniqueUserTags(tags, styles);\n\tappendUniqueUserTags(tags, headScripts);\n\treturn tags;\n}\n/**\n* Build the head/link/meta/script tags from the renderable presented prefix.\n* Used internally by `HeadContent`.\n*/\nvar useTags = (assetCrossOrigin) => {\n\tconst router = useRouter();\n\tconst nonce = router.options.ssr?.nonce;\n\tif (isServer ?? router.isServer) return buildTagsFromMatches(router, nonce, router.stores.matches.get(), assetCrossOrigin);\n\tconst selectTags = React$1.useCallback((matches) => buildTagsFromMatches(router, nonce, matches, assetCrossOrigin), [\n\t\tassetCrossOrigin,\n\t\tnonce,\n\t\trouter\n\t]);\n\treturn useStore(router.stores.matches, selectTags, deepEqual);\n};\n//#endregion\nexport { useTags };\n\n//# sourceMappingURL=headContentUtils.js.map","\"use client\";\nimport { useRouter } from \"./useRouter.js\";\nimport { Asset } from \"./Asset.js\";\nimport { useTags } from \"./headContentUtils.js\";\nimport { createElement } from \"react\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\n//#region src/HeadContent.tsx\n/**\n* Render route-managed head tags (title, meta, links, styles, head scripts).\n* Place inside the document head of your app shell.\n* @link https://tanstack.com/router/latest/docs/framework/react/guide/document-head-management\n*/\nfunction HeadContent(props) {\n\tconst tags = useTags(props.assetCrossOrigin);\n\tconst nonce = useRouter().options.ssr?.nonce;\n\treturn /* @__PURE__ */ jsx(Fragment, { children: tags.map((tag) => /* @__PURE__ */ createElement(Asset, {\n\t\t...tag,\n\t\tkey: `tsr-meta-${JSON.stringify(tag)}`,\n\t\tnonce\n\t})) });\n}\n//#endregion\nexport { HeadContent };\n\n//# sourceMappingURL=HeadContent.js.map","import { useRouter } from \"./useRouter.js\";\nimport { Asset } from \"./Asset.js\";\nimport { _getAssetMatches, deepEqual } from \"@tanstack/router-core\";\nimport { createElement } from \"react\";\nimport { isServer } from \"@tanstack/router-core/isServer\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nimport { useStore } from \"@tanstack/react-store\";\n//#region src/Scripts.tsx\n/**\n* Render body script tags collected from route matches and SSR manifests.\n* Should be placed near the end of the document body.\n*/\nvar Scripts = () => {\n\tconst router = useRouter();\n\tconst nonce = router.options.ssr?.nonce;\n\tconst getScripts = (matches) => {\n\t\tmatches = _getAssetMatches(matches);\n\t\tconst scripts = matches.flatMap((match) => match.scripts ?? []).filter(Boolean).map(({ children, ...script }) => ({\n\t\t\ttag: \"script\",\n\t\t\tattrs: {\n\t\t\t\t...script,\n\t\t\t\tsuppressHydrationWarning: true,\n\t\t\t\tnonce\n\t\t\t},\n\t\t\tchildren\n\t\t}));\n\t\tconst manifest = router.ssr?.manifest;\n\t\tif (!manifest) return scripts;\n\t\tfor (const match of matches) {\n\t\t\tconst manifestScripts = manifest.routes[match.routeId]?.scripts;\n\t\t\tif (!manifestScripts) continue;\n\t\t\tfor (const asset of manifestScripts) scripts.push({\n\t\t\t\ttag: \"script\",\n\t\t\t\tattrs: {\n\t\t\t\t\t...asset.attrs,\n\t\t\t\t\tnonce\n\t\t\t\t},\n\t\t\t\tchildren: asset.children,\n\t\t\t\t...typeof asset.attrs?.src === \"string\" ? { preventScriptHoist: true } : {}\n\t\t\t});\n\t\t}\n\t\treturn scripts;\n\t};\n\tif (isServer ?? router.isServer) return renderScripts(router, getScripts(router.stores.matches.get()));\n\treturn renderScripts(router, useStore(router.stores.matches, getScripts, deepEqual));\n};\nfunction renderScripts(router, scripts) {\n\tif ((isServer ?? router.isServer) && router.serverSsr) {\n\t\tconst serverBufferedScript = router.serverSsr.takeBufferedScripts();\n\t\tif (serverBufferedScript) scripts.unshift(serverBufferedScript);\n\t}\n\treturn /* @__PURE__ */ jsx(Fragment, { children: scripts.map((asset, i) => /* @__PURE__ */ createElement(Asset, {\n\t\t...asset,\n\t\tkey: `tsr-scripts-${asset.tag}-${i}`\n\t})) });\n}\n//#endregion\nexport { Scripts };\n\n//# sourceMappingURL=Scripts.js.map","import type { ILocale } from '@luwiostack/locale'\nimport type { AnyRoute, AnyRouter } from '@tanstack/react-router'\nimport type { RouterConfig } from './create-router'\nimport type { RouteRegistry } from './registry'\n\n/** The locale metadata a router was built with — needed by {@link useRouter} to compute hrefs. */\nexport interface RouterMeta {\n registry: RouteRegistry\n config: RouterConfig\n /** The ids actually mounted — the registry minus anything dropped by `config.exclude`. */\n mounted: ReadonlySet<string>\n}\n\n// Keyed by the router instance so a built router carries its own registry + config without any public\n// API change. A WeakMap lets the metadata be garbage-collected alongside the router.\nconst store = new WeakMap<AnyRouter, RouterMeta>()\n\n/** Stamp the locale metadata onto a router. Called by {@link createRouter}. */\nexport function setRouterMeta(router: AnyRouter, meta: RouterMeta): void {\n store.set(router, meta)\n}\n\n/** Read the locale metadata off a router, if it was built by {@link createRouter}. */\nexport function getRouterMeta(router: AnyRouter): RouterMeta | undefined {\n return store.get(router)\n}\n\n/** Which of our routes a built TanStack route is, and the locale sub-tree it was mounted in. */\nexport interface RouteTag {\n id: string\n locale: ILocale\n}\n\n// The same trick per route: createRouter tags every TanStack route it builds from a RouteBuilder, so a\n// path TanStack matched can be mapped back to our route id. Synthetic routes (the locale layout, the\n// 404 catch-all, excluded-forbidden guards, legacy redirects) stay untagged: they aren't pages.\nconst tags = new WeakMap<AnyRoute, RouteTag>()\n\n/** Tag a built route with the route id + locale it came from. Called by {@link createRouter}. */\nexport function tagRoute(route: AnyRoute, tag: RouteTag): void {\n tags.set(route, tag)\n}\n\n/** The route id + locale a built route came from, or `undefined` for a synthetic route. */\nexport function getRouteTag(route: AnyRoute | undefined): RouteTag | undefined {\n return route ? tags.get(route) : undefined\n}\n","import type { AnyRouter } from '@tanstack/react-router'\nimport type { RouteRegistry } from './registry'\nimport type { RoutePageViewCtx } from './route-builder'\nimport { getRouteTag } from './router-meta'\n\ninterface ResolvedMatch {\n routeId: string\n params?: Record<string, string>\n search?: Record<string, unknown>\n context?: Record<string, unknown>\n meta?: ReadonlyArray<{ title?: string } | undefined>\n}\n\n/**\n * Call the leaf route's own `onPageView` for each page the visitor lands on: once for the first load,\n * then once per navigation that resolves to a different path or query string. A hash-only change\n * isn't a new page, and neither is a re-resolve of the same URL. Synthetic routes (the 404 catch-all,\n * a forbidden guard, a legacy redirect) are skipped; the page they redirect to is reported instead.\n * The title is the route's resolved `title()`, ready before `<HeadContent>` updates `document.title`.\n *\n * Subscribed by `createRouter` itself, before the router first loads, so the first page counts.\n */\nexport function reportPageViews(router: AnyRouter, registry: RouteRegistry): void {\n let lastKey: string | undefined\n router.subscribe('onResolved', ({ toLocation }) => {\n const key = `${toLocation.pathname}?${toLocation.searchStr}`\n if (key === lastKey) return\n const leaf: ResolvedMatch | undefined = router.state.matches.at(-1)\n // Only the leaf is the page. An untagged leaf is synthetic (the 404 catch-all, a forbidden guard,\n // a legacy redirect): it redirects, and the page it lands on resolves — and is reported — next.\n // Never fall back to an ancestor: its onPageView belongs to its own page, not its children's.\n const tag = leaf ? getRouteTag(router.routesById[leaf.routeId]) : undefined\n if (!leaf || !tag) return\n lastKey = key\n const onPageView = registry.get(tag.id)?.options.onPageView as\n | ((ctx: RoutePageViewCtx) => void)\n | undefined\n onPageView?.({\n context: {\n routeId: tag.id,\n locale: tag.locale,\n ...(leaf.context ?? {}),\n } as RoutePageViewCtx['context'],\n params: { ...(leaf.params ?? {}) },\n search: { ...(leaf.search ?? {}) },\n title: (leaf.meta ?? []).find((m) => m?.title !== undefined)?.title ?? '',\n path: toLocation.pathname,\n href: toLocation.href,\n })\n })\n}\n","import { type ILocale, Locale } from '@luwiostack/locale'\nimport {\n type AnyRouter,\n notFound as tanstackNotFound,\n redirect as tanstackRedirect,\n useRouterState,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport type { RouterConfig, StatusPages } from './create-router'\nimport type { RouteRegistry } from './registry'\nimport type { RouteBuilder } from './route-builder'\nimport type { RouteFailure } from './route-hooks'\nimport { getRouterMeta, getRouteTag } from './router-meta'\n\n/** A full {@link ILocale}, or a locale code like `'nl-BE'`. */\nexport type LocaleInput = ILocale | string\n/** Path params — fill `$param` segments and the splat (`$` → `params['*']`). */\nexport type PathParams = Record<string, string>\n/** Query string params — `null`/`undefined` values are dropped. */\nexport type QueryParams = Record<string, string | number | boolean | null | undefined>\n\n/**\n * **Opt-in** route typing. Augment this interface (module augmentation) to map each route `id` to\n * its `params` and/or `search` shape; `href`, `path`, `absolute` and `navigate` then check the id,\n * require the right `params`, type `query`, and reject unknown ids. Leave it empty — the default —\n * and everything falls back to a loose `string` id + {@link PathParams} / {@link QueryParams}, so no\n * augmentation is required.\n *\n * @example\n * declare module '@luwiostack/router' {\n * interface RouteRegister {\n * about: {} // no params\n * 'blog.post': { params: { postId: string }; search: { page?: number } }\n * }\n * }\n */\n// biome-ignore lint/suspicious/noEmptyInterface: intentionally empty — consumers augment it.\nexport interface RouteRegister {}\n\n/** Every registered route id — or `string` while {@link RouteRegister} is left unaugmented. */\nexport type RouteId = [keyof RouteRegister] extends [never] ? string : keyof RouteRegister\n\n/** The `params` shape declared for an id in {@link RouteRegister}; loose {@link PathParams} otherwise. */\nexport type ParamsFor<Id extends RouteId> = Id extends keyof RouteRegister\n ? RouteRegister[Id] extends { params: infer P }\n ? P\n : PathParams\n : PathParams\n\n/** The `search` shape declared for an id in {@link RouteRegister}; loose {@link QueryParams} otherwise. */\nexport type SearchFor<Id extends RouteId> = Id extends keyof RouteRegister\n ? RouteRegister[Id] extends { search: infer S }\n ? S\n : QueryParams\n : QueryParams\n\n// `{ params }` — required when the id declares required params, optional otherwise (including the\n// unaugmented loose case, where `{}` is assignable to `PathParams`). The bare `{}` is deliberate\n// here: `{} extends T` is precisely the \"does T have no required keys?\" test.\ntype ParamsArg<Id extends RouteId> =\n // biome-ignore lint/complexity/noBannedTypes: `{} extends T` tests for no required keys\n {} extends ParamsFor<Id> ? { params?: ParamsFor<Id> } : { params: ParamsFor<Id> }\n\n/** Params for {@link IRouter.href}. */\nexport type HrefParams<Id extends RouteId = RouteId> = {\n /** A registered route id (e.g. `'about'`, `'blog.post'`). */\n id: Id\n /** Target locale. Defaults to the active locale. */\n locale?: LocaleInput\n query?: SearchFor<Id>\n hash?: string\n /**\n * Add the current page to the URL as `?referrer=`, so the page you're sending the user to can send\n * them back with {@link IRouter.goToReferrer}. Off unless you ask for it.\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.absolute}. */\nexport type AbsoluteHrefParams<Id extends RouteId = RouteId> = HrefParams<Id> & {\n /**\n * Origin to prepend. Defaults to the router's `origin` config (set it for SSR / pre-render), and\n * only then to `window.location.origin` in the browser.\n */\n baseUrl?: string\n}\n\n/** Params for {@link IRouter.path}. */\nexport type PathParamsInput<Id extends RouteId = RouteId> = {\n id: Id\n locale?: LocaleInput\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.navigate}. */\nexport type NavigateParams<Id extends RouteId = RouteId> = {\n /** Target route id (e.g. `'about'`, `'blog.post'`) — the same id `href` takes. */\n id: Id\n from?: string\n query?: SearchFor<Id>\n hash?: string\n /** Omit to stay in the active locale; set to navigate to that locale's path. */\n locale?: LocaleInput\n /** Replace the current history entry instead of pushing a new one. */\n replace?: boolean\n state?: Record<string, unknown>\n /** `'_blank'` opens the resolved absolute URL in a new tab. */\n target?: '_self' | '_blank'\n /**\n * Add the current page to the URL as `?referrer=`, so the page you're sending the user to can send\n * them back with {@link IRouter.goToReferrer}. Off unless you ask for it.\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Params for {@link IRouter.redirect} — the same id-based shape as {@link NavigateParams}. */\nexport type RedirectParams<Id extends RouteId = RouteId> = {\n /** Target route id (e.g. `'about'`, `'blog.post'`) — the same id `href` takes. */\n id: Id\n /** Omit to redirect within the active locale; set to target another locale's path. */\n locale?: LocaleInput\n query?: SearchFor<Id>\n hash?: string\n /** Replace the current history entry instead of pushing a new one. */\n replace?: boolean\n /** HTTP status code for the redirect (SSR). */\n statusCode?: number\n /**\n * Add the page being loaded to the URL as `?referrer=`: from a guard, the page the user was trying\n * to reach. The destination sends them back with {@link IRouter.goToReferrer}. Off by default for\n * `redirect()`; **on** by default for `forbidden()` (pass `referrer: false` to leave it out).\n */\n referrer?: boolean\n} & ParamsArg<Id>\n\n/** Options for {@link IRouter.referrer}, `canGoToReferrer` and `goToReferrer`. */\nexport interface ReferrerOptions {\n /**\n * Check this value instead of the current URL's `?referrer=` — e.g. one carried in an OAuth `state`.\n * It is just as untrusted, so it gets the same checks. Once `from` is given the URL isn't read at\n * all: `from: undefined` (nothing in `state`) means there is no referrer.\n */\n from?: string | null\n}\n\n/** A locale-aware router, returned by {@link useRouter}. */\nexport interface IRouter {\n /** The active locale. */\n locale: ILocale\n /** The active route's id — `undefined` before the first match resolves. */\n routeId: string | undefined\n /** Every locale this router was configured with. */\n locales: ILocale[]\n /**\n * Whether a route id is mounted in this router — i.e. registered and not dropped by\n * `config.exclude`. Pass a locale to also require the route be available in that locale (it and\n * its non-layout ancestors aliased there). Returns `false` for unknown ids rather than throwing.\n */\n has(id: string, locale?: LocaleInput): boolean\n /**\n * The locales a route id is available in — those it (and its non-layout ancestors) are aliased\n * for. Empty if the route was excluded. Use it to build a language switcher that only offers valid\n * locales, or hreflang alternates.\n */\n availableLocales(id: RouteId): ILocale[]\n /** Navigate to a route id (optionally in another locale). */\n navigate<Id extends RouteId>(params: NavigateParams<Id>): Promise<void>\n /**\n * A redirect to a route id, to **throw** from a `beforeLoad` / `loader` (or component) — same\n * id-based shape as {@link IRouter.navigate}. `throw router.redirect({ id: 'login' })`.\n */\n redirect<Id extends RouteId>(params: RedirectParams<Id>): ReturnType<typeof tanstackRedirect>\n /** A not-found result to **throw** from a `beforeLoad` / `loader`. `throw router.notFound()`. */\n notFound(options?: Parameters<typeof tanstackNotFound>[0]): ReturnType<typeof tanstackNotFound>\n /**\n * A **forbidden** result to **throw** from a `beforeLoad` / `loader` guard — a locale-aware redirect\n * to `statusPages[403]` (falling back to `statusPages.default` if 403 has no dedicated page).\n * `throw router.forbidden()`. It adds the page being loaded as `?referrer=` by default, so the 403\n * page (typically sign-in) can send the user back with {@link IRouter.goToReferrer}; pass\n * `referrer: false` to leave it out. The target page can read\n * `useRouteFailure()` for `{ status: 403 }`.\n */\n forbidden(params?: Omit<RedirectParams, 'id'>): ReturnType<typeof tanstackRedirect>\n /**\n * The **referrer**: the page in the current URL's `?referrer=` (added by `forbidden()`, or with\n * `referrer: true`),\n * turned back into a route — `{ id, params, query?, hash?, locale? }` — or `undefined` when there is\n * none or it isn't safe to follow. Not the browser's `document.referrer`, and not history.\n *\n * `?referrer=` is untrusted — anyone can link to `/sign-in?referrer=https://evil.example` — so it is\n * checked every time it's read: it must be a path on this site that the router serves with a page\n * (not another origin, not unknown, excluded or behind a 403 guard), and not the current route or\n * a `statusPages` page (a loop).\n *\n * The route has no `locale`, so it resolves in the **active** locale: someone who switched language\n * on the sign-in page goes back in the new one. It keeps its own locale only when the route doesn't\n * exist in the active one. It reads the raw query string, so no route has to declare `referrer` in\n * its `validateSearch`.\n *\n * Pass `from` to check a referrer that arrived some other way, such as inside an OAuth `state`\n * after the round trip through an identity provider. It gets exactly the same checks.\n *\n * @example\n * // sign-in route: already signed in? skip the page\n * const back = context.router.referrer()\n * if (getSession()) throw context.router.redirect(back ?? { id: 'dashboard' })\n */\n referrer(options?: ReferrerOptions): HrefParams<RouteId> | undefined\n /** Whether there is a safe {@link IRouter.referrer} to go to — the referrer twin of `canGoBack()`. */\n canGoToReferrer(options?: ReferrerOptions): boolean\n /**\n * Navigate to the {@link IRouter.referrer}; does nothing when there is none. The referrer twin of\n * `goBack()`, which follows browser history instead.\n *\n * @example\n * router.canGoToReferrer() ? router.goToReferrer({ replace: true }) : router.navigate({ id: 'dashboard' })\n */\n goToReferrer(options?: ReferrerOptions & { replace?: boolean }): Promise<void>\n /** Re-run the active route's loaders. */\n reload(): Promise<void>\n /** Navigate back in history. */\n goBack(): Promise<void>\n /** Whether there is history to go back to. */\n canGoBack(): boolean\n /** The localized pathname for a route id (no query/hash). */\n path<Id extends RouteId>(params: PathParamsInput<Id>): string\n /** A root-relative href: pathname + query + hash. */\n href<Id extends RouteId>(params: HrefParams<Id>): string\n /** An absolute URL: origin + href. */\n absolute<Id extends RouteId>(params: AbsoluteHrefParams<Id>): string\n}\n\n// The runtime is locale-parameterised and id-addressed, so the impl works in loose `string` terms;\n// this shape checks that impl, and useRouter() casts it up to the generic {@link IRouter} surface.\ninterface LooseRouter {\n locale: ILocale\n routeId: string | undefined\n locales: ILocale[]\n has(id: string, locale?: LocaleInput): boolean\n availableLocales(id: string): ILocale[]\n navigate(params: {\n id: string\n from?: string\n params?: PathParams\n query?: QueryParams\n hash?: string\n locale?: LocaleInput\n replace?: boolean\n state?: Record<string, unknown>\n target?: '_self' | '_blank'\n referrer?: boolean\n }): Promise<void>\n redirect(params: {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n referrer?: boolean\n }): ReturnType<typeof tanstackRedirect>\n notFound(options?: Parameters<typeof tanstackNotFound>[0]): ReturnType<typeof tanstackNotFound>\n forbidden(params?: {\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n referrer?: boolean\n }): ReturnType<typeof tanstackRedirect>\n referrer(options?: ReferrerOptions): LooseHref | undefined\n canGoToReferrer(options?: ReferrerOptions): boolean\n goToReferrer(options?: ReferrerOptions & { replace?: boolean }): Promise<void>\n reload(): Promise<void>\n goBack(): Promise<void>\n canGoBack(): boolean\n path(params: { id: string; locale?: LocaleInput; params?: PathParams }): string\n href(params: LooseHref): string\n absolute(params: LooseHref & { baseUrl?: string }): string\n}\n\ninterface LooseHref {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n referrer?: boolean\n}\n\n/** The query param the referrer travels in. */\nconst REFERRER = 'referrer'\n\n// A throwaway origin to parse a root-relative href against: if the parsed origin differs, the value\n// pointed at another host (`//evil`, `/\\evil`, an absolute URL).\nconst SAME_ORIGIN = 'http://same-origin.invalid'\n\n// Fill one segment from params. A named `$param` is required — missing it throws rather than\n// silently dropping the segment (which would yield a plausible but wrong URL). The splat `$` may\n// legitimately be empty (it then matches the route itself), so it falls back to ''.\nconst fillSegment = (seg: string, params: PathParams, id: string): string => {\n if (seg === '$') return params['*'] ?? ''\n if (!seg.startsWith('$')) return seg\n const name = seg.slice(1)\n const value = params[name]\n if (value == null) {\n throw new Error(`useRouter: route \"${id}\" requires path param \"${name}\".`)\n }\n return value\n}\n\n/**\n * root→self URL segments for a route id in a locale (layout routes contribute nothing).\n *\n * @throws If the parent chain is circular.\n */\nfunction segmentsFor(registry: RouteRegistry, id: string, locale: ILocale): string[] {\n const out: string[] = []\n const seen = new Set<string>()\n for (let b = registry.get(id); b; b = b.parent ? registry.get(b.parent) : undefined) {\n if (seen.has(b.id)) {\n throw new Error(`useRouter: route \"${id}\" has a circular parent chain (at \"${b.id}\").`)\n }\n seen.add(b.id)\n if (!b.layout) out.unshift(b.slugFor(locale))\n }\n return out\n}\n\n/**\n * Resolve a route id + locale to its localized pathname. Pure and exported for testing.\n *\n * `config` may be omitted — useful outside React (e.g. a route's `beforeLoad`, where `useRouter`\n * isn't available). Without it the path is always `/{locale}`-prefixed, the form that resolves in\n * every locale (including the unprefixed default). Pass `config` to honour `unprefixedDefault` and\n * strip the prefix for the default locale, exactly as {@link useRouter}'s `path` does.\n *\n * @throws If the id is not registered.\n */\nexport function routePath(\n registry: RouteRegistry,\n config: RouterConfig | undefined,\n id: string,\n locale: ILocale,\n params: PathParams = {},\n): string {\n if (!registry.get(id)) {\n throw new Error(`useRouter: unknown route id \"${id}\".`)\n }\n const body = segmentsFor(registry, id, locale)\n // An alias may itself be a multi-segment path (e.g. `'blog/$postId'`), so split before filling —\n // each `$param` / splat is resolved individually.\n .flatMap((slug) => slug.split('/'))\n .map((s) => fillSegment(s, params, id))\n .filter(Boolean)\n .join('/')\n const unprefixed = config?.unprefixedDefault === true && locale.code === config.defaultLocale.code\n const prefix = unprefixed ? '' : `/${locale.code}`\n return `${prefix}/${body}`.replace(/\\/{2,}/g, '/').replace(/(.)\\/$/, '$1') || '/'\n}\n\n/**\n * The locales a route id is available in: every configured locale for which the route and all of its\n * non-layout ancestors have an explicit alias. Pure and exported for testing.\n *\n * @throws If the id is not registered.\n */\nexport function availableLocales(\n registry: RouteRegistry,\n config: RouterConfig,\n id: string,\n): ILocale[] {\n if (!registry.get(id)) {\n throw new Error(`useRouter: unknown route id \"${id}\".`)\n }\n const chain: RouteBuilder[] = []\n const seen = new Set<string>()\n for (let b = registry.get(id); b; b = b.parent ? registry.get(b.parent) : undefined) {\n if (seen.has(b.id)) {\n throw new Error(`useRouter: route \"${id}\" has a circular parent chain (at \"${b.id}\").`)\n }\n seen.add(b.id)\n chain.push(b)\n }\n return config.locales.filter((loc) => chain.every((b) => b.layout || b.hasAlias(loc)))\n}\n\n/**\n * The route id {@link RouterConfig.statusPages} sends a given HTTP status to: that status's own\n * entry, else `default` (always present — {@link StatusPages} requires it). Pure and exported for\n * testing; used for 404, 403, and every `beforeLoad`/`loader` failure.\n */\nexport function statusPageFor(statusPages: StatusPages, status: number): string {\n return statusPages[status] ?? statusPages.default\n}\n\n// Drop `null`/`undefined` entries but keep the original value types — TanStack owns search\n// serialization for navigate(), so numbers/booleans must survive for a typed `validateSearch`.\nconst definedEntries = (query: QueryParams): [string, string | number | boolean][] =>\n Object.entries(query).filter(([, v]) => v != null) as [string, string | number | boolean][]\n\nconst cleanSearch = (query: QueryParams): Record<string, string | number | boolean> =>\n Object.fromEntries(definedEntries(query))\n\nconst suffix = (query?: QueryParams, hash?: string): string => {\n const qs = query\n ? new URLSearchParams(definedEntries(query).map(([k, v]) => [k, String(v)])).toString()\n : ''\n return `${qs ? `?${qs}` : ''}${hash ? `#${hash.replace(/^#/, '')}` : ''}`\n}\n\n/**\n * Resolve the origin for an absolute URL, SSR-safe: an explicit `baseUrl` wins, then the router's\n * `config.origin` (set it for SSR / pre-render), then `window.location.origin` in the browser, and\n * finally `''` on the server when no origin was configured — never touching `window` when it's\n * absent. The single source of truth for both the runtime router API and the head/canonical emitter.\n */\nexport const resolveOrigin = (config: RouterConfig, baseUrl?: string): string =>\n baseUrl ?? config.origin ?? (typeof window !== 'undefined' ? window.location.origin : '')\n\n/** What {@link routerApi} needs to build a router for one active locale + route. */\nexport interface RouterApiInput {\n registry: RouteRegistry\n config: RouterConfig\n /** Ids that survived `exclude` — for `has` / `availableLocales`. */\n mounted: ReadonlySet<string>\n /** The active locale for this router (the matched sub-tree's locale). */\n active: ILocale\n /** The active route's id, or `undefined` before the first match. */\n activeId: string | undefined\n /**\n * The live TanStack router, for `navigate` / `reload` / `goBack`. A getter so a context-injected\n * router can reference the instance that's only built later; the URL/redirect methods work without\n * it, so `beforeLoad` can call `redirect` / `href` even before the router exists.\n */\n getTanstack: () => AnyRouter | undefined\n}\n\n/**\n * Build the locale-aware router surface — shared by {@link useRouter} (React) and by the router that\n * `createRouter` injects into every route's `context` (so `beforeLoad` / `loader` can `redirect`,\n * `notFound`, and generate hrefs without a hook). Bound to one active locale, so `redirect` /\n * `navigate` / `link` default to it exactly like `navigate` does.\n */\nexport function routerApi(input: RouterApiInput): LooseRouter {\n const { registry, config, mounted, active, activeId, getTanstack } = input\n\n const toLocale = (l?: LocaleInput): ILocale =>\n l == null\n ? active\n : typeof l !== 'string'\n ? l\n : (config.locales.find((x) => x.code === l) ?? Locale.new({ languageOrLocale: l }))\n\n const path: LooseRouter['path'] = ({ id, locale, params }) =>\n routePath(registry, config, id, toLocale(locale), params)\n\n // The location being loaded right now. Inside a guard's beforeLoad that's the page the user is\n // trying to reach; `state.location` would still be the page they're leaving.\n const latest = () =>\n getTanstack()?.latestLocation as { href?: string; searchStr?: string } | undefined\n\n const withReferrer = (query: QueryParams | undefined, referrer: boolean | undefined) => {\n const current = referrer ? latest()?.href : undefined\n return current === undefined ? query : { ...query, [REFERRER]: current }\n }\n\n const href: LooseRouter['href'] = ({ id, locale, params, query, hash, referrer }) =>\n path({ id, locale, params }) + suffix(withReferrer(query, referrer), hash)\n\n const absolute: LooseRouter['absolute'] = ({ baseUrl, ...rest }) =>\n resolveOrigin(config, baseUrl) + href(rest)\n\n const liveRouter = (): AnyRouter => {\n const t = getTanstack()\n if (!t)\n throw new Error('router: navigation is unavailable in this context (no live router yet).')\n return t\n }\n\n const navigate: LooseRouter['navigate'] = async ({\n id,\n from,\n params,\n query,\n hash,\n locale,\n replace,\n state,\n target,\n referrer,\n }) => {\n if (target === '_blank') {\n if (typeof window !== 'undefined')\n window.open(absolute({ id, locale, params, query, hash, referrer }), '_blank')\n return\n }\n const search = withReferrer(query, referrer)\n await liveRouter().navigate({\n to: path({ id, locale, params }),\n search: search ? cleanSearch(search) : undefined,\n hash,\n replace,\n state,\n from,\n } as never)\n }\n\n // Shared by `redirect()` and `forbidden()` — the latter is just the former bound to the 403 page,\n // a default statusCode, and a `RouteFailure` state; building both through one place keeps them from\n // drifting apart (e.g. one gaining a field the other forgets).\n const buildRedirect = (opts: {\n id: string\n locale?: LocaleInput\n params?: PathParams\n query?: QueryParams\n hash?: string\n replace?: boolean\n statusCode?: number\n state?: RouteFailure\n referrer?: boolean\n }) => {\n const search = withReferrer(opts.query, opts.referrer)\n return tanstackRedirect({\n to: path({ id: opts.id, locale: opts.locale, params: opts.params }),\n search: search ? cleanSearch(search) : undefined,\n hash: opts.hash,\n replace: opts.replace,\n ...(opts.statusCode != null ? { statusCode: opts.statusCode } : {}),\n ...(opts.state ? { state: opts.state } : {}),\n } as never)\n }\n\n const redirect: LooseRouter['redirect'] = (params) => buildRedirect(params)\n\n const notFound: LooseRouter['notFound'] = (options) => tanstackNotFound(options)\n\n const forbidden: LooseRouter['forbidden'] = (params) =>\n buildRedirect({\n id: statusPageFor(config.statusPages, 403),\n locale: params?.locale,\n params: params?.params,\n query: params?.query,\n hash: params?.hash,\n replace: params?.replace,\n statusCode: params?.statusCode ?? 403,\n state: { status: 403 },\n referrer: params?.referrer ?? true, // a 403 page (sign-in) nearly always wants to send them back\n })\n\n const referrer: LooseRouter['referrer'] = (options) => {\n // 1. A root-relative path on this site — never another origin.\n const raw =\n options && 'from' in options\n ? options.from\n : new URLSearchParams(latest()?.searchStr ?? '').get(REFERRER)\n if (typeof raw !== 'string' || !raw.startsWith('/') || /^\\/[/\\\\]/.test(raw)) return undefined\n let url: URL\n try {\n url = new URL(raw, SAME_ORIGIN)\n } catch {\n return undefined\n }\n if (url.origin !== SAME_ORIGIN) return undefined\n\n // 2. A page the router serves: let TanStack match it and map the route back to ours. Unknown\n // paths hit the 404 catch-all and excluded-forbidden paths a 403 guard — both untagged.\n const live = getTanstack()\n if (!live) return undefined\n const [, rawParams, foundRoute] = live.getMatchedRoutes(url.pathname)\n const tag = getRouteTag(foundRoute)\n if (!tag) return undefined\n\n // 3. Not a loop: this very route, or a status page.\n if (tag.id === activeId || Object.values(config.statusPages).includes(tag.id)) return undefined\n\n const { _splat: _, ...params } = rawParams // TanStack also mirrors the splat as `_splat`\n url.searchParams.delete(REFERRER) // never chain referrers\n const query = Object.fromEntries(url.searchParams)\n const hash = url.hash.slice(1)\n const inActive = availableLocales(registry, config, tag.id).some((l) => l.code === active.code)\n return {\n id: tag.id,\n params,\n ...(Object.keys(query).length > 0 ? { query } : {}),\n ...(hash ? { hash } : {}),\n ...(inActive ? {} : { locale: tag.locale }), // no locale → the active one\n }\n }\n\n return {\n locale: active,\n routeId: activeId,\n locales: config.locales,\n has: (id, locale) => {\n if (!mounted.has(id)) return false\n if (locale == null) return true\n const code = toLocale(locale).code\n return availableLocales(registry, config, id).some((l) => l.code === code)\n },\n availableLocales: (id) => (mounted.has(id) ? availableLocales(registry, config, id) : []),\n path,\n href,\n absolute,\n redirect,\n notFound,\n forbidden,\n referrer,\n canGoToReferrer: (options) => referrer(options) !== undefined,\n goToReferrer: async ({ replace, ...options } = {}) => {\n const target = referrer(options)\n if (target) await navigate({ ...target, replace })\n },\n reload: () => liveRouter().invalidate(),\n goBack: async () => {\n liveRouter().history.back()\n },\n canGoBack: () =>\n getTanstack()?.history.canGoBack?.() ??\n (typeof window !== 'undefined' && window.history.length > 1),\n navigate,\n }\n}\n\n/**\n * A locale-aware router hook for routers built with {@link createRouter}.\n *\n * Generates hrefs and navigates by **route id + locale**, resolving translated URL segments from the\n * registry. Switching locale simply navigates to that locale's real path. `redirect` / `notFound` are\n * also on the same object (usually thrown from a route's `beforeLoad` via `context.router`).\n *\n * @throws If used outside a router created by {@link createRouter}.\n *\n * @example\n * const { router } = useRouter()\n * router.href({ id: 'about', locale: 'nl-BE' }) // '/nl-BE/over-ons'\n * await router.navigate({ id: 'about', locale: 'fr-BE' })\n */\nexport function useRouter(): { router: IRouter } {\n const tanstack = useTanstackRouter()\n const meta = getRouterMeta(tanstack)\n if (!meta) {\n throw new Error('useRouter must be used inside a router created by createRouter().')\n }\n const { registry, config, mounted } = meta\n\n const leaf = useRouterState({\n select: (s) => s.matches.at(-1)?.context as { locale?: ILocale; routeId?: string } | undefined,\n })\n\n const router = routerApi({\n registry,\n config,\n mounted,\n active: leaf?.locale ?? config.defaultLocale,\n activeId: leaf?.routeId,\n getTanstack: () => tanstack,\n })\n\n // Bridge the loose runtime impl to the generic public surface (see LooseRouter's note).\n return { router: router as unknown as IRouter }\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport { Locale as LocaleProvider } from '@luwiostack/locale/react'\nimport type { AnyRoute, AnyRouter } from '@tanstack/react-router'\nimport {\n createRootRoute,\n createRoute as createTanstackRoute,\n createRouter as createTanstackRouter,\n HeadContent,\n isNotFound,\n isRedirect,\n Outlet,\n redirect,\n Scripts,\n useRouterState,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport { useEffect } from 'react'\nimport { reportPageViews } from './page-view'\nimport type { RouteRegistry } from './registry'\nimport type { RouteBuilder } from './route-builder'\nimport type { RouteFailure } from './route-hooks'\nimport { setRouterMeta, tagRoute } from './router-meta'\nimport {\n availableLocales,\n type IRouter,\n resolveOrigin,\n routePath,\n routerApi,\n statusPageFor,\n} from './use-router'\n\n/**\n * Route ids for the pages `createRouter` redirects to on a failure, keyed by HTTP status. `default`\n * is **required** — the catch-all covering any status with no entry of its own, or a `beforeLoad`/\n * `loader` failure with no status at all (a `TypeError`, a genuine bug). Every other key is optional:\n * add `404`/`403` as best practice (a dedicated not-found / forbidden page), and any other status\n * (`503`, `429`, …) for a dedicated page per failure kind — anything you don't list falls through to\n * `default`, so the router always has *somewhere* to send a failure.\n *\n * @example\n * { 404: 'notFound', 403: 'signin', 503: 'maintenance', default: 'serverError' }\n * @example\n * { default: 'error' } // the bare minimum: one page for absolutely everything\n */\nexport type StatusPages = Record<number, string> & { default: string }\n\n/** Configuration for {@link createRouter}. */\nexport interface RouterConfig {\n /** The locales to mount. Each becomes a `/{locale.code}` sub-tree. */\n locales: ILocale[]\n /** Where `/` redirects to, and the locale used for the {@link RouterConfig.unprefixedDefault} tree. */\n defaultLocale: ILocale\n /**\n * Absolute origin (`https://example.com`) used to build the `canonical` and `hreflang` URLs the\n * router emits into every page's head. Defaults to `window.location.origin`; set it for SSR /\n * pre-render, where there is no `window`.\n */\n origin?: string\n /** Also mount the default locale without a `/{locale}` prefix (so `/about` resolves as well). */\n unprefixedDefault?: boolean\n /** Drop these route ids and all of their descendants. Everything else is mounted. */\n exclude?: string[]\n /**\n * How a URL that matches an **excluded** route's aliased path responds.\n *\n * - `'notFound'` (default) — the excluded route is dropped entirely, so its URL falls through to\n * the not-found catch-all like any other miss (→ **404**, via {@link RouterConfig.statusPages}).\n * - `'forbidden'` — the excluded route's *path* stays mounted (in every locale it's aliased in) as a\n * guard that redirects to `statusPages[403]` with a **403** status. Use it when a route is\n * disabled by config/feature-flag but should read as \"exists, but not available\" rather than\n * \"never existed\".\n *\n * This is scoped to `exclude` (a route id within a mounted locale). A **missing locale** is\n * unaffected: a `/{code}` sub-tree that isn't in {@link RouterConfig.locales} has no node at all, so\n * `/{code}/…` always **404**s regardless of this setting — there is nothing to forbid.\n */\n excludeStatus?: 'notFound' | 'forbidden'\n /**\n * Route ids for the router's generic 404 / 403 / 5xx handling — so no route ever needs its own\n * try/catch, or its own \"where does a rejected request go\" logic:\n *\n * - **404** (`statusPages[404]`) — where an unmatched URL, or an explicit `throw notFound()` from a\n * *matched* route (a loader that couldn't find its resource), redirects, in the active locale.\n * - **403** (`statusPages[403]`) — where `context.router.forbidden()` / `useRouter().router.forbidden()`\n * redirects (typically sign-in), adding `?referrer=` so it can send the user back.\n * - **Any other status** (e.g. `503`, `429`) — a dedicated page for a `beforeLoad`/`loader` failure\n * whose thrown value carries that `status` (an `HttpError` from `@luwiostack/http`, or anything\n * shaped like one).\n * - **`default`** — the catch-all: 404/403 fall back to it when not given their own entry, and so\n * does any other unlisted status or a `beforeLoad`/`loader` failure with no status at all.\n *\n * A `beforeLoad`/`loader` failure is logged (`console.error`, so it still reaches an error tracker)\n * before the redirect. Every status page can read {@link useRouteFailure} for `{ status, error? }` —\n * `error` (the underlying message) is only present for an actual `beforeLoad`/`loader` failure; a\n * 404/403 carries `status` only, since there's no exception behind either.\n *\n * **Only the data lifecycle is covered.** An error thrown by a route's own `component` DURING\n * RENDER is a UI bug, not a load failure, and is never touched by `statusPages` — that's left\n * entirely to the implementor: that route's own `errorComponent`, {@link RouterConfig.rootErrorComponent},\n * or TanStack's own default.\n *\n * @see {@link StatusPages}\n */\n statusPages: StatusPages\n /**\n * Permanent (301) redirects for **legacy URLs** — old bookmarks / indexed links that no longer\n * match a route (e.g. after renaming locale codes). A map of `pattern → target`:\n *\n * - **Wildcard** — a pattern ending in `/*` captures the rest of the path and appends it to the\n * target's `/*`: `'/nl/*': '/nl-BE/*'` sends `/nl/over-ons` → `/nl-BE/over-ons` (query + hash\n * preserved). The bare prefix redirects too: `/nl` → `/nl-BE`.\n * - **Exact** — a pattern with no `*` redirects that one path: `'/pricing': '/plans'`.\n *\n * Patterns are matched before the not-found catch-all, so a legacy URL redirects instead of\n * 404-ing. A pattern must not collide with a real mounted path (old locale codes differ from the\n * new ones, so they don't).\n */\n redirects?: Record<string, string>\n /** Extra options forwarded to TanStack's `createRouter` (`context`, `defaultPreload`, …). */\n router?: Record<string, unknown>\n /**\n * The **root** route's component. Defaults to one that renders `<HeadContent />` (so the SEO head\n * the router computes per page — title/og/canonical/hreflang — actually reaches the document),\n * `<Outlet />`, and `<Scripts />` (the SSR hydration mount point). Override it to own the document\n * shell yourself — but then you must render `<HeadContent />` and `<Scripts />` (both re-exported\n * from `@luwiostack/router`), or those emitted tags won't appear.\n */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n rootComponent?: any\n /**\n * The root `errorComponent` — the top-level boundary for an uncaught RENDER error (from a route's\n * `component`) that no nested route's own `errorComponent` caught. Unrelated to\n * {@link RouterConfig.statusPages}, which handles `beforeLoad`/`loader` failures instead, before a\n * component ever renders. Omit it and a render error falls through to TanStack's own default.\n */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n rootErrorComponent?: any\n}\n\n/**\n * The default root component: emit the per-page head the router computes (`<HeadContent />`), render\n * the matched tree (`<Outlet />`), and mount SSR hydration scripts (`<Scripts />`). Replace it with\n * {@link RouterConfig.rootComponent} to own the shell — then render `<HeadContent />`/`<Scripts />`\n * yourself.\n */\nfunction DefaultRoot() {\n return (\n <>\n <HeadContent />\n <Outlet />\n <Scripts />\n </>\n )\n}\n\n/** The active locale for a boundary component rendered where no route may have matched at all. */\nfunction useBoundaryLocale(defaultLocale: ILocale): ILocale {\n return (\n useRouterState({\n select: (s) => (s.matches.at(-1)?.context as { locale?: ILocale } | undefined)?.locale,\n }) ?? defaultLocale\n )\n}\n\n/**\n * The root route's `notFoundComponent`: redirects (client-side, replacing history) to\n * `statusPages[404]` (falling back to `statusPages.default`) in the active locale, carrying\n * `{ status: 404 }` for the target page's {@link useRouteFailure}. This is what catches an explicit\n * `throw notFound()` from a *matched* route's own `loader`/`beforeLoad` with no nested\n * `notFoundComponent` of its own — an unmatched URL is already redirected earlier, by the per-locale\n * catch-all `beforeLoad`. Always wired: a target is always available, since `statusPages.default` is\n * required — there is no escape hatch to render inline instead, matching `forbidden()`'s own \"always\n * redirects\" behavior.\n */\nfunction notFoundRedirectComponent(\n registry: RouteRegistry,\n config: RouterConfig,\n // biome-ignore lint/suspicious/noExplicitAny: assigned into TanStack's own (any-typed here) option\n): any {\n const id = statusPageFor(config.statusPages, 404)\n return function NotFoundRedirect() {\n const tanstack = useTanstackRouter()\n const locale = useBoundaryLocale(config.defaultLocale)\n useEffect(() => {\n tanstack.navigate({\n to: routePath(registry, config, id, locale),\n replace: true,\n state: { status: 404 } satisfies RouteFailure,\n } as never)\n }, [locale, tanstack])\n return null\n }\n}\n\n// TanStack's createRoute/createRouter are heavily generic; a locale-parameterised tree is built at\n// runtime, so we forward plain objects through a single, well-contained cast boundary here.\ntype RouteInput = Record<string, unknown>\nconst buildRoute = createTanstackRoute as unknown as (options: RouteInput) => AnyRoute\nconst buildRouter = createTanstackRouter as unknown as (options: RouteInput) => AnyRouter\n\nconst toPath = (slug: string): string => (slug === '' ? '/' : `/${slug}`)\n\n/**\n * Throw a redirect to `to` for a resolved `statusPages` page — the router's 404/403/5xx guards all\n * go through this one place, so the `{ status, error? }` state {@link useRouteFailure} reads (and the\n * matching HTTP `statusCode`) can never drift between them.\n */\nfunction throwStatusRedirect(to: string, status: number, error?: RouteFailure['error']): never {\n throw redirect({\n to,\n statusCode: status,\n state: { status, ...(error ? { error } : {}) } satisfies RouteFailure,\n } as never)\n}\n\n/**\n * Synthetic root routes for `config.redirects` — permanent (301) legacy-URL redirects. A `/prefix/*`\n * pattern becomes a splat route that appends the captured tail (`params['*']`) to the target base,\n * plus a bare-prefix route so `/prefix` itself redirects; a pattern without `*` is an exact redirect.\n * The current URL's query and hash are carried over. Matched before the not-found catch-all.\n */\nfunction redirectRoutes(config: RouterConfig, root: AnyRoute): AnyRoute[] {\n const strip = (p: string) => p.replace(/^\\/+/, '')\n // Throw a 301 to `to`, carrying over the incoming query + hash from the TanStack `location` ctx.\n const go = (to: string, ctx: Record<string, unknown>): never => {\n const loc = ctx.location as { search?: Record<string, unknown>; hash?: string } | undefined\n throw redirect({\n to,\n ...(loc?.search && Object.keys(loc.search).length > 0 ? { search: loc.search } : {}),\n ...(loc?.hash ? { hash: loc.hash } : {}),\n statusCode: 301,\n } as never)\n }\n\n const out: AnyRoute[] = []\n for (const [pattern, target] of Object.entries(config.redirects ?? {})) {\n if (pattern.endsWith('/*')) {\n const prefix = strip(pattern.slice(0, -2)) // '/nl/*' → 'nl'\n const base = target.replace(/\\/\\*$/, '') // '/nl-BE/*' → '/nl-BE'\n // /nl/<rest> → /nl-BE/<rest>\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: `${prefix}/$`,\n beforeLoad: (ctx: Record<string, unknown>) => {\n const rest = (ctx.params as Record<string, string> | undefined)?.['*'] ?? ''\n return go(rest ? `${base}/${rest}` : base, ctx)\n },\n }),\n )\n // the bare prefix itself: /nl → /nl-BE\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: prefix,\n beforeLoad: (ctx: Record<string, unknown>) => go(base, ctx),\n }),\n )\n } else {\n out.push(\n buildRoute({\n getParentRoute: () => root,\n path: strip(pattern),\n beforeLoad: (ctx: Record<string, unknown>) => go(target, ctx),\n }),\n )\n }\n }\n return out\n}\n\n/**\n * Expand a {@link RouteRegistry} into a TanStack router: one localized sub-tree per configured\n * locale, with translated URL segments resolved from each route's aliases.\n *\n * Every TanStack option on a route (`loader`, `beforeLoad`, `component`, …) is forwarded\n * untouched. Before a route's own `beforeLoad` runs, `{ routeId, locale }` is injected into the\n * route context, so loaders and guards can read the active {@link ILocale}.\n *\n * @example\n * const router = createRouter(routeRegistry, {\n * locales: ['en-BE', 'nl-BE'].map((l) => Locale.new({ languageOrLocale: l })),\n * defaultLocale: Locale.new({ languageOrLocale: 'en-BE' }),\n * statusPages: { 404: 'notFound', 403: 'signin', default: 'serverError' },\n * })\n */\nexport function createRouter(registry: RouteRegistry, config: RouterConfig): AnyRouter {\n // `excludeStatus: 'forbidden'` sends excluded URLs to the 403 page, so it must exist — fail loud at\n // build rather than silently 404ing (the tombstones would have no target to redirect to).\n if (config.excludeStatus === 'forbidden') {\n const forbiddenTarget = statusPageFor(config.statusPages, 403)\n if (!registry.get(forbiddenTarget)) {\n throw new Error(\n `createRouter: excludeStatus 'forbidden' needs its 403 page (\"${forbiddenTarget}\") to be registered.`,\n )\n }\n }\n const { kept: builders, tombstones } = planRoutes(registry.all(), config)\n // A URL-bearing route needs at least one alias — its localized URL segment. It then mounts in\n // exactly the locales it is aliased in (partial coverage is fine — a route can live in a subset of\n // locales). A route with no alias at all would mount nowhere, which is a definition mistake, so\n // catch it here at build. Layout routes (pathless, no URL) are exempt.\n for (const b of builders) {\n // onPageView belongs to the route that IS the page; a layout is never one (and it isn't inherited).\n if (b.layout && b.options.onPageView !== undefined) {\n throw new Error(\n `Route \"${b.id}\" is a layout route — onPageView is only for URL routes (it isn't inherited).`,\n )\n }\n if (b.layout) continue\n if (b.aliasCount === 0) {\n throw new Error(\n `Route \"${b.id}\" has no alias — call .alias(locale, slug) at least once ` +\n `(only layout routes may omit it).`,\n )\n }\n // title + description are required on every URL-bearing route — the router emits them (and the\n // rest of the SEO head) itself. Only layout routes (no URL) are exempt.\n if (typeof b.options.title !== 'function') {\n throw new Error(\n `Route \"${b.id}\" has no title() — it's required for SEO (layout routes exempt).`,\n )\n }\n if (typeof b.options.description !== 'function') {\n throw new Error(`Route \"${b.id}\" has no description() — it's required for SEO.`)\n }\n }\n const byParent = groupByParent(builders)\n const mounted = new Set(builders.map((b) => b.id))\n // Excluded-forbidden guards (empty unless `excludeStatus: 'forbidden'`), grouped by the kept\n // ancestor they attach under so they mount alongside that node's real children.\n const tombstonesByParent = new Map<string | undefined, Tombstone[]>()\n for (const t of tombstones) {\n const list = tombstonesByParent.get(t.mountParent) ?? []\n list.push(t)\n tombstonesByParent.set(t.mountParent, list)\n }\n\n // The built router isn't available until the tree is assembled, but each route's `beforeLoad`\n // needs a router in context. Fill this holder right after `buildRouter`; by the time any\n // `beforeLoad` runs (request time), it's set — and the URL/redirect methods don't need it anyway.\n const routerRef: { current?: AnyRouter } = {}\n const apiCtx = { registry, config, mounted, getTanstack: () => routerRef.current }\n\n const root = createRootRoute({\n component: config.rootComponent ?? DefaultRoot,\n ...(config.rootErrorComponent ? { errorComponent: config.rootErrorComponent } : {}),\n notFoundComponent: notFoundRedirectComponent(registry, config),\n })\n\n // A locale sub-tree. `prefixed` gets a `/{code}` path segment; the unprefixed default gets a\n // PATHLESS layout (an `id`, not a `path`) so its children mount at their bare paths directly under\n // root — a `path: '/'` layout would be treated as an index and never nest `/home` under it.\n const mountLocale = (\n locale: ILocale,\n mount: { path: string } | { pathless: string },\n ): AnyRoute => {\n const layout = buildRoute({\n getParentRoute: () => root,\n ...('path' in mount ? { path: mount.path } : { id: mount.pathless }),\n beforeLoad: () => ({ locale }),\n component: () => (\n <LocaleProvider locale={locale}>\n <Outlet />\n </LocaleProvider>\n ),\n })\n\n // The 403 page's localized path, if it's available in this locale — the target every\n // excluded-forbidden tombstone in this locale redirects to. Undefined (no tombstones mounted, so\n // those paths fall through to 404) when that page isn't aliased here, mirroring the not-found\n // catch-all's own availability guard below.\n const fb = statusPageFor(config.statusPages, 403)\n const forbiddenTarget =\n tombstones.length > 0 && registry.get(fb)?.hasAlias(locale)\n ? routePath(registry, config, fb, locale)\n : undefined\n\n const build = (parentId: string | undefined, parent: AnyRoute): AnyRoute[] => {\n const routes = (byParent.get(parentId) ?? [])\n // A route mounts in a locale only if it's aliased there; layout routes (no URL) always mount.\n .filter((b) => b.layout || b.hasAlias(locale))\n .map((b) => {\n const head = withHead(b, locale, apiCtx)\n // title/description/head/onPageView are OUR options (consumed by withHead) — strip them so they're not\n // forwarded to TanStack as unknown route options. loader is pulled out too, so it can be\n // wrapped in the same generic 500 handling as beforeLoad (see guardLoadPhase).\n const {\n title: _t,\n description: _d,\n head: _h,\n onPageView: _pv,\n loader: userLoader,\n ...tanstackOptions\n } = b.options\n const route = buildRoute({\n ...tanstackOptions,\n getParentRoute: () => parent,\n ...(b.layout ? { id: b.id } : { path: toPath(b.slugFor(locale)) }),\n beforeLoad: withContext(b, locale, apiCtx),\n ...(userLoader\n ? {\n loader: guardLoadPhase(\n userLoader as (ctx: Record<string, unknown>) => unknown,\n apiCtx,\n locale,\n ),\n }\n : {}),\n ...(head ? { head } : {}),\n })\n // So router.referrer() can map a path TanStack matched back to this route (layouts never match).\n if (!b.layout) tagRoute(route, { id: b.id, locale })\n const children = build(b.id, route)\n return children.length ? route.addChildren(children) : route\n })\n\n // Excluded-forbidden guards under this node: mount at the excluded route's own slug (only where\n // it's aliased, and only if the forbidden target resolves in this locale), with a `$` splat so\n // descendant paths 403 too instead of 404ing.\n if (forbiddenTarget !== undefined) {\n for (const { builder } of tombstonesByParent.get(parentId) ?? []) {\n if (!builder.hasAlias(locale)) continue\n const guard = () => throwStatusRedirect(forbiddenTarget, 403)\n const node = buildRoute({\n getParentRoute: () => parent,\n path: toPath(builder.slugFor(locale)),\n beforeLoad: guard,\n })\n const splat = buildRoute({ getParentRoute: () => node, path: '$', beforeLoad: guard })\n routes.push(node.addChildren([splat]))\n }\n }\n return routes\n }\n\n const children = build(undefined, layout)\n\n // A synthetic catch-all: any path under this locale that matched no real route redirects to the\n // 404 page (in this locale). Added last and as a splat, so every real route — including the 404\n // page itself — matches first; only genuine misses reach it. Skipped for a locale the 404 page\n // isn't available in (it would have no URL there).\n const nf = statusPageFor(config.statusPages, 404)\n if (registry.get(nf) && (registry.get(nf)?.layout || registry.get(nf)?.hasAlias(locale))) {\n const target = routePath(registry, config, nf, locale)\n children.push(\n buildRoute({\n getParentRoute: () => layout,\n path: '$',\n beforeLoad: () => throwStatusRedirect(target, 404),\n }),\n )\n }\n\n return layout.addChildren(children)\n }\n\n const trees: AnyRoute[] = config.locales.map((l) => mountLocale(l, { path: `/${l.code}` }))\n\n // Legacy-URL 301 redirects (`/nl/*` → `/nl-BE/*`, …). Added before the not-found catch-all so a\n // matching old URL redirects instead of 404-ing; their concrete prefixes match before it anyway.\n trees.push(...redirectRoutes(config, root))\n\n if (config.unprefixedDefault) {\n // Also serve the default locale without a prefix: `/home` alongside `/{default}/home`. Its own\n // catch-all (added in mountLocale) already handles bare unmatched paths like `/typo`.\n trees.push(mountLocale(config.defaultLocale, { pathless: '__luwio_unprefixed__' }))\n } else {\n trees.push(\n buildRoute({\n getParentRoute: () => root,\n path: '/',\n beforeLoad: () => {\n throw redirect({ to: `/${config.defaultLocale.code}` })\n },\n }),\n )\n // Catch prefix-less unmatched paths (`/typo`, an unknown `/xx/…`) and send them to the default\n // locale's 404 page — locale sub-trees match their `/{code}` prefix first.\n const nf = statusPageFor(config.statusPages, 404)\n const dl = config.defaultLocale\n if (registry.get(nf) && (registry.get(nf)?.layout || registry.get(nf)?.hasAlias(dl))) {\n const target = routePath(registry, config, nf, dl)\n trees.push(\n buildRoute({\n getParentRoute: () => root,\n path: '$',\n beforeLoad: () => throwStatusRedirect(target, 404),\n }),\n )\n }\n }\n\n const routeTree = root.addChildren(trees)\n const router = buildRouter({ routeTree, ...config.router })\n routerRef.current = router\n // Carry the registry + config (and which ids survived exclude) so useRouter() can resolve route\n // ids to localized hrefs and answer availability checks.\n setRouterMeta(router, { registry, config, mounted })\n // Each route's onPageView — subscribed before the first load so it counts. Browser only: a page view\n // is the visitor's, and a server render is followed by the client's own first resolve.\n if (typeof document !== 'undefined' && builders.some((b) => b.options.onPageView)) {\n reportPageViews(router, registry)\n }\n return router\n}\n\n/** Group builders by their parent id for tree assembly. */\nfunction groupByParent(builders: readonly RouteBuilder[]): Map<string | undefined, RouteBuilder[]> {\n const byParent = new Map<string | undefined, RouteBuilder[]>()\n for (const b of builders) {\n const list = byParent.get(b.parent) ?? []\n list.push(b)\n byParent.set(b.parent, list)\n }\n return byParent\n}\n\n/**\n * A route excluded under `excludeStatus: 'forbidden'` whose path still gets mounted as a 403 guard.\n * `mountParent` is the id of the nearest **kept** ancestor to attach under (or `undefined` for the\n * locale root); the builder carries the localized slug + aliases to mount at.\n */\ninterface Tombstone {\n builder: RouteBuilder\n mountParent: string | undefined\n}\n\n/** The plan {@link createRouter} builds from: the mounted routes plus any excluded-forbidden guards. */\ninterface RoutePlan {\n kept: RouteBuilder[]\n tombstones: Tombstone[]\n}\n\n/**\n * Resolve which routes to mount, and (under `excludeStatus: 'forbidden'`) which excluded routes keep\n * a 403 guard at their path. Every route is mounted by default; `exclude` drops a route and all of\n * its descendants — dropped for good with the default `excludeStatus`, or kept as a forbidden\n * tombstone otherwise.\n */\nfunction planRoutes(all: readonly RouteBuilder[], config: RouterConfig): RoutePlan {\n const byId = new Map(all.map((b) => [b.id, b]))\n const childrenOf = new Map<string | undefined, string[]>()\n for (const b of all) {\n const list = childrenOf.get(b.parent) ?? []\n list.push(b.id)\n childrenOf.set(b.parent, list)\n }\n\n const descendants = (id: string): string[] => {\n const out: string[] = []\n const seen = new Set<string>([id])\n const stack = [id]\n while (stack.length > 0) {\n const next = stack.pop()\n if (next === undefined) break\n for (const child of childrenOf.get(next) ?? []) {\n if (seen.has(child)) continue // guard against a circular parent chain\n seen.add(child)\n out.push(child)\n stack.push(child)\n }\n }\n return out\n }\n\n const keep = new Set(all.map((b) => b.id))\n for (const id of config.exclude ?? []) {\n keep.delete(id)\n for (const d of descendants(id)) keep.delete(d)\n }\n\n const kept = all.filter((b) => keep.has(b.id))\n for (const b of kept) {\n if (b.parent !== undefined && !keep.has(b.parent)) {\n throw new Error(`Route \"${b.id}\" has parent \"${b.parent}\", which is not in the built set.`)\n }\n }\n\n const tombstones =\n config.excludeStatus === 'forbidden' ? forbiddenTombstones(all, keep, byId) : []\n return { kept, tombstones }\n}\n\n/**\n * The 403 guards for excluded routes. A tombstone is mounted only at each **URL-bearing** excluded\n * route with no excluded URL-bearing ancestor — the topmost dropped route in a subtree — because a\n * `$` splat under it already covers every descendant path. (Excluded pathless layouts contribute no\n * segment, so their URL-bearing children become the tombstone roots.) It attaches under the nearest\n * *kept* ancestor; the removed ancestors in between are all pathless layouts, so the tombstone's own\n * slug is its full path there.\n */\nfunction forbiddenTombstones(\n all: readonly RouteBuilder[],\n keep: ReadonlySet<string>,\n byId: Map<string, RouteBuilder>,\n): Tombstone[] {\n // A dropped route already covered by an ancestor tombstone: it has a dropped, URL-bearing ancestor.\n const coveredByAncestor = (b: RouteBuilder): boolean => {\n for (let p = b.parent; p !== undefined; p = byId.get(p)?.parent) {\n const anc = byId.get(p)\n if (!anc) break\n if (!keep.has(anc.id) && !anc.layout) return true\n }\n return false\n }\n // The nearest ancestor that survived `exclude` (its route node exists to attach under), else the\n // locale root (`undefined`).\n const nearestKept = (b: RouteBuilder): string | undefined => {\n for (let p = b.parent; p !== undefined; p = byId.get(p)?.parent) {\n if (keep.has(p)) return p\n }\n return undefined\n }\n\n const tombstones: Tombstone[] = []\n for (const b of all) {\n if (keep.has(b.id) || b.layout) continue // mounted, or pathless (no URL to guard)\n if (coveredByAncestor(b)) continue // an ancestor tombstone's splat already 403s this path\n tombstones.push({ builder: b, mountParent: nearestKept(b) })\n }\n return tombstones\n}\n\n/** What {@link withContext} needs to build the per-route `context.router`. */\ninterface ApiCtx {\n registry: RouteRegistry\n config: RouterConfig\n mounted: Set<string>\n getTanstack: () => AnyRouter | undefined\n}\n\n/**\n * Wraps a route's `beforeLoad`/`loader` — the DATA lifecycle, which runs before the component ever\n * renders — so a genuine, unexpected error it throws redirects to the matching\n * {@link RouterConfig.statusPages} entry instead of leaving the match in TanStack's \"error\" state.\n * This is the router's generic 5xx handling, the same shape as its generic 404 and 403 handling: the\n * route never needs its own try/catch.\n *\n * A deliberate `redirect()` (how `forbidden()`'s 403 works too) or `notFound()` is control flow, not\n * a failure, and always passes through untouched. Everything else is logged (`console.error`, so it\n * still reaches the console / an error tracker) and turned into a redirect, carrying `{ status,\n * error: { message } }` as history state for the target page's {@link useRouteFailure} — `status` is\n * the thrown value's own `status` if it has a numeric one (an `HttpError`-shaped error), else 500.\n */\nfunction guardLoadPhase(\n fn: (ctx: Record<string, unknown>) => unknown,\n apiCtx: ApiCtx,\n locale: ILocale,\n): (ctx: Record<string, unknown>) => unknown {\n const onError = (error: unknown): never => {\n if (isRedirect(error) || isNotFound(error)) throw error\n console.error(error)\n const rawStatus = (error as { status?: unknown } | null)?.status\n const status = typeof rawStatus === 'number' ? rawStatus : 500\n const id = statusPageFor(apiCtx.config.statusPages, status)\n const message = error instanceof Error ? error.message : String(error)\n throwStatusRedirect(routePath(apiCtx.registry, apiCtx.config, id, locale), status, { message })\n }\n return (ctx: Record<string, unknown>) => {\n try {\n const result = fn(ctx)\n return result instanceof Promise ? result.catch(onError) : result\n } catch (error) {\n return onError(error)\n }\n }\n}\n\n/**\n * Wrap a route's `beforeLoad` so `{ routeId, locale, router }` is available in context — both to the\n * route's own `beforeLoad` and, merged with its return value, to every descendant. The injected\n * `router` is a locale-bound {@link IRouter} (same surface as `useRouter().router`), so a guard can\n * `throw context.router.redirect(...)` / `notFound()` without a hook. The user's `beforeLoad` is\n * wrapped in {@link guardLoadPhase}, so an unexpected throw generically redirects to `statusPages`.\n */\nfunction withContext(builder: RouteBuilder, locale: ILocale, apiCtx: ApiCtx) {\n const rawUser = builder.options.beforeLoad as\n | ((ctx: Record<string, unknown>) => unknown)\n | undefined\n const user = rawUser ? guardLoadPhase(rawUser, apiCtx, locale) : undefined\n // `locale` and `builder.id` are fixed for this (route × locale) binding, so build the router surface\n // ONCE here instead of on every match. Its `getTanstack` is a getter, so it still resolves the live\n // router lazily at request time. `base` is likewise stable and shared across matches.\n const router = routerApi({\n ...apiCtx,\n active: locale,\n activeId: builder.id,\n }) as unknown as IRouter\n const base = { routeId: builder.id, locale, router }\n // No user `beforeLoad` → nothing to await; return the injected context synchronously (TanStack\n // merges it onto the parent context for us), sparing every such route an async hop.\n if (!user) return () => base\n return async (ctx: Record<string, unknown>): Promise<Record<string, unknown>> => {\n const parentContext = (ctx.context as Record<string, unknown> | undefined) ?? {}\n const merged = { ...ctx, context: { ...parentContext, ...base } }\n const extra = (await user(merged)) as Record<string, unknown> | undefined\n return { ...base, ...extra }\n }\n}\n\ntype Params = Record<string, string>\ntype HeadTags = {\n meta?: Array<Record<string, unknown>>\n links?: Array<Record<string, unknown>>\n scripts?: Array<Record<string, unknown>>\n styles?: Array<Record<string, unknown>>\n}\n\n/** Absolute URL for a route id in a locale: `origin` (config or window) + its localized pathname. */\nfunction absoluteFor(\n registry: RouteRegistry,\n config: RouterConfig,\n id: string,\n locale: ILocale,\n params: Params,\n): string {\n return resolveOrigin(config) + routePath(registry, config, id, locale, params)\n}\n\n/**\n * Build a URL route's `head`: the enforced SEO essentials the router emits itself — `<title>`,\n * `<meta name=\"description\">`, `og:title`/`og:description`/`og:locale`, plus (from the **leaf** match\n * only, so links don't duplicate across ancestors) `canonical`, `og:url`, and one `hreflang`\n * alternate per locale the route is available in + `x-default`. The route's optional `head` is merged\n * on top. Returns `undefined` for a layout route (no `title`/`description`/`head`).\n */\nfunction withHead(builder: RouteBuilder, locale: ILocale, apiCtx: ApiCtx) {\n const { registry, config } = apiCtx\n const title = builder.options.title as ((ctx: Record<string, unknown>) => string) | undefined\n const description = builder.options.description as\n | ((ctx: Record<string, unknown>) => string)\n | undefined\n const userHead = builder.options.head as ((ctx: Record<string, unknown>) => HeadTags) | undefined\n if (!title && !description && !userHead) return undefined\n const id = builder.id\n\n return (ctx: Record<string, unknown>) => {\n const match = ctx.match as { context?: Record<string, unknown>; routeId?: unknown } | undefined\n const context = { routeId: id, locale, ...(match?.context ?? {}) }\n const headCtx = { ...ctx, context }\n const params = (ctx.params as Params | undefined) ?? {}\n\n const meta: Array<Record<string, unknown>> = []\n const links: Array<Record<string, unknown>> = []\n\n if (title) {\n const value = title(headCtx)\n meta.push({ title: value }, { property: 'og:title', content: value })\n }\n if (description) {\n const value = description(headCtx)\n meta.push(\n { name: 'description', content: value },\n { property: 'og:description', content: value },\n )\n }\n meta.push({ property: 'og:locale', content: locale.code })\n\n // canonical + hreflang come from the LEAF match only — TanStack concatenates `links`, so emitting\n // them from every matched ancestor would duplicate them.\n const matches = ctx.matches as Array<{ routeId?: unknown }> | undefined\n const isLeaf = !!match && matches?.[matches.length - 1]?.routeId === match.routeId\n if (isLeaf) {\n const canonical = absoluteFor(registry, config, id, locale, params)\n meta.push({ property: 'og:url', content: canonical })\n links.push({ rel: 'canonical', href: canonical })\n const avail = availableLocales(registry, config, id)\n for (const loc of avail) {\n // `hrefLang` (camelCase) — TanStack renders links with React, which wants the JSX prop name.\n links.push({\n rel: 'alternate',\n hrefLang: loc.code,\n href: absoluteFor(registry, config, id, loc, params),\n })\n }\n // x-default → the default locale when the route lives there, otherwise the first locale it does\n // (a partially-aliased route may not exist in the default locale — don't ask for a URL it lacks).\n const xDefault = avail.find((l) => l.code === config.defaultLocale.code) ?? avail[0]\n if (xDefault) {\n links.push({\n rel: 'alternate',\n hrefLang: 'x-default',\n href: absoluteFor(registry, config, id, xDefault, params),\n })\n }\n }\n\n const extra = userHead ? userHead(headCtx) : undefined\n return {\n // Within one route's `meta`, two `{ title }` (or two same-`name`/`property`) entries both\n // render — a duplicate `<title>`. So a user `head` that returns the same tag OVERRIDES ours\n // rather than appending. (Cross-route de-dup is TanStack's job: deepest match wins.)\n meta: mergeMeta(meta, extra?.meta ?? []),\n links: [...links, ...(extra?.links ?? [])],\n ...(extra?.scripts ? { scripts: extra.scripts } : {}),\n ...(extra?.styles ? { styles: extra.styles } : {}),\n }\n }\n}\n\n/**\n * The identity of a head `meta` tag — `title`, or its `name` / `property`. Two entries with the same\n * identity would both render (a duplicate `<title>` / meta), so {@link mergeMeta} collapses them.\n * Tags with no such key (e.g. `{ 'script:ld+json': … }`) have no identity and always append.\n */\nfunction metaKey(m: Record<string, unknown>): string | undefined {\n if ('title' in m) return 'title'\n if (typeof m.name === 'string') return `name:${m.name}`\n if (typeof m.property === 'string') return `property:${m.property}`\n return undefined\n}\n\n/** Concatenate `extra` onto `base`, but let a same-identity `extra` tag replace the `base` one. */\nfunction mergeMeta(\n base: Array<Record<string, unknown>>,\n extra: Array<Record<string, unknown>>,\n): Array<Record<string, unknown>> {\n const out = [...base]\n for (const m of extra) {\n const key = metaKey(m)\n const at = key ? out.findIndex((x) => metaKey(x) === key) : -1\n if (at >= 0) out[at] = m\n else out.push(m)\n }\n return out\n}\n","import { lazyRouteComponent } from '@tanstack/react-router'\n\n/**\n * Code-split a route's component so its module lands in its own chunk instead of the initial bundle.\n *\n * The Vite plugin ({@link luwioRouter}) imports every `*.route` file eagerly — the registry needs\n * every route's id/parent/aliases/`title`/`description` up front to build the localized tree. So keep\n * route files **thin**: define the route here, but load the page component through `lazy()` from its\n * own module. The route definition stays eager (it's tiny); the component — and everything it pulls\n * in — splits out and loads only when the route is matched (TanStack preloads it on intent, e.g.\n * hover, when `defaultPreload` is on).\n *\n * Pass a bare dynamic import for a **default** export, or the export name as the second argument for a\n * **named** one. Point it at the component's own module — not the `*.route` file — or nothing splits.\n *\n * @example\n * // Home.tsx has `export function Home() { … }`\n * export default createRoute({\n * id: 'home',\n * component: lazy(() => import('./Home'), 'Home'),\n * title: ({ context }) => context.t(tokens.homeTitle),\n * description: ({ context }) => context.t(tokens.homeIntro),\n * }).alias(Locale.new({ languageOrLocale: 'en-US' }), '')\n *\n * @example\n * // About.tsx has `export default function About() { … }`\n * component: lazy(() => import('./About'))\n */\nexport function lazy<\n // biome-ignore lint/suspicious/noExplicitAny: the module's component props are opaque to us\n T extends Record<string, any>,\n TKey extends keyof T = 'default',\n>(importer: () => Promise<T>, exportName?: TKey): ReturnType<typeof lazyRouteComponent<T, TKey>> {\n return lazyRouteComponent(importer, exportName)\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport type { IRouter } from './use-router'\n\n/**\n * The route context that {@link createRouter} injects before every route's own `beforeLoad`: it\n * always carries `{ routeId, locale, router }`, plus whatever ancestors returned from their\n * `beforeLoad`. The router is translation-agnostic — to translate in `title` / `description` / a\n * component, an ancestor `beforeLoad` puts a translator on context (e.g. `return { t }`); it then\n * shows up here as `context.t` (augment this interface to type it).\n */\nexport interface RouteContext {\n /** This route's id. */\n routeId: string\n /** The active locale for the sub-tree this route was mounted in. */\n locale: ILocale\n /**\n * A locale-aware router bound to this route — the same surface as `useRouter().router`, so a guard\n * can `throw context.router.redirect({ id: 'login' })` or `throw context.router.notFound()`.\n */\n router: IRouter\n /** Anything an ancestor's `beforeLoad` merged into context (typed as `unknown`). */\n [key: string]: unknown\n}\n\n/**\n * The context object passed to a route's `beforeLoad` / `loader`. Type its `params` and `search`\n * via {@link createRoute}'s generics; `context.locale` is always available. Other TanStack ctx\n * fields (`location`, `cause`, `abortController`, …) remain reachable as `unknown`.\n */\nexport interface RouteHandlerCtx<\n TParams = Record<string, string>,\n TSearch = Record<string, unknown>,\n> {\n context: RouteContext\n params: TParams\n search: TSearch\n [key: string]: unknown\n}\n\n/**\n * Static, per-route flags the app reads back while that route is active — via\n * {@link useRouteStaticData}. Declared once on the route (`staticData: { … }`), never computed, and\n * inherited by child routes (the deepest route that sets a key wins). Use it for app-level chrome\n * decisions that belong to the route itself: hide the cookie banner on the privacy policy, a\n * full-bleed layout, a breadcrumb label. Augment it to type your keys:\n *\n * @example\n * declare module '@luwiostack/router' {\n * interface RouteStaticData {\n * hideCookieBanner?: boolean\n * }\n * }\n */\n// biome-ignore lint/suspicious/noEmptyInterface: intentionally empty — consumers augment it.\nexport interface RouteStaticData {}\n\n/**\n * The document-head tags a route contributes, rendered by `<HeadContent />` (re-exported from\n * `@luwiostack/router`). TanStack merges tags across the matched routes: for `title` and for each\n * `meta` `name`/`property`, the **deepest** route wins; `links`, `styles` and head `scripts` are\n * concatenated.\n */\nexport interface RouteHead {\n /**\n * `<title>` and `<meta>` tags. `{ title: '…' }` sets the document title; `{ name, content }` and\n * `{ property, content }` set `<meta>`; `{ 'script:ld+json': {…} }` emits a JSON-LD script.\n */\n meta?: Array<Record<string, unknown>>\n /** `<link>` tags — canonical, `alternate`/hreflang, preload, and so on. */\n links?: Array<Record<string, unknown>>\n /** `<script>` tags placed in the head. */\n scripts?: Array<Record<string, unknown>>\n /** `<style>` tags. */\n styles?: Array<Record<string, unknown>>\n}\n\n/**\n * The context passed to a route's {@link RouteConfig.head | head}. It mirrors TanStack's head ctx\n * (`match`, `matches`, `params`, `loaderData`) and — because `@luwiostack/router` wraps `head` — adds\n * `context` at the top level, so `context.locale` reads exactly like it does in `beforeLoad` and\n * `loader` (TanStack's raw head ctx exposes it only as `match.context`).\n */\nexport interface RouteHeadCtx<TParams = Record<string, string>> {\n /** Route context — always carries `{ routeId, locale }`, plus anything `beforeLoad` merged in. */\n context: RouteContext\n params: TParams\n loaderData: unknown\n /** The current route match — its `context` is the same {@link RouteContext}. */\n match: { context: RouteContext; params: TParams; loaderData: unknown; [key: string]: unknown }\n matches: ReadonlyArray<unknown>\n [key: string]: unknown\n}\n\n/**\n * The context passed to a route's {@link RouteConfig.onPageView | onPageView}: the page the visitor\n * landed on, plus the same `context` / `params` / `search` its `beforeLoad` and `loader` see — so\n * whatever an ancestor put on context (a translator, an analytics instance) is reachable.\n */\nexport interface RoutePageViewCtx<\n TParams = Record<string, string>,\n TSearch = Record<string, unknown>,\n> {\n /** Route context: `{ routeId, locale, router }` plus anything an ancestor's `beforeLoad` merged in. */\n context: RouteContext\n params: TParams\n search: TSearch\n /** The route's resolved `title()` — the value the router puts in `<title>`. */\n title: string\n /** The pathname, e.g. `/nl-NL/ontdek`. */\n path: string\n /** The root-relative URL: pathname, query string and hash. */\n href: string\n}\n\n/**\n * The configuration passed to {@link createRoute}. It accepts this package's own three keys\n * ({@link RouteConfig.id | id}, {@link RouteConfig.parent | parent}, {@link RouteConfig.layout | layout})\n * plus TanStack Router's route options, which are forwarded verbatim when the tree is built. The\n * common options are surfaced below with types and docs; the index signature keeps every other\n * TanStack option available too.\n *\n * The generics type the `params` / `search` seen by `beforeLoad`, `loader` and `head` (and\n * `validateSearch`'s return) — `createRoute<{ postId: string }>({ … })`. They default to loose\n * records, so untyped usage keeps working; `context.locale` (and `head`'s `locale`) is always typed.\n *\n * `path` and `getParentRoute` are intentionally NOT accepted: the URL path is derived per locale\n * from {@link RouteBuilder.alias} (one or more segments), and the parent is wired from\n * {@link RouteConfig.parent | parent}.\n */\nexport interface RouteConfig<TParams = Record<string, string>, TSearch = Record<string, unknown>> {\n // ── @luwiostack/router options ──────────────────────────────────────────────\n /** Stable, unique id. Wires {@link RouteConfig.parent} and identifies the route for navigation. */\n id: string\n /** Parent route id. Omit for a top-level route (mounted directly under the locale layout). */\n parent?: string\n /**\n * Marks a **pathless** route: it contributes no URL segment. Use it for an auth guard\n * (`beforeLoad`) or a shared layout (`component` wrapping an `<Outlet />`). Layout routes\n * take no aliases.\n */\n layout?: boolean\n\n // ── Data & lifecycle (TanStack) ────────────────────────────────────────\n /**\n * Runs before this route (and its children) load. Its return value is **merged into the route\n * context** for this route and every descendant. Receives a typed ctx whose `context.locale` is\n * the active locale. Use it for auth guards (`throw redirect(...)`) and to derive context.\n */\n beforeLoad?: (ctx: RouteHandlerCtx<TParams, TSearch>) => unknown\n /**\n * Loads this route's data before its component renders. The return is the route's loader data\n * (read with `useRouteLoaderData()`). Receives a typed ctx; `context.locale` is available.\n */\n loader?: (ctx: RouteHandlerCtx<TParams, TSearch>) => unknown\n /**\n * Selects the slice of `search` the {@link RouteConfig.loader | loader} depends on, so the loader\n * re-runs only when those values change.\n */\n loaderDeps?: (opts: { search: TSearch }) => Record<string, unknown>\n /** Parse and validate the query string into the typed `search` this route exposes. */\n validateSearch?: (search: Record<string, unknown>) => TSearch\n /**\n * The page title — **required** for every URL-bearing route (SEO). Receives the head ctx, so\n * `context.locale` (and anything an ancestor put on context, like a translator) is available:\n * `title: ({ context }) => context.t('about.title')`. The router renders it as `<title>` and\n * `og:title`. Layout routes omit it. `createRouter` throws if a URL route has none.\n */\n title?: (ctx: RouteHeadCtx<TParams>) => string\n /**\n * The meta description — **required** for every URL-bearing route (SEO). Same ctx as {@link\n * RouteConfig.title | title}. The router renders it as `<meta name=\"description\">` and\n * `og:description`. Layout routes omit it. `createRouter` throws if a URL route has none.\n */\n description?: (ctx: RouteHeadCtx<TParams>) => string\n /**\n * **Optional** extra head tags beyond the SEO essentials the router already emits (title,\n * description, canonical, hreflang alternates, og:*). Use it for JSON-LD, preloads, extra og/twitter\n * tags, etc. Same ctx as `title`/`description`; merged with the other matched routes — see\n * {@link RouteHead}.\n */\n head?: (ctx: RouteHeadCtx<TParams>) => RouteHead\n /**\n * **Optional.** Called once per page view of this route: the first load, then each navigation to a\n * different path or query string (not a hash-only change or a re-resolve of the same URL). Track\n * it here — the router knows nothing about analytics:\n * `onPageView: ({ context, title }) => context.analytics.pageView({ title, route_id: context.routeId })`.\n *\n * Only for the route that **is** the page: it isn't inherited, so a child's page view never runs a\n * parent's `onPageView`, and a layout route may not set it (`createRouter` throws). Runs in the\n * browser only, never during server rendering.\n */\n onPageView?: (ctx: RoutePageViewCtx<TParams, TSearch>) => void\n\n // ── UI (TanStack) ──────────────────────────────────────────────────────\n /** The route's component — the page (or layout shell wrapping `<Outlet />`). */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n component?: any\n /** Shown while this route's loader is pending. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n pendingComponent?: any\n /** Shown when this route (or a child) throws during load or render. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n errorComponent?: any\n /** Shown when `notFound()` is thrown beneath this route. */\n // biome-ignore lint/suspicious/noExplicitAny: forwarded to TanStack, which owns the real types\n notFoundComponent?: any\n\n // ── Behaviour (TanStack) ───────────────────────────────────────────────\n /** Milliseconds the loader data stays fresh; within it, navigation reuses the cache instead of re-loading. */\n staleTime?: number\n /** Milliseconds cached loader data is kept after the route is no longer active before being garbage-collected. */\n gcTime?: number\n /** Whether the loader re-runs on navigation — a boolean or a predicate over the match. */\n shouldReload?: boolean | ((ctx: RouteHandlerCtx<TParams, TSearch>) => boolean)\n /** Match this route's path case-sensitively (default: false). */\n caseSensitive?: boolean\n /** Wrap the component in a `<Suspense>` boundary (default: true for lazy components). */\n wrapInSuspense?: boolean\n /**\n * Static flags for this route and its descendants, read back with {@link useRouteStaticData}.\n * Typed by augmenting {@link RouteStaticData}.\n */\n staticData?: RouteStaticData\n\n /** Any other TanStack Router route option — forwarded to `createRoute` untouched. */\n [option: string]: unknown\n}\n\n/** The forwarded TanStack options — {@link RouteConfig} without this package's own keys. */\nexport type RouteOptions = Omit<RouteConfig, 'id' | 'parent' | 'layout'>\n\n/**\n * The route-config keys we recognise: this package's own three, the SEO/head keys the router adds,\n * and the TanStack Router route options. {@link RouteConfig}'s index signature makes every key\n * type-check, so a typo (`componet`, `beforeLod`) would slip through and the route would silently\n * render nothing. {@link warnUnknownKeys} uses this set to flag a key that looks like a typo of one\n * of these — it does NOT reject unknown keys outright, so a newer TanStack option we haven't listed\n * still passes through untouched.\n */\nconst KNOWN_KEYS: ReadonlySet<string> = new Set([\n // @luwiostack/router\n 'id',\n 'parent',\n 'layout',\n 'title',\n 'description',\n 'head',\n 'onPageView',\n // TanStack — data & lifecycle\n 'beforeLoad',\n 'loader',\n 'loaderDeps',\n 'validateSearch',\n 'shouldReload',\n 'remountDeps',\n 'onEnter',\n 'onLeave',\n 'onStay',\n 'onCatch',\n // TanStack — components\n 'component',\n 'pendingComponent',\n 'errorComponent',\n 'notFoundComponent',\n 'shellComponent',\n // TanStack — caching & behaviour\n 'staleTime',\n 'preloadStaleTime',\n 'gcTime',\n 'preloadGcTime',\n 'caseSensitive',\n 'wrapInSuspense',\n 'staticData',\n 'preload',\n 'ssr',\n 'pendingMs',\n 'pendingMinMs',\n // TanStack — params, search & head\n 'context',\n 'params',\n 'stringifyParams',\n 'parseParams',\n 'search',\n 'scripts',\n 'links',\n 'meta',\n 'headers',\n 'codeSplitGroupings',\n])\n\n/** Levenshtein edit distance, bailing out as soon as it exceeds `max` (we only care about near-misses). */\nfunction editDistance(a: string, b: string, max: number): number {\n if (Math.abs(a.length - b.length) > max) return max + 1\n let prev = new Array<number>(b.length + 1)\n let curr = new Array<number>(b.length + 1)\n for (let j = 0; j <= b.length; j++) prev[j] = j\n for (let i = 1; i <= a.length; i++) {\n curr[0] = i\n let rowMin = i\n for (let j = 1; j <= b.length; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1\n const d = Math.min((prev[j] ?? 0) + 1, (curr[j - 1] ?? 0) + 1, (prev[j - 1] ?? 0) + cost)\n curr[j] = d\n if (d < rowMin) rowMin = d\n }\n // whole row already past the budget — can't recover\n if (rowMin > max) return max + 1\n ;[prev, curr] = [curr, prev]\n }\n return prev[b.length] ?? max + 1\n}\n\n/**\n * Warn (once, to the console) about a route-config key that looks like a typo of a {@link KNOWN_KEYS}\n * option — `componet` → `component`, `beforeLod` → `beforeLoad`. A key that's simply unknown but not\n * close to any known one is left alone (it may be a valid TanStack option we don't list). Best-effort\n * DX only: it never throws, so a mistyped key still forwards to TanStack exactly as before.\n */\nfunction warnUnknownKeys(id: string, keys: readonly string[]): void {\n for (const key of keys) {\n if (KNOWN_KEYS.has(key) || key.startsWith('$')) continue\n // Only short-ish typos of short-ish keys — long keys with distance 2 are usually genuinely\n // different options, not slips.\n let suggestion: string | undefined\n for (const known of KNOWN_KEYS) {\n const budget = key.length <= 5 ? 1 : 2\n if (editDistance(key, known, budget) <= budget) {\n suggestion = known\n break\n }\n }\n if (suggestion) {\n console.warn(\n `createRoute(\"${id}\"): unknown option \"${key}\" — did you mean \"${suggestion}\"? ` +\n `It will be forwarded to TanStack as-is and likely ignored.`,\n )\n }\n }\n}\n\n/**\n * A deferred route definition. Created by {@link createRoute}, it collects the TanStack options\n * plus a per-locale alias map. The real TanStack routes are only created later, once\n * `createRouter` knows which locales to build.\n */\nexport class RouteBuilder {\n readonly id: string\n readonly parent: string | undefined\n readonly layout: boolean\n readonly options: RouteOptions\n readonly #aliases = new Map<string, string>()\n\n // Accepts any generic instantiation of RouteConfig — the builder erases the param/search types\n // (they only guide createRoute's callbacks); the runtime just forwards options.\n // biome-ignore lint/suspicious/noExplicitAny: variance-neutral so every RouteConfig<…> is accepted\n constructor(config: RouteConfig<any, any>) {\n const { id, parent, layout = false, ...options } = config\n this.id = id\n this.parent = parent\n this.layout = layout\n this.options = options\n warnUnknownKeys(id, Object.keys(config))\n }\n\n /**\n * Register the localized URL path for one locale. The slug is a full TanStack path pattern, so it\n * may be a single segment (`'over-ons'`), the empty string (the locale index), or a **multi-segment\n * path** with static parts and dynamic params (`'blog/$postId'`) — a bare `$` segment is a splat.\n * Both the static parts and the pattern can differ per locale.\n *\n * @example\n * route.alias(Locale.new({ languageOrLocale: 'nl-BE' }), 'over-ons')\n * route.alias(Locale.new({ languageOrLocale: 'en-BE' }), 'blog/$postId')\n *\n * @throws If the route is a layout route (it has no URL), or if the locale is already aliased.\n */\n alias(locale: ILocale, slug: string): this {\n if (this.layout) {\n throw new Error(\n `Route \"${this.id}\" is a layout route and has no URL, so alias() is not allowed.`,\n )\n }\n if (this.#aliases.has(locale.code)) {\n throw new Error(`Route \"${this.id}\" already has an alias for \"${locale.code}\".`)\n }\n this.#aliases.set(locale.code, slug)\n return this\n }\n\n /** Whether an explicit alias exists for the given locale. */\n hasAlias(locale: ILocale): boolean {\n return this.#aliases.has(locale.code)\n }\n\n /** How many locales this route is aliased in. A URL-bearing route must have at least one. */\n get aliasCount(): number {\n return this.#aliases.size\n }\n\n /**\n * The URL path for a locale (one or more segments), from the alias registered for that locale.\n * `createRouter` mounts a route only in the locales it is aliased in, so this is only called when\n * an alias is present — it throws rather than invent a segment from the id.\n */\n slugFor(locale: ILocale): string {\n const slug = this.#aliases.get(locale.code)\n if (slug === undefined) {\n throw new Error(`Route \"${this.id}\" has no alias for \"${locale.code}\".`)\n }\n return slug\n }\n}\n\n/**\n * Define a locale-aware route. Returns a {@link RouteBuilder}; call {@link RouteBuilder.alias} to\n * give it a localized URL segment per locale, then register it with a {@link RouteRegistry}.\n *\n * Optionally type the `params` / `search` the route's `beforeLoad` and `loader` receive:\n * `createRoute<{ postId: string }>({ … })`.\n *\n * @example\n * const route = createRoute({ id: 'about', component: About })\n * route.alias(Locale.new({ languageOrLocale: 'en-BE' }), 'about')\n * route.alias(Locale.new({ languageOrLocale: 'nl-BE' }), 'over-ons')\n */\nexport function createRoute<TParams = Record<string, string>, TSearch = Record<string, unknown>>(\n config: RouteConfig<TParams, TSearch>,\n): RouteBuilder {\n if (!config.id) {\n throw new Error('createRoute requires an \"id\".')\n }\n return new RouteBuilder(config)\n}\n","import { collectModules, createModuleRegistry, type ModuleRegistry } from '@luwiostack/registry'\nimport { RouteBuilder } from './route-builder'\n\nconst isRoute = (value: unknown): value is RouteBuilder => value instanceof RouteBuilder\n\n/**\n * Collects {@link RouteBuilder}s. Routes usually land here via {@link registerModules} (driven by\n * the `@luwiostack/router/vite` plugin or a glob), then the registry is handed to `createRouter`, which\n * expands it into a real TanStack route tree.\n *\n * Most apps use the shared {@link routeRegistry} singleton. Construct your own `RouteRegistry` when\n * you need an isolated set — tests, or several routers in one app. Built on\n * `@luwiostack/registry`'s `createModuleRegistry` (deduping by route id, throwing on a clash).\n */\nexport class RouteRegistry {\n readonly #inner: ModuleRegistry<RouteBuilder> = createModuleRegistry<RouteBuilder>({\n idOf: (route) => route.id,\n match: isRoute,\n onDuplicate: 'throw',\n label: 'route',\n })\n\n /**\n * Register a route. A low-level primitive — route files normally just `export` their route and\n * let {@link registerModules} add it.\n *\n * @throws If a *different* route with the same id was already registered.\n */\n add(route: RouteBuilder): this {\n this.#inner.add(route)\n return this\n }\n\n /** All registered routes, in registration order. */\n all(): readonly RouteBuilder[] {\n return this.#inner.all()\n }\n\n /** Look up a registered route by id. */\n get(id: string): RouteBuilder | undefined {\n return this.#inner.get(id)\n }\n\n /** Remove every registered route. Mainly useful in tests. */\n clear(): void {\n this.#inner.clear()\n }\n}\n\n/** The shared registry used by most apps. */\nexport const routeRegistry = new RouteRegistry()\n\n/**\n * Register every {@link RouteBuilder} exported by the given modules — so route files just\n * `export` their route and never call `add()` themselves.\n *\n * Accepts what a bundler hands you: the record from `import.meta.glob(..., { eager: true })`, or an\n * array of module namespaces (what the `@luwiostack/router/vite` plugin passes). Any export that is a\n * `RouteBuilder` — default or named — is registered; everything else is ignored.\n *\n * @example\n * // No plugin? One line in your app:\n * registerModules(import.meta.glob('./routes/**\\/*.route.tsx', { eager: true }))\n */\nexport function registerModules(\n modules: Record<string, unknown> | readonly unknown[],\n registry: RouteRegistry = routeRegistry,\n): RouteRegistry {\n for (const route of collectModules(modules, isRoute)) registry.add(route)\n return registry\n}\n","import type { ILocale } from '@luwiostack/locale'\nimport {\n useLoaderData,\n useParams,\n useRouterState,\n useSearch,\n useRouteContext as useTanstackRouteContext,\n useRouter as useTanstackRouter,\n} from '@tanstack/react-router'\nimport type { RouteStaticData } from './route-builder'\nimport { getRouterMeta } from './router-meta'\n\n// Thin, locale-aware wrappers around TanStack's per-route hooks. Each defaults to the CURRENT route\n// (TanStack's `strict: false`), so a page component reads its own data with no `from` boilerplate.\n// To target another route type-safely, use TanStack's hooks directly with a `from` id.\n\n/**\n * The active locale, read straight from the router state (the `{ routeId, locale }` injected into\n * context by `createRouter`). Unlike `@luwiostack/locale`'s `useLocale`, this does not require the\n * `<Locale>` provider — so it also works in a `notFoundComponent` above it.\n *\n * @throws If used outside a router created by {@link createRouter}.\n */\nexport function useRouteLocale(): { locale: ILocale; language: string; region: string } {\n const tanstack = useTanstackRouter()\n const fallback = getRouterMeta(tanstack)?.config.defaultLocale\n const locale =\n useRouterState({\n select: (s) => (s.matches.at(-1)?.context as { locale?: ILocale } | undefined)?.locale,\n }) ?? fallback\n if (!locale) {\n throw new Error('useRouteLocale must be used inside a router created by createRouter().')\n }\n return { locale, language: locale.language_code, region: locale.country_code }\n}\n\n/**\n * The current route's path params (wraps TanStack `useParams`). Pass a `select` to subscribe to just\n * one param — the component then re-renders only when that selected value changes, not on every param\n * update.\n *\n * @example\n * const params = useRouteParams<{ postId: string }>() // the whole object\n * const postId = useRouteParams((p) => p.postId) // just one — re-renders only when postId changes\n */\nexport function useRouteParams<T = Record<string, string>, S = T>(select?: (params: T) => S): S {\n return useParams({ strict: false, select: select as never }) as unknown as S\n}\n\n/**\n * The current route's query/search params (wraps TanStack `useSearch`). Pass a `select` to subscribe\n * to just one value — the component then re-renders only when that selected value changes.\n *\n * @example\n * const query = useRouteQuery<{ page?: number }>() // the whole object\n * const page = useRouteQuery((s) => s.page ?? 1) // just one — re-renders only when page changes\n */\nexport function useRouteQuery<T = Record<string, unknown>, S = T>(select?: (search: T) => S): S {\n return useSearch({ strict: false, select: select as never }) as unknown as S\n}\n\n/** The current route's loader data (wraps TanStack `useLoaderData`). */\nexport function useRouteLoaderData<T = unknown>(): T {\n return useLoaderData({ strict: false }) as unknown as T\n}\n\n/**\n * The current route's context — includes the `{ routeId, locale }` injected by `createRouter`\n * (wraps TanStack `useRouteContext`).\n */\nexport function useRouteContext<T = unknown>(): T {\n return useTanstackRouteContext({ strict: false }) as unknown as T\n}\n\n/**\n * The {@link RouteStaticData} of the active route, merged down the matched route tree: a layout's\n * flags apply to every child, and the deepest route that sets a key wins. Usable anywhere under the\n * router — also in app chrome (a shell, a banner) outside the page component itself. Pass a `select`\n * to subscribe to one flag only.\n *\n * @example\n * // on the route\n * createRoute({ id: 'privacy', staticData: { hideCookieBanner: true }, … })\n * // in the app shell\n * const hideBanner = useRouteStaticData((d) => d.hideCookieBanner === true)\n */\nexport function useRouteStaticData(): RouteStaticData\nexport function useRouteStaticData<S>(select: (data: RouteStaticData) => S): S\nexport function useRouteStaticData<S>(select?: (data: RouteStaticData) => S): S | RouteStaticData {\n return useRouterState({\n select: (s): S | RouteStaticData => {\n const merged: RouteStaticData = Object.assign(\n {},\n ...s.matches.map((m) => (m as { staticData?: RouteStaticData }).staticData),\n )\n return select ? select(merged) : merged\n },\n }) as S | RouteStaticData\n}\n\n/**\n * What a `statusPages` page (see `createRouter`'s config) receives about the failure that redirected\n * here. `error` is only present for a `beforeLoad`/`loader` failure — a 404/403 has no underlying\n * exception, just a status — see {@link useRouteFailure}.\n */\nexport interface RouteFailure {\n /** The HTTP status the router resolved — 404, 403, or whatever the thrown error carried (else 500). */\n status: number\n /** The underlying error, for a `beforeLoad`/`loader` failure only. */\n error?: { message: string }\n}\n\n/**\n * The failure that redirected here, for a page configured in `createRouter`'s `statusPages` (404,\n * 403, a dedicated status like 503, or the `default` catch-all). The router attaches this as history\n * state on every status-page redirect, so the page can render the real status/message instead of a\n * hardcoded string:\n *\n * @example\n * function Maintenance() {\n * const failure = useRouteFailure()\n * return <h1>{failure?.status ?? 503} — The website is in maintenance</h1>\n * }\n *\n * `undefined` when the page was opened directly (a bookmark, a typed URL) rather than via a\n * router-triggered redirect — there's no failure to report.\n */\nexport function useRouteFailure(): RouteFailure | undefined {\n const state = useRouterState({\n select: (s) =>\n s.location.state as { status?: unknown; error?: { message: string } } | undefined,\n })\n return typeof state?.status === 'number'\n ? { status: state.status, error: state.error }\n : undefined\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57],"mappings":";;;;;;;;;;;;AAOA,IAAI,WAAW,QAAQ;AACvB,IAAI,kBAAkF,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;AAwB9F,SAAS,wBAAwB,KAAK,UAAU,UAAU;CACzD,QAAQ,gBAAgB;EACvB,IAAI,CAAC,IAAI,WAAW,YAAY,OAAO,yBAAyB,YAAY,aAAa,SAAS;EAClG,MAAM,WAAW,IAAI,sBAAsB,YAAY;GACtD,SAAS,QAAQ,IAAI,CAAC;EACvB,GAAG,EAAE,YAAY,QAAQ,CAAC;EAC1B,SAAS,QAAQ,IAAI,OAAO;EAC5B,aAAa;GACZ,SAAS,WAAW;GACpB,S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