one 2.11.3 → 2.11.5
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/Root.cjs +1 -0
- package/dist/cjs/Root.native.cjs +1 -0
- package/dist/cjs/Root.native.js +1 -0
- package/dist/cjs/Root.native.js.map +1 -1
- package/dist/cjs/fork/useLinking.cjs +7 -1
- package/dist/cjs/platform/location/index.native.cjs +9 -2
- package/dist/cjs/platform/location/index.native.js +9 -2
- package/dist/cjs/platform/location/index.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +3 -1
- package/dist/cjs/router/router.native.cjs +3 -1
- package/dist/cjs/router/router.native.js +3 -1
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/esm/Root.mjs +1 -0
- package/dist/esm/Root.mjs.map +1 -1
- package/dist/esm/Root.native.js +1 -0
- package/dist/esm/Root.native.js.map +1 -1
- package/dist/esm/fork/useLinking.mjs +7 -1
- package/dist/esm/fork/useLinking.mjs.map +1 -1
- package/dist/esm/platform/location/index.native.js +9 -2
- package/dist/esm/platform/location/index.native.js.map +1 -1
- package/dist/esm/router/router.mjs +3 -1
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +3 -1
- package/dist/esm/router/router.native.js.map +1 -1
- package/package.json +16 -16
- package/src/Root.tsx +2 -0
- package/src/fork/useLinking.ts +13 -1
- package/src/platform/location/index.native.ts +14 -3
- package/src/router/router.ts +11 -3
- package/types/Root.d.ts.map +1 -1
- package/types/fork/useLinking.d.ts.map +1 -1
- package/types/platform/location/index.native.d.ts.map +1 -1
- package/types/router/router.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.js","names":["getStateFromPathDefault","getPathFromStateDefault","getActionFromStateDefault","getStateFromPath","getPathFromState","getActionFromState","routerRootState"],"sources":["esm/fork/useLinking.js"],"sourcesContent":["import {\n findFocusedRoute,\n getActionFromState as getActionFromStateDefault,\n getPathFromState as getPathFromStateDefault,\n useNavigationIndependentTree\n} from \"@react-navigation/core\";\nimport { getStateFromPath as getStateFromPathDefault } from \"./getStateFromPath\";\nimport isEqual from \"fast-deep-equal\";\nimport * as React from \"react\";\nimport { stripGroupSegmentsFromPath } from \"../router/matchers\";\nimport {\n setNavigationType,\n isReturningFromIntercept,\n setReturningFromIntercept,\n restoreInterceptFromHistory\n} from \"../router/interceptRoutes\";\nimport {\n consumePendingNavigationAction,\n rootState as routerRootState,\n routeNode\n} from \"../router/router\";\nimport { isStateAwaitingNavigatorMount } from \"../router/isStateAwaitingNavigatorMount\";\nimport { ServerLocationContext } from \"../router/serverLocationContext\";\nimport { clearAllSlotStates } from \"../views/Navigator\";\nimport { createMemoryHistory } from \"./createMemoryHistory\";\nimport { appendBaseUrl } from \"./getPathFromState-mods\";\nconst getPartialState = (state) => {\n if (!state) return void 0;\n const { key, routeNames, stale, routes, ...partial } = state;\n return {\n ...partial,\n stale: true,\n routes: routes.map(({ key: routeKey, state: childState, ...route }) => ({\n ...route,\n ...childState ? { state: getPartialState(childState) } : null\n }))\n };\n};\nfunction getFocusedRouteDepth(state) {\n const length = getTotalHistoryLength(state);\n const focusedRoute = state.routes[state.index];\n const child = focusedRoute?.state;\n if (child) {\n return length + getFocusedRouteDepth(child);\n }\n return length;\n}\nconst getTotalHistoryLength = (state) => {\n const activeRoutes = state.routes.slice(0, state.index + 1);\n const baseHistoryLength = state.history ? state.history.length : activeRoutes.length;\n const routeHistoryLength = activeRoutes.reduce((acc, r) => {\n return acc + (r.history ? r.history.length : 0);\n }, 0);\n return baseHistoryLength + routeHistoryLength;\n};\nfunction getDynamicParamNames(routeName) {\n return Array.from(routeName.matchAll(/\\[(?:\\.\\.\\.)?([^\\]]+)\\]/g), (match) => match[1]);\n}\nfunction hasMissingDynamicParams(route) {\n if (!route) return false;\n const dynamicParamNames = getDynamicParamNames(route.name);\n if (dynamicParamNames.length === 0) return false;\n return dynamicParamNames.some((name) => route.params?.[name] == null);\n}\nfunction currentUrlHasDynamicParams(route, getStateFromPath, config) {\n const currentPath = window.location.pathname + window.location.search;\n const currentState = getStateFromPath(currentPath, config);\n const currentRoute = currentState ? findFocusedRoute(currentState) : void 0;\n return currentRoute?.name === route.name && !hasMissingDynamicParams(currentRoute);\n}\nconst findMatchingState = (a, b) => {\n if (a === void 0 || b === void 0 || a.key !== b.key) {\n return [void 0, void 0];\n }\n const aHistoryLength = getTotalHistoryLength(a);\n const bHistoryLength = getTotalHistoryLength(b);\n const aRoute = a.routes[a.index];\n const bRoute = b.routes[b.index];\n const aChildState = aRoute.state;\n const bChildState = bRoute.state;\n if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === void 0 || bChildState === void 0 || aChildState.key !== bChildState.key || (aRoute.history?.length || 0) !== (bRoute.history?.length || 0)) {\n return [a, b];\n }\n return findMatchingState(aChildState, bChildState);\n};\nconst series = (cb) => {\n let queue = Promise.resolve();\n const callback = () => {\n queue = queue.then(cb);\n };\n return callback;\n};\nconst linkingHandlers = /* @__PURE__ */ new Set();\nfunction useLinking(ref, {\n enabled = true,\n config,\n getStateFromPath = getStateFromPathDefault,\n getPathFromState = getPathFromStateDefault,\n getActionFromState = getActionFromStateDefault\n}) {\n if (typeof window === \"undefined\") {\n const getInitialState2 = React.useCallback(() => {\n return {\n then(fn) {\n return Promise.resolve(fn ? fn(void 0) : void 0);\n },\n catch() {\n return this;\n }\n };\n }, []);\n return { getInitialState: getInitialState2 };\n }\n const independent = useNavigationIndependentTree();\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\") {\n return void 0;\n }\n if (independent) {\n return void 0;\n }\n if (enabled !== false && linkingHandlers.size) {\n console.error(\n [\n \"Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:\",\n \"- You don't have multiple NavigationContainers in the app each with 'linking' enabled\",\n \"- Only a single instance of the root component is rendered\"\n ].join(\"\\n\").trim()\n );\n }\n const handler = /* @__PURE__ */ Symbol();\n if (enabled !== false) {\n linkingHandlers.add(handler);\n }\n return () => {\n linkingHandlers.delete(handler);\n };\n }, [enabled, independent]);\n const [history] = React.useState(createMemoryHistory);\n const enabledRef = React.useRef(enabled);\n const configRef = React.useRef(config);\n const getStateFromPathRef = React.useRef(getStateFromPath);\n const getPathFromStateRef = React.useRef(getPathFromState);\n const getActionFromStateRef = React.useRef(getActionFromState);\n const restoringFromTempLocationRef = React.useRef(false);\n const initialHistorySetupDoneRef = React.useRef(false);\n const maskedDisplayPathRef = React.useRef(void 0);\n React.useEffect(() => {\n enabledRef.current = enabled;\n configRef.current = config;\n getStateFromPathRef.current = getStateFromPath;\n getPathFromStateRef.current = getPathFromState;\n getActionFromStateRef.current = getActionFromState;\n });\n const validateRoutesNotExistInRootState = React.useCallback(\n (state) => {\n const navigation = ref.current;\n const rootState = navigation?.getRootState();\n const routeNames = rootState?.routeNames;\n if (!routeNames) {\n return false;\n }\n return state?.routes.some((r) => !routeNames.includes(r.name));\n },\n [ref]\n );\n const location = React.useContext(ServerLocationContext);\n const server = { location };\n const getInitialState = React.useCallback(() => {\n setNavigationType(\"hard\");\n clearAllSlotStates();\n let value;\n if (enabledRef.current) {\n const location2 = server?.location ?? (typeof window !== \"undefined\" ? window.location : void 0);\n let path = location2 ? location2.pathname + location2.search + (location2.hash ?? \"\") : void 0;\n if (location2 && typeof window !== \"undefined\") {\n const historyState = window.history.state;\n if (historyState) {\n const { __tempLocation, __tempKey } = historyState;\n if (__tempLocation?.pathname && !__tempKey) {\n path = __tempLocation.pathname + (__tempLocation.search || \"\") + (__tempLocation.hash || \"\");\n restoringFromTempLocationRef.current = true;\n }\n }\n }\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F50D} getInitialState path=${path}`);\n }\n if (path) {\n value = getStateFromPathRef.current(path, configRef.current);\n }\n }\n const thenable = {\n // biome-ignore lint/suspicious/noThenProperty: don't check copied code\n then(onfulfilled) {\n return Promise.resolve(onfulfilled ? onfulfilled(value) : value);\n },\n catch() {\n return thenable;\n }\n };\n return thenable;\n }, []);\n const previousIndexRef = React.useRef(void 0);\n const previousStateRef = React.useRef(void 0);\n const pendingPopStatePathRef = React.useRef(void 0);\n React.useEffect(() => {\n previousIndexRef.current = history.index;\n return history.listen(() => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n if (isReturningFromIntercept()) {\n setReturningFromIntercept(false);\n clearAllSlotStates();\n return;\n }\n if (restoreInterceptFromHistory()) {\n return;\n }\n setNavigationType(\"hard\");\n clearAllSlotStates();\n maskedDisplayPathRef.current = void 0;\n const { location: location2 } = window;\n const path = location2.pathname + location2.search;\n const index = history.index;\n const previousIndex = previousIndexRef.current ?? 0;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} history.listen path=${path} index=${index} prevIndex=${previousIndex}`\n );\n }\n previousIndexRef.current = index;\n pendingPopStatePathRef.current = path;\n const record = history.get(index);\n const pathMatches = record?.path === path || record?.displayPath === path;\n if (pathMatches && record?.state) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} history record found, resetRoot to:`, record.state);\n }\n navigation.resetRoot(getPartialState(record.state));\n return;\n }\n const state = getStateFromPathRef.current(path, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getStateFromPath result:`, state);\n }\n if (state) {\n if (validateRoutesNotExistInRootState(state)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} routes not in root state, skipping`);\n }\n return;\n }\n if (index > previousIndex || index === previousIndex && (!record || `${record?.path}${location2.hash}` === path)) {\n const action = getActionFromStateRef.current(state, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} dispatching action:`, action);\n }\n if (action !== void 0) {\n try {\n navigation.dispatch(action);\n } catch (e) {\n console.warn(\n `An error occurred when trying to handle the link '${path}': ${typeof e === \"object\" && e != null && \"message\" in e ? e.message : e}`\n );\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} no action, resetRoot`);\n }\n navigation.resetRoot(state);\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} going back, resetRoot`);\n }\n navigation.resetRoot(state);\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} no state for path, resetRoot to undefined`);\n }\n navigation.resetRoot(state);\n }\n });\n }, [enabled, history, ref, validateRoutesNotExistInRootState]);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n const getPathForRoute = (route, state) => {\n let path;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getPathForRoute - route:`, route);\n console.info(`[one] \\u{1F4DC} getPathForRoute - state:`, JSON.stringify(state, null, 2));\n }\n if (route?.path) {\n const stateForPath = getStateFromPathRef.current(route.path, configRef.current);\n if (stateForPath) {\n const focusedRoute = findFocusedRoute(stateForPath);\n if (focusedRoute && focusedRoute.name === route.name && isEqual(focusedRoute.params, route.params)) {\n path = appendBaseUrl(route.path);\n }\n }\n }\n if (path == null) {\n path = getPathFromStateRef.current(state, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getPathForRoute - computed from state:`, path);\n }\n }\n return path;\n };\n if (ref.current) {\n const refState = ref.current.getRootState();\n const state = routerRootState || refState;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} useEffect initial state check - refState:`,\n JSON.stringify(refState, null, 2)\n );\n console.info(\n `[one] \\u{1F4DC} useEffect initial state check - routerRootState:`,\n JSON.stringify(routerRootState, null, 2)\n );\n }\n if (state) {\n const route = findFocusedRoute(state);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} useEffect focused route:`, route);\n }\n const path = getPathForRoute(route, state);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} initial history.replace - state:`,\n JSON.stringify(state, null, 2)\n );\n console.info(`[one] \\u{1F4DC} initial history.replace - focusedRoute:`, route);\n console.info(`[one] \\u{1F4DC} initial history.replace - computed path:`, path);\n }\n if (previousStateRef.current === void 0) {\n previousStateRef.current = refState;\n }\n if (!initialHistorySetupDoneRef.current) {\n const historyState = window.history.state;\n const isRestoringFromMask = restoringFromTempLocationRef.current || historyState?.__tempLocation?.pathname && !historyState.__tempKey;\n if (isRestoringFromMask) {\n const displayPath = window.location.pathname + window.location.search;\n history.replace({ path, state, displayPath });\n restoringFromTempLocationRef.current = false;\n maskedDisplayPathRef.current = { displayPath, actualPath: path };\n } else {\n history.replace({ path, state });\n }\n initialHistorySetupDoneRef.current = true;\n }\n }\n }\n const onStateChange = async () => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n const previousState = previousStateRef.current;\n const refState = navigation.getRootState();\n const state = routerRootState || refState;\n if (!state) {\n return;\n }\n const pendingPath = pendingPopStatePathRef.current;\n const route = findFocusedRoute(state);\n if (isStateAwaitingNavigatorMount(state, routeNode)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} onStateChange - skipping: navigator below`,\n route?.name,\n `has not mounted`\n );\n }\n return;\n }\n if (route && hasMissingDynamicParams(route) && currentUrlHasDynamicParams(route, getStateFromPathRef.current, configRef.current)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} onStateChange - skipping: focused dynamic route is missing params`,\n route.name\n );\n }\n return;\n }\n let path = getPathForRoute(route, state);\n const pendingNavigationAction = consumePendingNavigationAction();\n if (typeof window !== \"undefined\" && !route?.params && !pendingNavigationAction) {\n const currentSearch = window.location.search;\n if (currentSearch && !path.includes(\"?\") && window.location.pathname === path) {\n path = path + currentSearch;\n }\n }\n const maskOptions = state.linkOptions?.mask;\n const maskHref = maskOptions?.href;\n const maskedInfo = maskedDisplayPathRef.current;\n let displayPath;\n if (maskedInfo) {\n if (path === maskedInfo.actualPath) {\n displayPath = maskedInfo.displayPath;\n }\n maskedDisplayPathRef.current = void 0;\n }\n if (!displayPath && maskHref) {\n displayPath = appendBaseUrl(stripGroupSegmentsFromPath(maskHref) || \"/\");\n }\n const unmaskOnReload = maskOptions?.unmaskOnReload;\n previousStateRef.current = refState;\n pendingPopStatePathRef.current = void 0;\n if (pendingNavigationAction === \"PUSH\" && path !== pendingPath) {\n history.push({ path, state, displayPath, unmaskOnReload });\n return;\n }\n if (pendingNavigationAction === \"REPLACE\" && path !== pendingPath) {\n history.replace({ path, state, displayPath, unmaskOnReload });\n return;\n }\n const [previousFocusedState, focusedState] = findMatchingState(previousState, state);\n if (previousFocusedState && focusedState && // We should only handle push/pop if path changed from what was in last `popstate`\n // Otherwise it's likely a change triggered by `popstate`\n path !== pendingPath) {\n const historyDelta = getFocusedRouteDepth(focusedState) - getFocusedRouteDepth(previousFocusedState);\n if (historyDelta > 0) {\n const currentRecord = history.get(history.index);\n const samePath = currentRecord?.path === path || currentRecord?.displayPath === path;\n if (samePath) {\n history.replace({ path, state, displayPath, unmaskOnReload });\n } else {\n history.push({ path, state, displayPath, unmaskOnReload });\n }\n } else if (historyDelta < 0) {\n const nextIndex = history.backIndex({ path });\n const currentIndex = history.index;\n try {\n if (nextIndex !== -1 && nextIndex < currentIndex && // We should only go back if the entry exists and it's less than current index\n history.get(nextIndex - currentIndex)) {\n await history.go(nextIndex - currentIndex);\n } else {\n await history.go(historyDelta);\n }\n history.replace({ path, state });\n } catch (e) {\n }\n } else {\n history.replace({ path, state, displayPath, unmaskOnReload });\n }\n } else {\n history.replace({ path, state, displayPath, unmaskOnReload });\n }\n };\n return ref.current?.addListener(\"state\", series(onStateChange));\n }, [enabled, history, ref]);\n return {\n getInitialState\n };\n}\nexport {\n series,\n useLinking\n};\n//# sourceMappingURL=useLinking.js.map\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,mBAAmB,UAAU;CACjC,IA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W,eAAe,SAAS,QAAQ,eAAe,gBAAgB;KAChF,IAAI,UAAU;MACZ,QAAQ,QAAQ;OAAE;OAAM;OAAO;OAAa;MAAe,CAAC;KAC9D,OAAO;MACL,QAAQ,KAAK;OAAE;OAAM;OAAO;OAAa;MAAe,CAAC;KAC3D;IACF,OAAO,IAAI,eAAe,GAAG;KAC3B,MAAM,YAAY,QAAQ,UAAU,EAAE,KAAK,CAAC;KAC5C,MAAM,eAAe,QAAQ;KAC7B,IAAI;MACF,IAAI,cAAc,CAAC,KAAK,YAAY,gBACpC,QAAQ,IAAI,YAAY,YAAY,GAAG;OACrC,MAAM,QAAQ,GAAG,YAAY,YAAY;MAC3C,OAAO;OACL,MAAM,QAAQ,GAAG,YAAY;MAC/B;MACA,QAAQ,QAAQ;OAAE;OAAM;MAAM,CAAC;KACjC,SAAS,GAAG,CACZ;IACF,OAAO;KACL,QAAQ,QAAQ;MAAE;MAAM;MAAO;MAAa;KAAe,CAAC;IAC9D;GACF,OAAO;IACL,QAAQ,QAAQ;KAAE;KAAM;KAAO;KAAa;IAAe,CAAC;GAC9D;EACF;EACA,OAAO,IAAI,SAAS,YAAY,SAAS,OAAO,aAAa,CAAC;CAChE,GAAG;EAAC;EAAS;EAAS;CAAG,CAAC;CAC1B,OAAO,EACL,gBACF;AACF"}
|
|
1
|
+
{"version":3,"file":"useLinking.js","names":["getStateFromPathDefault","getPathFromStateDefault","getActionFromStateDefault","getStateFromPath","getPathFromState","getActionFromState","routerRootState"],"sources":["esm/fork/useLinking.js"],"sourcesContent":["import {\n findFocusedRoute,\n getActionFromState as getActionFromStateDefault,\n getPathFromState as getPathFromStateDefault,\n useNavigationIndependentTree\n} from \"@react-navigation/core\";\nimport { getStateFromPath as getStateFromPathDefault } from \"./getStateFromPath\";\nimport isEqual from \"fast-deep-equal\";\nimport * as React from \"react\";\nimport { stripGroupSegmentsFromPath } from \"../router/matchers\";\nimport {\n setNavigationType,\n isReturningFromIntercept,\n setReturningFromIntercept,\n restoreInterceptFromHistory\n} from \"../router/interceptRoutes\";\nimport {\n consumePendingNavigationAction,\n rootState as routerRootState,\n routeNode\n} from \"../router/router\";\nimport { isStateAwaitingNavigatorMount } from \"../router/isStateAwaitingNavigatorMount\";\nimport { ServerLocationContext } from \"../router/serverLocationContext\";\nimport { clearAllSlotStates } from \"../views/Navigator\";\nimport { createMemoryHistory } from \"./createMemoryHistory\";\nimport { appendBaseUrl } from \"./getPathFromState-mods\";\nconst getPartialState = (state) => {\n if (!state) return void 0;\n const { key, routeNames, stale, routes, ...partial } = state;\n return {\n ...partial,\n stale: true,\n routes: routes.map(({ key: routeKey, state: childState, ...route }) => ({\n ...route,\n ...childState ? { state: getPartialState(childState) } : null\n }))\n };\n};\nfunction getFocusedRouteDepth(state) {\n const length = getTotalHistoryLength(state);\n const focusedRoute = state.routes[state.index];\n const child = focusedRoute?.state;\n if (child) {\n return length + getFocusedRouteDepth(child);\n }\n return length;\n}\nconst getTotalHistoryLength = (state) => {\n const activeRoutes = state.routes.slice(0, state.index + 1);\n const baseHistoryLength = state.history ? state.history.length : activeRoutes.length;\n const routeHistoryLength = activeRoutes.reduce((acc, r) => {\n return acc + (r.history ? r.history.length : 0);\n }, 0);\n return baseHistoryLength + routeHistoryLength;\n};\nfunction getDynamicParamNames(routeName) {\n return Array.from(routeName.matchAll(/\\[(?:\\.\\.\\.)?([^\\]]+)\\]/g), (match) => match[1]);\n}\nfunction hasMissingDynamicParams(route) {\n if (!route) return false;\n const dynamicParamNames = getDynamicParamNames(route.name);\n if (dynamicParamNames.length === 0) return false;\n return dynamicParamNames.some((name) => route.params?.[name] == null);\n}\nfunction currentUrlHasDynamicParams(route, getStateFromPath, config) {\n const currentPath = window.location.pathname + window.location.search;\n const currentState = getStateFromPath(currentPath, config);\n const currentRoute = currentState ? findFocusedRoute(currentState) : void 0;\n return currentRoute?.name === route.name && !hasMissingDynamicParams(currentRoute);\n}\nconst findMatchingState = (a, b) => {\n if (a === void 0 || b === void 0 || a.key !== b.key) {\n return [void 0, void 0];\n }\n const aHistoryLength = getTotalHistoryLength(a);\n const bHistoryLength = getTotalHistoryLength(b);\n const aRoute = a.routes[a.index];\n const bRoute = b.routes[b.index];\n const aChildState = aRoute.state;\n const bChildState = bRoute.state;\n if (aHistoryLength !== bHistoryLength || aRoute.key !== bRoute.key || aChildState === void 0 || bChildState === void 0 || aChildState.key !== bChildState.key || (aRoute.history?.length || 0) !== (bRoute.history?.length || 0)) {\n return [a, b];\n }\n return findMatchingState(aChildState, bChildState);\n};\nconst series = (cb) => {\n let queue = Promise.resolve();\n const callback = () => {\n queue = queue.then(cb);\n };\n return callback;\n};\nconst linkingHandlers = /* @__PURE__ */ new Set();\nfunction useLinking(ref, {\n enabled = true,\n config,\n getStateFromPath = getStateFromPathDefault,\n getPathFromState = getPathFromStateDefault,\n getActionFromState = getActionFromStateDefault\n}) {\n if (typeof window === \"undefined\") {\n const getInitialState2 = React.useCallback(() => {\n return {\n then(fn) {\n return Promise.resolve(fn ? fn(void 0) : void 0);\n },\n catch() {\n return this;\n }\n };\n }, []);\n return { getInitialState: getInitialState2 };\n }\n const independent = useNavigationIndependentTree();\n React.useEffect(() => {\n if (process.env.NODE_ENV === \"production\") {\n return void 0;\n }\n if (independent) {\n return void 0;\n }\n if (enabled !== false && linkingHandlers.size) {\n console.error(\n [\n \"Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:\",\n \"- You don't have multiple NavigationContainers in the app each with 'linking' enabled\",\n \"- Only a single instance of the root component is rendered\"\n ].join(\"\\n\").trim()\n );\n }\n const handler = /* @__PURE__ */ Symbol();\n if (enabled !== false) {\n linkingHandlers.add(handler);\n }\n return () => {\n linkingHandlers.delete(handler);\n };\n }, [enabled, independent]);\n const [history] = React.useState(createMemoryHistory);\n const enabledRef = React.useRef(enabled);\n const configRef = React.useRef(config);\n const getStateFromPathRef = React.useRef(getStateFromPath);\n const getPathFromStateRef = React.useRef(getPathFromState);\n const getActionFromStateRef = React.useRef(getActionFromState);\n const restoringFromTempLocationRef = React.useRef(false);\n const initialHistorySetupDoneRef = React.useRef(false);\n const maskedDisplayPathRef = React.useRef(void 0);\n React.useEffect(() => {\n enabledRef.current = enabled;\n configRef.current = config;\n getStateFromPathRef.current = getStateFromPath;\n getPathFromStateRef.current = getPathFromState;\n getActionFromStateRef.current = getActionFromState;\n });\n const validateRoutesNotExistInRootState = React.useCallback(\n (state) => {\n const navigation = ref.current;\n const rootState = navigation?.getRootState();\n const routeNames = rootState?.routeNames;\n if (!routeNames) {\n return false;\n }\n return state?.routes.some((r) => !routeNames.includes(r.name));\n },\n [ref]\n );\n const location = React.useContext(ServerLocationContext);\n const server = { location };\n const getInitialState = React.useCallback(() => {\n setNavigationType(\"hard\");\n clearAllSlotStates();\n let value;\n if (enabledRef.current) {\n const location2 = server?.location ?? (typeof window !== \"undefined\" ? window.location : void 0);\n let path = location2 ? location2.pathname + location2.search + (location2.hash ?? \"\") : void 0;\n if (location2 && typeof window !== \"undefined\") {\n const historyState = window.history.state;\n if (historyState) {\n const { __tempLocation, __tempKey } = historyState;\n if (__tempLocation?.pathname && !__tempKey) {\n path = __tempLocation.pathname + (__tempLocation.search || \"\") + (__tempLocation.hash || \"\");\n restoringFromTempLocationRef.current = true;\n }\n }\n }\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F50D} getInitialState path=${path}`);\n }\n if (path) {\n value = getStateFromPathRef.current(path, configRef.current);\n }\n }\n const thenable = {\n // biome-ignore lint/suspicious/noThenProperty: don't check copied code\n then(onfulfilled) {\n return Promise.resolve(onfulfilled ? onfulfilled(value) : value);\n },\n catch() {\n return thenable;\n }\n };\n return thenable;\n }, []);\n const previousIndexRef = React.useRef(void 0);\n const previousStateRef = React.useRef(void 0);\n const pendingPopStatePathRef = React.useRef(void 0);\n React.useEffect(() => {\n previousIndexRef.current = history.index;\n return history.listen(() => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n if (isReturningFromIntercept()) {\n setReturningFromIntercept(false);\n clearAllSlotStates();\n return;\n }\n if (restoreInterceptFromHistory()) {\n return;\n }\n setNavigationType(\"hard\");\n clearAllSlotStates();\n maskedDisplayPathRef.current = void 0;\n const { location: location2 } = window;\n const path = location2.pathname + location2.search;\n const index = history.index;\n const previousIndex = previousIndexRef.current ?? 0;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} history.listen path=${path} index=${index} prevIndex=${previousIndex}`\n );\n }\n previousIndexRef.current = index;\n pendingPopStatePathRef.current = path + location2.hash;\n const record = history.get(index);\n const pathMatches = record?.path === path || record?.displayPath === path;\n if (pathMatches && record?.state) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} history record found, resetRoot to:`, record.state);\n }\n navigation.resetRoot(getPartialState(record.state));\n return;\n }\n const state = getStateFromPathRef.current(path, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getStateFromPath result:`, state);\n }\n if (state) {\n if (validateRoutesNotExistInRootState(state)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} routes not in root state, skipping`);\n }\n return;\n }\n if (index > previousIndex || index === previousIndex && (!record || `${record?.path}${location2.hash}` === path)) {\n const action = getActionFromStateRef.current(state, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} dispatching action:`, action);\n }\n if (action !== void 0) {\n try {\n navigation.dispatch(action);\n } catch (e) {\n console.warn(\n `An error occurred when trying to handle the link '${path}': ${typeof e === \"object\" && e != null && \"message\" in e ? e.message : e}`\n );\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} no action, resetRoot`);\n }\n navigation.resetRoot(state);\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} going back, resetRoot`);\n }\n navigation.resetRoot(state);\n }\n } else {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} no state for path, resetRoot to undefined`);\n }\n navigation.resetRoot(state);\n }\n });\n }, [enabled, history, ref, validateRoutesNotExistInRootState]);\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n const getPathForRoute = (route, state) => {\n let path;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getPathForRoute - route:`, route);\n console.info(`[one] \\u{1F4DC} getPathForRoute - state:`, JSON.stringify(state, null, 2));\n }\n if (route?.path) {\n const stateForPath = getStateFromPathRef.current(route.path, configRef.current);\n if (stateForPath) {\n const focusedRoute = findFocusedRoute(stateForPath);\n if (focusedRoute && focusedRoute.name === route.name && isEqual(focusedRoute.params, route.params)) {\n path = appendBaseUrl(route.path);\n }\n }\n }\n if (path == null) {\n path = getPathFromStateRef.current(state, configRef.current);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} getPathForRoute - computed from state:`, path);\n }\n }\n return path;\n };\n if (ref.current) {\n const refState = ref.current.getRootState();\n const state = routerRootState || refState;\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} useEffect initial state check - refState:`,\n JSON.stringify(refState, null, 2)\n );\n console.info(\n `[one] \\u{1F4DC} useEffect initial state check - routerRootState:`,\n JSON.stringify(routerRootState, null, 2)\n );\n }\n if (state) {\n const route = findFocusedRoute(state);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(`[one] \\u{1F4DC} useEffect focused route:`, route);\n }\n const path = getPathForRoute(route, state);\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} initial history.replace - state:`,\n JSON.stringify(state, null, 2)\n );\n console.info(`[one] \\u{1F4DC} initial history.replace - focusedRoute:`, route);\n console.info(`[one] \\u{1F4DC} initial history.replace - computed path:`, path);\n }\n if (previousStateRef.current === void 0) {\n previousStateRef.current = refState;\n }\n if (!initialHistorySetupDoneRef.current) {\n const historyState = window.history.state;\n const isRestoringFromMask = restoringFromTempLocationRef.current || historyState?.__tempLocation?.pathname && !historyState.__tempKey;\n if (isRestoringFromMask) {\n const displayPath = window.location.pathname + window.location.search;\n history.replace({ path, state, displayPath });\n restoringFromTempLocationRef.current = false;\n maskedDisplayPathRef.current = { displayPath, actualPath: path };\n } else {\n history.replace({ path, state });\n }\n initialHistorySetupDoneRef.current = true;\n }\n }\n }\n const onStateChange = async () => {\n const navigation = ref.current;\n if (!navigation || !enabled) {\n return;\n }\n const previousState = previousStateRef.current;\n const refState = navigation.getRootState();\n const state = routerRootState || refState;\n if (!state) {\n return;\n }\n const pendingPath = pendingPopStatePathRef.current;\n const route = findFocusedRoute(state);\n if (isStateAwaitingNavigatorMount(state, routeNode)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} onStateChange - skipping: navigator below`,\n route?.name,\n `has not mounted`\n );\n }\n return;\n }\n if (route && hasMissingDynamicParams(route) && currentUrlHasDynamicParams(route, getStateFromPathRef.current, configRef.current)) {\n if (process.env.ONE_DEBUG_ROUTER) {\n console.info(\n `[one] \\u{1F4DC} onStateChange - skipping: focused dynamic route is missing params`,\n route.name\n );\n }\n return;\n }\n let path = getPathForRoute(route, state);\n const pendingNavigationAction = consumePendingNavigationAction();\n if (typeof window !== \"undefined\" && !route?.params && !pendingNavigationAction) {\n const currentSearch = window.location.search;\n if (currentSearch && !path.includes(\"?\") && window.location.pathname === path) {\n path = path + currentSearch;\n }\n }\n if (typeof window !== \"undefined\" && !pendingNavigationAction) {\n const { pathname, search, hash } = window.location;\n if (hash && pathname + search === path) {\n path = path + hash;\n }\n }\n const maskOptions = state.linkOptions?.mask;\n const maskHref = maskOptions?.href;\n const maskedInfo = maskedDisplayPathRef.current;\n let displayPath;\n if (maskedInfo) {\n if (path === maskedInfo.actualPath) {\n displayPath = maskedInfo.displayPath;\n }\n maskedDisplayPathRef.current = void 0;\n }\n if (!displayPath && maskHref) {\n displayPath = appendBaseUrl(stripGroupSegmentsFromPath(maskHref) || \"/\");\n }\n const unmaskOnReload = maskOptions?.unmaskOnReload;\n previousStateRef.current = refState;\n pendingPopStatePathRef.current = void 0;\n if (pendingNavigationAction === \"PUSH\" && path !== pendingPath) {\n history.push({ path, state, displayPath, unmaskOnReload });\n return;\n }\n if (pendingNavigationAction === \"REPLACE\" && path !== pendingPath) {\n history.replace({ path, state, displayPath, unmaskOnReload });\n return;\n }\n const [previousFocusedState, focusedState] = findMatchingState(previousState, state);\n if (previousFocusedState && focusedState && // We should only handle push/pop if path changed from what was in last `popstate`\n // Otherwise it's likely a change triggered by `popstate`\n path !== pendingPath) {\n const historyDelta = getFocusedRouteDepth(focusedState) - getFocusedRouteDepth(previousFocusedState);\n if (historyDelta > 0) {\n const currentRecord = history.get(history.index);\n const samePath = currentRecord?.path === path || currentRecord?.displayPath === path;\n if (samePath) {\n history.replace({ path, state, displayPath, unmaskOnReload });\n } else {\n history.push({ path, state, displayPath, unmaskOnReload });\n }\n } else if (historyDelta < 0) {\n const nextIndex = history.backIndex({ path });\n const currentIndex = history.index;\n try {\n if (nextIndex !== -1 && nextIndex < currentIndex && // We should only go back if the entry exists and it's less than current index\n history.get(nextIndex - currentIndex)) {\n await history.go(nextIndex - currentIndex);\n } else {\n await history.go(historyDelta);\n }\n history.replace({ path, state });\n } catch (e) {\n }\n } else {\n history.replace({ path, state, displayPath, unmaskOnReload });\n }\n } else {\n history.replace({ path, state, displayPath, unmaskOnReload });\n }\n };\n return ref.current?.addListener(\"state\", series(onStateChange));\n }, [enabled, history, ref]);\n return {\n getInitialState\n };\n}\nexport {\n series,\n useLinking\n};\n//# sourceMappingURL=useLinking.js.map\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAM,mBAAmB,UAAU;CACjC,IAAI,CAAC,OAAO,OAAO,KAAK;CACxB,MAAM,EAAE,KAAK,YAAY,OAAO,QAAQ,GAAG,YAAY;CACvD,OAAO;EACL,GAAG;EACH,OAAO;EACP,QAAQ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Q,IAAI,QAAQ,KAAK;KAC/C,MAAM,WAAW,eAAe,SAAS,QAAQ,eAAe,gBAAgB;KAChF,IAAI,UAAU;MACZ,QAAQ,QAAQ;OAAE;OAAM;OAAO;OAAa;MAAe,CAAC;KAC9D,OAAO;MACL,QAAQ,KAAK;OAAE;OAAM;OAAO;OAAa;MAAe,CAAC;KAC3D;IACF,OAAO,IAAI,eAAe,GAAG;KAC3B,MAAM,YAAY,QAAQ,UAAU,EAAE,KAAK,CAAC;KAC5C,MAAM,eAAe,QAAQ;KAC7B,IAAI;MACF,IAAI,cAAc,CAAC,KAAK,YAAY,gBACpC,QAAQ,IAAI,YAAY,YAAY,GAAG;OACrC,MAAM,QAAQ,GAAG,YAAY,YAAY;MAC3C,OAAO;OACL,MAAM,QAAQ,GAAG,YAAY;MAC/B;MACA,QAAQ,QAAQ;OAAE;OAAM;MAAM,CAAC;KACjC,SAAS,GAAG,CACZ;IACF,OAAO;KACL,QAAQ,QAAQ;MAAE;MAAM;MAAO;MAAa;KAAe,CAAC;IAC9D;GACF,OAAO;IACL,QAAQ,QAAQ;KAAE;KAAM;KAAO;KAAa;IAAe,CAAC;GAC9D;EACF;EACA,OAAO,IAAI,SAAS,YAAY,SAAS,OAAO,aAAa,CAAC;CAChE,GAAG;EAAC;EAAS;EAAS;CAAG,CAAC;CAC1B,OAAO,EACL,gBACF;AACF"}
|
|
@@ -25,9 +25,16 @@ function getCurrentPosition() {
|
|
|
25
25
|
}
|
|
26
26
|
function watchPosition(onPosition, onError) {
|
|
27
27
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var active = true;
|
|
29
|
+
var remove = native().addPositionListener(function(position) {
|
|
30
|
+
if (active) onPosition(position);
|
|
31
|
+
}, function(code, message) {
|
|
32
|
+
if (active) onError(Object.assign(new Error(message), { code }));
|
|
30
33
|
}, options.background === true);
|
|
34
|
+
return function() {
|
|
35
|
+
active = false;
|
|
36
|
+
remove();
|
|
37
|
+
};
|
|
31
38
|
}
|
|
32
39
|
function geocodeAddress(address) {
|
|
33
40
|
return native().geocodeAddress(address).catch(rethrowNativeError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":[],"sources":["esm/platform/location/index.native.js"],"sourcesContent":["import { NitroModules } from \"react-native-nitro-modules\";\nimport { rethrowNativeError } from \"../nativeError\";\nimport { assertIdentifier, assertRegion, assertRegionListener } from \"./validation\";\nvar hybrid;\nfunction native() {\n hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = NitroModules.createHybridObject(\"OneLocation\");\n return hybrid;\n}\nfunction getPermissionStatus() {\n try {\n return native().getPermissionStatus();\n } catch (error) {\n return rethrowNativeError(error);\n }\n}\nfunction requestWhenInUsePermission() {\n return native().requestWhenInUsePermission().catch(rethrowNativeError);\n}\nfunction requestAlwaysAuthorization() {\n return native().requestAlwaysAuthorization().catch(rethrowNativeError);\n}\nfunction getCurrentPosition() {\n return native().getCurrentPosition().catch(rethrowNativeError);\n}\nfunction watchPosition(onPosition, onError) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["esm/platform/location/index.native.js"],"sourcesContent":["import { NitroModules } from \"react-native-nitro-modules\";\nimport { rethrowNativeError } from \"../nativeError\";\nimport { assertIdentifier, assertRegion, assertRegionListener } from \"./validation\";\nvar hybrid;\nfunction native() {\n hybrid !== null && hybrid !== void 0 ? hybrid : hybrid = NitroModules.createHybridObject(\"OneLocation\");\n return hybrid;\n}\nfunction getPermissionStatus() {\n try {\n return native().getPermissionStatus();\n } catch (error) {\n return rethrowNativeError(error);\n }\n}\nfunction requestWhenInUsePermission() {\n return native().requestWhenInUsePermission().catch(rethrowNativeError);\n}\nfunction requestAlwaysAuthorization() {\n return native().requestAlwaysAuthorization().catch(rethrowNativeError);\n}\nfunction getCurrentPosition() {\n return native().getCurrentPosition().catch(rethrowNativeError);\n}\nfunction watchPosition(onPosition, onError) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n var active = true;\n var remove = native().addPositionListener(function(position) {\n if (active) onPosition(position);\n }, function(code, message) {\n if (active) onError(Object.assign(new Error(message), {\n code\n }));\n }, options.background === true);\n return function() {\n active = false;\n remove();\n };\n}\nfunction geocodeAddress(address) {\n return native().geocodeAddress(address).catch(rethrowNativeError);\n}\nfunction reverseGeocode(latitude, longitude) {\n return native().reverseGeocode(latitude, longitude).catch(rethrowNativeError);\n}\nfunction startMonitoring(region) {\n assertRegion(region, \"startMonitoring\");\n return native().startMonitoring(region).catch(rethrowNativeError);\n}\nfunction stopMonitoring(identifier) {\n assertIdentifier(identifier, \"stopMonitoring\");\n return native().stopMonitoring(identifier).catch(rethrowNativeError);\n}\nfunction monitoredRegions() {\n try {\n return native().monitoredRegions();\n } catch (error) {\n return rethrowNativeError(error);\n }\n}\nfunction requestState(identifier) {\n assertIdentifier(identifier, \"requestState\");\n return native().requestState(identifier).catch(rethrowNativeError);\n}\nfunction addDidEnterRegionListener(listener) {\n assertRegionListener(listener, \"addDidEnterRegionListener\");\n var remove = native().addDidEnterRegionListener(listener);\n return {\n remove: function remove1() {\n return remove();\n }\n };\n}\nfunction addDidExitRegionListener(listener) {\n assertRegionListener(listener, \"addDidExitRegionListener\");\n var remove = native().addDidExitRegionListener(listener);\n return {\n remove: function remove1() {\n return remove();\n }\n };\n}\nvar Location = Object.freeze({\n getPermissionStatus,\n requestWhenInUsePermission,\n requestAlwaysAuthorization,\n getCurrentPosition,\n watchPosition,\n geocodeAddress,\n reverseGeocode,\n startMonitoring,\n stopMonitoring,\n monitoredRegions,\n requestState,\n addDidEnterRegionListener,\n addDidExitRegionListener\n});\nexport {\n Location\n};\n//# sourceMappingURL=index.native.js.map\n"],"mappings":";;;;;AAGA,IAAI;AACJ,SAAS,SAAS;CAChB,WAAW,QAAQ,WAAW,KAAK,IAAI,SAAS,SAAS,aAAa,mBAAm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AC7C,OAAO,OAAO,CAAC,CAAC,eAAe,UAAU,CAAC,CAAC,MAAM,kBAAkB;AACrE;AACA,SAAS,mBAAmB;CAC1B,IAAI;EACF,OAAO,OAAO,CAAC,CAAC,iBAAiB;CACnC,SAAS,OAAO;EACd,OAAO,mBAAmB,KAAK;CACjC;AACF;AACA,SAAS,aAAa,YAAY;CAChC,iBAAiB,YAAY,cAAc;CAC3C,OAAO,OAAO,CAAC,CAAC,aAAa,UAAU,CAAC,CAAC,MAAM,kBAAkB;AACnE;AACA,SAAS,0BAA0B,UAAU;CAC3C,qBAAqB,UAAU,2BAA2B;CAC1D,IAAI,SAAS,OAAO,CAAC,CAAC,0BAA0B,QAAQ;CACxD,OAAO,EACL,QAAQ,SAAS,UAAU;EACzB,OAAO,OAAO;CAChB,EACF;AACF;AACA,SAAS,yBAAyB,UAAU;CAC1C,qBAAqB,UAAU,0BAA0B;CACzD,IAAI,SAAS,OAAO,CAAC,CAAC,yBAAyB,QAAQ;CACvD,OAAO,EACL,QAAQ,SAAS,UAAU;EACzB,OAAO,OAAO;CAChB,EACF;AACF;AACA,IAAI,WAAW,OAAO,OAAO;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC"}
|
|
@@ -613,7 +613,6 @@ function initClientMatches(matches) {
|
|
|
613
613
|
async function linkTo(href, event, options) {
|
|
614
614
|
if (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \u{1F517} ${event || "NAVIGATE"} ${href}`);
|
|
615
615
|
setNavigationType("soft");
|
|
616
|
-
clearNotFoundState();
|
|
617
616
|
if (href[0] === "#") return;
|
|
618
617
|
if (shouldLinkExternally(href)) {
|
|
619
618
|
openExternalURL(href);
|
|
@@ -639,6 +638,7 @@ async function linkTo(href, event, options) {
|
|
|
639
638
|
const scopedSlotKey = `${layoutContextKey}:${slotName}`;
|
|
640
639
|
storeInterceptState(scopedSlotKey, interceptRoute, params2);
|
|
641
640
|
updateURLWithoutNavigation(href);
|
|
641
|
+
clearNotFoundState();
|
|
642
642
|
setSlotState(scopedSlotKey, {
|
|
643
643
|
activeRouteKey: interceptRoute.contextKey,
|
|
644
644
|
activeRouteNode: interceptRoute,
|
|
@@ -654,6 +654,7 @@ async function linkTo(href, event, options) {
|
|
|
654
654
|
if (!linking) throw new Error("Attempted to link to route when no routes are present");
|
|
655
655
|
setLastAction();
|
|
656
656
|
if (href === ".." || href === "../") {
|
|
657
|
+
clearNotFoundState();
|
|
657
658
|
current.goBack();
|
|
658
659
|
return;
|
|
659
660
|
}
|
|
@@ -778,6 +779,7 @@ async function linkTo(href, event, options) {
|
|
|
778
779
|
const currentRootState = navigationRef.getRootState();
|
|
779
780
|
const hash = href.indexOf("#");
|
|
780
781
|
if (currentRootState?.key && hash > 0) hashes[currentRootState.key] = href.slice(hash);
|
|
782
|
+
clearNotFoundState();
|
|
781
783
|
nextOptions = options ?? null;
|
|
782
784
|
pendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));
|
|
783
785
|
pendingNavigationAction = event === "PUSH" || event === "REPLACE" || event === "NAVIGATE" ? event : void 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, isLoaderBadRequest, splitLoaderKey, toLoaderKey } 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, void 0, splitLoaderKey(normalizedPath)[1]);\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, void 0, void 0, splitLoaderKey(normalizeLoaderPath(href))[1]);\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\t{\n\t\tif (!shouldPreloadRoute(href)) return;\n\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\t\tdelete preloadingLoader[normalizedHref];\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\t\treturn data;\n\t\t\t}));\n\t\t\treturn preloadingLoader[normalizedHref];\n\t\t}\n\t\tconst preloadKey = splitLoaderKey(normalizeLoaderPath(href))[1] ? normalizeLoaderPath(href) : href;\n\t\tif (!preloadingLoader[preloadKey]) setBoundedPreloadRecord(preloadingLoader, preloadKey, doPreload(href).then((data) => {\n\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, preloadKey, data);\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\tthrow err;\n\t\t}));\n\t\treturn preloadingLoader[preloadKey]?.then(async (data) => {\n\t\t\tif (injectCSS) {\n\t\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t\t}\n\t\t\treturn data;\n\t\t}, (err) => {\n\t\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\t\twindow.location.href = href;\n\t\t\t\treturn new Promise(() => {});\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n}\nfunction isSsrHref(href) {\n\tconst linking = getResolvedLinking();\n\tif (!linking?.getStateFromPath || !routeNode) return false;\n\treturn findRouteNodeFromState(linking.getStateFromPath(href, linking.config), routeNode)?.type === \"ssr\";\n}\nfunction normalizeLoaderPath(href) {\n\tconst url = new URL(href, \"http://example.com\");\n\tconst path = url.pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n\treturn url.search && isSsrHref(href) ? toLoaderKey(path, url.search) : path;\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)) {\n\t\tif (isLoaderBadRequest(await preloadRoute(href, true))) {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t\twindow.location.assign(href);\n\t\t\treturn;\n\t\t}\n\t} else 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, normalizeLoaderPath, 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,IAAI,iBAAiB,IAAI,mBAAmB,GAAG,OAAO,iBAAiB,IAAI,mBAAmB;EAC/F;CACD;CACA,OAAO;AACR;AACA,SAAS,qBAAqB,MAAM;CACnC,IAAI,SAAS;CACb,MAAM,0B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AAI,MAAM,GAAG,OAAO;CACpB,IAAI,MAAM,QAAQ,CAAC,KAAK,MAAM,QAAQ,CAAC,GAAG;EACzC,IAAI,EAAE,WAAW,EAAE,QAAQ,OAAO;EAClC,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, isLoaderBadRequest, splitLoaderKey, toLoaderKey } 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, void 0, splitLoaderKey(normalizedPath)[1]);\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, void 0, void 0, splitLoaderKey(normalizeLoaderPath(href))[1]);\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\t{\n\t\tif (!shouldPreloadRoute(href)) return;\n\t\tif (process.env.NODE_ENV === \"development\") {\n\t\t\tconst normalizedHref = normalizeLoaderPath(href);\n\t\t\tif (!preloadingLoader[normalizedHref]) setBoundedPreloadRecord(preloadingLoader, normalizedHref, doPreloadDev(href).then((data) => {\n\t\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\t\tdelete preloadingLoader[normalizedHref];\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\t\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, normalizedHref, data);\n\t\t\t\treturn data;\n\t\t\t}));\n\t\t\treturn preloadingLoader[normalizedHref];\n\t\t}\n\t\tconst preloadKey = splitLoaderKey(normalizeLoaderPath(href))[1] ? normalizeLoaderPath(href) : href;\n\t\tif (!preloadingLoader[preloadKey]) setBoundedPreloadRecord(preloadingLoader, preloadKey, doPreload(href).then((data) => {\n\t\t\tif (isLoaderBadRequest(data)) {\n\t\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\tsetBoundedPreloadRecord(preloadedLoaderData, preloadKey, data);\n\t\t\treturn data;\n\t\t}).catch((err) => {\n\t\t\tdelete preloadingLoader[preloadKey];\n\t\t\tthrow err;\n\t\t}));\n\t\treturn preloadingLoader[preloadKey]?.then(async (data) => {\n\t\t\tif (injectCSS) {\n\t\t\t\tconst inject = cssInjectFunctions[href];\n\t\t\t\tif (inject) await Promise.race([inject(), new Promise((r) => setTimeout(r, 800))]);\n\t\t\t}\n\t\t\treturn data;\n\t\t}, (err) => {\n\t\t\tif (injectCSS && process.env.ONE_SKEW_PROTECTION !== \"false\" && isChunkLoadError(err)) {\n\t\t\t\twindow.location.href = href;\n\t\t\t\treturn new Promise(() => {});\n\t\t\t}\n\t\t\treturn null;\n\t\t});\n\t}\n}\nfunction isSsrHref(href) {\n\tconst linking = getResolvedLinking();\n\tif (!linking?.getStateFromPath || !routeNode) return false;\n\treturn findRouteNodeFromState(linking.getStateFromPath(href, linking.config), routeNode)?.type === \"ssr\";\n}\nfunction normalizeLoaderPath(href) {\n\tconst url = new URL(href, \"http://example.com\");\n\tconst path = url.pathname.replace(/\\/index$/, \"\").replace(/\\/$/, \"\") || \"/\";\n\treturn url.search && isSsrHref(href) ? toLoaderKey(path, url.search) : path;\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\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\tclearNotFoundState();\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\tclearNotFoundState();\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)) {\n\t\tif (isLoaderBadRequest(await preloadRoute(href, true))) {\n\t\t\tsetLoadingState(\"loaded\");\n\t\t\twindow.location.assign(href);\n\t\t\treturn;\n\t\t}\n\t} else 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\tclearNotFoundState();\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, normalizeLoaderPath, 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,IAAI,iBAAiB,IAAI,mBAAmB,GAAG,OAAO,iBAAiB,IAAI,mBAAmB;EAC/F;CACD;CACA,OAAO;AACR;AACA,SAAS,qBAAqB,MAAM;CACnC,IAAI,SAAS;CACb,MAAM,0BAA0B,IAAI,IAAI;CACxC,OAAO,CAAC,QAAQ,IAAI,MAAM,GAAG;EAC5B,QAAQ,IAAI,MAAM;EAClB,MAAM,aAAa,qBAAqB,MAAM;EAC9C,IAAI,eAA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,EAAE,QAAQ,OAAO;EAClC,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"}
|
|
@@ -578,7 +578,6 @@ function initClientMatches(matches) {
|
|
|
578
578
|
async function linkTo(href, event, options) {
|
|
579
579
|
if (process.env.ONE_DEBUG_ROUTER) console.info(`[one] \u{1F517} ${event || "NAVIGATE"} ${href}`);
|
|
580
580
|
setNavigationType("soft");
|
|
581
|
-
clearNotFoundState();
|
|
582
581
|
if (href[0] === "#") return;
|
|
583
582
|
if (shouldLinkExternally(href)) {
|
|
584
583
|
openExternalURL(href);
|
|
@@ -600,6 +599,7 @@ async function linkTo(href, event, options) {
|
|
|
600
599
|
var scopedSlotKey = `${layoutContextKey}:${slotName}`;
|
|
601
600
|
storeInterceptState(scopedSlotKey, interceptRoute, params);
|
|
602
601
|
updateURLWithoutNavigation(href);
|
|
602
|
+
clearNotFoundState();
|
|
603
603
|
setSlotState(scopedSlotKey, {
|
|
604
604
|
activeRouteKey: interceptRoute.contextKey,
|
|
605
605
|
activeRouteNode: interceptRoute,
|
|
@@ -615,6 +615,7 @@ async function linkTo(href, event, options) {
|
|
|
615
615
|
if (!linking) throw new Error("Attempted to link to route when no routes are present");
|
|
616
616
|
setLastAction();
|
|
617
617
|
if (href === ".." || href === "../") {
|
|
618
|
+
clearNotFoundState();
|
|
618
619
|
current.goBack();
|
|
619
620
|
return;
|
|
620
621
|
}
|
|
@@ -747,6 +748,7 @@ async function linkTo(href, event, options) {
|
|
|
747
748
|
var currentRootState = navigationRef.getRootState();
|
|
748
749
|
var hash = href.indexOf("#");
|
|
749
750
|
if ((currentRootState === null || currentRootState === void 0 ? void 0 : currentRootState.key) && hash > 0) hashes[currentRootState.key] = href.slice(hash);
|
|
751
|
+
clearNotFoundState();
|
|
750
752
|
nextOptions = options !== null && options !== void 0 ? options : null;
|
|
751
753
|
pendingNavigationPathname = stripTrailingSlash(extractPathnameFromHref(href));
|
|
752
754
|
pendingNavigationAction = event === "PUSH" || event === "REPLACE" || event === "NAVIGATE" ? event : void 0;
|