UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

1 lines 67.3 kB
{"version":3,"names":["StackActions","Fragment","startTransition","useDeferredValue","useSyncExternalStore","Platform","devtoolsRegistry","resolveHref","openExternalURL","resolve","checkBlocker","assertIsReady","getLoaderPath","getPreloadCSSPath","getPreloadPath","dynamicImport","isVersionStale","shouldLinkExternally","ParamValidationError","RouteValidationError","validateParams","extractParamsFromState","extractPathnameFromHref","extractSearchFromHref","findRouteNodeFromState","getRouteInfo","getRoutes","setLastAction","getResolvedLinking","resetLinking","setupLinking","getSafeWindowPathname","getSafeWindowPathname2","normalizeRoutePathname","stripTrailingSlash","sortRoutes","getQualifiedRouteComponent","preloadRouteModules","getNavigateAction","setClientMatches","findInterceptRoute","setNavigationType","storeInterceptState","updateURLWithoutNavigation","setSlotState","clearNotFoundState","findNearestNotFoundRoute","setNotFoundState","routeNode","rootComponent","protectedRouteRegistry","Map","registerProtectedRoutes","contextKey","protectedScreens","size","delete","set","unregisterProtectedRoutes","isRouteProtected","href","normalizedHref","replace","normalizedContextKey","startsWith","routeName","slice","length","split","normalizedRouteName","has","hasAttemptedToHideSplash","initialState","rootState","initialPathname","lastIntendedPathname","nextState","routeInfo","splashScreenAnimationFrame","pendingNavigationPathname","pendingNavigationAction","navigationRef","rootStateSubscribers","Set","loadingStateSubscribers","storeSubscribers","currentMatches","validationState","status","validationStateSubscribers","subscribeToValidationState","subscriber","add","setValidationState","state","error","window","dispatchEvent","CustomEvent","detail","message","name","stack","lastValidatedHref","timestamp","Date","now","getValidationState","useValidationState","cachedRouteNode","cachedRootComponent","cachedContext","initialize","context","ref","initialLocation","linking","cleanUpState","ignoreEntryPoints","platform","OS","process","env","NODE_ENV","Error","ONE_DEBUG_ROUTER","formatRouteTree","node","indent","isLast","prefix","childIndent","dynamicBadge","dynamic","map","d","join","typeBadge","type","slotsBadge","slots","Array","from","keys","line","route","visibleChildren","children","filter","child","internal","i","childIsLast","console","info","slotName","slotConfig","defaultRoute","interceptRoutes","r","intercept","setupLinkingAndRouteInfo","subscribeToNavigationChanges","clear","pathname","unstable_globalHref","isIndex","params","segments","handleNavigationContainerStateChange","navState","key","hashes","hash","requestAnimationFrame","shouldKeepPendingNavigationState","nextOptions","linkOptions","shouldUpdateSubscribers","updateState","updateSnapshot","navigate","url","options","linkTo","push","dismiss","count","dispatch","pop","setParams","current","dismissAll","popToTop","goBack","canGoBack","isReady","canDismiss","routes","index","getSortedRoutes","sort","nextStateParam","nextRouteInfo","deepEqual","to","Object","__oneDevtools","getLoaderTimingHistory","getPreloadHistory","consumePendingNavigationAction","action","subscribeToRootState","notifyRootStateSubscribers","subscribeToStore","subscribeToLoadingState","setLoadingState","listener","currentSnapshot","getSnapshot","snapshot","rootStateSnapshot","routeInfoSnapshot","getBrowserPathname","currentState","shouldPreserveInitialRouteInfo","nextPathname","browserPathname","useOneRouter","syncStoreRootState","getRootState","useStoreRootState","useStoreRouteInfo","cleanup","cancelAnimationFrame","preloadingLoader","PRELOAD_MAP_MAX","setBoundedPreloadRecord","record","value","doPreloadDev","startTime","performance","normalizedPath","normalizeLoaderPath","globalThis","loaderJSUrl","moduleLoadStart","modulePromise","module","catch","moduleLoadTime","loader","executionStart","result","executionTime","totalTime","__oneRedirect","recordLoaderTiming","path","source","err","String","warn","doPreload","preloadPath","loaderPath","cssPreloadPath","recordPreloadStart","_preload","cssPreloadModule","Promise","all","recordPreloadError","hasCss","injectCSS","setBoundedCssInject","recordPreloadComplete","errorMessage","preloadedLoaderData","cssInjectFunctions","preloadHistory","MAX_PRELOAD_HISTORY","existing","find","p","unshift","hasLoader","dispatchPreloadEvent","entry","endTime","preloadRoute","then","data","inject","race","setTimeout","URL","buildClientMatches","matchingNode","loaderData","routeId","layoutMatches","m","includes","pageMatch","initClientMatches","matches","event","location","currentLayoutNode","currentPath","interceptResult","interceptRoute","layoutContextKey","params2","scopedSlotKey","activeRouteKey","activeRouteNode","isIntercepted","base","segment","isArray","Boolean","getStateFromPath","config","normalizedPreloadPath","preloadResult","redirectTarget","__oneError","notFoundRoute","notFoundPath","__oneNotFoundPath","notFoundRouteNode","originalPath","matchingRouteNode","loadRoute","loadedRoute","search","validateRoute","validationResult","valid","details","newMatches","currentRootState","indexOf","freshRootState","currentRouteBeforeDispatch","getCurrentRoute","targetPathname","optimisticState","resetRoot","targetName","payload","isGroupTarget","endsWith","hasFreshRootState","isRootTarget","target","currentFocusedRoute","currentFocusedName","targetRoute","targetRootName","existingTargetRoute","existingRoutes","nextRootState","warningTm","interval","setInterval","clearTimeout","a","b","keysA","keysB"],"sources":["router.mjs"],"sourcesContent":["import { StackActions } from \"@react-navigation/native\";\nimport { Fragment, startTransition, useDeferredValue, useSyncExternalStore } from \"react\";\nimport { Platform } from \"react-native-web\";\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 } from \"../utils/dynamicImport\";\nimport { isVersionStale } from \"../skewProtection\";\nimport { shouldLinkExternally } from \"../utils/url\";\nimport { ParamValidationError, RouteValidationError, validateParams } from \"../validateParams\";\nimport { extractParamsFromState, extractPathnameFromHref, extractSearchFromHref, findRouteNodeFromState } from \"./findRouteNode\";\nimport { getRouteInfo } from \"./getRouteInfo\";\nimport { getRoutes } from \"./getRoutes\";\nimport { setLastAction } from \"./lastAction\";\nimport { getResolvedLinking, resetLinking, setupLinking } from \"./linkingConfig\";\nimport { 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, protectedScreens) {\n\tif (protectedScreens.size === 0) protectedRouteRegistry.delete(contextKey);\n\telse protectedRouteRegistry.set(contextKey, protectedScreens);\n}\nfunction unregisterProtectedRoutes(contextKey) {\n\tprotectedRouteRegistry.delete(contextKey);\n}\nfunction isRouteProtected(href) {\n\tconst normalizedHref = href.replace(/^\\/+|\\/+$/g, \"\");\n\tfor (const [contextKey, protectedScreens] of protectedRouteRegistry) {\n\t\tconst normalizedContextKey = contextKey.replace(/^\\/+|\\/+$/g, \"\");\n\t\tif (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 (protectedScreens.has(routeName) || protectedScreens.has(normalizedRouteName)) return true;\n\t\t}\n\t}\n\treturn 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.OS\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\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 = {\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 useStoreRootState() {\n\tsyncStoreRootState();\n\treturn useDeferredValue(useSyncExternalStore(subscribeToRootState, rootStateSnapshot, rootStateSnapshot));\n}\nfunction useStoreRouteInfo() {\n\tsyncStoreRootState();\n\treturn useSyncExternalStore(subscribeToRootState, routeInfoSnapshot, 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);\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 preloadPath = getPreloadPath(href);\n\tconst loaderPath = getLoaderPath(href);\n\tconst cssPreloadPath = getPreloadCSSPath(href);\n\trecordPreloadStart(href);\n\ttry {\n\t\tconst [_preload, cssPreloadModule, loader] = await Promise.all([\n\t\t\tdynamicImport(preloadPath)?.catch((err) => {\n\t\t\t\trecordPreloadError(href, err instanceof Error ? err.message : String(err));\n\t\t\t\treturn null;\n\t\t\t}),\n\t\t\tdynamicImport(cssPreloadPath)?.catch(() => null) ?? Promise.resolve(null),\n\t\t\tdynamicImport(loaderPath)?.catch(() => null) ?? Promise.resolve(null),\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\treturn null;\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 (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}));\n\tif (injectCSS) return preloadingLoader[href]?.then(async (data) => {\n\t\tconst inject = cssInjectFunctions[href];\n\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\treturn data;\n\t});\n\treturn preloadingLoader[href];\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 (isVersionStale()) {\n\t\twindow.location.href = href;\n\t\treturn;\n\t}\n\tif (checkBlocker(href, event === \"REPLACE\" ? \"replace\" : \"push\")) return;\n\tif (isRouteProtected(href)) return;\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\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\tif (event === \"REPLACE\") {\n\t\tconst targetPathname = pendingNavigationPathname;\n\t\tconst optimisticState = nextOptions ? {\n\t\t\t...state,\n\t\t\tlinkOptions: nextOptions\n\t\t} : state;\n\t\tupdateState(optimisticState);\n\t\tpendingNavigationPathname = targetPathname;\n\t\tnotifyRootStateSubscribers(optimisticState);\n\t\tnavigationRef.resetRoot(state);\n\t} else {\n\t\tconst action = getNavigateAction(state, freshRootState, event);\n\t\tconst targetName = action.payload?.name;\n\t\tconst isGroupTarget = typeof targetName === \"string\" && targetName.startsWith(\"(\") && targetName.endsWith(\")\");\n\t\tconst hasFreshRootState = freshRootState.type === \"stack\";\n\t\tconst isRootTarget = action.target === freshRootState.key;\n\t\tconst currentFocusedRoute = freshRootState.routes[freshRootState.index];\n\t\tconst currentFocusedName = currentFocusedRoute?.name;\n\t\tif (isRootTarget && isGroupTarget && hasFreshRootState) {\n\t\t\tconst targetRoute = state.routes[state.routes.length - 1];\n\t\t\tconst targetRootName = targetRoute.name;\n\t\t\tif (currentFocusedName === targetRootName) {\n\t\t\t\tconst routes = [...freshRootState.routes];\n\t\t\t\troutes[freshRootState.index] = {\n\t\t\t\t\t...targetRoute,\n\t\t\t\t\tkey: currentFocusedRoute?.key ?? targetRoute.key\n\t\t\t\t};\n\t\t\t\tnavigationRef.resetRoot({\n\t\t\t\t\t...freshRootState,\n\t\t\t\t\troutes\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst existingTargetRoute = freshRootState.routes.find((route) => route.name === targetRootName);\n\t\t\t\tconst existingRoutes = freshRootState.routes.filter((route) => route.name !== targetRootName);\n\t\t\t\tconst nextRootState = {\n\t\t\t\t\t...freshRootState,\n\t\t\t\t\troutes: [...existingRoutes, {\n\t\t\t\t\t\t...targetRoute,\n\t\t\t\t\t\tkey: existingTargetRoute?.key ?? `${targetRootName}-${freshRootState.key}`\n\t\t\t\t\t}],\n\t\t\t\t\tindex: existingRoutes.length\n\t\t\t\t};\n\t\t\t\tnavigationRef.resetRoot(nextRootState);\n\t\t\t}\n\t\t} else navigationRef.dispatch(action);\n\t}\n\tlet warningTm;\n\tconst interval = setInterval(() => {\n\t\tif (currentRouteBeforeDispatch !== navigationRef.getCurrentRoute()) setTimeout(() => {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t});\n\t\tclearTimeout(warningTm);\n\t\tclearTimeout(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, rootComponent, rootState, rootStateSnapshot, routeInfo, routeInfoSnapshot, routeNode, setLoadingState, setParams, setValidationState, snapshot, subscribeToLoadingState, subscribeToRootState, subscribeToStore, subscribeToValid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