ui5-lib-guard-router 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/.ui5 → .ui5}/build-manifest.json +56 -8
- package/CHANGELOG.md +190 -0
- package/README.md +695 -327
- package/dist/index.d.ts +9 -5
- package/dist/resources/ui5/guard/router/.library +1 -1
- package/dist/resources/ui5/guard/router/GuardConfig-dbg.js +222 -0
- package/dist/resources/ui5/guard/router/GuardConfig-dbg.js.map +1 -0
- package/dist/resources/ui5/guard/router/GuardConfig.d.ts +89 -0
- package/dist/resources/ui5/guard/router/GuardConfig.d.ts.map +1 -0
- package/dist/resources/ui5/guard/router/GuardConfig.js +2 -0
- package/dist/resources/ui5/guard/router/GuardConfig.js.map +1 -0
- package/dist/resources/ui5/guard/router/GuardModules-dbg.js +253 -0
- package/dist/resources/ui5/guard/router/GuardModules-dbg.js.map +1 -0
- package/dist/resources/ui5/guard/router/GuardModules.d.ts +72 -0
- package/dist/resources/ui5/guard/router/GuardModules.d.ts.map +1 -0
- package/dist/resources/ui5/guard/router/GuardModules.js +2 -0
- package/dist/resources/ui5/guard/router/GuardModules.js.map +1 -0
- package/dist/resources/ui5/guard/router/GuardPipeline-dbg.js +122 -121
- package/dist/resources/ui5/guard/router/GuardPipeline-dbg.js.map +1 -1
- package/dist/resources/ui5/guard/router/GuardPipeline.d.ts +45 -26
- package/dist/resources/ui5/guard/router/GuardPipeline.d.ts.map +1 -1
- package/dist/resources/ui5/guard/router/GuardPipeline.js +1 -1
- package/dist/resources/ui5/guard/router/GuardPipeline.js.map +1 -1
- package/dist/resources/ui5/guard/router/NavigationOutcome-dbg.js +3 -3
- package/dist/resources/ui5/guard/router/NavigationOutcome-dbg.js.map +1 -1
- package/dist/resources/ui5/guard/router/NavigationOutcome.d.ts +3 -3
- package/dist/resources/ui5/guard/router/NavigationOutcome.d.ts.map +1 -1
- package/dist/resources/ui5/guard/router/NavigationOutcome.js.map +1 -1
- package/dist/resources/ui5/guard/router/PatternTree-dbg.js +156 -0
- package/dist/resources/ui5/guard/router/PatternTree-dbg.js.map +1 -0
- package/dist/resources/ui5/guard/router/PatternTree.d.ts +71 -0
- package/dist/resources/ui5/guard/router/PatternTree.d.ts.map +1 -0
- package/dist/resources/ui5/guard/router/PatternTree.js +2 -0
- package/dist/resources/ui5/guard/router/PatternTree.js.map +1 -0
- package/dist/resources/ui5/guard/router/RouteMeta-dbg.js +84 -0
- package/dist/resources/ui5/guard/router/RouteMeta-dbg.js.map +1 -0
- package/dist/resources/ui5/guard/router/RouteMeta.d.ts +33 -0
- package/dist/resources/ui5/guard/router/RouteMeta.d.ts.map +1 -0
- package/dist/resources/ui5/guard/router/RouteMeta.js +2 -0
- package/dist/resources/ui5/guard/router/RouteMeta.js.map +1 -0
- package/dist/resources/ui5/guard/router/Router-dbg.js +882 -1020
- package/dist/resources/ui5/guard/router/Router-dbg.js.map +1 -1
- package/dist/resources/ui5/guard/router/Router.d.ts +360 -211
- package/dist/resources/ui5/guard/router/Router.d.ts.map +1 -1
- package/dist/resources/ui5/guard/router/Router.js +1 -1
- package/dist/resources/ui5/guard/router/Router.js.map +1 -1
- package/dist/resources/ui5/guard/router/library-dbg.js +1 -1
- package/dist/resources/ui5/guard/router/library-dbg.js.map +1 -1
- package/dist/resources/ui5/guard/router/library-preload.js +8 -4
- package/dist/resources/ui5/guard/router/library-preload.js.map +1 -1
- package/dist/resources/ui5/guard/router/library.js +1 -1
- package/dist/resources/ui5/guard/router/library.js.map +1 -1
- package/dist/resources/ui5/guard/router/manifest.json +5 -2
- package/dist/resources/ui5/guard/router/types-dbg.js.map +1 -1
- package/dist/resources/ui5/guard/router/types.d.ts +94 -39
- package/dist/resources/ui5/guard/router/types.d.ts.map +1 -1
- package/package.json +10 -6
- package/src/GuardConfig.ts +272 -0
- package/src/GuardModules.ts +249 -0
- package/src/GuardPipeline.ts +155 -128
- package/src/NavigationOutcome.ts +3 -3
- package/src/PatternTree.ts +145 -0
- package/src/RouteMeta.ts +82 -0
- package/src/Router.ts +1089 -1130
- package/src/manifest.json +5 -2
- package/src/types.ts +79 -22
- package/tsconfig.json +0 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router-dbg.js","names":["NavigationOutcome","_interopRequireDefault","__NavigationOutcome","GuardPipeline","__GuardPipeline","isPromiseLike","HistoryDirection","coreLibrary","routing","LOG_COMPONENT","isRouteGuardConfig","guard","IDLE","kind","isRecord","value","Array","isArray","proto","Object","getPrototypeOf","prototype","isOneOf","values","set","Set","v","has","isUnknownRouteRegistrationPolicy","isNavToPreflightMode","isGuardLoading","isInheritance","OPTIONAL_OR_REST_SEGMENT","stripInlineQuery","seg","mqIdx","indexOf","slice","oqIdx","patternSegments","pattern","split","map","filter","test","isPatternAncestor","ancestorPattern","candidatePattern","ancestorSegments","length","candidateSegments","every","i","candidateSeg","startsWith","resolveGuardModulePath","dotPath","componentNamespace","replace","fullDotPath","parseGuardEntry","entry","hashIndex","rawPath","exportKey","undefined","modulePath","lastSegment","pop","name","guardWarning","detail","Log","warning","resolveModuleExports","moduleExport","descriptorName","moduleName","debug","fn","index","parseInt","Number","isNaN","results","push","entries","resolvedName","key","val","parseGuardDescriptors","guards","JSON","stringify","descriptors","pushEntries","route","type","label","parsed","config","leave","enter","info","DEFAULT_OPTIONS","unknownRouteRegistration","navToPreflight","guardLoading","inheritance","applyOption","raw","target","normalizeGuardRouterOptions","result","MAX_REDIRECT_DEPTH","Router","MobileRouter","extend","constructor","_constructor","args","routes","owner","rest","rawConfig","isRecordConfig","guardRouter","cleanConfig","MobileRouter.prototype.constructor.apply","_options","_pipeline","_currentRoute","_currentHash","_phase","_parseGeneration","_suppressedHash","_settlementResolvers","_lastSettlement","_pendingGuardDescriptors","_sourceDescriptors","_destroyed","_manifestMeta","Map","_runtimeMeta","_resolvedMetaCache","_routeNames","r","keys","routeMeta","routeName","meta","freeze","appConfig","getManifestEntry","id","uniquePaths","d","sap","ui","require","initialize","_initialize","MobileRouter.prototype.initialize.call","expandedDescriptors","_expandGuardDescriptors","_registerLazyGuards","_loadAndRegisterGuards","then","catch","err","error","String","addRoute","_addRoute","oConfig","MobileRouter.prototype.addRoute.apply","includes","clear","getRoute","newPattern","getPattern","newDescriptors","_expandGuardDescriptorsForNewRoute","newName","descriptor","ancestorRoute","_collectRoutePatterns","toSorted","a","b","pa","pb","addGuard","_addGuard","_isFn","addGlobalGuard","removeGuard","_removeGuard","removeGlobalGuard","addRouteGuard","_addRouteGuard","_handleUnknownRouteRegistration","hasHandler","beforeEnter","addEnterGuard","beforeLeave","addLeaveGuard","removeRouteGuard","_removeRouteGuard","removeLeaveGuard","removeEnterGuard","_addLeaveGuard","_resolveNavToArgs","componentTargetInfoOrReplace","replaceOrOptions","options","guardOptions","componentTargetInfo","method","methodName","Error","_removeLeaveGuard","getRouteMeta","_getRouteMeta","_EMPTY_META","cached","get","_resolveInheritedMeta","_resolveFlatMeta","setRouteMeta","_setRouteMeta","navigationSettled","_navigationSettled","Promise","resolve","status","Committed","hash","attachNavigationSettled","_attachNavigationSettled","oData","fnFunction","oListener","attachEvent","detachNavigationSettled","_detachNavigationSettled","detachEvent","_flushSettlement","resolvers","fireEvent","navTo","_navTo","parameters","origin","MobileRouter.prototype.navTo.call","_cancelPendingNavigation","targetHash","getURL","routeInfo","getRouteInfoByHash","toRoute","attempt","skipGuards","_commitNavigation","controller","AbortController","generation","context","_createGuardContext","signal","decision","evaluate","_applyPreflightDecision","bag","_errorNavigation","bReplace","action","_blockNavigation","_startRedirectChain","parse","_parse","newHash","_applyDecision","stop","_stop","MobileRouter.prototype.stop.call","abort","Cancelled","wasRedirect","Redirected","Bypassed","MobileRouter.prototype.parse.call","_redirect","chain","targetName","targetParameters","targetRoute","visited","join","attemptedHash","restoreHash","size","add","settlementBefore","resolvedHash","toHash","toArguments","arguments","fromRoute","fromHash","toMeta","fromMeta","skipLeaveGuards","_applyRedirectDecision","redirectsToCurrentHash","Blocked","_restoreHashIfNeeded","_restoreHash","suppressParse","hashChanger","getHashChanger","replaceHash","Unknown","allRoutes","patternByName","expanded","manifest","runtime","routeEntry","find","ancestors","sort","merged","ancestor","ancestorManifest","assign","ancestorRuntime","ownManifest","ownRuntime","promises","all","exports","_registerGuardFromDescriptor","guardFn","lazyGuard","reject","mod","exp","lazyExpander","destroy","_destroy","MobileRouter.prototype.destroy.call"],"sources":["Router.ts"],"sourcesContent":["import MobileRouter from \"sap/m/routing/Router\";\nimport Log from \"sap/base/Log\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport type { ComponentTargetParameters } from \"sap/ui/core/routing/Router\";\nimport type { $RouteSettings } from \"sap/ui/core/routing/Route\";\nimport type {\n\tGuardFn,\n\tGuardContext,\n\tGuardNavToOptions,\n\tGuardResult,\n\tGuardRedirect,\n\tGuardRouter,\n\tGuardLoading,\n\tInheritance,\n\tLeaveGuardFn,\n\tManifestRouteGuardConfig,\n\tNavToPreflightMode,\n\tNavigationResult,\n\tRouter$NavigationSettledEvent,\n\tRouteGuardConfig,\n\tUnknownRouteRegistrationPolicy,\n} from \"./types\";\nimport NavigationOutcome from \"./NavigationOutcome\";\nimport GuardPipeline, { type GuardDecision, isPromiseLike } from \"./GuardPipeline\";\n\nconst HistoryDirection = coreLibrary.routing.HistoryDirection;\n\nconst LOG_COMPONENT = \"ui5.guard.router.Router\";\n\nfunction isRouteGuardConfig(guard: GuardFn | RouteGuardConfig): guard is RouteGuardConfig {\n\treturn typeof guard === \"object\" && guard !== null;\n}\n\n/** Snapshot of an in-flight navigation being evaluated by the guard pipeline. */\ninterface NavigationAttempt {\n\treadonly hash: string;\n\treadonly route: string;\n\treadonly controller: AbortController;\n\treadonly generation: number;\n}\n\ninterface PhaseIdle {\n\treadonly kind: \"idle\";\n}\n\ninterface PhaseEvaluating {\n\treadonly kind: \"evaluating\";\n\treadonly attempt: NavigationAttempt;\n}\n\ninterface PhaseCommitting {\n\treadonly kind: \"committing\";\n\treadonly hash: string;\n\treadonly route: string;\n\treadonly origin: \"preflight\" | \"redirect\" | \"parse\";\n}\n\ntype RouterPhase = PhaseIdle | PhaseEvaluating | PhaseCommitting;\n\nconst IDLE: PhaseIdle = { kind: \"idle\" };\n\n/** Type guard for plain objects. */\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n\n/** Create a type-narrowing validator for a finite set of string literal values. */\nfunction isOneOf<T extends string>(...values: T[]): (v: unknown) => v is T {\n\tconst set: ReadonlySet<string> = new Set(values);\n\treturn (v: unknown): v is T => typeof v === \"string\" && set.has(v);\n}\n\nconst isUnknownRouteRegistrationPolicy = isOneOf<UnknownRouteRegistrationPolicy>(\"ignore\", \"warn\", \"throw\");\nconst isNavToPreflightMode = isOneOf<NavToPreflightMode>(\"guard\", \"bypass\", \"off\");\nconst isGuardLoading = isOneOf<GuardLoading>(\"block\", \"lazy\");\nconst isInheritance = isOneOf<Inheritance>(\"none\", \"pattern-tree\");\n\n/** Matches a standalone optional (`:param:`) or rest (`:param*:`) segment. */\nconst OPTIONAL_OR_REST_SEGMENT = /^:[^:]*\\*?:$/;\n\n/**\n * Strips inline query and optional-query suffixes from a segment.\n *\n * UI5 (crossroads.js) allows query parameters to attach directly to a\n * path segment without a `/` separator:\n * - `product{?query}` → mandatory query on `product`\n * - `product:?query:` → optional query on `product`\n * - `{id}{?query}` → mandatory param + mandatory query\n *\n * For pattern-tree ancestry we only care about the path portion,\n * so these suffixes are stripped.\n */\nfunction stripInlineQuery(seg: string): string {\n\t// Strip mandatory query `{?...}` suffix\n\tconst mqIdx = seg.indexOf(\"{?\");\n\tif (mqIdx !== -1) return seg.slice(0, mqIdx);\n\t// Strip optional query `:?...:` suffix\n\tconst oqIdx = seg.indexOf(\":?\");\n\tif (oqIdx !== -1) return seg.slice(0, oqIdx);\n\treturn seg;\n}\n\n/**\n * Extract mandatory path segments from a UI5 route pattern.\n *\n * Splits on `/`, strips inline query suffixes, then drops empty segments,\n * standalone optional (`:param:`), and rest (`:param*:`) segments.\n */\nfunction patternSegments(pattern: string): string[] {\n\treturn pattern\n\t\t.split(\"/\")\n\t\t.map(stripInlineQuery)\n\t\t.filter((seg) => seg !== \"\" && !OPTIONAL_OR_REST_SEGMENT.test(seg));\n}\n\n/**\n * Check if `ancestorPattern` is a URL-tree ancestor of `candidatePattern`.\n *\n * Both patterns are reduced to their mandatory path segments and compared\n * positionally. Mandatory parameter segments (`{paramA}`, `{paramB}`) are\n * treated as equivalent regardless of name, so `employees/{empId}` is\n * recognized as an ancestor of `employees/{id}/resume`.\n */\nfunction isPatternAncestor(ancestorPattern: string, candidatePattern: string): boolean {\n\tif (ancestorPattern === \"\") return true;\n\tconst ancestorSegments = patternSegments(ancestorPattern);\n\tif (ancestorSegments.length === 0) return false;\n\tconst candidateSegments = patternSegments(candidatePattern);\n\tif (candidateSegments.length <= ancestorSegments.length) return false;\n\treturn ancestorSegments.every((seg, i) => {\n\t\tconst candidateSeg = candidateSegments[i];\n\t\tif (seg === candidateSeg) return true;\n\t\t// Treat any two mandatory parameter segments as equivalent\n\t\treturn seg.startsWith(\"{\") && candidateSeg.startsWith(\"{\");\n\t});\n}\n\n/** Parsed guard declaration from the manifest `guards` block. */\ninterface GuardDescriptor {\n\treadonly route: string; // \"*\" for global, route name for per-route\n\treadonly type: \"enter\" | \"leave\";\n\treadonly modulePath: string;\n\treadonly name: string;\n\treadonly exportKey?: string;\n}\n\n/**\n * Resolve a guard module path to a slash-separated AMD module path.\n *\n * Inspired by `sap.ui.core.routing.Target._getEffectiveObjectName()`,\n * which skips namespace prepending for `\"module:\"`-prefixed paths. This\n * function goes further: it also converts dots to slashes in a single\n * step, so both dot notation (`module:some.lib.guard`) and slash\n * notation (`module:some/lib/guard`) are accepted.\n *\n * - Paths prefixed with `\"module:\"` are treated as absolute (the prefix\n * is stripped, dots become slashes).\n * - All other paths are prefixed with the component namespace, then dots\n * become slashes.\n */\nfunction resolveGuardModulePath(dotPath: string, componentNamespace: string): string {\n\tif (dotPath.startsWith(\"module:\")) {\n\t\treturn dotPath.slice(\"module:\".length).replace(/\\./g, \"/\");\n\t}\n\tconst fullDotPath = componentNamespace ? componentNamespace + \".\" + dotPath : dotPath;\n\treturn fullDotPath.replace(/\\./g, \"/\");\n}\n\n/**\n * Split a manifest guard entry on the first `#` to separate the module path\n * from an optional export key, then derive a human-readable guard name.\n */\nfunction parseGuardEntry(\n\tentry: string,\n\tcomponentNamespace: string,\n): { modulePath: string; name: string; exportKey?: string } {\n\tconst hashIndex = entry.indexOf(\"#\");\n\tconst rawPath = hashIndex === -1 ? entry : entry.slice(0, hashIndex);\n\tconst exportKey = hashIndex === -1 ? undefined : entry.slice(hashIndex + 1);\n\n\tconst modulePath = resolveGuardModulePath(rawPath, componentNamespace);\n\n\t// Name: export key if present, otherwise last segment of the dot path\n\tconst lastSegment = rawPath.split(\".\").pop() ?? rawPath;\n\tconst name = exportKey ?? lastSegment;\n\n\treturn { modulePath, name, exportKey };\n}\n\ninterface ResolvedGuardExport {\n\treadonly name: string;\n\treadonly fn: GuardFn;\n}\n\n/** Log a warning about a guard module entry in the manifest. */\nfunction guardWarning(modulePath: string, detail: string): void {\n\tLog.warning(`guardRouter.guards: \"${modulePath}\" ${detail}`, undefined, LOG_COMPONENT);\n}\n\n/**\n * Detect the export shape of a loaded guard module and extract guard functions.\n *\n * Shapes:\n * - function → single guard\n * - Array → ordered guards (non-functions warned and skipped)\n * - plain object → named guards in key order (non-functions warned and skipped)\n *\n * When `exportKey` is set, only the matching export is returned.\n * When `exportKey` is set on a function export, the key is ignored with a debug warning.\n */\nfunction resolveModuleExports(\n\tmoduleExport: unknown,\n\tmodulePath: string,\n\tdescriptorName: string,\n\texportKey?: string,\n): ResolvedGuardExport[] {\n\tconst moduleName = modulePath.split(\"/\").pop() ?? modulePath;\n\n\t// Shape 1: function\n\tif (typeof moduleExport === \"function\") {\n\t\tif (exportKey !== undefined) {\n\t\t\tLog.debug(\n\t\t\t\t`guardRouter.guards: \"${modulePath}#${exportKey}\" is a single function, ignoring export key`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t}\n\t\treturn [{ name: descriptorName, fn: moduleExport as GuardFn }];\n\t}\n\n\t// Shape 2: array\n\tif (Array.isArray(moduleExport)) {\n\t\tif (moduleExport.length === 0) {\n\t\t\tguardWarning(modulePath, \"exported an empty array, skipping\");\n\t\t\treturn [];\n\t\t}\n\n\t\tif (exportKey !== undefined) {\n\t\t\tconst index = parseInt(exportKey, 10);\n\t\t\tif (Number.isNaN(index) || index < 0 || index >= moduleExport.length) {\n\t\t\t\tguardWarning(modulePath, `#${exportKey} - index out of range, skipping`);\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst entry = moduleExport[index] as unknown;\n\t\t\tif (typeof entry !== \"function\") {\n\t\t\t\tguardWarning(modulePath, `#${exportKey} is not a function, skipping`);\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn [{ name: `${moduleName}#${exportKey}`, fn: entry as GuardFn }];\n\t\t}\n\n\t\tconst results: ResolvedGuardExport[] = [];\n\t\tfor (let i = 0; i < moduleExport.length; i++) {\n\t\t\tconst entry = moduleExport[i] as unknown;\n\t\t\tif (typeof entry !== \"function\") {\n\t\t\t\tguardWarning(modulePath, `[${i}] is not a function, skipping`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresults.push({ name: `${moduleName}#${i}`, fn: entry as GuardFn });\n\t\t}\n\t\treturn results;\n\t}\n\n\t// Shape 3: plain object\n\tif (isRecord(moduleExport)) {\n\t\tconst entries = Object.entries(moduleExport);\n\t\tif (entries.length === 0) {\n\t\t\tguardWarning(modulePath, \"exported an empty object, skipping\");\n\t\t\treturn [];\n\t\t}\n\n\t\tif (exportKey !== undefined) {\n\t\t\tlet value: unknown = moduleExport[exportKey];\n\t\t\tlet resolvedName = exportKey;\n\t\t\tif (value === undefined) {\n\t\t\t\tconst index = parseInt(exportKey, 10);\n\t\t\t\tif (!Number.isNaN(index) && index >= 0 && index < entries.length) {\n\t\t\t\t\tconst [key, val] = entries[index];\n\t\t\t\t\tvalue = val;\n\t\t\t\t\tresolvedName = key;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (value === undefined) {\n\t\t\t\tguardWarning(modulePath, `#${exportKey} - key not found, skipping`);\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tif (typeof value !== \"function\") {\n\t\t\t\tguardWarning(modulePath, `#${exportKey} is not a function, skipping`);\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn [{ name: resolvedName, fn: value as GuardFn }];\n\t\t}\n\n\t\tconst results: ResolvedGuardExport[] = [];\n\t\tfor (const [key, value] of entries) {\n\t\t\tif (typeof value !== \"function\") {\n\t\t\t\tguardWarning(modulePath, `.${key} is not a function, skipping`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tresults.push({ name: key, fn: value as GuardFn });\n\t\t}\n\t\treturn results;\n\t}\n\n\tguardWarning(modulePath, \"did not export a function, array, or plain object, skipping\");\n\treturn [];\n}\n\n/**\n * Parse the `guards` block from the guardRouter config into an array of\n * {@link GuardDescriptor} objects.\n *\n * Handles:\n * - `\"*\"` key with `string[]` -> global enter guards\n * - Route name with `string[]` (shorthand) -> enter guards\n * - Route name with `{ enter: [...], leave: [...] }` -> enter + leave guards\n * - `\"*\"` with object form -> warn, treat enter as global\n * - `\"*\"` leave -> warn, skip (global leave guards not supported)\n * - Invalid entries -> warn, skip\n */\nfunction parseGuardDescriptors(guards: unknown, componentNamespace: string): GuardDescriptor[] {\n\tif (!isRecord(guards)) {\n\t\tLog.warning(\"guardRouter.guards is not a plain object, skipping\", JSON.stringify(guards), LOG_COMPONENT);\n\t\treturn [];\n\t}\n\n\tconst descriptors: GuardDescriptor[] = [];\n\n\tfunction pushEntries(entries: unknown[], route: string, type: \"enter\" | \"leave\", label: string): void {\n\t\tfor (const entry of entries) {\n\t\t\tif (typeof entry !== \"string\" || entry.length === 0) {\n\t\t\t\tLog.warning(\n\t\t\t\t\t`guardRouter.guards${label}: invalid entry, skipping`,\n\t\t\t\t\tJSON.stringify(entry),\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst parsed = parseGuardEntry(entry, componentNamespace);\n\t\t\tdescriptors.push({ route, type, ...parsed });\n\t\t}\n\t}\n\n\tfor (const [key, value] of Object.entries(guards)) {\n\t\tif (Array.isArray(value)) {\n\t\t\tpushEntries(value, key, \"enter\", `[\"${key}\"]`);\n\t\t} else if (isRecord(value)) {\n\t\t\tconst config = value as ManifestRouteGuardConfig;\n\n\t\t\tif (key === \"*\" && config.leave !== undefined) {\n\t\t\t\tLog.warning(\n\t\t\t\t\t'guardRouter.guards[\"*\"].leave: global leave guards are not supported, skipping',\n\t\t\t\t\tundefined,\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (key === \"*\" && config.enter === undefined && config.leave !== undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (key === \"*\" && config.enter !== undefined) {\n\t\t\t\tLog.info('guardRouter.guards[\"*\"]: object form; treating enter as global', undefined, LOG_COMPONENT);\n\t\t\t}\n\n\t\t\tif (Array.isArray(config.enter)) {\n\t\t\t\tpushEntries(config.enter, key, \"enter\", `[\"${key}\"].enter`);\n\t\t\t}\n\n\t\t\tif (key !== \"*\" && Array.isArray(config.leave)) {\n\t\t\t\tpushEntries(config.leave, key, \"leave\", `[\"${key}\"].leave`);\n\t\t\t}\n\t\t} else {\n\t\t\tLog.warning(\n\t\t\t\t`guardRouter.guards[\"${key}\"]: expected string[] or { enter?, leave? }, skipping`,\n\t\t\t\tJSON.stringify(value),\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t}\n\t}\n\n\treturn descriptors;\n}\n\ninterface ResolvedGuardRouterOptions {\n\treadonly unknownRouteRegistration: UnknownRouteRegistrationPolicy;\n\treadonly navToPreflight: NavToPreflightMode;\n\treadonly guardLoading: GuardLoading;\n\treadonly inheritance: Inheritance;\n}\n\nconst DEFAULT_OPTIONS: ResolvedGuardRouterOptions = {\n\tunknownRouteRegistration: \"warn\",\n\tnavToPreflight: \"guard\",\n\tguardLoading: \"lazy\",\n\tinheritance: \"none\",\n};\n\nfunction applyOption<K extends keyof ResolvedGuardRouterOptions>(\n\traw: Record<string, unknown>,\n\tkey: K,\n\tguard: (v: unknown) => v is ResolvedGuardRouterOptions[K],\n\ttarget: { -readonly [P in keyof ResolvedGuardRouterOptions]: ResolvedGuardRouterOptions[P] },\n): void {\n\tif (raw[key] !== undefined) {\n\t\tif (guard(raw[key])) {\n\t\t\ttarget[key] = raw[key] as ResolvedGuardRouterOptions[K];\n\t\t} else {\n\t\t\tLog.warning(`guardRouter.${key} has invalid value, using default`, JSON.stringify(raw[key]), LOG_COMPONENT);\n\t\t}\n\t}\n}\n\nfunction normalizeGuardRouterOptions(raw: unknown): ResolvedGuardRouterOptions {\n\tif (!isRecord(raw)) {\n\t\tif (raw !== undefined) {\n\t\t\tLog.warning(\"guardRouter config is not a plain object, using defaults\", JSON.stringify(raw), LOG_COMPONENT);\n\t\t}\n\t\treturn DEFAULT_OPTIONS;\n\t}\n\n\tconst result = { ...DEFAULT_OPTIONS };\n\tapplyOption(raw, \"unknownRouteRegistration\", isUnknownRouteRegistrationPolicy, result);\n\tapplyOption(raw, \"navToPreflight\", isNavToPreflightMode, result);\n\tapplyOption(raw, \"guardLoading\", isGuardLoading, result);\n\tapplyOption(raw, \"inheritance\", isInheritance, result);\n\treturn result;\n}\n\n/** Maximum number of hops in a redirect chain before it is treated as a loop. */\nconst MAX_REDIRECT_DEPTH = 10;\n\n/** State threaded through a redirect chain. */\ninterface RedirectChainContext {\n\t/** Hashes whose guards have been evaluated in this chain (mutated via .add()). */\n\tvisited: Set<string>;\n\t/** Hash of the originally attempted navigation (for settlement / hash restore). */\n\treadonly attemptedHash: string | undefined;\n\t/** Whether to restore the hash on block (true for parse path, false for preflight). */\n\treadonly restoreHash: boolean;\n\t/** Original source route (the route the user occupies). */\n\treadonly fromRoute: string;\n\t/** Original source hash (the hash the user occupies). */\n\treadonly fromHash: string;\n\t/** Shared AbortSignal from the original navigation. */\n\treadonly signal: AbortSignal;\n\t/** Shared generation counter from the original navigation. */\n\treadonly generation: number;\n\t/** Shared bag from the original navigation's guard context. */\n\treadonly bag: Map<string, unknown>;\n}\n\n/**\n * Router with navigation guard support.\n *\n * Extends `sap.m.routing.Router` with a shared guard pipeline that\n * evaluates registered guard functions before route matching, target\n * loading, or event firing occurs.\n *\n * Two entry points feed the same pipeline:\n * - `navTo()` runs guards as a preflight check. Blocked or redirected\n * navigations never change the hash or push history entries.\n * - `parse()` runs guards as a fallback for browser back/forward, URL\n * bar entry, and direct hash changes where the hash has already changed\n * before guards can intercept.\n *\n * Key assumptions (see docs/reference/architecture.md for full rationale):\n * - `parse()` is intentionally NOT async. Sync guards execute in the\n * same tick; async guards fall back to a deferred path.\n * - `replaceHash` fires `hashChanged` synchronously (validated by test).\n * - `setHash` (via `super.navTo`) fires `hashChanged` synchronously (validated by test).\n * - Redirect targets are evaluated by the guard pipeline with loop detection.\n *\n * @namespace ui5.guard.router\n * @extends sap.m.routing.Router\n */\nexport default class Router extends MobileRouter implements GuardRouter {\n\tprivate _options: ResolvedGuardRouterOptions = DEFAULT_OPTIONS;\n\tprivate _pipeline = new GuardPipeline();\n\tprivate _currentRoute = \"\";\n\tprivate _currentHash: string | null = null;\n\tprivate _phase: RouterPhase = IDLE;\n\tprivate _parseGeneration = 0;\n\tprivate _suppressedHash: string | null = null;\n\tprivate _settlementResolvers: ((result: NavigationResult) => void)[] = [];\n\tprivate _lastSettlement: NavigationResult | null = null;\n\tprivate _pendingGuardDescriptors: GuardDescriptor[] = [];\n\tprivate _sourceDescriptors: GuardDescriptor[] = [];\n\tprivate _destroyed = false;\n\tprivate _manifestMeta = new Map<string, Readonly<Record<string, unknown>>>();\n\tprivate _runtimeMeta = new Map<string, Readonly<Record<string, unknown>>>();\n\tprivate _resolvedMetaCache = new Map<string, Readonly<Record<string, unknown>>>();\n\tprivate _routeNames: string[] = [];\n\n\tconstructor(...args: ConstructorParameters<typeof MobileRouter>) {\n\t\tconst [routes, config, owner, ...rest] = args;\n\t\tconst rawConfig = config as Record<string, unknown> | undefined;\n\t\tconst isRecordConfig = isRecord(rawConfig);\n\t\tconst { guardRouter, ...cleanConfig } = isRecordConfig ? rawConfig : ({} as Record<string, unknown>);\n\t\tsuper(routes, isRecordConfig ? (cleanConfig as typeof config) : config, owner, ...rest);\n\t\tthis._options = normalizeGuardRouterOptions(guardRouter);\n\n\t\t// Collect route names from the constructor's routes parameter for pattern-tree traversal.\n\t\tif (Array.isArray(routes)) {\n\t\t\tthis._routeNames = routes\n\t\t\t\t.filter((r): r is { name: string } => isRecord(r) && typeof r.name === \"string\")\n\t\t\t\t.map((r) => r.name);\n\t\t} else if (isRecord(routes)) {\n\t\t\tthis._routeNames = Object.keys(routes);\n\t\t}\n\n\t\tif (isRecord(guardRouter) && guardRouter.routeMeta !== undefined) {\n\t\t\tif (isRecord(guardRouter.routeMeta)) {\n\t\t\t\tfor (const [routeName, meta] of Object.entries(guardRouter.routeMeta)) {\n\t\t\t\t\tif (isRecord(meta)) {\n\t\t\t\t\t\tthis._manifestMeta.set(routeName, Object.freeze({ ...meta }));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.warning(\n\t\t\t\t\t\t\t`guardRouter.routeMeta[\"${routeName}\"]: expected object, skipping`,\n\t\t\t\t\t\t\tJSON.stringify(meta),\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLog.warning(\n\t\t\t\t\t\"guardRouter.routeMeta: expected object, skipping\",\n\t\t\t\t\tJSON.stringify(guardRouter.routeMeta),\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (isRecord(guardRouter) && guardRouter.guards !== undefined) {\n\t\t\tlet componentNamespace = \"\";\n\t\t\tif (owner) {\n\t\t\t\tconst appConfig = owner.getManifestEntry(\"sap.app\") as Record<string, unknown> | undefined;\n\t\t\t\tif (isRecord(appConfig) && typeof appConfig.id === \"string\") {\n\t\t\t\t\tcomponentNamespace = appConfig.id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._pendingGuardDescriptors = parseGuardDescriptors(guardRouter.guards, componentNamespace);\n\n\t\t\t// Fire-and-forget preload hint: warm the module cache so lazy\n\t\t\t// wrappers resolve synchronously on first navigation.\n\t\t\t// Block mode loads modules itself in initialize().\n\t\t\tif (this._pendingGuardDescriptors.length > 0 && this._options.guardLoading === \"lazy\") {\n\t\t\t\tconst uniquePaths = [...new Set(this._pendingGuardDescriptors.map((d) => d.modulePath))];\n\t\t\t\tsap.ui.require(uniquePaths);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Initialize the router. When manifest guards are declared and\n\t * `guardLoading` is `\"block\"`, module loading starts and\n\t * `super.initialize()` is deferred until all modules are loaded.\n\t * In `\"lazy\"` mode, lazy wrappers are registered synchronously\n\t * and `super.initialize()` is called immediately.\n\t *\n\t * @override sap.ui.core.routing.Router#initialize\n\t * @since 1.0.1\n\t */\n\toverride initialize(): this {\n\t\tif (this._pendingGuardDescriptors.length === 0) {\n\t\t\treturn super.initialize();\n\t\t}\n\n\t\tconst descriptors = this._pendingGuardDescriptors;\n\t\tthis._pendingGuardDescriptors = [];\n\t\tthis._sourceDescriptors = descriptors;\n\n\t\tconst expandedDescriptors =\n\t\t\tthis._options.inheritance === \"pattern-tree\" ? this._expandGuardDescriptors(descriptors) : descriptors;\n\n\t\tif (this._options.guardLoading === \"lazy\") {\n\t\t\tthis._registerLazyGuards(expandedDescriptors);\n\t\t\treturn super.initialize();\n\t\t}\n\n\t\t// \"block\" mode: load all modules, then initialize.\n\t\t// Guard against destroy() being called while modules are still loading.\n\t\tthis._loadAndRegisterGuards(expandedDescriptors)\n\t\t\t.then(() => {\n\t\t\t\tif (!this._destroyed) super.initialize();\n\t\t\t})\n\t\t\t.catch((err: unknown) => {\n\t\t\t\tif (this._destroyed) return;\n\t\t\t\tLog.error(\n\t\t\t\t\t\"guardRouter.guards: module loading failed, initializing without manifest guards\",\n\t\t\t\t\tString(err),\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t\tsuper.initialize();\n\t\t\t});\n\t\treturn this;\n\t}\n\n\t/**\n\t * Add a route dynamically and integrate it into pattern-tree inheritance.\n\t *\n\t * Appends the route name to the internal route list so that\n\t * `_collectRoutePatterns()` includes it in subsequent inheritance\n\t * lookups, clears the metadata cache, and registers any inherited\n\t * manifest guards when `inheritance` is `\"pattern-tree\"`.\n\t *\n\t * @param oConfig - Route configuration object as defined by `sap.ui.core.routing.Route`.\n\t * @param rest - Additional arguments forwarded to the parent `addRoute`.\n\t * @override sap.ui.core.routing.Router#addRoute\n\t * @since 1.6.0\n\t */\n\toverride addRoute(oConfig: $RouteSettings, ...rest: unknown[]): void {\n\t\t// @ts-expect-error -- oParent is required in the type declaration but optional at runtime\n\t\tsuper.addRoute(oConfig, ...rest);\n\n\t\t// Skip when called by the parent constructor before field initializers have run.\n\t\t// Routes from the constructor args are captured in _routeNames by the constructor body.\n\t\tif (!this._routeNames) return;\n\n\t\tconst name = oConfig.name;\n\t\tif (typeof name !== \"string\") return;\n\t\tif (this._routeNames.includes(name)) return;\n\n\t\tthis._routeNames.push(name);\n\t\tthis._resolvedMetaCache.clear();\n\n\t\tif (this._options.inheritance !== \"pattern-tree\") return;\n\t\tif (this._sourceDescriptors.length === 0) return;\n\n\t\tconst route = this.getRoute(name);\n\t\tif (!route) return;\n\t\tconst newPattern = route.getPattern();\n\t\tif (newPattern === undefined) return;\n\n\t\tconst newDescriptors = this._expandGuardDescriptorsForNewRoute(name, newPattern);\n\t\tif (newDescriptors.length === 0) return;\n\n\t\t// Always use lazy registration: if the module was loaded during\n\t\t// initialize() (block mode), the sync cache probe succeeds immediately.\n\t\t// This avoids an async gap between addRoute() and the first navigation.\n\t\tthis._registerLazyGuards(newDescriptors);\n\t}\n\n\t/**\n\t * Expand manifest guard descriptors for a single newly added route.\n\t *\n\t * For each source descriptor whose route is an ancestor of the new\n\t * route's pattern, emits a copy targeting the new route. Also emits\n\t * copies for existing routes that are descendants of the new route\n\t * (in case the new route has declared guards). Sorted by depth.\n\t */\n\tprivate _expandGuardDescriptorsForNewRoute(newName: string, newPattern: string): GuardDescriptor[] {\n\t\tconst result: GuardDescriptor[] = [];\n\n\t\tfor (const descriptor of this._sourceDescriptors) {\n\t\t\tif (descriptor.route === \"*\") continue;\n\n\t\t\tif (descriptor.route !== newName) {\n\t\t\t\t// Check if the source descriptor's route is an ancestor of the new route.\n\t\t\t\tconst ancestorRoute = this.getRoute(descriptor.route);\n\t\t\t\tconst ancestorPattern = ancestorRoute?.getPattern();\n\t\t\t\tif (ancestorPattern !== undefined && isPatternAncestor(ancestorPattern, newPattern)) {\n\t\t\t\t\tresult.push({ ...descriptor, route: newName });\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// The new route itself has a source descriptor: expand to existing descendants.\n\t\t\t\tfor (const { name, pattern } of this._collectRoutePatterns()) {\n\t\t\t\t\tif (name === newName) continue;\n\t\t\t\t\tif (isPatternAncestor(newPattern, pattern)) {\n\t\t\t\t\t\tresult.push({ ...descriptor, route: name });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sort by pattern depth (ancestor guards run before descendant guards).\n\t\treturn result.toSorted((a, b) => {\n\t\t\tconst pa = this.getRoute(a.route)?.getPattern() ?? \"\";\n\t\t\tconst pb = this.getRoute(b.route)?.getPattern() ?? \"\";\n\t\t\treturn patternSegments(pa).length - patternSegments(pb).length;\n\t\t});\n\t}\n\n\t/**\n\t * Register a global guard that runs for every navigation.\n\t *\n\t * @param guard - Guard function to register. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddGuard(guard: GuardFn): this {\n\t\tif (!this._isFn(guard, \"addGuard\")) return this;\n\t\tthis._pipeline.addGlobalGuard(guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Remove a previously registered global guard.\n\t *\n\t * @param guard - Guard function to remove by reference. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveGuard(guard: GuardFn): this {\n\t\tif (!this._isFn(guard, \"removeGuard\")) return this;\n\t\tthis._pipeline.removeGlobalGuard(guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a guard for a specific route.\n\t *\n\t * Accepts either a guard function (registered as an enter guard) or a\n\t * configuration object with `beforeEnter` and/or `beforeLeave` guards.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`. If the route is unknown, the {@link GuardRouterOptions.unknownRouteRegistration} policy applies (default: warn).\n\t * @param guard - Guard function or {@link RouteGuardConfig} object.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddRouteGuard(routeName: string, guard: GuardFn | RouteGuardConfig): this {\n\t\tif (isRouteGuardConfig(guard)) {\n\t\t\tif (!this._handleUnknownRouteRegistration(routeName, \"addRouteGuard\")) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tlet hasHandler = false;\n\n\t\t\tif (guard.beforeEnter !== undefined) {\n\t\t\t\thasHandler = true;\n\t\t\t\tif (this._isFn(guard.beforeEnter, \"addRouteGuard\", routeName)) {\n\t\t\t\t\tthis._pipeline.addEnterGuard(routeName, guard.beforeEnter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guard.beforeLeave !== undefined) {\n\t\t\t\thasHandler = true;\n\t\t\t\tif (this._isFn(guard.beforeLeave, \"addRouteGuard\", routeName)) {\n\t\t\t\t\tthis._pipeline.addLeaveGuard(routeName, guard.beforeLeave);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!hasHandler) {\n\t\t\t\tLog.info(\"addRouteGuard: config has no beforeEnter or beforeLeave\", routeName, LOG_COMPONENT);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (!this._isFn(guard, \"addRouteGuard\", routeName)) return this;\n\t\tif (!this._handleUnknownRouteRegistration(routeName, \"addRouteGuard\")) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._pipeline.addEnterGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Remove a guard from a specific route.\n\t *\n\t * Accepts the same forms as `addRouteGuard`: a guard function removes\n\t * an enter guard; a configuration object removes `beforeEnter` and/or\n\t * `beforeLeave` by reference.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param guard - Guard function or {@link RouteGuardConfig} object to remove by reference.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveRouteGuard(routeName: string, guard: GuardFn | RouteGuardConfig): this {\n\t\tif (isRouteGuardConfig(guard)) {\n\t\t\tif (typeof guard.beforeEnter === \"function\") {\n\t\t\t\tthis.removeRouteGuard(routeName, guard.beforeEnter);\n\t\t\t}\n\t\t\tif (typeof guard.beforeLeave === \"function\") {\n\t\t\t\tthis.removeLeaveGuard(routeName, guard.beforeLeave);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (!this._isFn(guard, \"removeRouteGuard\", routeName)) return this;\n\t\tthis._pipeline.removeEnterGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a leave guard for a specific route.\n\t *\n\t * Leave guards run when navigating **away from** the route, before any\n\t * enter guards for the target route. They answer the binary question\n\t * \"can I leave?\" and return only a boolean (no redirects).\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`. If the route is unknown, the {@link GuardRouterOptions.unknownRouteRegistration} policy applies (default: warn).\n\t * @param guard - Leave guard function to register. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddLeaveGuard(routeName: string, guard: LeaveGuardFn): this {\n\t\tif (!this._isFn(guard, \"addLeaveGuard\", routeName)) return this;\n\t\tif (!this._handleUnknownRouteRegistration(routeName, \"addLeaveGuard\")) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._pipeline.addLeaveGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Disambiguate the `navTo()` overload shapes into resolved arguments.\n\t *\n\t * UI5's native `navTo` has two signatures where the third parameter is either\n\t * `componentTargetInfo` (object) or `bReplace` (boolean). This method normalizes\n\t * both forms so the rest of `navTo` can work with a single set of variables.\n\t */\n\tprivate _resolveNavToArgs(\n\t\tcomponentTargetInfoOrReplace?: Record<string, ComponentTargetParameters> | boolean,\n\t\treplaceOrOptions?: boolean | GuardNavToOptions,\n\t\toptions?: GuardNavToOptions,\n\t): {\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>;\n\t\treplace?: boolean;\n\t\tguardOptions?: GuardNavToOptions;\n\t} {\n\t\tif (typeof componentTargetInfoOrReplace === \"boolean\") {\n\t\t\t// Short form: navTo(name, params, replace, options?)\n\t\t\treturn {\n\t\t\t\treplace: componentTargetInfoOrReplace,\n\t\t\t\tguardOptions:\n\t\t\t\t\ttypeof replaceOrOptions === \"object\" && replaceOrOptions !== null ? replaceOrOptions : undefined,\n\t\t\t};\n\t\t}\n\t\t// Long form: navTo(name, params, componentTargetInfo, replace, options?)\n\t\treturn {\n\t\t\tcomponentTargetInfo: componentTargetInfoOrReplace,\n\t\t\treplace: typeof replaceOrOptions === \"boolean\" ? replaceOrOptions : undefined,\n\t\t\tguardOptions: options,\n\t\t};\n\t}\n\n\t/** Return `true` when the value is a function; otherwise log a warning. */\n\tprivate _isFn(value: unknown, method: string, detail?: string): boolean {\n\t\tif (typeof value === \"function\") return true;\n\t\tLog.warning(`${method}: not a function, ignoring`, detail, LOG_COMPONENT);\n\t\treturn false;\n\t}\n\n\t/**\n\t * Handle guard registration for a potentially unknown route.\n\t * Returns `true` if registration should proceed, `false` if not.\n\t */\n\tprivate _handleUnknownRouteRegistration(routeName: string, methodName: string): boolean {\n\t\tif (this.getRoute(routeName)) return true;\n\n\t\tswitch (this._options.unknownRouteRegistration) {\n\t\t\tcase \"ignore\":\n\t\t\t\treturn true;\n\t\t\tcase \"throw\":\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${methodName} called for unknown route \"${routeName}\". ` +\n\t\t\t\t\t\t`Set guardRouter.unknownRouteRegistration to \"warn\" or \"ignore\" to allow this.`,\n\t\t\t\t);\n\t\t\tcase \"warn\":\n\t\t\tdefault:\n\t\t\t\tLog.warning(`${methodName}: unknown route, guard registered anyway`, routeName, LOG_COMPONENT);\n\t\t\t\treturn true;\n\t\t}\n\t}\n\n\t/**\n\t * Remove a leave guard from a specific route.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param guard - Leave guard function to remove by reference. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveLeaveGuard(routeName: string, guard: LeaveGuardFn): this {\n\t\tif (!this._isFn(guard, \"removeLeaveGuard\", routeName)) return this;\n\t\tthis._pipeline.removeLeaveGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\tprivate static readonly _EMPTY_META: Readonly<Record<string, unknown>> = Object.freeze({});\n\n\t/**\n\t * Return the resolved metadata for a route.\n\t *\n\t * When `inheritance` is `\"pattern-tree\"`, walks the ancestor chain and\n\t * shallow-merges metadata shallowest-first (child values win on conflict).\n\t * Both manifest and runtime metadata participate in inheritance.\n\t * The router caches results; {@link setRouteMeta} and `addRoute()` clear the cache.\n\t *\n\t * Logs a warning for unknown non-empty route names and returns an empty\n\t * frozen object. The empty string `\"\"` is treated as a valid root route.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @returns Frozen record of metadata key-value pairs, or an empty frozen object if the route has no metadata.\n\t * @since 1.6.0\n\t */\n\tgetRouteMeta(routeName: string): Readonly<Record<string, unknown>> {\n\t\t// Empty string is a valid root route name (initial state before first navigation)\n\t\tif (routeName !== \"\" && !this.getRoute(routeName)) {\n\t\t\tLog.warning(\"getRouteMeta: unknown route, returning empty metadata\", routeName, LOG_COMPONENT);\n\t\t\treturn Router._EMPTY_META;\n\t\t}\n\n\t\t// Cache hit\n\t\tconst cached = this._resolvedMetaCache.get(routeName);\n\t\tif (cached) return cached;\n\n\t\tlet result: Readonly<Record<string, unknown>>;\n\n\t\tif (this._options.inheritance === \"pattern-tree\") {\n\t\t\tresult = this._resolveInheritedMeta(routeName);\n\t\t} else {\n\t\t\tresult = this._resolveFlatMeta(routeName);\n\t\t}\n\n\t\tif (Object.keys(result).length === 0) {\n\t\t\tthis._resolvedMetaCache.set(routeName, Router._EMPTY_META);\n\t\t\treturn Router._EMPTY_META;\n\t\t}\n\n\t\tthis._resolvedMetaCache.set(routeName, result);\n\t\treturn result;\n\t}\n\n\t/**\n\t * Set runtime metadata for a route.\n\t *\n\t * Runtime metadata is merged on top of any manifest-declared metadata\n\t * when retrieved via {@link getRouteMeta}. When `inheritance` is\n\t * `\"pattern-tree\"`, descendant routes also see the updated values.\n\t * Invalidates the resolved-metadata cache. Non-object values are\n\t * ignored with a warning. Subject to the `unknownRouteRegistration` policy.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param meta - Plain object of metadata key-value pairs.\n\t * @returns `this` for chaining.\n\t * @since 1.6.0\n\t */\n\tsetRouteMeta(routeName: string, meta: Record<string, unknown>): this {\n\t\tif (!isRecord(meta)) {\n\t\t\tLog.warning(\"setRouteMeta: expected object, ignoring\", routeName, LOG_COMPONENT);\n\t\t\treturn this;\n\t\t}\n\t\tif (routeName !== \"\" && !this._handleUnknownRouteRegistration(routeName, \"setRouteMeta\")) {\n\t\t\treturn this;\n\t\t}\n\t\tthis._runtimeMeta.set(routeName, Object.freeze({ ...meta }));\n\t\tthis._resolvedMetaCache.clear();\n\t\treturn this;\n\t}\n\n\t/**\n\t * Return a Promise that settles when the current guard pipeline finishes.\n\t *\n\t * If a navigation is pending, the Promise resolves when that pipeline settles.\n\t * If no navigation is pending, it resolves immediately with the most recent\n\t * settlement result. Before any navigation has settled, it falls back to a\n\t * synthetic `Committed` result derived from the router's current route/hash\n\t * state. After `stop()`, that idle fallback reports empty route/hash values\n\t * until a new navigation settles.\n\t *\n\t * @returns Promise that resolves with a {@link NavigationResult} once the pipeline settles.\n\t * @since 1.2.0\n\t */\n\tnavigationSettled(): Promise<NavigationResult> {\n\t\tif (this._phase.kind !== \"evaluating\") {\n\t\t\treturn Promise.resolve(\n\t\t\t\tthis._lastSettlement ?? {\n\t\t\t\t\tstatus: NavigationOutcome.Committed,\n\t\t\t\t\troute: this._currentRoute,\n\t\t\t\t\thash: this._currentHash ?? \"\",\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t\treturn new Promise((resolve) => {\n\t\t\tthis._settlementResolvers.push(resolve);\n\t\t});\n\t}\n\n\t/**\n\t * Attach an event handler for the `navigationSettled` event.\n\t *\n\t * Fires synchronously after every guard pipeline settlement with\n\t * a {@link NavigationResult} payload. Unlike the one-shot\n\t * `navigationSettled()` Promise, this event fires for every\n\t * navigation outcome without re-registration.\n\t *\n\t * @param oData - Application-specific payload passed to the handler as second argument.\n\t * @param fnFunction - The function to be called when the event occurs.\n\t * @param oListener - Context object to call the event handler with. Defaults to this Router.\n\t * @since 1.3.0\n\t */\n\tattachNavigationSettled(\n\t\toData: object,\n\t\tfnFunction: (evt: Router$NavigationSettledEvent) => void,\n\t\toListener?: object,\n\t): this;\n\tattachNavigationSettled(fnFunction: (evt: Router$NavigationSettledEvent) => void, oListener?: object): this;\n\tattachNavigationSettled(oData: unknown, fnFunction?: unknown, oListener?: unknown): this {\n\t\tthis.attachEvent(\n\t\t\t\"navigationSettled\",\n\t\t\toData as object,\n\t\t\tfnFunction as (...args: unknown[]) => void,\n\t\t\toListener as object,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Detach a previously attached `navigationSettled` event handler.\n\t *\n\t * The passed parameters must match those used for registration with\n\t * {@link #attachNavigationSettled} beforehand.\n\t *\n\t * @param fnFunction - The handler function to detach.\n\t * @param oListener - Context object on which the given function had to be called.\n\t * @since 1.3.0\n\t */\n\tdetachNavigationSettled(fnFunction: (evt: Router$NavigationSettledEvent) => void, oListener?: object): this {\n\t\tthis.detachEvent(\"navigationSettled\", fnFunction as (...args: unknown[]) => void, oListener);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Drain all settlement resolvers with the given result and fire\n\t * the `navigationSettled` event.\n\t */\n\tprivate _flushSettlement(result: NavigationResult): void {\n\t\tthis._lastSettlement = result;\n\t\tconst resolvers = this._settlementResolvers;\n\t\tthis._settlementResolvers = [];\n\t\tfor (const resolve of resolvers) {\n\t\t\tresolve(result);\n\t\t}\n\t\tthis.fireEvent(\"navigationSettled\", result);\n\t}\n\n\t/**\n\t * Navigate to a route with preflight guard evaluation.\n\t *\n\t * For programmatic navigation, guards run BEFORE the hash changes.\n\t * This prevents history pollution: blocked navigations never push a\n\t * history entry, and redirected navigations go directly to the final\n\t * target.\n\t *\n\t * Same-hash navigations are deduped: if the target hash matches\n\t * `_currentHash`, any pending navigation is cancelled and the call\n\t * returns without navigating. If it matches the in-flight attempt's\n\t * hash, the in-flight preflight continues undisturbed.\n\t *\n\t * When all guards are synchronous, the decision and the resulting\n\t * hash change happen in the same tick. When any guard returns a\n\t * Promise, `navTo()` returns `this` immediately and defers the\n\t * hash change to when the guard resolves.\n\t *\n\t * Assumes `super.navTo()` calls `HashChanger.setHash()` which fires\n\t * `hashChanged` synchronously, causing `parse()` to re-enter in the\n\t * same call stack (validated by test).\n\t *\n\t * @override sap.ui.core.routing.Router#navTo\n\t * @since 1.0.1\n\t */\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>,\n\t\tbReplace?: boolean,\n\t): this;\n\toverride navTo(routeName: string, parameters?: object, bReplace?: boolean): this;\n\toverride navTo(routeName: string, parameters?: object, bReplace?: boolean, options?: GuardNavToOptions): this;\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>,\n\t\tbReplace?: boolean,\n\t\toptions?: GuardNavToOptions,\n\t): this;\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfoOrReplace?: Record<string, ComponentTargetParameters> | boolean,\n\t\treplaceOrOptions?: boolean | GuardNavToOptions,\n\t\toptions?: GuardNavToOptions,\n\t): this {\n\t\tconst { componentTargetInfo, replace, guardOptions } = this._resolveNavToArgs(\n\t\t\tcomponentTargetInfoOrReplace,\n\t\t\treplaceOrOptions,\n\t\t\toptions,\n\t\t);\n\n\t\t// Redirect path: _redirect() calls this.navTo() while in committing/redirect phase.\n\t\t// Bypass preflight -- parse() will commit directly via the committing phase.\n\t\tif (this._phase.kind === \"committing\" && this._phase.origin === \"redirect\") {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\t// Resolve the target hash so we can build a guard context.\n\t\t// getURL() returns the hash pattern with parameters substituted.\n\t\tconst route = this.getRoute(routeName);\n\t\tif (!route) {\n\t\t\t// Unknown route -- let parent handle it (may fire bypassed event).\n\t\t\t// Cancel any pending async navigation so settlement resolvers drain\n\t\t\t// and the stale pipeline does not commit a superseded navigation.\n\t\t\tthis._cancelPendingNavigation();\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\tconst targetHash = route.getURL(parameters ?? {});\n\t\tconst routeInfo = this.getRouteInfoByHash(targetHash);\n\t\tconst toRoute = routeInfo?.name ?? \"\";\n\n\t\t// Same-hash dedup: cancel any pending navigation and return without navigating.\n\t\tif (this._currentHash !== null && targetHash === this._currentHash) {\n\t\t\tthis._cancelPendingNavigation();\n\t\t\treturn this;\n\t\t}\n\n\t\t// Pending-hash dedup: if an async preflight for this exact hash is\n\t\t// already running, don't cancel and restart it.\n\t\tif (this._phase.kind === \"evaluating\" && targetHash === this._phase.attempt.hash) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Cancel any pending navigation (including previous async preflight).\n\t\tthis._cancelPendingNavigation();\n\n\t\tconst skipGuards = guardOptions?.skipGuards === true;\n\n\t\t// Bypass mode: skip guards for programmatic navTo() -- commit directly.\n\t\tif (skipGuards || this._options.navToPreflight === \"bypass\") {\n\t\t\tthis._phase = { kind: \"committing\", hash: targetHash, route: toRoute, origin: \"preflight\" };\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\t// Safety: if super.navTo didn't trigger parse (e.g. hash didn't change),\n\t\t\t// clear the marker to avoid stale state.\n\t\t\tif (this._phase.kind === \"committing\" && this._phase.hash === targetHash) {\n\t\t\t\tthis._commitNavigation(targetHash, toRoute);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\t// Off mode: defer guard evaluation to parse() fallback.\n\t\tif (this._options.navToPreflight === \"off\") {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\t// Default \"guard\" mode: evaluate guards before hash change.\n\t\tconst controller = new AbortController();\n\t\tconst generation = this._parseGeneration;\n\n\t\tthis._phase = {\n\t\t\tkind: \"evaluating\",\n\t\t\tattempt: { hash: targetHash, route: toRoute, controller, generation },\n\t\t};\n\n\t\tconst context = this._createGuardContext(toRoute, targetHash, routeInfo, controller.signal);\n\n\t\tconst decision = this._pipeline.evaluate(context);\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tdecision\n\t\t\t\t.then((d: GuardDecision) => {\n\t\t\t\t\tif (generation !== this._parseGeneration || this._phase.kind !== \"evaluating\") {\n\t\t\t\t\t\tLog.debug(\n\t\t\t\t\t\t\t\"Async preflight result discarded (superseded by newer navigation)\",\n\t\t\t\t\t\t\ttargetHash,\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._applyPreflightDecision(\n\t\t\t\t\t\td,\n\t\t\t\t\t\trouteName,\n\t\t\t\t\t\tparameters,\n\t\t\t\t\t\tcomponentTargetInfo,\n\t\t\t\t\t\treplace,\n\t\t\t\t\t\ttargetHash,\n\t\t\t\t\t\ttoRoute,\n\t\t\t\t\t\tcontext.bag,\n\t\t\t\t\t);\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\t// Only check generation here, not phase. If _redirect threw and its\n\t\t\t\t\t// finally already reset phase to idle, we still need to drain\n\t\t\t\t\t// settlement resolvers via _errorNavigation.\n\t\t\t\t\tif (generation !== this._parseGeneration) return;\n\t\t\t\t\tLog.error(\n\t\t\t\t\t\t`Async preflight guard failed for route \"${routeName}\", navigation failed`,\n\t\t\t\t\t\tString(error),\n\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t);\n\t\t\t\t\tthis._errorNavigation(error, targetHash, false);\n\t\t\t\t});\n\t\t\treturn this;\n\t\t}\n\n\t\t// Sync path: apply the decision immediately.\n\t\tthis._applyPreflightDecision(\n\t\t\tdecision,\n\t\t\trouteName,\n\t\t\tparameters,\n\t\t\tcomponentTargetInfo,\n\t\t\treplace,\n\t\t\ttargetHash,\n\t\t\ttoRoute,\n\t\t\tcontext.bag,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Apply a preflight guard decision. For \"allow\", enter the committing\n\t * phase and call super.navTo(). For \"block\", flush settlement without\n\t * touching the hash. For \"redirect\", start a redirect chain.\n\t * For \"error\", flush Error settlement with the guard's error.\n\t *\n\t * @param decision - Normalized guard pipeline result.\n\t * @param routeName - Original route name passed to navTo().\n\t * @param parameters - Original route parameters.\n\t * @param componentTargetInfo - Optional component target info from the navTo() overload.\n\t * @param bReplace - Whether to replace the current history entry.\n\t * @param targetHash - Resolved hash for the target route.\n\t * @param toRoute - Resolved route name (may differ from routeName for nested routes).\n\t */\n\tprivate _applyPreflightDecision(\n\t\tdecision: GuardDecision,\n\t\trouteName: string,\n\t\tparameters: object | undefined,\n\t\tcomponentTargetInfo: Record<string, ComponentTargetParameters> | undefined,\n\t\tbReplace: boolean | undefined,\n\t\ttargetHash: string,\n\t\ttoRoute: string,\n\t\tbag: Map<string, unknown>,\n\t): void {\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\":\n\t\t\t\tthis._phase = { kind: \"committing\", hash: targetHash, route: toRoute, origin: \"preflight\" };\n\t\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, bReplace);\n\t\t\t\t// Safety: if super.navTo didn't trigger parse (e.g. hash didn't change),\n\t\t\t\t// clear the marker to avoid stale state.\n\t\t\t\tif (this._phase.kind === \"committing\" && this._phase.hash === targetHash) {\n\t\t\t\t\t// Hash didn't change, so parse() wasn't called. Commit manually.\n\t\t\t\t\tthis._commitNavigation(targetHash, toRoute);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(targetHash, false);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\tthis._startRedirectChain(decision.target, targetHash, false, bag);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, targetHash, false);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Intercept hash changes and run the guard pipeline before route matching.\n\t *\n\t * Called by the HashChanger on every `hashChanged` event. Runs leave guards\n\t * (current route), then global + route-specific enter guards (target route).\n\t * Stays synchronous when all guards return plain values; falls back to async\n\t * when a guard returns a Promise. A generation counter discards stale results\n\t * when navigations overlap.\n\t *\n\t * @param newHash - The new hash fragment from the URL.\n\t * @override sap.ui.core.routing.Router#parse\n\t * @since 1.0.1\n\t */\n\toverride parse(newHash: string): void {\n\t\tif (this._suppressedHash !== null) {\n\t\t\tif (newHash === this._suppressedHash) {\n\t\t\t\tthis._suppressedHash = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._suppressedHash = null;\n\t\t}\n\n\t\tif (this._phase.kind === \"committing\") {\n\t\t\tthis._commitNavigation(\n\t\t\t\tnewHash,\n\t\t\t\tthis._phase.route !== \"\" ? this._phase.route : (this.getRouteInfoByHash(newHash)?.name ?? \"\"),\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._currentHash !== null && newHash === this._currentHash) {\n\t\t\tthis._cancelPendingNavigation();\n\t\t\treturn;\n\t\t}\n\n\t\tconst routeInfo = this.getRouteInfoByHash(newHash);\n\t\tconst toRoute = routeInfo?.name ?? \"\";\n\n\t\tthis._cancelPendingNavigation();\n\n\t\tconst controller = new AbortController();\n\t\tconst generation = this._parseGeneration;\n\n\t\tthis._phase = {\n\t\t\tkind: \"evaluating\",\n\t\t\tattempt: { hash: newHash, route: toRoute, controller, generation },\n\t\t};\n\n\t\tconst context = this._createGuardContext(toRoute, newHash, routeInfo, controller.signal);\n\n\t\tconst decision = this._pipeline.evaluate(context);\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tdecision\n\t\t\t\t.then((d: GuardDecision) => {\n\t\t\t\t\tif (generation !== this._parseGeneration || this._phase.kind !== \"evaluating\") {\n\t\t\t\t\t\tLog.debug(\n\t\t\t\t\t\t\t\"Async guard result discarded (superseded by newer navigation)\",\n\t\t\t\t\t\t\tnewHash,\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._applyDecision(d, newHash, toRoute, context.bag);\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\t// Only check generation here, not phase. If _redirect threw and its\n\t\t\t\t\t// finally already reset phase to idle, we still need to drain\n\t\t\t\t\t// settlement resolvers via _errorNavigation.\n\t\t\t\t\tif (generation !== this._parseGeneration) return;\n\t\t\t\t\tLog.error(\n\t\t\t\t\t\t`Guard pipeline failed for \"${newHash}\", navigation failed`,\n\t\t\t\t\t\tString(error),\n\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t);\n\t\t\t\t\tthis._errorNavigation(error, newHash);\n\t\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis._applyDecision(decision, newHash, toRoute, context.bag);\n\t}\n\n\t/**\n\t * Stop listening to hash changes and reset guard state.\n\t *\n\t * Resets `_currentRoute` and `_currentHash` so that a subsequent\n\t * `initialize()` re-parses the current hash and fires `routeMatched`,\n\t * matching the native `sap.m.routing.Router` behavior.\n\t *\n\t * @override sap.ui.core.routing.Router#stop\n\t * @since 1.0.1\n\t */\n\toverride stop(): this {\n\t\t// Cancel first so in-flight navigationSettled() resolvers receive the\n\t\t// Cancelled result before _lastSettlement is cleared below.\n\t\tthis._cancelPendingNavigation();\n\t\tthis._suppressedHash = null;\n\t\tthis._currentRoute = \"\";\n\t\tthis._currentHash = null;\n\t\tthis._lastSettlement = null;\n\t\tsuper.stop();\n\t\treturn this;\n\t}\n\n\t/**\n\t * Invalidate any in-flight async guard work. Bumps the generation counter\n\t * so pending `.then()` callbacks see they are stale, aborts the signal,\n\t * and transitions to idle.\n\t */\n\tprivate _cancelPendingNavigation(): void {\n\t\t++this._parseGeneration;\n\t\tif (this._phase.kind === \"evaluating\") {\n\t\t\tthis._phase.attempt.controller.abort();\n\t\t\tthis._flushSettlement({\n\t\t\t\tstatus: NavigationOutcome.Cancelled,\n\t\t\t\troute: this._currentRoute,\n\t\t\t\thash: this._currentHash ?? \"\",\n\t\t\t});\n\t\t}\n\t\tthis._phase = IDLE;\n\t}\n\n\t/**\n\t * Apply a guard decision for the parse() fallback path.\n\t */\n\tprivate _applyDecision(decision: GuardDecision, hash: string, route: string, bag: Map<string, unknown>): void {\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\":\n\t\t\t\tthis._phase = { kind: \"committing\", hash, route, origin: \"parse\" };\n\t\t\t\tthis._commitNavigation(hash, route);\n\t\t\t\tbreak;\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(hash);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\tthis._startRedirectChain(decision.target, hash, true, bag);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, hash);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Delegate to the parent router and update internal state.\n\t *\n\t * State is updated BEFORE calling parse to ensure that if event handlers\n\t * (e.g., routeMatched) trigger nested navigation, the leave guards will\n\t * run for the correct (new) route rather than the old one.\n\t */\n\tprivate _commitNavigation(hash: string, route?: string): void {\n\t\tconst wasRedirect = this._phase.kind === \"committing\" && this._phase.origin === \"redirect\";\n\t\tthis._currentHash = hash;\n\t\tthis._currentRoute = route ?? this.getRouteInfoByHash(hash)?.name ?? \"\";\n\t\t// Transition to idle before super.parse so that routeMatched/patternMatched\n\t\t// handlers that call navTo() go through the full guard pipeline.\n\t\tthis._phase = IDLE;\n\t\tthis._flushSettlement({\n\t\t\tstatus: wasRedirect\n\t\t\t\t? NavigationOutcome.Redirected\n\t\t\t\t: this._currentRoute === \"\"\n\t\t\t\t\t? NavigationOutcome.Bypassed\n\t\t\t\t\t: NavigationOutcome.Committed,\n\t\t\troute: this._currentRoute,\n\t\t\thash,\n\t\t});\n\t\tsuper.parse(hash);\n\t}\n\n\t/**\n\t * Evaluate guards on a redirect target and apply the resulting decision.\n\t *\n\t * Handles loop detection (visited-hash set + depth cap), unknown-route\n\t * fallback, sync/async guard evaluation, and recursive chaining when\n\t * the target's guard itself returns a redirect. All hops in a chain\n\t * share the same AbortSignal and generation counter from the original\n\t * navigation so that a superseding navigation correctly discards\n\t * in-flight redirect work.\n\t *\n\t * @param target - Redirect target: a route name string or {@link GuardRedirect} with parameters.\n\t * @param chain - Mutable context threaded through the redirect chain (visited set, signals, etc.).\n\t */\n\tprivate _redirect(target: string | GuardRedirect, chain: RedirectChainContext): void {\n\t\tconst targetName = typeof target === \"string\" ? target : target.route;\n\t\tlet targetHash: string | null = null;\n\t\tconst targetParameters = typeof target === \"string\" ? {} : (target.parameters ?? {});\n\t\tconst targetRoute = this.getRoute(targetName);\n\t\tif (targetRoute) {\n\t\t\ttry {\n\t\t\t\ttargetHash = targetRoute.getURL(targetParameters);\n\t\t\t} catch {\n\t\t\t\ttargetHash = null;\n\t\t\t}\n\t\t}\n\n\t\t// Loop detection: visited set (exact hash match) + depth cap.\n\t\tif (targetHash !== null && chain.visited.has(targetHash)) {\n\t\t\tLog.error(\n\t\t\t\t`Guard redirect loop detected: ${[...chain.visited, targetHash].join(\" -> \")}`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\t\tif (chain.visited.size > MAX_REDIRECT_DEPTH) {\n\t\t\tLog.error(\n\t\t\t\t`Guard redirect chain exceeded maximum depth (${MAX_REDIRECT_DEPTH}): ${[...chain.visited].join(\" -> \")}`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\t\tif (targetHash !== null) {\n\t\t\tchain.visited.add(targetHash);\n\t\t}\n\n\t\t// If the target route doesn't exist or the hash couldn't be resolved,\n\t\t// attempt navTo (parent may fire bypassed) and fall back to blocked.\n\t\tif (targetHash === null) {\n\t\t\tconst settlementBefore = this._lastSettlement;\n\t\t\tthis._phase = { kind: \"committing\", hash: \"\", route: targetName, origin: \"redirect\" };\n\t\t\ttry {\n\t\t\t\tif (typeof target === \"string\") {\n\t\t\t\t\tthis.navTo(target, {}, {}, true);\n\t\t\t\t} else {\n\t\t\t\t\tthis.navTo(target.route, target.parameters ?? {}, target.componentTargetInfo, true);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (this._phase.kind === \"committing\") {\n\t\t\t\t\tthis._phase = IDLE;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._lastSettlement === settlementBefore) {\n\t\t\t\tLog.warning(\n\t\t\t\t\t`Guard redirect target \"${targetName}\" did not produce a navigation, treating as blocked`,\n\t\t\t\t\tundefined,\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Narrowed after the null-branch early return; const carries it into the async closure.\n\t\tconst resolvedHash: string = targetHash;\n\n\t\t// Build guard context for the redirect target.\n\t\tconst routeInfo = this.getRouteInfoByHash(resolvedHash);\n\t\tconst context: GuardContext = {\n\t\t\ttoRoute: routeInfo?.name ?? \"\",\n\t\t\ttoHash: resolvedHash,\n\t\t\ttoArguments: routeInfo?.arguments ?? {},\n\t\t\tfromRoute: chain.fromRoute,\n\t\t\tfromHash: chain.fromHash,\n\t\t\tsignal: chain.signal,\n\t\t\tbag: chain.bag,\n\t\t\ttoMeta: this.getRouteMeta(routeInfo?.name ?? \"\"),\n\t\t\tfromMeta: this.getRouteMeta(chain.fromRoute),\n\t\t};\n\n\t\tconst decision = this._pipeline.evaluate(context, { skipLeaveGuards: true });\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tdecision\n\t\t\t\t.then((d: GuardDecision) => {\n\t\t\t\t\tif (chain.generation !== this._parseGeneration) return;\n\t\t\t\t\tthis._applyRedirectDecision(d, target, resolvedHash, chain);\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\tif (chain.generation !== this._parseGeneration) return;\n\t\t\t\t\tLog.error(\n\t\t\t\t\t\t`Guard pipeline failed during redirect chain for \"${targetName}\", navigation failed`,\n\t\t\t\t\t\tString(error),\n\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t);\n\t\t\t\t\tthis._errorNavigation(error, chain.attemptedHash, chain.restoreHash);\n\t\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tthis._applyRedirectDecision(decision, target, resolvedHash, chain);\n\t}\n\n\t/**\n\t * Apply a guard decision within a redirect chain. For \"allow\", enter\n\t * committing phase and delegate to navTo (which hits the existing bypass).\n\t * For \"block\", block the entire chain. For \"redirect\", recurse.\n\t *\n\t * @param decision - Normalized guard pipeline result for this hop.\n\t * @param target - The redirect target (route name or {@link GuardRedirect}).\n\t * @param targetHash - Resolved hash for the redirect target (guaranteed non-null).\n\t * @param chain - Shared redirect chain context with visited set, signals, etc.\n\t */\n\tprivate _applyRedirectDecision(\n\t\tdecision: GuardDecision,\n\t\ttarget: string | GuardRedirect,\n\t\ttargetHash: string,\n\t\tchain: RedirectChainContext,\n\t): void {\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\": {\n\t\t\t\tconst targetName = typeof target === \"string\" ? target : target.route;\n\t\t\t\tconst settlementBefore = this._lastSettlement;\n\t\t\t\tthis._phase = { kind: \"committing\", hash: targetHash, route: targetName, origin: \"redirect\" };\n\t\t\t\ttry {\n\t\t\t\t\tif (typeof target === \"string\") {\n\t\t\t\t\t\tthis.navTo(target, {}, {}, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.navTo(target.route, target.parameters ?? {}, target.componentTargetInfo, true);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (this._phase.kind === \"committing\") {\n\t\t\t\t\t\tthis._phase = IDLE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Safety net: if navTo didn't produce a settlement (e.g. unknown route\n\t\t\t\t// or redirect to current hash where HashChanger doesn't fire), handle it.\n\t\t\t\tif (this._lastSettlement === settlementBefore) {\n\t\t\t\t\tconst redirectsToCurrentHash = targetHash === (this._currentHash ?? \"\");\n\t\t\t\t\tif (redirectsToCurrentHash) {\n\t\t\t\t\t\tthis._phase = {\n\t\t\t\t\t\t\tkind: \"committing\",\n\t\t\t\t\t\t\thash: this._currentHash ?? \"\",\n\t\t\t\t\t\t\troute: this._currentRoute,\n\t\t\t\t\t\t\torigin: \"redirect\",\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis._commitNavigation(this._currentHash ?? \"\", this._currentRoute);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tLog.warning(\n\t\t\t\t\t\t`Guard redirect target \"${targetName}\" did not produce a navigation, treating as blocked`,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t);\n\t\t\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\tthis._redirect(decision.target, chain);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, chain.attemptedHash, chain.restoreHash);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Build a guard context for a new navigation.\n\t * Called by {@link navTo} (preflight path) and {@link parse} (browser-initiated path).\n\t */\n\tprivate _createGuardContext(\n\t\ttoRoute: string,\n\t\ttoHash: string,\n\t\trouteInfo: { arguments: Record<string, string | Record<string, string>> } | undefined,\n\t\tsignal: AbortSignal,\n\t): GuardContext {\n\t\treturn {\n\t\t\ttoRoute,\n\t\t\ttoHash,\n\t\t\ttoArguments: routeInfo?.arguments ?? {},\n\t\t\tfromRoute: this._currentRoute,\n\t\t\tfromHash: this._currentHash ?? \"\",\n\t\t\tsignal,\n\t\t\tbag: new Map(),\n\t\t\ttoMeta: this.getRouteMeta(toRoute),\n\t\t\tfromMeta: this.getRouteMeta(this._currentRoute),\n\t\t};\n\t}\n\n\t/**\n\t * Start a new redirect chain from the current evaluating phase.\n\t * Called by {@link _applyPreflightDecision} and {@link _applyDecision}\n\t * when a guard returns a redirect. Delegates to {@link _redirect} with\n\t * a fresh {@link RedirectChainContext}.\n\t */\n\tprivate _startRedirectChain(\n\t\ttarget: string | GuardRedirect,\n\t\thash: string,\n\t\trestoreHash: boolean,\n\t\tbag: Map<string, unknown>,\n\t): void {\n\t\tconst { attempt } = this._phase as PhaseEvaluating;\n\t\tconst visited = new Set<string>();\n\t\tvisited.add(hash);\n\t\tthis._redirect(target, {\n\t\t\tvisited,\n\t\t\tattemptedHash: hash,\n\t\t\trestoreHash,\n\t\t\tfromRoute: this._currentRoute,\n\t\t\tfromHash: this._currentHash ?? \"\",\n\t\t\tsignal: attempt.controller.signal,\n\t\t\tgeneration: attempt.generation,\n\t\t\tbag,\n\t\t});\n\t}\n\n\t/**\n\t * Clear pending state and flush a Blocked settlement.\n\t * When `restoreHash` is true (default), also restores the browser hash\n\t * to `_currentHash`. Preflight callers pass false because the hash was\n\t * never changed.\n\t */\n\tprivate _blockNavigation(attemptedHash?: string, restoreHash = true): void {\n\t\tthis._phase = IDLE;\n\t\tthis._flushSettlement({\n\t\t\tstatus: NavigationOutcome.Blocked,\n\t\t\troute: this._currentRoute,\n\t\t\thash: this._currentHash ?? \"\",\n\t\t});\n\t\tthis._restoreHashIfNeeded(attemptedHash, restoreHash);\n\t}\n\n\t/**\n\t * Clear pending state and flush an Error settlement.\n\t * Same structure as {@link _blockNavigation} but with `NavigationOutcome.Error`\n\t * and the error that caused the failure.\n\t */\n\tprivate _errorNavigation(error: unknown, attemptedHash?: string, restoreHash = true): void {\n\t\tthis._phase = IDLE;\n\t\tthis._flushSettlement({\n\t\t\tstatus: NavigationOutcome.Error,\n\t\t\troute: this._currentRoute,\n\t\t\thash: this._currentHash ?? \"\",\n\t\t\terror,\n\t\t});\n\t\tthis._restoreHashIfNeeded(attemptedHash, restoreHash);\n\t}\n\n\t/** Conditionally restore the browser hash after a blocked or errored navigation. */\n\tprivate _restoreHashIfNeeded(attemptedHash: string | undefined, restoreHash: boolean): void {\n\t\tif (!restoreHash) return;\n\t\tif (this._currentHash === null && attemptedHash && attemptedHash !== \"\") {\n\t\t\tthis._restoreHash(\"\", false);\n\t\t\treturn;\n\t\t}\n\t\tthis._restoreHash(this._currentHash ?? \"\");\n\t}\n\n\t/**\n\t * Restore the previous hash without creating a history entry.\n\t * Assumes replaceHash fires hashChanged synchronously (validated by test).\n\t * `_currentRoute` stays unchanged because the navigation never\n\t * committed. The user remains on the same logical route.\n\t */\n\tprivate _restoreHash(hash: string, suppressParse = true): void {\n\t\tconst hashChanger = this.getHashChanger();\n\t\tif (hashChanger) {\n\t\t\tthis._suppressedHash = suppressParse ? hash : null;\n\t\t\thashChanger.replaceHash(hash, HistoryDirection.Unknown);\n\t\t\tif (this._suppressedHash === hash) {\n\t\t\t\tthis._suppressedHash = null;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Collect all route names and their patterns from the router.\n\t * Skips routes whose pattern is undefined (no pattern configured).\n\t */\n\tprivate _collectRoutePatterns(): { name: string; pattern: string }[] {\n\t\tconst result: { name: string; pattern: string }[] = [];\n\t\tfor (const name of this._routeNames) {\n\t\t\tconst route = this.getRoute(name);\n\t\t\tif (route) {\n\t\t\t\tconst pattern = route.getPattern();\n\t\t\t\tif (pattern !== undefined) {\n\t\t\t\t\tresult.push({ name, pattern });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Expand guard descriptors to descendant routes when guard inheritance\n\t * is set to `\"pattern-tree\"`. Global (`\"*\"`) descriptors are kept as-is.\n\t * Descriptors are sorted by pattern depth (ancestor guards run before\n\t * descendant guards).\n\t */\n\tprivate _expandGuardDescriptors(descriptors: GuardDescriptor[]): GuardDescriptor[] {\n\t\tconst allRoutes = this._collectRoutePatterns();\n\t\tif (allRoutes.length === 0) return descriptors;\n\n\t\t// Build a name -> pattern map for quick lookup\n\t\tconst patternByName = new Map(allRoutes.map((r) => [r.name, r.pattern]));\n\n\t\tconst expanded: GuardDescriptor[] = [];\n\n\t\tfor (const descriptor of descriptors) {\n\t\t\texpanded.push(descriptor);\n\n\t\t\t// Global guards and routes without a known pattern are not expanded\n\t\t\tif (descriptor.route === \"*\") continue;\n\t\t\tconst ancestorPattern = patternByName.get(descriptor.route);\n\t\t\tif (ancestorPattern === undefined) continue;\n\n\t\t\t// Find descendant routes whose pattern extends the ancestor's pattern\n\t\t\tfor (const { name, pattern } of allRoutes) {\n\t\t\t\tif (name === descriptor.route) continue;\n\t\t\t\tif (isPatternAncestor(ancestorPattern, pattern)) {\n\t\t\t\t\texpanded.push({ ...descriptor, route: name });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Sort by pattern depth (segment count) so ancestor guards run first.\n\t\t// Global (\"*\") descriptors return 0 here -- their relative position is irrelevant\n\t\t// because GuardPipeline evaluates globals separately from route-specific guards.\n\t\treturn expanded.toSorted((a, b) => {\n\t\t\tif (a.route === \"*\" || b.route === \"*\") return 0;\n\t\t\tconst pa = patternByName.get(a.route) ?? \"\";\n\t\t\tconst pb = patternByName.get(b.route) ?? \"\";\n\t\t\treturn patternSegments(pa).length - patternSegments(pb).length;\n\t\t});\n\t}\n\n\t/**\n\t * Resolve metadata for a route without inheritance (flat merge of\n\t * manifest and runtime metadata).\n\t */\n\tprivate _resolveFlatMeta(routeName: string): Readonly<Record<string, unknown>> {\n\t\tconst manifest = this._manifestMeta.get(routeName);\n\t\tconst runtime = this._runtimeMeta.get(routeName);\n\t\tif (!manifest && !runtime) return Router._EMPTY_META;\n\t\tif (!runtime) return manifest!;\n\t\tif (!manifest) return runtime;\n\t\treturn Object.freeze({ ...manifest, ...runtime });\n\t}\n\n\t/**\n\t * Resolve metadata for a route with pattern-tree inheritance.\n\t * Walks ancestor patterns shallowest-first, merging manifest and\n\t * runtime metadata at each level, then overlays the route's own.\n\t */\n\tprivate _resolveInheritedMeta(routeName: string): Readonly<Record<string, unknown>> {\n\t\tconst allRoutes = this._collectRoutePatterns();\n\t\tconst routeEntry = allRoutes.find((r) => r.name === routeName);\n\t\tif (!routeEntry) return this._resolveFlatMeta(routeName);\n\n\t\t// Find ancestors that have declared metadata (manifest or runtime)\n\t\tconst ancestors = allRoutes.filter(\n\t\t\t(r) =>\n\t\t\t\tr.name !== routeName &&\n\t\t\t\t(this._manifestMeta.has(r.name) || this._runtimeMeta.has(r.name)) &&\n\t\t\t\tisPatternAncestor(r.pattern, routeEntry.pattern),\n\t\t);\n\t\t// oxlint-disable-next-line unicorn/no-array-sort -- ancestors is a fresh array from filter()\n\t\tancestors.sort((a, b) => patternSegments(a.pattern).length - patternSegments(b.pattern).length);\n\n\t\t// Merge shallowest-first: root ancestor -> deeper ancestors -> own manifest -> own runtime\n\t\tconst merged: Record<string, unknown> = {};\n\n\t\tfor (const ancestor of ancestors) {\n\t\t\tconst ancestorManifest = this._manifestMeta.get(ancestor.name);\n\t\t\tif (ancestorManifest) Object.assign(merged, ancestorManifest);\n\t\t\tconst ancestorRuntime = this._runtimeMeta.get(ancestor.name);\n\t\t\tif (ancestorRuntime) Object.assign(merged, ancestorRuntime);\n\t\t}\n\n\t\tconst ownManifest = this._manifestMeta.get(routeName);\n\t\tif (ownManifest) Object.assign(merged, ownManifest);\n\t\tconst ownRuntime = this._runtimeMeta.get(routeName);\n\t\tif (ownRuntime) Object.assign(merged, ownRuntime);\n\n\t\tif (Object.keys(merged).length === 0) return Router._EMPTY_META;\n\t\treturn Object.freeze(merged);\n\t}\n\n\t/**\n\t * Load guard modules individually via `sap.ui.require` and register\n\t * each resolved function with the appropriate guard API.\n\t *\n\t * Each module is loaded in its own `sap.ui.require` call so that a\n\t * single invalid path only skips that guard (with a warning) rather\n\t * than failing the entire batch. Once all loads settle, guards\n\t * register in declaration order. Registration errors (e.g. from\n\t * `unknownRouteRegistration: \"throw\"`) are caught per-module.\n\t */\n\tprivate _loadAndRegisterGuards(descriptors: GuardDescriptor[]): Promise<void> {\n\t\tconst promises = descriptors.map((descriptor) => {\n\t\t\treturn new Promise<{ descriptor: GuardDescriptor; moduleExport: unknown }>((resolve) => {\n\t\t\t\tsap.ui.require(\n\t\t\t\t\t[descriptor.modulePath],\n\t\t\t\t\t(moduleExport: unknown) => {\n\t\t\t\t\t\tresolve({ descriptor, moduleExport });\n\t\t\t\t\t},\n\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\tLog.warning(\n\t\t\t\t\t\t\t`guardRouter.guards: failed to load module \"${descriptor.modulePath}\", skipping`,\n\t\t\t\t\t\t\tString(err),\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tresolve({ descriptor, moduleExport: null });\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\t\treturn Promise.all(promises).then((results) => {\n\t\t\tfor (const { descriptor, moduleExport } of results) {\n\t\t\t\tif (moduleExport === null) continue;\n\t\t\t\tconst exports = resolveModuleExports(\n\t\t\t\t\tmoduleExport,\n\t\t\t\t\tdescriptor.modulePath,\n\t\t\t\t\tdescriptor.name,\n\t\t\t\t\tdescriptor.exportKey,\n\t\t\t\t);\n\t\t\t\tfor (const { fn } of exports) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthis._registerGuardFromDescriptor(descriptor, fn);\n\t\t\t\t\t} catch (err: unknown) {\n\t\t\t\t\t\tLog.error(\n\t\t\t\t\t\t\t`guardRouter.guards: failed to register \"${descriptor.modulePath}\"`,\n\t\t\t\t\t\t\tString(err),\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Route a parsed guard descriptor to the correct registration method.\n\t */\n\tprivate _registerGuardFromDescriptor(descriptor: GuardDescriptor, guardFn: GuardFn): void {\n\t\tif (descriptor.route === \"*\") {\n\t\t\tthis.addGuard(guardFn);\n\t\t} else if (descriptor.type === \"leave\") {\n\t\t\tif (!this._handleUnknownRouteRegistration(descriptor.route, \"addLeaveGuard\")) return;\n\t\t\tthis._pipeline.addLeaveGuard(descriptor.route, guardFn);\n\t\t} else {\n\t\t\tthis.addRouteGuard(descriptor.route, guardFn);\n\t\t}\n\t}\n\n\t/**\n\t * Register lazy wrapper functions that load guard modules on first use.\n\t *\n\t * Cherry-picked descriptors (with exportKey) get one lazy wrapper each.\n\t * Bare-path descriptors try a sync cache probe first; if the module is\n\t * cached (preload likely finished), all guards are expanded immediately.\n\t * On cache miss, a single \"expander\" wrapper loads the module on first\n\t * navigation, registers remaining guards, and executes the first.\n\t */\n\tprivate _registerLazyGuards(descriptors: GuardDescriptor[]): void {\n\t\tfor (const descriptor of descriptors) {\n\t\t\tconst { modulePath, exportKey, name } = descriptor;\n\n\t\t\tif (exportKey !== undefined) {\n\t\t\t\t// Cherry-picked: one lazy wrapper, resolves to exactly one guard\n\t\t\t\tconst lazyGuard = (context: GuardContext): GuardResult | PromiseLike<GuardResult> => {\n\t\t\t\t\tconst cached = sap.ui.require(modulePath) as unknown;\n\t\t\t\t\tif (cached !== undefined) {\n\t\t\t\t\t\tconst exports = resolveModuleExports(cached, modulePath, name, exportKey);\n\t\t\t\t\t\tif (exports.length === 0) return true;\n\t\t\t\t\t\treturn exports[0].fn(context);\n\t\t\t\t\t}\n\t\t\t\t\treturn new Promise<GuardResult>((resolve, reject) => {\n\t\t\t\t\t\tsap.ui.require(\n\t\t\t\t\t\t\t[modulePath],\n\t\t\t\t\t\t\t(mod: unknown) => {\n\t\t\t\t\t\t\t\tconst exports = resolveModuleExports(mod, modulePath, name, exportKey);\n\t\t\t\t\t\t\t\tif (exports.length === 0) {\n\t\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tresolve(exports[0].fn(context));\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\t\tLog.warning(\n\t\t\t\t\t\t\t\t\t`guardRouter.guards: lazy load of \"${modulePath}\" failed`,\n\t\t\t\t\t\t\t\t\tString(err),\n\t\t\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tthis._registerGuardFromDescriptor(descriptor, lazyGuard);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Bare-path: try sync expansion from cache (preload likely finished)\n\t\t\tconst cached = sap.ui.require(modulePath) as unknown;\n\t\t\tif (cached !== undefined) {\n\t\t\t\tconst exports = resolveModuleExports(cached, modulePath, name);\n\t\t\t\tfor (const exp of exports) {\n\t\t\t\t\tthis._registerGuardFromDescriptor(descriptor, exp.fn);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Cache miss: register an expander that loads, expands once, and runs guard[0].\n\t\t\t// NOTE: Guards 1..N are appended to the guard array on first invocation,\n\t\t\t// which means they execute AFTER any imperative guards registered between\n\t\t\t// initialize() and first navigation. This differs from block mode where\n\t\t\t// all guards occupy contiguous positions. In practice this is rare because\n\t\t\t// the preload hint fires in the constructor and modules are typically cached\n\t\t\t// by the time initialize() runs.\n\t\t\tlet expanded = false;\n\t\t\tconst lazyExpander = (context: GuardContext): PromiseLike<GuardResult> => {\n\t\t\t\treturn new Promise<GuardResult>((resolve, reject) => {\n\t\t\t\t\tsap.ui.require(\n\t\t\t\t\t\t[modulePath],\n\t\t\t\t\t\t(mod: unknown) => {\n\t\t\t\t\t\t\tconst exports = resolveModuleExports(mod, modulePath, name);\n\t\t\t\t\t\t\tif (exports.length === 0) {\n\t\t\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!expanded) {\n\t\t\t\t\t\t\t\texpanded = true;\n\t\t\t\t\t\t\t\tfor (let i = 1; i < exports.length; i++) {\n\t\t\t\t\t\t\t\t\tthis._registerGuardFromDescriptor(descriptor, exports[i].fn);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tresolve(exports[0].fn(context));\n\t\t\t\t\t\t},\n\t\t\t\t\t\t(err: Error) => {\n\t\t\t\t\t\t\tLog.warning(\n\t\t\t\t\t\t\t\t`guardRouter.guards: lazy load of \"${modulePath}\" failed`,\n\t\t\t\t\t\t\t\tString(err),\n\t\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t};\n\t\t\tthis._registerGuardFromDescriptor(descriptor, lazyExpander);\n\t\t}\n\t}\n\n\t/**\n\t * Clean up guards on destroy. Bumps generation to discard pending async results.\n\t *\n\t * @since 1.0.1\n\t */\n\toverride destroy(): this {\n\t\tthis._destroyed = true;\n\t\tthis._pipeline.clear();\n\t\tthis._pendingGuardDescriptors = [];\n\t\tthis._sourceDescriptors = [];\n\t\tthis._cancelPendingNavigation();\n\t\tthis._suppressedHash = null;\n\t\tthis._lastSettlement = null;\n\t\tthis._manifestMeta.clear();\n\t\tthis._runtimeMeta.clear();\n\t\tthis._resolvedMetaCache.clear();\n\t\tsuper.destroy();\n\t\treturn this;\n\t}\n}\n"],"mappings":";;;;;;QAsBOA,iBAAiB,GAAAC,sBAAA,CAAAC,mBAAA;EAAA,MACjBC,aAAa,GAAAF,sBAAA,CAAAG,eAAA;EAAA,MAAwBC,aAAa,GAAAD,eAAA;EAEzD,MAAME,gBAAgB,GAAGC,WAAW,CAACC,OAAO,CAACF,gBAAgB;EAE7D,MAAMG,aAAa,GAAG,yBAAyB;EAE/C,SAASC,kBAAkBA,CAACC,KAAiC,EAA6B;IACzF,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI;EACnD;;EAEA;;EA0BA,MAAMC,IAAe,GAAG;IAAEC,IAAI,EAAE;EAAO,CAAC;;EAExC;EACA,SAASC,QAAQA,CAACC,KAAc,EAAoC;IACnE,IAAI,OA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CAAC9J,UAAU,EAAEoK,YAAY,CAAC;MAC5D;IACD,CAAC;IAED;AACD;AACA;AACA;AACA;IACUC,OAAO,WAAAC,SAAA,EAAS;MACxB,IAAI,CAAClN,UAAU,GAAG,IAAI;MACtB,IAAI,CAACV,SAAS,CAAC+C,KAAK,CAAC,CAAC;MACtB,IAAI,CAACvC,wBAAwB,GAAG,EAAE;MAClC,IAAI,CAACC,kBAAkB,GAAG,EAAE;MAC5B,IAAI,CAACoH,wBAAwB,CAAC,CAAC;MAC/B,IAAI,CAACxH,eAAe,GAAG,IAAI;MAC3B,IAAI,CAACE,eAAe,GAAG,IAAI;MAC3B,IAAI,CAACI,aAAa,CAACoC,KAAK,CAAC,CAAC;MAC1B,IAAI,CAAClC,YAAY,CAACkC,KAAK,CAAC,CAAC;MACzB,IAAI,CAACjC,kBAAkB,CAACiC,KAAK,CAAC,CAAC;MAC/B8K,mCAAA;MACA,OAAO,IAAI;IACZ;EAAC;EApgDmB5O,MAAM,CAiZF6G,WAAW,GAAsC7M,MAAM,CAACoI,MAAM,CAAC,CAAC,CAAC,CAAC;EAAA,OAjZtEpC,MAAM;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Router-dbg.js","names":["NavigationOutcome","_interopRequireDefault","__NavigationOutcome","GuardPipeline","__GuardPipeline","isPromiseLike","isPromiseResolver","LOG_COMPONENT","isRecord","___GuardConfig","parseGuardRouterConfig","createLazyGuards","___GuardModules","loadGuardModules","byRouteDepth","___PatternTree","expandForNewRoute","expandToDescendants","RouteMetaStore","__RouteMetaStore","EMPTY_META","HistoryDirection","coreLibrary","routing","withoutGuardRouter","config","hidden","key","Proxy","get","target","receiver","undefined","Reflect","has","ownKeys","filter","getOwnPropertyDescriptor","isRouteGuardConfig","guard","lastStep","undoneHref","window","navigation","addEventListener","event","href","location","entry","currentEntry","navigationType","offset","index","from","IDLE","kind","MAX_REDIRECT_DEPTH","Router","MobileRouter","extend","constructor","_constructor","routes","owner","rest","isRecordConfig","guardRouter","MobileRouter.prototype.constructor.apply","_pipeline","_currentRoute","_currentHash","_phase","_parseGeneration","_suppressedHash","_undo","_reportedHash","_lastReport","_reportOutdated","_rootHashChanger","_stoppedRoute","_settlementResolvers","_lastSettlement","_sourceDescriptors","_manifestGuards","_destroyed","_nativeMatching","_matchWaiters","_blockLoad","_ownerComponent","_routeNames","_greedyRouteNames","_mirrorMatchingProcess","componentNamespace","appConfig","getManifestEntry","id","parsed","_options","options","_meta","routeMeta","inheritance","_collectRoutePatterns","_pendingGuardDescriptors","guards","guardLoading","uniquePaths","Set","map","d","modulePath","sap","ui","require","Object","defineProperty","_isMatching","set","matching","postponed","attachRouteMatched","_attachRouteMatched","oData","fnFunction","oListener","isInitialized","push","MobileRouter.prototype.attachRouteMatched.call","_settleMatchWaiters","waiters","resolve","initialize","_initialize","bIgnoreInitialHash","start","ignoreInitialHash","length","_start","descriptors","source","expandedDescriptors","_registerLazyGuards","blockLoad","then","results","descriptor","fn","_registerManifestGuard","starting","getHashChanger","attachEvent","_onHashReported","HashChanger","getInstance","_onRootHashChanged","MobileRouter.prototype.initialize.call","shownHash","getHash","newHash","getParameter","shown","oldHash","hashChanger","_completeUndo","detachEvent","queueMicrotask","undo","first","fullHash","awaitsReport","_replaceFullHash","addRoute","_addRoute","oConfig","oParent","MobileRouter.prototype.addRoute.call","name","includes","greedy","invalidate","patterns","declared","Map","r","pattern","rankOf","findIndex","rank","next","route","type","toSorted","a","b","addGuard","_addGuard","_isFn","addGlobalGuard","removeGuard","_removeGuard","removeGlobalGuard","addRouteGuard","_addRouteGuard","routeName","_handleUnknownRouteRegistration","hasHandler","beforeEnter","addEnterGuard","beforeLeave","addLeaveGuard","Log","info","removeRouteGuard","_removeRouteGuard","removeLeaveGuard","removeEnterGuard","_addLeaveGuard","_resolveNavToArgs","componentTargetInfoOrReplace","replaceOrOptions","replace","guardOptions","componentTargetInfo","value","method","detail","warning","methodName","kept","getRoute","unknownRouteRegistration","Error","_removeLeaveGuard","getRouteMeta","_getRouteMeta","setRouteMeta","_setRouteMeta","meta","navigationSettled","_navigationSettled","Promise","status","Committed","hash","attachNavigationSettled","_attachNavigationSettled","detachNavigationSettled","_detachNavigationSettled","_flushSettlement","result","debug","resolvers","fireEvent","error","String","navTo","_navTo","parameters","origin","MobileRouter.prototype.navTo.call","_cancelPendingNavigation","targetHash","getURL","routeInfo","_matchRoute","toRoute","skipGuards","navToPreflight","attempt","restoreHash","_pendingRestoresHash","_navigateAllowed","_startAttempt","generation","context","_createGuardContext","controller","signal","decision","_evaluateGuards","_applyWhenDecided","_applyPreflightDecision","bag","bReplace","writtenOver","_commitAfterNavTo","_blockNavigation","action","_startRedirectChain","_errorNavigation","parse","_parse","MobileRouter.prototype.parse.call","reported","started","_finishRestore","phase","commit","_commitNavigation","currentHash","pendingUndo","undoing","_describeUndo","direction","History","getDirection","_applyDecision","stop","_stop","_detachHashListeners","MobileRouter.prototype.stop.call","pendingRestoresHash","abort","_settleUncommitted","Cancelled","AbortController","apply","attemptedHash","lastSettlement","_alignTitleHistory","NewEntry","Forwards","Backwards","titles","getTitleHistory","left","at","replaced","isHome","title","splice","wasRedirect","Redirected","Bypassed","keys","_redirect","chain","targetName","targetRoute","visited","join","size","add","_applyRedirectDecision","hashShown","getRouteInfoByHash","arguments","_greedyMatches","firstMatch","match","redirectHop","evaluate","skipLeaveGuards","alsoLeaving","fromHash","fromRoute","alsoEntering","toHash","toArguments","toMeta","fromMeta","ownerComponent","Blocked","whenBack","loadDefaultRoute","_undoHashChange","_restoreHash","pending","step","rootHash","history","go","replaceHash","Unknown","suppressParse","getPattern","guardFn","before","err","destroy","_destroy","clear","MobileRouter.prototype.destroy.call"],"sourceRoot":"./","sources":["Router.ts"],"sourcesContent":["import MobileRouter from \"sap/m/routing/Router\";\nimport Log from \"sap/base/Log\";\nimport coreLibrary from \"sap/ui/core/library\";\nimport HashChanger from \"sap/ui/core/routing/HashChanger\";\nimport History from \"sap/ui/core/routing/History\";\nimport type { HashChangerBase$HashChangedEvent } from \"sap/ui/core/routing/HashChangerBase\";\nimport type { ComponentTargetParameters, RouteInfo, Router$RouteMatchedEvent } from \"sap/ui/core/routing/Router\";\nimport type Route from \"sap/ui/core/routing/Route\";\nimport type { $RouteSettings } from \"sap/ui/core/routing/Route\";\nimport type UIComponent from \"sap/ui/core/UIComponent\";\nimport type {\n\tGuardFn,\n\tGuardContext,\n\tGuardNavToOptions,\n\tGuardRedirect,\n\tGuardRouter,\n\tGuardRouterConfig,\n\tLeaveGuardFn,\n\tNavigationResult,\n\tRouter$NavigationSettledEvent,\n\tRouteGuardConfig,\n} from \"./types\";\nimport NavigationOutcome from \"./NavigationOutcome\";\nimport GuardPipeline, { type GuardDecision, isPromiseLike, isPromiseResolver, LOG_COMPONENT } from \"./GuardPipeline\";\nimport { type GuardDescriptor, isRecord, parseGuardRouterConfig, type ResolvedGuardRouterOptions } from \"./GuardConfig\";\nimport { createLazyGuards, loadGuardModules } from \"./GuardModules\";\nimport { byRouteDepth, expandForNewRoute, expandToDescendants, type RoutePattern } from \"./PatternTree\";\nimport RouteMetaStore, { EMPTY_META } from \"./RouteMeta\";\n\nconst HistoryDirection = coreLibrary.routing.HistoryDirection;\ntype Direction = ReturnType<History[\"getDirection\"]>;\n\n/**\n * The router config as UI5 gets it: the caller's object without `guardRouter`. It is a view and\n * not a copy, because UIComponent adds `targetParent` (the ID of the root view) to its config\n * object after it has constructed the router, and the native router reads it from that object.\n */\nfunction withoutGuardRouter(config: object): object {\n\tconst hidden = (key: PropertyKey): boolean => key === \"guardRouter\";\n\treturn new Proxy(config, {\n\t\tget: (target, key, receiver): unknown => (hidden(key) ? undefined : Reflect.get(target, key, receiver)),\n\t\thas: (target, key) => !hidden(key) && Reflect.has(target, key),\n\t\townKeys: (target) => Reflect.ownKeys(target).filter((key) => !hidden(key)),\n\t\tgetOwnPropertyDescriptor: (target, key) =>\n\t\t\thidden(key) ? undefined : Reflect.getOwnPropertyDescriptor(target, key),\n\t});\n}\n\nfunction isRouteGuardConfig(guard: GuardFn | RouteGuardConfig): guard is RouteGuardConfig {\n\treturn typeof guard === \"object\" && guard !== null;\n}\n\n/** A step through the browser history (back, forward): how far it went, and the URL it arrived at. */\ninterface HistoryStep {\n\treadonly offset: number;\n\treadonly href: string;\n}\n\n/** The step through the browser history that brought the browser to the URL it shows, if a step did. */\nlet lastStep: HistoryStep | null = null;\n/** The URL of a step that a router is taking back, until the browser reports the next URL change. */\nlet undoneHref: string | null = null;\n\n// The Navigation API tells how far a step through the history went, before UI5 learns of the\n// hash change. UI5's History only infers it, and wrongly once an entry lacks its state. Without\n// the API (Firefox before 147, Safari before 26.2) no step is known and the entry is replaced.\nwindow.navigation?.addEventListener(\"currententrychange\", (event) => {\n\tconst href = window.location.href;\n\tif (undoneHref !== href) undoneHref = null;\n\tconst entry = window.navigation.currentEntry;\n\tif (entry && event.navigationType === \"traverse\") {\n\t\tlastStep = { offset: entry.index - event.from.index, href };\n\t} else if (lastStep?.href !== href) {\n\t\t// Not an entry whose state alone is replaced, as UI5's History does after a step.\n\t\tlastStep = null;\n\t}\n});\n\n/** What it takes to undo the hash change that an uncommitted navigation arrived with. */\ninterface HashChangeUndo {\n\t/** The hash of the root hash changer after the first change that this takes back. */\n\treadonly first: string;\n\t/**\n\t * The hash of the root hash changer before that change, with the hashes of nested routers.\n\t * The root hash changer reports it with the change, after the routers have parsed their part.\n\t */\n\tfullHash: string | undefined;\n\t/** The hash of the root hash changer after the change. */\n\treadonly shown: string;\n\t/** Whether the router has started to put the URL back, and the hash change that does it is still to come. */\n\tstarted: boolean;\n\t/** The step through the browser history that the change was, if it was one. */\n\treadonly step: HistoryStep | null;\n}\n\n/** A manifest guard entry of a route, with the declared entry it stems from: itself, or the entry of an ancestor route. */\ninterface ManifestGuardDescriptor extends GuardDescriptor {\n\treadonly source: GuardDescriptor;\n}\n\n/** Snapshot of an in-flight navigation being evaluated by the guard pipeline. */\ninterface NavigationAttempt {\n\treadonly hash: string;\n\treadonly controller: AbortController;\n\treadonly generation: number;\n\t/** Whether the URL shows a hash that never committed, so that it must be restored unless this attempt moves it. */\n\treadonly restoreHash: boolean;\n\t/** How the browser got to the hash that started the navigation; `undefined` after `navTo()` or `parse()`. */\n\treadonly direction: Direction | undefined;\n}\n\ninterface PhaseIdle {\n\treadonly kind: \"idle\";\n}\n\ninterface PhaseEvaluating {\n\treadonly kind: \"evaluating\";\n\treadonly attempt: NavigationAttempt;\n\t/** Whether the navigation waits for async guards: the native router would be matching its route by now. */\n\treadonly postponed?: true;\n}\n\ninterface PhaseCommitting {\n\treadonly kind: \"committing\";\n\treadonly route: string;\n\t/** The hash of the route: `parse()` commits the navigation when it receives this hash. */\n\treadonly hash: string;\n\treadonly origin: \"preflight\" | \"redirect\" | \"parse\";\n\t/** How the browser got to the history entry that the route replaces (see {@link RedirectChainContext.direction}). */\n\treadonly direction?: Direction;\n\t/** Whether the URL showed a hash that never committed when `navTo()` wrote the hash (see {@link NavigationAttempt.restoreHash}). */\n\treadonly restoreHash: boolean;\n\t/** What the root hash changer showed before `navTo()` wrote the hash: the write is undone with it. */\n\treadonly writtenOver?: string;\n}\n\n/**\n * An allowed navigation waits for UI5 to write its hash. With component targets UI5 does that\n * once the nested components are loaded, and never if one of them fails to load.\n */\ninterface PhaseAwaitingHash {\n\treadonly kind: \"awaitingHash\";\n\t/** The phase that commits the navigation when `parse()` receives its hash. */\n\treadonly commit: PhaseCommitting;\n}\n\n/** A navigation that did not commit waits for the URL to be back before it settles. */\ninterface PhaseRestoring {\n\treadonly kind: \"restoring\";\n\treadonly result: NavigationResult;\n\t/** Whether the previous hash is written once UI5 has reported the hash change to every router. */\n\treadonly awaitsReport?: true;\n\t/** What a redirect to the route that is shown still has to do once the navigation has settled. */\n\treadonly whenBack?: () => void;\n}\n\ntype RouterPhase = PhaseIdle | PhaseEvaluating | PhaseCommitting | PhaseAwaitingHash | PhaseRestoring;\n\nconst IDLE: PhaseIdle = { kind: \"idle\" };\n\n/** Maximum number of hops in a redirect chain before it is treated as a loop. */\nconst MAX_REDIRECT_DEPTH = 10;\n\n/** State threaded through a redirect chain. */\ninterface RedirectChainContext {\n\t/** Hashes whose guards have been evaluated in this chain (mutated via .add()). */\n\tvisited: Set<string>;\n\t/** Hash of the originally attempted navigation (for settlement / hash restore). */\n\treadonly attemptedHash: string | undefined;\n\t/** Whether to restore the hash on block (see {@link NavigationAttempt.restoreHash}). */\n\treadonly restoreHash: boolean;\n\t/** Original source route (the route the user occupies). */\n\treadonly fromRoute: string;\n\t/** Original source hash (the hash the user occupies). */\n\treadonly fromHash: string;\n\t/** Whether the target replaces the current history entry: as the `navTo()` call asked, always after a hash change. */\n\treadonly replace: boolean | undefined;\n\t/**\n\t * How the browser got to the history entry that the target replaces, for the title history\n\t * of UI5 (see {@link Router._alignTitleHistory}); `undefined` after `navTo()` or `parse()`.\n\t */\n\treadonly direction: Direction | undefined;\n\t/** Shared AbortSignal from the original navigation. */\n\treadonly signal: AbortSignal;\n\t/** Shared generation counter from the original navigation. */\n\treadonly generation: number;\n\t/** Shared bag from the original navigation's guard context. */\n\treadonly bag: Map<string, unknown>;\n}\n\n/**\n * Router with navigation guard support.\n *\n * Extends `sap.m.routing.Router` with a shared guard pipeline that\n * evaluates registered guard functions before route matching, target\n * loading, or event firing occurs.\n *\n * Two entry points feed the same pipeline:\n * - `navTo()` runs guards as a preflight check. A blocked navigation\n * never changes the hash; a redirected one only writes its final target.\n * - `parse()` runs guards as a fallback for browser back/forward, URL\n * bar entry, and direct hash changes where the hash has already changed\n * before guards can intercept.\n *\n * Key assumptions (see docs/reference/architecture.md for full rationale):\n * - `parse()` is intentionally NOT async. Sync guards execute in the\n * same tick; async guards fall back to a deferred path.\n * - `replaceHash` fires `hashChanged` synchronously (validated by test).\n * - `setHash` (via `super.navTo`) fires `hashChanged` synchronously (validated by test).\n * - Redirect targets are evaluated by the guard pipeline with loop detection.\n *\n * @namespace ui5.guard.router\n * @extends sap.m.routing.Router\n */\nexport default class Router extends MobileRouter implements GuardRouter {\n\tprivate _options: ResolvedGuardRouterOptions;\n\tprivate _pipeline = new GuardPipeline();\n\tprivate _currentRoute = \"\";\n\tprivate _currentHash: string | null = null;\n\tprivate _phase: RouterPhase = IDLE;\n\tprivate _parseGeneration = 0;\n\tprivate _suppressedHash: string | null = null;\n\t/** How to undo the hash change of the pending navigation (see {@link _undoHashChange}). */\n\tprivate _undo: HashChangeUndo | null = null;\n\t/** The hash that the hash changer of this router is reporting, until `parse()` receives it. */\n\tprivate _reportedHash: unknown = null;\n\t/** The hash that the hash changer of this router reported last, reports that are out of date aside. */\n\tprivate _lastReport: unknown = null;\n\t/** Whether the hash changer shows a later hash than the one it is reporting (see {@link _onHashReported}). */\n\tprivate _reportOutdated = false;\n\t/** The global hash changer that {@link _onRootHashChanged} is attached to, behind the listener of UI5 that informs the routers. */\n\tprivate _rootHashChanger: HashChanger | null = null;\n\t/** The route that was current when the router stopped: `initialize(true)` resumes it, as UI5 does. */\n\tprivate _stoppedRoute = \"\";\n\tprivate _settlementResolvers: ((result: NavigationResult) => void)[] = [];\n\tprivate _lastSettlement: NavigationResult | null = null;\n\tprivate _pendingGuardDescriptors: GuardDescriptor[];\n\tprivate _sourceDescriptors: ManifestGuardDescriptor[] = [];\n\t/** The manifest guards registered for a route, by which `addRoute()` places the guards a route inherits then. */\n\tprivate _manifestGuards: { descriptor: ManifestGuardDescriptor; fn: GuardFn }[] = [];\n\tprivate _destroyed = false;\n\t/** What UI5 itself wrote to `_bMatchingProcessStarted` (see {@link _mirrorMatchingProcess}). */\n\tprivate _nativeMatching = false;\n\t/** Promises that wait for the `routeMatched` of a match that has not started (see {@link attachRouteMatched}). */\n\tprivate _matchWaiters: (() => void)[] = [];\n\t/**\n\t * Set while block-mode guard modules load; `start` says whether to initialize once they have,\n\t * `ignoreInitialHash` is the argument of the `initialize()` call that asked for it.\n\t */\n\tprivate _blockLoad: { start: boolean; ignoreInitialHash?: boolean } | null = null;\n\tprivate _meta: RouteMetaStore;\n\t/** Recorded by `addRoute()`, which the UI5 constructor calls before field setup; `declare` keeps field setup from resetting it. */\n\tdeclare private _routeNames: string[];\n\t/** Routes that also match when an earlier route has matched the hash (`greedy: true`). */\n\tdeclare private _greedyRouteNames: string[];\n\tprivate readonly _ownerComponent: UIComponent | undefined;\n\n\tconstructor(routes?: object | object[], config?: GuardRouterConfig, owner?: UIComponent, targetsConfig?: object);\n\tconstructor(\n\t\troutes?: object | object[],\n\t\tconfig?: GuardRouterConfig,\n\t\towner?: UIComponent,\n\t\t...rest: [targetsConfig?: object]\n\t) {\n\t\tconst isRecordConfig = isRecord(config);\n\t\tconst guardRouter = isRecordConfig ? config.guardRouter : undefined;\n\t\t// UI5 passes more than its types declare: after the targets config comes the\n\t\t// hash changer of a component that is loaded as a routing target.\n\t\tsuper(routes, isRecordConfig ? withoutGuardRouter(config) : config, owner, ...rest);\n\t\tthis._ownerComponent = owner;\n\t\t// A config without routes has made no addRoute() call.\n\t\tthis._routeNames ??= [];\n\t\tthis._greedyRouteNames ??= [];\n\t\tthis._mirrorMatchingProcess();\n\t\tlet componentNamespace = \"\";\n\t\tconst appConfig: unknown = owner?.getManifestEntry(\"sap.app\");\n\t\tif (isRecord(appConfig) && typeof appConfig.id === \"string\") {\n\t\t\tcomponentNamespace = appConfig.id;\n\t\t}\n\t\tconst parsed = parseGuardRouterConfig(guardRouter, componentNamespace);\n\t\tthis._options = parsed.options;\n\t\tthis._meta = new RouteMetaStore(\n\t\t\tparsed.routeMeta,\n\t\t\tthis._options.inheritance === \"pattern-tree\" ? () => this._collectRoutePatterns() : null,\n\t\t);\n\t\tthis._pendingGuardDescriptors = parsed.guards;\n\n\t\t// Fire-and-forget preload hint: a module cached by initialize()\n\t\t// needs no async load on navigation (see _registerLazyGuards).\n\t\t// Block mode loads modules itself in initialize().\n\t\tif (this._options.guardLoading === \"lazy\") {\n\t\t\tconst uniquePaths = [...new Set(this._pendingGuardDescriptors.map((d) => d.modulePath))];\n\t\t\t// A failed preload is reported when the guard runs: its lazy load warns\n\t\t\t// and the navigation settles as Error.\n\t\t\tsap.ui.require(uniquePaths, undefined, () => {});\n\t\t}\n\t}\n\n\t/**\n\t * Report a navigation that waits for async guards as a route match in progress, through the\n\t * UI5-private member `_bMatchingProcessStarted` of `sap.ui.core.routing.Router`. UI5 reads it\n\t * to tell whether the router of a nested component is still matching; without this, a parent\n\t * route would count the component as displayed before its first route matched. The router does\n\t * not write the member: it replaces it with an accessor that keeps what UI5 writes in\n\t * {@link _nativeMatching} and also reads `true` while a navigation is postponed.\n\t *\n\t * See docs/reference/architecture.md (\"UI5 Internals the Router Relies On\") for the UI5 code this\n\t * relies on, and docs/reference/upstream-parity.md for the tests that pin it.\n\t */\n\tprivate _mirrorMatchingProcess(): void {\n\t\tObject.defineProperty(this, \"_bMatchingProcessStarted\", {\n\t\t\tget: () => this._isMatching(),\n\t\t\tset: (matching: boolean) => {\n\t\t\t\tthis._nativeMatching = matching;\n\t\t\t},\n\t\t});\n\t}\n\n\t/** Whether a route match is in progress: in UI5, or postponed until async guards have decided. */\n\tprivate _isMatching(): boolean {\n\t\treturn this._nativeMatching || (this._phase.kind === \"evaluating\" && this._phase.postponed === true);\n\t}\n\n\t/**\n\t * Attach an event handler for the `routeMatched` event, as the native router does. In addition,\n\t * remember a Promise resolve function ({@link isPromiseResolver}) that is subscribed while the\n\t * router is not initialized or a match is in progress: that is how a UI5 component target\n\t * waits for this router. UI5 relies on a match always ending in `routeMatched`, which a\n\t * navigation that guards block, fail or cancel never fires, so {@link _settleMatchWaiters}\n\t * resolves the Promise then. Application code that subscribes a Promise resolve function under\n\t * the same condition is treated alike.\n\t *\n\t * See docs/reference/architecture.md (\"UI5 Internals the Router Relies On\") for the UI5 code this\n\t * relies on, and docs/reference/upstream-parity.md for the tests that pin it.\n\t *\n\t * @override sap.ui.core.routing.Router#attachRouteMatched\n\t * @since 1.7.0\n\t */\n\toverride attachRouteMatched(\n\t\toData: object,\n\t\tfnFunction: (evt: Router$RouteMatchedEvent) => void,\n\t\toListener?: object,\n\t): this;\n\toverride attachRouteMatched(fnFunction: (evt: Router$RouteMatchedEvent) => void, oListener?: object): this;\n\toverride attachRouteMatched(\n\t\toData: object,\n\t\tfnFunction: (evt: Router$RouteMatchedEvent) => void,\n\t\toListener?: object,\n\t): this {\n\t\tif (isPromiseResolver(oData) && (!this.isInitialized() || this._isMatching())) {\n\t\t\tthis._matchWaiters.push(oData);\n\t\t}\n\t\t// The arguments go on as received: EventProvider#attachEvent tells the two call forms apart.\n\t\treturn super.attachRouteMatched(oData, fnFunction, oListener);\n\t}\n\n\t/**\n\t * Decide what becomes of the Promises that wait for a `routeMatched`\n\t * (see {@link attachRouteMatched}). Runs in a microtask after a settlement, so that a commit\n\t * has reached `super.parse()` and a navigation that supersedes the settled one has started:\n\t * - A navigation waits for async guards: the Promises keep waiting, for its settlement.\n\t * - UI5 is matching a route: the Promises are forgotten, the `routeMatched` of that match\n\t * resolves them. If UI5 never fires it, because the display of a target fails, they wait\n\t * forever, as with the native router.\n\t * - Otherwise no match is coming, and the Promises are resolved.\n\t *\n\t * A navigation that starts after this microtask is not waited for. A Promise that is resolved\n\t * here stays subscribed, and UI5 calls it again with the next `routeMatched`, which has no\n\t * effect on a Promise.\n\t */\n\tprivate _settleMatchWaiters(): void {\n\t\tif (this._phase.kind === \"evaluating\" && this._phase.postponed) return;\n\t\tconst waiters = this._matchWaiters;\n\t\tthis._matchWaiters = [];\n\t\tif (this._nativeMatching) return;\n\t\tfor (const resolve of waiters) resolve();\n\t}\n\n\t/**\n\t * Initialize the router. When manifest guards are declared and\n\t * `guardLoading` is `\"block\"`, module loading starts and\n\t * `super.initialize()` is deferred until all modules are loaded.\n\t * In `\"lazy\"` mode, lazy wrappers are registered synchronously\n\t * and `super.initialize()` is called immediately.\n\t *\n\t * While block-mode modules load, the router is not initialized yet:\n\t * calling `initialize()` again changes nothing, and `stop()` cancels\n\t * the pending start until `initialize()` is called again.\n\t *\n\t * @param bIgnoreInitialHash - Whether the current hash is left unparsed, as in the native router (since 1.7.0).\n\t * @override sap.ui.core.routing.Router#initialize\n\t * @since 1.0.1\n\t */\n\toverride initialize(bIgnoreInitialHash?: boolean): this {\n\t\tif (this._blockLoad) {\n\t\t\tif (!this._blockLoad.start) {\n\t\t\t\tthis._blockLoad.start = true;\n\t\t\t\tthis._blockLoad.ignoreInitialHash = bIgnoreInitialHash;\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (this._pendingGuardDescriptors.length === 0) {\n\t\t\treturn this._start(bIgnoreInitialHash);\n\t\t}\n\n\t\tconst descriptors = this._pendingGuardDescriptors.map((source) => ({ ...source, source }));\n\t\tthis._pendingGuardDescriptors = [];\n\t\tthis._sourceDescriptors = descriptors;\n\n\t\tconst expandedDescriptors =\n\t\t\tthis._options.inheritance === \"pattern-tree\"\n\t\t\t\t? expandToDescendants(descriptors, this._collectRoutePatterns())\n\t\t\t\t: descriptors;\n\n\t\tif (this._options.guardLoading === \"lazy\") {\n\t\t\tthis._registerLazyGuards(expandedDescriptors);\n\t\t\treturn this._start(bIgnoreInitialHash);\n\t\t}\n\n\t\t// \"block\" mode: load all modules, then register their guards in declaration order\n\t\t// and initialize. Load and registration failures are logged per module and never\n\t\t// reject. A router destroyed while modules load stays destroyed.\n\t\tconst blockLoad = { start: true, ignoreInitialHash: bIgnoreInitialHash };\n\t\tthis._blockLoad = blockLoad;\n\t\tvoid loadGuardModules(expandedDescriptors).then((results) => {\n\t\t\tthis._blockLoad = null;\n\t\t\tif (this._destroyed) return;\n\t\t\tfor (const { descriptor, guards } of results) {\n\t\t\t\tfor (const fn of guards) this._registerManifestGuard(descriptor, fn);\n\t\t\t}\n\t\t\tif (blockLoad.start) this._start(blockLoad.ignoreInitialHash);\n\t\t});\n\t\treturn this;\n\t}\n\n\t/**\n\t * Start the native router. With `ignoreInitialHash` it parses nothing and resumes the route\n\t * that was displayed when the router stopped. That route is the current one again, on the hash\n\t * that the URL shows now, so that its leave guards run and a blocked hash change returns to it.\n\t */\n\tprivate _start(ignoreInitialHash?: boolean): this {\n\t\t// UI5 only warns about a router that is initialized already.\n\t\tconst starting = !this.isInitialized();\n\t\tif (starting) {\n\t\t\t// Before the listener of UI5 that calls parse(), which initialize() attaches.\n\t\t\tthis.getHashChanger().attachEvent(\"hashChanged\", this._onHashReported, this);\n\t\t\t// After the listener of UI5 that informs the routers, which is attached with the hash\n\t\t\t// changer of the first router: UI5 has reported a hash change to every router when\n\t\t\t// this one runs.\n\t\t\tthis._rootHashChanger = HashChanger.getInstance();\n\t\t\tthis._rootHashChanger.attachEvent(\"hashChanged\", this._onRootHashChanged, this);\n\t\t}\n\t\tsuper.initialize(ignoreInitialHash);\n\t\tif (starting && ignoreInitialHash) {\n\t\t\t// UI5 has reset the hash of the hash changer if a target was displayed without a route.\n\t\t\tconst shownHash: string | undefined = this.getHashChanger().getHash();\n\t\t\tthis._currentRoute = this._stoppedRoute;\n\t\t\tthis._currentHash = shownHash ?? null;\n\t\t}\n\t\treturn this;\n\t}\n\n\t/**\n\t * The hash changer of this router reports a hash change: `parse()` is called with it next.\n\t *\n\t * The report is out of date if the hash changer shows a later hash by now, one that it has\n\t * reported to this router already. That happens to a router that shares its hash changer, as\n\t * the routers of all components that are not routing targets do: a router that is informed\n\t * first redirects the hash, UI5 reports the target to every router, and only then the hash\n\t * that was redirected to the routers that are informed later. A hash changer that reports\n\t * while a parent router collects the hashes of a navigation shows no hash at all.\n\t */\n\tprivate _onHashReported(event: HashChangerBase$HashChangedEvent): void {\n\t\t// A string, which the UI5 types declare as an object.\n\t\tconst newHash: unknown = event.getParameter(\"newHash\");\n\t\tconst shown: unknown = this.getHashChanger().getHash();\n\t\tthis._reportedHash = newHash;\n\t\tthis._reportOutdated = shown !== newHash && shown === this._lastReport;\n\t\tif (!this._reportOutdated) this._lastReport = newHash;\n\t}\n\n\t/**\n\t * UI5 has reported a hash change to every router. The event tells what the URL showed before\n\t * the change, which is what undoes it. A snapshot of the URL taken at any other time would not\n\t * do: the URL also changes without an event, as when the Fiori launchpad puts it back after\n\t * a cross-app navigation that the user cancelled. A navigation that waited for this to put\n\t * the URL back does so now (see {@link _undoHashChange}).\n\t */\n\tprivate _onRootHashChanged(event: HashChangerBase$HashChangedEvent): void {\n\t\t// A string, which the UI5 types declare as an object.\n\t\tconst newHash: unknown = event.getParameter(\"newHash\");\n\t\t// Only the first hash change that the page reports has no previous hash.\n\t\tconst oldHash = event.getParameter(\"oldHash\") ?? \"\";\n\t\tconst hashChanger = HashChanger.getInstance();\n\t\tif (hashChanger === this._rootHashChanger) {\n\t\t\tthis._completeUndo(newHash, oldHash);\n\t\t\treturn;\n\t\t}\n\t\t// The global hash changer was replaced (HashChanger.replaceHashChanger(), as the shell of\n\t\t// the Fiori launchpad does). UI5 has moved this listener to the new one, in front of its\n\t\t// listener that informs the routers. From the next hash change on it runs behind again;\n\t\t// for this one, the routers are informed once this listener has returned.\n\t\thashChanger.detachEvent(\"hashChanged\", this._onRootHashChanged, this);\n\t\thashChanger.attachEvent(\"hashChanged\", this._onRootHashChanged, this);\n\t\tthis._rootHashChanger = hashChanger;\n\t\tqueueMicrotask(() => this._completeUndo(newHash, oldHash));\n\t}\n\n\t/**\n\t * Tell the undo of the pending navigation what the URL showed before the hash change\n\t * `newHash`, and put the URL back if the navigation waited for that.\n\t */\n\tprivate _completeUndo(newHash: unknown, oldHash: string): void {\n\t\tconst undo = this._undo;\n\t\tif (!undo || undo.first !== newHash) return;\n\t\tundo.fullHash ??= oldHash;\n\t\tif (this._phase.kind === \"restoring\" && this._phase.awaitsReport) this._replaceFullHash(undo.fullHash);\n\t}\n\n\t/**\n\t * Add a route dynamically and integrate it into pattern-tree inheritance.\n\t *\n\t * Appends the route name to the internal route list so that\n\t * `_collectRoutePatterns()` includes it in subsequent inheritance\n\t * lookups, clears the metadata cache, and registers any inherited\n\t * manifest guards when `inheritance` is `\"pattern-tree\"`: on every\n\t * route, ancestor guards still run before descendant guards.\n\t *\n\t * @param oConfig - Route configuration object as defined by `sap.ui.core.routing.Route`.\n\t * @param oParent - Optional parent route, forwarded to the parent `addRoute`.\n\t * @override sap.ui.core.routing.Router#addRoute\n\t * @since 1.6.0\n\t */\n\toverride addRoute(oConfig: $RouteSettings, oParent?: Route): void {\n\t\tsuper.addRoute(oConfig, oParent);\n\n\t\tconst name = oConfig.name;\n\t\tthis._routeNames ??= [];\n\t\tthis._greedyRouteNames ??= [];\n\t\tif (this._routeNames.includes(name)) return;\n\n\t\tthis._routeNames.push(name);\n\t\tif (oConfig.greedy) this._greedyRouteNames.push(name);\n\t\t// The UI5 constructor adds the routes of the config before this constructor sets up the rest.\n\t\tif (!this._meta) return;\n\t\tthis._meta.invalidate();\n\n\t\tif (this._options.inheritance !== \"pattern-tree\") return;\n\n\t\tconst patterns = this._collectRoutePatterns();\n\t\tconst declared = byRouteDepth(this._sourceDescriptors, new Map(patterns.map((r) => [r.name, r.pattern])));\n\t\tconst rankOf = (descriptor: ManifestGuardDescriptor): number =>\n\t\t\tdeclared.findIndex((entry) => entry.source === descriptor.source);\n\n\t\t// Always use lazy registration: if the module was loaded during\n\t\t// initialize() (block mode), the sync cache probe succeeds immediately.\n\t\t// This avoids an async gap between addRoute() and the first navigation.\n\t\tfor (const descriptor of expandForNewRoute(this._sourceDescriptors, name, patterns)) {\n\t\t\t// Ancestor guards run first: the new guards go before the manifest guards of the route\n\t\t\t// that stem from an entry of a deeper route, or from a later entry of the same depth.\n\t\t\tconst rank = rankOf(descriptor);\n\t\t\tconst next = this._manifestGuards\n\t\t\t\t.filter(\n\t\t\t\t\t(guard) =>\n\t\t\t\t\t\tguard.descriptor.route === descriptor.route &&\n\t\t\t\t\t\tguard.descriptor.type === descriptor.type &&\n\t\t\t\t\t\trankOf(guard.descriptor) > rank,\n\t\t\t\t)\n\t\t\t\t.toSorted((a, b) => rankOf(a.descriptor) - rankOf(b.descriptor))[0];\n\t\t\tfor (const fn of createLazyGuards(descriptor)) this._registerManifestGuard(descriptor, fn, next?.fn);\n\t\t}\n\t}\n\n\t/**\n\t * Register a global guard that runs for every navigation.\n\t *\n\t * @param guard - Guard function to register. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddGuard(guard: GuardFn): this {\n\t\tif (!this._isFn(guard, \"addGuard\")) return this;\n\t\tthis._pipeline.addGlobalGuard(guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Remove a previously registered global guard.\n\t *\n\t * @param guard - Guard function to remove by reference. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveGuard(guard: GuardFn): this {\n\t\tif (!this._isFn(guard, \"removeGuard\")) return this;\n\t\tthis._pipeline.removeGlobalGuard(guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a guard for a specific route.\n\t *\n\t * Accepts either a guard function (registered as an enter guard) or a\n\t * configuration object with `beforeEnter` and/or `beforeLeave` guards.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`. If the route is unknown, the {@link GuardRouterOptions.unknownRouteRegistration} policy applies (default: warn).\n\t * @param guard - Guard function or {@link RouteGuardConfig} object.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddRouteGuard(routeName: string, guard: GuardFn | RouteGuardConfig): this {\n\t\tif (isRouteGuardConfig(guard)) {\n\t\t\tthis._handleUnknownRouteRegistration(routeName, \"addRouteGuard\");\n\t\t\tlet hasHandler = false;\n\n\t\t\tif (guard.beforeEnter !== undefined) {\n\t\t\t\thasHandler = true;\n\t\t\t\tif (this._isFn(guard.beforeEnter, \"addRouteGuard\", routeName)) {\n\t\t\t\t\tthis._pipeline.addEnterGuard(routeName, guard.beforeEnter);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (guard.beforeLeave !== undefined) {\n\t\t\t\thasHandler = true;\n\t\t\t\tif (this._isFn(guard.beforeLeave, \"addRouteGuard\", routeName)) {\n\t\t\t\t\tthis._pipeline.addLeaveGuard(routeName, guard.beforeLeave);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!hasHandler) {\n\t\t\t\tLog.info(\"addRouteGuard: config has no beforeEnter or beforeLeave\", routeName, LOG_COMPONENT);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (!this._isFn(guard, \"addRouteGuard\", routeName)) return this;\n\t\tthis._handleUnknownRouteRegistration(routeName, \"addRouteGuard\");\n\t\tthis._pipeline.addEnterGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Remove a guard from a specific route.\n\t *\n\t * Accepts the same forms as `addRouteGuard`: a guard function removes\n\t * an enter guard; a configuration object removes `beforeEnter` and/or\n\t * `beforeLeave` by reference.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param guard - Guard function or {@link RouteGuardConfig} object to remove by reference.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveRouteGuard(routeName: string, guard: GuardFn | RouteGuardConfig): this {\n\t\tif (isRouteGuardConfig(guard)) {\n\t\t\tif (typeof guard.beforeEnter === \"function\") {\n\t\t\t\tthis.removeRouteGuard(routeName, guard.beforeEnter);\n\t\t\t}\n\t\t\tif (typeof guard.beforeLeave === \"function\") {\n\t\t\t\tthis.removeLeaveGuard(routeName, guard.beforeLeave);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif (!this._isFn(guard, \"removeRouteGuard\", routeName)) return this;\n\t\tthis._pipeline.removeEnterGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Register a leave guard for a specific route.\n\t *\n\t * Leave guards run when navigating **away from** the route, before any\n\t * enter guards for the target route. They answer the binary question\n\t * \"can I leave?\" and return only a boolean (no redirects).\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`. If the route is unknown, the {@link GuardRouterOptions.unknownRouteRegistration} policy applies (default: warn).\n\t * @param guard - Leave guard function to register. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\taddLeaveGuard(routeName: string, guard: LeaveGuardFn): this {\n\t\tif (!this._isFn(guard, \"addLeaveGuard\", routeName)) return this;\n\t\tthis._handleUnknownRouteRegistration(routeName, \"addLeaveGuard\");\n\t\tthis._pipeline.addLeaveGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Disambiguate the `navTo()` overload shapes into resolved arguments.\n\t *\n\t * UI5's native `navTo` has two signatures where the third parameter is either\n\t * `componentTargetInfo` (object) or `bReplace` (boolean). This method normalizes\n\t * both forms so the rest of `navTo` can work with a single set of variables.\n\t * The options follow `bReplace`, or take its place when it is left out.\n\t */\n\tprivate _resolveNavToArgs(\n\t\tcomponentTargetInfoOrReplace?: Record<string, ComponentTargetParameters> | boolean,\n\t\treplaceOrOptions?: boolean | GuardNavToOptions,\n\t\toptions?: GuardNavToOptions,\n\t): {\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>;\n\t\treplace?: boolean;\n\t\tguardOptions?: GuardNavToOptions;\n\t} {\n\t\tif (typeof componentTargetInfoOrReplace === \"boolean\") {\n\t\t\t// Short form: navTo(name, params, replace, options?)\n\t\t\treturn {\n\t\t\t\treplace: componentTargetInfoOrReplace,\n\t\t\t\tguardOptions: typeof replaceOrOptions === \"object\" ? replaceOrOptions : undefined,\n\t\t\t};\n\t\t}\n\t\t// Long form: navTo(name, params, componentTargetInfo, replace, options?)\n\t\treturn {\n\t\t\tcomponentTargetInfo: componentTargetInfoOrReplace,\n\t\t\treplace: typeof replaceOrOptions === \"boolean\" ? replaceOrOptions : undefined,\n\t\t\tguardOptions: typeof replaceOrOptions === \"object\" ? replaceOrOptions : options,\n\t\t};\n\t}\n\n\t/** Return `true` when the value is a function; otherwise log a warning. */\n\tprivate _isFn(value: unknown, method: string, detail?: string): boolean {\n\t\tif (typeof value === \"function\") return true;\n\t\tLog.warning(`${method}: not a function, ignoring`, detail, LOG_COMPONENT);\n\t\treturn false;\n\t}\n\n\t/** Apply the `unknownRouteRegistration` policy: warn or throw when the route is unknown. */\n\tprivate _handleUnknownRouteRegistration(routeName: string, methodName: string, kept = \"guard registered\"): void {\n\t\tif (this.getRoute(routeName)) return;\n\n\t\tswitch (this._options.unknownRouteRegistration) {\n\t\t\tcase \"ignore\":\n\t\t\t\treturn;\n\t\t\tcase \"throw\":\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${methodName} called for unknown route \"${routeName}\". ` +\n\t\t\t\t\t\t`Set guardRouter.unknownRouteRegistration to \"warn\" or \"ignore\" to allow this.`,\n\t\t\t\t);\n\t\t\tcase \"warn\":\n\t\t\t\tLog.warning(`${methodName}: unknown route, ${kept} anyway`, routeName, LOG_COMPONENT);\n\t\t}\n\t}\n\n\t/**\n\t * Remove a leave guard from a specific route.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param guard - Leave guard function to remove by reference. Non-functions are ignored with a warning.\n\t * @returns `this` for chaining.\n\t * @since 1.0.1\n\t */\n\tremoveLeaveGuard(routeName: string, guard: LeaveGuardFn): this {\n\t\tif (!this._isFn(guard, \"removeLeaveGuard\", routeName)) return this;\n\t\tthis._pipeline.removeLeaveGuard(routeName, guard);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Return the resolved metadata for a route.\n\t *\n\t * When `inheritance` is `\"pattern-tree\"`, walks the ancestor chain and\n\t * shallow-merges metadata shallowest-first (child values win on conflict).\n\t * Both manifest and runtime metadata participate in inheritance.\n\t * The router caches results; {@link setRouteMeta} and `addRoute()` clear the cache.\n\t *\n\t * Logs a warning for unknown non-empty route names and returns an empty\n\t * frozen object. The empty string `\"\"` is treated as a valid root route.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @returns Frozen record of metadata key-value pairs, or an empty frozen object if the route has no metadata.\n\t * @since 1.6.0\n\t */\n\tgetRouteMeta(routeName: string): Readonly<Record<string, unknown>> {\n\t\t// Empty string is a valid root route name (initial state before first navigation)\n\t\tif (routeName !== \"\" && !this.getRoute(routeName)) {\n\t\t\tLog.warning(\"getRouteMeta: unknown route, returning empty metadata\", routeName, LOG_COMPONENT);\n\t\t\treturn EMPTY_META;\n\t\t}\n\t\treturn this._meta.get(routeName);\n\t}\n\n\t/**\n\t * Set runtime metadata for a route.\n\t *\n\t * Runtime metadata is merged on top of any manifest-declared metadata\n\t * when retrieved via {@link getRouteMeta}. When `inheritance` is\n\t * `\"pattern-tree\"`, descendant routes also see the updated values.\n\t * Invalidates the resolved-metadata cache. Non-object values are\n\t * ignored with a warning. Subject to the `unknownRouteRegistration` policy.\n\t *\n\t * @param routeName - Route name as defined in `manifest.json`.\n\t * @param meta - Plain object of metadata key-value pairs.\n\t * @returns `this` for chaining.\n\t * @since 1.6.0\n\t */\n\tsetRouteMeta(routeName: string, meta: Record<string, unknown>): this {\n\t\tif (!isRecord(meta)) {\n\t\t\tLog.warning(\"setRouteMeta: expected object, ignoring\", routeName, LOG_COMPONENT);\n\t\t\treturn this;\n\t\t}\n\t\tif (routeName !== \"\") this._handleUnknownRouteRegistration(routeName, \"setRouteMeta\", \"metadata stored\");\n\t\tthis._meta.set(routeName, meta);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Return a Promise that settles when the current guard pipeline finishes.\n\t *\n\t * If a navigation is pending, the Promise resolves when that pipeline settles.\n\t * If no navigation is pending, it resolves immediately with the most recent\n\t * settlement result. Before any navigation has settled, it falls back to a\n\t * synthetic `Committed` result derived from the router's current route/hash\n\t * state. After `stop()`, that idle fallback reports empty route/hash values\n\t * until a new navigation settles, or `initialize(true)` resumes the route.\n\t *\n\t * @returns Promise that resolves with a {@link NavigationResult} once the pipeline settles.\n\t * @since 1.2.0\n\t */\n\tnavigationSettled(): Promise<NavigationResult> {\n\t\tif (this._phase.kind === \"idle\" || this._phase.kind === \"committing\") {\n\t\t\treturn Promise.resolve(\n\t\t\t\tthis._lastSettlement ?? {\n\t\t\t\t\tstatus: NavigationOutcome.Committed,\n\t\t\t\t\troute: this._currentRoute,\n\t\t\t\t\thash: this._currentHash ?? \"\",\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t\treturn new Promise((resolve) => {\n\t\t\tthis._settlementResolvers.push(resolve);\n\t\t});\n\t}\n\n\t/**\n\t * Attach an event handler for the `navigationSettled` event.\n\t *\n\t * Fires synchronously after every guard pipeline settlement with\n\t * a {@link NavigationResult} payload. Unlike the one-shot\n\t * `navigationSettled()` Promise, this event fires for every\n\t * navigation outcome without re-registration.\n\t *\n\t * @param oData - Application-specific payload passed to the handler as second argument.\n\t * @param fnFunction - The function to be called when the event occurs.\n\t * @param oListener - Context object to call the event handler with. Defaults to this Router.\n\t * @since 1.3.0\n\t */\n\tattachNavigationSettled(\n\t\toData: object,\n\t\tfnFunction: (evt: Router$NavigationSettledEvent) => void,\n\t\toListener?: object,\n\t): this;\n\tattachNavigationSettled(fnFunction: (evt: Router$NavigationSettledEvent) => void, oListener?: object): this;\n\tattachNavigationSettled(\n\t\toData: object,\n\t\tfnFunction: (evt: Router$NavigationSettledEvent) => void,\n\t\toListener?: object,\n\t): this {\n\t\t// The arguments go on as received: EventProvider#attachEvent tells the two call forms apart.\n\t\treturn this.attachEvent(\"navigationSettled\", oData, fnFunction, oListener);\n\t}\n\n\t/**\n\t * Detach a previously attached `navigationSettled` event handler.\n\t *\n\t * The passed parameters must match those used for registration with\n\t * {@link #attachNavigationSettled} beforehand.\n\t *\n\t * @param fnFunction - The handler function to detach.\n\t * @param oListener - Context object on which the given function had to be called.\n\t * @since 1.3.0\n\t */\n\tdetachNavigationSettled(fnFunction: (evt: Router$NavigationSettledEvent) => void, oListener?: object): this {\n\t\tthis.detachEvent(\"navigationSettled\", fnFunction, oListener);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Drain all settlement resolvers with the given result and fire\n\t * the `navigationSettled` event.\n\t */\n\tprivate _flushSettlement(result: NavigationResult): void {\n\t\tthis._lastSettlement = result;\n\t\tLog.debug(`Navigation settled: ${result.status}`, result.hash, LOG_COMPONENT);\n\t\t// After the call that settled: by then a commit has reached super.parse(), and a navigation\n\t\t// that supersedes this one has started.\n\t\tqueueMicrotask(() => this._settleMatchWaiters());\n\t\tconst resolvers = this._settlementResolvers;\n\t\tthis._settlementResolvers = [];\n\t\tfor (const resolve of resolvers) {\n\t\t\tresolve(result);\n\t\t}\n\t\ttry {\n\t\t\tthis.fireEvent(\"navigationSettled\", result);\n\t\t} catch (error) {\n\t\t\t// A handler must not keep the router from finishing the navigation it reports.\n\t\t\tLog.error(\"A navigationSettled handler threw\", String(error), LOG_COMPONENT);\n\t\t}\n\t}\n\n\t/**\n\t * Navigate to a route with preflight guard evaluation.\n\t *\n\t * For programmatic navigation, guards run BEFORE the hash changes.\n\t * This prevents history pollution: blocked navigations never push a\n\t * history entry, and redirected navigations go directly to the final\n\t * target, which is written the way this call asked for (`bReplace`).\n\t *\n\t * A `navTo()` to the committed hash changes no route of this router, so\n\t * no guard runs: any pending navigation is cancelled and the call goes\n\t * to the native `navTo()`, which sets or resets the hashes of nested\n\t * components (`componentTargetInfo`). If the target matches the\n\t * in-flight attempt's hash, the in-flight preflight continues undisturbed.\n\t *\n\t * When all guards are synchronous, the decision and the resulting\n\t * hash change happen in the same tick. When any guard returns a\n\t * Promise, `navTo()` returns `this` immediately and defers the\n\t * hash change to when the guard resolves.\n\t *\n\t * Assumes `super.navTo()` calls `HashChanger.setHash()` which fires\n\t * `hashChanged` synchronously, causing `parse()` to re-enter in the\n\t * same call stack (validated by test). If the hash changer refuses the\n\t * hash change, as the Fiori launchpad's navigation filter does when its\n\t * dirty-state check stops it, nothing is committed and the navigation\n\t * settles as `Blocked`.\n\t *\n\t * With component targets (`componentTargetInfo`) UI5 writes the hash\n\t * later, once the nested components are loaded. The navigation commits\n\t * and settles when `parse()` receives that hash. Until then it is\n\t * pending: a navigation that supersedes it, `stop()` or `destroy()`\n\t * settles it as `Cancelled`. That also ends a navigation whose hash UI5\n\t * never writes, because a nested component failed to load or the router\n\t * is not async.\n\t *\n\t * On a router that is not initialized (before `initialize()`, while\n\t * block-mode guard modules load, after `stop()`) the call goes straight\n\t * to the native `navTo()`, which only sets the hash or does nothing when\n\t * stopped. The guards run when the router starts and parses the hash.\n\t *\n\t * @override sap.ui.core.routing.Router#navTo\n\t * @since 1.0.1\n\t */\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>,\n\t\tbReplace?: boolean,\n\t): this;\n\toverride navTo(routeName: string, parameters?: object, bReplace?: boolean): this;\n\toverride navTo(routeName: string, parameters?: object, bReplace?: boolean, options?: GuardNavToOptions): this;\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfo?: Record<string, ComponentTargetParameters>,\n\t\tbReplace?: boolean,\n\t\toptions?: GuardNavToOptions,\n\t): this;\n\toverride navTo(\n\t\trouteName: string,\n\t\tparameters?: object,\n\t\tcomponentTargetInfoOrReplace?: Record<string, ComponentTargetParameters> | boolean,\n\t\treplaceOrOptions?: boolean | GuardNavToOptions,\n\t\toptions?: GuardNavToOptions,\n\t): this {\n\t\tconst { componentTargetInfo, replace, guardOptions } = this._resolveNavToArgs(\n\t\t\tcomponentTargetInfoOrReplace,\n\t\t\treplaceOrOptions,\n\t\t\toptions,\n\t\t);\n\n\t\t// Redirect path: _redirect() calls this.navTo() while in committing/redirect phase.\n\t\t// Bypass preflight -- parse() will commit directly via the committing phase.\n\t\tif (this._phase.kind === \"committing\" && this._phase.origin === \"redirect\") {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\t// A router that does not listen to hash changes (not initialized, loading block-mode\n\t\t// guards, or stopped) navigates like the native one: the guards run once it parses the hash.\n\t\tif (!this.isInitialized()) {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\tconst route = this.getRoute(routeName);\n\t\tif (!route) {\n\t\t\t// Unknown route -- let the parent handle it (it logs a warning).\n\t\t\t// Cancel any pending async navigation so settlement resolvers drain\n\t\t\t// and the stale pipeline does not commit a superseded navigation.\n\t\t\tthis._cancelPendingNavigation(true);\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\tconst targetHash = route.getURL(parameters ?? {});\n\t\tconst routeInfo = this._matchRoute(targetHash);\n\t\tconst toRoute = routeInfo.name;\n\n\t\t// Same hash: no route of this router changes, so there is nothing to guard. Cancel any\n\t\t// pending navigation and navigate natively: UI5 still sets the hashes of nested\n\t\t// components (componentTargetInfo), or resets them when none are given.\n\t\tif (targetHash === this._currentHash) {\n\t\t\tthis._cancelPendingNavigation(true);\n\t\t\t// A navigationSettled handler of the cancelled navigation may have navigated on.\n\t\t\tconst shownHash: string | undefined = this.getHashChanger().getHash();\n\t\t\tif (shownHash === undefined || shownHash === targetHash) {\n\t\t\t\t// If UI5 has reset the hash of the hash changer, after a target was displayed without\n\t\t\t\t// a route, it reports the hash again, and parse() lets the route match again.\n\t\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tconst skipGuards = guardOptions?.skipGuards === true || this._options.navToPreflight === \"bypass\";\n\n\t\t// Pending-hash dedup: if an async preflight for this exact hash is\n\t\t// already running, don't cancel and restart it. A navigation that skips\n\t\t// the guards does not wait for them.\n\t\tif (!skipGuards && this._phase.kind === \"evaluating\" && targetHash === this._phase.attempt.hash) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// parse() evaluates the guards once the hash has changed. It supersedes a pending\n\t\t// navigation then, and undoes the hash change of that navigation with its own.\n\t\tif (!skipGuards && this._options.navToPreflight === \"off\") {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, replace);\n\t\t\treturn this;\n\t\t}\n\n\t\t// Cancel any pending navigation (including previous async preflight).\n\t\t// A superseded hash-change navigation leaves its hash in the URL: restore it\n\t\t// unless this navigation moves the URL.\n\t\tconst restoreHash = this._pendingRestoresHash();\n\t\tthis._cancelPendingNavigation();\n\n\t\tif (skipGuards) {\n\t\t\tthis._navigateAllowed(\n\t\t\t\trouteName,\n\t\t\t\tparameters,\n\t\t\t\tcomponentTargetInfo,\n\t\t\t\treplace,\n\t\t\t\ttargetHash,\n\t\t\t\ttoRoute,\n\t\t\t\trestoreHash,\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\n\t\tconst attempt = this._startAttempt(targetHash, restoreHash);\n\t\tconst { generation } = attempt;\n\n\t\tconst context = this._createGuardContext(routeInfo, targetHash, attempt.controller.signal);\n\n\t\tconst decision = this._evaluateGuards(context);\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tthis._applyWhenDecided(\n\t\t\t\tdecision,\n\t\t\t\t(d) => {\n\t\t\t\t\tif (generation !== this._parseGeneration) {\n\t\t\t\t\t\tLog.debug(\n\t\t\t\t\t\t\t\"Async preflight result discarded (superseded by newer navigation)\",\n\t\t\t\t\t\t\ttargetHash,\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._applyPreflightDecision(\n\t\t\t\t\t\td,\n\t\t\t\t\t\trouteName,\n\t\t\t\t\t\tparameters,\n\t\t\t\t\t\tcomponentTargetInfo,\n\t\t\t\t\t\treplace,\n\t\t\t\t\t\ttargetHash,\n\t\t\t\t\t\ttoRoute,\n\t\t\t\t\t\tcontext.bag,\n\t\t\t\t\t\tattempt,\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\ttargetHash,\n\t\t\t\trestoreHash,\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\n\t\tthis._applyPreflightDecision(\n\t\t\tdecision,\n\t\t\trouteName,\n\t\t\tparameters,\n\t\t\tcomponentTargetInfo,\n\t\t\treplace,\n\t\t\ttargetHash,\n\t\t\ttoRoute,\n\t\t\tcontext.bag,\n\t\t\tattempt,\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Navigate to a `navTo()` target that needs no guards (allowed or bypassed) and commit it,\n\t * or block it if the hash change was refused (see {@link _commitAfterNavTo}).\n\t */\n\tprivate _navigateAllowed(\n\t\trouteName: string,\n\t\tparameters: object | undefined,\n\t\tcomponentTargetInfo: Record<string, ComponentTargetParameters> | undefined,\n\t\tbReplace: boolean | undefined,\n\t\ttargetHash: string,\n\t\ttoRoute: string,\n\t\trestoreHash: boolean,\n\t): void {\n\t\tthis._phase = {\n\t\t\tkind: \"committing\",\n\t\t\troute: toRoute,\n\t\t\thash: targetHash,\n\t\t\torigin: \"preflight\",\n\t\t\trestoreHash,\n\t\t\twrittenOver: HashChanger.getInstance().getHash(),\n\t\t};\n\t\ttry {\n\t\t\tsuper.navTo(routeName, parameters, componentTargetInfo, bReplace);\n\t\t\tif (!this._commitAfterNavTo(componentTargetInfo)) {\n\t\t\t\tthis._blockNavigation(targetHash, restoreHash);\n\t\t\t}\n\t\t} finally {\n\t\t\t// A failed hash change must not leave the next one to be committed without guards.\n\t\t\tif (this._phase.kind === \"committing\") {\n\t\t\t\tthis._phase = IDLE;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Apply a preflight guard decision. For \"allow\", enter the committing\n\t * phase and call super.navTo(). For \"block\", flush settlement; the hash is\n\t * only touched to restore it after a superseded hash-change navigation.\n\t * For \"redirect\", start a redirect chain.\n\t * For \"error\", flush Error settlement with the guard's error.\n\t */\n\tprivate _applyPreflightDecision(\n\t\tdecision: GuardDecision,\n\t\trouteName: string,\n\t\tparameters: object | undefined,\n\t\tcomponentTargetInfo: Record<string, ComponentTargetParameters> | undefined,\n\t\tbReplace: boolean | undefined,\n\t\ttargetHash: string,\n\t\ttoRoute: string,\n\t\tbag: Map<string, unknown>,\n\t\tattempt: NavigationAttempt,\n\t): void {\n\t\t// A guard that navigated itself has superseded the navigation it was guarding.\n\t\tif (attempt.generation !== this._parseGeneration) return;\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\":\n\t\t\t\tthis._navigateAllowed(\n\t\t\t\t\trouteName,\n\t\t\t\t\tparameters,\n\t\t\t\t\tcomponentTargetInfo,\n\t\t\t\t\tbReplace,\n\t\t\t\t\ttargetHash,\n\t\t\t\t\ttoRoute,\n\t\t\t\t\tattempt.restoreHash,\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(targetHash, attempt.restoreHash);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\tthis._startRedirectChain(decision.target, targetHash, bag, attempt, bReplace);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, targetHash, attempt.restoreHash);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Intercept hash changes and run the guard pipeline before route matching.\n\t *\n\t * Called by the HashChanger on every `hashChanged` event. Runs leave guards\n\t * (current route), then global + route-specific enter guards (target route).\n\t * Stays synchronous when all guards return plain values; falls back to async\n\t * when a guard returns a Promise. A generation counter discards stale results\n\t * when navigations overlap.\n\t *\n\t * @param newHash - The new hash fragment from the URL.\n\t * @override sap.ui.core.routing.Router#parse\n\t * @since 1.0.1\n\t */\n\toverride parse(newHash: string): void {\n\t\tif (this._destroyed) {\n\t\t\t// The base router only warns about a hash change that reaches a destroyed router.\n\t\t\tsuper.parse(newHash);\n\t\t\treturn;\n\t\t}\n\t\tconst reported = this._reportedHash === newHash;\n\t\tthis._reportedHash = null;\n\t\t// The URL shows a later hash, which this router has parsed.\n\t\tif (reported && this._reportOutdated) return;\n\t\t// The hash that _restoreHash() is writing.\n\t\tif (newHash === this._suppressedHash) return;\n\n\t\tconst undo = this._undo;\n\t\tif (undo?.started && undo.fullHash === HashChanger.getInstance().getHash()) {\n\t\t\t// The URL is back where the router has put it (see _undoHashChange), so nothing is\n\t\t\t// evaluated. What the hash changer reports now is the hash of the route that is shown.\n\t\t\tthis._undo = null;\n\t\t\tthis._currentHash = newHash;\n\t\t\tthis._finishRestore(newHash);\n\t\t\treturn;\n\t\t}\n\n\t\tconst phase = this._phase;\n\t\tconst commit = phase.kind === \"awaitingHash\" ? phase.commit : phase.kind === \"committing\" ? phase : null;\n\t\tif (commit?.hash === newHash) {\n\t\t\tthis._phase = commit;\n\t\t\tthis._commitNavigation(newHash, commit.route);\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentHash = this._currentHash;\n\t\tif (newHash === currentHash) {\n\t\t\tif (this._pendingRestoresHash()) {\n\t\t\t\t// The URL is back on the committed hash, whose route was never left. That ends the\n\t\t\t\t// navigation that had moved it away; one that waits for UI5 to write its hash goes on.\n\t\t\t\tif (this._phase.kind === \"evaluating\") this._cancelPendingNavigation();\n\t\t\t\telse this._undo = null;\n\t\t\t} else {\n\t\t\t\t// The committed hash is reported again, and its route matches again as it does\n\t\t\t\t// natively: UI5 has written the hash of a navigation with component targets, or has\n\t\t\t\t// reset the hash of the hash changer after a target was displayed without a route,\n\t\t\t\t// or parse() was called directly.\n\t\t\t\tsuper.parse(newHash);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst routeInfo = this._matchRoute(newHash);\n\t\tconst toRoute = routeInfo.name;\n\n\t\t// A pending navigation that has moved the URL as well leaves this one to undo both changes.\n\t\tconst pendingUndo = this._pendingRestoresHash() ? undo : null;\n\t\t// The router is putting the URL back and gets another hash: that one is not undone as a\n\t\t// whole, so that an undo cannot cause the next one.\n\t\tconst undoing = this._phase.kind === \"restoring\";\n\t\tthis._cancelPendingNavigation();\n\t\t// A navigationSettled handler that navigated on the cancellation has moved the URL on.\n\t\tif (this._currentHash !== currentHash) return;\n\t\tthis._undo = undoing ? null : this._describeUndo(pendingUndo, reported);\n\t\t// Another listener of the hash change that navTo() caused has replaced the hash, before\n\t\t// this router received it: undoing this hash change undoes the one of navTo() as well.\n\t\tif (this._undo && commit === phase && !commit.restoreHash) this._undo.fullHash = commit.writtenOver;\n\n\t\tconst direction = reported ? History.getInstance().getDirection() : undefined;\n\t\tconst attempt = this._startAttempt(newHash, true, direction);\n\t\tconst { generation } = attempt;\n\n\t\tconst context = this._createGuardContext(routeInfo, newHash, attempt.controller.signal);\n\n\t\tconst decision = this._evaluateGuards(context);\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tthis._applyWhenDecided(\n\t\t\t\tdecision,\n\t\t\t\t(d) => {\n\t\t\t\t\tif (generation !== this._parseGeneration) {\n\t\t\t\t\t\tLog.debug(\n\t\t\t\t\t\t\t\"Async guard result discarded (superseded by newer navigation)\",\n\t\t\t\t\t\t\tnewHash,\n\t\t\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t\t\t);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._applyDecision(d, newHash, toRoute, context.bag, attempt);\n\t\t\t\t},\n\t\t\t\tnewHash,\n\t\t\t\ttrue,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._applyDecision(decision, newHash, toRoute, context.bag, attempt);\n\t}\n\n\t/**\n\t * Stop listening to hash changes and reset guard state.\n\t *\n\t * Resets `_currentRoute` and `_currentHash` so that a subsequent\n\t * `initialize()` re-parses the current hash and fires `routeMatched`,\n\t * matching the native `sap.m.routing.Router` behavior. The route is\n\t * kept for `initialize(true)`, which resumes it instead.\n\t *\n\t * @override sap.ui.core.routing.Router#stop\n\t * @since 1.0.1\n\t */\n\toverride stop(): this {\n\t\tif (this._blockLoad) this._blockLoad.start = false;\n\t\t// Cancel first so in-flight navigationSettled() resolvers receive the\n\t\t// Cancelled result before _lastSettlement is cleared below.\n\t\tthis._cancelPendingNavigation();\n\t\t// A hash change that was to put the URL back does not reach a stopped router.\n\t\tthis._undo = null;\n\t\t// Nothing is committed on a router that is stopped already, or stops before its first navigation settles.\n\t\tif (this._currentHash !== null) this._stoppedRoute = this._currentRoute;\n\t\tthis._currentRoute = \"\";\n\t\tthis._currentHash = null;\n\t\tthis._lastSettlement = null;\n\t\tthis._detachHashListeners();\n\t\tsuper.stop();\n\t\treturn this;\n\t}\n\n\t/** Detach what {@link _start} has attached. */\n\tprivate _detachHashListeners(): void {\n\t\tthis.getHashChanger().detachEvent(\"hashChanged\", this._onHashReported, this);\n\t\t// UI5 moves the listener along when the global hash changer is replaced.\n\t\tHashChanger.getInstance().detachEvent(\"hashChanged\", this._onRootHashChanged, this);\n\t\tthis._rootHashChanger = null;\n\t}\n\n\t/**\n\t * Invalidate any in-flight async guard work. Bumps the generation counter\n\t * so pending `.then()` callbacks see they are stale, aborts the signal,\n\t * and transitions to idle. A navigation that waits for its guards or for\n\t * its hash settles as `Cancelled`. With `restoreHash`, a cancelled hash-change\n\t * navigation also gets its hash restored: `navTo()` passes it when the\n\t * call itself will not move the URL.\n\t */\n\tprivate _cancelPendingNavigation(restoreHash = false): void {\n\t\t++this._parseGeneration;\n\t\tconst phase = this._phase;\n\t\tconst pendingRestoresHash = this._pendingRestoresHash();\n\t\t// Idle before the settlement fires, so that a handler can navigate.\n\t\tthis._phase = IDLE;\n\t\t// A navigation that is committing ends with the navigation that supersedes it.\n\t\tif (phase.kind === \"idle\" || phase.kind === \"committing\") return;\n\t\tif (phase.kind === \"restoring\") {\n\t\t\t// A navigation that waits for the URL to be back has ended already: it settles as it ended.\n\t\t\tthis._flushSettlement(phase.result);\n\t\t\treturn;\n\t\t}\n\t\tif (phase.kind === \"evaluating\") phase.attempt.controller.abort();\n\t\tthis._settleUncommitted(\n\t\t\t{ status: NavigationOutcome.Cancelled, route: this._currentRoute, hash: this._currentHash ?? \"\" },\n\t\t\tphase.kind === \"evaluating\" ? phase.attempt.hash : phase.commit.hash,\n\t\t\trestoreHash && pendingRestoresHash,\n\t\t);\n\t}\n\n\t/**\n\t * Whether the pending navigation leaves a hash in the URL that never committed, the one of a\n\t * hash-change navigation: it must be restored unless a navigation moves the URL.\n\t */\n\tprivate _pendingRestoresHash(): boolean {\n\t\tconst phase = this._phase;\n\t\tif (phase.kind === \"evaluating\") return phase.attempt.restoreHash;\n\t\tif (phase.kind === \"committing\") return phase.restoreHash;\n\t\treturn phase.kind === \"awaitingHash\" && phase.commit.restoreHash;\n\t}\n\n\t/**\n\t * Start evaluating a navigation. Its generation is its own, so the result of any earlier\n\t * attempt is stale: also one that a navigationSettled handler started while this\n\t * navigation cancelled its predecessor, which is aborted here without a settlement.\n\t */\n\tprivate _startAttempt(hash: string, restoreHash: boolean, direction?: Direction): NavigationAttempt {\n\t\tif (this._phase.kind === \"evaluating\") this._phase.attempt.controller.abort();\n\t\tconst attempt: NavigationAttempt = {\n\t\t\thash,\n\t\t\tcontroller: new AbortController(),\n\t\t\tgeneration: ++this._parseGeneration,\n\t\t\trestoreHash,\n\t\t\tdirection,\n\t\t};\n\t\tthis._phase = { kind: \"evaluating\", attempt };\n\t\treturn attempt;\n\t}\n\n\t/**\n\t * Apply the decision of async guards once it is there. Until then the navigation is postponed,\n\t * which UI5 sees as a route match in progress (see {@link _mirrorMatchingProcess}). The pipeline\n\t * turns a failing guard into an error decision, so an error thrown here comes from applying the\n\t * decision, which has no caller to throw to: it is logged, and fails the navigation unless that\n\t * has settled.\n\t */\n\tprivate _applyWhenDecided(\n\t\tdecision: PromiseLike<GuardDecision>,\n\t\tapply: (decision: GuardDecision) => void,\n\t\tattemptedHash: string | undefined,\n\t\trestoreHash: boolean,\n\t): void {\n\t\tif (this._phase.kind === \"evaluating\") this._phase = { ...this._phase, postponed: true };\n\t\tdecision.then((d) => {\n\t\t\tconst lastSettlement = this._lastSettlement;\n\t\t\ttry {\n\t\t\t\tapply(d);\n\t\t\t} catch (error) {\n\t\t\t\tLog.error(\n\t\t\t\t\t\"Navigation failed after its guards had settled\",\n\t\t\t\t\terror instanceof Error ? error : String(error),\n\t\t\t\t\tLOG_COMPONENT,\n\t\t\t\t);\n\t\t\t\tif (this._lastSettlement === lastSettlement) {\n\t\t\t\t\tthis._errorNavigation(error, attemptedHash, restoreHash);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Apply a guard decision for the parse() fallback path.\n\t */\n\tprivate _applyDecision(\n\t\tdecision: GuardDecision,\n\t\thash: string,\n\t\troute: string,\n\t\tbag: Map<string, unknown>,\n\t\tattempt: NavigationAttempt,\n\t): void {\n\t\t// A guard that navigated itself has superseded the navigation it was guarding.\n\t\tif (attempt.generation !== this._parseGeneration) return;\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\":\n\t\t\t\tthis._phase = { kind: \"committing\", route, hash, origin: \"parse\", restoreHash: false };\n\t\t\t\tthis._commitNavigation(hash, route);\n\t\t\t\tbreak;\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(hash);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\t// The hash that redirects has reached the browser: the target takes its history entry.\n\t\t\t\tthis._startRedirectChain(decision.target, hash, bag, attempt, true);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, hash);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/**\n\t * Leave the title history of UI5 (`getTitleHistory()`) as after the native equivalent of a\n\t * redirected hash change: the hash change, then `navTo(target, ..., true)`. The route of the\n\t * hash change never matched, so UI5 has not handled its title:\n\t * - A new entry or a step forward would have added a title, which the title of the target\n\t * replaces: UI5 must not remove the title of the route before it.\n\t * - A step back would have removed the title of the route that was left, so that the target\n\t * replaces the title of the entry the step arrived at: UI5 removes the first for the\n\t * replaced hash, the router removes the second, under the condition of UI5 for a step back.\n\t */\n\tprivate _alignTitleHistory(direction: Direction | undefined): void {\n\t\tif (direction === HistoryDirection.NewEntry || direction === HistoryDirection.Forwards) {\n\t\t\tReflect.set(this, \"_bLastHashReplaced\", false);\n\t\t} else if (direction === HistoryDirection.Backwards) {\n\t\t\tconst titles: unknown[] = this.getTitleHistory();\n\t\t\tconst left = titles.at(-1);\n\t\t\tconst replaced = titles.at(-2);\n\t\t\tif (isRecord(left) && isRecord(replaced) && !left.isHome && left.title !== replaced.title) {\n\t\t\t\ttitles.splice(-2, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Delegate to the parent router and update internal state.\n\t *\n\t * State is updated BEFORE calling parse to ensure that if event handlers\n\t * (e.g., routeMatched) trigger nested navigation, the leave guards will\n\t * run for the correct (new) route rather than the old one. The settlement\n\t * fires before parse as well, so the settlements of such nested navigations\n\t * follow it.\n\t */\n\tprivate _commitNavigation(hash: string, route: string): void {\n\t\tconst wasRedirect = this._phase.kind === \"committing\" && this._phase.origin === \"redirect\";\n\t\tif (this._phase.kind === \"committing\") this._alignTitleHistory(this._phase.direction);\n\t\t// The URL has moved on: a hash change that was to put it back is not awaited any more.\n\t\tthis._undo = null;\n\t\tthis._currentHash = hash;\n\t\tthis._currentRoute = route;\n\t\t// Transition to idle before super.parse so that routeMatched/patternMatched\n\t\t// handlers that call navTo() go through the full guard pipeline.\n\t\tthis._phase = IDLE;\n\t\tthis._flushSettlement({\n\t\t\tstatus: wasRedirect\n\t\t\t\t? NavigationOutcome.Redirected\n\t\t\t\t: this._currentRoute === \"\"\n\t\t\t\t\t? NavigationOutcome.Bypassed\n\t\t\t\t\t: NavigationOutcome.Committed,\n\t\t\troute: this._currentRoute,\n\t\t\thash,\n\t\t});\n\t\t// A navigationSettled handler that navigated on has committed its own hash.\n\t\tif (this._currentHash !== hash) return;\n\t\tsuper.parse(hash);\n\t}\n\n\t/**\n\t * Commit the navigation of the committing phase after `super.navTo()` unless `parse()` has\n\t * committed it. Returns whether the navigation takes place:\n\t * - The hash changer shows the target hash: the route matches here.\n\t * - UI5 writes the hash later, which it does with component targets, once the nested\n\t * components are loaded. The navigation waits for it: it commits, and the route matches,\n\t * when `parse()` gets that hash, as the route does natively. Committed here, the router\n\t * would be on a route that UI5 does not display if the hash is never written.\n\t * - Otherwise the hash changer has refused the hash change, as the Fiori launchpad does while\n\t * it asks the user about unsaved data. Nothing changed, so nothing is committed.\n\t */\n\tprivate _commitAfterNavTo(componentTargetInfo: Record<string, ComponentTargetParameters> | undefined): boolean {\n\t\tconst phase = this._phase;\n\t\tif (phase.kind !== \"committing\") return true;\n\t\tif (this.getHashChanger().getHash() === phase.hash) {\n\t\t\tthis._commitNavigation(phase.hash, phase.route);\n\t\t\treturn true;\n\t\t}\n\t\tif (!componentTargetInfo || Object.keys(componentTargetInfo).length === 0) return false;\n\t\tthis._phase = { kind: \"awaitingHash\", commit: phase };\n\t\treturn true;\n\t}\n\n\t/**\n\t * Evaluate guards on a redirect target and apply the resulting decision.\n\t *\n\t * Handles the unknown-route block, loop detection (visited-hash set +\n\t * depth cap), sync/async guard evaluation, and recursive chaining when\n\t * the target's guard itself returns a redirect. All hops in a chain\n\t * share the same AbortSignal and generation counter from the original\n\t * navigation so that a superseding navigation correctly discards\n\t * in-flight redirect work.\n\t *\n\t * @param target - Redirect target: a route name string or {@link GuardRedirect} with parameters.\n\t * @param chain - Mutable context threaded through the redirect chain (visited set, signals, etc.).\n\t */\n\tprivate _redirect(target: string | GuardRedirect, chain: RedirectChainContext): void {\n\t\tconst targetName = typeof target === \"string\" ? target : target.route;\n\t\tconst targetRoute = this.getRoute(targetName);\n\t\tif (!targetRoute) {\n\t\t\tLog.warning(\n\t\t\t\t`Guard redirect target \"${targetName}\" is not a known route, treating as blocked`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\t\tlet targetHash: string;\n\t\ttry {\n\t\t\ttargetHash = targetRoute.getURL(typeof target === \"string\" ? {} : (target.parameters ?? {}));\n\t\t} catch (error) {\n\t\t\tLog.error(\n\t\t\t\t`Guard redirect target \"${targetName}\" has no valid hash, navigation failed`,\n\t\t\t\tString(error),\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._errorNavigation(error, chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\n\t\tif (chain.visited.has(targetHash)) {\n\t\t\tLog.error(\n\t\t\t\t`Guard redirect loop detected: ${[...chain.visited, targetHash].join(\" -> \")}`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\t\tif (chain.visited.size > MAX_REDIRECT_DEPTH) {\n\t\t\tLog.error(\n\t\t\t\t`Guard redirect chain exceeded maximum depth (${MAX_REDIRECT_DEPTH}): ${[...chain.visited].join(\" -> \")}`,\n\t\t\t\tundefined,\n\t\t\t\tLOG_COMPONENT,\n\t\t\t);\n\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\treturn;\n\t\t}\n\t\tchain.visited.add(targetHash);\n\n\t\tconst routeInfo = this._matchRoute(targetHash);\n\t\tconst toRoute = routeInfo.name;\n\t\tconst context = this._createGuardContext(routeInfo, targetHash, chain.signal, chain);\n\n\t\tconst decision = this._evaluateGuards(context, true);\n\n\t\tif (isPromiseLike(decision)) {\n\t\t\tthis._applyWhenDecided(\n\t\t\t\tdecision,\n\t\t\t\t(d) => this._applyRedirectDecision(d, target, targetHash, toRoute, chain),\n\t\t\t\tchain.attemptedHash,\n\t\t\t\tchain.restoreHash,\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._applyRedirectDecision(decision, target, targetHash, toRoute, chain);\n\t}\n\n\t/**\n\t * Apply a guard decision within a redirect chain. For \"allow\", enter\n\t * committing phase and delegate to navTo (which hits the existing bypass);\n\t * if that does not reach parse(), commit the target directly. A target that\n\t * is displayed already settles the navigation without a commit.\n\t * For \"block\", block the entire chain. For \"redirect\", recurse.\n\t *\n\t * @param decision - Normalized guard pipeline result for this hop.\n\t * @param target - The redirect target (route name or {@link GuardRedirect}).\n\t * @param targetHash - Resolved hash for the redirect target.\n\t * @param toRoute - Route that matches the hash, as in the hop's guard context: the route UI5 displays.\n\t * @param chain - Shared redirect chain context with visited set, signals, etc.\n\t */\n\tprivate _applyRedirectDecision(\n\t\tdecision: GuardDecision,\n\t\ttarget: string | GuardRedirect,\n\t\ttargetHash: string,\n\t\ttoRoute: string,\n\t\tchain: RedirectChainContext,\n\t): void {\n\t\t// Superseded while the hop's guards ran: by a newer navigation, or by a guard that navigated.\n\t\tif (chain.generation !== this._parseGeneration) return;\n\t\tswitch (decision.action) {\n\t\t\tcase \"allow\": {\n\t\t\t\tconst componentTargetInfo = typeof target === \"string\" ? undefined : target.componentTargetInfo;\n\t\t\t\tif (targetHash === this._currentHash) {\n\t\t\t\t\t// The target is displayed already, so no route matches again, as for a navTo() to\n\t\t\t\t\t// the committed hash: the URL is put back and UI5 sets the hashes of nested components.\n\t\t\t\t\tthis._phase = IDLE;\n\t\t\t\t\tthis._settleUncommitted(\n\t\t\t\t\t\t{ status: NavigationOutcome.Redirected, route: this._currentRoute, hash: targetHash },\n\t\t\t\t\t\tchain.attemptedHash,\n\t\t\t\t\t\tchain.restoreHash,\n\t\t\t\t\t\ttypeof target !== \"string\" && componentTargetInfo\n\t\t\t\t\t\t\t? () => {\n\t\t\t\t\t\t\t\t\t// Unless a settlement handler has moved the URL on.\n\t\t\t\t\t\t\t\t\tif (this.getHashChanger().getHash() !== targetHash) return;\n\t\t\t\t\t\t\t\t\tsuper.navTo(\n\t\t\t\t\t\t\t\t\t\ttarget.route,\n\t\t\t\t\t\t\t\t\t\ttarget.parameters ?? {},\n\t\t\t\t\t\t\t\t\t\tcomponentTargetInfo,\n\t\t\t\t\t\t\t\t\t\tchain.replace,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tthis._phase = {\n\t\t\t\t\tkind: \"committing\",\n\t\t\t\t\troute: toRoute,\n\t\t\t\t\thash: targetHash,\n\t\t\t\t\torigin: \"redirect\",\n\t\t\t\t\tdirection: chain.direction,\n\t\t\t\t\trestoreHash: chain.restoreHash,\n\t\t\t\t\twrittenOver: HashChanger.getInstance().getHash(),\n\t\t\t\t};\n\t\t\t\ttry {\n\t\t\t\t\t// Writing the hash the URL already shows changes nothing, except that a nested\n\t\t\t\t\t// router would add its prefix for an empty hash (see _restoreHash).\n\t\t\t\t\tconst hashShown = this.getHashChanger().getHash() === targetHash;\n\t\t\t\t\tif (typeof target === \"string\") {\n\t\t\t\t\t\tif (!hashShown) this.navTo(target, {}, {}, chain.replace);\n\t\t\t\t\t} else if (!hashShown || componentTargetInfo) {\n\t\t\t\t\t\tthis.navTo(target.route, target.parameters ?? {}, componentTargetInfo, chain.replace);\n\t\t\t\t\t}\n\t\t\t\t\tif (!this._commitAfterNavTo(componentTargetInfo)) {\n\t\t\t\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (this._phase.kind === \"committing\") {\n\t\t\t\t\t\tthis._phase = IDLE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"block\":\n\t\t\t\tthis._blockNavigation(chain.attemptedHash, chain.restoreHash);\n\t\t\t\tbreak;\n\t\t\tcase \"redirect\":\n\t\t\t\tthis._redirect(decision.target, chain);\n\t\t\t\tbreak;\n\t\t\tcase \"error\":\n\t\t\t\tthis._errorNavigation(decision.error, chain.attemptedHash, chain.restoreHash);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\t/** The route that matches a hash, and its arguments. For a hash that no route matches: no route (`\"\"`), no arguments. */\n\tprivate _matchRoute(hash: string): RouteInfo {\n\t\tconst info = this.getRouteInfoByHash(hash);\n\t\treturn { name: info?.name ?? \"\", arguments: info?.arguments ?? {} };\n\t}\n\n\t/**\n\t * The greedy routes that match `hash` in addition to `firstMatch`, the first route that\n\t * matches it. UI5 matches them as well and fires their events.\n\t */\n\tprivate _greedyMatches(hash: string, firstMatch: string): string[] {\n\t\treturn this._greedyRouteNames.filter((name) => name !== firstMatch && this.getRoute(name)?.match(hash));\n\t}\n\n\t/**\n\t * Evaluate the guards of a navigation: of the routes in its context, and of the greedy routes\n\t * that are left and entered with them. A hop of a redirect chain leaves no route.\n\t */\n\tprivate _evaluateGuards(context: GuardContext, redirectHop = false): GuardDecision | Promise<GuardDecision> {\n\t\treturn this._pipeline.evaluate(context, {\n\t\t\tskipLeaveGuards: redirectHop,\n\t\t\talsoLeaving: this._greedyMatches(context.fromHash, context.fromRoute),\n\t\t\talsoEntering: this._greedyMatches(context.toHash, context.toRoute),\n\t\t});\n\t}\n\n\t/**\n\t * Build the guard context of a navigation to `routeInfo`. A hop of a redirect chain passes the\n\t * chain, whose source route, source hash and bag are those of the original navigation.\n\t */\n\tprivate _createGuardContext(\n\t\trouteInfo: RouteInfo,\n\t\ttoHash: string,\n\t\tsignal: AbortSignal,\n\t\tchain?: RedirectChainContext,\n\t): GuardContext {\n\t\tconst fromRoute = chain ? chain.fromRoute : this._currentRoute;\n\t\treturn {\n\t\t\ttoRoute: routeInfo.name,\n\t\t\ttoHash,\n\t\t\ttoArguments: routeInfo.arguments,\n\t\t\tfromRoute,\n\t\t\tfromHash: chain ? chain.fromHash : (this._currentHash ?? \"\"),\n\t\t\tsignal,\n\t\t\tbag: chain ? chain.bag : new Map<string, unknown>(),\n\t\t\ttoMeta: this.getRouteMeta(routeInfo.name),\n\t\t\tfromMeta: this.getRouteMeta(fromRoute),\n\t\t\townerComponent: this._ownerComponent,\n\t\t};\n\t}\n\n\t/**\n\t * Start a new redirect chain for the given evaluating attempt.\n\t * Called by {@link _applyPreflightDecision} and {@link _applyDecision}\n\t * when a guard returns a redirect. Delegates to {@link _redirect} with\n\t * a fresh {@link RedirectChainContext}.\n\t */\n\tprivate _startRedirectChain(\n\t\ttarget: string | GuardRedirect,\n\t\thash: string,\n\t\tbag: Map<string, unknown>,\n\t\tattempt: NavigationAttempt,\n\t\treplace: boolean | undefined,\n\t): void {\n\t\tconst visited = new Set<string>();\n\t\tvisited.add(hash);\n\t\tthis._redirect(target, {\n\t\t\tvisited,\n\t\t\tattemptedHash: hash,\n\t\t\trestoreHash: attempt.restoreHash,\n\t\t\treplace,\n\t\t\tdirection: attempt.direction,\n\t\t\tfromRoute: this._currentRoute,\n\t\t\tfromHash: this._currentHash ?? \"\",\n\t\t\tsignal: attempt.controller.signal,\n\t\t\tgeneration: attempt.generation,\n\t\t\tbag,\n\t\t});\n\t}\n\n\t/**\n\t * Settle as Blocked. With `restoreHash` (default), the hash change of the navigation is\n\t * undone first (see {@link _settleUncommitted}). Preflight callers pass false unless they\n\t * superseded a hash-change navigation: otherwise the hash was never changed.\n\t */\n\tprivate _blockNavigation(attemptedHash?: string, restoreHash = true): void {\n\t\tthis._phase = IDLE;\n\t\tthis._settleUncommitted(\n\t\t\t{ status: NavigationOutcome.Blocked, route: this._currentRoute, hash: this._currentHash ?? \"\" },\n\t\t\tattemptedHash,\n\t\t\trestoreHash,\n\t\t);\n\t}\n\n\t/**\n\t * Clear pending state and flush an Error settlement.\n\t * Same structure as {@link _blockNavigation} but with `NavigationOutcome.Error`\n\t * and the error that caused the failure.\n\t */\n\tprivate _errorNavigation(error: unknown, attemptedHash?: string, restoreHash = true): void {\n\t\tthis._phase = IDLE;\n\t\tthis._settleUncommitted(\n\t\t\t{ status: NavigationOutcome.Error, route: this._currentRoute, hash: this._currentHash ?? \"\", error },\n\t\t\tattemptedHash,\n\t\t\trestoreHash,\n\t\t);\n\t}\n\n\t/**\n\t * Settle a navigation that did not commit. With `restoreHash`, the hash it left in the URL\n\t * is restored first, so that settlement handlers run on the final URL and a hash they set\n\t * is not overwritten. The exception is a first navigation: nothing is committed yet, so the\n\t * empty hash is restored after the settlement and parsed as a navigation of its own.\n\t * `whenBack` runs after the settlement.\n\t */\n\tprivate _settleUncommitted(\n\t\tresult: NavigationResult,\n\t\tattemptedHash: string | undefined,\n\t\trestoreHash: boolean,\n\t\twhenBack?: () => void,\n\t): void {\n\t\tconst loadDefaultRoute = restoreHash && this._currentHash === null && !!attemptedHash;\n\t\t// It settles once the URL is back.\n\t\tif (restoreHash && !loadDefaultRoute && !this._undoHashChange(result, whenBack)) return;\n\t\tthis._flushSettlement(result);\n\t\twhenBack?.();\n\t\t// Unless a handler navigated and committed in the meantime.\n\t\tif (loadDefaultRoute && this._currentHash === null) this._restoreHash(\"\", false);\n\t}\n\n\t/**\n\t * Describe how to undo the hash change that the navigation starts with. After `pending`, the\n\t * undo of a navigation that this one supersedes, it takes back both changes. A `parse()` that\n\t * is not `reported` by the hash changer comes with no hash change.\n\t */\n\tprivate _describeUndo(pending: HashChangeUndo | null, reported: boolean): HashChangeUndo | null {\n\t\tif (!reported) return pending;\n\t\tconst shown = HashChanger.getInstance().getHash();\n\t\tconst step = lastStep;\n\t\tif (!pending) return { first: shown, fullHash: undefined, shown, step, started: false };\n\t\tconst offset = pending.step && step ? pending.step.offset + step.offset : 0;\n\t\treturn {\n\t\t\tfirst: pending.first,\n\t\t\tfullHash: pending.fullHash,\n\t\t\tshown,\n\t\t\tstep: step && offset ? { offset, href: step.href } : null,\n\t\t\tstarted: false,\n\t\t};\n\t}\n\n\t/**\n\t * Put the URL back after a navigation that did not commit. Returns whether it is back;\n\t * otherwise `result` settles when it is.\n\t *\n\t * While the URL still shows the hash change that started the navigation, that change is undone\n\t * as a whole, so that the hashes of nested routers are back as well:\n\t * - A step through the browser history is taken back, which leaves the history as it was.\n\t * The browser does that asynchronously.\n\t * - Any other change (a new entry, or a step the browser does not report) has its entry replaced with\n\t * the full previous hash, once UI5 has reported the change to every router. Nested routers\n\t * have received their part of the refused hash by then; they receive the previous one next.\n\t *\n\t * `parse()` ends the wait when the hash change arrives that shows the full previous hash.\n\t *\n\t * If the URL has moved on since, only the hash of this router is restored. So it is while\n\t * no navigation has committed: the URL before the change showed no route of this router either.\n\t */\n\tprivate _undoHashChange(result: NavigationResult, whenBack?: () => void): boolean {\n\t\tconst undo = this._undo;\n\t\tconst hash = this._currentHash;\n\t\tconst rootHash = HashChanger.getInstance().getHash();\n\t\tif (undo === null || hash === null || undo.shown !== rootHash || undo.fullHash === rootHash) {\n\t\t\tthis._restoreHash(hash ?? \"\");\n\t\t\treturn true;\n\t\t}\n\t\tconst href = window.location.href;\n\t\tundo.started = true;\n\t\tthis._phase = { kind: \"restoring\", result, whenBack };\n\t\tif (undoneHref === href) {\n\t\t\t// Another router is taking the step back.\n\t\t} else if (undo.step) {\n\t\t\tundoneHref = href;\n\t\t\twindow.history.go(-undo.step.offset);\n\t\t} else if (undo.fullHash === undefined) {\n\t\t\t// UI5 is still reporting the change to the nested routers.\n\t\t\tthis._phase = { ...this._phase, awaitsReport: true };\n\t\t} else {\n\t\t\tthis._replaceFullHash(undo.fullHash);\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Replace the hash of the root hash changer with the full previous hash, and settle the\n\t * navigation that waits for it unless `parse()` has done so.\n\t */\n\tprivate _replaceFullHash(fullHash: string): void {\n\t\tHashChanger.getInstance().replaceHash(fullHash, HistoryDirection.Unknown);\n\t\tthis._finishRestore();\n\t}\n\n\t/**\n\t * Settle the navigation that waited for the URL to be back: on `hash`, if the hash changer\n\t * has reported one with the URL.\n\t */\n\tprivate _finishRestore(hash?: string): void {\n\t\tconst phase = this._phase;\n\t\tif (phase.kind !== \"restoring\") return;\n\t\tthis._phase = IDLE;\n\t\tthis._flushSettlement(hash === undefined ? phase.result : { ...phase.result, hash });\n\t\tphase.whenBack?.();\n\t}\n\n\t/**\n\t * Restore the previous hash of this router without creating a history entry\n\t * (see {@link _undoHashChange} for the hash change of a navigation).\n\t * Assumes replaceHash fires hashChanged synchronously (validated by test).\n\t * `_currentRoute` stays unchanged because the navigation never\n\t * committed. The user remains on the same logical route.\n\t *\n\t * A hash that the hash changer already shows is not written again: the navigation never\n\t * moved it. For a nested router, writing its empty hash would add its prefix to the browser\n\t * hash (`shell` becomes `shell&/child/`).\n\t */\n\tprivate _restoreHash(hash: string, suppressParse = true): void {\n\t\tconst hashChanger = this.getHashChanger();\n\t\tif (hashChanger.getHash() === hash) return;\n\t\tthis._suppressedHash = suppressParse ? hash : null;\n\t\tvoid hashChanger.replaceHash(hash, HistoryDirection.Unknown);\n\t\tthis._suppressedHash = null;\n\t}\n\n\t/**\n\t * Collect all route names and their patterns from the router.\n\t * Skips routes whose pattern is undefined (no pattern configured).\n\t */\n\tprivate _collectRoutePatterns(): RoutePattern[] {\n\t\tconst result: RoutePattern[] = [];\n\t\tfor (const name of this._routeNames) {\n\t\t\tconst pattern = this.getRoute(name)?.getPattern();\n\t\t\tif (pattern !== undefined) result.push({ name, pattern });\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Register one manifest guard: as the last guard of its route, or in front of the guard\n\t * `before`. A registration error (`unknownRouteRegistration: \"throw\"` for an unknown route)\n\t * is logged and skips the guard: no caller of the manifest config could catch it, and it\n\t * must not keep the router from starting.\n\t */\n\tprivate _registerManifestGuard(descriptor: ManifestGuardDescriptor, guardFn: GuardFn, before?: GuardFn): void {\n\t\ttry {\n\t\t\tif (descriptor.route === \"*\") {\n\t\t\t\tthis.addGuard(guardFn);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (descriptor.type === \"leave\") {\n\t\t\t\tthis._handleUnknownRouteRegistration(descriptor.route, \"addLeaveGuard\");\n\t\t\t\tthis._pipeline.addLeaveGuard(descriptor.route, guardFn, before);\n\t\t\t} else {\n\t\t\t\tthis._handleUnknownRouteRegistration(descriptor.route, \"addRouteGuard\");\n\t\t\t\tthis._pipeline.addEnterGuard(descriptor.route, guardFn, before);\n\t\t\t}\n\t\t\tthis._manifestGuards.push({ descriptor, fn: guardFn });\n\t\t} catch (err: unknown) {\n\t\t\tLog.error(`guardRouter.guards: failed to register \"${descriptor.modulePath}\"`, String(err), LOG_COMPONENT);\n\t\t}\n\t}\n\n\t/** Register the guards of each descriptor, loading their modules on first use (see `createLazyGuards`). */\n\tprivate _registerLazyGuards(descriptors: ManifestGuardDescriptor[]): void {\n\t\tfor (const descriptor of descriptors) {\n\t\t\tfor (const fn of createLazyGuards(descriptor)) this._registerManifestGuard(descriptor, fn);\n\t\t}\n\t}\n\n\t/**\n\t * Clean up guards on destroy. Bumps generation to discard pending async results.\n\t * A second call does nothing, like `sap.ui.core.routing.Router#destroy`.\n\t *\n\t * @since 1.0.1\n\t */\n\toverride destroy(): this {\n\t\tif (this._destroyed) return this;\n\t\tthis._destroyed = true;\n\t\tthis._pipeline.clear();\n\t\tthis._pendingGuardDescriptors = [];\n\t\tthis._sourceDescriptors = [];\n\t\tthis._manifestGuards = [];\n\t\tthis._cancelPendingNavigation();\n\t\tthis._lastSettlement = null;\n\t\tthis._detachHashListeners();\n\t\tthis._meta.clear();\n\t\tsuper.destroy();\n\t\treturn this;\n\t}\n}\n"],"mappings":";;;;;;QAsBOA,iBAAiB,GAAAC,sBAAA,CAAAC,mBAAA;EAAA,MACjBC,aAAa,GAAAF,sBAAA,CAAAG,eAAA;EAAA,MAAwBC,aAAa,GAAAD,eAAA;EAAA,MAAEE,iBAAiB,GAAAF,eAAA;EAAA,MAAEG,aAAa,GAAAH,eAAA;EAAA,MAC5DI,QAAQ,GAAAC,cAAA;EAAA,MAAEC,sBAAsB,GAAAD,cAAA;EAAA,MACtDE,gBAAgB,GAAAC,eAAA;EAAA,MAAEC,gBAAgB,GAAAD,eAAA;EAAA,MAClCE,YAAY,GAAAC,cAAA;EAAA,MAAEC,iBAAiB,GAAAD,cAAA;EAAA,MAAEE,mBAAmB,GAAAF,cAAA;EAAA,MACtDG,cAAc,GAAAjB,sBAAA,CAAAkB,gBAAA;EAAA,MAAIC,UAAU,GAAAD,gBAAA;EAEnC,MAAME,gBAAgB,GAAGC,WAAW,CAACC,OAAO,CAACF,gBAAgB;EAG7D;AACA;AACA;AACA;AACA;EACA,SAASG,kBAAkBA,CAACC,MAAc,EAAU;IACnD,MAAMC,MAAM,GAAIC,GAAgB,IAAcA,GAAG,KAAK,aAAa;IACnE,OAAO,IAAIC,KAAK,CAACH,MAAM,EAAE;MACxBI,GAAG,EAAEA,CAACC,MAAM,EAAEH,GAAG,EAAEI,QAAQ,KAAeL,MAAM,CAACC,GAAG,CAAC,GAAGK,SAAS,GAAGC,OAAO,CAACJ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