one 2.9.1 → 2.9.2
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.
- package/dist/cjs/router/router.cjs +2 -1
- package/dist/cjs/router/router.native.cjs +5 -2
- package/dist/cjs/router/router.native.js +5 -2
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/router/utils/getNativeStackReplaceAction.cjs +54 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.cjs +58 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.js +60 -0
- package/dist/cjs/router/utils/getNativeStackReplaceAction.native.js.map +1 -0
- package/dist/esm/router/router.mjs +1 -1
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +5 -2
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/router/utils/getNativeStackReplaceAction.mjs +35 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.mjs.map +1 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.native.js +37 -0
- package/dist/esm/router/utils/getNativeStackReplaceAction.native.js.map +1 -0
- package/package.json +17 -17
- package/src/router/router.ts +9 -2
- package/src/router/utils/getNativeStackReplaceAction.ts +55 -0
- package/types/router/router.d.ts.map +1 -1
- package/types/router/utils/getNativeStackReplaceAction.d.ts +12 -0
- package/types/router/utils/getNativeStackReplaceAction.d.ts.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","names":[],"sources":["esm/router/router.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { getLoaderPath, getPreloadCSSPath, getPreloadPath } from \"../utils/cleanUrl\";\nimport { dynamicImport, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { hasFileExtension, shouldLinkExternally, shouldPreloadRoute } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRouteArtifactPaths } from \"./getRouteArtifactPath\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname, stripTrailingSlash } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { preloadRouteModules } from \"./useViteRoutes\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\nlet routeNode = null;\nlet rootComponent;\nconst protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tconst normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tfor (const [contextKey, guardedRedirects] of protectedRouteRegistry) {\n\t\tconst normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\tconst routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\tconst normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tlet target = href;\n\tconst visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tconst redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nlet hasAttemptedToHideSplash = false;\nlet initialState;\nlet rootState;\nlet initialPathname;\nlet lastIntendedPathname;\nlet nextState;\nlet routeInfo;\nlet splashScreenAnimationFrame;\nlet pendingNavigationPathname;\nlet pendingNavigationAction;\nlet navigationRef = null;\nconst rootStateSubscribers = /* @__PURE__ */ new Set();\nconst loadingStateSubscribers = /* @__PURE__ */ new Set();\nconst storeSubscribers = /* @__PURE__ */ new Set();\nlet currentMatches = [];\nlet validationState = { status: \"idle\" };\nconst validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn () => validationStateSubscribers.delete(subscriber);\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tfor (const subscriber of validationStateSubscribers) subscriber(state);\n\tif (state.status === \"error\" && state.error) window.dispatchEvent(new CustomEvent(\"one-validation-error\", { detail: {\n\t\terror: {\n\t\t\tmessage: state.error.message,\n\t\t\tname: state.error.name,\n\t\t\tstack: state.error.stack\n\t\t},\n\t\thref: state.lastValidatedHref,\n\t\ttimestamp: Date.now()\n\t} }));\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nlet cachedRouteNode = null;\nlet cachedRootComponent = null;\nlet cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tconst formatRouteTree = (node, indent = \"\", isLast = true) => {\n\t\t\tconst prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tconst childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tconst dynamicBadge = node.dynamic ? ` [${node.dynamic.map((d) => d.name).join(\", \")}]` : \"\";\n\t\t\tconst typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tconst slotsBadge = node.slots?.size ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tlet line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tconst visibleChildren = node.children.filter((child) => !child.internal);\n\t\t\tfor (let i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tconst child = visibleChildren[i];\n\t\t\t\tconst childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif (routeNode.slots?.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tfor (const [slotName, slotConfig] of routeNode.slots) console.info(` @${slotName}:`, {\n\t\t\t\tdefaultRoute: slotConfig.defaultRoute?.route,\n\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map((r) => ({\n\t\t\t\t\troute: r.route,\n\t\t\t\t\tintercept: r.intercept\n\t\t\t\t}))\n\t\t\t});\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = initialLocation?.pathname ?? getSafeWindowPathname();\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tlet state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(() => {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tlet shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t}\n\tif (shouldUpdateSubscribers) startTransition(() => {\n\t\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(() => {\n\t\tupdateSnapshot();\n\t\tfor (const subscriber of storeSubscribers) subscriber();\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef?.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams(params = {}) {\n\tassertIsReady(navigationRef);\n\treturn navigationRef?.current?.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef?.dispatch(StackActions.popToTop());\n}\nfunction goBack() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef?.current?.goBack();\n}\nfunction canGoBack() {\n\tif (!navigationRef.isReady()) return false;\n\treturn navigationRef?.current?.canGoBack() ?? false;\n}\nfunction canDismiss() {\n\tlet state = rootState;\n\twhile (state) {\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = state.routes?.[state.index]?.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter((route) => !route.internal).sort(sortRoutes);\n}\nfunction updateState(state, nextStateParam = state) {\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo?.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tconst nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tconst from = routeInfo?.pathname || \"(initial)\";\n\t\t\tconst to = nextRouteInfo.pathname;\n\t\t\tconst params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") {\n\t\twindow.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\t\trouteInfo: nextRouteInfo,\n\t\t\trootState: state,\n\t\t\trouteNode,\n\t\t\tgetRoutes: () => routeNode?.children || [],\n\t\t\tgetLoaderTimingHistory: () => devtoolsRegistry.getLoaderTimingHistory?.() ?? [],\n\t\t\tgetPreloadHistory\n\t\t});\n\t\twindow.dispatchEvent(new CustomEvent(\"one-route-change\", { detail: nextRouteInfo }));\n\t}\n}\nfunction consumePendingNavigationAction() {\n\tconst action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn () => {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn () => {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn () => {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(() => {\n\t\tfor (const listener of loadingStateSubscribers) listener(state);\n\t});\n}\nlet currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tconst pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !routeInfo?.pathname) return false;\n\tconst nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tconst browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tconst currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tconst [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(() => {\n\t\tconst unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tconst browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && routeInfo?.unstable_globalHref === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nconst preloadingLoader = {};\nconst PRELOAD_MAP_MAX = 200;\nfunction setBoundedPreloadRecord(record, key, value) {\n\tif (!(key in record)) {\n\t\tconst keys = Object.keys(record);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete record[keys[0]];\n\t}\n\trecord[key] = value;\n}\nasync function doPreloadDev(href) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst startTime = performance.now();\n\t\tconst normalizedPath = normalizeLoaderPath(href);\n\t\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\t\ttry {\n\t\t\tconst loaderJSUrl = getLoaderPath(href, true);\n\t\t\tconst moduleLoadStart = performance.now();\n\t\t\tconst modulePromise = dynamicImport(loaderJSUrl, false);\n\t\t\tif (!modulePromise) return null;\n\t\t\tconst module = await modulePromise.catch(() => null);\n\t\t\tconst moduleLoadTime = performance.now() - moduleLoadStart;\n\t\t\tif (!module?.loader) return null;\n\t\t\tconst executionStart = performance.now();\n\t\t\tconst result = await module.loader();\n\t\t\tconst executionTime = performance.now() - executionStart;\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tif (result?.__oneRedirect) return result;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\tmoduleLoadTime,\n\t\t\t\texecutionTime,\n\t\t\t\ttotalTime,\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\treturn result ?? null;\n\t\t} catch (err) {\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\ttotalTime,\n\t\t\t\terror: err instanceof Error ? err.message : String(err),\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\tif (process.env.ONE_DEBUG_ROUTER) console.warn(`[one] dev preload failed for ${href}:`, err);\n\t\t\treturn null;\n\t\t}\n\t}\n}\nasync function doPreload(href) {\n\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\tconst artifactPaths = getRouteArtifactPaths(href, getResolvedLinking(), routeNode);\n\tconst preloadPath = getPreloadPath(artifactPaths.preload);\n\tconst loaderPath = getLoaderPath(artifactPaths.loader);\n\tconst cssPreloadPath = getPreloadCSSPath(artifactPaths.preload);\n\trecordPreloadStart(href);\n\ttry {\n\t\tconst [_preload, cssPreloadModule, loader] = await Promise.all([\n\t\t\tdynamicImport(preloadPath, false),\n\t\t\tdynamicImport(cssPreloadPath, false),\n\t\t\tdynamicImport(loaderPath, false),\n\t\t\tpreloadRouteModules(href)\n\t\t]);\n\t\tconst hasCss = !!cssPreloadModule?.injectCSS;\n\t\tif (hasCss) setBoundedCssInject(href, cssPreloadModule.injectCSS);\n\t\tif (!!!loader?.loader) {\n\t\t\trecordPreloadComplete(href, false, hasCss);\n\t\t\treturn null;\n\t\t}\n\t\tconst result = await loader.loader();\n\t\tif (result?.__oneRedirect) return result;\n\t\trecordPreloadComplete(href, true, hasCss);\n\t\treturn result ?? null;\n\t} catch (err) {\n\t\tconst errorMessage = err instanceof Error ? err.message : String(err);\n\t\tconsole.error(`[one] preload error for ${href}:`, err);\n\t\trecordPreloadError(href, errorMessage);\n\t\tthrow err;\n\t}\n}\nconst preloadedLoaderData = {};\nconst cssInjectFunctions = {};\nfunction setBoundedCssInject(key, value) {\n\tif (!(key in cssInjectFunctions)) {\n\t\tconst keys = Object.keys(cssInjectFunctions);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete cssInjectFunctions[keys[0]];\n\t}\n\tcssInjectFunctions[key] = value;\n}\nconst preloadHistory = [];\nconst MAX_PRELOAD_HISTORY = 30;\nfunction recordPreloadStart(href) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst existing = preloadHistory.find((p) => p.href === href);\n\tif (existing) {\n\t\texisting.status = \"loading\";\n\t\texisting.startTime = performance.now();\n\t\treturn;\n\t}\n\tpreloadHistory.unshift({\n\t\thref,\n\t\tstatus: \"loading\",\n\t\tstartTime: performance.now(),\n\t\thasLoader: false,\n\t\thasCss: false\n\t});\n\tif (preloadHistory.length > MAX_PRELOAD_HISTORY) preloadHistory.pop();\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadComplete(href, hasLoader, hasCss) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"loaded\";\n\t\tentry.endTime = performance.now();\n\t\tentry.hasLoader = hasLoader;\n\t\tentry.hasCss = hasCss;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadError(href, error) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"error\";\n\t\tentry.endTime = performance.now();\n\t\tentry.error = error;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction dispatchPreloadEvent() {\n\twindow.dispatchEvent(new CustomEvent(\"one-preload-update\"));\n}\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href, injectCSS = false) {\n\tif (!shouldPreloadRoute(href)) return;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\treturn data;\n\t\t}));\n\t\treturn preloadingLoader[normalizedHref];\n\t}\n\tif (!preloadingLoader[href]) setBoundedPreloadRecord(preloadingLoader, href, doPreload(href).then((data) => {\n\t\tsetBoundedPreloadRecord(preloadedLoaderData, href, data);\n\t\treturn data;\n\t}).catch((err) => {\n\t\tdelete preloadingLoader[href];\n\t\tthrow err;\n\t}));\n\treturn preloadingLoader[href]?.then(async (data) => {\n\t\tif (injectCSS) {\n\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t}\n\t\treturn data;\n\t}, (err) => {\n\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\twindow.location.href = href;\n\t\t\treturn new Promise(() => {});\n\t\t}\n\t\treturn null;\n\t});\n}\nfunction normalizeLoaderPath(href) {\n\treturn new URL(href, \"http://example.com\").pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tconst pathname = extractPathnameFromHref(href);\n\tconst routeId = matchingNode?.contextKey || pathname;\n\tconst layoutMatches = currentMatches.filter((m) => m.routeId.includes(\"_layout\"));\n\tconst pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tclearNotFoundState();\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (hasFileExtension(href)) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tconst protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tconst currentLayoutNode = routeNode;\n\tconst currentPath = routeInfo?.pathname || \"/\";\n\tconst interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tconst { interceptRoute, slotName, layoutContextKey, params: params2 } = interceptResult;\n\t\tconst scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params2);\n\t\tupdateURLWithoutNavigation(href);\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams: params2,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tconst current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tconst linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tlet base = routeInfo?.segments?.map((segment) => {\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tconst params2 = routeInfo?.params?.[segment];\n\t\t\t\tif (Array.isArray(params2)) return params2.join(\"/\");\n\t\t\t\treturn params2?.split(\",\")?.join(\"/\") ?? \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo?.params?.[segment];\n\t\t}).filter(Boolean).join(\"/\") ?? \"/\";\n\t\tif (!routeInfo?.isIndex) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tconst state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tconst normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) await preloadRoute(href, true);\n\telse if (process.env.NODE_ENV !== \"development\") {\n\t\tconst inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(() => {});\n\t}\n\tconst preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult?.__oneRedirect) {\n\t\tconst redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif (preloadResult?.__oneError === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tconst notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tconst matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tif (matchingRouteNode?.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tconst loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tconst params2 = extractParamsFromState(state);\n\t\t\tconst search = extractSearchFromHref(href);\n\t\t\tconst pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params2);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tconst validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params2,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tconst error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tawait error.catch(() => {});\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tconst loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tconst params = extractParamsFromState(state);\n\tconst newMatches = buildClientMatches(href, matchingRouteNode, params, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tconst currentRootState = navigationRef.getRootState();\n\tconst hash = href.indexOf(\"#\");\n\tif (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tnextOptions = options ?? null;\n\tpendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tconst freshRootState = navigationRef.getRootState();\n\tconst currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tconst targetPathname = pendingNavigationPathname;\n\tconst optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tconst action = event === \"REPLACE\" ? null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(() => {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tconst targetName = action.payload?.name;\n\t\t\tconst isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tconst hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tconst isRootTarget = action.target === freshRootState.key;\n\t\t\tconst currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tconst currentFocusedName = currentFocusedRoute?.name;\n\t\t\tif (isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tconst targetRoute = state.routes[state.index ?? state.routes.length - 1];\n\t\t\t\tconst targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tconst routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: currentFocusedRoute?.key ?? targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst existingTargetRoute = freshRootState.routes.find((route) => route.name === targetRootName);\n\t\t\t\t\tconst existingRoutes = freshRootState.routes.filter((route) => route.name !== targetRootName);\n\t\t\t\t\tconst nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: existingTargetRoute?.key ?? `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tlet warningTm;\n\tconst interval = setInterval(() => {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(() => {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(() => {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nconst hashes = {};\nlet nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tconst keysA = Object.keys(a);\n\t\tconst keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tfor (const key of keysA) if (!deepEqual(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAI,YAAY;AAChB,IAAI;AACJ,MAAM,yCAAyC,IAAI,IAAI;AACvD,SAAS,wBAAwB,YAAY,kBAAkB;CAC9D,IAAI,iBAAiB,SAAS,GAAG,uBAAuB,OAAO,UAAU;MACpE,uBAAuB,IAAI,YAAY,gBAAgB;AAC7D;AACA,SAAS,0BAA0B,YAAY;CAC9C,uBAAuB,OAAO,UAAU;AACzC;AACA,SAAS,qBAAqB,MAAM;CACnC,MAAM,iBAAiB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ClC,KAAK,IAAI,IAAI,GAAG,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO;EACtE,OAAO;CACR;CACA,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UAAU;EACnD,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,MAAM,QAAQ,OAAO,KAAK,CAAC;EAC3B,IAAI,MAAM,WAAW,MAAM,QAAQ,OAAO;EAC1C,KAAK,MAAM,OAAO,OAAO,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO;EAChE,OAAO;CACR;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"router.js","names":[],"sources":["esm/router/router.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { getLoaderPath, getPreloadCSSPath, getPreloadPath } from \"../utils/cleanUrl\";\nimport { dynamicImport, isChunkLoadError } from \"../utils/dynamicImport\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { hasFileExtension, shouldLinkExternally, shouldPreloadRoute } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRouteArtifactPaths } from \"./getRouteArtifactPath\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname, stripTrailingSlash } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { preloadRouteModules } from \"./useViteRoutes\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\nlet routeNode = null;\nlet rootComponent;\nconst protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tconst normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tfor (const [contextKey, guardedRedirects] of protectedRouteRegistry) {\n\t\tconst normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\tconst routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\tconst normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tlet target = href;\n\tconst visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tconst redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nlet hasAttemptedToHideSplash = false;\nlet initialState;\nlet rootState;\nlet initialPathname;\nlet lastIntendedPathname;\nlet nextState;\nlet routeInfo;\nlet splashScreenAnimationFrame;\nlet pendingNavigationPathname;\nlet pendingNavigationAction;\nlet navigationRef = null;\nconst rootStateSubscribers = /* @__PURE__ */ new Set();\nconst loadingStateSubscribers = /* @__PURE__ */ new Set();\nconst storeSubscribers = /* @__PURE__ */ new Set();\nlet currentMatches = [];\nlet validationState = { status: \"idle\" };\nconst validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn () => validationStateSubscribers.delete(subscriber);\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tfor (const subscriber of validationStateSubscribers) subscriber(state);\n\tif (state.status === \"error\" && state.error) window.dispatchEvent(new CustomEvent(\"one-validation-error\", { detail: {\n\t\terror: {\n\t\t\tmessage: state.error.message,\n\t\t\tname: state.error.name,\n\t\t\tstack: state.error.stack\n\t\t},\n\t\thref: state.lastValidatedHref,\n\t\ttimestamp: Date.now()\n\t} }));\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nlet cachedRouteNode = null;\nlet cachedRootComponent = null;\nlet cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tconst formatRouteTree = (node, indent = \"\", isLast = true) => {\n\t\t\tconst prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tconst childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tconst dynamicBadge = node.dynamic ? ` [${node.dynamic.map((d) => d.name).join(\", \")}]` : \"\";\n\t\t\tconst typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tconst slotsBadge = node.slots?.size ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tlet line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tconst visibleChildren = node.children.filter((child) => !child.internal);\n\t\t\tfor (let i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tconst child = visibleChildren[i];\n\t\t\t\tconst childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif (routeNode.slots?.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tfor (const [slotName, slotConfig] of routeNode.slots) console.info(` @${slotName}:`, {\n\t\t\t\tdefaultRoute: slotConfig.defaultRoute?.route,\n\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map((r) => ({\n\t\t\t\t\troute: r.route,\n\t\t\t\t\tintercept: r.intercept\n\t\t\t\t}))\n\t\t\t});\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = initialLocation?.pathname ?? getSafeWindowPathname();\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tlet state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(() => {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tlet shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t}\n\tif (shouldUpdateSubscribers) startTransition(() => {\n\t\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(() => {\n\t\tupdateSnapshot();\n\t\tfor (const subscriber of storeSubscribers) subscriber();\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef?.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams(params = {}) {\n\tassertIsReady(navigationRef);\n\treturn navigationRef?.current?.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef?.dispatch(StackActions.popToTop());\n}\nfunction goBack() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef?.current?.goBack();\n}\nfunction canGoBack() {\n\tif (!navigationRef.isReady()) return false;\n\treturn navigationRef?.current?.canGoBack() ?? false;\n}\nfunction canDismiss() {\n\tlet state = rootState;\n\twhile (state) {\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = state.routes?.[state.index]?.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter((route) => !route.internal).sort(sortRoutes);\n}\nfunction updateState(state, nextStateParam = state) {\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo?.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tconst nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tconst from = routeInfo?.pathname || \"(initial)\";\n\t\t\tconst to = nextRouteInfo.pathname;\n\t\t\tconst params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") {\n\t\twindow.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\t\trouteInfo: nextRouteInfo,\n\t\t\trootState: state,\n\t\t\trouteNode,\n\t\t\tgetRoutes: () => routeNode?.children || [],\n\t\t\tgetLoaderTimingHistory: () => devtoolsRegistry.getLoaderTimingHistory?.() ?? [],\n\t\t\tgetPreloadHistory\n\t\t});\n\t\twindow.dispatchEvent(new CustomEvent(\"one-route-change\", { detail: nextRouteInfo }));\n\t}\n}\nfunction consumePendingNavigationAction() {\n\tconst action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn () => {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tfor (const subscriber of rootStateSubscribers) subscriber(state);\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn () => {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn () => {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(() => {\n\t\tfor (const listener of loadingStateSubscribers) listener(state);\n\t});\n}\nlet currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tconst pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !routeInfo?.pathname) return false;\n\tconst nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tconst browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tconst currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tconst [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(() => {\n\t\tconst unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tconst browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && routeInfo?.unstable_globalHref === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nconst preloadingLoader = {};\nconst PRELOAD_MAP_MAX = 200;\nfunction setBoundedPreloadRecord(record, key, value) {\n\tif (!(key in record)) {\n\t\tconst keys = Object.keys(record);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete record[keys[0]];\n\t}\n\trecord[key] = value;\n}\nasync function doPreloadDev(href) {\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst startTime = performance.now();\n\t\tconst normalizedPath = normalizeLoaderPath(href);\n\t\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\t\ttry {\n\t\t\tconst loaderJSUrl = getLoaderPath(href, true);\n\t\t\tconst moduleLoadStart = performance.now();\n\t\t\tconst modulePromise = dynamicImport(loaderJSUrl, false);\n\t\t\tif (!modulePromise) return null;\n\t\t\tconst module = await modulePromise.catch(() => null);\n\t\t\tconst moduleLoadTime = performance.now() - moduleLoadStart;\n\t\t\tif (!module?.loader) return null;\n\t\t\tconst executionStart = performance.now();\n\t\t\tconst result = await module.loader();\n\t\t\tconst executionTime = performance.now() - executionStart;\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tif (result?.__oneRedirect) return result;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\tmoduleLoadTime,\n\t\t\t\texecutionTime,\n\t\t\t\ttotalTime,\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\treturn result ?? null;\n\t\t} catch (err) {\n\t\t\tconst totalTime = performance.now() - startTime;\n\t\t\tdevtoolsRegistry.recordLoaderTiming?.({\n\t\t\t\tpath: normalizedPath,\n\t\t\t\tstartTime,\n\t\t\t\ttotalTime,\n\t\t\t\terror: err instanceof Error ? err.message : String(err),\n\t\t\t\tsource: \"preload\"\n\t\t\t});\n\t\t\tif (process.env.ONE_DEBUG_ROUTER) console.warn(`[one] dev preload failed for ${href}:`, err);\n\t\t\treturn null;\n\t\t}\n\t}\n}\nasync function doPreload(href) {\n\tif (globalThis[\"__vxrnHeadless\"]) return null;\n\tconst artifactPaths = getRouteArtifactPaths(href, getResolvedLinking(), routeNode);\n\tconst preloadPath = getPreloadPath(artifactPaths.preload);\n\tconst loaderPath = getLoaderPath(artifactPaths.loader);\n\tconst cssPreloadPath = getPreloadCSSPath(artifactPaths.preload);\n\trecordPreloadStart(href);\n\ttry {\n\t\tconst [_preload, cssPreloadModule, loader] = await Promise.all([\n\t\t\tdynamicImport(preloadPath, false),\n\t\t\tdynamicImport(cssPreloadPath, false),\n\t\t\tdynamicImport(loaderPath, false),\n\t\t\tpreloadRouteModules(href)\n\t\t]);\n\t\tconst hasCss = !!cssPreloadModule?.injectCSS;\n\t\tif (hasCss) setBoundedCssInject(href, cssPreloadModule.injectCSS);\n\t\tif (!!!loader?.loader) {\n\t\t\trecordPreloadComplete(href, false, hasCss);\n\t\t\treturn null;\n\t\t}\n\t\tconst result = await loader.loader();\n\t\tif (result?.__oneRedirect) return result;\n\t\trecordPreloadComplete(href, true, hasCss);\n\t\treturn result ?? null;\n\t} catch (err) {\n\t\tconst errorMessage = err instanceof Error ? err.message : String(err);\n\t\tconsole.error(`[one] preload error for ${href}:`, err);\n\t\trecordPreloadError(href, errorMessage);\n\t\tthrow err;\n\t}\n}\nconst preloadedLoaderData = {};\nconst cssInjectFunctions = {};\nfunction setBoundedCssInject(key, value) {\n\tif (!(key in cssInjectFunctions)) {\n\t\tconst keys = Object.keys(cssInjectFunctions);\n\t\tif (keys.length >= PRELOAD_MAP_MAX) delete cssInjectFunctions[keys[0]];\n\t}\n\tcssInjectFunctions[key] = value;\n}\nconst preloadHistory = [];\nconst MAX_PRELOAD_HISTORY = 30;\nfunction recordPreloadStart(href) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst existing = preloadHistory.find((p) => p.href === href);\n\tif (existing) {\n\t\texisting.status = \"loading\";\n\t\texisting.startTime = performance.now();\n\t\treturn;\n\t}\n\tpreloadHistory.unshift({\n\t\thref,\n\t\tstatus: \"loading\",\n\t\tstartTime: performance.now(),\n\t\thasLoader: false,\n\t\thasCss: false\n\t});\n\tif (preloadHistory.length > MAX_PRELOAD_HISTORY) preloadHistory.pop();\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadComplete(href, hasLoader, hasCss) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"loaded\";\n\t\tentry.endTime = performance.now();\n\t\tentry.hasLoader = hasLoader;\n\t\tentry.hasCss = hasCss;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction recordPreloadError(href, error) {\n\tif (process.env.NODE_ENV !== \"development\") return;\n\tconst entry = preloadHistory.find((p) => p.href === href);\n\tif (entry) {\n\t\tentry.status = \"error\";\n\t\tentry.endTime = performance.now();\n\t\tentry.error = error;\n\t}\n\tdispatchPreloadEvent();\n}\nfunction dispatchPreloadEvent() {\n\twindow.dispatchEvent(new CustomEvent(\"one-preload-update\"));\n}\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href, injectCSS = false) {\n\tif (!shouldPreloadRoute(href)) return;\n\tif (process.env.NODE_ENV === \"development\") {\n\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\treturn data;\n\t\t}));\n\t\treturn preloadingLoader[normalizedHref];\n\t}\n\tif (!preloadingLoader[href]) setBoundedPreloadRecord(preloadingLoader, href, doPreload(href).then((data) => {\n\t\tsetBoundedPreloadRecord(preloadedLoaderData, href, data);\n\t\treturn data;\n\t}).catch((err) => {\n\t\tdelete preloadingLoader[href];\n\t\tthrow err;\n\t}));\n\treturn preloadingLoader[href]?.then(async (data) => {\n\t\tif (injectCSS) {\n\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t}\n\t\treturn data;\n\t}, (err) => {\n\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\twindow.location.href = href;\n\t\t\treturn new Promise(() => {});\n\t\t}\n\t\treturn null;\n\t});\n}\nfunction normalizeLoaderPath(href) {\n\treturn new URL(href, \"http://example.com\").pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tconst pathname = extractPathnameFromHref(href);\n\tconst routeId = matchingNode?.contextKey || pathname;\n\tconst layoutMatches = currentMatches.filter((m) => m.routeId.includes(\"_layout\"));\n\tconst pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tclearNotFoundState();\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (hasFileExtension(href)) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tconst protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tconst currentLayoutNode = routeNode;\n\tconst currentPath = routeInfo?.pathname || \"/\";\n\tconst interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tconst { interceptRoute, slotName, layoutContextKey, params: params2 } = interceptResult;\n\t\tconst scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params2);\n\t\tupdateURLWithoutNavigation(href);\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams: params2,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tconst current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tconst linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tlet base = routeInfo?.segments?.map((segment) => {\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tconst params2 = routeInfo?.params?.[segment];\n\t\t\t\tif (Array.isArray(params2)) return params2.join(\"/\");\n\t\t\t\treturn params2?.split(\",\")?.join(\"/\") ?? \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo?.params?.[segment];\n\t\t}).filter(Boolean).join(\"/\") ?? \"/\";\n\t\tif (!routeInfo?.isIndex) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tconst state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tconst normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) await preloadRoute(href, true);\n\telse if (process.env.NODE_ENV !== \"development\") {\n\t\tconst inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(() => {});\n\t}\n\tconst preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult?.__oneRedirect) {\n\t\tconst redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif (preloadResult?.__oneError === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tconst notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tconst matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tif (matchingRouteNode?.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tconst loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tconst params2 = extractParamsFromState(state);\n\t\t\tconst search = extractSearchFromHref(href);\n\t\t\tconst pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params2);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tconst validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params2,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tconst error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tawait error.catch(() => {});\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tconst loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tconst params = extractParamsFromState(state);\n\tconst newMatches = buildClientMatches(href, matchingRouteNode, params, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tconst currentRootState = navigationRef.getRootState();\n\tconst hash = href.indexOf(\"#\");\n\tif (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tnextOptions = options ?? null;\n\tpendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tconst freshRootState = navigationRef.getRootState();\n\tconst currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tconst targetPathname = pendingNavigationPathname;\n\tconst optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tconst action = event === \"REPLACE\" ? null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(() => {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tconst targetName = action.payload?.name;\n\t\t\tconst isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tconst hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tconst isRootTarget = action.target === freshRootState.key;\n\t\t\tconst currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tconst currentFocusedName = currentFocusedRoute?.name;\n\t\t\tif (event !== \"REPLACE\" && isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tconst targetRoute = state.routes[state.index ?? state.routes.length - 1];\n\t\t\t\tconst targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tconst routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: currentFocusedRoute?.key ?? targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst existingTargetRoute = freshRootState.routes.find((route) => route.name === targetRootName);\n\t\t\t\t\tconst existingRoutes = freshRootState.routes.filter((route) => route.name !== targetRootName);\n\t\t\t\t\tconst nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: existingTargetRoute?.key ?? `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tlet warningTm;\n\tconst interval = setInterval(() => {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(() => {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(() => {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nconst hashes = {};\nlet nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (let i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tconst keysA = Object.keys(a);\n\t\tconst keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tfor (const key of keysA) if (!deepEqual(a[key], b[key])) return false;\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAI,YAAY;AAChB,IAAI;AACJ,MAAM,yCAAyC,IAAI,IAAI;AACvD,SAAS,wBAAwB,YAAY,kBAAkB;CAC9D,IAAI,iBAAiB,SAAS,GAAG,uBAAuB,OAAO,UAAU;MACpE,uBAAuB,IAAI,YAAY,gBAAgB;AAC7D;AACA,SAAS,0BAA0B,YAAY;CAC9C,uBAAuB,OAAO,UAAU;AACzC;AACA,SAAS,qBAAqB,MAAM;CACnC,MAAM,iBAAiB,wBAAwB,IAAI,CAAC,CAAC,QAAQ,cAAc,EAAE;CAC7E,KAAK,MAAM,CAAC,YAAY,qBAAqB,wBAAwB;EACpE,MAAM,uBAAuB,WAAW,QAAQ,cAAc,EAAE;EAChE,IAAI,CAAC,wBAAwB,mBAAmB,wBAAwB,eAAe,WAAW,GAAG,qBAAqB,EAAE,GAAG;GAC9H,MAAM,YAAY,eAAe,MAAM,qBAAqB,MAAM,CAAC,CAAC,QAAQ,OAAO,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM;GACxG,MAAM,sBAAsB,UAAU,QAAQ,YAAY,EAAE;GAC5D,IAAI,iBAAiB,IAAI,SAAS,GAAG,OAAO,iBAAiB,IAAI,SAAS;GAC1E,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ath, getSafeWindowPathname, getSafeWindowPathname as getS
|
|
|
20
20
|
import { sortRoutes } from "./sortRoutes.native.js";
|
|
21
21
|
import { getQualifiedRouteComponent } from "./useScreens.native.js";
|
|
22
22
|
import { getNavigateAction } from "./utils/getNavigateAction.native.js";
|
|
23
|
+
import { getNativeStackReplaceAction } from "./utils/getNativeStackReplaceAction.native.js";
|
|
23
24
|
import { setClientMatches } from "../useMatches.native.js";
|
|
24
25
|
import { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from "./interceptRoutes.native.js";
|
|
25
26
|
import { setSlotState } from "../views/Navigator.native.js";
|
|
@@ -668,6 +669,7 @@ async function linkTo(href, event, options) {
|
|
|
668
669
|
return;
|
|
669
670
|
}
|
|
670
671
|
var matchingRouteNode = findRouteNodeFromState(state, routeNode);
|
|
672
|
+
var isColdRoute = false;
|
|
671
673
|
if (matchingRouteNode === null || matchingRouteNode === void 0 ? void 0 : matchingRouteNode.loadRoute) {
|
|
672
674
|
setValidationState({
|
|
673
675
|
status: "validating",
|
|
@@ -702,6 +704,7 @@ async function linkTo(href, event, options) {
|
|
|
702
704
|
});
|
|
703
705
|
} catch (error) {
|
|
704
706
|
if (error && typeof error.then === "function") {
|
|
707
|
+
isColdRoute = true;
|
|
705
708
|
var routeLoading = error.catch(function() {});
|
|
706
709
|
if (process.env.NODE_ENV !== "development" || process.env.ONE_SUSPEND_ROUTES_NATIVE === "0" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) await routeLoading;
|
|
707
710
|
setValidationState({
|
|
@@ -741,7 +744,7 @@ async function linkTo(href, event, options) {
|
|
|
741
744
|
...state,
|
|
742
745
|
linkOptions: nextOptions
|
|
743
746
|
} : state;
|
|
744
|
-
var action = event === "REPLACE" ? null : getNavigateAction(state, freshRootState, event);
|
|
747
|
+
var action = event === "REPLACE" ? !isColdRoute ? getNativeStackReplaceAction(state, freshRootState) : null : getNavigateAction(state, freshRootState, event);
|
|
745
748
|
startTransition(function() {
|
|
746
749
|
updateState(optimisticState);
|
|
747
750
|
pendingNavigationPathname = targetPathname;
|
|
@@ -755,7 +758,7 @@ async function linkTo(href, event, options) {
|
|
|
755
758
|
var isRootTarget = action.target === freshRootState.key;
|
|
756
759
|
var currentFocusedRoute = freshRootState.routes[freshRootState.index];
|
|
757
760
|
var currentFocusedName = currentFocusedRoute === null || currentFocusedRoute === void 0 ? void 0 : currentFocusedRoute.name;
|
|
758
|
-
if (isRootTarget && isGroupTarget && hasFreshRootState) {
|
|
761
|
+
if (event !== "REPLACE" && isRootTarget && isGroupTarget && hasFreshRootState) {
|
|
759
762
|
var _state_index;
|
|
760
763
|
var targetRoute = state.routes[(_state_index = state.index) !== null && _state_index !== void 0 ? _state_index : state.routes.length - 1];
|
|
761
764
|
var targetRootName = targetRoute.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.native.js","names":[],"sources":["esm/router/router.native.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { shouldLinkExternally } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findAllRouteNodesFromState, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname, stripTrailingSlash } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\nvar routeNode = null;\nvar rootComponent;\nvar protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tvar normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = protectedRouteRegistry[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [contextKey, guardedRedirects] = _step.value;\n\t\t\tvar normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\t\tvar routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\t\tvar normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tvar target = href;\n\tvar visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tvar redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nvar hasAttemptedToHideSplash = false;\nvar initialState;\nvar rootState;\nvar initialPathname;\nvar lastIntendedPathname;\nvar nextState;\nvar routeInfo;\nvar splashScreenAnimationFrame;\nvar pendingNavigationPathname;\nvar pendingNavigationAction;\nvar navigationRef = null;\nvar rootStateSubscribers = /* @__PURE__ */ new Set();\nvar loadingStateSubscribers = /* @__PURE__ */ new Set();\nvar storeSubscribers = /* @__PURE__ */ new Set();\nvar currentMatches = [];\nvar validationState = { status: \"idle\" };\nvar validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn function() {\n\t\treturn validationStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = validationStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar subscriber = _step.value;\n\t\t\tsubscriber(state);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nvar cachedRouteNode = null;\nvar cachedRootComponent = null;\nvar cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tvar _routeNode_slots;\n\t\tvar formatRouteTree = function formatRouteTree1(node) {\n\t\t\tvar indent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\", isLast = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;\n\t\t\tvar _node_slots;\n\t\t\tvar prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tvar childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tvar dynamicBadge = node.dynamic ? ` [${node.dynamic.map(function(d) {\n\t\t\t\treturn d.name;\n\t\t\t}).join(\", \")}]` : \"\";\n\t\t\tvar typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tvar slotsBadge = ((_node_slots = node.slots) === null || _node_slots === void 0 ? void 0 : _node_slots.size) ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tvar line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tvar visibleChildren = node.children.filter(function(child2) {\n\t\t\t\treturn !child2.internal;\n\t\t\t});\n\t\t\tfor (var i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tvar child = visibleChildren[i];\n\t\t\t\tvar childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif ((_routeNode_slots = routeNode.slots) === null || _routeNode_slots === void 0 ? void 0 : _routeNode_slots.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = routeNode.slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [slotName, slotConfig] = _step.value;\n\t\t\t\t\tvar _slotConfig_defaultRoute;\n\t\t\t\t\tconsole.info(` @${slotName}:`, {\n\t\t\t\t\t\tdefaultRoute: (_slotConfig_defaultRoute = slotConfig.defaultRoute) === null || _slotConfig_defaultRoute === void 0 ? void 0 : _slotConfig_defaultRoute.route,\n\t\t\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map(function(r) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\troute: r.route,\n\t\t\t\t\t\t\t\tintercept: r.intercept\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}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tvar _ref;\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = (_ref = initialLocation === null || initialLocation === void 0 ? void 0 : initialLocation.pathname) !== null && _ref !== void 0 ? _ref : getSafeWindowPathname();\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tvar state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(function() {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tvar shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t}\n\tif (shouldUpdateSubscribers) startTransition(function() {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = rootStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar subscriber = _step.value;\n\t\t\t\tsubscriber(state);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(function() {\n\t\tupdateSnapshot();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = storeSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar subscriber = _step.value;\n\t\t\t\tsubscriber();\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef === null || navigationRef === void 0 || navigationRef.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams() {\n\tvar params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\tvar _navigationRef_current;\n\tassertIsReady(navigationRef);\n\treturn navigationRef === null || navigationRef === void 0 ? void 0 : (_navigationRef_current = navigationRef.current) === null || _navigationRef_current === void 0 ? void 0 : _navigationRef_current.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef === null || navigationRef === void 0 || navigationRef.dispatch(StackActions.popToTop());\n}\nfunction goBack() {\n\tvar _navigationRef_current;\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef === null || navigationRef === void 0 || (_navigationRef_current = navigationRef.current) == null || _navigationRef_current.goBack();\n}\nfunction canGoBack() {\n\tvar _ref;\n\tvar _navigationRef_current;\n\tif (!navigationRef.isReady()) return false;\n\treturn (_ref = navigationRef === null || navigationRef === void 0 ? void 0 : (_navigationRef_current = navigationRef.current) === null || _navigationRef_current === void 0 ? void 0 : _navigationRef_current.canGoBack()) !== null && _ref !== void 0 ? _ref : false;\n}\nfunction canDismiss() {\n\tvar state = rootState;\n\twhile (state) {\n\t\tvar _state_routes_state_index, _state_routes;\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = (_state_routes = state.routes) === null || _state_routes === void 0 ? void 0 : (_state_routes_state_index = _state_routes[state.index]) === null || _state_routes_state_index === void 0 ? void 0 : _state_routes_state_index.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter(function(route) {\n\t\treturn !route.internal;\n\t}).sort(sortRoutes);\n}\nfunction updateState(state) {\n\tvar nextStateParam = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : state;\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tvar nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tvar from = (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname) || \"(initial)\";\n\t\t\tvar to = nextRouteInfo.pathname;\n\t\t\tvar params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t\tvar params1 = extractParamsFromState(state);\n\t\tvar newMatches = buildNativeMatches(state, nextRouteInfo.pathname, params1);\n\t\tcurrentMatches = newMatches;\n\t\tsetClientMatches(newMatches);\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") window.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\trouteInfo: nextRouteInfo,\n\t\trootState: state,\n\t\trouteNode,\n\t\tgetRoutes: function getRoutes2() {\n\t\t\treturn (routeNode === null || routeNode === void 0 ? void 0 : routeNode.children) || [];\n\t\t},\n\t\tgetLoaderTimingHistory: function getLoaderTimingHistory() {\n\t\t\tvar _ref;\n\t\t\tvar _devtoolsRegistry_getLoaderTimingHistory;\n\t\t\treturn (_ref = (_devtoolsRegistry_getLoaderTimingHistory = devtoolsRegistry.getLoaderTimingHistory) === null || _devtoolsRegistry_getLoaderTimingHistory === void 0 ? void 0 : _devtoolsRegistry_getLoaderTimingHistory.call(devtoolsRegistry)) !== null && _ref !== void 0 ? _ref : [];\n\t\t},\n\t\tgetPreloadHistory\n\t});\n}\nfunction consumePendingNavigationAction() {\n\tvar action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn function() {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = rootStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar subscriber = _step.value;\n\t\t\tsubscriber(state);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn function() {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn function() {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(function() {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = loadingStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar listener = _step.value;\n\t\t\t\tlistener(state);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nvar currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tvar pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !(routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname)) return false;\n\tvar nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tvar browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tvar currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tvar [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(function() {\n\t\tvar unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tvar browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.unstable_globalHref) === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nvar preloadingLoader = {};\nvar preloadedLoaderData = {};\nvar cssInjectFunctions = {};\nvar preloadHistory = [];\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n}\nfunction normalizeLoaderPath(href) {\n\treturn new URL(href, \"http://example.com\").pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tvar pathname = extractPathnameFromHref(href);\n\tvar routeId = (matchingNode === null || matchingNode === void 0 ? void 0 : matchingNode.contextKey) || pathname;\n\tvar layoutMatches = currentMatches.filter(function(m) {\n\t\treturn m.routeId.includes(\"_layout\");\n\t});\n\tvar pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction buildNativeMatches(state, pathname, params) {\n\treturn findAllRouteNodesFromState(state, routeNode).map(function(node) {\n\t\treturn {\n\t\t\trouteId: node.contextKey || pathname,\n\t\t\tpathname,\n\t\t\tparams,\n\t\t\tloaderData: void 0\n\t\t};\n\t});\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tclearNotFoundState();\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tvar protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tvar currentLayoutNode = routeNode;\n\tvar currentPath = (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname) || \"/\";\n\tvar interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tvar { interceptRoute, slotName, layoutContextKey, params } = interceptResult;\n\t\tvar scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params);\n\t\tupdateURLWithoutNavigation(href);\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tvar current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tvar linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tvar _ref;\n\t\tvar _routeInfo_segments;\n\t\tvar base = (_ref = routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_segments = routeInfo.segments) === null || _routeInfo_segments === void 0 ? void 0 : _routeInfo_segments.map(function(segment) {\n\t\t\tvar _routeInfo_params;\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tvar _ref2;\n\t\t\t\tvar _routeInfo_params1, _params_split;\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tvar params3 = routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_params1 = routeInfo.params) === null || _routeInfo_params1 === void 0 ? void 0 : _routeInfo_params1[segment];\n\t\t\t\tif (Array.isArray(params3)) return params3.join(\"/\");\n\t\t\t\treturn (_ref2 = params3 === null || params3 === void 0 ? void 0 : (_params_split = params3.split(\",\")) === null || _params_split === void 0 ? void 0 : _params_split.join(\"/\")) !== null && _ref2 !== void 0 ? _ref2 : \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_params = routeInfo.params) === null || _routeInfo_params === void 0 ? void 0 : _routeInfo_params[segment];\n\t\t}).filter(Boolean).join(\"/\")) !== null && _ref !== void 0 ? _ref : \"/\";\n\t\tif (!(routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.isIndex)) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tvar state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tvar normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) await preloadRoute(href, true);\n\telse if (process.env.NODE_ENV !== \"development\") {\n\t\tvar inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(function() {});\n\t}\n\tvar preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult === null || preloadResult === void 0 ? void 0 : preloadResult.__oneRedirect) {\n\t\tvar redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif ((preloadResult === null || preloadResult === void 0 ? void 0 : preloadResult.__oneError) === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tvar notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tvar matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tif (matchingRouteNode === null || matchingRouteNode === void 0 ? void 0 : matchingRouteNode.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tvar loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tvar params1 = extractParamsFromState(state);\n\t\t\tvar search = extractSearchFromHref(href);\n\t\t\tvar pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params1);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tvar validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params1,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tvar _$error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror: _$error,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow _$error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tvar routeLoading = error.catch(function() {});\n\t\t\t\tif (process.env.NODE_ENV !== \"development\" || process.env.ONE_SUSPEND_ROUTES_NATIVE === \"0\" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) await routeLoading;\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tvar loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tvar params2 = extractParamsFromState(state);\n\tvar newMatches = buildClientMatches(href, matchingRouteNode, params2, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tvar currentRootState = navigationRef.getRootState();\n\tvar hash = href.indexOf(\"#\");\n\tif ((currentRootState === null || currentRootState === void 0 ? void 0 : currentRootState.key) && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tnextOptions = options !== null && options !== void 0 ? options : null;\n\tpendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tvar freshRootState = navigationRef.getRootState();\n\tvar currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tvar targetPathname = pendingNavigationPathname;\n\tvar optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tvar action = event === \"REPLACE\" ? null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(function() {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tvar _action_payload;\n\t\t\tvar targetName = (_action_payload = action.payload) === null || _action_payload === void 0 ? void 0 : _action_payload.name;\n\t\t\tvar isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tvar hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tvar isRootTarget = action.target === freshRootState.key;\n\t\t\tvar currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tvar currentFocusedName = currentFocusedRoute === null || currentFocusedRoute === void 0 ? void 0 : currentFocusedRoute.name;\n\t\t\tif (isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tvar _state_index;\n\t\t\t\tvar targetRoute = state.routes[(_state_index = state.index) !== null && _state_index !== void 0 ? _state_index : state.routes.length - 1];\n\t\t\t\tvar targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tvar _ref2;\n\t\t\t\t\tvar routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: (_ref2 = currentFocusedRoute === null || currentFocusedRoute === void 0 ? void 0 : currentFocusedRoute.key) !== null && _ref2 !== void 0 ? _ref2 : targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar _ref1;\n\t\t\t\t\tvar existingTargetRoute = freshRootState.routes.find(function(route) {\n\t\t\t\t\t\treturn route.name === targetRootName;\n\t\t\t\t\t});\n\t\t\t\t\tvar existingRoutes = freshRootState.routes.filter(function(route) {\n\t\t\t\t\t\treturn route.name !== targetRootName;\n\t\t\t\t\t});\n\t\t\t\t\tvar nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: (_ref1 = existingTargetRoute === null || existingTargetRoute === void 0 ? void 0 : existingTargetRoute.key) !== null && _ref1 !== void 0 ? _ref1 : `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tvar warningTm;\n\tvar interval = setInterval(function() {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(function() {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(function() {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nvar hashes = {};\nvar nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (var i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tvar keysA = Object.keys(a);\n\t\tvar keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = keysA[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tif (!deepEqual(a[key], b[key])) return false;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAI,YAAY;AAChB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BAAiB;EAClB,UAAU;GACT,IAAI;IACH,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM,UAAU,OAAO;GAC9E,UAAU;IACT,IAAI,mBAAmB,MAAM;GAC9B;EACD;EACA,OAAO;CACR;CACA,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"router.native.js","names":[],"sources":["esm/router/router.native.js"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useEffect, useReducer, useSyncExternalStore } from \"react\";\nimport { devtoolsRegistry } from \"../devtools/registry\";\nimport { resolveHref } from \"../link/href\";\nimport { openExternalURL } from \"../link/openExternalURL\";\nimport { resolve } from \"../link/path\";\nimport { checkBlocker } from \"../useBlocker\";\nimport { assertIsReady } from \"../utils/assertIsReady\";\nimport { PLATFORM } from \"../utils/platform\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { shouldLinkExternally } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findAllRouteNodesFromState, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { isStateAwaitingNavigatorMount } from \"./isStateAwaitingNavigatorMount\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { getSafeWindowPath, getSafeWindowPathname, getSafeWindowPathname as getSafeWindowPathname2, normalizeRoutePathname, stripTrailingSlash } from \"./path\";\nimport { sortRoutes } from \"./sortRoutes\";\nimport { getQualifiedRouteComponent } from \"./useScreens\";\nimport { getNavigateAction } from \"./utils/getNavigateAction\";\nimport { getNativeStackReplaceAction } from \"./utils/getNativeStackReplaceAction\";\nimport { setClientMatches } from \"../useMatches\";\nimport { findInterceptRoute, setNavigationType, storeInterceptState, updateURLWithoutNavigation } from \"./interceptRoutes\";\nimport { setSlotState } from \"../views/Navigator\";\nimport { clearNotFoundState, findNearestNotFoundRoute, setNotFoundState } from \"../notFoundState\";\n\nvar routeNode = null;\nvar rootComponent;\nvar protectedRouteRegistry = /* @__PURE__ */ new Map();\nfunction registerProtectedRoutes(contextKey, guardedRedirects) {\n\tif (guardedRedirects.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, guardedRedirects);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction getProtectedRedirect(href) {\n\tvar normalizedHref = extractPathnameFromHref(href).replace(/^\\/+|\\/+$/g, \"\");\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = protectedRouteRegistry[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [contextKey, guardedRedirects] = _step.value;\n\t\t\tvar normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\t\tif (!normalizedContextKey || normalizedHref === normalizedContextKey || normalizedHref.startsWith(`${normalizedContextKey}/`)) {\n\t\t\t\tvar routeName = normalizedHref.slice(normalizedContextKey.length).replace(/^\\//, \"\").split(\"/\")[0] || \"index\";\n\t\t\t\tvar normalizedRouteName = routeName.replace(/\\/index$/, \"\");\n\t\t\t\tif (guardedRedirects.has(routeName)) return guardedRedirects.get(routeName);\n\t\t\t\tif (guardedRedirects.has(normalizedRouteName)) return guardedRedirects.get(normalizedRouteName);\n\t\t\t}\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn false;\n}\nfunction resolveProtectedHref(href) {\n\tvar target = href;\n\tvar visited = /* @__PURE__ */ new Set();\n\twhile (!visited.has(target)) {\n\t\tvisited.add(target);\n\t\tvar redirectTo = getProtectedRedirect(target);\n\t\tif (redirectTo === false) return target;\n\t\tif (redirectTo === void 0) return;\n\t\ttarget = resolveHref(redirectTo);\n\t}\n}\nfunction isRouteProtected(href) {\n\treturn getProtectedRedirect(href) !== false;\n}\nvar hasAttemptedToHideSplash = false;\nvar initialState;\nvar rootState;\nvar initialPathname;\nvar lastIntendedPathname;\nvar nextState;\nvar routeInfo;\nvar splashScreenAnimationFrame;\nvar pendingNavigationPathname;\nvar pendingNavigationAction;\nvar navigationRef = null;\nvar rootStateSubscribers = /* @__PURE__ */ new Set();\nvar loadingStateSubscribers = /* @__PURE__ */ new Set();\nvar storeSubscribers = /* @__PURE__ */ new Set();\nvar currentMatches = [];\nvar validationState = { status: \"idle\" };\nvar validationStateSubscribers = /* @__PURE__ */ new Set();\nfunction subscribeToValidationState(subscriber) {\n\tvalidationStateSubscribers.add(subscriber);\n\treturn function() {\n\t\treturn validationStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setValidationState(state) {\n\tvalidationState = state;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = validationStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar subscriber = _step.value;\n\t\t\tsubscriber(state);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nfunction getValidationState() {\n\treturn validationState;\n}\nfunction useValidationState() {\n\treturn useSyncExternalStore(subscribeToValidationState, getValidationState, getValidationState);\n}\nvar cachedRouteNode = null;\nvar cachedRootComponent = null;\nvar cachedContext = null;\nfunction initialize(context, ref, initialLocation, linking) {\n\tcleanUpState();\n\tif (context !== cachedContext || !cachedRouteNode) {\n\t\tcachedRouteNode = getRoutes(context, {\n\t\t\tignoreEntryPoints: true,\n\t\t\tplatform: PLATFORM\n\t\t});\n\t\tcachedRootComponent = cachedRouteNode ? getQualifiedRouteComponent(cachedRouteNode) : Fragment;\n\t\tcachedContext = context;\n\t}\n\trouteNode = cachedRouteNode;\n\trootComponent = cachedRootComponent || Fragment;\n\tif (!routeNode && process.env.NODE_ENV === \"production\") throw new Error(\"No routes found\");\n\tif (process.env.ONE_DEBUG_ROUTER && routeNode) {\n\t\tvar _routeNode_slots;\n\t\tvar formatRouteTree = function formatRouteTree1(node) {\n\t\t\tvar indent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\", isLast = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;\n\t\t\tvar _node_slots;\n\t\t\tvar prefix = indent + (isLast ? \"└─ \" : \"├─ \");\n\t\t\tvar childIndent = indent + (isLast ? \" \" : \"│ \");\n\t\t\tvar dynamicBadge = node.dynamic ? ` [${node.dynamic.map(function(d) {\n\t\t\t\treturn d.name;\n\t\t\t}).join(\", \")}]` : \"\";\n\t\t\tvar typeBadge = node.type !== \"layout\" ? ` (${node.type})` : \"\";\n\t\t\tvar slotsBadge = ((_node_slots = node.slots) === null || _node_slots === void 0 ? void 0 : _node_slots.size) ? ` {@${Array.from(node.slots.keys()).join(\", @\")}}` : \"\";\n\t\t\tvar line = `${prefix}${node.route || \"/\"}${dynamicBadge}${typeBadge}${slotsBadge}`;\n\t\t\tvar visibleChildren = node.children.filter(function(child2) {\n\t\t\t\treturn !child2.internal;\n\t\t\t});\n\t\t\tfor (var i = 0; i < visibleChildren.length; i++) {\n\t\t\t\tvar child = visibleChildren[i];\n\t\t\t\tvar childIsLast = i === visibleChildren.length - 1;\n\t\t\t\tline += \"\\n\" + formatRouteTree(child, childIndent, childIsLast);\n\t\t\t}\n\t\t\treturn line;\n\t\t};\n\t\tconsole.info(`[one] \\u{1F4CD} Route structure:\n${formatRouteTree(routeNode)}`);\n\t\tif ((_routeNode_slots = routeNode.slots) === null || _routeNode_slots === void 0 ? void 0 : _routeNode_slots.size) {\n\t\t\tconsole.info(`[one] \\u{1F4E6} Slots on root layout:`);\n\t\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\t\ttry {\n\t\t\t\tfor (var _iterator = routeNode.slots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\t\tvar [slotName, slotConfig] = _step.value;\n\t\t\t\t\tvar _slotConfig_defaultRoute;\n\t\t\t\t\tconsole.info(` @${slotName}:`, {\n\t\t\t\t\t\tdefaultRoute: (_slotConfig_defaultRoute = slotConfig.defaultRoute) === null || _slotConfig_defaultRoute === void 0 ? void 0 : _slotConfig_defaultRoute.route,\n\t\t\t\t\t\tinterceptRoutes: slotConfig.interceptRoutes.map(function(r) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\troute: r.route,\n\t\t\t\t\t\t\t\tintercept: r.intercept\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}\n\t\t\t} catch (err) {\n\t\t\t\t_didIteratorError = true;\n\t\t\t\t_iteratorError = err;\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t\t} finally {\n\t\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tnavigationRef = ref;\n\tsetupLinkingAndRouteInfo(initialLocation, linking);\n\tsubscribeToNavigationChanges();\n}\nfunction cleanUpState() {\n\tinitialState = void 0;\n\tinitialPathname = void 0;\n\tlastIntendedPathname = void 0;\n\trootState = void 0;\n\tnextState = void 0;\n\trouteInfo = void 0;\n\tpendingNavigationPathname = void 0;\n\tpendingNavigationAction = void 0;\n\tresetLinking();\n\trootStateSubscribers.clear();\n\tstoreSubscribers.clear();\n}\nfunction setupLinkingAndRouteInfo(initialLocation, linking) {\n\tvar _ref;\n\tinitialState = setupLinking(routeNode, initialLocation, linking);\n\tinitialPathname = (_ref = initialLocation === null || initialLocation === void 0 ? void 0 : initialLocation.pathname) !== null && _ref !== void 0 ? _ref : getSafeWindowPathname();\n\tif (initialState) {\n\t\trootState = initialState;\n\t\trouteInfo = getRouteInfo(initialState);\n\t} else routeInfo = {\n\t\tunstable_globalHref: \"\",\n\t\tpathname: \"\",\n\t\tisIndex: false,\n\t\tparams: {},\n\t\tsegments: []\n\t};\n}\nfunction handleNavigationContainerStateChange(navState) {\n\tif (!navState) return;\n\tvar state = { ...navState };\n\tif (state.key) {\n\t\tif (hashes[state.key]) {\n\t\t\tstate.hash = hashes[state.key];\n\t\t\tdelete hashes[state.key];\n\t\t}\n\t}\n\tif (!hasAttemptedToHideSplash) {\n\t\thasAttemptedToHideSplash = true;\n\t\tsplashScreenAnimationFrame = requestAnimationFrame(function() {});\n\t}\n\tif (shouldKeepPendingNavigationState(state)) return;\n\tif (nextOptions) {\n\t\tstate = {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t};\n\t\tnextOptions = null;\n\t}\n\tvar shouldUpdateSubscribers = nextState === state;\n\tnextState = void 0;\n\tif (state && state !== rootState) {\n\t\tupdateState(state, void 0);\n\t\tshouldUpdateSubscribers = true;\n\t}\n\tif (shouldUpdateSubscribers) startTransition(function() {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = rootStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar subscriber = _step.value;\n\t\t\t\tsubscriber(state);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nfunction subscribeToNavigationChanges() {\n\tstartTransition(function() {\n\t\tupdateSnapshot();\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = storeSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar subscriber = _step.value;\n\t\t\t\tsubscriber();\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nfunction navigate(url, options) {\n\treturn linkTo(resolveHref(url), \"NAVIGATE\", options);\n}\nfunction push(url, options) {\n\treturn linkTo(resolveHref(url), \"PUSH\", options);\n}\nfunction dismiss(count) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismiss${count ? ` (${count})` : \"\"}`);\n\tnavigationRef === null || navigationRef === void 0 || navigationRef.dispatch(StackActions.pop(count));\n}\nfunction replace(url, options) {\n\treturn linkTo(resolveHref(url), \"REPLACE\", options);\n}\nfunction setParams() {\n\tvar params = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n\tvar _navigationRef_current;\n\tassertIsReady(navigationRef);\n\treturn navigationRef === null || navigationRef === void 0 ? void 0 : (_navigationRef_current = navigationRef.current) === null || _navigationRef_current === void 0 ? void 0 : _navigationRef_current.setParams(params);\n}\nfunction dismissAll() {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} dismissAll`);\n\tnavigationRef === null || navigationRef === void 0 || navigationRef.dispatch(StackActions.popToTop());\n}\nfunction goBack() {\n\tvar _navigationRef_current;\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F519} goBack`);\n\tassertIsReady(navigationRef);\n\tnavigationRef === null || navigationRef === void 0 || (_navigationRef_current = navigationRef.current) == null || _navigationRef_current.goBack();\n}\nfunction canGoBack() {\n\tvar _ref;\n\tvar _navigationRef_current;\n\tif (!navigationRef.isReady()) return false;\n\treturn (_ref = navigationRef === null || navigationRef === void 0 ? void 0 : (_navigationRef_current = navigationRef.current) === null || _navigationRef_current === void 0 ? void 0 : _navigationRef_current.canGoBack()) !== null && _ref !== void 0 ? _ref : false;\n}\nfunction canDismiss() {\n\tvar state = rootState;\n\twhile (state) {\n\t\tvar _state_routes_state_index, _state_routes;\n\t\tif (state.type === \"stack\" && state.routes.length > 1) return true;\n\t\tif (state.index === void 0) return false;\n\t\tstate = (_state_routes = state.routes) === null || _state_routes === void 0 ? void 0 : (_state_routes_state_index = _state_routes[state.index]) === null || _state_routes_state_index === void 0 ? void 0 : _state_routes_state_index.state;\n\t}\n\treturn false;\n}\nfunction getSortedRoutes() {\n\tif (!routeNode) throw new Error(\"No routes\");\n\treturn routeNode.children.filter(function(route) {\n\t\treturn !route.internal;\n\t}).sort(sortRoutes);\n}\nfunction updateState(state) {\n\tvar nextStateParam = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : state;\n\trootState = state;\n\tnextState = nextStateParam;\n\tif (isStateAwaitingNavigatorMount(state, routeNode)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F9ED} keeping ${routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname}: a navigator has not mounted`);\n\t\treturn;\n\t}\n\tvar nextRouteInfo = getRouteInfo(state);\n\tif (pendingNavigationPathname === nextRouteInfo.pathname) pendingNavigationPathname = void 0;\n\tif (!deepEqual(routeInfo, nextRouteInfo)) {\n\t\tif (process.env.ONE_DEBUG_ROUTER) {\n\t\t\tvar from = (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname) || \"(initial)\";\n\t\t\tvar to = nextRouteInfo.pathname;\n\t\t\tvar params = Object.keys(nextRouteInfo.params || {}).length ? nextRouteInfo.params : void 0;\n\t\t\tconsole.info(`[one] \\u{1F9ED} ${from} \\u2192 ${to}`, params ? { params } : \"\");\n\t\t}\n\t\trouteInfo = nextRouteInfo;\n\t\tvar params1 = extractParamsFromState(state);\n\t\tvar newMatches = buildNativeMatches(state, nextRouteInfo.pathname, params1);\n\t\tcurrentMatches = newMatches;\n\t\tsetClientMatches(newMatches);\n\t}\n\tif (process.env.NODE_ENV === \"development\" && typeof window !== \"undefined\") window.__oneDevtools = Object.assign(window.__oneDevtools || {}, {\n\t\trouteInfo: nextRouteInfo,\n\t\trootState: state,\n\t\trouteNode,\n\t\tgetRoutes: function getRoutes2() {\n\t\t\treturn (routeNode === null || routeNode === void 0 ? void 0 : routeNode.children) || [];\n\t\t},\n\t\tgetLoaderTimingHistory: function getLoaderTimingHistory() {\n\t\t\tvar _ref;\n\t\t\tvar _devtoolsRegistry_getLoaderTimingHistory;\n\t\t\treturn (_ref = (_devtoolsRegistry_getLoaderTimingHistory = devtoolsRegistry.getLoaderTimingHistory) === null || _devtoolsRegistry_getLoaderTimingHistory === void 0 ? void 0 : _devtoolsRegistry_getLoaderTimingHistory.call(devtoolsRegistry)) !== null && _ref !== void 0 ? _ref : [];\n\t\t},\n\t\tgetPreloadHistory\n\t});\n}\nfunction consumePendingNavigationAction() {\n\tvar action = pendingNavigationAction;\n\tpendingNavigationAction = void 0;\n\treturn action;\n}\nfunction subscribeToRootState(subscriber) {\n\trootStateSubscribers.add(subscriber);\n\treturn function() {\n\t\trootStateSubscribers.delete(subscriber);\n\t};\n}\nfunction notifyRootStateSubscribers(state) {\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = rootStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar subscriber = _step.value;\n\t\t\tsubscriber(state);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n}\nfunction subscribeToStore(subscriber) {\n\tstoreSubscribers.add(subscriber);\n\treturn function() {\n\t\tstoreSubscribers.delete(subscriber);\n\t};\n}\nfunction subscribeToLoadingState(subscriber) {\n\tloadingStateSubscribers.add(subscriber);\n\treturn function() {\n\t\tloadingStateSubscribers.delete(subscriber);\n\t};\n}\nfunction setLoadingState(state) {\n\tstartTransition(function() {\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = loadingStateSubscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar listener = _step.value;\n\t\t\t\tlistener(state);\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t});\n}\nvar currentSnapshot = null;\nfunction updateSnapshot() {\n\tcurrentSnapshot = getSnapshot();\n}\nfunction snapshot() {\n\treturn currentSnapshot;\n}\nfunction getSnapshot() {\n\treturn {\n\t\tlinkTo,\n\t\trouteNode,\n\t\trootComponent,\n\t\tlinking: getResolvedLinking(),\n\t\thasAttemptedToHideSplash,\n\t\tinitialState,\n\t\trootState,\n\t\tnextState,\n\t\trouteInfo,\n\t\tsplashScreenAnimationFrame,\n\t\tnavigationRef,\n\t\trootStateSubscribers,\n\t\tstoreSubscribers\n\t};\n}\nfunction rootStateSnapshot() {\n\treturn rootState;\n}\nfunction routeInfoSnapshot() {\n\treturn routeInfo;\n}\nfunction getBrowserPathname() {\n\tvar pathname = getSafeWindowPathname();\n\treturn pathname === void 0 ? void 0 : normalizeRoutePathname(pathname);\n}\nfunction shouldKeepPendingNavigationState(currentState) {\n\tif (!pendingNavigationPathname) return false;\n\treturn getRouteInfo(currentState).pathname !== pendingNavigationPathname;\n}\nfunction shouldPreserveInitialRouteInfo(currentState) {\n\tif (!initialState || !(routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname)) return false;\n\tvar nextPathname = getRouteInfo(currentState).pathname;\n\tif (nextPathname === routeInfo.pathname) return false;\n\tif (nextPathname && nextPathname === pendingNavigationPathname) return false;\n\tvar browserPathname = getBrowserPathname();\n\tif (nextPathname && browserPathname && nextPathname === browserPathname) return false;\n\treturn true;\n}\nfunction useOneRouter() {\n\treturn useDeferredValue(useSyncExternalStore(subscribeToStore, snapshot, snapshot));\n}\nfunction syncStoreRootState() {\n\tif (!navigationRef) throw new Error(`No navigationRef, possible duplicate One dep`);\n\tif (navigationRef.isReady()) {\n\t\tvar currentState = navigationRef.getRootState();\n\t\tif (rootState !== currentState) {\n\t\t\tif (shouldKeepPendingNavigationState(currentState)) return;\n\t\t\tif (shouldPreserveInitialRouteInfo(currentState)) return;\n\t\t\tupdateState(currentState);\n\t\t}\n\t}\n}\nfunction useRootStateSnapshot(snapshot2) {\n\tvar [state, rerender] = useReducer(snapshot2, void 0, snapshot2);\n\tuseEffect(function() {\n\t\tvar unsubscribe = subscribeToRootState(rerender);\n\t\trerender();\n\t\treturn unsubscribe;\n\t}, []);\n\tvar browserPath = getSafeWindowPath();\n\treturn browserPath !== void 0 && (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.unstable_globalHref) === browserPath + window.location.hash ? snapshot2() : state;\n}\nfunction useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useRootStateSnapshot(rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useRootStateSnapshot(routeInfoSnapshot);\n}\nfunction cleanup() {\n\tif (splashScreenAnimationFrame) cancelAnimationFrame(splashScreenAnimationFrame);\n}\nvar preloadingLoader = {};\nvar preloadedLoaderData = {};\nvar cssInjectFunctions = {};\nvar preloadHistory = [];\nfunction getPreloadHistory() {\n\treturn preloadHistory;\n}\nfunction preloadRoute(href) {\n\targuments.length > 1 && arguments[1] !== void 0 && arguments[1];\n}\nfunction normalizeLoaderPath(href) {\n\treturn new URL(href, \"http://example.com\").pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n}\nfunction buildClientMatches(href, matchingNode, params, loaderData) {\n\tvar pathname = extractPathnameFromHref(href);\n\tvar routeId = (matchingNode === null || matchingNode === void 0 ? void 0 : matchingNode.contextKey) || pathname;\n\tvar layoutMatches = currentMatches.filter(function(m) {\n\t\treturn m.routeId.includes(\"_layout\");\n\t});\n\tvar pageMatch = {\n\t\trouteId,\n\t\tpathname,\n\t\tparams,\n\t\tloaderData\n\t};\n\treturn [...layoutMatches, pageMatch];\n}\nfunction buildNativeMatches(state, pathname, params) {\n\treturn findAllRouteNodesFromState(state, routeNode).map(function(node) {\n\t\treturn {\n\t\t\trouteId: node.contextKey || pathname,\n\t\t\tpathname,\n\t\t\tparams,\n\t\t\tloaderData: void 0\n\t\t};\n\t});\n}\nfunction initClientMatches(matches) {\n\tcurrentMatches = matches;\n\tsetClientMatches(matches);\n}\nasync function linkTo(href, event, options) {\n\tif (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \\u{1F517} ${event || \"NAVIGATE\"} ${href}`);\n\tsetNavigationType(\"soft\");\n\tclearNotFoundState();\n\tif (href[0] === \"#\") return;\n\tif (shouldLinkExternally(href)) {\n\t\topenExternalURL(href);\n\t\treturn;\n\t}\n\tif (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tvar protectedHref = resolveProtectedHref(href);\n\tif (!protectedHref) return;\n\tif (protectedHref !== href) return linkTo(protectedHref, \"REPLACE\", options);\n\tvar currentLayoutNode = routeNode;\n\tvar currentPath = (routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.pathname) || \"/\";\n\tvar interceptResult = findInterceptRoute(href, currentLayoutNode, currentPath);\n\tif (interceptResult) {\n\t\tvar { interceptRoute, slotName, layoutContextKey, params } = interceptResult;\n\t\tvar scopedSlotKey = `${layoutContextKey}:${slotName}`;\n\t\tstoreInterceptState(scopedSlotKey, interceptRoute, params);\n\t\tupdateURLWithoutNavigation(href);\n\t\tsetSlotState(scopedSlotKey, {\n\t\t\tactiveRouteKey: interceptRoute.contextKey,\n\t\t\tactiveRouteNode: interceptRoute,\n\t\t\tparams,\n\t\t\tisIntercepted: true\n\t\t});\n\t\treturn;\n\t}\n\tassertIsReady(navigationRef);\n\tvar current = navigationRef.current;\n\tif (current == null) throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n\tvar linking = getResolvedLinking();\n\tif (!linking) throw new Error(\"Attempted to link to route when no routes are present\");\n\tsetLastAction();\n\tif (href === \"..\" || href === \"../\") {\n\t\tcurrent.goBack();\n\t\treturn;\n\t}\n\tif (href.startsWith(\".\")) {\n\t\tvar _ref;\n\t\tvar _routeInfo_segments;\n\t\tvar base = (_ref = routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_segments = routeInfo.segments) === null || _routeInfo_segments === void 0 ? void 0 : _routeInfo_segments.map(function(segment) {\n\t\t\tvar _routeInfo_params;\n\t\t\tif (!segment.startsWith(\"[\")) return segment;\n\t\t\tif (segment.startsWith(\"[...\")) {\n\t\t\t\tvar _ref2;\n\t\t\t\tvar _routeInfo_params1, _params_split;\n\t\t\t\tsegment = segment.slice(4, -1);\n\t\t\t\tvar params3 = routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_params1 = routeInfo.params) === null || _routeInfo_params1 === void 0 ? void 0 : _routeInfo_params1[segment];\n\t\t\t\tif (Array.isArray(params3)) return params3.join(\"/\");\n\t\t\t\treturn (_ref2 = params3 === null || params3 === void 0 ? void 0 : (_params_split = params3.split(\",\")) === null || _params_split === void 0 ? void 0 : _params_split.join(\"/\")) !== null && _ref2 !== void 0 ? _ref2 : \"\";\n\t\t\t}\n\t\t\tsegment = segment.slice(1, -1);\n\t\t\treturn routeInfo === null || routeInfo === void 0 ? void 0 : (_routeInfo_params = routeInfo.params) === null || _routeInfo_params === void 0 ? void 0 : _routeInfo_params[segment];\n\t\t}).filter(Boolean).join(\"/\")) !== null && _ref !== void 0 ? _ref : \"/\";\n\t\tif (!(routeInfo === null || routeInfo === void 0 ? void 0 : routeInfo.isIndex)) base += \"/..\";\n\t\thref = resolve(base, href);\n\t}\n\tvar state = linking.getStateFromPath(href, linking.config);\n\tif (!state || state.routes.length === 0) {\n\t\tconsole.error(\"Could not generate a valid navigation state for the given path: \" + href);\n\t\tconsole.error(`linking.config`, linking.config);\n\t\tconsole.error(`routes`, getSortedRoutes());\n\t\treturn;\n\t}\n\tsetLoadingState(\"loading\");\n\tvar normalizedPreloadPath = normalizeLoaderPath(href);\n\tif (!(normalizedPreloadPath in preloadedLoaderData) && !(href in preloadedLoaderData)) await preloadRoute(href, true);\n\telse if (process.env.NODE_ENV !== \"development\") {\n\t\tvar inject = cssInjectFunctions[href];\n\t\tif (inject) inject().catch(function() {});\n\t}\n\tvar preloadResult = preloadedLoaderData[normalizedPreloadPath];\n\tif (preloadResult === null || preloadResult === void 0 ? void 0 : preloadResult.__oneRedirect) {\n\t\tvar redirectTarget = preloadResult.__oneRedirect;\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tlinkTo(redirectTarget, \"REPLACE\");\n\t\treturn;\n\t}\n\tif ((preloadResult === null || preloadResult === void 0 ? void 0 : preloadResult.__oneError) === 404) {\n\t\tdelete preloadedLoaderData[normalizedPreloadPath];\n\t\tdelete preloadingLoader[normalizedPreloadPath];\n\t\tdelete preloadedLoaderData[href];\n\t\tdelete preloadingLoader[href];\n\t\tsetLoadingState(\"loaded\");\n\t\tvar notFoundRoute = findNearestNotFoundRoute(href, routeNode);\n\t\tsetNotFoundState({\n\t\t\tnotFoundPath: preloadResult.__oneNotFoundPath || \"/+not-found\",\n\t\t\tnotFoundRouteNode: notFoundRoute || void 0,\n\t\t\toriginalPath: href\n\t\t});\n\t\treturn;\n\t}\n\tvar matchingRouteNode = findRouteNodeFromState(state, routeNode);\n\tvar isColdRoute = false;\n\tif (matchingRouteNode === null || matchingRouteNode === void 0 ? void 0 : matchingRouteNode.loadRoute) {\n\t\tsetValidationState({\n\t\t\tstatus: \"validating\",\n\t\t\tlastValidatedHref: href\n\t\t});\n\t\ttry {\n\t\t\tvar loadedRoute = matchingRouteNode.loadRoute();\n\t\t\tvar params1 = extractParamsFromState(state);\n\t\t\tvar search = extractSearchFromHref(href);\n\t\t\tvar pathname = extractPathnameFromHref(href);\n\t\t\tif (loadedRoute.validateParams) validateParams(loadedRoute.validateParams, params1);\n\t\t\tif (loadedRoute.validateRoute) {\n\t\t\t\tvar validationResult = await loadedRoute.validateRoute({\n\t\t\t\t\tparams: params1,\n\t\t\t\t\tsearch,\n\t\t\t\t\tpathname,\n\t\t\t\t\thref\n\t\t\t\t});\n\t\t\t\tif (validationResult && !validationResult.valid) {\n\t\t\t\t\tvar _$error = new RouteValidationError(validationResult.error || \"Route validation failed\", validationResult.details);\n\t\t\t\t\tsetValidationState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror: _$error,\n\t\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t\t});\n\t\t\t\t\tthrow _$error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetValidationState({\n\t\t\t\tstatus: \"valid\",\n\t\t\t\tlastValidatedHref: href\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tif (error && typeof error.then === \"function\") {\n\t\t\t\tisColdRoute = true;\n\t\t\t\tvar routeLoading = error.catch(function() {});\n\t\t\t\tif (process.env.NODE_ENV !== \"development\" || process.env.ONE_SUSPEND_ROUTES_NATIVE === \"0\" || globalThis.__ONE_DISABLE_SUSPENSE_ROUTES__ === true) await routeLoading;\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"valid\",\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t} else if (error instanceof ParamValidationError || error instanceof RouteValidationError) {\n\t\t\t\tsetValidationState({\n\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\terror,\n\t\t\t\t\tlastValidatedHref: href\n\t\t\t\t});\n\t\t\t\tthrow error;\n\t\t\t} else throw error;\n\t\t}\n\t}\n\tvar loaderData = preloadedLoaderData[normalizeLoaderPath(href)];\n\tvar params2 = extractParamsFromState(state);\n\tvar newMatches = buildClientMatches(href, matchingRouteNode, params2, loaderData);\n\tcurrentMatches = newMatches;\n\tsetClientMatches(newMatches);\n\tif (!navigationRef.isReady()) {\n\t\tsetLoadingState(\"loaded\");\n\t\treturn;\n\t}\n\tvar currentRootState = navigationRef.getRootState();\n\tvar hash = href.indexOf(\"#\");\n\tif ((currentRootState === null || currentRootState === void 0 ? void 0 : currentRootState.key) && hash > 0) hashes[currentRootState.key] = href.slice(hash);\n\tnextOptions = options !== null && options !== void 0 ? options : null;\n\tpendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));\n\tpendingNavigationAction = event === \"PUSH\" || event === \"REPLACE\" || event === \"NAVIGATE\" ? event : void 0;\n\tlastIntendedPathname = pendingNavigationPathname;\n\tvar freshRootState = navigationRef.getRootState();\n\tvar currentRouteBeforeDispatch = navigationRef.getCurrentRoute();\n\tvar targetPathname = pendingNavigationPathname;\n\tvar optimisticState = nextOptions ? {\n\t\t...state,\n\t\tlinkOptions: nextOptions\n\t} : state;\n\tvar action = event === \"REPLACE\" ? !isColdRoute ? getNativeStackReplaceAction(state, freshRootState) : null : getNavigateAction(state, freshRootState, event);\n\tstartTransition(function() {\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tif (!action) navigationRef.resetRoot(state);\n\t\telse {\n\t\t\tvar _action_payload;\n\t\t\tvar targetName = (_action_payload = action.payload) === null || _action_payload === void 0 ? void 0 : _action_payload.name;\n\t\t\tvar isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\t\tvar hasFreshRootState = freshRootState.type === \"stack\";\n\t\t\tvar isRootTarget = action.target === freshRootState.key;\n\t\t\tvar currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\t\tvar currentFocusedName = currentFocusedRoute === null || currentFocusedRoute === void 0 ? void 0 : currentFocusedRoute.name;\n\t\t\tif (event !== \"REPLACE\" && isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\t\tvar _state_index;\n\t\t\t\tvar targetRoute = state.routes[(_state_index = state.index) !== null && _state_index !== void 0 ? _state_index : state.routes.length - 1];\n\t\t\t\tvar targetRootName = targetRoute.name;\n\t\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\t\tvar _ref2;\n\t\t\t\t\tvar routes = [...freshRootState.routes];\n\t\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: (_ref2 = currentFocusedRoute === null || currentFocusedRoute === void 0 ? void 0 : currentFocusedRoute.key) !== null && _ref2 !== void 0 ? _ref2 : targetRoute.key\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tvar _ref1;\n\t\t\t\t\tvar existingTargetRoute = freshRootState.routes.find(function(route) {\n\t\t\t\t\t\treturn route.name === targetRootName;\n\t\t\t\t\t});\n\t\t\t\t\tvar existingRoutes = freshRootState.routes.filter(function(route) {\n\t\t\t\t\t\treturn route.name !== targetRootName;\n\t\t\t\t\t});\n\t\t\t\t\tvar nextRootState = {\n\t\t\t\t\t\t...freshRootState,\n\t\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\t\tkey: (_ref1 = existingTargetRoute === null || existingTargetRoute === void 0 ? void 0 : existingTargetRoute.key) !== null && _ref1 !== void 0 ? _ref1 : `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t\t};\n\t\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t\t}\n\t\t\t} else navigationRef.dispatch(action);\n\t\t}\n\t});\n\tvar warningTm;\n\tvar interval = setInterval(function() {\n\t\tif (!navigationRef.isReady()) {\n\t\t\tclearTimeout(warningTm);\n\t\t\tclearInterval(interval);\n\t\t\treturn;\n\t\t}\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(function() {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearInterval(interval);\n\t}, 16);\n\tif (process.env.NODE_ENV === \"development\") warningTm = setTimeout(function() {\n\t\tconsole.warn(`Routing took more than 8 seconds`);\n\t}, 1e3);\n}\nvar hashes = {};\nvar nextOptions = null;\nfunction deepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) && Array.isArray(b)) {\n\t\tif (a.length !== b.length) return false;\n\t\tfor (var i = 0; i < a.length; i++) if (!deepEqual(a[i], b[i])) return false;\n\t\treturn true;\n\t}\n\tif (typeof a === \"object\" && typeof b === \"object\") {\n\t\tvar keysA = Object.keys(a);\n\t\tvar keysB = Object.keys(b);\n\t\tif (keysA.length !== keysB.length) return false;\n\t\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\t\ttry {\n\t\t\tfor (var _iterator = keysA[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\t\tvar key = _step.value;\n\t\t\t\tif (!deepEqual(a[key], b[key])) return false;\n\t\t\t}\n\t\t} catch (err) {\n\t\t\t_didIteratorError = true;\n\t\t\t_iteratorError = err;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t\t} finally {\n\t\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\treturn false;\n}\n\nexport { canDismiss, canGoBack, cleanup, consumePendingNavigationAction, dismiss, dismissAll, getPreloadHistory, getSafeWindowPathname2 as getSafeWindowPathname, getSortedRoutes, getValidationState, goBack, handleNavigationContainerStateChange, hasAttemptedToHideSplash, initClientMatches, initialPathname, initialState, initialize, isRouteProtected, lastIntendedPathname, linkTo, navigate, navigationRef, preloadRoute, preloadedLoaderData, preloadingLoader, push, registerProtectedRoutes, replace, resolveProtectedHref, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValidationState, unregisterProtectedRoutes, updateState, useOneRouter, useStoreRootState, useStoreRouteInfo, useValidationState };"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAI,YAAY;AAChB,IAAI;AACJ,IAAI,yCAAyC,IAAI,IAAI;AACrD,SAAS,wBAAwB,YAAY,kBAAkB;CAC9D,IAAI,iBAAiB,SAAS,GAAG,uBAAuB,OAAO,UAAU;MACpE,uBAAuB,IAAI,YAAY,gBAAgB;AAC7D;AACA,SAAS,0BAA0B,YAAY;CAC9C,uBA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AC9B;EACD;EACA,OAAO;CACR;CACA,OAAO;AACR"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { StackActions } from "@react-navigation/native";
|
|
2
|
+
import { matchDynamicName, matchGroupName } from "../matchers.mjs";
|
|
3
|
+
import { getNavigateAction } from "./getNavigateAction.mjs";
|
|
4
|
+
|
|
5
|
+
function getNativeStackReplaceAction(actionState, navigationState) {
|
|
6
|
+
while (actionState && navigationState) {
|
|
7
|
+
const currentRoute = navigationState.routes[navigationState.index];
|
|
8
|
+
const targetRoute = actionState.routes[actionState.index ?? actionState.routes.length - 1];
|
|
9
|
+
if (currentRoute.name !== targetRoute.name && (matchGroupName(currentRoute.name) || matchGroupName(targetRoute.name))) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
const dynamicMatch = matchDynamicName(targetRoute.name);
|
|
13
|
+
const changesDynamicScreen = currentRoute.name === targetRoute.name && dynamicMatch && currentRoute.params?.[dynamicMatch.name] !== targetRoute.params?.[dynamicMatch.name];
|
|
14
|
+
if (!currentRoute.state || !targetRoute.state || changesDynamicScreen) {
|
|
15
|
+
if ((currentRoute.name !== targetRoute.name || changesDynamicScreen) && navigationState.type === "stack" && navigationState.routeNames.includes(targetRoute.name)) {
|
|
16
|
+
const { payload } = getNavigateAction(actionState, navigationState, "REPLACE");
|
|
17
|
+
return {
|
|
18
|
+
...StackActions.replace(payload.name, payload.params),
|
|
19
|
+
target: navigationState.key,
|
|
20
|
+
source: currentRoute.key
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
if (currentRoute.name !== targetRoute.name) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
actionState = targetRoute.state;
|
|
29
|
+
navigationState = currentRoute.state;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { getNativeStackReplaceAction };
|
|
35
|
+
//# sourceMappingURL=getNativeStackReplaceAction.mjs.map
|